Picture cutting method and device, electronic equipment and storage medium
By displaying the first interactive window on the vehicle screen and gradually moving to the second interactive window, the problem of large memory resource consumption in the prior art is solved, and efficient switching of screen content is achieved.
Patent Information
- Application Number
- CN202510278801.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-03-11
AI Technical Summary
The existing technology consumes a lot of memory resources when switching application screens between car screens.
By displaying the first interactive window on the first screen and gradually moving the screen content to the second interactive window on the second screen in response to user operations, there is no need to create a virtual screen.
The consumption of memory resources is reduced, and smooth switching of screen content is achieved.
Smart Images

Figure CN119806358B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle-computer interaction technology, and in particular to a screen switching method, device, electronic device and storage medium. Background Art
[0002] With the development of in-vehicle computer technology, the number of screens in a car is increasing, and the demand for interaction between screens is also increasing. For example, moving an application screen from one screen to another.
[0003] In the related art, a virtual screen technology is used to move an application screen on one screen to another screen. However, this technology consumes a large amount of memory resources. Summary of the Invention
[0004] Based on this, the object of the present invention is to provide a screen switching method, device, electronic device and storage medium, which have the advantage of low memory resource consumption.
[0005] According to a first aspect of an embodiment of the present application, a screen switching method is provided, comprising the following steps:
[0006] Displaying a first interactive interface of the target application on the first screen; the first interactive interface displays screen content;
[0007] In response to the screen switching operation, a first interactive window is displayed on the first screen; the first interactive window is located on the first interactive interface, and the screen content displayed in the first interactive window is consistent with the screen content displayed on the first interactive interface;
[0008] In response to a move operation on the first interactive window, obtaining a position of the first interactive window on the first screen;
[0009] When the position meets the first preset condition, displaying the second interactive window on the second screen, and gradually moving the screen content from the first interactive window to the second interactive window according to the position;
[0010] When the position meets the second preset condition, the first interaction window, the second interaction window and the first interaction interface are removed, and the second interaction interface is displayed on the second screen; the second interaction interface displays the screen content.
[0011] According to a second aspect of an embodiment of the present application, a screen switching device is provided, comprising:
[0012] A first interactive interface display module is used to display a first interactive interface of the target application on the first screen; the first interactive interface displays screen content;
[0013] A first interactive window display module is configured to display a first interactive window on the first screen in response to a screen switching operation; the first interactive window is located on the first interactive interface, and the screen content displayed in the first interactive window is consistent with the screen content displayed on the first interactive interface;
[0014] a position acquisition module, configured to acquire a position of the first interactive window on the first screen in response to a move operation on the first interactive window;
[0015] A window moving module, configured to display a second interactive window on the second screen when the position satisfies a first preset condition, and gradually move the screen content from the first interactive window to the second interactive window according to the position;
[0016] The second interactive interface display module is used to remove the first interactive window, the second interactive window and the first interactive interface when the position meets the second preset condition, and display the second interactive interface on the second screen; the second interactive interface displays the screen content.
[0017] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing any one of the above-mentioned screen switching methods.
[0018] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the screen switching method as described above is implemented.
[0019] The embodiment of the present application is as follows: the first interactive interface of the target application is displayed on the first screen; the first interactive interface displays screen content; in response to a screen switching operation, a first interactive window is displayed on the first screen; the first interactive window is located on the first interactive interface, and the screen content displayed by the first interactive window is consistent with the screen content displayed by the first interactive interface; in response to a move operation on the first interactive window, the position of the first interactive window on the first screen is obtained; when the position meets a first preset condition, a second interactive window is displayed on the second screen, and the screen content is gradually moved from the first interactive window to the second interactive window according to the position; when the position meets a second preset condition, the first interactive window, the second interactive window and the first interactive interface are removed, and the second interactive interface is displayed on the second screen; the second interactive interface displays screen content. The present application realizes that the screen content on the first interactive interface is gradually moved from the first screen to the second screen by using the first interactive window on the first screen and the second interactive window on the second screen. Compared with the prior art, there is no need to create a virtual screen, thereby reducing memory resource consumption.
[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0021] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a screen switching method provided in one embodiment of the present application;
[0023] Figure 2 A structural block diagram of a screen switching device provided in one embodiment of the present application;
[0024] Figure 3 A schematic block diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
[0026] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0027] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the embodiments of the present application. The singular forms "a," "the," and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0028] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0029] In this application, unless otherwise specified, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0030] During the implementation of the present invention, the inventors discovered that in the prior art, a virtual screen is created, the application stack on screen A is switched to the virtual screen, and then windows 1 and 2 are created on screens A and B, respectively. The screen content of the virtual screen is mapped to windows 1 and 2, and windows 1 and 2 are moved. When the conditions for switching the screen content from screen A to screen B are met, the application stack is switched from the virtual screen to screen B. The need to create a virtual screen consumes a lot of memory resources.
[0031] To this end, the present application uses a first interactive window on the first screen and a second interactive window on the second screen to realize that the screen content on the first interactive interface is gradually moved from the first screen to the second screen. When the screen content moves to the second screen, the application stack of the target application is switched from the first screen to the second screen. Compared with the existing technology, there is no need to create a virtual screen, thereby reducing memory resource consumption.
[0032] See also Figure 1 , which is a flow chart of a screen switching method provided by an embodiment of the present application. The present application embodiment provides a screen switching method, comprising the following steps:
[0033] S10: Displaying a first interactive interface of a target application on a first screen; the first interactive interface displays screen content.
[0034] Among them, the executor of the screen switching method of the present application is a screen switching device, which includes but is not limited to car equipment, computers, tablets, and mobile phones.
[0035] Among them, the first screen is the display screen on the car computer, including but not limited to the central control screen, co-pilot screen and rear seat screen.
[0036] Among them, the target application is the application currently being operated by the user on the vehicle computer.
[0037] The first interactive interface is an application interface of the target application, including but not limited to a main interface and a sub-interface.
[0038] In an embodiment of the present application, the user interacts with the target application on the central control screen, and a first interactive interface is displayed.
[0039] S20: In response to the screen switching operation, a first interactive window is displayed on the first screen; the first interactive window is located on the first interactive interface, and the screen content displayed in the first interactive window is consistent with the screen content displayed on the first interactive interface.
[0040] Among them, the screen switching operation includes but is not limited to a three-finger press operation, a two-finger click operation, and a long press operation. The screen switching operation is used to trigger the switching of the application screen.
[0041] The first interactive window covers the first interactive interface, the size of the first interactive window is the same as the size of the first interactive interface, and the first interactive window displays the screen content of the first interactive interface in real time.
[0042] In an embodiment of the present application, in response to a user's three-finger operation on the first screen, the first screen enters a screen switching mode, a first interactive window is created on the first screen, and the screen content of the first interactive interface is obtained and rendered into the first interactive window. Specifically, the screen content of the first interactive interface can be obtained through the Android system's surfaceflinger service, and the screen content of the first interactive interface is sent to the OpenGL rendering engine, which renders the screen content of the first interactive interface into the first interactive window. The surfaceflinger service is a display synthesis system service in the Android operating system that can be used to synthesize and display screen content.
[0043] S30: In response to the movement operation on the first interactive window, obtain a position of the first interactive window on the first screen.
[0044] In an embodiment of the present application, it is detected that the user drags the first interactive window on the first screen to move, and during the movement, the position of the first interactive window on the first screen is obtained in real time.
[0045] S40: When the position meets the first preset condition, display the second interactive window on the second screen, and gradually move the screen content from the first interactive window to the second interactive window according to the position.
[0046] The first preset condition refers to the triggering condition for the screen content to start switching.
[0047] The second screen is a display screen on the vehicle's computer, including but not limited to the central control screen, the passenger screen, and the rear seat screen. The second screen is different from the first screen and shares the same Android system with the first screen. For example, the first screen is the central control screen and the second screen is the passenger screen.
[0048] The second interactive window is used to display screen content together with the first interactive window.
[0049] In an embodiment of the present application, when the position of the first interactive window satisfies a first preset condition, a second interactive window is displayed on the passenger screen. As the first interactive window moves, the screen content of the first interactive window gradually moves out of the central control screen, and the moved-out screen content is gradually displayed in the second interactive window, thereby creating the effect of the screen content continuously moving on the central control screen and the passenger screen.
[0050] S50: When the position meets the second preset condition, the first interaction window, the second interaction window and the first interaction interface are removed, and the second interaction interface is displayed on the second screen; the second interaction interface displays the screen content.
[0051] The second preset condition refers to the end condition of the screen switching of the picture content.
[0052] In this embodiment of the present application, when the position of the first interactive window meets the second preset condition, the first interactive window and the first interactive interface are removed from the hollow screen, and the second interactive window is removed from the passenger screen. After the second interactive window is removed, the second interactive interface is displayed on the passenger screen, and the screen content displayed in the second interactive interface is consistent with the screen content of the previous first interactive interface.
[0053] Applying the embodiment of the present application, by displaying the first interactive interface of the target application on the first screen; the first interactive interface displays screen content; in response to the screen switching operation, displaying the first interactive window on the first screen; the first interactive window is located on the first interactive interface, and the screen content displayed by the first interactive window is consistent with the screen content displayed by the first interactive interface; in response to the move operation of the first interactive window, obtaining the position of the first interactive window on the first screen; when the position meets the first preset condition, displaying the second interactive window on the second screen, and gradually moving the screen content from the first interactive window to the second interactive window according to the position; when the position meets the second preset condition, removing the first interactive window, the second interactive window and the first interactive interface, and displaying the second interactive interface on the second screen; the second interactive interface displays screen content. The present application realizes the gradual movement of the screen content on the first interactive interface from the first screen to the second screen through the first interactive window on the first screen and the second interactive window on the second screen. Compared with the existing technology, there is no need to create a virtual screen, thereby reducing memory resource consumption.
[0054] In one embodiment, before step S40, steps S401 to S403 are included, specifically as follows:
[0055] S401: Determine, according to the position, a position change amount of the first interactive window during the movement process.
[0056] In an embodiment of the present application, the initial position and the position after the first interactive window are obtained, and the position change of the first interactive window can be determined based on the initial position and the position after the move. The initial position of the first interactive window is the position of the first interactive window when it is just moved.
[0057] S402: When the position change is greater than or equal to a first preset threshold, it is determined that a first preset condition is satisfied.
[0058] The first preset threshold can be set according to actual needs. For example, the first preset threshold is half the width of the first screen.
[0059] In an embodiment of the present application, after a user opens a target application on the central control screen, a first interactive interface of the target application is displayed at a preset position. The preset position may be near the left side of the central control screen. The user drags the first interactive window to the right. When the position change of the first interactive window is greater than or equal to half the width of the central control screen, it is determined that the first preset condition is met, and screen switching begins.
[0060] S403: When the position change is less than the first preset threshold, determine that the first preset condition is not satisfied.
[0061] In an embodiment of the present application, when the position change of the first interactive window is less than half of the width of the central control screen, it is determined that the first preset condition is not met and the screen content is not switched.
[0062] In the embodiment of the present application, by obtaining the position change of the first interactive window and comparing the position change with a first preset threshold, it can automatically determine whether to switch the screen content.
[0063] In one embodiment, before step S40, steps S404 to S405 are included, specifically as follows:
[0064] S404: When the moving position coincides with a preset screen edge of the first screen, it is determined that a first preset condition is satisfied.
[0065] The preset screen can be set according to actual needs. Specifically, the first screen includes four screen edges: upper side, lower side, left side, and right side, and the preset screen edge can be any one of the screen edges.
[0066] In an embodiment of the present application, the user drags the first interactive window to the right. When the position of the first interactive window coincides with the right screen edge of the first screen, it is determined that the first preset condition is met and screen content switching begins.
[0067] S405: When the moved position does not coincide with the preset screen edge of the first screen, determine that the first preset condition is not satisfied.
[0068] In an embodiment of the present application, the user drags the first interactive window to the right. When the position of the first interactive window does not coincide with the right screen edge of the first screen, it is determined that the first preset condition is not met and the screen content is not switched.
[0069] The embodiment of the present application can automatically determine whether to switch the screen content by obtaining the position of the first interactive window and judging whether the position coincides with the preset screen edge of the first screen.
[0070] In one embodiment, step S40 includes step S41, which is specifically as follows:
[0071] S41: adjusting the size of the first interactive window and the size of the second interactive window according to the position, so that the screen content displayed in the adjusted second interactive window and the screen content displayed in the adjusted first interactive window constitute the screen content of the first interactive window before adjustment.
[0072] In an embodiment of the present application, the position change amount of the first interactive window is determined based on the position of the first interactive window. Based on the position change amount, the size adjustment amount of the first interactive window and the size adjustment amount of the second interactive window are determined. Based on the size adjustment amount, the size of the first interactive window and the size of the second interactive window are adjusted. In this case, the first position and the second position of the first interactive window are obtained, and the position change amount of the first interactive window is determined based on the first position and the second position. The first position is the position of the first interactive window when the first preset condition is met, and the second position is the position of the first interactive window that meets the first preset condition and continues to move.
[0073] In the embodiment of the present application, the size of the first interactive window and the size of the second interactive window are synchronously adjusted according to the position of the first interactive window, so that the screen content can be continuously moved from the first screen to the second screen.
[0074] In one embodiment, step S41 includes steps S411 to S412, which are specifically as follows:
[0075] S411: Determine a moving direction of the first interactive window.
[0076] The moving directions of the first interactive window include left, right, up, down, upper left, lower left, upper right and lower right.
[0077] In an embodiment of the present application, multiple positions of the first interactive window during the movement process can be obtained, and straight line fitting can be performed on the coordinates of the multiple positions, and the direction of the straight line can be determined as the moving direction of the first interactive window.
[0078] S412: When the first interactive window is reduced in size according to its position; when the second interactive window moves on the second screen according to the moving direction, the size of the second interactive window is expanded according to its position, so that the sum of the size of the reduced first interactive window and the size of the expanded second interactive window is the size of the first interactive window before being reduced.
[0079] In an embodiment of the present application, when the first interactive window moves along the moving direction on the first screen, the first interactive window gradually moves out of the first screen. During the movement, the size of the first interactive window is reduced, so that the display area of the first interactive window on the first screen gradually becomes smaller. At the same time, the second interactive window is synchronously moved on the second screen, and the size of the second interactive window is expanded, so that the display area of the second interactive window on the second screen gradually becomes larger. The screen content displayed in the second interactive window is the screen content of the first interactive window after it moves out of the first screen.
[0080] The embodiment of the present application ensures that the sum of the size of the reduced first interactive window and the size of the expanded second interactive window when the screen content is switched is the size of the first interactive window before reduction, by synchronously reducing the size of the first interactive window and expanding the size of the second interactive window. This makes the second interactive window appear to be the window portion of the first interactive window moved out of the first screen, and the movement of the screen content is more natural.
[0081] In one embodiment, the step of reducing the size of the first interactive window according to the position in step S412 includes steps S4121 to S4123, which are specifically as follows:
[0082] S4121: Determine, according to the position, a position change amount of the first interactive window during the moving process.
[0083] In an embodiment of the present application, a first position and a second position of a first interactive window are obtained, and the second position is subtracted from the first position to obtain a position change of the first interactive window. The first position is the position of the first interactive window when the first preset condition is satisfied, and the second position is the position of the first interactive window that continues to move while satisfying the first preset condition.
[0084] S4122: Obtain a first zoom ratio corresponding to the first interactive window according to a preset first mapping relationship between the position change amount and the zoom ratio.
[0085] In the first mapping relationship, one position change corresponds to a unique scaling ratio.
[0086] In an embodiment of the present application, a first scaling ratio corresponding to the first interactive window can be obtained based on the position change of the first interactive window and the first mapping relationship. Specifically, the first scaling ratio is the ratio of the position change of the first interactive window to the initial size of the first interactive window. The initial size refers to the window width and window height of the first interactive window before the size change.
[0087] S4123: Reduce the size of the first interactive window according to the first scaling ratio.
[0088] In an embodiment of the present application, a size change of the first interactive window is determined based on a first scaling ratio. The size of the first interactive window is reduced based on the size change. Specifically, the first scaling ratio is multiplied by an initial size of the first interactive window to obtain the size change. The initial size of the first interactive window is subtracted from the size change to obtain the size of the first interactive window after reduction.
[0089] The step of enlarging the size of the second interactive window according to the position in step S412 includes steps S4124 to S4125, which are specifically as follows:
[0090] S4124: Obtain a second zoom ratio corresponding to the second interactive window according to a preset second mapping relationship between the position change amount and the zoom ratio.
[0091] In the second mapping relationship, one position change corresponds to a unique scaling ratio.
[0092] In an embodiment of the present application, a second scaling ratio corresponding to the first interactive window can be obtained based on the position change of the first interactive window and the second mapping relationship. Specifically, the second scaling ratio is the ratio of the position change of the first interactive window to the initial size of the first interactive window. The initial size refers to the window width and window height of the first interactive window before the size change.
[0093] S4125: Enlarging the size of the first interactive window according to the second scaling ratio.
[0094] In an embodiment of the present application, a size change of the second interactive window is determined based on the second scaling ratio. The size of the second interactive window is expanded based on the size change. Specifically, the second scaling ratio is multiplied by the initial size of the first interactive window to obtain the size change. The size change is used as the expanded size of the second interactive window.
[0095] In an embodiment of the present application, the first interactive window and the second interactive window are scaled according to the first scaling ratio and the second scaling ratio, and the size of the first interactive window can be simultaneously reduced and the size of the second interactive window can be expanded, so that the screen content gradually moves from the first interactive window to the second interactive window.
[0096] In one embodiment, before step S50, steps S501 to S503 are included, specifically as follows:
[0097] S501: Acquire a position change of a first interactive window during the movement process.
[0098] In an embodiment of the present application, the initial position and the position after the first interactive window are obtained, and the position change of the first interactive window can be determined based on the initial position and the position after the move. The initial position of the first interactive window is the position of the first interactive window when it is just moved.
[0099] S502: When the position change is greater than or equal to a second preset threshold, it is determined that a second preset condition is satisfied; and the second preset threshold is greater than the first preset threshold.
[0100] The second preset threshold can be set according to actual needs. For example, the second preset threshold is the sum of the first preset threshold and the size of the first interaction window.
[0101] In an embodiment of the present application, when a user drags the first interactive window to move, and the position of the first exchange window satisfies a first preset condition, screen switching of the screen content begins. The user continues to drag the first interactive window to move, and when the first interactive window completely moves off the first screen, it is determined that a second preset condition is met, and screen switching of the screen content stops.
[0102] S503: When the position change is less than the second preset threshold, it is determined that the second preset condition is not satisfied.
[0103] In the embodiment of the present application, when the first interactive window has not been completely moved out of the first screen, it is determined that the second preset condition is not met, and the screen content continues to be switched.
[0104] In the embodiment of the present application, by obtaining the position change of the first interactive window and comparing the position change with the second preset threshold, it can automatically determine whether to stop switching the screen content.
[0105] In one embodiment, the step of displaying the second interactive interface on the second screen in step S50 includes step S51, which is specifically as follows:
[0106] S51: Acquire application data of a target application, send the application data to a second screen, so that the second screen creates a second interactive interface, renders the application data to the second interactive interface, and displays the second interactive interface.
[0107] In an embodiment of the present application, the surfaceflinger service is used to obtain application data of the target application, and the application data is sent to the screen management service of the second screen. After receiving the application data, the screen management service creates a second interactive interface and renders the application data to the second interactive interface to display the second interactive interface.
[0108] The embodiment of the present application can display the target application on the second screen by displaying application data on the second interactive interface, ensuring that the target application is switched from the first screen to the second screen.
[0109] In one embodiment, step S51 includes steps S511 to S512, which are specifically as follows:
[0110] S511: Acquire an application stack of a target application running on the first screen.
[0111] Among them, the application stack (Activitystack) is a stack mechanism used to manage the application interaction interface (Activity) in the Android system. It follows the first-in-last-out principle, and the Android system always displays the Activity at the top of the stack.
[0112] In an embodiment of the present application, the application stack of the target application is obtained through the surfaceflinger service.
[0113] S512: Move the application stack to the top of the stack corresponding to the application running on the second screen, so that the second screen creates a second interactive interface, obtains application data of the target application from the application stack, renders the application data to the second interactive interface, and displays the second interactive interface.
[0114] In an embodiment of the present application, the mobile stack service is called through the surfaceflinger service to move the application stack to the screen management class (displaycontent) of the second screen. The screen management class moves the application stack to the top of the stack corresponding to the application running on the second screen, so that the second interactive interface created on the second screen through the surfaceflinger service can be displayed at the top of the second screen.
[0115] In the embodiment of the present application, the application stack of the target application is moved from the first screen to the second screen, thereby enabling the target application to be displayed on the second screen.
[0116] The following are embodiments of the apparatus of the present application, which can be used to perform the contents of the method of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the contents of the method of the embodiments of the present application.
[0117] See Figure 2, which shows a schematic structural diagram of the screen switching device provided in an embodiment of the present application. The screen switching device 6 provided in an embodiment of the present application includes:
[0118] A first interactive interface display module 61 is configured to display a first interactive interface of a target application on a first screen; the first interactive interface displays screen content;
[0119] A first interactive window display module 62 is configured to display a first interactive window on the first screen in response to a screen switching operation; the first interactive window is located on the first interactive interface, and the screen content displayed in the first interactive window is consistent with the screen content displayed on the first interactive interface;
[0120] a position acquisition module 63, configured to acquire a position of the first interactive window on the first screen in response to a move operation on the first interactive window;
[0121] The window moving module 64 is configured to display the second interactive window on the second screen when the position satisfies the first preset condition, and gradually move the screen content from the first interactive window to the second interactive window according to the position;
[0122] The second interactive interface display module 65 is used to remove the first interactive window, the second interactive window and the first interactive interface when the position meets the second preset condition, and display the second interactive interface on the second screen; the second interactive interface displays the screen content.
[0123] Applying the embodiment of the present application, by displaying the first interactive interface of the target application on the first screen; the first interactive interface displays screen content; in response to the screen switching operation, displaying the first interactive window on the first screen; the first interactive window is located on the first interactive interface, and the screen content displayed by the first interactive window is consistent with the screen content displayed by the first interactive interface; in response to the move operation of the first interactive window, obtaining the position of the first interactive window on the first screen; when the position meets the first preset condition, displaying the second interactive window on the second screen, and gradually moving the screen content from the first interactive window to the second interactive window according to the position; when the position meets the second preset condition, removing the first interactive window, the second interactive window and the first interactive interface, and displaying the second interactive interface on the second screen; the second interactive interface displays screen content. The present application realizes the gradual movement of the screen content on the first interactive interface from the first screen to the second screen through the first interactive window on the first screen and the second interactive window on the second screen. Compared with the existing technology, there is no need to create a virtual screen, thereby reducing memory resource consumption.
[0124] The following are embodiments of the device of the present application, which can be used to perform the content of the method in the embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the content of the method in the embodiment of the present application.
[0125] See also Figure 3 The present application also provides an electronic device 300, which can be specifically a computer, a mobile phone, a tablet computer, a screen switching device, etc. In an exemplary embodiment of the present application, the electronic device 300 is a screen switching device, which can include: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, a user interface 304 and at least one communication bus 305.
[0126] The user interface 304 is mainly used to provide an input interface for the user and obtain data input by the user. Optionally, the user interface can also include a standard wired interface or a wireless interface.
[0127] The network interface 303 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0128] The communication bus 305 is used to realize the connection and communication between these components.
[0129] The processor 301 may include one or more processing cores. The processor utilizes various interfaces and circuits to connect various components within the electronic device. It executes instructions, programs, code sets, or instruction sets stored in memory, and accesses data stored in memory to perform various functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display layer; and the modem handles wireless communications. It is understood that the modem may also be implemented as a separate chip, rather than integrated into the processor.
[0130] Among them, the memory 302 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory may also be optionally at least one storage device located away from the aforementioned processor. As Figure 3 As shown, the memory as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application program.
[0131] The processor can be used to call the screen switching method application stored in the memory and specifically execute the method steps of the above-mentioned embodiment. The specific execution process can be referred to the specific description shown in the embodiment, which will not be repeated here.
[0132] This application also provides a computer-readable storage medium having a computer program stored thereon, with instructions suitable for being loaded by a processor and executing the method steps of the above-described embodiments. The specific execution process can be referred to the specific description of the embodiments and is not described in detail here. The device where the storage medium is located can be a personal computer, laptop computer, smartphone, tablet computer, or other electronic device.
[0133] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separated, and the parts shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0134] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function selected in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.
[0137] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0138] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0139] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape storage, magnetic disk storage, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0140] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0141] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A screen switching method, characterized in that: The steps include: Displaying a first interactive interface of a target application on a first screen; wherein the first interactive interface displays screen content; In response to the screen switching operation, displaying a first interactive window on the first screen; The first interactive window is located on the first interactive interface, and the screen content of the first interactive interface is rendered to the first interactive window, and the screen content displayed in the first interactive window is consistent with the screen content displayed in the first interactive interface; wherein the first interactive window covers the first interactive interface, and the size of the first interactive window is the same as the size of the first interactive interface; In response to a move operation on the first interactive window, acquiring a position of the first interactive window on the first screen; When the position satisfies a first preset condition, displaying a second interactive window on the second screen, and gradually moving the screen content from the first interactive window to the second interactive window according to the position; When the position meets the second preset condition, the first interactive window, the second interactive window and the first interactive interface are removed, the application stack of the target application running on the first interactive interface on the first screen is obtained, the application stack is moved to the top of the stack corresponding to the application running on the second screen, so that the second screen creates a second interactive interface, and the application data of the target application is obtained from the top of the stack, the application data is rendered to the second interactive interface, the second interactive interface is displayed, and the screen content is displayed through the second interactive interface.
2. The screen switching method according to claim 1, wherein: Before the step of displaying the second interactive window on the second screen when the position satisfies the first preset condition and gradually moving the screen content from the first interactive window to the second interactive window according to the position, the method includes: determining, according to the position, an amount of position change of the first interactive window during the movement; When the position change is greater than or equal to a first preset threshold, determining that the first preset condition is met; When the position change is smaller than a first preset threshold, it is determined that the first preset condition is not satisfied.
3. The screen switching method according to claim 1, wherein: Before the step of displaying the second interactive window on the second screen when the position satisfies the first preset condition and gradually moving the screen content from the first interactive window to the second interactive window according to the position, the method includes: When the position coincides with a preset screen edge of the first screen, determining that the first preset condition is satisfied; When the position does not coincide with a preset screen edge of the first screen, it is determined that the first preset condition is not satisfied.
4. The screen switching method according to claim 1, wherein: The step of displaying a second interactive window on the second screen when the position meets a first preset condition, and gradually moving the screen content from the first interactive window to the second interactive window according to the position, includes: According to the position, the size of the first interactive window and the size of the second interactive window are adjusted so that the screen content displayed by the adjusted second interactive window and the screen content displayed by the adjusted first interactive window constitute the screen content of the first interactive window before adjustment.
5. The screen switching method according to claim 4, characterized in that: The step of adjusting the size of the first interactive window and the size of the second interactive window according to the position so that the screen content displayed by the adjusted second interactive window and the screen content displayed by the adjusted first interactive window constitute the screen content of the first interactive window before adjustment, includes: determining a moving direction of the first interactive window; When the first interactive window moves on the first screen according to the moving direction, the size of the first interactive window is reduced according to the position; when the second interactive window moves on the second screen according to the moving direction, the size of the second interactive window is expanded according to the position, so that the sum of the size of the reduced first interactive window and the size of the expanded second interactive window is the size of the first interactive window before being reduced.
6. The screen switching method according to claim 5, characterized in that: The step of reducing the size of the first interactive window according to the position includes: determining, according to the position, an amount of position change of the first interactive window during the movement; Obtaining a first zoom ratio corresponding to the first interactive window according to a preset first mapping relationship between the position change amount and the zoom ratio; reducing the size of the first interactive window according to the first scaling ratio; The step of expanding the size of the second interactive window according to the position includes: Obtaining a second zoom ratio corresponding to the second interactive window according to a preset second mapping relationship between the position change amount and the zoom ratio; The second interactive window is enlarged according to the second scaling ratio.
7. The screen switching method according to claim 2, wherein: When the position satisfies a second preset condition, before removing the first interactive window, the second interactive window, and the first interactive interface and displaying the second interactive interface on the second screen, the method includes: Obtaining a position change of the first interactive window during the movement process; When the position change is greater than or equal to a second preset threshold, it is determined that the second preset condition is met; and the second preset threshold is greater than the first preset threshold; When the position change is less than a second preset threshold, it is determined that the second preset condition is not satisfied.
8. A screen switching device, characterized in that: include: A first interactive interface display module, configured to display a first interactive interface of a target application on a first screen; The first interactive interface displays screen content; A first interactive window display module, configured to display a first interactive window on the first screen in response to a screen switching operation; The first interactive window is located on the first interactive interface, and the screen content of the first interactive interface is rendered to the first interactive window, and the screen content displayed in the first interactive window is consistent with the screen content displayed in the first interactive interface; wherein the first interactive window covers the first interactive interface, and the size of the first interactive window is the same as the size of the first interactive interface; a position acquisition module, configured to acquire a position of the first interactive window on the first screen in response to a move operation on the first interactive window; a window moving module, configured to display a second interactive window on the second screen when the position satisfies a first preset condition, and gradually move the screen content from the first interactive window to the second interactive window according to the position; A second interactive interface display module is used to remove the first interactive window, the second interactive window and the first interactive interface when the position meets a second preset condition, obtain the application stack of the target application running on the first interactive interface on the first screen, move the application stack to the top of the stack corresponding to the application running on the second screen, so that the second screen creates a second interactive interface, obtain the application data of the target application from the top of the stack, render the application data to the second interactive interface, display the second interactive interface, and display the screen content through the second interactive interface.
9. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the screen switching method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the screen switching method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for traversing multiple screens of intelligent cockpit application program and electronic equipment
CN112540716A
Interaction method among multiple screens of in-vehicle infotainment device, electronic equipment and vehicle
CN116560558A
Multi-screen interaction method and device, equipment and storage medium
CN118012368A