Page processing method and electronic device
By clearing and re-identifying the homepage record information, the problem of incorrect application homepage identification was resolved, ensuring the normal operation of split-screen display technology and improving user experience and page display effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-09-13
- Publication Date
- 2026-06-12
Smart Images

Figure CN119225886B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a page processing method and an electronic device. Background Technology
[0002] With the continuous development of terminal device technology, the functions of applications in terminal devices are becoming more and more numerous, and each application contains a variety of pages.
[0003] Applications typically include a homepage, which can be defined as the primary interface or default page presented to a user when visiting a website or application; it is usually the starting point for user interaction with the system. Correctly identifying the application's homepage is fundamental for the proper implementation of homepage-related services. However, current implementations may encounter homepage identification errors. Summary of the Invention
[0004] This application provides a page processing method and an electronic device, applied in the field of terminal technology, to improve the accuracy of the homepage identified by the application.
[0005] Firstly, embodiments of this application propose a page processing method. The method includes:
[0006] In response to the startup of the first process of the first application, the first page is determined to be the main page of the first application through the first process, wherein the first process can be the main process of the first application;
[0007] In response to a user's action of exiting the first page, pop the first page recorded in the first data stack;
[0008] After performing the pop operation, if there are no other pages in the first data stack, the record information of the first page being the main page of the first application is cleared.
[0009] In this implementation, after identifying a page (i.e., the first page) as the homepage of the first application, during the process of exiting the first page, the first page is popped from the first data stack used to record opened pages. It can then be further determined whether any other pages exist in the first data stack after the pop operation. If so, it can be confirmed that this scenario may meet the criteria for incorrect homepage identification, and therefore the record information indicating that the first page is the homepage of the first application can be cleared to avoid recording the wrong homepage for the first application.
[0010] It's also understandable that in some scenarios, the first page might indeed be the homepage of the first application. Therefore, when a user instructs the user to close the first page (i.e., the homepage), it usually means exiting the first application. In this scenario, even if the record information indicating the first page is the homepage of the first application is cleared (and this information can be considered correct at this point), the main process of the first application will still need to re-identify the homepage during the next startup. Therefore, even if the correct homepage record information is cleared, it does not affect the application's logic and business processing. Furthermore, this approach effectively corrects errors in the recorded homepage information (i.e., deletes erroneous information), preventing homepage-related service anomalies caused by incorrect homepage information recorded for the first application.
[0011] In one possible implementation, the method further includes:
[0012] After performing the pop operation, if a second page still exists in the first data stack, and the page type of the second page is the first type, then the second page is determined to be the main page of the first application.
[0013] The first type is page types other than the details page type.
[0014] By implementing this method, after deleting the record information where the first page is the homepage of the first application, the page that is not a details page can be identified as the homepage of the first application from the remaining pages in the first data stack. This can improve the efficiency of homepage recognition to a certain extent.
[0015] In one possible implementation, in response to the startup of the first process of the first application, determining the first page as the main page of the first application through the first process includes:
[0016] In response to the startup of the first process of the first application, a first retrieval request is sent to the first module through the first process. The first module is a module used to manage the application homepage. The first retrieval request is used to request the retrieval of the homepage preset for the first application.
[0017] In response to the first acquisition request, the first module sends a first response message to the first process, which instructs the first process to identify the main page.
[0018] The first process responds to the first response message, determines that the first page is the main page of the first application, and sends a first notification message to the first module. The first notification message is used to indicate that the first page is the main page.
[0019] The first module responds to the first notification message and records the first page as the main page of the first application.
[0020] The interaction process described above can effectively identify the main page of the first application.
[0021] In one possible implementation, after clearing the record information where the first page is the main page of the first application, the method further includes:
[0022] Instruct the first process to redefine the home page of the first application.
[0023] In one possible implementation, instructing the first process to redetermine the main page of the first application includes:
[0024] The first module sends a second notification message to the first process, which instructs the first process to re-determine the main page of the first application.
[0025] In the next startup process, the first process will redetermine the main page of the first application.
[0026] The implementation process described above allows for the clearing of records indicating that the first page is the homepage of the first application. This then triggers the first process to re-determine the homepage of the first application upon its next launch, ensuring effective homepage recognition upon the application's next launch. This avoids the situation where clearing the homepage records results in no homepage being recorded for the first application.
[0027] In one possible implementation, the method further includes:
[0028] In response to the launch of the second process of the first application, the third page is determined to be the main page corresponding to the second process. The second process can be a child process of the first application.
[0029] In this implementation, when the second process also recognizes the home page, the home page recognized by the second process is recorded as the home page corresponding to the second process, without overwriting the application home page recognized by the first process. This can effectively avoid the situation where the application home page is recorded incorrectly due to home page overwriting.
[0030] In one possible implementation, in response to the launch of the second process of the first application, the third page is determined to be the main page corresponding to the second process through the second process, including:
[0031] In response to the startup of the second process of the first application, a second retrieval request is sent to the first module through the second process. The first module is a module used to manage the application homepage. The second retrieval request is used to request the retrieval of the homepage set for the first application.
[0032] In response to the second acquisition request, the first module sends a third response message to the first process. The third response message is used to instruct the first process to identify the main page.
[0033] The first process responds to the third response message, determines that the second page is the main page of the first application, and sends a second notification message to the first module. The second notification message is used to indicate that the third page is the main page.
[0034] If the first module records the main page of the first application, the first module responds to the second notification message and records the third page as the main page of the second process.
[0035] In this implementation, the main page identified by the second process can be effectively recorded as the main page corresponding to the second application in the terminal device.
[0036] In one possible implementation, the method further includes:
[0037] In response to the launch of the second process of the first application, if the first module has recorded the main page of the first application, the first module does not record the main page determined by the second process.
[0038] In this implementation, if the second process also recognizes the home page, the home page recognized by the second process is not recorded. This prevents the application home page recognized by the first process from being overwritten, thus effectively avoiding the situation where the application home page is recorded incorrectly due to home page overwriting.
[0039] Secondly, embodiments of this application provide a page processing apparatus, which may be an electronic device, or a chip or chip system within an electronic device. The page processing apparatus may include a display unit and a processing unit.
[0040] When the page processing apparatus is an electronic device, the display unit therein may be a display screen. The display unit is used to perform the display steps so that the electronic device implements a page processing method described in the first aspect or any possible implementation of the first aspect.
[0041] When the page processing apparatus is an electronic device, the processing unit may be a processor. The page processing apparatus may further include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to cause the electronic device to implement a page processing method described in the first aspect or any possible implementation thereof.
[0042] When the page processing device is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes instructions stored in the storage unit to cause the electronic device to implement a page processing method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.) or a storage unit located outside the chip within the electronic device (e.g., a read-only memory, random access memory, etc.).
[0043] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory for storing code instructions, and the processor for running the code instructions to perform the methods described in the first aspect or any possible implementation of the first aspect.
[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0045] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0046] Sixthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.
[0047] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).
[0048] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0049] Figure 1 A schematic diagram of a split-screen display interface provided in an embodiment of this application;
[0050] Figure 2 An abnormal diagram of split-screen display provided in an embodiment of this application;
[0051] Figure 3 The signaling interaction diagram for determining the application homepage provided in the embodiments of this application;
[0052] Figure 4 Signaling interaction for abnormal homepage identification provided in the embodiments of this application Figure 1 ;
[0053] Figure 5 Signaling interaction for abnormal homepage identification provided in the embodiments of this application Figure 2 ;
[0054] Figure 6 Signaling interaction diagram for implementing split-screen display based on the homepage provided in this application embodiment;
[0055] Figure 7 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application;
[0056] Figure 8 This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application;
[0057] Figure 9 Signaling interaction for the page processing method provided in the embodiments of this application Figure 1 ;
[0058] Figure 10 A schematic diagram illustrating the implementation of the first data stack provided in an embodiment of this application;
[0059] Figure 11 Signaling interaction for the page processing method provided in the embodiments of this application Figure 2 ;
[0060] Figure 12 Signaling interaction for the page processing method provided in the embodiments of this application Figure 3 ;
[0061] Figure 13 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0062] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:
[0063] 1. Main Page
[0064] The home page, also known as the main page, is typically the initial page loaded when a user first accesses a web browser or application. This page may include navigation menus or functional modules for accessing other pages. More specifically, the home page can be defined as the primary interface or default page presented when a user visits a website or application, usually serving as the starting point for the user's interaction with the system. For example, the home page can be the interface displayed when a user first visits or launches an application, showcasing key functions or navigation options.
[0065] As is understandable, the homepage is the main interface of an application or website, typically used to display the most frequently accessed features, information feeds, or personalized recommendations, and serves as the starting point for users to navigate to other features or pages.
[0066] 2. Content Page
[0067] Users can access different content pages by clicking on corresponding controls on the homepage. A content page can be defined as a detailed information page providing specific content, products, services, or functions. For example, a content page might be a page displayed on the terminal device in response to a user clicking on a specific control on the homepage, containing detailed information or interactive options related to that specific control. Content pages may include, but are not limited to, text, images, videos, and other multimedia content, or interfaces containing further operations. In this embodiment, a content page can also be referred to as a details page.
[0068] For example, after a user clicks on an item on the homepage, the corresponding content page can display detailed information about the item, its features, or purchase options, and allow the user to perform further actions (such as placing an order, making a reservation, or viewing more content).
[0069] Compared to the homepage, content pages focus more on specificity and in-depth content, primarily used to display extended information about a selected item. It's important to understand that the name of a content page is merely an example; in actual implementation, the specific name of the page displaying the content can be adjusted arbitrarily according to actual needs, as long as it conforms to the page definition described above.
[0070] 3. Main process
[0071] In a computing system, the main process refers to the primary execution unit initialized by the operating system and responsible for managing the execution of the entire program. In essence, the main process is the primary execution unit when a program or system starts, responsible for creating child processes and managing system resources. For example, the main process can create and manage one or more child processes, coordinating their execution and resource usage.
[0072] In an operating system environment, the initial execution process started by the system or user can be understood as the main process. The main process is responsible for executing the core logic of the program, creating and coordinating the operation of child processes, and managing resource allocation and inter-process communication.
[0073] 4. Child processes
[0074] A child process is an auxiliary process created by the main process or other parent processes, responsible for handling specific tasks or sharing the computational load. For example, a child process can be an independent execution unit created by the main process or parent process, responsible for completing specific tasks or sharing computational work. In an operating system, child processes typically have independent resource space and execution path, collaborating with the main process or parent process to complete program logic.
[0075] 5. Other terms
[0076] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.
[0077] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0078] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.
[0079] 6. Electronic equipment
[0080] The electronic devices in this application embodiment may include handheld devices, vehicle-mounted devices, etc., with data processing functions. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.
[0081] By way of example and not limitation, in this embodiment, the electronic device may also be a wearable device. Furthermore, in this embodiment, the electronic device may also be a terminal device in an Internet of Things (IoT) system. IoT is an important component of future information technology development, and its main technical feature is connecting objects to networks through communication technologies, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
[0082] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.
[0083] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0084] To better understand the technical solution of this application, the relevant technologies involved in this application will be further described in detail below.
[0085] With the rapid development of network technology, smart terminal devices such as smartphones and tablets are becoming increasingly popular, bringing great convenience to people's lives, studies, and work. In recent years, the development of electronic product screen technology has also reached a new level, and users' requirements for screen technology are becoming increasingly higher.
[0086] To facilitate user operation and browsing on electronic devices with displays, current electronic devices offer in-app split-screen display technology, enabling dual-screen display of application content. For example, in-app split-screen display technology can support displaying two pages of the same application simultaneously on one screen, such as the application's homepage and content page, allowing users to use two things at once and improving the user experience.
[0087] The following example uses a tablet computer as an electronic device. First, we will combine... Figure 1 This section explains the technology of in-app split-screen display. Figure 1 This is a schematic diagram of the split-screen display interface provided in an embodiment of this application.
[0088] like Figure 1 As shown in (a), multiple application icons can be displayed on the desktop of an electronic device. For example, the icons of application A, application B, application C, and application D are illustrated in the attached figure. The names of the applications are also displayed below these icons. This embodiment does not limit the icons, names, or specific display methods of the applications on the desktop; they can be set according to actual needs.
[0089] Subsequently, if the electronic device detects a touch operation on an application's icon, it can display the application's page on the screen. For example, upon initial application launch, the electronic device can respond to the application's icon by displaying the application's homepage (or simply home screen) on the screen.
[0090] It is understood that each application's homepage is different, depending on the specific implementation of the application; this embodiment does not impose any restrictions on this. The following description uses application A as an example. Figure 1 As shown in (a), assuming a user touches the icon of application A, the electronic device may then display, for example, as shown in (a). Figure 1 Page 101 is shown in (b) above, where page 101 could be, for example, the homepage of application A. See reference... Figure 1 As can be determined from (b) in the above, page 101 can be displayed centered on the screen of an electronic device.
[0091] As shown in the figure, page 101 displays an information stream containing multiple content titles and corresponding images. The content titles and their corresponding images can be understood as controls associated with the content. For example, title 1 and image 1 can be understood as controls corresponding to content 1, and title 2 and image 2 can be understood as controls corresponding to content 2, and so on. Users can then interact with the content controls displayed on page 101 to open the details page for the corresponding content.
[0092] Furthermore, if in-app split-screen display technology is configured for application A, then after clicking the corresponding content control on the homepage 101, for example, the homepage and the corresponding content details page can be displayed on the screen simultaneously.
[0093] like Figure 1 As shown in (b), assuming the user interacts with the control corresponding to title 2, the electronic device can display the following on the screen: Figure 1 The interface shown in (c) can be understood as the details page corresponding to content 2.
[0094] Reference Figure 1 As indicated by (c), two pages are displayed simultaneously on the interface: page 101 and page 102, both of which are pages of application A. Page 101 can be understood as the homepage of application A, and page 102 can be understood as a specific content page of application A. This embodiment does not limit the specific content of the pages.
[0095] Pages 101 and 102 can be understood as two independent pages. For example, a user can perform interactive operations on page 101, and page 101 can display corresponding content in response to the user's operation, while page 102 remains unaffected. Alternatively, the user can also perform interactive operations on page 102, and page 102 can display corresponding content in response to the user's operation, while page 101 remains unaffected.
[0096] By displaying multiple pages of the same application simultaneously on a single interface, screen utilization can be improved, thereby enhancing the user experience.
[0097] As can be seen from the above description, when in-app split-screen display technology is configured for an application, after opening the application, the application's home page can be displayed first. Then, if a content page is opened from the application's home page, two pages of the application can be displayed on the screen simultaneously, namely the home page and the content page that was opened.
[0098] Conversely, if in-app split-screen display technology is not configured for the application, then after opening the application, the application's home page can be displayed first. If a content page is then opened from the application's home page, the content page will be displayed in the traditional way, where the content page can be displayed in the center of the screen, for example.
[0099] In one implementation, for example, the setting in the "System Settings" application allows you to configure whether to configure in-app split-screen display technology for an application. Alternatively, you can configure whether to configure in-app split-screen display technology for an application in other ways, such as by setting a list of applications that have configured in-app split-screen display technology. This embodiment does not limit the specific implementation of whether to configure in-app split-screen display technology for an application; it can be selected according to actual needs.
[0100] The above combination Figure 1 The in-application split-screen display technology described in this embodiment represents a fairly common scenario. It involves first displaying the application's homepage, and then, when the user opens a content page from the application's homepage, both the homepage and the opened content page can be simultaneously displayed on the screen. Therefore, accurately identifying the application's homepage is crucial. If the homepage is incorrectly identified, it's possible that the simultaneous display of the homepage and the opened content page will fail.
[0101] The following is combined with Figure 2 This abnormal situation needs to be explained. Figure 2This is an abnormal diagram of split-screen display provided in an embodiment of this application.
[0102] Figure 2 (a) and (b) in Figure 1 Similar to (a) and (b) in the previous examples, they will not be repeated here. The difference lies in... Figure 2 In this scenario, suppose the electronic device misidentifies the homepage of application A. For example, the homepage of application A should be page 101, but the electronic device identifies page 102 as the homepage of application A.
[0103] So when the user from Figure 1 When page 101, as shown in (b), triggers the opening of the details page for content 2, the electronic device will consider that the display of the details page is not triggered from the home page, which does not conform to the scenario of simultaneously displaying the home page and the details page on the screen. Therefore, the electronic device will not enable split-screen display technology, and will instead display the opened details page separately. For example, refer to... Figure 1 As shown in (c), the electronic device will display the opened page 102 separately on the screen, for example, in a centered manner.
[0104] Referring to the above... Figure 2 The introduction confirms that when the application's homepage is misidentified, the in-app split-screen technology will not function properly.
[0105] Furthermore, because the homepage is typically the first page an application displays and is also a relatively important page, electronic devices may adapt the application's homepage to the screen ratio. For example, when a tablet displays an application's homepage in landscape mode, directly displaying the application's original homepage would have an effect similar to... Figure 1 The state shown in (b) means that only a portion of a large screen is used to display the application's homepage, which is obviously not a good display.
[0106] Therefore, electronic devices can adaptively rearrange the controls, text, and images contained in an application's homepage to display the homepage in full-screen mode, thus improving its display effect. In this application scenario, accurate identification of the application's homepage is also particularly important.
[0107] If the application's homepage is incorrectly identified, it may fail to adapt to full-screen mode, resulting in poor page display.
[0108] The above describes two application scenarios for identifying an application's homepage. Besides these two scenarios, there are various other possible applications after identifying the homepage, which will not be elaborated upon here. In short, correctly identifying an application's homepage is a crucial foundation for implementing homepage-triggered functions. Under this premise, the application scenarios for homepage-triggered functions can be arbitrarily expanded according to actual needs.
[0109] The following describes the possible situations that may lead to homepage recognition errors, using specific examples. First, let's consider... Figure 3 This section explains the process of determining the application's home page after the application is launched. Figure 3 This is a signaling interaction diagram for determining the application homepage provided in an embodiment of this application.
[0110] like Figure 3 As shown, the process includes:
[0111] 301. The main process indicates that page 1 has started.
[0112] In this embodiment, it is assumed that the main process is the process launched after the first application starts; that is, the main process is specifically the main process of the first application. At the same time, it is assumed that page 1 is the main page of the first application. In other words, for example, after the first application starts, the terminal device can launch the main process of the first application. After the main process of the first application is launched, it will usually launch the application's main page; therefore, the main process can instruct page 1 to launch.
[0113] 302. The main process sends a retrieval request a to AMS.
[0114] AMS (Activity Manager Service) is a service included in the framework layer of the terminal device. It is responsible for managing the lifecycle of application activities, as well as the application's tasks, processes, and activity stack. AMS ensures the effective management of system resources and coordinates the switching between applications and background operation.
[0115] It's important to understand that an Activity is a fundamental component of an application in the Android system. Typically, one Activity represents a single page within the application. An application can contain multiple Activities, each usually containing a user interface that allows user interaction. A page, on the other hand, generally refers to the specific interface or screen that the user sees within the application; it can be understood as a part of an Activity or a representation of an Activity.
[0116] The relationship between a page and an Activity is that the page is attached to the Activity, and the Activity manages the page's lifecycle and behavior. For example, an Activity can be understood as a container for a page, managing its creation, display, and destruction. When a user navigates to a new Activity, the current Activity is paused or destroyed, and the new Activity is created and displayed. Furthermore, a page can be understood as part of an Activity, with all views on the page (such as buttons and text boxes) managed by the Activity. The page's layout and UI logic are typically defined in the Activity's layout file (XML) and code.
[0117] After the main process is launched, it typically needs to determine the homepage of the first application to ensure the normal operation of subsequent homepage-related functions. In some implementations, the homepages of some applications can be pre-stored on the system side of the terminal device. Therefore, the child process can send a retrieval request 'a' to AMS, where retrieval request 'a' requests the homepage pre-set for the first application. Alternatively, retrieval request 'a' can inquire whether a homepage is pre-set for the first application.
[0118] 303. AMS sends a request a to the homepage detection module.
[0119] The HomePageDetect module can be, for example, a module included in the framework layer of the terminal device, which manages the homepage of the application. In one implementation, the HomePageDetect module and the AMS can be two independent modules, or the HomePageDetect module can be a sub-module included in the AMS. This embodiment does not limit the specific logical relationship between the HomePageDetect module and the AMS, and it can be selected according to actual needs.
[0120] For example, the homepage detection module can store the preset homepages corresponding to multiple applications. Therefore, after receiving the retrieval request a, AMS can further send the retrieval request a to the homepage detection module.
[0121] 304. The homepage detection module sends response message a to the main process.
[0122] In this embodiment, for example, the application identifier of the first application may be carried in the acquisition request 'a'. The application identifier can be the application's package name or other implementation forms; this embodiment does not impose any restrictions on this. Similarly, the homepage detection module can store homepage identifiers corresponding to the application identifiers of multiple applications. The homepage identifier is the page identifier corresponding to the application's main page. The page identifier can be, for example, a preset number for the page or other implementation forms; this embodiment also does not impose any restrictions on this. It is understood that as long as the application identifier can be used to distinguish different applications, and the page identifier can be used to distinguish different pages, it is acceptable.
[0123] After receiving the retrieval request 'a', the homepage detection module can, for example, use the application identifier of the first application carried in retrieval request 'a' to query whether the homepage corresponding to the first application is stored. If it is stored, the homepage detection module can send a response message to the main process to indicate the homepage corresponding to the first application.
[0124] If not stored, it means the system has not pre-configured the homepage for the first application. Therefore, the homepage detection module can send a message to the main process. Figure 3 The response message 'a' shown indicates that the homepage of the first application is not pre-configured on the system side. Simultaneously, response message 'a' can also instruct the main process to automatically identify the homepage of the first application.
[0125] 305. The main process identifies page 1 as the main page.
[0126] After the main process receives response message 'a', it can automatically detect the homepage of the first application based on the instructions in response message 'a'. It's understandable that the homepage is always the first page displayed after the first application starts, and it usually contains a lot of content, such as controls, text, and images. Therefore, in one implementation, the following strategy can be used to determine the homepage of the first application:
[0127] After the first application is launched, the page containing more than m items out of the n pages displayed sequentially is designated as the homepage. Here, n can be set to 3 for example, and m can be set to 50 for example. In actual implementation, the specific values of n and m can be arbitrarily set according to actual needs.
[0128] It is understood that the homepage recognition strategy described here is only one possible implementation. For example, different determination strategies can be set for different types of applications, taking into account the business content of each type of application. This embodiment does not limit the specific implementation method of homepage detection for applications, and it can be arbitrarily set according to actual needs.
[0129] In the current example, since it is assumed that page 1 is the home page of the first application, the main process can, for example, determine that page 1 is the home page of the first application.
[0130] 306. The main process sends notification message a to AMS.
[0131] Notification message a is used to inform AMS of the homepage detection result. In this embodiment, notification message a is used to indicate that page 1 is the homepage of the first application.
[0132] 307. AMS sends notification message a to the homepage detection module.
[0133] 308. The homepage detection module saves page 1 as the homepage of the first application.
[0134] After receiving notification message 'a', the homepage detection module can determine that the application homepage automatically detected by the main process is page 1. Therefore, the homepage detection module can save this detection result, that is, save page 1 as the homepage of the first application. For example, the homepage detection module can save the association between the application identifier of the first application and the page identifier of page 1.
[0135] 309. The homepage detection module sends feedback message a to the main process.
[0136] Because the homepage detection module already stores the homepage of the first application, it can instruct the main process via feedback message 'a' to eliminate the need for repeated homepage detection, thus saving system overhead caused by the main process performing homepage recognition. In some implementations, the current step 309 can be omitted.
[0137] The above combination Figure 3 The example describes the process of determining the homepage of the first application after the main process of the first application starts.
[0138] In the above Figure 3 Based on the introduction, the following will combine... Figure 5 and Figure 5 The two subsequent scenarios that lead to homepage recognition will be explained separately. Figure 4 Signaling interaction for abnormal homepage identification provided in the embodiments of this application Figure 1 , Figure 5 Signaling interaction for abnormal homepage identification provided in the embodiments of this application Figure 2 .
[0139] In one implementation, Figure 4 and Figure 5 The steps shown can be understood as follows: Figure 3 Perform this step after the final step shown.
[0140] like Figure 4As shown, the process includes:
[0141] 401. Subprocess indicator page 2 starts.
[0142] In this embodiment, the child process can be a process launched after the mini-program is opened in the first application. Therefore, the child process can be understood as the process corresponding to the mini-program. Thus, page 2 can be, for example, the main page corresponding to the opened mini-program.
[0143] 402. The child process sends an acquisition request b to AMS.
[0144] After the child process is launched, it also needs to determine the homepage of the primary application to ensure the normal operation of subsequent homepage-related functions. Therefore, similar to the above, the child process can send a request b to AMS. Furthermore, regardless of whether the child process is launched through the logic of opening the mini-program or through the business logic of the primary application, the child process is a process under the primary application.
[0145] Therefore, request b is also used to request the homepage pre-configured for the first application. Alternatively, request a can be used to inquire whether a homepage is pre-configured for the first application. For example, the application identifier of the first application can be carried in request b.
[0146] 403. AMS sends a request b to the homepage detection module.
[0147] 404. The homepage detection module sends response message b to the child process.
[0148] After receiving the retrieval request b, the homepage detection module can, for example, query whether the homepage corresponding to the first application is stored based on the application identifier of the first application carried in the retrieval request b. Its implementation is similar to that described in the above embodiments and will not be repeated here.
[0149] Reference Figure 4 Assuming the system does not pre-configure a homepage for the first application, the homepage detection module can send a homepage detection message to the child process. Figure 4 The response message b shown indicates that the homepage of the first application is not pre-configured on the system side. Simultaneously, response message b can also instruct the child process to automatically identify the homepage of the first application.
[0150] It's important to understand that storing the homepage of the first application on the system side does not mean that the homepage of the first application is preset on the system side; these are two different concepts. Only when the application's homepage is preset on the system side can the application's homepage correspond to the situation where the application's homepage is preset on the system side. This preset homepage is generally quite fixed and will not change unless modified on the system side.
[0151] After the system triggers a process to automatically identify the application's homepage, the system-side storage of the identified application homepage is handled by a separate storage logic. In this implementation, considering that the application process may need to modify its identified application homepage, the homepage detection module can update its stored application homepage in response to process notifications.
[0152] 405. Subprocess identification page 2 is the main page.
[0153] After the child process receives response message b, it can automatically detect the homepage of the first application according to the instructions in response message b. The implementation of homepage detection is similar to that described above, and will not be repeated here.
[0154] In the current example, since it is assumed that page 2 is the main page of the mini-program corresponding to the child process, and the child process is a process under the first application, the child process can determine that page 2 is the main page of the first application.
[0155] 406. The child process sends a notification message b to AMS.
[0156] Notification message b is used to inform AMS of the homepage detection result. In this embodiment, notification message b is used to indicate that page 2 is the homepage of the first application.
[0157] 407. AMS sends notification message b to the homepage detection module.
[0158] 408. The homepage detection module saves page 2 as the homepage of the first application.
[0159] After receiving notification message b, the homepage detection module can determine that the application homepage automatically detected by the subprocess is page 2. Considering that the application process may modify the detected homepage, the homepage detection module can save this detection result, that is, save page 2 as the homepage of the first application. For example, the homepage detection module can save the association between the application identifier of the first application and the page identifier of page 2.
[0160] So, combining Figure 3 and Figure 4 The homepage detection result stores page 2 as the homepage of the first application, effectively overwriting the previous result from the main process that page 1 was the homepage of the first application. However, the information that page 2 is the homepage of the first application is actually incorrect; page 2 is the homepage of the mini-program launched within the first application, not the homepage of the first application itself. Therefore, this leads to an error in the recorded homepage for the first application.
[0161] 409. The homepage detection module sends feedback message b to the child process.
[0162] Because the homepage detection module already stores the homepage of the first application, it can instruct the child process via feedback message b that it does not need to repeatedly detect the homepage, thus saving the system overhead caused by the child process performing homepage recognition. In some implementations, the current 409 steps can be omitted.
[0163] In combination with the above Figure 4 As can be seen from the description, after the main process starts and has already identified page 1 as the homepage of the first application, the child process of the first application identifies page 2 as the homepage of the first application and overwrites the information that page 1 is the homepage of the first application, thus causing the homepage detection module to record an error in the homepage of the first application.
[0164] The following is combined with Figure 5 Another abnormal situation will be explained.
[0165] like Figure 5 As shown, the process includes:
[0166] 501. The main process instruction is to trigger the start of page 3 from page 1.
[0167] For example, page 1 is the main page of the first application, and page 3 is assumed to be a details page of the first application. For instance, page 1 may include an open control for page 3, so the user can interact with the open control for page 3 on page 1 to trigger the launch of page 3 from page 1. Then, the main process can instruct the launch of page 3 from page 1.
[0168] 502. The main process sends the startup message for page 3 to AMS.
[0169] 503. AMS sends a detection request to the homepage detection module.
[0170] The Application Management System (AMS) manages the lifecycle of application activities. In one implementation, AMS manages how specific pages are displayed, such as single-window or split-screen display. For example, if in-app split-screen technology is configured for the first application, AMS needs to determine whether the current display of page 3 matches the triggering scenario for in-app split-screen.
[0171] Based on the above description, it can be determined that when a user opens a details page from the homepage, it can be considered to meet the application scenario of in-app split-screen. Therefore, AMS needs to determine whether page 1 is the homepage of the first application. As shown in the figure, AMS can send a detection request 'a' to the homepage detection module to query whether page 1 is the homepage of the first application.
[0172] 504. The homepage detection module sends the detection result a to AMS.
[0173] Based on the above Figure 3 As the description indicates, the main process determines that page 1 is the homepage of the first application, and the homepage detection module records this information. Therefore, the homepage detection module sends the detection result to AMS to indicate that page 1 is the homepage of the first application.
[0174] 505. AMS split-screen display of page 1 and page 3.
[0175] Since AMS knows that page 1 is the home page of the first application, the current scenario of triggering the opening of page 3 from page 1 meets the scenario of in-application split-screen. Therefore, AMS will display page 1 and page 3 in split-screen mode, thereby realizing the in-application split-screen technology described above.
[0176] 506. The main process responds to user actions and triggers the display of a floating window for the application.
[0177] In a scenario where a split-screen application displays pages 1 and 3, assume that the user triggers the floating window display of the first application through an operation, that is, the interface of the first application is displayed in the floating window.
[0178] 507. The main process sends the instruction information displayed in the floating window to AMS.
[0179] Based on the above introduction, it can be determined that the AMS user management has a lifecycle. Therefore, when it is necessary to trigger the display of the interface of the first application in the floating window, the main process can send an instruction message to AMS to inform that the interface of the first application needs to be displayed in the floating window.
[0180] 508. AMS displays page 3 in a floating window.
[0181] It's understandable that the purpose of split-screen display of multiple interfaces of the same application is usually to maximize screen space while ensuring that the interfaces display at their normal size. When an application's page is moved to a floating window, the size of the floating window is usually proportional to the original size of the page. Therefore, when switching from split-screen display of page 1 and page 3 of the first application to displaying the first application's page in the floating window, the most recently opened page will be displayed directly in the floating window. In other words, AMS will control the display of page 3 in the floating window.
[0182] 509. The system triggers a restart of the main process.
[0183] While page 3 is displayed in a floating window, the system may trigger a restart of the main process. For example, if the system permissions of the first application are modified, the system may trigger a restart of the first application's main process. Or, if the main process encounters an error, the system may trigger a restart of the first application's main process. Alternatively, the system may also respond to user actions, thereby triggering a restart of the main process.
[0184] This embodiment does not limit the specific scenario for triggering the main process to restart. It can be expanded according to actual needs. In short, if the main process restarts while the first application's page 3 is being displayed in the floating window, subsequent problems will occur.
[0185] 510. The main process restarts, and page 3 is restarted.
[0186] After the main process restarts, it typically restarts the application page displayed on the screen when the process was closed, restoring the screen display state before the process was closed. Therefore, the main process will restart page 3.
[0187] 511. The main process sends an acquisition request c to AMS.
[0188] After the main process restarts, it will re-verify the homepage of the first application to improve the accuracy of the confirmed homepage, ensuring the normal operation of subsequent homepage-related functions. Therefore, similar to the above, the main process can send a retrieval request c to AMS.
[0189] 512. AMS sends a request c to the homepage detection module.
[0190] 513. The homepage detection module sends a response message c to the main process.
[0191] After receiving the retrieval request c, the homepage detection module can, for example, query whether the homepage corresponding to the first application is stored based on the application identifier of the first application carried in the retrieval request c. Its implementation is similar to that described in the above embodiments and will not be repeated here.
[0192] Reference Figure 5 Assuming the system does not have a pre-defined homepage for the first application, the homepage detection module can send a message to the main process. Figure 5 The response message c shown indicates that the homepage of the first application is not pre-configured on the system side. Simultaneously, response message c can also instruct the main process to automatically identify the homepage of the first application.
[0193] 514. The main process identifies page 3 as the main page.
[0194] After the main process receives response message c, it can automatically detect the homepage of the first application based on the instructions in response message c. After the main process restarts, only page 3 is launched. Referring to the logic for determining the homepage as described above, page 3 meets the characteristic of being one of the earlier pages in the launch order. When the amount of content contained in page 3 exceeds a certain limit, the main process may identify page 3 as the homepage.
[0195] In the current example, assume that the main process determines that page 3 is the main page of the first application.
[0196] 515. The main process sends a notification message c to AMS.
[0197] Notification message c is used to inform AMS of the homepage detection result. In this embodiment, notification message c is used to indicate that page 3 is the homepage of the first application.
[0198] 516. AMS sends a notification message c to the homepage detection module.
[0199] 517. The homepage detection module saves page 3 as the homepage of the first application.
[0200] After receiving notification message c, the homepage detection module can determine that the application homepage automatically detected by the main process is page 3. Considering that the application process may correct the detected homepage, the homepage detection module can save this detection result, that is, save page 3 as the homepage of the first application. For example, the homepage detection module can save the association between the application identifier of the first application and the page identifier of page 3.
[0201] So, combining Figure 3 and Figure 5 The homepage detection result stores page 3 as the homepage of the first application, effectively overwriting the previous result from the main process that page 1 was the homepage of the first application. However, this information about page 3 being the homepage of the first application is incorrect; page 3 is actually a details page of the first application, not its homepage. Therefore, this results in an error in the recorded homepage for the first application.
[0202] 518. The homepage detection module sends feedback message c to the main process.
[0203] Because the homepage detection module already stores the homepage of the first application, it can instruct the main process via feedback message 'c' to eliminate the need for repeated homepage detection, thus saving system overhead caused by the main process performing homepage recognition. In some implementations, step 518 can be omitted.
[0204] In combination with the above Figure 5As can be seen from the description, after the main process starts and has already identified page 1 as the homepage of the first application, the main process of the first application identifies page 3 as the homepage of the first application and overwrites the information that page 3 is the homepage of the first application, thus causing the homepage detection module to record an error in the homepage of the first application.
[0205] exist Figure 4 and Figure 5 Based on the homepage detection module described above, which stores the first application's homepage as the source of errors, we will now take the in-application split-screen technology scenario as an example, combined with... Figure 6 This section explains the impact of the error messages recorded on the homepage. Figure 6 This is a signaling interaction diagram for implementing split-screen display based on the homepage, provided in an embodiment of this application.
[0206] like Figure 6 As shown, the process includes:
[0207] 601. The main process instruction is to trigger the start of page 3 from page 1.
[0208] For example, page 1 is the main page of the first application, and page 3 is assumed to be a details page of the first application. For instance, page 1 may include an open control for page 3, so the user can interact with the open control for page 3 on page 1 to trigger the launch of page 3 from page 1. Then, the main process can instruct the launch of page 3 from page 1.
[0209] 602. The main process sends the startup message for page 3 to AMS.
[0210] 603. AMS sends a detection request to the homepage detection module.
[0211] The Application Management System (AMS) manages the lifecycle of application activities. In one implementation, AMS manages how specific pages are displayed, such as single-window or split-screen display. For example, if in-app split-screen technology is configured for the first application, AMS needs to determine whether the current display of page 3 matches the triggering scenario for in-app split-screen.
[0212] Based on the above description, it can be determined that when a user opens a details page from the homepage, it can be considered to meet the application scenario of in-app split-screen. Therefore, AMS needs to determine whether page 1 is the homepage of the first application. As shown in the figure, AMS can send a detection request 'a' to the homepage detection module to query whether page 1 is the homepage of the first application.
[0213] 604. The homepage detection module sends the detection result a to AMS.
[0214] Based on the above Figure 3 and Figure 4 As the description indicates, the main process initially determined page 1 to be the homepage of the first application, and the homepage detection module recorded this information. However, a subsequent child process determined page 2 to be the homepage of the first application, and the record of page 2 as the homepage of the first application in the homepage detection module overwrote the record of page 1 as the homepage of the first application. Based on this, the homepage detection module sends a detection result to AMS to indicate that page 1 is not the homepage of the first application, because the homepage of the first application currently recorded in the homepage detection module is page 2.
[0215] And, based on the above Figure 3 and Figure 5 As the description indicates, the main process initially determined page 1 to be the homepage of the first application, and the homepage detection module recorded this information. However, the main process subsequently determined page 3 to be the homepage of the first application, and the record of page 3 as the homepage of the first application in the homepage detection module overwrote the record of page 1 as the homepage of the first application. Based on this, the homepage detection module will send a detection result to AMS to indicate that page 1 is not the homepage of the first application, because the homepage of the first application currently recorded in the homepage detection module is page 3.
[0216] 605. AMS launches page 3 in a single window.
[0217] Since AMS knows that page 1 is not the home page of the first application, the current scenario of opening page 3 triggered from page 1 does not conform to the in-application split-screen scenario. Therefore, AMS will display page 3 in a single window.
[0218] This results in Page 1 and Page 3, which should be displayed in a split-screen mode, being displayed as a single window for Page 3 on the screen. From the user's perspective, this means the in-app split-screen technology failed to activate, causing an abnormal implementation and a poor user experience. The root cause is a misidentification of the homepage.
[0219] To address the technical problems described above, this application proposes a page processing method to avoid the aforementioned homepage recognition errors. The page processing method provided in this application will be described in detail below with reference to specific embodiments.
[0220] The page processing method of this application embodiment can be executed by an electronic device equipped with a processor and a screen, or by a chip, chip system, or processor that supports the implementation of the page processing method in the electronic device, or by a logic module or software that can implement all or part of the functions of the electronic device. This application does not impose specific limitations in this regard. The page processing method of this application embodiment will be described in detail below using an electronic device as the execution subject.
[0221] Electronic devices can be, for example, terminal devices. The following section will first combine... Figure 7 and Figure 8 A brief introduction to the terminal equipment.
[0222] For example, Figure 7 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application.
[0223] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0224] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0225] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors. In one implementation, the page processing method provided in this application may, for example, be executed by the processor.
[0226] Furthermore, the terminal device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0227] The software system of terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of terminal device 100.
[0228] For example, Figure 8 This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application.
[0229] like Figure 8 As shown, the layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the system may include an application layer, an application framework layer, an Android runtime and system libraries, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that this application uses the Android system as an example; however, the solution can also be implemented in other operating systems (such as HarmonyOS, iOS, etc.) as long as the functions implemented by each module are similar to those in the embodiments of this application.
[0230] The application layer can include a series of application packages.
[0231] like Figure 8As shown, the application package may include applications such as camera, calendar, phone, map, music, settings, email, video, and social media. Of course, the application layer may also include other application packages, such as third-party applications like payment apps, shopping apps, banking apps, and social media apps; this application does not limit this. The first application described in this application can be any application in the currently described application layer, and this embodiment does not impose any restrictions on it.
[0232] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0233] like Figure 8 As shown, the application framework layer may include a window manager, content provider, resource manager, view system, notification manager, etc. Furthermore, the application framework layer may also include... Figure 8 The AMS and homepage detection module shown are in Figure 8 In the example, the homepage detection module can be a submodule of AMS, or in other implementations, the homepage detection module and AMS can be two independent modules. This embodiment does not impose any restrictions on this.
[0234] The Android runtime comprises the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries consist of two parts: one part contains the functionalities that the Java language needs to call, and the other part contains the core Android libraries.
[0235] The HAL layer can include Wi-Fi HAL, audio HAL, camera service (Camera HALServer) unit, and software code library, etc.
[0236] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0237] The technical solutions of the embodiments of this application and how the technical solutions of the embodiments of this application solve the above-mentioned technical problems will be described in detail below with reference to the accompanying drawings and specific examples. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0238] The following is a combination of... Figure 9 and Figure 10 This application describes the page processing method provided. Figure 9 Signaling interaction for the page processing method provided in the embodiments of this application Figure 1 , Figure 10 This is a schematic diagram illustrating the implementation of the first data stack provided in an embodiment of this application.
[0239] like Figure 9 As shown, the method includes:
[0240] 900. Confirm page 1 as the homepage and trigger the main process to restart.
[0241] The implementation of this step is the same as described above. Figure 3 Examples, and Figure 5 The contents described in the examples are similar and will not be repeated here.
[0242] 901. The main process restarts and restarts page 3. 902. The main process sends a retrieval request c to AMS. 903. AMS sends a retrieval request c to the homepage detection module. 904. The homepage detection module sends a response message c to the main process. 905. The main process identifies page 3 as the main page. 906. The main process sends a notification message c to AMS. 907. AMS sends a notification message c to the homepage detection module. 908. The homepage detection module saves page 3 as the homepage of the first application. 909. The homepage detection module sends a feedback message c to the main process.
[0243] The implementation methods of 901 to 909 are similar to those of 510 to 518 in the above embodiments, and will not be described again here.
[0244] 910. The main process indicates that the page 3 should be exited.
[0245] Based on the steps described above, it's understandable that after the above processing, the homepage detection module will record page 3 as the homepage of the first application. However, this recorded homepage information is actually incorrect. Furthermore, assuming the user closes page 3, for example, through a corresponding page operation, the main process can then instruct the user to exit page 3.
[0246] 911. The main process sends an exit message for page 3 to AMS to indicate that page 3 needs to be closed.
[0247] 912. AMS performs a pop operation on page 3 recorded in the first data stack and determines whether there are no other pages in the first data stack.
[0248] In this embodiment, the first data stack is used to record opened pages. When a page is opened, for example, the page identifier can be stored in the first data stack; when a page is closed, for example, the page identifier can be popped from the first data stack. It can be understood that, due to the special structure of the data stack, the page identifier of the currently open page is located at the top of the stack. After closing a currently open page, the page identifier at the top of the stack can be popped so that the page displayed after closing is at the top of the stack, and so on.
[0249] The following is combined with Figure 10 The changes in the first data stack during the page processing described above will be introduced, referring to... Figure 10 As shown in (a), assuming that page 1 is opened when the first application is initially launched, then for example, the page identifier of page 1 can be pushed onto the stack, thereby recording page 1 in the first data stack shown in the figure.
[0250] Then, refer to Figure 10 As shown in (b), assuming that page 3 is opened from page 1, then for example, the page identifier of page 3 can be pushed onto the stack, so that page 1 and page 3 are recorded sequentially in the first data stack shown in the figure.
[0251] Then, when the main process is restarted, refer to Figure 10 As shown in (c), for example, the page identifier recorded in the first data stack can be cleared. And as can be determined from the above description, after the main process is restarted, page 3 will also be restarted. Therefore, referring to... Figure 10 As shown in (d), the page identifier of page 3 can be pushed onto the stack, thereby recording the page identifier of page 3 in the first data stack.
[0252] Subsequently, assuming the user closes page 3, AMS responds to the exit message for page 3 sent by the main process by, for example, performing a pop operation on page 3 recorded in the first data stack. After performing the pop operation, the main process will further determine whether there are any other pages remaining in the first data stack.
[0253] In some possible cases, after performing a pop operation on page 3, there may still be other pages remaining in the first data stack. In this case, it is more likely that the other pages include the homepage, because the homepage is usually stored near the bottom of the data stack.
[0254] For example, pages of type 1 remaining in the first data stack can be identified as the main page of the first application. Then, AMS can send a notification message to the homepage recognition module, causing the module to record the currently identified main page of the first application. Here, type 1 can be any page type other than detail pages; that is, the remaining non-detail pages in the first data stack can be identified as the main page of the first application. Alternatively, the conditions described above—such as pages launched earlier (e.g., located near the bottom of the first data stack) and pages with more content than a preset number—can be added to filter out the corresponding pages and identify them as the main page of the first application. This implementation can improve the efficiency of homepage recognition for the first application to a certain extent.
[0255] 913. If there are no other pages in the first data stack, AMS sends a clearing notification to the homepage detection module.
[0256] As described in the above embodiments, after popping the page recorded in the first data stack, there are no other pages in the first data stack. Furthermore, the page recorded in the first data stack before being popped had already been recorded as the homepage of the first application. In this case, the homepage of the first application recorded by the homepage detection module may be incorrect. Therefore, the AMS module can send a clearing notification to the homepage detection module. This clearing notification instructs the homepage detection module to clear the homepage information recorded for the first application, preventing the homepage detection module from recording incorrect homepage information and causing subsequent page display errors in the first application.
[0257] In the current example, if AMS pops page 3 from the first data stack, and there are no other pages in the first data stack, and based on the above description, it can be determined that the homepage detection module has recorded page 3 as the homepage of the first application, then AMS can send a clear notification to the homepage detection module to instruct it to clear the information recorded for the first application that page 3 is the homepage.
[0258] 914. The homepage detection module deletes the record information of page 3 being the homepage of the first application.
[0259] In this way, if the main process of the first application identifies page 1 as the homepage of the first application after it has already been identified as the homepage of the first application, and then identifies page 3 as the homepage of the first application and overwrites the information that page 3 is the homepage of the first application, the error message recorded by the homepage detection module as the homepage of the first application will be cleared, so as to avoid the existence of error message affecting the subsequent display of the first application's page.
[0260] 915. The homepage detection module sends feedback message d to the main process.
[0261] The feedback message d is used to instruct the main process to re-detect the homepage. The main process can then re-execute the homepage recognition process described in the above embodiments during the next startup, so as to effectively improve the success rate of homepage recognition.
[0262] In this embodiment, during the page closing process, the closed page is popped from the first data stack. If the closed page was previously identified as the homepage of the first application, it is further determined whether any other pages remain in the first data stack after the pop operation. If no other pages remain in the first data stack, it is considered that the scenario described above, where the details page to be restarted is identified as the application's homepage, might occur. Therefore, AMS can instruct the homepage detection module to clear the homepage information recorded by the first application to avoid abnormal page display caused by incorrect homepage information recorded for the first application. This implementation provides a certain error correction measure during the closing process of the homepage recorded by the first application, preventing the long-term existence of incorrect homepage information. Furthermore, the homepage detection module can also re-identify the homepage of the first application in the main process to effectively improve the accuracy of the homepage identified for the application.
[0263] Next, let's combine... Figure 11 This section explains one solution to the problem of abnormal homepage recognition caused by the startup of a child process. Figure 11 Signaling interaction for the page processing method provided in the embodiments of this application Figure 2 .
[0264] like Figure 11 As shown, the method includes:
[0265] 1101. The child process instructs page 2 to start. 1102. The child process sends a retrieval request b to AMS. 1103. AMS sends a retrieval request b to the homepage detection module. 1104. The homepage detection module sends a response message b to the child process. 1105. The child process identifies page 2 as the main page. 1106. The child process sends a notification message b to AMS. 1107. AMS sends a notification message b to the homepage detection module.
[0266] The implementations of 1101 to 1107 are similar to those of 401 to 407 described above, and will not be repeated here.
[0267] 1108. The homepage detection module saves page 2 as the homepage of the child process.
[0268] After the homepage detection module receives notification message b, it can determine that the application homepage automatically detected by the child process is page 2. For example, the homepage detection module can identify the process that sent the notification message. When the homepage detection module identifies that the process sending notification message b is a child process and not the main process, it can, for example, record page 2 as the child process's homepage.
[0269] In this way, the homepage detected by the child process can be effectively recorded, while the homepage of the application previously identified by the main process will not be overwritten. Therefore, the problem of the homepage detected by the child process overwriting the homepage detected by the main process, which would lead to the problem of the homepage recorded for the first application being incorrect, can be effectively avoided.
[0270] 1109. The homepage detection module sends feedback message b to the child process.
[0271] The implementation of 1109 is similar to that of 409 described above, and will not be repeated here.
[0272] In this embodiment, by setting the homepage detection module to identify the process type that sends the notification message, when the process that sends the notification message is a child process, the homepage detection module records the page indicated by the notification message as the homepage of the child process, without overwriting the application homepage previously identified by the main process. This can effectively avoid the problem of application homepage identification error caused by the start of the child process.
[0273] Next, let's combine... Figure 12 This section explains another solution to the problem of abnormal homepage recognition caused by the startup of a child process. Figure 12 Signaling interaction for the page processing method provided in the embodiments of this application Figure 3 .
[0274] like Figure 12 As shown, the method includes:
[0275] 1201. The child process instructs page 2 to start. 1202. The child process sends a retrieval request b to AMS. 1203. AMS sends a retrieval request b to the homepage detection module. 1204. The homepage detection module sends a response message b to the child process. 1205. The child process identifies page 2 as the main page. 1206. The child process sends a notification message b to AMS. 1207. AMS sends a notification message b to the homepage detection module.
[0276] The implementations of 1201 to 1207 are similar to those of 401 to 407 described above, and will not be repeated here.
[0277] 1208. The homepage detection module sends feedback message b to the child process.
[0278] After the homepage detection module receives notification message b, it can determine that the application homepage automatically detected by the child process is page 2. For example, the homepage detection module can identify the process sending the notification message. When the homepage detection module identifies the process sending notification message b as a child process and not the main process, it can, for example, not record page 2 identified by the child process as the homepage. Instead, it can directly send feedback message b to the child process. This also avoids the homepage error caused by the child process identifying the homepage overwriting the homepage identified by the main process.
[0279] Alternatively, the homepage detection module can identify the process that sent the request after receiving it. If the homepage detection module identifies the process that sent the request as a child process rather than the main process, it can, for example, not send a response message to the child process. This way, the homepage identified by the child process will not be triggered, and the homepage error caused by the child process identifying the homepage will not occur.
[0280] It should be noted that the module names involved in the embodiments of this application can all be defined as other names, as long as they can achieve the function of each module, and no specific restrictions are placed on the module names.
[0281] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0282] The page processing method of the embodiments of this application has been described above. The apparatus for performing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced by each other, and the related apparatus provided in the embodiments of this application can perform the steps in the above page processing method.
[0283] The page processing method provided in this application can be applied to electronic devices with data processing capabilities. Electronic devices include terminal devices, and the specific device form of the terminal device can be referred to the above-mentioned descriptions, which will not be repeated here.
[0284] In one implementation, this application provides an electronic device. Figure 13 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.
[0285] like Figure 12As shown, the electronic device 120 includes: a processor 1201 and a memory 1202; the memory 1202 stores computer execution instructions; the processor 1201 executes the computer execution instructions stored in the memory 1202, causing the electronic device 120 to perform the above-described method.
[0286] When the memory 1202 is set up independently, the electronic device also includes a bus 1203 for connecting the memory 1202 and the processor 1201.
[0287] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.
[0288] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0289] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0290] This application provides a computer program product, which includes a computer program that, when run, causes a computer to perform the above-described method.
[0291] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0292] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A page processing method, characterized in that, include: In response to the startup of the first process of the first application, and since the system side has not preset the main page of the first application, the first page is determined to be the main page of the first application through the first process; In response to a user's action of exiting the first page, the Activity Management Service (AMS) performs a pop operation on the first page recorded in the first data stack; After performing the pop operation, if there are no other pages in the first data stack, the homepage detection module clears the record information that the first page is the homepage of the first application. The homepage detection module is used to save and manage the homepages corresponding to multiple applications.
2. The method according to claim 1, characterized in that, The method further includes: After the pop operation is performed, if there is still a second page in the first data stack, and the page type of the second page is the first type, then the second page is determined to be the main page of the first application. The first type is a page type other than the details page type.
3. The method according to claim 1 or 2, characterized in that, In response to the launch of the first process of the first application, determining the first page as the main page of the first application through the first process includes: In response to the startup of the first process of the first application, a first retrieval request is sent to the first module through the first process. The first module is a module used to manage the application homepage. The first retrieval request is used to request the retrieval of the homepage preset for the first application. In response to the first acquisition request, the first module sends a first response message to the first process, the first response message being used to instruct the first process to identify the main page; The first process responds to the first response message, determines that the first page is the main page of the first application, and sends a first notification message to the first module, the first notification message being used to indicate that the first page is the main page; The first module responds to the first notification message and records the first page as the main page of the first application.
4. The method according to claim 1 or 2, characterized in that, After clearing the record information that the first page is the main page of the first application, the method further includes: Instruct the first process to redetermine the home page of the first application.
5. The method according to claim 4, characterized in that, The instruction to the first process to re-determine the main page of the first application includes: The first module sends a second notification message to the first process, the second notification message being used to instruct the first process to re-determine the main page of the first application; In the next startup process, the first process redetermines the main page of the first application.
6. The method according to claim 5, characterized in that, The method further includes: In response to the launch of the second process of the first application, the third page is determined to be the main page corresponding to the second process through the second process.
7. The method according to claim 6, characterized in that, The step of responding to the launch of the second process of the first application and determining the third page as the main page corresponding to the second process includes: In response to the startup of the second process of the first application, a second retrieval request is sent to the first module through the second process. The first module is a module used to manage the application homepage. The second retrieval request is used to request the retrieval of the homepage set for the first application. In response to the second acquisition request, the first module sends a third response message to the second process, the third response message being used to instruct the second process to identify the main page; In response to the third response message, the second process determines that the third page is the main page of the second process and sends a second notification message to the first module, the second notification message being used to indicate that the third page is the main page; If the first module records the main page of the first application, the first module responds to the second notification message and records the third page as the main page of the second process.
8. The method according to claim 7, characterized in that, The method further includes: In response to the launch of the second process of the first application, if the first module has recorded the main page of the first application, the first module does not record the main page determined by the second process.
9. The method according to claim 1, characterized in that, The first process is the main process of the first application.
10. The method according to claim 6, characterized in that, The second process is a child process of the first application.
11. An electronic device, characterized in that, The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 10.
12. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 10.
14. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 10.