Screen display method, device, computer equipment and storage medium
By obtaining the data recovery screen from the target terminal, the problem of data acquisition when the terminal is reconnected after being disconnected is solved, the pressure on the target server is reduced, and the efficiency and integrity of screen recovery are achieved.
Patent Information
- Application Number
- CN202110637827.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-08
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-06-08
AI Technical Summary
When a computer terminal disconnects from the network and then reconnects, it needs to reacquire the data before the network connection was disconnected to restore the screen. It is difficult to efficiently implement this process with existing technology, resulting in increased pressure on the target server.
By obtaining the first data from the target terminal connected to the target server, and realizing picture recovery based on the data, instead of the target server storing the data, the pressure on the target server is reduced.
It realizes the rapid recovery of the terminal picture, reduces the storage and processing pressure of the target server, avoids the delay of the real-time picture, and ensures the integrity and continuity of the display.
Smart Images

Figure CN113268214B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a screen display method, device, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, multiple terminals can interact with each other. During the interaction process, if a terminal loses the network connection and then reconnects, it is necessary to re-acquire the data before the network connection is disconnected to restore the screen. How the terminal obtains the data before the network connection is disconnected to restore the screen before the network connection is disconnected has become an urgent problem to be solved. Summary of the invention
[0003] The embodiment of the present application provides a screen display method, apparatus, computer equipment and storage medium, which obtains first data from a target terminal connected to a target server, realizes screen restoration based on the obtained first data, and the target server does not need to store data when restoring the screen, thereby reducing the pressure on the target server. The technical solution is as follows:
[0004] In one aspect, a screen display method is provided, the method comprising:
[0005] In response to the first terminal failing to obtain the screen data sent by the target server, sending a data acquisition request to a target terminal connected to the target server;
[0006] receiving first data sent by the target terminal, where the first data is sent by the target terminal in response to the data acquisition request, and the first data is screen data corresponding to a screen displayed by the target terminal;
[0007] In response to the first data, a screen corresponding to the first data is displayed.
[0008] In a possible implementation, the first data includes line data, and in response to the first data, displaying a screen corresponding to the first data includes:
[0009] In response to the line data, a drawing line indicated by the line data is displayed.
[0010] In a possible implementation, the line data includes a plurality of continuous position point data, the drawing line includes a plurality of position points, and in response to the line data, displaying the drawing line indicated by the line data includes:
[0011] In response to the plurality of position point data, the position points corresponding to the plurality of position point data are displayed in sequence, and the drawing line is formed by the displayed plurality of position points.
[0012] In a possible implementation, the first data includes a plurality of line data and corresponding drawing times, and in response to the line data, displaying the drawing line indicated by the line data includes:
[0013] The drawing lines indicated by the plurality of line data are displayed in sequence according to the order of the drawing times corresponding to the plurality of line data from early to late.
[0014] In a possible implementation, the first data further includes operation data corresponding to the line data, and after displaying the drawing line indicated by the line data in response to the line data, the method further includes:
[0015] In response to the operation data, an operation corresponding to the operation data is performed on the line data.
[0016] In a possible implementation, the operation data includes at least one of undo data or clear data corresponding to the line data, and after displaying the drawing line indicated by the line data in response to the line data, the method further includes:
[0017] In response to the undo data, canceling the display of the drawing line; or,
[0018] In response to the clearing data, all current drawing lines are cancelled.
[0019] In a possible implementation, the operation data further includes rollback data corresponding to the undo data, and after canceling the display of the drawing line in response to the undo data, the method further includes:
[0020] In response to the scrollback data, the drawing line is restored to be displayed.
[0021] In a possible implementation, in response to the first data, displaying a screen corresponding to the first data includes:
[0022] In response to the first data, the picture is displayed in a drawing board area.
[0023] In a possible implementation, the screen data includes at least any one of video screen data or game screen data, and in response to the first data, displaying a screen corresponding to the first data includes:
[0024] In response to the video picture data, displaying the video picture corresponding to the video picture data; or,
[0025] In response to the game screen data, a game screen corresponding to the game screen data is displayed.
[0026] In a possible implementation, in response to the first terminal failing to obtain the screen data sent by the target server, before sending a data acquisition request to a target terminal connected to the target server, the method further includes:
[0027] In response to the first terminal failing to obtain the screen data sent by the target server, sending online detection requests to multiple second terminals connected to the target server respectively, and each second terminal is used to return status information in response to the online detection request;
[0028] The target terminal is selected from the plurality of second terminals according to the received plurality of status information.
[0029] In a possible implementation, in response to the first terminal failing to obtain the screen data sent by the target server, sending online detection requests to multiple second terminals connected to the target server respectively includes:
[0030] In response to the first terminal failing to obtain the screen data sent by the target server, obtaining a first interaction set to which a first user identifier logged in by the first terminal belongs, the first interaction set including user identifiers logged in by multiple terminals connected to the target server and interacting;
[0031] Acquire multiple user identifiers other than the first user identifier in the first interaction set;
[0032] The online detection request is sent to the second terminals corresponding to the multiple user identifiers respectively.
[0033] In a possible implementation, in response to the first terminal not acquiring the screen data sent by the target server, before acquiring the first interaction set to which the first user identifier logged in by the first terminal belongs, the method further includes:
[0034] In response to the first terminal being connected to the target server, acquiring an interaction set identifier assigned by the target server;
[0035] adding the first user identifier to the first interaction set corresponding to the interaction set identifier, and sending the first user identifier and the interaction set identifier to the target server, the target server being configured to add the first user identifier to the second interaction set corresponding to the interaction set identifier, and sending other user identifiers included in the second interaction set to the first terminal, the other user identifiers being user identifiers logged in by the terminal to which the interaction set identifier has been assigned;
[0036] The received other user identification is added to the first interaction set.
[0037] In a possible implementation manner, the state information includes a network type to which the network state belongs, and selecting the target terminal from the multiple second terminals according to the received multiple state information includes:
[0038] According to the priorities of the network types to which the received multiple network states belong, a second terminal corresponding to the network type with the highest priority is selected as the target terminal.
[0039] In one possible implementation, the method further includes:
[0040] In response to the first terminal being able to obtain the screen data sent by the target server, receiving second data sent by any terminal, the any terminal being a terminal connected to the target server, and the second data being the screen data currently generated by the any terminal;
[0041] The step of displaying a screen corresponding to the first data in response to the first data includes:
[0042] In response to the first data and the second data, a picture corresponding to the first data and a picture corresponding to the second data are displayed simultaneously.
[0043] In a possible implementation, the first data further includes a target image corresponding to the last frame of a picture displayed by the target terminal, and the displaying the picture corresponding to the first data in response to the first data includes:
[0044] In response to the first data, a picture corresponding to the first data is displayed while the target image is displayed.
[0045] In another aspect, a screen display device is provided, the device comprising:
[0046] an acquisition request sending module, configured to send a data acquisition request to a target terminal connected to the target server in response to the first terminal failing to acquire the picture data sent by the target server;
[0047] a first data receiving module, configured to receive first data sent by the target terminal, wherein the first data is sent by the target terminal in response to the data acquisition request, and the first data is screen data corresponding to a screen displayed by the target terminal;
[0048] The screen display module is used to display a screen corresponding to the first data in response to the first data.
[0049] In a possible implementation, the first data includes line data, and the picture display module is used to display the drawing line indicated by the line data in response to the line data.
[0050] In one possible implementation, the line data includes a plurality of continuous position point data, the drawing line includes a plurality of position points, and the screen display module is used to respond to the plurality of position point data, sequentially display the position points corresponding to the plurality of position point data, and the drawing line is composed of the displayed plurality of position points.
[0051] In a possible implementation, the first data includes a plurality of line data and corresponding drawing times, and the screen display module is used to display the drawing lines indicated by the plurality of line data in sequence according to the drawing times corresponding to the plurality of line data from early to late.
[0052] In a possible implementation, the first data also includes operation data corresponding to the line data, and the screen display module is further configured to execute the operation corresponding to the operation data on the line data in response to the operation data.
[0053] In a possible implementation, the operation data includes at least one of undo data or clear data corresponding to the line data, and the screen display module is further configured to:
[0054] In response to the undo data, canceling the display of the drawing line; or,
[0055] In response to the clearing data, all current drawing lines are cancelled.
[0056] In a possible implementation, the operation data further includes rollback data corresponding to the undo data, and the screen display module is further configured to restore display of the drawing line in response to the rollback data.
[0057] In a possible implementation, the picture display module is used to display the picture in a drawing board area in response to the first data.
[0058] In a possible implementation, the picture data includes at least any one of video picture data or game picture data, and the picture display module is used to:
[0059] In response to the video picture data, displaying the video picture corresponding to the video picture data; or,
[0060] In response to the game screen data, a game screen corresponding to the game screen data is displayed.
[0061] In a possible implementation, the device further includes:
[0062] a detection request sending module, configured to send online detection requests to a plurality of second terminals connected to the target server respectively in response to the first terminal failing to obtain the screen data sent by the target server, wherein each second terminal is configured to return status information in response to the online detection request;
[0063] The terminal selection module is used to select the target terminal from the multiple second terminals according to the received multiple status information.
[0064] In a possible implementation, the detection request sending module is used to:
[0065] In response to the first terminal failing to obtain the screen data sent by the target server, obtaining a first interaction set to which a first user identifier logged in by the first terminal belongs, the first interaction set including user identifiers logged in by multiple terminals connected to the target server and interacting;
[0066] Acquire multiple user identifiers other than the first user identifier in the first interaction set;
[0067] The online detection request is sent to the second terminals corresponding to the multiple user identifiers respectively.
[0068] In a possible implementation, the device further includes:
[0069] an interaction set acquisition module, configured to acquire an interaction set identifier assigned by the target server in response to the first terminal being connected to the target server;
[0070] The interaction set acquisition module is further configured to add the first user identifier to the first interaction set corresponding to the interaction set identifier, and send the first user identifier and the interaction set identifier to the target server, the target server is configured to add the first user identifier to the second interaction set corresponding to the interaction set identifier, and send other user identifiers included in the second interaction set to the first terminal, the other user identifiers being user identifiers logged in by the terminal to which the interaction set identifier has been assigned;
[0071] The interaction set acquisition module is further configured to add the received other user identifiers to the first interaction set.
[0072] In a possible implementation, the status information includes the network type to which the network status belongs, and the terminal selection module is used to select the second terminal corresponding to the network type with the highest priority as the target terminal according to the priorities of the network types to which the multiple received network statuses belong.
[0073] In a possible implementation, the device further includes:
[0074] A second data receiving module is used for receiving second data sent by any terminal in response to the first terminal being able to obtain the picture data sent by the target server, wherein the any terminal is a terminal connected to the target server, and the second data is the picture data currently generated by the any terminal;
[0075] The picture display module is further used to respond to the first data and the second data and simultaneously display a picture corresponding to the first data and a picture corresponding to the second data.
[0076] In a possible implementation, the first data also includes a target image corresponding to the last frame of a picture displayed by the target terminal, and the picture display module is further used to respond to the first data and display the picture corresponding to the first data while displaying the target image.
[0077] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the screen display method described in the above aspects.
[0078] On the other hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the operations performed in the screen display method described in the above aspects.
[0079] On the other hand, a computer program product or a computer program is provided, wherein the computer program product or the computer program comprises a computer program code, wherein the computer program code is stored in a computer-readable storage medium, and wherein the computer program code is loaded and executed by a processor to implement the operations performed in the screen display method as described in the above aspects.
[0080] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0081] The method, apparatus, computer device and storage medium provided by the embodiments of the present application enable the first terminal to obtain the first data from the target terminal connected to the target server when the first terminal fails to obtain the screen data sent by the target server, and display the corresponding screen based on the first data, thereby realizing the screen recovery of the first terminal. In addition, since the first data used when restoring the screen is obtained from the target terminal instead of being stored by the target server, the target server does not need to store data, which reduces the pressure on the target server. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0083] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0084] Figure 2 is a flow chart of a screen display method provided by an embodiment of the present application;
[0085] Figure 3 is a flow chart of another screen display method provided by an embodiment of the present application;
[0086] Figure 4 is a schematic diagram of a screen display process provided by an embodiment of the present application;
[0087] Figure 5 is a schematic diagram of another screen display process provided by an embodiment of the present application;
[0088] Figure 6 is a structural schematic diagram of a picture display device provided in an embodiment of the present application;
[0089] Figure 7 is a structural schematic diagram of another image display device provided in an embodiment of the present application;
[0090] Figure 8 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0091] Fig. 9 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0092] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0093] It is understood that the terms "first", "second", etc. used in this application can be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of this application, a first terminal can be referred to as a second terminal, and a second terminal can be referred to as a first terminal.
[0094] The terms "at least one", "multiple", "each", "any" and the like used in this application include one, two or more than two, multiple include two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple. For example, multiple terminals include three terminals, and each terminal refers to each of the three terminals, and any refers to any one of the three terminals, which may be the first terminal, the second terminal, or the third terminal.
[0095] In order to facilitate understanding of the screen display method provided in the embodiment of the present application, the drawing principle is explained:
[0096] Drawing is performed based on drawing instructions, which include line drawing instructions, point drawing instructions, undo instructions, rollback instructions, and clear instructions. Among them, the line drawing instruction is used to indicate that a line is connected by multiple consecutive points; the point drawing instruction is used to indicate drawing a point; the undo instruction is used to indicate the undo of the instruction executed in the last step; the rollback instruction is used to indicate the restoration of the undo instruction executed in the last step; and the clear instruction is used to indicate the clearing of the currently displayed drawing line.
[0097] Any terminal draws based on the above-mentioned drawing instructions, generates data, and sends the generated data to other terminals, and other terminals display corresponding pictures based on the received data. Different drawing instructions will generate different data. For example, a line drawing instruction will generate corresponding line data. When collecting line data, points are taken at a reference frame rate interval, and each point obtained is used as a drawing point data. After that, multiple drawing point data are combined together to obtain line drawing data; a drawing point instruction will generate corresponding drawing point data; an undo instruction will generate corresponding undo data; a rollback instruction will generate corresponding undo data; and a clear instruction will generate corresponding clear data.
[0098] For example, terminal A draws a line based on a line drawing instruction, generates corresponding line drawing data, and sends the line drawing data to terminal B. Terminal B displays a corresponding line based on the line drawing data.
[0099] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 , the implementation environment includes multiple terminals 101 ( Figure 1 The terminal 101 and the target server 102 are connected via a wireless or wired network.
[0100] The target application provided by the target server 102 is installed on the terminal 101, and the terminal 101 can realize functions such as data transmission, message interaction, and screen display through the target application. Optionally, the terminal 101 is a computer, a mobile phone, a tablet computer, or other terminals. Optionally, the target application is a target application in the operating system of the terminal 101, or a target application provided by a third party. For example, the target application is a game application, and the game application has the function of painting sharing. Optionally, the target server 102 is the background target server of the target application or a cloud target server that provides services such as cloud computing and cloud storage.
[0101] Multiple terminals 101 are used to log in to the target application based on user identification. Any terminal sends data to the target server 102 through the target application. The target server 102 forwards the received data to other terminals. The other terminals respond to the received data and display the screen corresponding to the data. In the process of screen display, the target server 102 plays the role of forwarding data and does not store the data sent by the terminal.
[0102] The method provided in the embodiment of the present application can be applied in a gaming scenario.
[0103] For example, in a game scenario of "You Draw, I Guess", user A1, user B1 and user C1 log in to the target server based on their user identifications to play the game. User A1 is the user who is drawing, and user B1 and user C1 are users who are guessing the drawing. During the process of user A1 drawing based on terminal A2, terminal C2 corresponding to user C1 receives data sent by terminal A2 through the target server. Terminal B2 corresponding to user B does not receive the data sent by terminal A1 through the target server due to network disconnection. After terminal B2 reconnects, terminal B2 sends a data acquisition request to terminal C2, and terminal C2 sends the previously received data to terminal B2. Terminal B2 displays the picture corresponding to the data to achieve picture recovery.
[0104] Figure 2 1 is a flowchart of a screen display method provided by an embodiment of the present application. The execution subject of the embodiment of the present application is a first terminal. Figure 2 , the method comprises the following steps:
[0105] 201. In response to failing to obtain picture data sent by a target server, a first terminal sends a data acquisition request to a target terminal connected to the target server.
[0106] The target server can send screen data to any connected terminal. The screen data sent by the target server is sent by other terminals to the target server. The first terminal and the target terminal are both connected to the target server, and the first terminal and the target terminal interact through the target server. The data acquisition request is used to request to obtain the screen data corresponding to the screen displayed by the target terminal.
[0107] 202. The first terminal receives first data sent by the target terminal.
[0108] The first data is sent by the target terminal in response to the data acquisition request, and the first data is screen data corresponding to the screen displayed by the target terminal.
[0109] 203. The first terminal displays a screen corresponding to the first data in response to the first data.
[0110] The first terminal restores the picture corresponding to the first data according to the received first data, thereby realizing picture restoration in the first terminal.
[0111] In the method provided in the embodiment of the present application, when the first terminal fails to obtain the screen data sent by the target server, the first terminal obtains the first data from the target terminal connected to the target server, and displays the corresponding screen based on the first data, thereby realizing the screen recovery of the first terminal. In addition, since the first data used when restoring the screen is obtained from the target terminal instead of being stored by the target server, the target server does not need to store data, which reduces the pressure on the target server.
[0112] The following Figure 3 In the illustrated embodiment, the interactive subject is a first terminal and multiple second terminals as an example for explanation, wherein the first terminal is a terminal that needs to reacquire the first data for screen recovery, and the multiple second terminals are terminals that interact with the first terminal. Among them, multiple terminals interacting means that multiple terminals are connected to the same target server, and multiple terminals can send data to each other through the same target server. Among them, the multiple second terminals can be two, three, four or even more, and the embodiment of the present application does not limit the number of second terminals.
[0113] Figure 3 is a flow chart of a screen display method provided by an embodiment of the present application. The interactive subjects of the embodiment of the present application are a first terminal and multiple second terminals. Figure 3 , the method comprises the following steps:
[0114] 301. In response to failing to obtain picture data sent by a target server, a first terminal sends online detection requests to multiple second terminals connected to the target server respectively.
[0115] In an embodiment of the present application, when the first terminal fails to obtain the screen data sent by the target server, it is necessary to determine whether other terminals connected to the target server can send screen data to the first terminal through the target server, that is, to send online detection requests to multiple second terminals to determine whether multiple second terminals can send screen data to the first terminal through the target server.
[0116] In a possible implementation, the first terminal fails to obtain the screen data sent by the target server, including: the first terminal is in the first state, at which time the first terminal cannot receive the screen data sent by the target server; or the first terminal switches from the first state to the second state, at which time the first terminal has just switched to the second state and has not yet obtained the screen data sent by the target server. The first terminal being in the first state means a state in which it cannot interact with the target server, that is, the first terminal cannot receive the screen data sent by the target server, nor can it send the screen data to the target server, and the first terminal being in the second state means a state in which it can interact with the target server, that is, the first terminal can receive the screen data sent by the target server, and can also send the screen data to the target server.
[0117] In a possible implementation, the first state includes the following situations: a state where the network connection with the target server is disconnected; or a state where the data transmission rate with the target server is less than a reference rate; or a state where the data transmission rate with the target server is greater than the reference rate for a duration less than a reference duration. The reference rate is any rate, for example, 1Kb, 2Kb or other rates, and the reference duration is any duration, for example, 1 second, 2 seconds or other durations.
[0118] In a possible implementation, a first terminal is logged in with a first user identifier, the first terminal does not obtain screen data sent by a target server, and obtains a first interaction set to which the first user identifier belongs. The first interaction set is an interaction set stored in the first terminal, and the first interaction set includes user identifiers logged in by multiple terminals that are interacting, that is, the first interaction set includes the first user identifier logged in by the first terminal and user identifiers logged in by multiple second terminals. The first terminal obtains multiple user identifiers in the first interaction set except the first user identifier, and sends online detection requests to the second terminals corresponding to the multiple user identifiers respectively.
[0119] Regarding the way in which the first terminal obtains the first interaction set, in a possible implementation, the first terminal obtains the interaction set identifier assigned by the target server in response to connecting with the target server, that is, after the target server connects with the first terminal, it sends the interaction set identifier to the first terminal; then the first terminal adds the logged-in first user identifier to the first interaction set corresponding to the interaction set identifier, and sends the first user identifier and the interaction set identifier to the target server. After receiving the first user identifier and the interaction set identifier, the target server adds the first user identifier to the second interaction set corresponding to the interaction set identifier. In other words, the first terminal stores the first interaction set corresponding to the interaction set identifier, and the target server stores the second interaction set corresponding to the interaction set identifier. The user identifiers stored in the first interaction set and the second interaction set are the same, but the storage locations of the two interaction sets are different.
[0120] The target server assigns interaction set identifiers to other connected terminals. When the interaction set identifiers assigned to the other terminals are the same as the interaction set identifier assigned to the first terminal, the target server also stores the user identifiers logged in by the other terminals in the second interaction set, that is, the second interaction set also includes other user identifiers, which are the user identifiers logged in by the terminals to which the interaction set identifier has been assigned. The target server sends the other user identifier to the first terminal, and the first terminal adds the received other user identifier to the first interaction set.
[0121] In a possible implementation, different terminals interact with each other through a target server, that is, a first terminal sends an online detection request to a target server, and the online detection request carries a first user identifier and multiple second user identifiers, where the multiple second user identifiers are multiple user identifiers other than the first user identifier in the first interaction set. After receiving the online detection request, the target server sends the online detection request to the corresponding second terminal according to the multiple second user identifiers carried in the online detection request. The online detection request sent by the target server may carry only the first user identifier, or may carry the first user identifier and multiple second user identifiers.
[0122] In another possible implementation, the target server stores the second interaction set, and the first terminal sends an online detection request to the target server, and the online detection request carries the first user identifier and the interaction set identifier. After receiving the online detection request, the target server determines the second interaction set corresponding to the interaction set identifier according to the interaction set identifier carried in the online detection request, and then obtains multiple second user identifiers other than the first user identifier from the second interaction set, and sends online detection requests to the second terminals corresponding to the multiple second user identifiers respectively.
[0123] In a possible implementation, the first terminal is installed with a target application, the target server is used to provide services for the target application, the first terminal logs in to the target application based on the first user identifier, and interacts with the target server or other terminals through the target application.
[0124] 302. The plurality of second terminals respectively respond to the online detection request and return status information to the first terminal.
[0125] After receiving the online detection request, the multiple second terminals determine the current network status and send status information to the first terminal. The status information includes the network type to which the network status belongs, and the network type includes wifi (Wireless Fidelity), 5G, 4G, 3G and 2G.
[0126] In a possible implementation, each second terminal sends status information to the target server in response to the online detection request, and the target server forwards the received status information to the first terminal.
[0127] After receiving the online detection request, the second terminal automatically detects the current network status without the user having to perform any operation, and the user is unaware of this.
[0128] In addition, in one possible implementation, when the second terminal is in the first state, the status information returned by the second terminal to the first terminal in response to the online detection request does not include the network type to which the network status belongs, so that when the first terminal receives the status information, it determines that the second terminal is in the first state.
[0129] 303. The first terminal selects a target terminal from multiple second terminals according to the received multiple pieces of status information.
[0130] In the embodiment of the present application, the first terminal selects a target terminal from a plurality of second terminals, and obtains data corresponding to the screen to be restored through the target terminal.
[0131] In one possible implementation, the first terminal selects the second terminal corresponding to the network type with the highest priority as the target terminal according to the priority of the network types to which the multiple network states are received. Among them, the network types are ranked in order of priority: wifi, 5G, 4G, 3G and 2G. In the case where multiple second terminals correspond to the highest priority network types, the first terminal selects any one terminal from the multiple second terminals as the target terminal.
[0132] In another possible implementation, the first terminal sorts the multiple second terminals according to the priorities of the network types to which the multiple network states received belong, and displays the sorted multiple second terminals. The user performs a selection operation on any second terminal, and the first terminal responds to the selection operation and uses the second terminal selected by the user as the target terminal.
[0133] 304. The first terminal sends a data acquisition request to the target terminal.
[0134] In the embodiment of the present application, after the first terminal determines the target terminal, it sends a data acquisition request to the target terminal, and the data acquisition request is used to request the target terminal to send first data to the first terminal. The first data is the screen data corresponding to the currently displayed screen stored in the target terminal.
[0135] In a possible implementation, the data acquisition request carries a first user identifier, so that the target terminal determines to send the first data to the first terminal corresponding to the first user identifier according to the first user identifier. Alternatively, the data acquisition request also carries a switching time point, which refers to the time point when the first terminal switches from the first state to the second state, and the switching time point is used to instruct the target terminal to send the data before the switching time point to the first terminal.
[0136] In a possible implementation, the first terminal sends a data acquisition request to a target server, and the target server forwards the received data acquisition request to the target terminal.
[0137] 305. The target terminal sends the first data to the first terminal in response to the received data acquisition request.
[0138] In the embodiment of the present application, after receiving data for displaying a screen sent by other terminals, the target terminal will store the data, and after receiving a data acquisition request, will send the stored data to the first terminal.
[0139] In a possible implementation, in order to ensure that the amount of data transmitted each time is small and the continuity of the picture restoration is ensured on the basis of ensuring timeliness, the first terminal divides the first data into a plurality of line data, each of which includes a plurality of dot data, and then sends the plurality of line data to the second terminal in sequence. Each dot data includes the coordinates corresponding to a position point. For example, each line data includes 30 dot data, that is, 30 coordinate points.
[0140] In a possible implementation manner, the target terminal sends the first data to the target server, and the target server forwards the first data to the first terminal.
[0141] 306. In response to the received first data, the first terminal displays a screen corresponding to the first data.
[0142] The displayed picture is the picture restored by the first terminal.
[0143] In a possible implementation, the first terminal displays a picture in a drawing board area in response to the first data, wherein the drawing board area is any area displayed in the first terminal, and the drawing board area is used to display a picture corresponding to the received data.
[0144] In one possible implementation, the first data includes line data, and the first terminal displays the drawing line indicated by the line data in response to the line data. In the case where the line data includes a plurality of continuous position point data, the first terminal displays the position points corresponding to the plurality of position point data in sequence in response to the plurality of position point data, and the drawing line is composed of the displayed plurality of position points. The distance between the coordinates contained in the two adjacent position point data is less than a reference distance, which is an arbitrary value. Since the distance between the two adjacent position points is small enough, when the first terminal displays the plurality of position points, for the user, what the user sees is a drawing line composed of the displayed plurality of position points, rather than individual position points.
[0145] In a possible implementation, the first data includes a plurality of line data and corresponding drawing times, and the first terminal displays the drawing lines indicated by the plurality of line data in order from earliest to latest drawing times corresponding to the plurality of line data. The drawing time refers to the time when the line data is generated. For example, see Figure 4 As shown in the schematic diagram, a "house" is drawn in the drawing board area, and the first data includes line data corresponding to multiple lines in the "house". The first terminal displays the drawing lines in sequence according to the drawing time of the line data until the complete picture corresponding to the first data is displayed.
[0146] In a possible implementation, the first data includes operation data corresponding to the line data, and the first terminal performs an operation corresponding to the operation data on the line data in response to the operation data.
[0147] Wherein, in the case where the operation data includes undo data, the first terminal responds to the line data, displays the drawing line corresponding to the line data, and then responds to the undo data to cancel the display of the drawing line. For example, from the perspective of the drawing terminal, the drawing terminal responds to the received line drawing instruction to draw a line in the drawing board area. After the line is drawn, the drawing terminal responds to the received undo instruction to undo the line. For the process of undoing the drawing, the drawing terminal generates the corresponding line drawing data and the undo data corresponding to the line drawing data. The drawing terminal sends the line drawing data and the undo data to other interactive terminals, and the other terminals respond to the received data to display the corresponding screen.
[0148] In the case that the operation data also includes rollback data corresponding to the undo data, the first terminal resumes displaying the drawing line in response to the rollback data, that is, the rollback data can resume displaying the drawing line that was canceled by the undo data.
[0149] In the case where the operation data also includes clearing data, the first terminal cancels the display of the current drawing line in response to the clearing data, that is, the first terminal can clear the displayed picture in the drawing board area in response to the clearing data.
[0150] In a possible implementation, the first terminal displays the picture corresponding to the first data based on the reference frame rate, thereby ensuring the continuity of the picture display. The reference frame rate is any frame rate. For example, if the reference frame rate is 60fps, the first data displays 60 coordinate points per second.
[0151] In addition, in a possible implementation, the first terminal receives the second data sent by any terminal in response to switching from the first state to the second state. Wherein, any terminal is a terminal that is interacting with the first terminal, and the second data is the screen data generated by any terminal after the first terminal switches from the first state to the second state. The any terminal and the target terminal may be the same or different. That is, after the first terminal switches the state, in addition to obtaining the first data using the above-mentioned methods 301-305, the second data generated by any terminal that is currently drawing will also be obtained.
[0152] In response to the first data and the second data, the first terminal simultaneously displays a screen corresponding to the first data and a screen corresponding to the second data. Figure 5 In the illustrated drawing board area, the first terminal displays a screen corresponding to the first data (indicated by a solid line) according to the first data, and displays a screen corresponding to the second data (indicated by a dotted line) according to the second data.
[0153] Among them, any terminal that is drawing will always send data to other terminals that are interacting. For other terminals, if the other terminals are in the first state, the data reception fails and the screen corresponding to the data cannot be displayed. If the other terminals are in the second state, the data reception is successful and the screen corresponding to the data is displayed.
[0154] In the embodiment of the present application, the first terminal simultaneously receives the first data sent by the target terminal and the second data sent by any terminal, and can simultaneously display the screen corresponding to the first data and the screen corresponding to the second data. Therefore, for the first terminal, the screen corresponding to the second data can be displayed synchronously with other terminals, and while restoring the screen corresponding to the first data, it will not affect the display of the screen corresponding to the current second data.
[0155] In a possible implementation, when any terminal is the same as the target terminal, the target terminal sends the first data and the second data to the second terminal respectively.
[0156] In addition, in a possible implementation, the first data also includes a target image corresponding to the last frame of the screen displayed by the target terminal. In this case, the first terminal displays the screen corresponding to the first data while displaying the target image in response to the first data. Since the screen corresponding to the painting needs to be displayed gradually, that is, the display process takes a period of time, in order to enable the user corresponding to the first terminal to understand the current painting progress in time, the target image corresponding to the current last frame of the screen is first displayed, and then the screen corresponding to the painting is gradually displayed. Among them, the target image can be displayed in the drawing board area, and the corresponding screen can be displayed above the target image. Optionally, the lines displayed in the target image can be dotted lines so that the user can distinguish between the lines displayed in the target image and the lines in the screen; or the target image is displayed in the upper right corner, upper left corner or other areas that do not affect the display of the screen area. Optionally, the user can move the position of the target image so that the target image does not block the screen. Optionally, the user can choose whether to display the target image. For example, when the first terminal receives the target image, it displays a selection window "Whether to display the image". If the user selects "Yes", the target image is displayed. If the user selects "No", the target image is not displayed. Optionally, when the picture corresponding to the painting is displayed, the target image is canceled.
[0157] In addition, in a possible implementation, in the above process, any terminal interacts with the target server through a persistent connection. For example, the first terminal sends an online detection request to the target server through a persistent connection; the target server sends an online detection request to multiple second terminals through a persistent connection; the first terminal sends a data acquisition request to the target server through a persistent connection.
[0158] One thing that needs to be explained is that in the above embodiment, only the interaction between the first terminal and multiple second terminals and the transmission of data corresponding to the screen are taken as an example. In another embodiment, the first terminal and multiple second terminals can also send chat information or other data, and the embodiment of the present application does not limit this.
[0159] Another point that needs to be explained is that in the above embodiment, only the restoration of the picture corresponding to the painting is used as an example. In another embodiment, when the picture to be restored is a video picture or a game picture, the above steps 301-305 are performed. What is different from the above embodiment is that the first data sent by the target terminal includes at least one of the video picture data or the game picture data. Among them, the video picture data is the data corresponding to the target video picture currently played by the target terminal. After the first terminal receives the video picture data, it responds to the video picture data and displays the video picture corresponding to the video picture data, wherein the target video picture is a live video picture, a video picture when multiple terminals make a video call, or other video pictures; the game picture data can be the picture data corresponding to the painting in the above embodiment, or it can be the picture data corresponding to the game picture in other game scenes. After the first terminal receives the game picture data, it responds to the game picture data and displays the game picture corresponding to the game picture data.
[0160] For example, when the target video screen is a video screen when multiple terminals are making a video call, and the first terminal making the video call does not receive the video screen data sent by the target server, the above steps 301-305 are executed, and the first terminal receives the video screen data corresponding to the video screen currently displayed by the target terminal and displays the video screen corresponding to the video screen data. The video screen data includes not only the screen data corresponding to the video screen collected by the target terminal, but also the screen data sent by other second terminals received by the target terminal. Of course, after the first terminal receives the screen data sent by other second terminals through the target server, the target terminal only needs to continue to send the screen data corresponding to the video screen collected by the target terminal to the first terminal through the target server.
[0161] For example, the target video screen is a game video screen, and multiple terminals play online games in the same game scene through the target server. When the first terminal disconnects from the target server and exits the game, after reconnecting to the target server, the above steps 301-305 are executed, and the first terminal receives the game screen data corresponding to the game screen currently displayed by the target terminal and displays the game screen corresponding to the game screen data. For example, before the first terminal disconnects from the network, the virtual object controlled by the first terminal is displayed in the first game scene. During the process of the first terminal disconnecting from the network, the virtual object controlled by other second terminals is already in the second game scene. At this time, after the first terminal reconnects to the target server, the target terminal sends the game screen data corresponding to the second game scene to the first terminal, and the virtual object controlled by the first terminal is displayed in the second game scene.
[0162] In the method provided in the embodiment of the present application, when the first terminal fails to obtain the screen data sent by the target server, the first terminal obtains the first data from the target terminal connected to the target server, and displays the corresponding screen based on the first data, thereby realizing the screen recovery of the first terminal. In addition, since the first data used when restoring the screen is obtained from the target terminal instead of being stored by the target server, the target server does not need to store data, which reduces the pressure on the target server.
[0163] Furthermore, while restoring the picture corresponding to the first data, the first terminal displays the picture corresponding to the second data based on the second data currently generated by other terminals, thereby avoiding delays in real-time pictures and ensuring the integrity of the displayed pictures while ensuring picture restoration.
[0164] Moreover, for the target terminal, when sending the first data to the first terminal, the target terminal divides the first data into multiple parts and sends them separately, so that the amount of data transmitted each time is small. The first terminal displays the corresponding pictures in sequence according to the received data, thereby ensuring the integrity of the first data and the continuity of picture restoration.
[0165] Figure 6 is a structural diagram of a picture display device provided in an embodiment of the present application. Figure 6 , the device comprises:
[0166] The acquisition request sending module 601 is used to send a data acquisition request to a target terminal connected to the target server in response to the first terminal failing to acquire the picture data sent by the target server;
[0167] A first data receiving module 602 is used to receive first data sent by a target terminal, where the first data is sent by the target terminal in response to a data acquisition request, and the first data is screen data corresponding to a screen displayed by the target terminal;
[0168] The picture display module 603 is used to display a picture corresponding to the first data in response to the first data.
[0169] In the device provided by the embodiment of the present application, when the first terminal fails to obtain the screen data sent by the target server, the first terminal obtains the first data from the target terminal connected to the target server, and displays the corresponding screen based on the first data, thereby realizing the screen recovery of the first terminal. In addition, since the first data used when restoring the screen is obtained from the target terminal instead of being stored by the target server, the target server does not need to store data, which reduces the pressure on the target server.
[0170] In a possible implementation, the first data includes line data, and the screen display module 603 is configured to display the drawing line indicated by the line data in response to the line data.
[0171] In one possible implementation, the line data includes a plurality of continuous position point data, the drawing line includes a plurality of position points, and the screen display module 603 is used to respond to the plurality of position point data, sequentially display the position points corresponding to the plurality of position point data, and form a drawing line from the displayed plurality of position points.
[0172] In a possible implementation, the first data includes multiple line data and corresponding drawing times, and the screen display module 603 is used to display the drawing lines indicated by the multiple line data in sequence from early to late in the order of the drawing times corresponding to the multiple line data.
[0173] In a possible implementation, the first data also includes operation data corresponding to the line data, and the screen display module 603 is further configured to execute an operation corresponding to the operation data on the line data in response to the operation data.
[0174] In a possible implementation, the operation data includes at least one of undo data or clear data corresponding to the line data, and the screen display module 603 is further used to:
[0175] In response to the undo data, canceling the display of the drawing line; or,
[0176] In response to clearing the data, all current drawing lines are canceled from being displayed.
[0177] In a possible implementation, the operation data also includes rollback data corresponding to the undo data, and the screen display module 603 is further configured to restore the display of the drawing line in response to the rollback data.
[0178] In a possible implementation, the picture display module 603 is used to display the picture in the drawing board area in response to the first data.
[0179] In a possible implementation, the picture data includes at least one of video picture data or game picture data, and the picture display module 603 is used to:
[0180] In response to the video picture data, displaying the video picture corresponding to the video picture data; or,
[0181] In response to the game screen data, a game screen corresponding to the game screen data is displayed.
[0182] In one possible implementation, see Figure 7 , the device further comprises:
[0183] A detection request sending module 604 is used to send online detection requests to multiple second terminals connected to the target server in response to the first terminal failing to obtain the screen data sent by the target server, and each second terminal is used to return status information in response to the online detection request;
[0184] The terminal selection module 605 is used to select a target terminal from multiple second terminals according to the received multiple pieces of status information.
[0185] In one possible implementation, see Figure 7 , the detection request sending module 605 is used to:
[0186] In response to the first terminal failing to obtain the screen data sent by the target server, obtaining a first interaction set to which a first user identifier logged in by the first terminal belongs, the first interaction set including user identifiers logged in by multiple terminals connected to the target server and interacting;
[0187] Acquire multiple user identifiers other than the first user identifier in the first interaction set;
[0188] Online detection requests are sent to second terminals corresponding to the multiple user identifiers respectively.
[0189] In one possible implementation, see Figure 7 , the device further comprises:
[0190] An interaction set acquisition module 606, configured to acquire an interaction set identifier assigned by the target server in response to the first terminal being connected to the target server;
[0191] The interaction set acquisition module 606 is further used to add the first user identifier to the first interaction set corresponding to the interaction set identifier, and send the first user identifier and the interaction set identifier to the target server, and the target server is used to add the first user identifier to the second interaction set corresponding to the interaction set identifier, and send other user identifiers included in the second interaction set to the first terminal, where the other user identifiers are user identifiers logged in by the terminal to which the interaction set identifier has been assigned;
[0192] The interaction set acquisition module 606 is further configured to add the received other user identifiers to the first interaction set.
[0193] In one possible implementation, the status information includes the network type to which the network status belongs, see Figure 7 The terminal selection module 605 is used to select the second terminal corresponding to the network type with the highest priority as the target terminal according to the priorities of the network types to which the multiple network states received belong.
[0194] In one possible implementation, see Figure 7, the device further comprises:
[0195] The second data receiving module 607 is used to receive second data sent by any terminal in response to the first terminal being able to obtain the screen data sent by the target server, where any terminal is a terminal connected to the target server, and the second data is the screen data currently generated by any terminal;
[0196] The picture display module 603 is further used to respond to the first data and the second data and simultaneously display the picture corresponding to the first data and the picture corresponding to the second data.
[0197] In a possible implementation, the first data also includes a target image corresponding to the last frame of the image displayed by the target terminal, and the image display module 603 is further configured to respond to the first data and display the image corresponding to the first data while displaying the target image.
[0198] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0199] It should be noted that: the screen display device provided in the above embodiment only uses the division of the above functional modules as an example when displaying the screen. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the screen display device provided in the above embodiment and the screen display method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0200] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the screen display method of the above embodiment.
[0201] Optionally, the computer device is provided as a terminal. Figure 8 800 is a schematic diagram of the structure of a terminal 800 provided in an embodiment of the present application. The terminal 800 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 800 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0202] The terminal 800 includes a processor 801 and a memory 802 .
[0203] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0204] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one computer program, which is used to be executed by the processor 801 to implement the screen display method provided in the method embodiment of the present application.
[0205] In some embodiments, the terminal 800 may further optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808 and a power supply 809.
[0206] The peripheral device interface 803 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0207] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0208] The display screen 805 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 also has the ability to collect touch signals on the surface or above the surface of the display screen 805. The touch signal can be input to the processor 801 as a control signal for processing. At this time, the display screen 805 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 805 can be one, set on the front panel of the terminal 800; in other embodiments, the display screen 805 can be at least two, respectively set on different surfaces of the terminal 800 or in a folding design; in other embodiments, the display screen 805 can be a flexible display screen, set on the curved surface or folding surface of the terminal 800. Even, the display screen 805 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 805 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0209] The camera assembly 806 is used to capture images or videos. Optionally, the camera assembly 806 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0210] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 801 for processing, or input them into the radio frequency circuit 804 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 800. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0211] The positioning component 808 is used to locate the current geographical location of the terminal 800 to implement navigation or LBS (Location Based Service). The positioning component 808 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas positioning system, or the European Union's Galileo positioning system.
[0212] The power supply 809 is used to power various components in the terminal 800. The power supply 809 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 809 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0213] In some embodiments, the terminal 800 further includes one or more sensors 810 , including but not limited to: an acceleration sensor 811 , a gyroscope sensor 812 , a pressure sensor 813 , a fingerprint sensor 814 , an optical sensor 815 , and a proximity sensor 816 .
[0214] The acceleration sensor 811 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 800. For example, the acceleration sensor 811 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 can also be used to collect game or user motion data.
[0215] The gyroscope sensor 812 can detect the body direction and rotation angle of the terminal 800, and the gyroscope sensor 812 can cooperate with the acceleration sensor 811 to collect the user's 3D actions on the terminal 800. The processor 801 can implement the following functions based on the data collected by the gyroscope sensor 812: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0216] The pressure sensor 813 can be set on the side frame of the terminal 800 and / or the lower layer of the display screen 805. When the pressure sensor 813 is set on the side frame of the terminal 800, it can detect the user's holding signal of the terminal 800, and the processor 801 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is set on the lower layer of the display screen 805, the processor 801 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 805. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0217] The fingerprint sensor 814 is used to collect the user's fingerprint, and the processor 801 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 801 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 814 can be set on the front, back, or side of the terminal 800. When a physical button or a manufacturer logo is set on the terminal 800, the fingerprint sensor 814 can be integrated with the physical button or the manufacturer logo.
[0218] The optical sensor 815 is used to collect the ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is reduced. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 815.
[0219] The proximity sensor 816, also called a distance sensor, is disposed on the front panel of the terminal 800. The proximity sensor 816 is used to collect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from the screen-on state to the screen-off state; when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from the screen-off state to the screen-on state.
[0220] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the terminal 800, and the terminal 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0221] Optionally, the computer device is provided as a server. Fig. 9 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 901 and one or more memories 902, wherein the memory 902 stores at least one computer program, which is loaded and executed by the processor 901 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.
[0222] An embodiment of the present application further provides a computer device, which includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the screen display method of the above embodiment.
[0223] An embodiment of the present application further provides a computer-readable storage medium, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the operations performed in the screen display method of the above embodiment.
[0224] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer program code stored in a computer-readable storage medium. The computer program code is loaded and executed by a processor to implement the operations performed in the screen display method of the above embodiment.
[0225] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0226] The above are only optional embodiments of the embodiments of the present application and are not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A screen display method, It is characterized in that The method comprises: In response to the first terminal failing to obtain the screen data sent by the target server, sending online detection requests to multiple second terminals connected to the target server respectively, and each second terminal is used to return status information in response to the online detection request; Selecting a target terminal from the plurality of second terminals according to the received plurality of state information; Sending a data acquisition request to the target terminal connected to the target server; receiving first data sent by the target terminal, where the first data is sent by the target terminal in response to the data acquisition request, and the first data is screen data corresponding to a screen displayed by the target terminal; In response to the first data, a screen corresponding to the first data is displayed.
2. The method according to claim 1, It is characterized in that The first data includes line data, and in response to the first data, displaying a screen corresponding to the first data includes: In response to the line data, a drawing line indicated by the line data is displayed.
3. The method according to claim 2, It is characterized in that The line data includes a plurality of continuous position point data, the drawing line includes a plurality of position points, and in response to the line data, displaying the drawing line indicated by the line data includes: In response to the plurality of position point data, the position points corresponding to the plurality of position point data are displayed in sequence, and the drawing line is formed by the displayed plurality of position points.
4. The method according to claim 2, It is characterized in that The first data includes a plurality of line data and corresponding drawing time, and the step of displaying the drawing line indicated by the line data in response to the line data includes: The drawing lines indicated by the plurality of line data are displayed in sequence according to the order of the drawing times corresponding to the plurality of line data from early to late.
5. The method according to claim 2, It is characterized in that The first data also includes operation data corresponding to the line data. After the drawing line indicated by the line data is displayed in response to the line data, the method further includes: In response to the operation data, an operation corresponding to the operation data is performed on the line data.
6. The method according to claim 5, It is characterized in that The operation data includes at least one of undo data or clear data corresponding to the line data. After the drawing line indicated by the line data is displayed in response to the line data, the method further includes: In response to the undo data, canceling the display of the drawing line; or, In response to the clearing data, all current drawing lines are cancelled.
7. The method according to claim 6, It is characterized in that The operation data further includes rollback data corresponding to the undo data. After canceling the display of the drawing line in response to the undo data, the method further includes: In response to the scrollback data, the drawing line is restored to be displayed.
8. The method according to claim 1, It is characterized in that The step of displaying a screen corresponding to the first data in response to the first data includes: In response to the first data, the picture is displayed in a drawing board area.
9. The method according to claim 1, It is characterized in that The screen data at least includes any one of video screen data or game screen data, and in response to the first data, displaying a screen corresponding to the first data includes: In response to the video picture data, displaying the video picture corresponding to the video picture data; or, In response to the game screen data, a game screen corresponding to the game screen data is displayed.
10. The method according to claim 1, It is characterized in that In response to the first terminal failing to obtain the screen data sent by the target server, sending online detection requests to multiple second terminals connected to the target server respectively, including: In response to the first terminal failing to obtain the screen data sent by the target server, obtaining a first interaction set to which a first user identifier logged in by the first terminal belongs, the first interaction set including user identifiers logged in by multiple terminals connected to the target server and interacting; Acquire multiple user identifiers other than the first user identifier in the first interaction set; The online detection request is sent to the second terminals corresponding to the multiple user identifiers respectively.
11. The method according to claim 10, It is characterized in that In response to the first terminal not acquiring the screen data sent by the target server, before acquiring the first interaction set to which the first user identifier logged in by the first terminal belongs, the method further includes: In response to the first terminal being connected to the target server, acquiring an interaction set identifier assigned by the target server; adding the first user identifier to the first interaction set corresponding to the interaction set identifier, and sending the first user identifier and the interaction set identifier to the target server, the target server being configured to add the first user identifier to the second interaction set corresponding to the interaction set identifier, and sending other user identifiers included in the second interaction set to the first terminal, the other user identifiers being user identifiers logged in by the terminal to which the interaction set identifier has been assigned; The received other user identification is added to the first interaction set.
12. The method according to claim 1, It is characterized in that The state information includes a network type to which the network state belongs, and the selecting a target terminal from the plurality of second terminals according to the received plurality of state information includes: According to the priorities of the network types to which the received multiple network states belong, a second terminal corresponding to the network type with the highest priority is selected as the target terminal.
13. The method according to claim 1, It is characterized in that The method further comprises: In response to the first terminal being able to obtain the screen data sent by the target server, receiving second data sent by any terminal, the any terminal being a terminal connected to the target server, and the second data being the screen data currently generated by the any terminal; The step of displaying a screen corresponding to the first data in response to the first data includes: In response to the first data and the second data, a picture corresponding to the first data and a picture corresponding to the second data are displayed simultaneously.
14. The method according to claim 1, It is characterized in that The first data also includes a target image corresponding to the last frame of the picture displayed by the target terminal, and the displaying the picture corresponding to the first data in response to the first data includes: In response to the first data, a picture corresponding to the first data is displayed while the target image is displayed.
15. A screen display device, It is characterized in that The device comprises: A detection request sending module, configured to send online detection requests to a plurality of second terminals connected to the target server respectively in response to the first terminal failing to obtain the screen data sent by the target server, and each second terminal is configured to return status information in response to the online detection request; A terminal selection module, configured to select a target terminal from the plurality of second terminals according to the received plurality of status information; an acquisition request sending module, configured to send a data acquisition request to the target terminal connected to the target server in response to the first terminal failing to acquire the picture data sent by the target server; a first data receiving module, configured to receive first data sent by the target terminal, wherein the first data is sent by the target terminal in response to the data acquisition request, and the first data is screen data corresponding to a screen displayed by the target terminal; The screen display module is used to display a screen corresponding to the first data in response to the first data.
16. A computer device, It is characterized in that The computer device includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the screen display method according to any one of claims 1 to 14.
17. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the operations performed in the screen display method according to any one of claims 1 to 14.
