Interface switching method and device, electronic equipment and storage medium

By displaying the first interactive interface in the device and responding to the interface switching request, generating and applying the second interactive interface, the problems of cumbersome interface switching operations and poor user experience in the prior art are solved, and the continuity and fluency of interface switching are achieved.

CN120215761APending Publication Date: 2025-06-27DUOYI NETWORK CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510297130.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, horizontal and vertical screen switching of the device interface requires the user to completely close the current interface before opening it again. The operation is cumbersome and may lead to user operations or data loss, affecting the smoothness of interface interaction and user experience.

Method used

By displaying the first interactive interface and responding to the interface switching request, the interface operation data and the corresponding second interactive interface layout data are determined, the second interactive interface is generated, the first interactive interface is updated to the second interactive interface, and the interface operation data is applied.

Benefits of technology

This realizes interface switching without first closing the interface and then reopening it, ensuring the continuity and fluency of interface switching and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215761A_ABST
    Figure CN120215761A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an interface switching method and device, electronic equipment and a storage medium. The method comprises the steps that a first interactive interface is displayed, the first interactive interface is displayed on a terminal screen in a first display mode, and the first interactive interface is obtained based on first interactive interface layout data corresponding to the first display mode; in response to an interface switching request for switching the first interactive interface from the first display mode to a second display mode, determining interface operation data of the first interactive interface and second interactive interface layout data corresponding to the second display mode; and generating the second interaction interface based on the second interaction interface layout data, updating the first interaction interface to the second interaction interface, and applying the interface operation data to the second interaction interface, so that smooth switching between a horizontal screen and a vertical screen can be realized under the condition of not influencing the interface interaction operation, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of computer processing, and in particular, to an interface switching method, device, electronic device, and storage medium. Background Art

[0002] In the related art, to implement the horizontal and vertical screen switching of the device interface, usually the user needs to first completely close the current interface and then reopen it to match the new screen orientation, and the operation is cumbersome. In addition, the horizontal and vertical screen switching of the interface may cause the loss of the user's current operations or data, or require the user to spend extra time to reposition to the previous operation state, thus affecting the fluency of the interface interaction and the user experience. Therefore, there is an urgent need to provide a more convenient interface switching method that can ensure the continuity of operations during interface switching. Summary of the Invention

[0003] The present invention provides an interface switching method, device, electronic device, and storage medium to solve the technical problem that the related art needs to switch the horizontal and vertical interfaces by first closing and then reopening the interface, resulting in cumbersome interface switching operations and poor user experience.

[0004] According to one aspect of the present invention, an interface switching method is provided, and the method includes:

[0005] Display a first interaction interface, where the first interaction interface is displayed on the terminal screen in a first display mode, the first display mode is one of a landscape mode or a portrait mode, and the first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode;

[0006] In response to an interface switching request for switching the first interaction interface from the first display mode to a second display mode, determine the interface running data of the first interaction interface and second interaction interface layout data corresponding to the second display mode, where the second display mode is the other one of the landscape mode and the portrait mode that is different from the first display mode;

[0007] Generate a second interaction interface based on the second interaction interface layout data, update the first interaction interface to the second interaction interface, and apply the interface running data to the second interaction interface.

[0008] Optionally, the first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode and interface reference layout data; generating the second interaction interface based on the second interaction interface layout data includes: generating the second interaction interface based on the second interaction interface layout data and the interface reference layout data.

[0009] Optionally, generating the second interaction interface based on the second interaction interface layout data and the interface reference layout data includes: using the reflection mechanism to generate the second interaction interface according to the interface reference layout data and the second interaction interface layout data.

[0010] Optionally, the first interaction interface layout data and the second interaction interface layout data are predefined in the same target interface layout file.

[0011] Optionally, the storage structure of the interface layout data in the target interface layout file is a dictionary storage structure.

[0012] Optionally, determining the interface switching request in the following manner includes: generating an interface switching request when it is detected that the terminal displaying the first interaction interface rotates to a preset direction.

[0013] Optionally, the first interaction interface includes an interface switching control. Determining the interface switching request in the following manner includes: generating an interface switching request when a control trigger operation acting on the interface switching control is received.

[0014] According to another aspect of the present invention, there is provided an interface switching device. The device includes:

[0015] An interface display module, configured to display a first interaction interface, wherein the first interaction interface is displayed on the terminal screen in a first display mode, and the first display mode is one of a landscape mode or a portrait mode, and the first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode;

[0016] A switching request module, configured to, in response to an interface switching request for switching the first interaction interface from the first display mode to a second display mode, determine the interface operation data of the first interaction interface and second interaction interface layout data corresponding to the second display mode, wherein the second display mode is the other one of the landscape mode and the portrait mode different from the first display mode;

[0017] An interface switching module, configured to generate a second interaction interface based on the second interaction interface layout data, update the first interaction interface to the second interaction interface, and apply the interface operation data to the second interaction interface. According to another aspect of the present invention, there is provided an electronic device, and the electronic device includes:

[0018] One or more processors;

[0019] A storage device, configured to store one or more programs,

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the interface switching method according to any one of the embodiments of the present disclosure.

[0021] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the interface switching method according to any one of the present invention when executed.

[0022] The technical solution of the embodiment of the present invention displays a first interaction interface, wherein the first interaction interface is displayed on the terminal screen in a first display mode, and the first display mode is one of a landscape screen mode or a portrait screen mode. The first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode. In response to an interface switching request for switching the first interaction interface from the first display mode to a second display mode, the interface running data of the first interaction interface and second interaction interface layout data corresponding to the second display mode are determined, where the second display mode is the other one of the landscape screen mode and the portrait screen mode different from the first display mode. A second interaction interface is generated based on the second interaction interface layout data, the first interaction interface is updated to the second interaction interface, and the interface running data is applied to the second interaction interface. The technical solution of the embodiment of the present invention solves the technical problem that in the related art, it is necessary to first close the interface and then reopen the interface to perform the landscape and portrait interface switching, which is cumbersome in interface switching operations and has a poor user experience. It realizes that there is no need to first close the interface and then reopen the interface to perform the landscape and portrait interface switching, so that the user can smoothly switch between the landscape screen and the portrait screen without affecting the interface interaction operation, greatly improving the user experience.

[0023] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0025] Figure 1 It is a schematic flowchart of an interface switching method provided by an embodiment of the present invention;

[0026] Figure 2Schematic diagram of interface switching applicable to the interface switching method provided by the embodiment of the present invention;

[0027] Figure 3 Schematic diagram of interface switching applicable to the interface switching method provided by the embodiment of the present invention;

[0028] Figure 4 Flow schematic diagram of an interface switching method provided by the embodiment of the present invention;

[0029] Figure 5 Structural schematic diagram of an interface switching device provided by the embodiment of the present invention;

[0030] Figure 6 Structural schematic diagram of an electronic device provided by the embodiment of the present invention. Detailed implementation manners

[0031] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0033] It can be understood that the data involved in the technical solution of the present invention (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant laws, regulations and related provisions.

[0034] Figure 1 Flow schematic diagram of an interface switching method provided by the embodiment of the present invention. This embodiment is applicable to the situation of switching interfaces. This method can be executed by an interface switching device, which can be implemented in the form of hardware and / or software, and the interface switching device can be configured in an electronic device such as a computer or a server. AsFigure 1 As shown in Figure 1 , the method of this embodiment includes:

[0035] S110. Display a first interaction interface, where the first interaction interface is displayed on the terminal screen in a first display mode, and the first display mode is one of a landscape screen mode or a portrait screen mode, and the first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode.

[0036] Among them, the first interaction interface can be understood as an interaction interface displayed on the terminal screen in the first display mode. Optionally, the first interaction interface can be a game interface in a running state. The first display mode can be one of a landscape screen mode or a portrait screen mode. That is to say, the first interaction interface can be an interface displayed on the terminal screen in the landscape screen mode, or can be an interface displayed on the terminal screen in the portrait screen mode. In the embodiments of the present invention, the first interaction interface can be obtained based on first interaction interface layout data corresponding to the first display mode. In the embodiments of the present invention, the first interaction interface layout data can be understood as interface layout data defined in advance for the first display mode and used for laying out the first interaction interface.

[0037] In the embodiments of the present invention, the first interaction interface layout data may include the interface width and interface height of the first interaction interface, the element positions, element sizes, and element styles of each interface element in the first interaction interface, and so on. Optionally, the interface elements may include at least one of controls, text boxes, navigation controls, image elements, text elements, and icon elements, etc. It should be noted that the number of interface elements in the first interaction interface may be one, two, or more than two, and specific limitations are not made here. In the embodiments of the present invention, the terminal for displaying the first interaction interface may include at least one of a smart phone, a tablet computer, and a game terminal, etc.

[0038] In the embodiments of the present invention, when the terminal screen is in the first display mode, in response to an interface display operation, the first interaction interface layout data corresponding to the first display mode can be determined based on the correspondence between the screen display mode and the interface layout data, that is, the first interaction interface layout data is determined. Furthermore, a first interaction interface can be generated according to the first interaction interface layout data. Furthermore, the first interaction interface can be displayed on the terminal screen. Exemplarily, the interface display operation can be an identification trigger operation (for example, a click operation) on the target application program identification on the terminal.

[0039] S120. In response to an interface switching request for switching the first interaction interface from the first display mode to the second display mode, determine the interface operation data of the first interaction interface and the second interaction interface layout data corresponding to the second display mode, where the second display mode is the other one of the landscape mode and the portrait mode that is different from the first display mode.

[0040] Among them, the second display mode can be the other one of the landscape mode and the portrait mode that is different from the first display mode. Exemplarily, when the first display mode is the landscape mode, the second display mode can be the portrait mode. Similarly, when the first display mode is the portrait mode, the second display mode can be the landscape mode. The interface switching request can be understood as a request for the interface that switches the first interaction interface from the first display mode to the second display mode. In the embodiments of the present invention, the interface operation data can be understood as the data generated or involved when the first interaction interface is in an operating state (that is, the user is interacting with it or information is being displayed through it). For the sake of easy understanding, taking the first interaction interface as a game interface in the landscape mode as an example, the interface operation data of the first interaction interface can be the game operation data of the game interface in the landscape mode, such as player behavior data, player data, etc.

[0041] In the embodiments of the present invention, determining the interface operation data of the first interaction interface includes: in response to an interface interaction operation of the first interaction interface, obtaining the interface operation data of the first interaction interface based on the interface interaction operation. Exemplarily, the first interaction interface includes a target control. When a control trigger operation acting on the target control is received, the control response event of the target control can be determined. Furthermore, the control response event can be executed, so as to obtain the event execution result of the control response event, that is, obtain the interface operation data of the first interaction interface. In the embodiments of the present invention, the second interaction interface layout data can be understood as the interface layout data defined in advance for the second display mode and used to generate the second interaction interface. Exemplarily, the second interaction interface layout data can include the interface width and interface height of the second interaction interface, the element positions, element sizes, and element styles of each interface element located in the second interaction interface, and so on. In the embodiments of the present invention, the second interaction interface can be understood as an interaction interface that displays the first interaction interface switched from the first display mode to the second display mode on the terminal screen.

[0042] In the embodiments of the present invention, there are two ways to determine the interface switching request. As an alternative embodiment of the present invention, determining the interface switching request may include: generating an interface switching request when it is detected that the terminal displaying the first interactive interface rotates to a preset direction. In the embodiments of the present invention, the terminal displaying the first interactive interface is rotated to the preset direction so that the first interactive interface is displayed in a first display mode on the terminal screen. In the embodiments of the present invention, the interface display information of the terminal screen is adjusted by rotating the terminal displaying the first interactive interface to the preset direction, making the interface switching operation simple, convenient and flexible.

[0043] As another alternative embodiment of the present invention, the first interactive interface includes an interface switching control. Determining the interface switching request may include: generating an interface switching request when a control trigger operation acting on the interface switching control is received. Among them, the interface switching control can be understood as a control preset on the first interactive interface for switching the first interactive interface from the first display mode to the second display mode. In the embodiments of the present invention, the display mode of the interface switching control on the first interactive interface may include hidden display, floating display or fixed-position display. The control style of the interface switching control can be set according to actual needs, and specific limitations are not made here. In the embodiments of the present invention, the interface is switched through the control trigger operation of the interface switching control, which is convenient for intuitively controlling the interface switching according to requirements.

[0044] In the embodiments of the present invention, there are multiple ways to determine the second interactive interface layout data corresponding to the second display mode. As an alternative embodiment of the present invention, when the second interactive interface layout data corresponding to the second display mode is not predefined, determining the second interactive interface layout data corresponding to the second display mode includes: obtaining the second interactive interface layout data corresponding to the second display mode based on AI interface generation technology.

[0045] As another alternative embodiment of the present invention, when the second interactive interface layout data corresponding to the second display mode is predefined, determining the second interactive interface layout data corresponding to the second display mode includes: determining the second interactive interface layout data corresponding to the second display mode based on the second interactive interface layout data predefined for the second display mode.

[0046] As an alternative implementation in the embodiments of the present invention, the second interactive interface layout data corresponding to the second display mode is determined, and based on a predefined method for generating vertical and horizontal screen difference attributes, the interface layout data in the second display mode, that is, the second interactive interface layout data, is determined. Among them, the method for generating vertical and horizontal screen difference attributes can be understood as a method for obtaining the interface layout difference data between the first display mode and the second display mode. Briefly, the method for obtaining vertical and horizontal screen difference attributes can be used to obtain the second interactive interface layout data in the second display mode.

[0047] In the embodiments of the present invention, the first interactive interface layout data and the second interactive interface layout data are predefined in the same target interface layout file. Among them, the target interface layout file can be understood as an interface layout file created in advance for storing the first interactive interface layout data and the second interactive interface layout data. The determination of the second interactive interface layout data corresponding to the second display mode may include: determining the interface layout data corresponding to the second display mode from the target interface layout file, that is, determining the second layout data corresponding to the second display mode.

[0048] In the embodiments of the present invention, the storage structure of the interface layout data in the target interface layout file is a dictionary storage structure. The advantage of such processing is that it can be more convenient and quickly determine the second interactive interface layout data corresponding to the second display mode from the target interface layout file, thereby improving the efficiency of interface switching. In addition, the dictionary storage structure enables developers to adjust in real time according to requirements, so as to meet the constantly changing business needs.

[0049] S130. Generate a second interactive interface based on the second interactive interface layout data, update the first interactive interface to the second interactive interface, and apply the interface operation data to the second interactive interface.

[0050] Specifically, in the case of determining the second interactive interface layout data and the interface operation data of the first interactive interface, a second interactive interface can be generated according to the second interactive interface layout data. In the case of generating the second interactive interface, the first interactive interface displayed on the terminal screen can be updated to the second interactive interface, and the interface operation data can be applied to the second interactive interface, thereby solving the problem that the related technology needs to switch the interface by first closing the interface and then reopening the interface. Continuing with the above example, the second interactive interface is to switch the game interface in the landscape mode to the game interface in the portrait mode.

[0051] In the embodiments of the present invention, after generating the second interactive interface, it may further include: automatically performing processes such as centering the interface again and adapting to the notch screen of the interface to improve the interface effect of the second interactive interface.

[0052] Exemplarily, as Figure 2 shown, the first interaction interface is an interface displayed in a landscape mode on the terminal screen. The interface layout data predefined for the landscape mode may include the coordinate position of the close button, the button style of the confirmation button, etc. The interface layout data predefined for the portrait mode may include the coordinate position of the close button, the button style of the OK button, etc. In the case of receiving an interface switching request to switch the first interaction interface from the landscape mode to the portrait mode, the second interaction interface may be generated according to the interface layout data predefined for the portrait mode, and the first interaction interface displayed on the terminal screen may be updated to the second interaction interface. Further, as Figure 3 shown, in the case where the interface displayed on the terminal screen is the second interaction interface, the first interaction interface can be displayed by rotating the terminal, or the interface operation data of the first interaction interface can be applied to the second interaction interface by receiving an interactive operation for interface switching.

[0053] The technical solution of the embodiment of the present invention displays a first interaction interface, where the first interaction interface is displayed in a first display mode on the terminal screen, the first display mode is one of a landscape mode or a portrait mode, and the first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode. In response to an interface switching request to switch the first interaction interface from the first display mode to a second display mode, the interface operation data of the first interaction interface and the second interaction interface layout data corresponding to the second display mode are determined, where the second display mode is the other one of the landscape mode and the portrait mode different from the first display mode. A second interaction interface is generated based on the second interaction interface layout data, the first interaction interface is updated to the second interaction interface, and the interface operation data is applied to the second interaction interface. The technical solution of the embodiment of the present invention solves the technical problem in the related art that it is necessary to close the interface first and then reopen the interface to perform the horizontal and vertical interface switching, which has the problems of cumbersome interface switching operations and poor user experience. It realizes that there is no need to close the interface first and then reopen the interface to perform the horizontal and vertical interface switching, so that the user can smoothly switch between the landscape and portrait modes without affecting the interface operation, greatly improving the user experience.

[0054] Figure 4The flowchart of an interface switching method provided by an embodiment of the present invention. Optionally, on the basis of the foregoing embodiment, the first interactive interface is obtained based on first interactive interface layout data corresponding to the first display mode and interface reference layout data; generating the second interactive interface based on the second interactive interface layout data includes: generating the second interactive interface based on the second interactive interface layout data and the interface reference layout data. Technical features that are the same as or similar to those in the above embodiments will not be described herein again. As Figure 4 shown, the method of this embodiment specifically includes:

[0055] S210. Display a first interactive interface, where the first interactive interface is displayed on the terminal screen in a first display mode, and the first display mode is one of a landscape screen mode or a portrait screen mode, and the first interactive interface is obtained based on first interactive interface layout data corresponding to the first display mode and interface reference layout data.

[0056] Among them, the interface reference layout data can be interface layout data common to the first display mode and the second display mode. For example, text color, text content, resource path, text font size, etc. In the embodiment of the present invention, separately defining the interface reference layout data can improve the reuse of interface layout code, facilitate subsequent code maintenance, and improve the interface development efficiency. In the embodiment of the present invention, the target interface layout file pre-defined with the first interactive interface layout data and the second interactive interface layout data further includes the interface reference layout data.

[0057] S220. In response to an interface switching request for switching the first interactive interface from the first display mode to a second display mode, determine the interface running data of the first interactive interface and second interactive interface layout data corresponding to the second display mode, where the second display mode is the other one of the landscape screen mode and the portrait screen mode different from the first display mode.

[0058] In the embodiment of the present invention, determining the interface running data of the first interactive interface includes: when the target interface layout file includes the first interactive interface layout data, the second interactive interface layout data, and the interface reference layout data, the second interactive interface layout data can be determined from the target interface layout file. In the target interface layout file, the first display mode corresponds to the first interactive interface layout data, and the second display mode corresponds to the second interactive interface layout data.

[0059] S230. Generate a second interactive interface based on the second interactive interface layout data and the interface reference layout data, update the first interactive interface to the second interactive interface, and apply the interface running data to the second interactive interface.

[0060] Specifically, after determining the second interactive interface layout data, a second interactive interface can be generated based on the second layout data and the interface reference layout data. After the second interactive interface is generated, the terminal screen displaying the first interactive interface can be switched from the first interactive interface to the second interactive interface. Furthermore, the interface operation data of the first interactive interface can be applied to the second interactive interface.

[0061] In an embodiment of the present invention, generating the second interactive interface based on the second interactive interface layout data and the interface reference layout data includes: a reflection mechanism can be adopted to generate the second interactive interface according to the interface reference layout data and the second interactive interface layout data. In an embodiment of the present invention, the method of using the reflection mechanism to apply the obtained second interactive interface layout data to generate the second interactive interface may include: during the process of performing interactive operations through the first interactive interface, the second display mode can be sent to the input parameter of the interface generation method corresponding to the interface generation interface through the interface generation interface. After the parameter transfer is completed, the second interactive interface layout data corresponding to the second display mode can be obtained from the target interface layout file through the interface generation method. Furthermore, a second interactive interface can be generated based on the second layout data and the interface reference layout data.

[0062] In an embodiment of the present invention, sending the second display mode to the input parameter of the interface generation method corresponding to the interface generation interface through the interface generation interface can specifically be: using the second display mode as the actual parameter and passing it to the formal parameter of the interface generation method corresponding to the interface generation interface through the interface generation interface.

[0063] It can be understood that in an embodiment of the present invention, displaying the first interactive interface can specifically be: using the first interactive interface layout data corresponding to the first display mode as the actual parameter and passing it to the formal parameter of the interface generation method. After the parameter transfer is completed, the interface generation method can be executed to generate the first interactive interface and display the first interactive interface. It should be noted that the interface generation method for generating the first interactive interface and the interface generation method for generating the second interactive interface are the same interface generation method and correspond to the same interface generation interface. Such a setting facilitates the use of the reflection mechanism for interface switching.

[0064] The technical solution of the embodiment of the present invention realizes the improvement of the reusability of the interface layout code by separately defining the public interface layout data of the first display mode and the second display mode through generating the second interactive interface based on the second interactive interface layout data, the interface operation data, and the interface reference layout data.

[0065] Figure 5The figure is a schematic structural diagram of an interface switching device provided by an embodiment of the present invention. As Figure 5 shown, the device includes: an interface display module 310, a switching request module 320, and an interface switching module 330.

[0066] Among them, the interface display module 310 is used to display a first interaction interface, where the first interaction interface is displayed on the terminal screen in a first display mode, and the first display mode is one of a landscape screen mode or a portrait screen mode. The first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode. The switching request module 320 is used to respond to an interface switching request for switching the first interaction interface from the first display mode to a second display mode, and determine the interface operation data of the first interaction interface and the second interaction interface layout data corresponding to the second display mode, where the second display mode is the other one different from the first display mode among the landscape screen mode and the portrait screen mode. The interface switching module 330 is used to generate a second interaction interface based on the second interaction interface layout data, update the first interaction interface to the second interaction interface, and apply the interface operation data to the second interaction interface.

[0067] The technical solution of the embodiment of the present invention is as follows: The interface display module 310 displays a first interaction interface, where the first interaction interface is displayed on the terminal screen in a first display mode, and the first display mode is one of a landscape screen mode or a portrait screen mode. The first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode. The switching request module 320 responds to an interface switching request for switching the first interaction interface from the first display mode to a second display mode, and determines the interface operation data of the first interaction interface and the second interaction interface layout data corresponding to the second display mode, where the second display mode is the other one different from the first display mode among the landscape screen mode and the portrait screen mode. The interface switching module 330 generates a second interaction interface based on the second interaction interface layout data, updates the first interaction interface to the second interaction interface, and applies the interface operation data to the second interaction interface. The technical solution of the embodiment of the present invention solves the technical problem that in the related art, it is necessary to close the interface first and then reopen the interface to perform horizontal and vertical interface switching, which is cumbersome in interface switching operations and has a poor user experience. It realizes that there is no need to close the interface first and then reopen the interface to perform horizontal and vertical interface switching, so that the user can smoothly switch between the landscape screen and the portrait screen without affecting the interface operation, greatly improving the user experience.

[0068] Optionally, the first interaction interface is obtained based on first interaction interface layout data corresponding to the first display mode and interface reference layout data; an interface switching module 330 is configured to generate a second interaction interface based on the second interaction interface layout data and the interface reference layout data.

[0069] Optionally, the interface switching module 330 is configured to use a reflection mechanism to generate a second interaction interface according to the interface reference layout data and the second interaction interface layout data.

[0070] Optionally, the first interaction interface layout data and the second interaction interface layout data are predefined in the same target interface layout file.

[0071] Optionally, the storage structure of the interface layout data in the target interface layout file is a dictionary storage structure.

[0072] Optionally, the switching request module 320 includes a first request determination unit; wherein, the first request determination unit is configured to generate an interface switching request when it is detected that the terminal displaying the first interaction interface rotates to a preset direction.

[0073] Optionally, the first interaction interface includes an interface switching control, and the switching request module 320 includes a second request determination unit; wherein, the second request determination unit is configured to generate an interface switching request when a control trigger operation acting on the interface switching control is received.

[0074] The interface switching device provided by an embodiment of the present invention can execute the interface switching method provided by any embodiment of the present invention, and has corresponding function modules and beneficial effects for executing the method.

[0075] It should be noted that the various units and modules included in the above interface switching device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for facilitating mutual distinction and do not limit the protection scope of the embodiments of the present invention.

[0076] Figure 6The structural schematic diagram of an electronic device 10 that can be used to implement the embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0077] As Figure 6 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0078] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0079] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the interface switching method.

[0080] In some embodiments, the interface switching method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the interface switching method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the interface switching method by any other suitable means (e.g., by means of firmware).

[0081] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0082] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0083] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0084] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0085] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0086] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0087] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0088] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An interface switching method, characterized in that: include: Displaying a first interactive interface, wherein the first interactive interface is displayed on the terminal screen in a first display mode, the first display mode being one of a horizontal screen mode and a vertical screen mode, and the first interactive interface is obtained based on first interactive interface layout data corresponding to the first display mode; In response to an interface switching request to switch the first interactive interface from the first display mode to the second display mode, determining interface operation data of the first interactive interface and second interactive interface layout data corresponding to the second display mode, wherein the second display mode is another one of a landscape mode and a portrait mode that is different from the first display mode; A second interactive interface is generated based on the second interactive interface layout data, the first interactive interface is updated to the second interactive interface, and the interface operation data is applied to the second interactive interface.

2. The method according to claim 1, characterized in that The first interactive interface is obtained based on first interactive interface layout data corresponding to the first display mode and interface reference layout data; The generating the second interactive interface based on the second interactive interface layout data includes: A second interactive interface is generated based on the second interactive interface layout data and the interface reference layout data.

3. The method according to claim 2, characterized in that The generating the second interactive interface based on the second interactive interface layout data and the interface reference layout data includes: A reflection mechanism is adopted to generate a second interactive interface according to the interface reference layout data and the second interactive interface layout data.

4. The method according to claim 1, characterized in that: The first interactive interface layout data and the second interactive interface layout data are predefined in the same target interface layout file.

5. The method according to claim 4, characterized in that The storage structure of the interface layout data in the target interface layout file is a dictionary storage structure.

6. The method according to claim 1, characterized in that The interface switching request is determined in the following manner, including: When it is detected that the terminal displaying the first interactive interface is rotated to a preset direction, an interface switching request is generated.

7. The method according to claim 1, characterized in that The first interactive interface includes an interface switching control, and the interface switching request is determined in the following manner, including: When a control triggering operation acting on the interface switching control is received, an interface switching request is generated.

8. An interface switching device, characterized in that: include: An interface display module, configured to display a first interactive interface, wherein the first interactive interface is displayed on a terminal screen in a first display mode, the first display mode being one of a horizontal screen mode and a vertical screen mode, and the first interactive interface is obtained based on first interactive interface layout data corresponding to the first display mode; a switching request module, configured to determine, in response to an interface switching request for switching the first interactive interface from the first display mode to the second display mode, interface operation data of the first interactive interface and second interactive interface layout data corresponding to the second display mode, wherein the second display mode is another one of a horizontal screen mode and a vertical screen mode that is different from the first display mode; An interface switching module is used to generate a second interactive interface based on the second interactive interface layout data, update the first interactive interface to the second interactive interface, and apply the interface operation data to the second interactive interface.

9. An electronic device, characterized in that: It is characterized in that The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the interface switching method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the interface switching method according to any one of claims 1 to 7 when executed.