A program page user input data holding method, device and storage medium
By generating a floating ball and child windows in the HarmonyOS system, and using user gestures to switch between the subprogram to be switched and the main program, the problem of page data being difficult to recover in the HarmonyOS system is solved, and user input efficiency and experience are improved.
Patent Information
- Application Number
- CN202510586209.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2026-11-10
AI Technical Summary
In HarmonyOS, it is difficult for users to recover their previous progress and entered data after leaving the current page, resulting in a decline in user experience and operational efficiency.
By generating a floating ball and child windows in the HarmonyOS system, user gestures are used to switch between the subroutine to be switched and the main program. User input data is recorded and restored. The design of the floating ball and child windows is used to maintain the page state and data.
Effectively record user input data, avoid data loss, improve user input efficiency, and enhance user interaction experience.
Smart Images

Figure CN123067779A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, device and storage medium for storing user input data on a program page. Background Technology
[0002] With the continuous advancement of technology and the significant increase in the prevalence of smart devices, users are facing more multi-step operation scenarios in their daily lives. When users perform complex multi-step operations on a webpage, if they leave the current page midway and return, the previous operation progress and entered data are usually difficult to recover, making it impossible to continue from the point of interruption, thus affecting user experience and operational efficiency.
[0003] HarmonyOS, a microkernel-based distributed operating system, provides a unified operating system platform for various smart devices. HarmonyOS pages largely adopt a data-driven model, as existing programs cannot save handles to page controls or the entire page.
[0004] Currently, to preserve state or data, the original data resource pool or the local recovery file corresponding to the page is often used. The page is reconstructed and its previous state and data are restored using the local recovery file and the page's corresponding address. However, current application-page processing only records the current page's address; loading the page address only solves the problem of preserving static page content and cannot restore input data or state selections. Furthermore, when using local recovery files or page addresses, multiple page addresses may be encountered, making accurate restoration difficult. Additionally, HarmonyOS uses a data-driven model, and its unique program framework services cannot be accurately reused. Due to the diversity of page addresses, applications struggle to effectively monitor and record them, increasing the complexity and uncertainty of data recovery. Summary of the Invention
[0005] This application provides a method, device, and storage medium for maintaining user input data on a program page, in order to solve the problem of difficulty in maintaining the state and data of program pages in the HarmonyOS system.
[0006] Firstly, this application provides a method for maintaining user input data on a program page, the method comprising:
[0007] In response to the user's first action, the first page of the first program is displayed on the display screen. The first program is deployed in the HarmonyOS system, and the first page includes the data that the user has entered.
[0008] Set the first page as the subroutine to be switched and generate a floating ball. The floating ball is displayed on the first page and is used to respond to user gestures to switch between the subroutine to be switched and the first program.
[0009] In response to a user's gesture on the floating ball, the main page is displayed on the display screen, and in response to a second user action, a second page of the first program is displayed on the display screen;
[0010] Hide the subroutine to be switched to below the second page, and display the floating ball on the second page;
[0011] In response to the user's gesture on the floating ball, the subroutine to be switched is invoked to display the first page and the data entered by the user on the display screen.
[0012] In one possible design, the first page is set as the subroutine to be switched, and a floating ball is generated, including:
[0013] The first page will be opened as a new subroutine through the HarmonyOS program framework service;
[0014] The new subroutine is identified as the subroutine to be switched;
[0015] On the first page, a floating ball is generated using the overlapping layout function of the HarmonyOS system.
[0016] One possible design also includes:
[0017] In response to a user's drag gesture on the floating ball, move the floating ball and obtain the position data of the floating ball when the user stops dragging the gesture;
[0018] The dynamic position calculation is performed based on the position data of the suspended ball and the preset screen parameters to obtain the secondary movement direction of the suspended ball;
[0019] Control the floating ball to move to the edge of the screen in the direction of the floating ball's second movement.
[0020] One possible design also includes:
[0021] When a subpage of the first program is detected on the display screen, a subwindow is created to link to the subprogram to be switched. The subpage is a page other than the first and second pages of the first program. The display area occupied by the subwindow on the display screen is smaller than that occupied by the subpage on the display screen. The response priority of the subwindow is higher than the response priority of other pages of the first program.
[0022] Display the child window floating on the child page;
[0023] In response to a user's gesture on a child window, the subroutine to be switched is invoked to display the first page and the user's entered data on the display screen.
[0024] In one possible design, after the child window is hovered over the child page, it also includes:
[0025] In response to a user's drag gesture on a child window, the child window is moved, and the position data of the child window is obtained when the user stops dragging.
[0026] The secondary movement direction of the sub-window is obtained by dynamically calculating the sub-window's position data and preset screen parameters.
[0027] Control the child window to move to the edge of the screen according to the child window's secondary movement direction.
[0028] In one possible design, after the child window is hovered over the child page, it also includes:
[0029] Responding to the user's gesture on the display screen for the first program to be executed;
[0030] When a child window detects that a gesture to be executed has been captured, the gesture is sent to the window corresponding to the main page of the first program through the event center of the HarmonyOS system, so that the window corresponding to the main page can complete the corresponding operation according to the gesture.
[0031] In one possible design, the HarmonyOS system includes a built-in component navigation mode, and the method also includes:
[0032] Display the main page or other pages in the first area of the display screen;
[0033] The first page is displayed in the second area of the display screen;
[0034] The first and second regions are adjacent and have no overlap.
[0035] Secondly, this application provides a user input data retention device for a program page, comprising:
[0036] The display module is used to display the first page of the first program on the display screen in response to the user's first operation. The first program is deployed in the HarmonyOS system, and the first page includes the data that the user has entered.
[0037] The floating ball module is used to set the first page as the subroutine to be switched and generate a floating ball. The floating ball is displayed on the first page and is used to respond to user gestures to switch between the subroutine to be switched and the first program.
[0038] An operation response module is used to respond to the user's gesture on the floating ball, display the main page on the display screen, and respond to the user's second operation to display the second page of the first program on the display screen;
[0039] The hidden switching module is used to hide the subroutine to be switched to below the second page, while the floating ball is displayed on the second page;
[0040] The display switching module is used to respond to the user's gesture on the floating ball, call up the subroutine to be switched, and display the first page and the data entered by the user on the display screen.
[0041] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0042] The memory stores instructions that the computer executes;
[0043] The processor executes computer execution instructions stored in memory to implement a method for maintaining user input data on a program page, as described in the first aspect of the invention.
[0044] In one possible design, the electronic device is any one of a flat-screen phone, a foldable phone, a touchscreen tablet, a touchscreen laptop, or a touchscreen all-in-one.
[0045] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement a method for maintaining user input data on a program page, as described in the first aspect of the invention.
[0046] Fifthly, this application provides a computer program product, comprising: a computer program, which, when executed by a processor, is used to implement a method for maintaining user input data on a program page, as described in the first aspect of the invention.
[0047] This application provides a method, device, and storage medium for retaining user input data on a program page. In response to a user's first operation, a first page of a first program is displayed on a screen. The first program is deployed in the HarmonyOS system, and the first page includes user-inputted data. The first page is then set as a subroutine to be switched, and a floating ball is generated and displayed on the first page. The floating ball is used to switch between the subroutine to be switched and the first program in response to user gestures. In response to a user's gesture on the floating ball, a main page is displayed on the screen, and in response to a second user operation, a second page of the first program is displayed on the screen. The subroutine to be switched is hidden below the second page, and the floating ball is displayed on the second page. In response to a user's gesture on the floating ball, the subroutine to be switched is invoked to display the first page and user-inputted data on the screen. The following technical effects were achieved: By operating the program interface of the HarmonyOS system, the problem of not being able to save page controls or the entire page caused by the data-driven mode of the HarmonyOS system page can be solved; through the setting of the floating ball and user gesture operation, user input data can be recorded, realizing the preservation of page state and user input data; through the cooperation between subroutines and the floating ball, clicking the floating ball can directly bring up the page with input data, avoiding the loss of input data, improving user input efficiency, and thus improving the user interaction experience. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 A schematic diagram illustrating a scenario for a method of maintaining user input data on a program page, as provided in an embodiment of this application.
[0050] Figure 2 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 1 ;
[0051] Figure 3 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 2 ;
[0052] Figure 4 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 3 ;
[0053] Figure 5A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 4 ;
[0054] Figure 6 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 5 ;
[0055] Figure 7 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 6 ;
[0056] Figure 8 A large-screen illustration of a method for retaining user input data on a program page provided in an embodiment of this application;
[0057] Figure 9 A schematic diagram of the structure of the user input data holding device for the program page provided in the embodiments of this application;
[0058] Figure 10 This is a schematic diagram of the structure of the electronic device hardware provided in the embodiments of this application.
[0059] Figure label:
[0060] 100 - Display screen; 200 - First page; 300 - Second page; 400 - Main page; 410 - Subpage; 500 - User; 600 - Floating ball; 700 - Sub-window;
[0061] 810 - Zone 1; 820 - Zone 2;
[0062] 910 - Display module; 920 - Floating ball module; 930 - Operation response module; 940 - Hide switching module; 950 - Display switching module;
[0063] 1010 - Processor; 1020 - Memory; 1030 - Communication components; 1040 - Bus. Detailed Implementation
[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0065] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, nor do they necessarily imply difference. It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. 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 words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner. In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more.
[0066] It should be noted that the phrase "at...time" in the embodiments of this application can refer to the instant at which a certain situation occurs, or to a period of time after the occurrence of a certain situation; the embodiments of this application do not specifically limit this. Furthermore, the method for retaining user input data on a program page provided in the embodiments of this application is only an example, and the method for retaining user input data on a program page may include more or less content.
[0067] 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:
[0068] HarmonyOS: HarmonyOS is a microkernel-based distributed operating system designed to provide a unified operating system platform for various smart devices.
[0069] Resume interrupted downloads: This is a technology used in network transmission, especially during file downloads or uploads. It allows data transmission to resume from where it left off after a network connection interruption, rather than restarting the entire file transfer process. This technology greatly improves transmission efficiency and user experience in unstable network environments.
[0070] Floating ball: A floating ball typically refers to a small widget or shortcut icon that can move freely on the screen of a smart device. It can provide quick access to certain functions or applications without interfering with the user's current operation.
[0071] Overlapping layout: Overlapping layout refers to a layout method in user interface design that allows different user interface (UI) components or elements to be displayed on top of each other. This method can create rich visual effects and a more flexible interactive experience.
[0072] With the rapid development of technology and the emergence of various smart devices, their popularity has significantly increased. At the same time, users are increasingly facing scenarios where they need to fill out forms or perform multi-step operations in their daily use. For some business processes that are complex, with many user options and inputs, and where users often need to navigate to other business modules or pages to retrieve data, maintaining user state is particularly important.
[0073] Since HarmonyOS also provides a unified operating system platform for various smart devices, it is also necessary to consider the issues of page persistence and data persistence for various smart devices corresponding to HarmonyOS.
[0074] When users perform complex, multi-step operations on a webpage, if they leave the current page midway and return, the previous progress and entered data are usually difficult to recover, making it impossible to continue from where it left off. This negatively impacts user experience and operational efficiency. Therefore, maintaining page state and data persistence is particularly important.
[0075] In existing technologies, data recovery and state preservation of the page are achieved by obtaining the current page's address, locating the corresponding local recovery file, and then reconstructing the page using that file. Alternatively, data recovery can be performed using page data stored in a local data resource pool.
[0076] However, this data preservation method only applies to ordinary smart devices, not to smart devices compatible with the HarmonyOS system. When a page receives user input or option selections, the page may load multiple page addresses, making it difficult to accurately restore the state and data of the target page. Furthermore, applications struggle to monitor and record the specific process of user input or option selections, significantly increasing the difficulty of restoring state and data. After the user exits the current page and returns, the application can only restore the static content of the page using the page address, and cannot recreate the data and selections entered by the user on that page.
[0077] Therefore, maintaining the state and data of application pages based on the HarmonyOS system is a problem that urgently needs to be solved.
[0078] Based on this, embodiments of this application provide a method, device, and storage medium for storing user input data on a program page, which can be used in the field of computer technology and aims to solve the above-mentioned technical problems of the prior art. The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0079] Figure 1 This is a schematic diagram illustrating a scenario for a method of maintaining user input data on a program page, as provided in an embodiment of this application. It should be noted that... Figure 1 The examples shown are merely examples of scenarios in which the embodiments of this application can be applied, to help those skilled in the art understand the technical content of this application, but do not mean that the embodiments of this application cannot be used in other devices, systems, environments or scenarios.
[0080] like Figure 1 As shown, taking the display screen 100 of a mobile smart device as an example, the application's first page 200, second page 300, and main page 400 are represented.
[0081] Page 200 refers to the page where user 500 has entered data; page 300 refers to other pages that user 500 needs to switch to. Page 400 is the main page of the application, which includes multiple subpages 410.
[0082] The floating ball 600 can float above the first page 200 and the second page 300, and is used to switch to the first page 200 according to the user's gesture to be executed.
[0083] The child window 700 floats above the main page 400 and is used to switch between the first page 200, the second page 300 and other pages according to the user's operation.
[0084] Figure 2 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 1 This embodiment can be combined with Figure 1 and Figure 2 As shown, the method includes:
[0085] S201, In response to the user's first operation, display the first page of the first program on the display screen.
[0086] The first program is deployed on the HarmonyOS system, and the first page includes the data that the user has entered.
[0087] Specifically, the first program refers to the application deployed on the HarmonyOS system. The first page refers to the page on which the user needs to input data. The first operation refers to the operation performed by the user on the first page, such as inputting data.
[0088] Based on the user's first action, the first page of the display screen is obtained.
[0089] S202. Set the first page as the subroutine to be switched and generate a floating ball, which is displayed on the first page.
[0090] The floating ball is used to respond to user gestures to switch between the subroutine to be switched and the first program.
[0091] Specifically, the first page is reopened as a new subroutine using the existing program framework services of the HarmonyOS system.
[0092] The subroutine is then identified as the program to be switched.
[0093] Using the overlapping layout technology of the HarmonyOS system, a floating ball is generated based on the program to be switched.
[0094] The floating ball is displayed on the first page. The floating ball can be moved to a specific position based on the user's dragging gesture and the corresponding position data of the floating ball.
[0095] Based on the position data of the floating ball and the preset screen parameters, the position is calculated to obtain the second movement direction of the floating ball, so that the floating ball can move to the edge of the screen in the second movement direction.
[0096] It is worth noting that the floating ball ultimately ends up at the edge of the screen.
[0097] S203, in response to a user's gesture on the floating ball, display the main page on the display screen, and in response to a second user action, display the second page of the first program on the display screen.
[0098] Specifically, the second operation refers to the user's action on the application's main page to reach the second page. The second page is the target page the user needs to switch to after switching from the first page. The user then returns to the first page to input data based on the information from the second page.
[0099] Based on the user's gestures on the floating ball, the first page is switched to the application's main page.
[0100] And based on the user's second action on the main page of the display screen application, a second page is displayed on the display screen.
[0101] S204. Hide the subroutine to be switched to the second page, and display the floating ball on the second page.
[0102] Specifically, when the second page is displayed on the screen, a floating ball linked to the first page is displayed on the second page so that users can quickly switch to the first page based on the floating ball.
[0103] S205. In response to the user's gesture on the floating ball, the subroutine to be switched is invoked to display the first page and the user's input data on the display screen.
[0104] Specifically, based on the user's gesture applied to the floating ball, the second page can be switched to the first page. The switching process involves bringing up the subroutine to be switched, hiding the second page, and displaying the first page, along with the user-entered data on the first page.
[0105] This application provides a method for retaining user input data on a program page. In response to a user's first operation, a first page of a first program is displayed on the screen. The first program is deployed in the HarmonyOS system, and the first page includes user-inputted data. The first page is then set as a subroutine to be switched, and a floating ball is generated and displayed on the first page. The floating ball is used to switch between the subroutine to be switched and the first program in response to user gestures. In response to a user's gesture on the floating ball, a main page is displayed on the screen, and in response to a second user operation, a second page of the first program is displayed on the screen. The subroutine to be switched is hidden below the second page, and the floating ball is displayed on the second page. In response to a user's gesture on the floating ball, the subroutine to be switched is invoked to display the first page and user-inputted data on the screen. The following technical effects were achieved: By operating the program interface of the HarmonyOS system, the problem of not being able to save page controls or the entire page caused by the data-driven mode of the HarmonyOS system page can be solved; through the setting of the floating ball and user gesture operation, user input data can be recorded, realizing the preservation of page state and user input data; through the cooperation between subroutines and the floating ball, clicking the floating ball can directly bring up the page with input data, avoiding the loss of input data, improving user input efficiency, and thus improving the user interaction experience.
[0106] Figure 3 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 2 This embodiment is in Figure 2 Based on the embodiments, the steps of the method for maintaining user input data on the program page are described in detail, such as... Figure 3 As shown in the figure, this embodiment provides a method for maintaining user input data on a program page, including:
[0107] S301, In response to the user's first operation, display the first page of the first program on the display screen.
[0108] The first program is deployed on the HarmonyOS system, and the first page includes the data that the user has entered.
[0109] S301 and S201 are based on the same principle, and will not be described again in this embodiment.
[0110] S302. Open the first page as a new subroutine through the HarmonyOS system's program framework service.
[0111] Specifically, the first page is set as the subroutine to be switched, and a floating ball is generated and displayed on the first page. The floating ball is used to respond to user gestures to switch between the subroutine to be switched and the first program.
[0112] The first page is reopened via a new subroutine using the HarmonyOS program framework service.
[0113] S303. The new subroutine is identified as the subroutine to be switched.
[0114] Specifically, the new subroutine on the first page is identified as the subroutine to be switched.
[0115] S304. On the first page, a floating ball is generated using the overlapping layout function of the HarmonyOS system.
[0116] Specifically, the overlapping layout function of the HarmonyOS system generates a floating ball based on the subroutine to be switched.
[0117] S305, in response to a user's gesture on the floating ball, the main page is displayed on the display screen, and in response to a second user action, the second page of the first program is displayed on the display screen.
[0118] S306. Hide the subroutine to be switched to the second page, and display the floating ball on the second page.
[0119] S307. In response to the user's gesture on the floating ball, the subroutine to be switched is invoked to display the first page and the user's input data on the display screen.
[0120] S305-S307 are based on the same principle as S203-S205, and will not be described again in this embodiment.
[0121] The technical effect provided by the embodiments of this application is that, through the design of the floating ball and sub-window, users can maintain the complete state and data when inputting data using applications based on the HarmonyOS system, thereby improving the user experience.
[0122] Figure 4 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 3 This embodiment is in Figure 2 and Figure 3 Based on the embodiments, the displacement and movement steps of the suspended ball are described in detail, such as... Figure 4 As shown, it includes:
[0123] S401. In response to a user's drag gesture on the floating ball, move the floating ball and obtain the position data of the floating ball when the user stops dragging.
[0124] Specifically, the floating ball can move according to the user's dragging gesture.
[0125] When the user stops dragging the floating ball, obtain the position data of the floating ball on the display screen at that time.
[0126] S402. Perform dynamic position calculation based on the position data of the suspended ball and the preset screen parameters to obtain the secondary movement direction of the suspended ball.
[0127] Specifically, dynamic position calculation is performed based on preset screen parameters and the position data of the floating ball on the real screen to obtain the secondary movement direction of the floating ball.
[0128] It is worth noting that users can drag the floating ball to any position on the screen, but the floating ball can only be positioned close to the edge of the screen. The floating ball will automatically move to the edge of the screen after the user stops dragging.
[0129] S403, Control the floating ball to move to the edge of the screen according to the second movement direction of the floating ball.
[0130] Specifically, the floating ball can move according to the calculated secondary movement direction of the floating ball until it reaches the nearest edge of the screen.
[0131] The technical effect provided by this application embodiment is that, by setting the floating ball to be draggable at will, the floating ball can be avoided to place where the user needs to input data, so as not to obscure the page content and improve the user experience.
[0132] Figure 5 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 4 This embodiment is in Figure 2 and Figure 3 Based on the implementation examples, the design and application steps of the sub-window are described in detail, such as... Figure 5 As shown, it includes:
[0133] S501. When a subpage of the first program is detected on the display screen, a subwindow is created to link to the subprogram to be switched.
[0134] Among them, a subpage is any page other than the first and second pages of the first program. The display area occupied by a subwindow on the display screen is smaller than that occupied by a subpage on the display screen, and the response priority of a subwindow is higher than that of other pages of the first program.
[0135] Specifically, a subpage refers to any page on the main page other than the first and second pages. The display area of a subwindow is smaller than that of a subpage to avoid obstruction. Furthermore, the response priority of a subwindow is higher than that of a subpage; that is, if a user clicks on both a subwindow and a subpage simultaneously, they should be redirected to the subroutine linked to by the subwindow.
[0136] When a subpage of the first program is displayed on the screen, a subwindow is created. The subwindow is used to link the subprograms to be switched.
[0137] S502, Float the child window on the child page.
[0138] Specifically, the child windows are displayed floating above each child page.
[0139] S503, responding to a user's gesture on a child window, invokes the subroutine to be switched to display the first page and the user's entered data on the display screen.
[0140] Specifically, based on the user's gestures on the child window, the sub-program to be switched can be brought up through the child window, displaying the first page and the data already entered by the user on the first page.
[0141] The technical effect provided by the embodiments of this application is that, through the design of sub-windows, users can quickly switch to the first page through the sub-windows, thereby improving efficiency.
[0142] Figure 6 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 5 This embodiment is in Figure 5 Based on the implementation examples, the specific steps for a child window to respond to a drag gesture are described in detail, such as... Figure 6 As shown, it includes:
[0143] S601. In response to a user's drag gesture on a child window, move the child window and obtain the position data of the child window when the user stops dragging.
[0144] Specifically, based on the user's dragging gestures, the child window can move following the user's gestures. It also obtains the position data of the child window on the display screen when the user stops dragging.
[0145] S602. Perform dynamic position calculation based on the position data of the sub-window and preset screen parameters to obtain the secondary movement direction of the sub-window.
[0146] Specifically, based on the position data of the child window on the display screen and preset screen parameters, dynamic position calculation is performed to obtain the secondary movement direction of the child window.
[0147] S603: Control the child window to move to the edge of the screen according to the secondary movement direction of the child window.
[0148] Specifically, the child window can move to the nearest screen edge based on the direction of the child window's secondary movement.
[0149] It is worth noting that both the child window and the floating ball eventually end up at the edge of the screen.
[0150] The technical effect provided by this embodiment is that, through the drag design of the child window, the child window can be dragged to any edge of the screen, avoiding obscuring the page content.
[0151] Figure 7 A flowchart illustrating the method for maintaining user input data on a program page provided in this application embodiment. Figure 6 This embodiment is in Figure 5 Based on the implementation examples, the specific steps for a child window to respond to a gesture to be executed are described in detail, such as... Figure 7 As shown, it includes:
[0152] S701, responding to a user's gesture on the display screen for a first program to be executed.
[0153] Specifically, a gesture to be performed refers to a gesture performed by the user based on the application, such as switching from one subpage to another on the main page.
[0154] S702. When a child window detects that a gesture to be executed has been captured, the gesture to be executed is sent to the window corresponding to the main page of the first program through the event center of the HarmonyOS system, so that the window corresponding to the main page can complete the corresponding operation according to the gesture to be executed.
[0155] Specifically, when a child window receives a user's gesture to be executed, it sends the gesture to the window corresponding to the main page of the application through the event center of the HarmonyOS system, so that the window corresponding to the main page can complete the response operation according to the gesture to be executed.
[0156] The technical effect provided by this embodiment is that, through the design of the operation response of the child window, the problem of difficult user interaction caused by creating a child window can be avoided.
[0157] Figure 8 A large-screen illustration of the method for maintaining user input data on a program page provided in this application embodiment, such as... Figure 8 As shown, the HarmonyOS system has a built-in component navigation mode, and the method also includes:
[0158] Display the main page or other pages in the first area of the display screen;
[0159] The first page is displayed in the second area of the display screen;
[0160] The first and second regions are adjacent and have no overlap.
[0161] Specifically, because foldable screens or tablet devices have large screen sizes, the display of user components is not shown in the above-mentioned mobile smart device embodiments.
[0162] The application's home page or other subpages are displayed in the first area 810; the first page is displayed in the second area 820.
[0163] The technical effect provided by this embodiment is that, through the interface design for large-screen displays, users can avoid overwriting the original page when switching interfaces, making it more convenient for users.
[0164] In this embodiment of the invention, electronic devices or main control devices can be divided into functional modules according to the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional module. It should be noted that the module division in this embodiment of the invention is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0165] Figure 9 This is a schematic diagram of the structure of the user input data retention device for the program page provided in the embodiments of this application. Figure 9 As shown, the user input data holding device on the program page includes a display module 910, a floating ball module 920, an operation response module 930, a hide switching module 940, and a display switching module 950.
[0166] Display module 910 is used to display the first page of the first program on the display screen in response to the user's first operation. The first program is deployed in the HarmonyOS system, and the first page includes data that the user has entered.
[0167] The floating ball module 920 is used to set the first page as the subroutine to be switched and generate a floating ball. The floating ball is displayed on the first page and is used to respond to user gestures to perform switching between the subroutine to be switched and the first program.
[0168] The operation response module 930 is used to respond to the user's gesture on the floating ball, display the main page on the display screen, and respond to the user's second operation to display the second page of the first program on the display screen;
[0169] The hidden switching module 940 is used to hide the subroutine to be switched to below the second page, while the floating ball is displayed on the second page;
[0170] Display switching module 950 is used to respond to the user's gesture on the floating ball, call up the subroutine to be switched to display the first page and the user's input data on the display screen.
[0171] In one possible design, the levitating ball module 920 includes:
[0172] The subroutine module is used to open the first page as a new subroutine through the HarmonyOS program framework service;
[0173] The subroutine determination module is used to identify new subroutines as the subroutines to be switched.
[0174] The module for generating a floating ball is used to generate a floating ball on the first page using the overlapping layout function of the HarmonyOS system.
[0175] In one possible design, the user input data retention device on the program page also includes:
[0176] The floating ball dragging module is used to respond to the user's dragging gesture on the floating ball, move the floating ball, and obtain the position data of the floating ball when the user stops dragging the gesture;
[0177] The floating ball movement direction module is used to perform dynamic position calculation based on the floating ball's position data and preset screen parameters to obtain the floating ball's secondary movement direction.
[0178] The control module for the floating ball is used to control the floating ball to move to the edge of the screen according to the secondary movement direction of the floating ball.
[0179] In one possible design, the user input data retention device on the program page also includes:
[0180] The sub-window creation module is used to create a sub-window to link to the sub-program to be switched when a sub-page of the first program is detected on the display screen. The sub-page is a page other than the first and second pages of the first program. The display area occupied by the sub-window on the display screen is smaller than that occupied by the sub-page on the display screen. The response priority of the sub-window is higher than the response priority of other pages of the first program.
[0181] The child window floating module is used to display child windows floating on a child page;
[0182] The child window response module is used to respond to user gestures on a child window, call up the subroutine to be switched, and display the first page and the user's input data on the display screen.
[0183] In one possible design, the user input data retention device on the program page also includes:
[0184] The child window system module is used to respond to the user's drag gesture on the child window, move the child window, and obtain the position data of the child window when the user stops dragging the gesture;
[0185] The sub-window movement module is used to perform dynamic position calculations based on the sub-window's position data and preset screen parameters to obtain the sub-window's secondary movement direction.
[0186] The child window control module is used to control the child window to move to the edge of the screen according to the secondary movement direction of the child window.
[0187] In one possible design, the user input data retention device on the program page also includes:
[0188] The module to be executed is used to respond to the user's gesture on the display screen for the first program to be executed;
[0189] The gesture transmission module is used to send the gesture to be executed to the window corresponding to the main page of the first program through the event center of the HarmonyOS system when it detects that the child window has captured the gesture to be executed, so that the window corresponding to the main page can complete the corresponding operation according to the gesture to be executed.
[0190] In one possible design, the HarmonyOS system includes a built-in component navigation mode, and the device also includes:
[0191] The first area module is used to display the main page or other pages in the first area of the display screen;
[0192] The second area module is used to display the first page in the second area of the display screen;
[0193] The first and second regions are adjacent and have no overlap.
[0194] This embodiment provides a program page user input data retention device, which can execute the program page user input data retention device of the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0195] In the specific implementation of the aforementioned method for retaining user input data on a program page, each module can be implemented as a processor. The processor can execute computer execution instructions stored in memory, thereby enabling the processor to execute the aforementioned method for retaining user input data on a program page.
[0196] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application. For example... Figure 10 As shown, the electronic device includes at least one processor 1010 and a memory 1020. The electronic device also includes a communication component 1030. The processor 1010, memory 1020, and communication component 1030 are connected via a bus 1040.
[0197] In the specific implementation process, at least one processor 1010 executes computer execution instructions stored in memory 1020, causing at least one processor 1010 to execute a program page user input data retention method as executed on the above electronic device side.
[0198] The specific implementation process of processor 1010 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0199] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0200] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage.
[0201] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0202] In one possible design, the electronic device is any one of a flat-screen phone, a foldable phone, a touchscreen tablet, a touchscreen laptop, or a touchscreen all-in-one.
[0203] The above description of the functions implemented by electronic devices and main control devices has introduced the solutions provided by the embodiments of the present invention. It is understood that, in order to implement the above functions, the electronic device or main control device includes hardware structures and / or software modules corresponding to the execution of each function. By combining the units and algorithm steps of the various examples described in the embodiments of the present invention, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present invention.
[0204] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the above-described method for maintaining user input data on a program page.
[0205] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof.
[0206] Examples include Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), and Erasable Programmable Read-Only Memory (EPROM).
[0207] Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), Magnetic Storage, Flash Memory, Disk or Optical Disk. A readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0208] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in an electronic device or a host device.
[0209] This application also provides a computer program product comprising: a computer program stored in a readable storage medium, wherein at least one processor of an electronic device can read the computer program from the readable storage medium, and wherein when the computer program is executed by the processor, it is used to implement the above-described method for maintaining user input data on a program page.
[0210] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.
[0211] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for maintaining user input data on a program page, characterized in that, include: In response to the user's first operation, the first page of the first program is displayed on the display screen. The first program is deployed in the HarmonyOS system. The first page includes data that the user has entered. The first page is set as the subroutine to be switched, and a floating ball is generated and displayed on the first page. The floating ball is used to respond to user gestures to switch between the subroutine to be switched and the first program. In response to the user's gesture on the floating ball, the main page is displayed on the display screen, and in response to the user's second operation, the second page of the first program is displayed on the display screen; The subroutine to be switched is hidden below the second page, and the floating ball is displayed on the second page; In response to the user's gesture on the floating ball, the subroutine to be switched is invoked to display the first page and the user's input data on the display screen.
2. The method according to claim 1, characterized in that, Setting the first page as the subroutine to be switched and generating a floating ball includes: The first page is opened as a new subroutine through the program framework service of the HarmonyOS system; The new subroutine is identified as the subroutine to be switched; A floating ball is generated on the first page using the overlapping layout function of the HarmonyOS system.
3. The method according to claim 1, characterized in that, Also includes: In response to a user's drag gesture on the floating ball, the floating ball is moved, and the position data of the floating ball is obtained when the user stops the drag gesture; Based on the position data of the suspended ball and preset screen parameters, dynamic position calculation is performed to obtain the secondary movement direction of the suspended ball; Control the suspended ball to move to the edge of the screen according to the secondary movement direction of the suspended ball.
4. The method according to claim 1, characterized in that, Also includes: When a subpage of the first program is detected on the display screen, a subwindow is created to link to the subprogram to be switched. The subpage is a page other than the first and second pages of the first program. The display area occupied by the subwindow on the display screen is smaller than the display area occupied by the subpage on the display screen. The response priority of the subwindow is higher than the response priority of other pages of the first program. The sub-window is displayed floating on the sub-page; In response to the user's gesture on the child window, the subroutine to be switched is invoked to display the first page and the user's input data on the display screen.
5. The method according to claim 4, characterized in that, After the sub-window is hovered on the sub-page, the method further includes: In response to a user's drag gesture on the child window, the child window is moved, and the position data of the child window is obtained when the user stops the drag gesture; Dynamic position calculation is performed based on the position data of the sub-window and preset screen parameters to obtain the secondary movement direction of the sub-window; Control the sub-window to move to the edge of the screen according to the sub-window's secondary movement direction.
6. The method according to claim 4 or 5, characterized in that, After the sub-window is hovered on the sub-page, the method further includes: In response to a user's gesture to be executed on the display screen for the first program; When the child window detects that the gesture to be executed has been captured, the gesture to be executed is sent to the window corresponding to the main page of the first program through the event center of the HarmonyOS system, so that the window corresponding to the main page can complete the corresponding operation according to the gesture to be executed.
7. The method according to any one of claims 1 to 5, characterized in that, The HarmonyOS system has a built-in component navigation mode, and the method further includes: The main page or other pages are displayed in a first area of the display screen; The first page is displayed in a second area of the display screen; The first region and the second region are adjacent and have no overlap.
8. An electronic device, characterized in that, include: The processor, and the memory that is communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform a method for maintaining user input data on a program page as described in any one of claims 1 to 7.
9. The electronic device according to claim 8, characterized in that, The electronic device is any one of a flat-screen mobile phone, a foldable-screen mobile phone, a touchscreen tablet computer, a touchscreen laptop computer, or a touchscreen all-in-one computer.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement a method for maintaining user input data on a program page as described in any one of claims 1 to 7.
