Game screen display method, storage medium and electronic device
By establishing a communication connection between the game client and the target virtual server and adjusting the target process number according to the viewing load, the problem of unstable load on the game client's viewing service is solved, and efficient game screen synchronization and display is achieved.
Patent Information
- Application Number
- CN202210122997.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-09
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-02-09
AI Technical Summary
The load of the game client's viewing service is unstable, resulting in low display efficiency of the game screen and poor adaptability, which makes it impossible to effectively deal with high load situations.
By establishing a communication connection between the first game client and the target virtual server, the target watching load is used to adjust the number of target processes in the target virtual server, thereby optimizing the synchronization and display of the game screen.
It realizes efficient synchronization and display of game screens, reduces the service coupling within the game client, and improves the load stability and user experience of the viewing service.
Smart Images

Figure CN114452642B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method for displaying a game screen, a storage medium, and an electronic device. Background Art
[0002] Game clients often provide users with a viewing service, and the viewing service can be understood as real-time recording of the game screen produced by the participating players throughout the game, and then directly forwarding it within the game client to the player client with viewing needs, and displaying the game screen in the player client.
[0003] However, since the coupling between the game client's spectator service and the game's internal logic service is generally high, the messages generated throughout the game must be forwarded through each logic service layer, which leads to the problem of unstable load of the spectator service. To address this problem, related technologies often reserve an upper limit on the number of service objects of the spectator service in advance, and when the load of the spectator service is too large, manual intervention is required to expand the capacity, which leads to the problem of low display efficiency of the game screen. Therefore, there is a problem of low adaptability of the display of the game screen.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method for displaying a game screen, a storage medium, and an electronic device to at least solve the technical problem of poor adaptability of the display of the game screen.
[0006] According to one aspect of an embodiment of the present application, a method for displaying a game screen is provided, comprising: in response to a target viewing request triggered on a first game client, obtaining a communication connection relationship between the first game client and a target virtual server, wherein the target viewing request is used to request that a game screen of a virtual game match in which a second game client participates be synchronously displayed in the first game client, and the target virtual server includes a group of target processes, and the target processes are processes deployed in the cloud; in the case of obtaining a target viewing load associated with the virtual game match, adjusting the number of processes of the target processes included in the target virtual server according to the target viewing load, wherein the target viewing load is the number of resources carried by the target process when the virtual game match is being watched; in the case of obtaining target live broadcast data of the virtual game match by using the adjusted target virtual server, sending the target live broadcast data to the first game client through the communication connection relationship, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is data of the game screen of the virtual game match to be synchronously displayed in the first game client.
[0007] According to another aspect of an embodiment of the present application, another method for displaying a game screen is provided, including: obtaining a target viewing request triggered on a first game client, wherein the target viewing request is used to request that a game screen of a virtual game match in which a second game client participates be synchronously displayed in the first game client; in response to the target viewing request, establishing a communication connection relationship between the first game client and a target virtual server, wherein the target virtual server includes a group of target processes, the target processes are processes deployed in the cloud, and the number of processes in the group of target processes is set to be adjusted according to a target viewing load associated with the virtual game match, the target viewing load is the number of resources carried by the target process when the virtual game match is being watched; receiving target live broadcast data of the virtual game match sent by the target virtual server through the communication connection relationship, wherein the target live broadcast data is data of the game screen of the virtual game match to be synchronously displayed in the first game client; and synchronously displaying the game screen of the virtual game match in the first game client.
[0008] According to another aspect of an embodiment of the present application, a device for displaying a game screen is further provided, comprising: a first acquisition unit, configured to obtain a communication connection relationship between the first game client and a target virtual server in response to a target viewing request triggered on a first game client, wherein the target viewing request is used to request that a game screen of a virtual game match in which a second game client participates be synchronously displayed in the first game client, and the target virtual server includes a group of target processes, and the target processes are processes deployed in the cloud; an adjustment unit, configured to adjust the number of processes of the target processes included in the target virtual server according to the target viewing load when a target viewing load associated with the virtual game match is obtained, wherein the target viewing load is the number of resources carried by the target process when the virtual game match is watched; a first display unit, configured to send the target live broadcast data to the first game client through the communication connection relationship when the target live broadcast data of the virtual game match is obtained by using the adjusted target virtual server, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is data of the game screen of the virtual game match to be synchronously displayed in the first game client.
[0009] As an optional scheme, the above-mentioned adjustment unit includes: an increase module, which is used to increase the process number of the above-mentioned target process contained in the above-mentioned target virtual server when the above-mentioned target spectator load is greater than or equal to the first load threshold; or, a decrease module, which is used to reduce the process number of the above-mentioned target process contained in the above-mentioned target virtual server when the above-mentioned target spectator load is less than or equal to the second load threshold.
[0010] As an optional scheme, the above-mentioned adjustment unit includes: a first adjustment module, which is used to adjust the process number of the above-mentioned target process contained in the above-mentioned target virtual server to the process number corresponding to the above-mentioned first load range when the above-mentioned target spectator load is within the first load range; or, a second adjustment module, which is used to adjust the process number of the above-mentioned target process contained in the above-mentioned target virtual server to the process number corresponding to the above-mentioned second load range when the above-mentioned target spectator load is within the second load range.
[0011] As an optional solution, it includes: a first sending unit, used to send a data pull request to a target message queue before sending the target live broadcast data to the first game client through the above-mentioned communication connection relationship, wherein the above-mentioned target message queue is used to cache the data of the game screen of the above-mentioned virtual game match, and the above-mentioned data pull request is used to request to pull the above-mentioned target live broadcast data cached in the above-mentioned target message queue; a first receiving unit, used to receive the above-mentioned target live broadcast data returned by the above-mentioned target message queue before sending the above-mentioned target live broadcast data to the above-mentioned first game client through the above-mentioned communication connection relationship.
[0012] As an optional solution, the above-mentioned first sending unit includes: a first sending module, used to send the above-mentioned data pull request to the above-mentioned target message queue, wherein the above-mentioned data pull request also carries the game identifier of the above-mentioned virtual game game and the screen timestamp of the game screen of the above-mentioned virtual game game; the above-mentioned first receiving unit includes: a receiving module, used to receive the live broadcast data returned by the above-mentioned target message queue and matching the above-mentioned and the above-mentioned screen timestamp.
[0013] According to another aspect of an embodiment of the present application, another device for displaying a game screen is provided, including: a second acquisition unit, used to acquire a target viewing request triggered on a first game client, wherein the target viewing request is used to request that the game screen of the virtual game game in which the second game client participates be synchronously displayed in the first game client; an establishment unit, used to respond to the target viewing request and establish a communication connection relationship between the first game client and the target virtual server, wherein the target virtual server includes a group of target processes, the target processes are processes deployed in the cloud, and the number of processes in the group of target processes is set to be adjusted according to the target viewing load associated with the virtual game game, and the target viewing load is the number of resources carried by the target process when the virtual game game is watched; a second receiving unit, used to receive the target live broadcast data of the virtual game game sent by the target virtual server through the communication connection relationship, wherein the target live broadcast data is data of the game screen of the virtual game game to be synchronously displayed in the first game client; a second display unit, used to synchronously display the game screen of the virtual game game in the first game client.
[0014] As an optional solution, it includes: a second sending unit, which is used to send the target spectating request triggered on the first game client to the spectating management process after the target spectating request is triggered on the first game client, wherein the spectating management process is used to query the game information of the virtual game game; a setting unit, which is used to set the first game client to a spectating state after the target spectating request is triggered on the first game client and when valid game information is returned by the spectating management process, wherein the valid game information is the game information of the virtual game game queried by the spectating management process, and the first game client in the spectating state is allowed to establish the communication connection relationship with the target virtual server.
[0015] As an optional solution, the above-mentioned establishment unit includes: an establishment module, which is used to establish the above-mentioned communication connection relationship between the above-mentioned first game client and the above-mentioned target virtual server according to the address information of the above-mentioned target virtual server contained in the above-mentioned game effective information.
[0016] As an optional solution, it includes: a third display unit, which is used to display the target viewing interface of the first game client before the target viewing request triggered on the first game client is obtained, wherein the target viewing interface displays a viewing mark corresponding to the game match in which at least one client participates, and the at least one client includes the second game client; the second acquisition unit includes: an acquisition module, which is used to obtain the target viewing request before the target viewing request triggered on the first game client, in the case of a selection operation triggered on the target viewing mark, wherein the viewing mark corresponding to the game match in which the at least one client participates includes the target viewing mark.
[0017] As an optional solution, the above-mentioned device also includes: a third acquisition unit, used to obtain a target running request triggered on the above-mentioned first game client, wherein the above-mentioned target running request is used to run a target virtual game on the above-mentioned first game client, and the game of the above-mentioned target virtual game includes the above-mentioned virtual game game; a fourth display unit, used to display a game running screen of the above-mentioned target virtual game in which the above-mentioned first game client participates.
[0018] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above game screen display method.
[0019] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for displaying a game screen through the computer program.
[0020] In an embodiment of the present application, through the communication connection relationship between the first game client and the target virtual server, the target spectator load is used as an adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game match in which the second game client participates in the first game client, thereby achieving the purpose of timely adjusting the number of processes of the target process for synchronously displaying the game screen, thereby achieving the technical effect of improving the display efficiency of the game screen, and further solving the technical problem of poor adaptability of the display of the game screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 is a schematic diagram of an application environment of an optional method for displaying a game screen according to an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of a process of an optional method for displaying a game screen according to an embodiment of the present application;
[0024] Figure 3 is a schematic diagram of an optional method for displaying a game screen according to an embodiment of the present application;
[0025] Figure 4 is a schematic diagram of another optional method for displaying a game screen according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of another optional method for displaying a game screen according to an embodiment of the present application;
[0027] Figure 6 is a schematic diagram of another optional method for displaying a game screen according to an embodiment of the present application;
[0028] Figure 7 is a schematic diagram of the process of another optional method for displaying a game screen according to an embodiment of the present application;
[0029] Figure 8 is a schematic diagram of another optional method for displaying a game screen according to an embodiment of the present application;
[0030] Fig. 9 is a schematic diagram of another optional method for displaying a game screen according to an embodiment of the present application;
[0031] Fig.10 is a schematic diagram of another optional method for displaying a game screen according to an embodiment of the present application;
[0032] Fig.11 is a schematic diagram of another optional method for displaying a game screen according to an embodiment of the present application;
[0033] Fig.12 is a schematic diagram of an optional display device for a game screen according to an embodiment of the present application;
[0034] Fig.13 is a schematic diagram of another optional game screen display device according to an embodiment of the present application;
[0035] Fig.14 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] First, to facilitate understanding of the embodiments of the present application, some of the terms or nouns involved in the present application are explained below:
[0039] Massively multiplayer online game (Multiplayer Online Game, MMOG for short).
[0040] Spectating: The act of watching others compete in high-level games from a third-party perspective during a gaming event.
[0041] Cloud native: A distributed cloud based on distributed deployment and unified operation and management, a set of cloud technology product systems built on technologies such as containers, microservices, and DevOps.
[0042] Gamesvr: Non-competitive game logic process.
[0043] GlobalGamesvr: A process that is identical to Gamesvr, where players compete in gaming events.
[0044] MiscProxysvr: The process that forwards spectator protocol messages to the message queue.
[0045] WatchSvr: Watch the game information management process.
[0046] WatchPod: spectator protocol message consumption and processing services.
[0047] MsgQueue: Message queue, used to transmit and save event-related messages.
[0048] PVP: Competitive confrontation between players in the game.
[0049] Ckafka: A cloud message queue compatible with open source Kafka.
[0050] CS: C stands for client and S stands for server, which is used to indicate the communication between client and server.
[0051] SS: S stands for Server, S stands for Server, and is used to indicate communication within the server.
[0052] Protocol: A collection of rules, standards, or conventions established for data exchange in a computer network.
[0053] Id: unique identifier.
[0054] Request: A network transmission protocol.
[0055] According to one aspect of an embodiment of the present application, a method for displaying a game screen is provided. Optionally, as an optional implementation, the method for displaying a game screen can be applied to, but is not limited to, Figure 1In the environment shown, it may include but is not limited to a user device 102, a network 110 and a server 112, wherein the user device 102 may include but is not limited to a display 108, a processor 106 and a memory 104.
[0056] The specific process can be as follows:
[0057] Step S102, the user device 102 obtains a target viewing request triggered on the first game client 1022, wherein the target viewing request is used to request that a game screen of a virtual game game in which the second game client (the client where the player C is located) participates be synchronously displayed on the first game client 1022;
[0058] Steps S104-S106, the user device 102 sends the target viewing request to the server 112 via the network 110;
[0059] Step S108, the server 112 searches the database 114 for the communication connection relationship corresponding to the target spectator request and the target spectator load associated with the virtual game match, and adjusts the number of target processes included in the target virtual server according to the target spectator load through the processing engine 116, and obtains the target live broadcast data of the virtual game match using the adjusted target virtual server, thereby generating the target live broadcast data;
[0060] Steps S110-S112, the server 112 sends the target live broadcast data to the user device 102 through the network 110, the processor 106 in the user device 102 displays the live game screen 1024 corresponding to the target live broadcast data on the display 108, and stores the target live broadcast data in the memory 104.
[0061] remove Figure 1 In addition to the examples shown, the above steps can be completed independently by the user device 102, that is, the user device 102 performs steps such as generating target live data, thereby reducing the processing pressure of the server. The user device 102 includes but is not limited to a handheld device (such as a mobile phone), a laptop computer, a desktop computer, a vehicle-mounted device, etc., and the present application does not limit the specific implementation of the user device 102.
[0062] Optionally, as an optional implementation, as Figure 2 As shown, the method for displaying the game screen includes:
[0063] S202, in response to a target spectator request triggered on the first game client, obtaining a communication connection relationship between the first game client and a target virtual server, wherein the target spectator request is used to request that a game screen of a virtual game game in which the second game client participates be synchronously displayed on the first game client, and the target virtual server includes a group of target processes, and the target process is a process deployed in the cloud;
[0064] S204, when a target spectator load associated with the virtual game match is obtained, adjusting the number of target processes included in the target virtual server according to the target spectator load, wherein the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0065] S206, when the target live broadcast data of the virtual game game is obtained by using the adjusted target virtual server, the target live broadcast data is sent to the first game client through the communication connection relationship to synchronously display the game screen of the virtual game game in the first game client, wherein the target live broadcast data is data of the game screen of the virtual game game to be synchronously displayed in the first game client.
[0066] Optionally, the above-mentioned method for displaying the game screen can be applied, but not limited to, in the scene of watching the competitive events of the virtual game. Given that the number of users who watch a game online at the same time in the virtual game may reach tens of thousands or even millions, and the amount of messages generated by recording a game is also huge, it is necessary to consider what kind of message forwarding mechanism to adopt to meet the business needs of high throughput. In this embodiment, when watching the game in the game client, the client first connects to the target virtual server, establishes a communication connection relationship between the two, and then uses the target virtual server to pull messages (such as target live broadcast data) from the message queue to provide corresponding viewing services for the game client watching the game; wherein, since the target virtual server is a service process deployed in the cloud, it can achieve the effect of completely decoupling from the logical business process of the current game client, and can realize automatic scaling dynamic adjustment according to the target viewing load of the current viewing service, so that the target virtual server is dynamically adjusted to a load-balanced state, thereby improving the efficiency of the game screen corresponding to the viewing service, and thereby ensuring the user experience of providing the corresponding viewing service for the viewing game client.
[0067] Optionally, there is an essential difference between the game client and the live broadcast client generally used to provide only the viewing service. For example, in addition to providing the viewing service of the virtual game, the game client can also provide, but is not limited to, the internal logic service of the virtual game, which leads to the situation that the virtual game viewing service and the internal logic service of the virtual game are easily coupled during the operation of the game client. In the process of providing the viewing service for the spectators, the live broadcast data generated by the viewing service must be forwarded by each logic server layer by layer, which results in the viewing service provided by the game client facing a limited number of participants, and the viewing objects are usually limited to the objects that have been eliminated in a single game;
[0068] In this embodiment, in order to overcome the problem of serious coupling between the services in the game client, through the communication connection relationship between the first game client and the target virtual server, the target viewing load is used as an adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game game participated by the second game client in the first game client, thereby reducing the coupling between the services in the game client and ensuring the user experience when viewing the game.
[0069] Optionally, in this embodiment, if Figure 3 As shown, in response to a target viewing request triggered on the first game client 302, a communication connection relationship between the first game client 302 and the target virtual server 304 is obtained, wherein the target viewing request is used to request that the game screen of the virtual game game in which the second game client (such as the game client where player C is located) participates be synchronously displayed on the first game client 302, and the target virtual server 304 includes a group of target processes (such as target process 304-1, target process 304-2, target process 304-3, etc.), and the target process is a process deployed in the cloud.
[0070] Optionally, in this embodiment, the target virtual server can be but is not limited to a service deployed in the cloud, such as an event message consumer server (WatchPod). When a player in the game watches an event, the client first connects to a WatchPod, and then pulls the message from the cloud message queue for playback; the target virtual server can also be but is not limited to being understood as a group of processes deployed to the cloud, and the number of processes can be automatically expanded according to the current load; through the above-mentioned target virtual server, it is basically possible to achieve complete decoupling from the current business process, and it can automatically scale according to the load of the current service to dynamically reach a load balancing state to ensure the player's viewing experience.
[0071] Optionally, in this embodiment, the communication connection relationship can be, but is not limited to, an association relationship actively or passively created by the first game client or the target virtual server in response to a target viewing request triggered on the first game client. After the communication connection relationship is established, the communication connection relationship can be used to transfer data or interact information between the first game client and the target virtual server.
[0072] Optionally, in this embodiment, the virtual game match participated by the second game client may be, but not limited to, a virtual game match corresponding to the internal logic service provided in the first game client, or may be, but not limited to, a virtual game match corresponding to an internal logic service not provided in the first game client, and no limitation is made here. However, it should be noted that, in the case where the virtual game match participated by the second game client is a virtual game match corresponding to the internal logic service provided in the first game client, the problem of the serious degree of coupling between the services in the game client will be more significant, and it is also more suitable for the implementation of the above-mentioned method for displaying the game screen.
[0073] Optionally, in this embodiment, the target viewing load is the number of resources carried by the target process when the virtual game match is being watched, wherein the number of resources can be understood as, but not limited to, the number of users watching the virtual game match or the traffic carried, etc.; furthermore, the size of the target viewing load can be, but not limited to, a positive correlation with the number of resources carried by the target process, such as the more resources carried by the target process, the larger the target viewing load, and vice versa; in addition, the number of processes of the target process can be, but not limited to, a positive correlation with the size of the target viewing load, such as the larger the target viewing load, the larger the number of processes of the target process, and vice versa.
[0074] Optionally, in this embodiment, the target live broadcast data may include, but is not limited to, game progress data of the virtual game match, and in the process of synchronously displaying the game screen of the virtual game match in the first game client, the first client may, but is not limited to, flexibly adjust the display progress of the game screen of the virtual game match and the display angle of the game screen of the virtual game match, wherein the display angle may be, but is not limited to, understood as the viewing angle corresponding to each client participating in the virtual game match;
[0075] To further illustrate, the optional Figure 4 As shown, in the process of synchronously displaying the game screen of the virtual game match in the first game client, in response to the play request triggered on the account identifier 404, the game screen 402 from the perspective associated with the client corresponding to the account identifier 404 is displayed.
[0076] It should be noted that, in response to a target viewing request triggered on the first game client, a communication connection relationship between the first game client and the target virtual server is obtained, wherein the target viewing request is used to request that the game screen of the virtual game match in which the second game client participates be synchronously displayed in the first game client, and the target virtual server includes a group of target processes, and the target process is a process deployed in the cloud; when the target viewing load associated with the virtual game match is obtained, the number of target processes included in the target virtual server is adjusted according to the target viewing load, wherein the target viewing load is the number of resources carried by the target process when the virtual game match is watched; when the target live broadcast data of the virtual game match is obtained using the adjusted target virtual server, the target live broadcast data is sent to the first game client through the communication connection relationship, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is data of the game screen of the virtual game match to be synchronously displayed in the first game client.
[0077] To further illustrate, the optional Figure 5 As shown, in response to the target viewing request 502-2 triggered on the first game client 502, the communication connection relationship between the first game client 502 and the target virtual server 504 is obtained, such as Figure 5 As shown in (a), the target spectator request 502-2 is used to request that the game screen of the virtual game game in which the second game client participates be synchronously displayed on the first game client 502, and the target virtual server 504 includes a group of target processes (such as target process 504-1, target process 504-2, and target process 504-3), and the target process is a process deployed in the cloud;
[0078] Furthermore, if Figure 5 As shown in (b), when the target spectator load 506 associated with the virtual game match is obtained, the process quantity of the target process included in the target virtual server 504 is adjusted according to the target spectator load 506 to obtain the adjusted target virtual server 508 (such as the target process 504-1, the target process 504-2, the target process 504-3, and the target process 504-4), wherein the target spectator load 506 is the quantity of resources carried by the target process when the virtual game match is being spectated;
[0079] In addition, if Figure 5As shown in (c), when the target live broadcast data 508-2 of the virtual game game is obtained by using the adjusted target virtual server 508, the target live broadcast data 508-2 is sent to the first game client 502 through the communication connection relationship to synchronously display the game screen of the virtual game game in the first game client 502, wherein the target live broadcast data 508-2 is the data of the game screen of the virtual game game to be synchronously displayed in the first game client 502.
[0080] Through the embodiments provided by the present application, in response to a target viewing request triggered on a first game client, a communication connection relationship between the first game client and a target virtual server is obtained, wherein the target viewing request is used to request that a game screen of a virtual game match in which a second game client participates be synchronously displayed on the first game client, and the target virtual server includes a group of target processes, where the target processes are processes deployed on the cloud; when a target viewing load associated with the virtual game match is obtained, the number of target processes included in the target virtual server is adjusted according to the target viewing load, wherein the target viewing load is the number of resources carried by the target process when the virtual game match is being watched; when the target live broadcast number of the virtual game match is obtained using the adjusted target virtual server In the case of a communication connection, the target live broadcast data is sent to the first game client through the communication connection relationship, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is the data of the game screen of the virtual game match to be synchronously displayed in the first game client. Through the communication connection relationship between the first game client and the target virtual server, the target spectator load is used as the adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game match participated by the second game client in the first game client, thereby achieving the purpose of timely adjusting the number of processes of the target process for synchronously displaying the game screen, thereby realizing the technical effect of improving the display efficiency of the game screen.
[0081] As an optional solution, the number of target processes included in the target virtual server is adjusted according to the target spectator load, including:
[0082] S1, when the target spectator load is greater than or equal to the first load threshold, increase the number of target processes included in the target virtual server; or,
[0083] S2: When the target spectator load is less than or equal to the second load threshold, reduce the process quantity of the target process included in the target virtual server.
[0084] Optionally, in this embodiment, the target viewing load is the number of resources carried by the target process when the virtual game match is being watched, wherein the number of resources can be understood as, but not limited to, the number of users watching the virtual game match or the traffic carried, etc.; furthermore, the size of the target viewing load can be, but not limited to, a positive correlation with the number of resources carried by the target process, such as the more resources carried by the target process, the larger the target viewing load, and vice versa; in addition, the number of processes of the target process can be, but not limited to, a positive correlation with the size of the target viewing load, such as the larger the target viewing load, the larger the number of processes of the target process, and vice versa.
[0085] Optionally, in this embodiment, increasing the process number of target processes included in the target virtual server may be, but is not limited to, a positive correlation with the load amount of the target spectator load relative to a first load threshold; reducing the process number of target processes included in the target virtual server may be, but is not limited to, a positive correlation with the load amount of the target spectator load relative to a second load threshold.
[0086] As an optional solution, the number of target processes included in the target virtual server is adjusted according to the target spectator load, including:
[0087] S1, when the target spectator load is within the first load range, adjusting the number of target processes included in the target virtual server to the number of processes corresponding to the first load range; or,
[0088] S2, when the target spectator load is within the second load range, adjusting the process number of the target process included in the target virtual server to the process number corresponding to the second load range.
[0089] Optionally, in this embodiment, the target viewing load is the number of resources carried by the target process when the virtual game match is being watched, wherein the number of resources can be understood as, but not limited to, the number of users watching the virtual game match or the traffic carried, etc.; furthermore, the size of the target viewing load can be, but not limited to, a positive correlation with the number of resources carried by the target process, such as the more resources carried by the target process, the larger the target viewing load, and vice versa; in addition, the number of processes of the target process can be, but not limited to, a positive correlation with the size of the target viewing load, such as the larger the target viewing load, the larger the number of processes of the target process, and vice versa.
[0090] It should be noted that, in order to improve the targeted adjustment of the number of processes of the target process, the number of processes of the target process may be adjusted based on, but not limited to, the load range in which the target spectator load is located.
[0091] Through the embodiments provided by the present application, when the target spectator load is within the first load range, the process number of the target process included in the target virtual server is adjusted to the process number corresponding to the first load range; or, when the target spectator load is within the second load range, the process number of the target process included in the target virtual server is adjusted to the process number corresponding to the second load range, thereby achieving the purpose of targeted adjustment of the process number of the target process and realizing the effect of improving the targeted adjustment of the process number of the target process.
[0092] As an optional solution, before sending the target live broadcast data to the first game client through the communication connection relationship, it includes:
[0093] S1, sending a data pull request to a target message queue, wherein the target message queue is used to cache game screen data of a virtual game match, and the data pull request is used to request to pull target live broadcast data cached in the target message queue;
[0094] S2, receiving the target live broadcast data returned by the target message queue.
[0095] Optionally, the target message queue may be, but is not limited to, a cloud message queue. Furthermore, in this embodiment, a cloud message queue is used as an intermediary for message delivery. In addition to the inherent functional characteristics of high throughput, the cloud message queue also has the characteristics of high reliability and high scalability.
[0096] It should be noted that a data pull request is sent to a target message queue, wherein the target message queue is used to cache game screen data of a virtual game match, and the data pull request is used to request to pull the target live broadcast data cached in the target message queue; and the target live broadcast data returned by the target message queue is received.
[0097] To further illustrate, the optional Figure 3 The scenario shown, continues with Figure 6 As shown, the target virtual server 304 sends a data pull request 602 to the target message queue 604, wherein the target message queue 604 is used to cache the game screen data of the virtual game match, and the data pull request 602 is used to request to pull the target live broadcast data 606 cached in the target message queue 604; the target virtual server 304 receives the target live broadcast data 606 returned by the target message queue 604.
[0098] As an optional solution, sending a data pull request to a target message queue includes: sending a data pull request to a target message queue, wherein the data pull request also carries a game identifier of the virtual game game and a screen timestamp of a game screen of the virtual game game;
[0099] As an optional solution, receiving the target live broadcast data returned by the target message queue includes: receiving the live broadcast data returned by the target message queue and matching the picture timestamp.
[0100] Optionally, in this embodiment, the game identifier may be, but is not limited to, a game identifier of a virtual game game in which the second game client participates and is synchronously displayed in the first game client as requested by the target viewing request; the screen timestamp may be, but is not limited to, a screen timestamp corresponding to the time information when the target viewing request is triggered, or a screen timestamp corresponding to the time information of the display progress of the virtual game game in which the second game client participates and is synchronously displayed in the first game client as requested by the target viewing request.
[0101] Through the embodiment provided by the present application, a data pull request is sent to a target message queue, wherein the data pull request also carries a game identifier of a virtual game match and a screen timestamp of a game screen of the virtual game match; and live broadcast data returned by the target message queue and matching the screen timestamp is received, thereby achieving the purpose of accurately displaying the game screen for viewing and realizing the effect of improving the display accuracy of the game screen.
[0102] Optionally, as an optional implementation, as Figure 7 As shown, the method for displaying the game screen includes:
[0103] S702, obtaining a target spectator request triggered on the first game client, wherein the target spectator request is used to request that a game screen of a virtual game game in which the second game client participates be synchronously displayed on the first game client;
[0104] S704, responding to the target spectator request, establishing a communication connection relationship between the first game client and the target virtual server, wherein the target virtual server includes a group of target processes, the target processes are processes deployed in the cloud, and the number of processes in the group of target processes is set to be adjusted according to the target spectator load associated with the virtual game match, the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0105] S706, receiving target live broadcast data of the virtual game game sent by the target virtual server through the communication connection relationship, wherein the target live broadcast data is data of a game screen of the virtual game game to be synchronously displayed on the first game client;
[0106] S708, synchronously displaying the game screen of the virtual game match in the first game client.
[0107] Optionally, the above-mentioned method for displaying the game screen can be applied, but not limited to, in the scene of watching the competitive events of the virtual game. Given that the number of users who watch a game online at the same time in the virtual game may reach tens of thousands or even millions, and the amount of messages generated by recording a game is also huge, it is necessary to consider what kind of message forwarding mechanism to adopt to meet the business needs of high throughput. In this embodiment, when watching the game in the game client, the client first connects to the target virtual server, establishes a communication connection relationship between the two, and then uses the target virtual server to pull messages (such as target live broadcast data) from the message queue to provide corresponding viewing services for the game client watching the game; wherein, since the target virtual server is a service process deployed in the cloud, it can achieve the effect of completely decoupling from the logical business process of the current game client, and can realize automatic scaling dynamic adjustment according to the target viewing load of the current viewing service, so that the target virtual server is dynamically adjusted to a load-balanced state, thereby improving the efficiency of the game screen corresponding to the viewing service, and thereby ensuring the user experience of providing the corresponding viewing service for the viewing game client.
[0108] Optionally, there is an essential difference between the game client and the general live broadcast client that only provides viewing services. For example, in addition to providing viewing services for virtual games, the game client can also, but is not limited to, provide internal logic services for virtual games. As a result, during the operation of the game client, there is a serious coupling between the viewing service for the virtual game and the internal logic service of the virtual game. In the process of providing viewing services to spectators, the live broadcast data generated by the viewing service must be forwarded layer by layer by various logic servers. As a result, the number of participants for the viewing service provided by the game client is limited, and usually the spectators are limited to those who have been eliminated in a single game.
[0109] In this embodiment, in order to overcome the problem of serious coupling between the services in the game client, through the communication connection relationship between the first game client and the target virtual server, the target viewing load is used as an adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game game participated by the second game client in the first game client, thereby reducing the coupling between the services in the game client and ensuring the user experience when viewing the game.
[0110] Optionally, in this embodiment, if Figure 3As shown, a target viewing request triggered on the first game client 302 is obtained, wherein the target viewing request is used to request that the game screen of the virtual game game in which the second game client (such as the game client where player C is located) participates be synchronously displayed on the first game client 302; in response to the target viewing request, a communication connection relationship is established between the first game client 302 and the target virtual server 304, wherein the target virtual server 304 includes a group of target processes (such as target process 304-1, target process 304-2, target process 304-3, etc.), and the target process is a process deployed in the cloud. The number of processes in a group of target processes is set to be adjusted according to the target viewing load associated with the virtual game game, and the target viewing load is the number of resources carried by the target process when the virtual game game is being watched.
[0111] Optionally, in this embodiment, the target virtual server can be but is not limited to a service deployed in the cloud, such as an event message consumer server (WatchPod). When a player in the game watches an event, the client first connects to a WatchPod, and then pulls the message from the cloud message queue for playback; the target virtual server can also be but is not limited to being understood as a group of processes deployed to the cloud, and the number of processes can be automatically expanded according to the current load; through the above-mentioned target virtual server, it is basically possible to achieve complete decoupling from the current business process, and it can automatically scale according to the load of the current service to dynamically reach a load balancing state to ensure the player's viewing experience.
[0112] Optionally, in this embodiment, the communication connection relationship can be, but is not limited to, an association relationship actively or passively created by the first game client or the target virtual server in response to a target viewing request triggered on the first game client. After the communication connection relationship is established, the communication connection relationship can be used to transfer data or interact information between the first game client and the target virtual server.
[0113] Optionally, in this embodiment, the virtual game match participated by the second game client may be, but not limited to, a virtual game match corresponding to the internal logic service provided in the first game client, or may be, but not limited to, a virtual game match corresponding to an internal logic service not provided in the first game client, and no limitation is made here. However, it should be noted that, in the case where the virtual game match participated by the second game client is a virtual game match corresponding to the internal logic service provided in the first game client, the problem of the serious degree of coupling between the services in the game client will be more significant, and it is also more suitable for the implementation of the above-mentioned method for displaying the game screen.
[0114] Optionally, in this embodiment, the target viewing load is the number of resources carried by the target process when the virtual game match is being watched, wherein the number of resources can be understood as, but not limited to, the number of users watching the virtual game match or the traffic carried, etc.; furthermore, the size of the target viewing load can be, but not limited to, a positive correlation with the number of resources carried by the target process, such as the more resources carried by the target process, the larger the target viewing load, and vice versa; in addition, the number of processes of the target process can be, but not limited to, a positive correlation with the size of the target viewing load, such as the larger the target viewing load, the larger the number of processes of the target process, and vice versa.
[0115] Optionally, in this embodiment, the target live broadcast data may include, but is not limited to, game progress data of the virtual game match, and in the process of synchronously displaying the game screen of the virtual game match in the first game client, the first client may, but is not limited to, flexibly adjust the display progress of the game screen of the virtual game match and the display angle of the game screen of the virtual game match, wherein the display angle may be, but is not limited to, understood as the viewing angle corresponding to each client participating in the virtual game match;
[0116] To further illustrate, the optional Figure 4 As shown, in the process of synchronously displaying the game screen of the virtual game match in the first game client, in response to the play request triggered on the account identifier 404, the game screen 402 from the perspective associated with the client corresponding to the account identifier 404 is displayed.
[0117] It should be noted that a target viewing request triggered on the first game client is obtained, wherein the target viewing request is used to request that the game screen of the virtual game match in which the second game client participates be synchronously displayed in the first game client; in response to the target viewing request, a communication connection relationship is established between the first game client and the target virtual server, wherein the target virtual server includes a group of target processes, the target process is a process deployed in the cloud, and the number of processes in a group of target processes is set to be adjusted according to the target viewing load associated with the virtual game match, and the target viewing load is the number of resources carried by the target process when the virtual game match is watched; target live broadcast data of the virtual game match sent by the target virtual server is received through the communication connection relationship, wherein the target live broadcast data is data of the game screen of the virtual game match to be synchronously displayed in the first game client; and the game screen of the virtual game match is synchronously displayed in the first game client.
[0118] To further illustrate, the optional Figure 5 As shown, a target viewing request 502-2 triggered on the first game client 502 is obtained, and a communication connection relationship between the first game client 502 and the target virtual server 504 is established, such as Figure 5As shown in (a), the target spectator request 502-2 is used to request that the game screen of the virtual game game in which the second game client participates be synchronously displayed on the first game client 502, and the target virtual server 504 includes a group of target processes (such as target process 504-1, target process 504-2, and target process 504-3), and the target process is a process deployed in the cloud;
[0119] Furthermore, if Figure 5 As shown in (b), when the target virtual server 504 obtains the target spectator load 506 associated with the virtual game match, the process quantity of the target process included in the target virtual server 504 is adjusted according to the target spectator load 506 to obtain the adjusted target virtual server 508 (such as target process 504-1, target process 504-2, target process 504-3, target process 504-4), wherein the target spectator load 506 is the quantity of resources carried by the target process when the virtual game match is being spectated;
[0120] In addition, if Figure 5 As shown in (c), when the target live broadcast data 508-2 of the virtual game game is obtained by using the adjusted target virtual server 508, the target live broadcast data 508-2 is sent to the first game client 502 through the communication connection relationship to synchronously display the game screen of the virtual game game in the first game client 502, wherein the target live broadcast data 508-2 is the data of the game screen of the virtual game game to be synchronously displayed in the first game client 502.
[0121] Through the embodiments provided by the present application, a target spectator request triggered on a first game client is obtained, wherein the target spectator request is used to request that the game screen of the virtual game game in which the second game client participates be synchronously displayed on the first game client; in response to the target spectator request, a communication connection relationship is established between the first game client and a target virtual server, wherein the target virtual server includes a group of target processes, the target process is a process deployed in the cloud, and the number of processes in a group of target processes is set to be adjusted according to a target spectator load associated with the virtual game game, and the target spectator load is the number of resources carried by the target process when the virtual game game is being watched; receiving a message sent by the target virtual server through the communication connection relationship. Target live broadcast data of a virtual game match, wherein the target live broadcast data is data of a game screen of a virtual game match to be synchronously displayed in a first game client; synchronously displaying the game screen of the virtual game match in the first game client, through the communication connection relationship between the first game client and the target virtual server, using the target spectator load as an adjustment basis, automatically adjusting the number of processes of a target process deployed in the cloud for synchronously displaying the game screen of the virtual game match participated by the second game client in the first game client, thereby achieving the purpose of timely adjusting the number of processes of the target process for synchronously displaying the game screen, thereby realizing the technical effect of improving the display efficiency of the game screen.
[0122] As an optional solution, after obtaining the target spectator request triggered on the first game client, the following steps are included:
[0123] S1, sending a target spectator request to a spectator management process, wherein the spectator management process is used to query the game information of the virtual game;
[0124] S2. When valid game information returned by the spectator management process is obtained, the first game client is set to a spectator state, wherein the valid game information is the game information of the virtual game game queried by the spectator management process, and the first game client in the spectator state is allowed to establish a communication connection with the target virtual server.
[0125] Optionally, in this embodiment, the spectator management process may be, but is not limited to, a spectator event information management process, which is used to manage event information required to be transmitted by the spectator service.
[0126] As an optional solution, a target spectator request is sent to the spectator management process, including:
[0127] The target viewing request is sent to the non-event viewing management process, and the non-event viewing management process forwards the target viewing request to the event viewing management process.
[0128] Optionally, in this embodiment, the game client is usually configured with a non-event viewing management process and an event viewing management process. In order to decouple the relationship between non-event services and event services, the target viewing request can be sent to the non-event viewing management process first, and then the non-event viewing management process forwards the target viewing request to the event viewing management process.
[0129] To further illustrate, the optional Figure 8 As shown, the specific steps are as follows:
[0130] Step S802, the first game client 802 sends a target viewing request to the non-game viewing management process 804;
[0131] Step S804, the non-event viewing management process 504 forwards the target viewing request to the event viewing management process 806;
[0132] Step S806, the game viewing management process 806 returns the game valid information to the non-game viewing management process 504;
[0133] Step S808 , the non-game viewing management process 504 forwards the game validity information to the first game client 802 .
[0134] Through the embodiments provided in the present application, the target viewing request is sent to the non-event viewing management process, and the non-event viewing management process forwards the target viewing request to the event viewing management process, thereby achieving the purpose of reducing the coupling between the internal logical services of the game client and realizing the effect of improving the display efficiency of the game screen.
[0135] As an optional solution, establishing a communication connection relationship between the first game client and the target virtual server includes:
[0136] A communication connection relationship is established between the first game client and the target virtual server according to the address information of the target virtual server contained in the effective game information.
[0137] It should be noted that a communication connection relationship is established between the first game client and the target virtual server based on the address information of the target virtual server included in the effective game information.
[0138] Further explanation and example, optional based on Figure 8 The scenario shown, continues with Fig. 9 In step S902 shown, a communication connection relationship is established between the first game client and the target virtual server according to the address information of the target virtual server contained in the effective game information.
[0139] Through the embodiments provided by the present application, a communication connection relationship is established between the first game client and the target virtual server based on the address information of the target virtual server contained in the effective information of the game, thereby achieving the purpose of establishing a communication connection relationship in a targeted manner using the address information of the target virtual server and realizing the effect of improving the authenticity of establishing the communication connection relationship.
[0140] As an optional solution, before obtaining the target spectating request triggered on the first game client, the following steps are included:
[0141] Displaying a target spectator interface of the first game client, wherein the target spectator interface displays a spectator logo corresponding to a game match in which at least one client participates, and the at least one client includes a second game client;
[0142] As an optional solution, obtaining a target viewing request triggered on a first game client includes: obtaining a target viewing request when a selection operation is triggered on obtaining a target viewing identifier, wherein the viewing identifier corresponding to a game match in which at least one client participates includes a target viewing identifier.
[0143] Optionally, in this embodiment, the target live broadcast data may include, but is not limited to, game progress data of the virtual game match, and in the process of synchronously displaying the game screen of the virtual game match in the first game client, the first client may, but is not limited to, flexibly adjust the display progress of the game screen of the virtual game match and the display angle of the game screen of the virtual game match, wherein the display angle may be, but is not limited to, understood as the viewing angle corresponding to each client participating in the virtual game match;
[0144] To further illustrate, the optional Figure 4 As shown, in the process of synchronously displaying the game screen of the virtual game match in the first game client, in response to the play request triggered on the account identifier 404, the game screen 402 from the perspective associated with the client corresponding to the account identifier 404 is displayed.
[0145] As an optional solution, the method further includes:
[0146] S1, obtaining a target running request triggered on a first game client, wherein the target running request is used to run a target virtual game on the first game client, and the game of the target virtual game includes a virtual game game;
[0147] S2, displaying a game running screen of a target virtual game in which the first game client participates.
[0148] Optionally, there is an essential difference between the game client and the live broadcast client generally used to provide only the viewing service. For example, in addition to providing the viewing service of the virtual game, the game client can also provide, but is not limited to, the internal logic service of the virtual game, which leads to the situation that the virtual game viewing service and the internal logic service of the virtual game are easily coupled during the operation of the game client. In the process of providing the viewing service for the spectators, the live broadcast data generated by the viewing service must be forwarded by each logic server layer by layer, which results in the viewing service provided by the game client facing a limited number of participants, and the viewing objects are usually limited to the objects that have been eliminated in a single game;
[0149] In this embodiment, in order to overcome the problem of serious coupling between the services in the game client, through the communication connection relationship between the first game client and the target virtual server, the target viewing load is used as an adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game game participated by the second game client in the first game client, thereby reducing the coupling between the services in the game client and ensuring the user experience when viewing the game.
[0150] As an optional solution, for ease of understanding, the above-mentioned game screen display method is applied to the viewing scene of PVP events in MMO games, aiming to meet the needs of a large number of MMO players to watch high-level game competitions in the first place.
[0151] Optionally, in this embodiment, considering that the number of players watching a game online at the same time in an MMO game may reach tens of thousands or even millions, and the amount of messages generated by recording a game is also huge, it is necessary to consider what kind of message forwarding mechanism to adopt to meet the high-throughput business needs.
[0152] In addition, the business side has implemented a set of event message consumer services, and all messages generated in the watched games are directly pushed to the cloud message queue. When players watch the game in the game, the client first connects to a certain event message consumer service and pulls messages from the cloud message queue for playback. The event message consumer service is a service deployed in the cloud, which can basically achieve complete decoupling from the current business process, and can automatically scale according to the load of the current service, dynamically achieve a load balancing state, and ensure the player's viewing experience.
[0153] Optionally, in this embodiment, in a game competition, a large number of unqualified players can watch the same competition from a third-party perspective in different game areas. Without participating in the game process and without affecting the fairness of the game skill competition, they can closely observe and learn the game operations of other high-level players to improve their own competitive level. For example, a third-party player can select any player of interest in the current competition as an observation object, and obtain the same real game experience as himself from the perspective of the currently selected player.
[0154] It should be noted that the game business side only needs to classify various game messages, package and send them to the cloud message queue; use the go language to make the event message consumer server meet the requirements of the cloud deployment rules, and then achieve complete decoupling of the event message consumer server and the current business process; in addition, manage a large number of player client connections and cache, pull messages from the cloud storage message queue and manage caches, and these caches can be rebuilt. In addition, the direct deployment to the cloud can achieve the effect of decoupling the game business side and the spectator service side.
[0155] To further illustrate, the optional Fig.10 In the spectator service framework shown, the client 1002 uses the spectator service 1004 to obtain the game information stored in the message queue 1006, and displays the game information on the client 1002 in the form of a game screen;
[0156] For details, please refer to Fig.11 The spectator service message sequence diagram shown in the figure is as follows:
[0157] The game client 1102 sends a CS viewing request to the non-event viewing management process 1104, and the non-event viewing management process 1104 transmits the request to the event viewing management process 1106 to query the viewing information; after receiving the request, the event viewing management process 1106 queries whether there is any information about the game on the spot, and if not, notifies the event process 1108; initializes the event information and reports it, and the event viewing management process 1106 returns it to the request end after receiving the event information; if it can be found, it directly returns the event information. At the same time, the event process 1108 starts recording the current game and pushes the produced message to the message queue 1112. After the non-event viewing management process 1104 on the request end queries the event information, it sets the player to the viewing state and returns the event information to the game client 1102. The game client 1102 receives the event information returned by the non-event viewing management process 1104, takes out the address of the virtual server 1110 inside, and connects to the virtual server 1110. Virtual server 1110 is a group of processes deployed to the cloud. The number of processes can be automatically expanded according to the current load. It has two main functions: one is to consume all the event messages requested to be watched by game client 1102 from the message queue 1112, and cache the messages in order according to the events; the other is to accept the viewing request sent by the player game client 1102, and take out the protocol message of the current event watched by the player from the cache, and push it to the game client 1102 continuously.
[0158] In addition, after the game client 1102 receives the message of the game to be watched from the virtual server 1110, it replays it in the order of the message.
[0159] The embodiments provided in this application effectively solve the needs of a large number of players to watch the same high-level competitive game in different game areas, reduce the coupling between the internal logical servers of the product, and can automatically expand the capacity according to the current viewing load, ensuring that players have a smoother viewing experience.
[0160] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0161] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0162] According to another aspect of the embodiment of the present application, a device for displaying a game screen for implementing the above-mentioned method for displaying a game screen is also provided. Fig.12 As shown, the device comprises:
[0163] A first acquisition unit 1202 is configured to acquire a communication connection relationship between the first game client and a target virtual server in response to a target spectator request triggered on the first game client, wherein the target spectator request is used to request that a game screen of a virtual game game in which the second game client participates be synchronously displayed on the first game client, and the target virtual server includes a group of target processes, and the target process is a process deployed in the cloud;
[0164] The adjusting unit 1204 is configured to adjust the number of target processes included in the target virtual server according to the target spectator load when the target spectator load associated with the virtual game match is obtained, wherein the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0165] The first display unit 1206 is used to obtain the target live broadcast data of the virtual game game by using the adjusted target virtual server, and send the target live broadcast data to the first game client through a communication connection relationship, so as to synchronously display the game screen of the virtual game game in the first game client, wherein the target live broadcast data is the data of the game screen of the virtual game game to be synchronously displayed in the first game client.
[0166] Optionally, the above-mentioned display device of the game screen can be used, but not limited to, in the scene of watching the competitive events of the virtual game. Given that the number of users who watch a game online at the same time in the virtual game may reach tens of thousands or even millions, and the amount of messages generated by recording a game is also huge, it is necessary to consider what kind of message forwarding mechanism to adopt to meet the business needs of high throughput. In this embodiment, when watching the game in the game client, the client first connects to the target virtual server, establishes a communication connection relationship between the two, and then uses the target virtual server to pull messages (such as target live broadcast data) from the message queue to provide corresponding viewing services for the game client watching the game; wherein, since the target virtual server is a service process deployed in the cloud, it can achieve the effect of completely decoupling from the logical business process of the current game client, and can realize automatic scaling dynamic adjustment according to the target viewing load of the current viewing service, so that the target virtual server is dynamically adjusted to a load-balanced state, thereby improving the efficiency of the game screen corresponding to the viewing service, and thereby ensuring the user experience of providing the corresponding viewing service for the viewing game client.
[0167] Optionally, there is an essential difference between the game client and the live broadcast client generally used to provide only the viewing service. For example, in addition to providing the viewing service of the virtual game, the game client can also provide, but is not limited to, the internal logic service of the virtual game, which leads to the situation that the virtual game viewing service and the internal logic service of the virtual game are easily coupled during the operation of the game client. In the process of providing the viewing service for the spectators, the live broadcast data generated by the viewing service must be forwarded by each logic server layer by layer, which results in the viewing service provided by the game client facing a limited number of participants, and the viewing objects are usually limited to the objects that have been eliminated in a single game;
[0168] In this embodiment, in order to overcome the problem of serious coupling between the services in the game client, through the communication connection relationship between the first game client and the target virtual server, the target viewing load is used as an adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game game participated by the second game client in the first game client, thereby reducing the coupling between the services in the game client and ensuring the user experience when viewing the game.
[0169] Optionally, in this embodiment, the target virtual server can be but is not limited to a service deployed in the cloud, such as an event message consumer server (WatchPod). When a player in the game watches an event, the client first connects to a WatchPod, and then pulls the message from the cloud message queue for playback; the target virtual server can also be but is not limited to being understood as a group of processes deployed to the cloud, and the number of processes can be automatically expanded according to the current load; through the above-mentioned target virtual server, it is basically possible to achieve complete decoupling from the current business process, and it can automatically scale according to the load of the current service to dynamically reach a load balancing state to ensure the player's viewing experience.
[0170] Optionally, in this embodiment, the communication connection relationship can be, but is not limited to, an association relationship actively or passively created by the first game client or the target virtual server in response to a target viewing request triggered on the first game client. After the communication connection relationship is established, the communication connection relationship can be used to transfer data or interact information between the first game client and the target virtual server.
[0171] Optionally, in this embodiment, the virtual game match participated by the second game client may be, but not limited to, a virtual game match corresponding to the internal logic service provided in the first game client, or may be, but not limited to, a virtual game match corresponding to an internal logic service not provided in the first game client, and no limitation is made here. However, it should be noted that, in the case where the virtual game match participated by the second game client is a virtual game match corresponding to the internal logic service provided in the first game client, the problem of the serious degree of coupling between the services in the game client will be more significant, and it is also more suitable for the implementation of the above-mentioned display device of the game screen.
[0172] Optionally, in this embodiment, the target viewing load is the number of resources carried by the target process when the virtual game match is being watched, wherein the number of resources can be understood as, but not limited to, the number of users watching the virtual game match or the traffic carried, etc.; furthermore, the size of the target viewing load can be, but not limited to, a positive correlation with the number of resources carried by the target process, such as the more resources carried by the target process, the larger the target viewing load, and vice versa; in addition, the number of processes of the target process can be, but not limited to, a positive correlation with the size of the target viewing load, such as the larger the target viewing load, the larger the number of processes of the target process, and vice versa.
[0173] Optionally, in this embodiment, the target live broadcast data may include, but is not limited to, game progress data of the virtual game match, and in the process of synchronously displaying the game screen of the virtual game match in the first game client, the first client may, but is not limited to, flexibly adjust the display progress of the game screen of the virtual game match and the display angle of the game screen of the virtual game match, wherein the display angle may be, but is not limited to, understood as the viewing angle corresponding to each client participating in the virtual game match;
[0174] It should be noted that, in response to a target viewing request triggered on the first game client, a communication connection relationship between the first game client and the target virtual server is obtained, wherein the target viewing request is used to request that the game screen of the virtual game match in which the second game client participates be synchronously displayed in the first game client, and the target virtual server includes a group of target processes, and the target process is a process deployed in the cloud; when the target viewing load associated with the virtual game match is obtained, the number of target processes included in the target virtual server is adjusted according to the target viewing load, wherein the target viewing load is the number of resources carried by the target process when the virtual game match is watched; when the target live broadcast data of the virtual game match is obtained using the adjusted target virtual server, the target live broadcast data is sent to the first game client through the communication connection relationship, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is data of the game screen of the virtual game match to be synchronously displayed in the first game client.
[0175] The specific implementation example can refer to the example shown in the display device of the game screen mentioned above, and will not be described in detail in this example.
[0176] Through the embodiments provided by the present application, in response to a target viewing request triggered on a first game client, a communication connection relationship between the first game client and a target virtual server is obtained, wherein the target viewing request is used to request that a game screen of a virtual game match in which a second game client participates be synchronously displayed on the first game client, and the target virtual server includes a group of target processes, where the target processes are processes deployed on the cloud; when a target viewing load associated with the virtual game match is obtained, the number of target processes included in the target virtual server is adjusted according to the target viewing load, wherein the target viewing load is the number of resources carried by the target process when the virtual game match is being watched; when the target live broadcast number of the virtual game match is obtained using the adjusted target virtual server In the case of a communication connection, the target live broadcast data is sent to the first game client through the communication connection relationship, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is the data of the game screen of the virtual game match to be synchronously displayed in the first game client. Through the communication connection relationship between the first game client and the target virtual server, the target spectator load is used as the adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game match participated by the second game client in the first game client, thereby achieving the purpose of timely adjusting the number of processes of the target process for synchronously displaying the game screen, thereby realizing the technical effect of improving the display efficiency of the game screen.
[0177] As an optional solution, the adjustment unit 1204 includes:
[0178] an adding module, used for increasing the number of target processes included in the target virtual server when the target spectator load is greater than or equal to the first load threshold; or,
[0179] The reduction module is used to reduce the process quantity of the target process included in the target virtual server when the target spectator load is less than or equal to the second load threshold.
[0180] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0181] As an optional solution, the adjustment unit 1204 includes:
[0182] A first adjustment module is used to adjust the number of target processes included in the target virtual server to the number of processes corresponding to the first load range when the target spectator load is within the first load range; or
[0183] The second adjustment module is used to adjust the process number of the target process included in the target virtual server to the process number corresponding to the second load range when the target spectator load is within the second load range.
[0184] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0185] As an optional solution, it includes:
[0186] A first sending unit is used to send a data pull request to a target message queue before sending the target live broadcast data to the first game client through a communication connection relationship, wherein the target message queue is used to cache the game screen data of the virtual game match, and the data pull request is used to request to pull the target live broadcast data cached in the target message queue;
[0187] The first receiving unit is used to receive the target live broadcast data returned by the target message queue before sending the target live broadcast data to the first game client through the communication connection relationship.
[0188] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0189] As an optional solution, the first sending unit includes: a first sending module, used to send a data pull request to a target message queue, wherein the data pull request also carries a game identifier of the virtual game game and a screen timestamp of a game screen of the virtual game game;
[0190] The first receiving unit includes: a receiving module, which is used to receive the live broadcast data returned by the target message queue and matched with the picture timestamp.
[0191] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0192] According to another aspect of the embodiment of the present application, a device for displaying a game screen for implementing the above-mentioned method for displaying a game screen is also provided. Fig.13 As shown, the device comprises:
[0193] The second acquisition unit 1302 is used to acquire a target viewing request triggered on the first game client, wherein the target viewing request is used to request that a game screen of a virtual game game in which the second game client participates be synchronously displayed on the first game client;
[0194] Establishing unit 1304, used to respond to the target spectator request and establish a communication connection relationship between the first game client and the target virtual server, wherein the target virtual server includes a group of target processes, the target process is a process deployed in the cloud, and the number of processes in the group of target processes is set to be adjusted according to the target spectator load associated with the virtual game match, and the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0195] The second receiving unit 1306 is configured to receive target live broadcast data of the virtual game match sent by the target virtual server through a communication connection relationship, wherein the target live broadcast data is data of a game screen of the virtual game match to be synchronously displayed in the first game client;
[0196] The second display unit 1308 is used to synchronously display the game screen of the virtual game in the first game client.
[0197] Optionally, the above-mentioned display device of the game screen can be used, but not limited to, in the scene of watching the competitive events of the virtual game. Given that the number of users who watch a game online at the same time in the virtual game may reach tens of thousands or even millions, and the amount of messages generated by recording a game is also huge, it is necessary to consider what kind of message forwarding mechanism to adopt to meet the business needs of high throughput. In this embodiment, when watching the game in the game client, the client first connects to the target virtual server, establishes a communication connection relationship between the two, and then uses the target virtual server to pull messages (such as target live broadcast data) from the message queue to provide corresponding viewing services for the game client watching the game; wherein, since the target virtual server is a service process deployed in the cloud, it can achieve the effect of completely decoupling from the logical business process of the current game client, and can realize automatic scaling dynamic adjustment according to the target viewing load of the current viewing service, so that the target virtual server is dynamically adjusted to a load-balanced state, thereby improving the efficiency of the game screen corresponding to the viewing service, and thereby ensuring the user experience of providing the corresponding viewing service for the viewing game client.
[0198] Optionally, there is an essential difference between the game client and the live broadcast client generally used to provide only the viewing service. For example, in addition to providing the viewing service of the virtual game, the game client can also provide, but is not limited to, the internal logic service of the virtual game, which leads to the situation that the virtual game viewing service and the internal logic service of the virtual game are easily coupled during the operation of the game client. In the process of providing the viewing service for the spectators, the live broadcast data generated by the viewing service must be forwarded by each logic server layer by layer, which results in the viewing service provided by the game client facing a limited number of participants, and the viewing objects are usually limited to the objects that have been eliminated in a single game;
[0199] In this embodiment, in order to overcome the problem of serious coupling between the services in the game client, through the communication connection relationship between the first game client and the target virtual server, the target viewing load is used as an adjustment basis to automatically adjust the number of processes of the target process deployed in the cloud for synchronously displaying the game screen of the virtual game game participated by the second game client in the first game client, thereby reducing the coupling between the services in the game client and ensuring the user experience when viewing the game.
[0200] Optionally, in this embodiment, the target virtual server can be but is not limited to a service deployed in the cloud, such as an event message consumer server (WatchPod). When a player in the game watches an event, the client first connects to a WatchPod, and then pulls the message from the cloud message queue for playback; the target virtual server can also be but is not limited to being understood as a group of processes deployed to the cloud, and the number of processes can be automatically expanded according to the current load; through the above-mentioned target virtual server, it is basically possible to achieve complete decoupling from the current business process, and it can automatically scale according to the load of the current service to dynamically reach a load balancing state to ensure the player's viewing experience.
[0201] Optionally, in this embodiment, the communication connection relationship can be, but is not limited to, an association relationship actively or passively created by the first game client or the target virtual server in response to a target viewing request triggered on the first game client. After the communication connection relationship is established, the communication connection relationship can be used to transfer data or interact information between the first game client and the target virtual server.
[0202] Optionally, in this embodiment, the virtual game match participated by the second game client may be, but not limited to, a virtual game match corresponding to the internal logic service provided in the first game client, or may be, but not limited to, a virtual game match corresponding to an internal logic service not provided in the first game client, and no limitation is made here. However, it should be noted that, in the case where the virtual game match participated by the second game client is a virtual game match corresponding to the internal logic service provided in the first game client, the problem of the serious degree of coupling between the services in the game client will be more significant, and it is also more suitable for the implementation of the above-mentioned display device of the game screen.
[0203] Optionally, in this embodiment, the target viewing load is the number of resources carried by the target process when the virtual game match is being watched, wherein the number of resources can be understood as, but not limited to, the number of users watching the virtual game match or the traffic carried, etc.; furthermore, the size of the target viewing load can be, but not limited to, a positive correlation with the number of resources carried by the target process, such as the more resources carried by the target process, the larger the target viewing load, and vice versa; in addition, the number of processes of the target process can be, but not limited to, a positive correlation with the size of the target viewing load, such as the larger the target viewing load, the larger the number of processes of the target process, and vice versa.
[0204] Optionally, in this embodiment, the target live broadcast data may include, but is not limited to, game progress data of the virtual game match, and in the process of synchronously displaying the game screen of the virtual game match in the first game client, the first client may, but is not limited to, flexibly adjust the display progress of the game screen of the virtual game match and the display angle of the game screen of the virtual game match, wherein the display angle may be, but is not limited to, understood as the viewing angle corresponding to each client participating in the virtual game match;
[0205] It should be noted that a target viewing request triggered on the first game client is obtained, wherein the target viewing request is used to request that the game screen of the virtual game match in which the second game client participates be synchronously displayed in the first game client; in response to the target viewing request, a communication connection relationship is established between the first game client and the target virtual server, wherein the target virtual server includes a group of target processes, the target process is a process deployed in the cloud, and the number of processes in a group of target processes is set to be adjusted according to the target viewing load associated with the virtual game match, and the target viewing load is the number of resources carried by the target process when the virtual game match is watched; target live broadcast data of the virtual game match sent by the target virtual server is received through the communication connection relationship, wherein the target live broadcast data is data of the game screen of the virtual game match to be synchronously displayed in the first game client; and the game screen of the virtual game match is synchronously displayed in the first game client.
[0206] The specific implementation example can refer to the example shown in the display device of the game screen mentioned above, and will not be described in detail in this example.
[0207] Through the embodiments provided by the present application, a target spectator request triggered on a first game client is obtained, wherein the target spectator request is used to request that the game screen of the virtual game game in which the second game client participates be synchronously displayed on the first game client; in response to the target spectator request, a communication connection relationship is established between the first game client and a target virtual server, wherein the target virtual server includes a group of target processes, the target process is a process deployed in the cloud, and the number of processes in a group of target processes is set to be adjusted according to a target spectator load associated with the virtual game game, and the target spectator load is the number of resources carried by the target process when the virtual game game is being watched; receiving a message sent by the target virtual server through the communication connection relationship. Target live broadcast data of a virtual game match, wherein the target live broadcast data is data of a game screen of a virtual game match to be synchronously displayed in a first game client; synchronously displaying the game screen of the virtual game match in the first game client, through the communication connection relationship between the first game client and the target virtual server, using the target spectator load as an adjustment basis, automatically adjusting the number of processes of a target process deployed in the cloud for synchronously displaying the game screen of the virtual game match participated by the second game client in the first game client, thereby achieving the purpose of timely adjusting the number of processes of the target process for synchronously displaying the game screen, thereby realizing the technical effect of improving the display efficiency of the game screen.
[0208] As an optional solution, it includes:
[0209] A second sending unit is used to send the target spectating request to the spectating management process after acquiring the target spectating request triggered on the first game client, wherein the spectating management process is used to query the game information of the virtual game game;
[0210] The setting unit is used to set the first game client to a spectator state after obtaining a target spectator request triggered on the first game client and obtaining valid game information returned by the spectator management process, wherein the valid game information is the game information of the virtual game game queried by the spectator management process, and the first game client in the spectator state is allowed to establish a communication connection relationship with the target virtual server.
[0211] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0212] As an optional solution, the second sending unit includes:
[0213] The second sending module is used to send the target viewing request to the non-match viewing management process, and the non-match viewing management process forwards the target viewing request to the match viewing management process.
[0214] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0215] As an optional solution, the establishment unit 1304 includes:
[0216] The establishing module is used to establish a communication connection relationship between the first game client and the target virtual server according to the address information of the target virtual server contained in the effective game information.
[0217] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0218] As an optional solution, it includes:
[0219] A third display unit is used to display a target viewing interface of the first game client before obtaining a target viewing request triggered on the first game client, wherein a viewing identifier corresponding to a game match in which at least one client participates is displayed on the target viewing interface, and the at least one client includes a second game client;
[0220] The second acquisition unit 1302 includes: an acquisition module, which is used to acquire a target viewing request before acquiring a target viewing request triggered on the first game client, in the case of a selection operation triggered on the target viewing identifier, wherein the viewing identifier corresponding to the game match in which at least one client participates includes a target viewing identifier.
[0221] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0222] As an optional solution, the device further includes:
[0223] A third acquisition unit is used to acquire a target running request triggered on the first game client, wherein the target running request is used to run a target virtual game on the first game client, and the game of the target virtual game includes a virtual game game;
[0224] The fourth display unit is used to display a game running screen of the target virtual game in which the first game client participates.
[0225] The specific implementation example can refer to the example shown in the above-mentioned method for displaying the game screen, which will not be repeated here in this example.
[0226] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned game screen display method is also provided. Fig.14As shown, the electronic device includes a memory 1402 and a processor 1404. The memory 1402 stores a computer program, and the processor 1404 is configured to execute the steps in any of the above method embodiments through the computer program.
[0227] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0228] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0229] S1, in response to a target spectator request triggered on a first game client, obtaining a communication connection relationship between the first game client and a target virtual server, wherein the target spectator request is used to request that a game screen of a virtual game game in which a second game client participates be synchronously displayed on the first game client, and the target virtual server includes a group of target processes, and the target process is a process deployed in the cloud;
[0230] S2, when a target spectator load associated with the virtual game match is obtained, adjusting the number of target processes included in the target virtual server according to the target spectator load, wherein the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0231] S3, when the target live broadcast data of the virtual game match is obtained by using the adjusted target virtual server, the target live broadcast data is sent to the first game client through the communication connection relationship, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is the data of the game screen of the virtual game match to be synchronously displayed in the first game client. Or,
[0232] S1, obtaining a target viewing request triggered on a first game client, wherein the target viewing request is used to request that a game screen of a virtual game game in which a second game client participates be synchronously displayed on the first game client;
[0233] S2, responding to the target spectator request, establishing a communication connection relationship between the first game client and the target virtual server, wherein the target virtual server includes a group of target processes, the target process is a process deployed in the cloud, and the number of processes in the group of target processes is set to be adjusted according to the target spectator load associated with the virtual game match, and the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0234] S3, receiving target live broadcast data of the virtual game game sent by the target virtual server through the communication connection relationship, wherein the target live broadcast data is data of a game screen of the virtual game game to be synchronously displayed in the first game client;
[0235] S4, synchronously displaying the game screen of the virtual game match in the first game client.
[0236] Alternatively, a person skilled in the art may understand that: Fig.14 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.14 The structure of the electronic device is not limited. Fig.14 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.14 Different configurations are shown.
[0237] Among them, the memory 1402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for displaying the game screen in the embodiment of the present application. The processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, realizing the above-mentioned method for displaying the game screen. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1402 may further include a memory remotely arranged relative to the processor 1404, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1402 can be specifically, but not limited to, used to store information such as target viewing requests, target viewing loads, and target live broadcast data. As an example, such as Fig.14 As shown, the memory 1402 may include, but is not limited to, the first acquisition unit 1202, the adjustment unit 1204, and the first display unit 1206 (or the second acquisition unit 1302, the establishment unit 1304, the second receiving unit 1306, and the second display unit 1308 not shown in the figure) in the display device of the game screen. In addition, other module units in the display device of the game screen may also be included but are not limited to, which will not be repeated in this example.
[0238] Optionally, the transmission device 1406 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1406 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0239] In addition, the electronic device further includes: a display 1408 for displaying information such as the target viewing request, target viewing load, and target live broadcast data; and a connection bus 1410 for connecting the various module components in the electronic device.
[0240] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0241] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0242] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0243] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0244] The computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part to the random access memory (RAM). In the random access memory, various programs and data required for system operation are also stored. The central processing unit, the read-only memory and the random access memory are connected to each other through a bus. The input / output interface (I / O interface) is also connected to the bus.
[0245] The following components are connected to the input / output interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a local area network card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0246] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0247] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0248] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0249] S1, in response to a target spectator request triggered on a first game client, obtaining a communication connection relationship between the first game client and a target virtual server, wherein the target spectator request is used to request that a game screen of a virtual game game in which a second game client participates be synchronously displayed on the first game client, and the target virtual server includes a group of target processes, and the target process is a process deployed in the cloud;
[0250] S2, when a target spectator load associated with the virtual game match is obtained, adjusting the number of target processes included in the target virtual server according to the target spectator load, wherein the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0251] S3, when the target live broadcast data of the virtual game match is obtained by using the adjusted target virtual server, the target live broadcast data is sent to the first game client through the communication connection relationship, so as to synchronously display the game screen of the virtual game match in the first game client, wherein the target live broadcast data is the data of the game screen of the virtual game match to be synchronously displayed in the first game client. Or,
[0252] S1, obtaining a target viewing request triggered on a first game client, wherein the target viewing request is used to request that a game screen of a virtual game game in which a second game client participates be synchronously displayed on the first game client;
[0253] S2, responding to the target spectator request, establishing a communication connection relationship between the first game client and the target virtual server, wherein the target virtual server includes a group of target processes, the target process is a process deployed in the cloud, and the number of processes in the group of target processes is set to be adjusted according to the target spectator load associated with the virtual game match, and the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated;
[0254] S3, receiving target live broadcast data of the virtual game game sent by the target virtual server through the communication connection relationship, wherein the target live broadcast data is data of a game screen of the virtual game game to be synchronously displayed in the first game client;
[0255] S4, synchronously displaying the game screen of the virtual game match in the first game client.
[0256] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0257] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0258] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0259] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0260] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0261] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0262] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0263] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for displaying a game screen, characterized in that: include: In a case where the virtual game match participated by the second game client is a virtual game match corresponding to an internal logic service provided in the first game client, in response to a target spectator request triggered on the first game client, a communication connection relationship between the first game client and a target virtual server is obtained, wherein the target spectator request is used to request that a game screen of the virtual game match be synchronously displayed in the first game client, and the target virtual server includes a group of target processes, and the target process is a process deployed in the cloud; When a target spectator load associated with the virtual game match is obtained, the number of processes of the target process included in the target virtual server is adjusted according to the target spectator load, wherein the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated; When the target live broadcast data of the virtual game game is obtained by using the adjusted target virtual server, the target live broadcast data is sent to the first game client through the communication connection relationship to synchronously display the game screen of the virtual game game in the first game client, wherein the target live broadcast data is data of the game screen of the virtual game game to be synchronously displayed in the first game client.
2. The method according to claim 1, characterized in that The step of adjusting the number of processes of the target process included in the target virtual server according to the target spectator load includes: When the target spectator load is greater than or equal to the first load threshold, increasing the number of processes of the target process included in the target virtual server; or, When the target spectator load is less than or equal to a second load threshold, the process quantity of the target process included in the target virtual server is reduced.
3. The method according to claim 1, characterized in that The step of adjusting the number of processes of the target process included in the target virtual server according to the target spectator load includes: When the target spectator load is within a first load range, adjusting the number of processes of the target process contained in the target virtual server to the number of processes corresponding to the first load range; or, When the target spectator load is within the second load range, the process number of the target process included in the target virtual server is adjusted to the process number corresponding to the second load range.
4. The method according to claim 1, characterized in that Before sending the target live broadcast data to the first game client through the communication connection relationship, the method includes: Sending a data pull request to a target message queue, wherein the target message queue is used to cache the game screen data of the virtual game match, and the data pull request is used to request to pull the target live broadcast data cached in the target message queue; Receive the target live broadcast data returned by the target message queue.
5. The method according to claim 4, characterized in that The sending of the data pull request to the target message queue comprises: sending the data pull request to the target message queue, wherein the data pull request also carries a game identifier of the virtual game game and a screen timestamp of a game screen of the virtual game game; The receiving the target live broadcast data returned by the target message queue includes: receiving the live broadcast data returned by the target message queue and matching the picture timestamp.
6. A method for displaying a game screen, characterized in that: include: When the virtual game match participated by the second game client is a virtual game match corresponding to the internal logic service provided in the first game client, obtaining a target spectator request triggered on the first game client, wherein the target spectator request is used to request that a game screen of the virtual game match be synchronously displayed in the first game client; In response to the target spectator request, a communication connection relationship is established between the first game client and a target virtual server, wherein the target virtual server includes a group of target processes, the target processes are processes deployed in the cloud, and the number of processes in the group of target processes is set to be adjusted according to the target spectator load associated with the virtual game match, and the target spectator load is the number of resources carried by the target process when the virtual game match is being spectated; receiving target live broadcast data of the virtual game match sent by the target virtual server through the communication connection relationship, wherein the target live broadcast data is data of a game screen of the virtual game match to be synchronously displayed in the first game client; The game screen of the virtual game game is synchronously displayed in the first game client.
7. The method according to claim 6, characterized in that After obtaining the target spectator request triggered on the first game client, including: Sending the target spectator request to a spectator management process, wherein the spectator management process is used to query the game information of the virtual game game; When valid game information returned by the spectator management process is obtained, the first game client is set to a spectator state, wherein the valid game information is the game information of the virtual game game queried by the spectator management process, and the first game client in the spectator state is allowed to establish the communication connection relationship with the target virtual server.
8. The method according to claim 7, characterized in that The step of sending the target spectator request to the spectator management process includes: The target viewing request is sent to a non-match viewing management process, and the non-match viewing management process forwards the target viewing request to a match viewing management process.
9. The method according to claim 7, characterized in that: The establishing of a communication connection relationship between the first game client and the target virtual server includes: The communication connection relationship between the first game client and the target virtual server is established according to the address information of the target virtual server contained in the game validity information.
10. The method according to any one of claims 6 to 9, characterized in that Before obtaining the target spectator request triggered on the first game client, the method includes: Displaying a target viewing interface of the first game client, wherein the target viewing interface displays a viewing logo corresponding to a game match in which at least one client participates, and the at least one client includes the second game client; The obtaining of the target viewing request triggered on the first game client includes: obtaining the target viewing request in case of a selection operation triggered on obtaining a target viewing identifier, wherein the viewing identifier corresponding to the game match in which the at least one client participates includes the target viewing identifier.
11. The method according to any one of claims 6 to 9, characterized in that The method further comprises: Obtaining a target running request triggered on the first game client, wherein the target running request is used to run a target virtual game on the first game client, and a game of the target virtual game includes the virtual game game; The game running screen of the target virtual game in which the first game client participates is displayed.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 11 when executed.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.
14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 11 through the computer program.
Citation Information
Patent Citations
Game watching method and device, electronic equipment and storage medium
CN111821696A