Data processing method, device, equipment and storage medium
By establishing a binding relationship between cloud devices and streaming proxy services, and obtaining and encapsulating game live video streams, the problem of excessive burden on cloud servers is solved, and large-scale live broadcasts and delay reduction is achieved.
Patent Information
- Application Number
- CN202111200195.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-14
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-10-14
AI Technical Summary
In the existing cloud game live broadcast service architecture, the operating burden of cloud servers is too heavy, resulting in cloud game live broadcast being limited to small-scale virtual rooms and high latency.
By establishing a binding relationship between cloud devices and streaming proxy services, using streaming proxy services to obtain game live video streams, and sending them to the viewing terminal through encapsulation policies, reducing the burden on cloud servers.
The ability to broadcast a large-scale live broadcast has been realized, reducing the delay in the live broadcast of cloud games.
Smart Images

Figure CN113926185B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Art
[0002] In the target cloud game live broadcast scenario, cloud players can create virtual rooms for live broadcast while playing cloud games. The cloud servers running cloud games in the existing cloud game live broadcast service architecture need to have powerful graphics computing and data processing capabilities. In this way, when the cloud player triggers the business control instruction stream through the cloud player terminal, the cloud service can render the corresponding game scene according to the business control instruction stream sent by the cloud player terminal to obtain the audio and video stream for sending to the cloud player user and the viewing user. Obviously, for the audio and video streams received by the cloud player user and the audio and video streams received by the viewing user, they are all rendered by the same cloud service. This means that for the existing cloud game live broadcast service architecture, there will be a phenomenon of excessive operating burden on the cloud server used to run cloud games, which makes the cloud game live broadcast scenario limited to small-scale virtual rooms, and during the live broadcast process, it is limited by the user's device, platform and other aspects of the configuration, resulting in high live broadcast delay. Summary of the Invention
[0003] The embodiments of the present application provide a data processing method, apparatus, device, and storage medium that can achieve large-scale live broadcast capabilities and reduce the delay of cloud gaming during live broadcasts.
[0004] An embodiment of the present application provides a data processing method, including:
[0005] Determining a target streaming proxy service having a binding relationship with a target cloud device, the target cloud device being used to run the cloud game associated with the first object;
[0006] Sending a video stream acquisition request to a target cloud device through a target stream proxy service, so that when the target cloud device configures a virtual room for the first object, the target cloud device returns a live game video stream associated with the first object through the target stream proxy service, where the live game video stream is generated by the target cloud device when it obtains a service control instruction stream triggered by the first object;
[0007] The encapsulation strategy of the live game video stream is obtained, and the encapsulated video stream corresponding to the live game video stream is determined based on the encapsulation strategy. The encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0008] An embodiment of the present application provides a data processing method, including:
[0009] Obtaining, by a target stream proxy service having a binding relationship with a target cloud device, a video stream acquisition request sent by the live streaming service, where the target cloud device is used to run a cloud game associated with the first object;
[0010] When configuring a virtual room for the first object, determining a game live video stream associated with the first object, where the game live video stream is generated when a service control instruction stream triggered by the first object is obtained;
[0011] The game live video stream is returned to the live streaming service through the target stream proxy service. The live streaming service is used to obtain the encapsulation strategy of the game live stream and determine the encapsulated video stream corresponding to the game live video stream based on the encapsulation strategy. The encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0012] An embodiment of the present application provides a data processing device, including:
[0013] a target stream proxy service determination module, configured to determine a target stream proxy service having a binding relationship with a target cloud device, the target cloud device being configured to run a cloud game associated with the first object;
[0014] a video stream acquisition request sending module, configured to send a video stream acquisition request to a target cloud device via a target stream proxy service, so that the target cloud device, when configuring a virtual room for the first object, returns a live game video stream associated with the first object via the target stream proxy service, wherein the live game video stream is generated by the target cloud device when it obtains a service control instruction stream triggered by the first object;
[0015] The encapsulated video stream determination module is used to obtain the encapsulation strategy of the game live video stream, and determine the encapsulated video stream corresponding to the game live video stream based on the encapsulation strategy. The encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0016] The method is performed by a live streaming server, wherein the live streaming server stores an address list associated with N stream proxy servers, where N is a positive integer, one stream proxy server corresponds to one address, and the N stream proxy servers include a target stream proxy server for running a target stream proxy service;
[0017] The target stream proxy server determination module includes:
[0018] A startup notification receiving unit, configured to receive a startup notification sent by a target cloud device based on a communication relationship between the live streaming server and the target cloud device, wherein the startup notification is generated by the target cloud device based on a target device identifier of the target cloud device;
[0019] a candidate stream proxy server acquiring unit, configured to acquire a candidate stream proxy server from the N stream proxy servers and acquire an address of the candidate stream proxy server from an address list;
[0020] a service query request sending unit, configured to generate a service query request based on a target device identifier, and send the service query request to a candidate stream proxy server via an address, so that the candidate stream proxy server matches the target device identifier with a candidate device identifier of a cloud device bound to the candidate stream proxy server, and obtains a matching result;
[0021] The target stream proxy server determining unit is configured to receive a matching result returned by the candidate stream proxy server, and when the matching result indicates a successful match, use the candidate stream proxy server as a target stream proxy server having a binding relationship with the target cloud device.
[0022] Wherein, the method is executed by a live streaming server;
[0023] The device also includes:
[0024] An identifier acquisition module, configured to acquire the game security identifier and the target device identifier in the activation notification when receiving the activation notification sent by the target cloud device;
[0025] A device type acquisition module is used to obtain the device type of the target cloud device based on the target device identifier;
[0026] The identifier verification module is used to verify the game security identifier through the target stream proxy service and obtain the identifier verification result;
[0027] A mapping relationship establishment module is used to establish a mapping relationship between the game security identifier, the target device identifier and the device type of the target cloud device when the identifier verification result indicates that the verification is successful. The mapping relationship is used to be stored in a database server that has a data interaction relationship with the live streaming server through a database service.
[0028] The device type acquisition module includes:
[0029] a device query request generating unit, configured to generate a device query request for querying a device type of a target cloud device based on a target device identifier;
[0030] a device query request sending unit, configured to send the device query request to the database server, so that the database server obtains the device type of the target cloud device corresponding to the target device identifier based on the device query request;
[0031] The device type receiving unit is used to receive the device type of the target cloud device returned by the database server.
[0032] The identifier verification module includes:
[0033] A verification identifier acquisition unit, configured to acquire, through a target stream proxy service, a security identifier of the cloud game run by a target cloud device, and determine the acquired security identifier as a verification security identifier;
[0034] An identifier comparison unit, configured to compare the game security identifier with the verification security identifier to obtain a comparison result;
[0035] a first verification result determining unit configured to obtain an identifier verification result indicating successful verification if the comparison result indicates that the game security identifier matches the verification security identifier;
[0036] The second verification result determining unit is configured to obtain an identifier verification result indicating a verification failure if the comparison result indicates that the game security identifier does not match the verification security identifier.
[0037] Wherein, the content distribution service is used to be deployed on the content distribution server;
[0038] The device also includes:
[0039] The connection relationship establishing module is used to establish a connection relationship between the live streaming server and the content distribution server when the identifier verification result indicates that the verification is successful.
[0040] The connection relationship establishment module includes:
[0041] a connection establishment rule acquisition unit, configured to acquire the connection establishment rule protected by the mutex lock when the identifier verification result indicates that the verification is successful;
[0042] A socket changing unit, configured to change a socket established with a content distribution server from a blocking socket to a non-blocking socket;
[0043] The connection relationship establishing unit is used to establish a connection relationship between the live streaming server and the content distribution server based on a non-blocking socket and a connection establishment rule.
[0044] The device further comprises:
[0045] The encapsulated video stream sending module is used to send the encapsulated video stream to the content distribution server based on the connection relationship between the live streaming server and the content distribution server, so that the content distribution server sends the encapsulated video stream to the viewing terminal corresponding to the second object.
[0046] The encapsulated video stream determination module includes:
[0047] An encapsulation strategy acquisition unit is used to obtain the encapsulation strategy of the game live stream, which includes the device type and transmission protocol of the target cloud device;
[0048] A parsing and processing unit, configured to determine an encapsulation format that matches the device type, and parse the live game video stream based on the encapsulation format to obtain the original game video stream;
[0049] The encapsulation processing unit is used to encapsulate the original game video stream based on the transmission protocol to obtain an encapsulated video stream corresponding to the game live video stream.
[0050] An embodiment of the present application provides a data processing device, including:
[0051] a video stream acquisition request receiving module, configured to acquire, through a target stream proxy service having a binding relationship with a target cloud device, a video stream acquisition request sent by the live streaming service, where the target cloud device is configured to run a cloud game associated with the first object;
[0052] A game live video stream determination module, configured to determine a game live video stream associated with the first object when configuring a virtual room for the first object, the game live video stream being generated when a service control instruction stream triggered by the first object is obtained;
[0053] The game live video stream return module is used to return the game live video stream to the live stream service through the target stream proxy service. The live stream service is used to obtain the encapsulation strategy of the game live stream and determine the encapsulated video stream corresponding to the game live video stream based on the encapsulation strategy. The encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0054] The device further comprises:
[0055] A startup control instruction stream acquisition module is used to acquire a startup control instruction stream triggered by a first object through an access service and a streaming service, where the startup control instruction stream is triggered by the first object for a cloud game on a first game interface of a cloud gaming terminal;
[0056] A game startup video stream generation module is used to determine the service status of the target cloud device as the running state based on the startup control instruction stream, and generate a game startup video stream associated with the cloud game. The running state is used to indicate the running of the cloud game;
[0057] The game startup video stream return module is used to return the game startup video stream to the cloud play terminal through the access service and the push streaming service, so that the cloud play terminal switches the terminal interface from the first game interface to the second game interface, and displays the game screen frame corresponding to the game startup video stream on the second game interface.
[0058] Wherein, the live streaming server is used to be deployed on the live streaming server;
[0059] The device also includes:
[0060] an identifier allocation module, configured to allocate a game security identifier to the cloud game upon receiving a start-up control instruction stream, wherein the game security identifier is generated based on a start-up timestamp indicated by the start-up control instruction stream, a machine address identifier of a target cloud device, and a random parameter determined by the target cloud device;
[0061] A startup notification generation module is used to obtain a target device identifier of a target cloud device and generate a startup notification for instructing the startup of a cloud game based on the game security identifier and the target device identifier;
[0062] The startup notification sending module is used to send a startup notification to the live streaming server based on the communication relationship between the live streaming server and the target cloud device, so that the live streaming server determines the target stream proxy service that has a binding relationship with the target cloud device.
[0063] In one aspect, an embodiment of the present application provides a computer device, including: a processor and a memory;
[0064] The processor is connected to a memory, wherein the memory is used to store a computer program. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.
[0065] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.
[0066] In one aspect, embodiments of the present application provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the embodiments of the present application.
[0067] In an embodiment of the present application, when the first object (i.e., the cloud play user) uses the cloud play terminal to live broadcast cloud games, the target cloud device can be used to run the cloud game, so as to generate a live game video stream associated with the first object when receiving the business control instruction stream triggered by the first object. In addition, when the computer device running the live streaming service (i.e., the live streaming server or the stream proxy push server) determines the target stream proxy service with a binding relationship with the target cloud device, the computer device running the live streaming service can obtain the live game video stream associated with the first object through the target stream proxy service, and then obtain the encapsulated video stream corresponding to the live game video stream through the encapsulation strategy of the live game video stream, so as to facilitate the subsequent distribution to the viewing terminal corresponding to the second object in the virtual room through the content distribution service. It can be seen from this that the computer device used to run the cloud game (i.e., the target cloud device) and the computer device used to pull the live game video stream (i.e., the computer device deployed by the live streaming service) are two different computer devices, not the same computer device, and thus can achieve large-scale live broadcast capabilities in the cloud game live broadcast scenario, and reduce the operating burden of the target cloud device in the cloud game live broadcast scenario, thereby reducing the delay of the cloud game during the live broadcast process. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0069] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0070] Figure 2 This is a schematic diagram of a data interaction scenario provided by an embodiment of the present application;
[0071] Figure 3 This is a flow chart of a data processing method provided in an embodiment of the present application;
[0072] Figure 4 This is a schematic diagram of a scenario for starting a cloud game provided by an embodiment of the present application;
[0073] Figure 5 This is a schematic diagram of a scenario in which a second object enters a virtual room, provided by an embodiment of the present application;
[0074] Figure 6 This is a flow chart of a data processing method provided in an embodiment of the present application;
[0075] Figure 7 This is a flowchart of a live streaming service provided by an embodiment of the present application;
[0076] Figure 8 is a structural diagram of a data processing device provided in an embodiment of the present application;
[0077] Figure 9 is a structural diagram of a data processing device provided in an embodiment of the present application;
[0078] Figure 10 is a schematic diagram of a computer device provided in an embodiment of the present application;
[0079] Figure 11 It is a structural diagram of a data processing system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0080] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0081] The cloud gaming service architecture in the embodiments of the present application involves cloud technology, cloud computing, and cloud gaming, and can be applied to cloud gaming live streaming scenarios. While playing a cloud game, a first subject (e.g., a cloud player) can also create a virtual room and interact with other second subjects (e.g., viewing users) who enter the virtual room, thereby increasing the first subject's sense of immersion and accomplishment during the cloud gaming live streaming process.
[0082] Cloud technology refers to a managed technology that unifies hardware, software, and network resources within a wide or local area network (WAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network, information technology, integration technology, management platform technology, and application technology, all based on the cloud computing business model. It can form a resource pool for on-demand, flexible, and convenient use. Cloud computing will become a crucial support. Backend services for technical network systems, such as those for video sites, image sites, and more portals, require significant computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identifier, requiring transmission to backend systems for logical processing. Data of varying levels will be processed separately, and data from all industries will require robust system support, which can only be achieved through cloud computing.
[0083] Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud." From the user's perspective, the resources in the "cloud" are infinitely scalable and can be accessed at any time, used on demand, expanded at any time, and paid for on a per-use basis. As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established. Various types of virtual resources will be deployed in the resource pool for external customers to choose from. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0084] Cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing. Cloud gaming technology enables thin clients with relatively limited graphics and data processing capabilities to run high-quality games. In a cloud gaming scenario, the game is not played on the player's gaming terminal (i.e., the cloud gaming terminal), but rather on a cloud server (i.e., the cloud device). The cloud server renders the game scene into an audio and video stream, which is transmitted to the player's gaming terminal over the network. The player's gaming terminal does not need powerful graphics and data processing capabilities; it only needs basic streaming media playback capabilities and the ability to receive player input commands and transmit them to the cloud server.
[0085] See Figure 1 , Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a cloud gaming terminal 110a, a cloud device 100Y, an access server 1100F, a streaming server 1200F, a streaming proxy server 1300F having a binding relationship with the cloud device 100Y, a live streaming server 1400F, a content distribution server 1500F, and a viewing terminal cluster. The viewing terminal cluster may include one or more viewing terminals, and the number of viewing terminals is not limited here. Figure 1 As shown, the viewing terminal cluster may specifically include viewing terminal 120a, viewing terminal 120b, ..., viewing terminal 120n. Viewing terminal 120a, viewing terminal 120b, ..., viewing terminal 120n may each establish a network connection with the content distribution server 1500F, so that each viewing terminal may interact with the content distribution server 1500F via the network connection.
[0086] Among them, the embodiment of the present application can refer to the cloud play terminal 110a and each viewing terminal in the viewing terminal cluster as a user terminal, and the user terminal can include: smart phones, tablet computers, laptops, desktop computers, smart speakers, smart watches, car terminals, smart TVs and other smart terminals with data processing functions. It should be understood that the user terminals can all be installed with target applications (i.e., application clients, for example, cloud game clients). The cloud game client (also known as the cloud game platform) includes M cloud games, where M is a positive integer, but the game packages of these M cloud games do not need to be installed in the user terminal.
[0087] Among them, the cloud play terminal 110a here can be a user terminal corresponding to the cloud play user. The cloud play user here can start any one of the M cloud games in the cloud game client, and the cloud play user can also create a virtual room for live broadcasting the cloud game during the process of playing the cloud game. Among them, the embodiment of the present application can refer to the cloud play user corresponding to the cloud play terminal 110a as the first object. It should be understood that the cloud play terminal 110a does not need to have powerful graphics computing and data processing capabilities, but only needs to have basic streaming media playback capabilities and the ability to obtain the control instruction stream of the first object and send it to the cloud device 100Y. For example, when the cloud play terminal obtains a control instruction stream such as a business control instruction stream or starts a control instruction stream, it can Figure 1 The access server 1100F and the streaming server 1200F shown are sent to the cloud device 100Y, so that the cloud device 100Y returns the audio and video stream associated with the first object.
[0088] The cloud device 100Y (i.e., the target cloud device) here can be a computer device that actually runs the cloud game (for example, a cloud server that provides cloud computing services). The device type of the cloud device 100Y can include a board type, a container type, etc. Among them, the board refers to the host device of the cloud game, which is similar to a separate mobile phone and is represented by a hardware motherboard. The container refers to the host device of the cloud game, which is similar to a separate mobile phone. It is usually divided into multiple containers by a virtual machine, and each container has an independent operating system and software running environment.
[0089] Among them, the access server 1100F, the push stream server 1200F, the stream proxy server 1300F, the live stream server 1400F, and the content distribution server 1500F in the embodiment of the present application can all be computer devices (for example, servers) running different business services. It is understandable that the server in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, which is not limited here.
[0090] It is understandable that the embodiment of the present application can deploy the access service and the push streaming service on separate computer devices respectively. For example, the push streaming server 1200F can be a computer device running a push streaming service (relaysvr), and the push streaming service here can be used to transmit the audio and video stream of the cloud device 100Y and the control instruction stream of the cloud playing user. The access server 1100F can be a computer device running an access service (relayproxy), and the access service here can be used to provide the same access to the cloud game to the outside world, and transmit the audio and video stream of the cloud device and the control instruction stream of the cloud playing user together with the corresponding push streaming service. Optionally, the embodiment of the present application can also deploy the access service and the push streaming service together on the same computer device, which is not limited here. Among them, the control instruction refers to the touch event that the user performs a trigger operation during the cloud game.
[0091] It is understandable that the embodiment of the present application can deploy the stream proxy service (streamsvr) and the live streaming service (also known as CDN live streaming server, cdnlivesvr) on separate computer devices respectively. Among them, the embodiment of the present application can refer to the stream proxy service having a binding relationship with the cloud device 100Y as a target stream proxy service. For example, the stream proxy server 1300F can be a computer device running a target stream proxy service, and the stream proxy server here can pull another audio and video stream from the cloud device 100Y for live broadcast while the cloud device 100Y transmits the audio and video stream to the cloud play terminal 110a. The live streaming server 1400F can be a computer device running a live streaming service, and the live streaming service can be used to obtain the audio and video stream for live broadcast (i.e., game live video stream) from the stream proxy service, and then the game live video stream can be encapsulated and processed by the transmission protocol in the encapsulation strategy (e.g., real-time message transmission protocol) to send the encapsulated game live video stream to the content distribution server 1500F. The transmission protocol can be the Real Time Messaging Protocol (RTMP), which can be based on the Transmission Control Protocol (TCP), and is a protocol family used for the transmission of audio and video streams. Optionally, since the stream proxy service is used for back-source merging and outputs a naked audio and video stream to the outside world, and the live streaming service can also be used for back-source merging, all audio and video streams associated with the cloud game live broadcast scene are output and managed by the live streaming service. Therefore, the embodiment of the present application can also merge the stream proxy service and the live streaming service to obtain a unified stream proxy push service provided to the outside world, and then the stream proxy push service can be deployed on a certain computer device (i.e., the stream proxy push server). That is, the embodiment of the present application can deploy the stream proxy service and the live streaming service on the same computer device, which is not limited here.
[0092] Among them, the content distribution server 1500F can be a computer device running a content distribution service (also known as a cloud live broadcast service), which can distribute the encapsulated game live video stream through a CDN. Among them, CDN (Content Delivery Network) refers to a content distribution network, also known as a content delivery network, which is an intelligent virtual network built on the basis of an existing network. It relies on edge servers deployed in various places to enable users to obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate. It can be understood that the streaming end (i.e., a computer device deployed with a streaming proxy service) can push the stream to the content distribution server 1500F through the RTMP protocol, and the playback end (i.e., the viewing terminal) can play a low-latency live video stream through web instant messaging. Among them, the web instant messaging (Web Real-Time Communication, abbreviated as WebRTC) here is an application programming interface (Application Programming Interface, abbreviated as API) that supports web browsers to conduct real-time voice or video conversations.
[0093] like Figure 1 As shown, the viewing terminals in the viewing terminal cluster here can include viewing terminals corresponding to the second object and viewing terminals corresponding to the third object, without limitation. It is understood that the second object here is in the same virtual room as the first object, that is, it can interact with the first object in the virtual room. The third object can refer to a user who watches the video address of the live video stream associated with the first object after the first object's live broadcast ends, rather than a user in the virtual room.
[0094] It should be understood that when the first object (i.e., the cloud play user) uses the cloud play terminal 110a to live broadcast the cloud game scene, the cloud device 100Y can be used to run the cloud game to generate a live game video stream when the business control instruction stream triggered by the first object is received. In addition, since the cloud device 100Y has a binding relationship with the target stream proxy service, the computer device running the live streaming service (i.e., the live streaming server or the stream proxy push server) can obtain the encapsulated video stream corresponding to the live game video stream associated with the first object through the target stream proxy service, so that it can be subsequently sent to the viewing terminal through the content distribution service. It can be seen that the computer device used to run the cloud game (i.e., the cloud device 100Y) and the computer device used to pull the live game video stream (i.e., the server deployed by the live streaming service) are two different computer devices, not the same computer device, so that the operating burden of the target cloud device is reduced in the live cloud game scene, thereby reducing the delay of the cloud game during the live broadcast process.
[0095] For further understanding, please refer to Figure 2 , Figure 2 This is a schematic diagram of a data interaction scenario provided by an embodiment of the present application. Figure 2 As shown, the cloud play terminal 210a in the embodiment of the present application is a user terminal used by the first object (for example, a cloud play user) when playing a cloud game (for example, a competition game). The cloud play terminal 210a can be the above-mentioned Figure 1 The cloud gaming terminal 110a in the corresponding embodiment. The cloud device 200Y in the embodiment of the present application can be used to run the cloud game associated with the first object. The cloud device 200Y can be the above-mentioned Figure 1 The cloud device 100Y in the corresponding embodiment. The streaming proxy push server 2000F in the embodiment of the present application can run a computer device with a streaming proxy push service, wherein the streaming proxy push service here is obtained by merging the streaming proxy service and the live streaming service. The number of streaming proxy services here can be N, where N is a positive integer, and these N streaming proxy services include a target streaming proxy service that has a binding relationship with the cloud device 200Y. Among them, the number of cloud devices bound to a streaming proxy service can be one or more, and it will not be limited here.
[0096] like Figure 2 As shown, during the process of playing the cloud game, the first object can perform a trigger operation on the cloud play terminal 210a, so that the cloud play terminal 210a generates a business control instruction stream associated with the trigger operation. The trigger operation here may include contact operations such as clicking and long pressing, and may also include non-contact operations such as voice and gestures, which will not be limited here. Furthermore, the cloud play terminal 210a can send the business control instruction stream to the cloud device 200Y, so that the cloud device 200Y generates a game live video stream associated with the first object (for example, Figure 2 In addition, when the first subject is playing the cloud game, a room creation operation can be performed on the cloud play terminal 210a (for example, a trigger operation can be performed on the room creation control) to generate a room creation instruction stream for sending to the cloud device 200Y, thereby causing the cloud device 200Y to configure a virtual room for the first subject.
[0097] It should be understood that when the streaming proxy push server 2000F triggers the video stream acquisition mechanism, it can determine the target streaming proxy service that has a binding relationship with the cloud device 200Y from the N streaming proxy services. Among them, the triggering condition of the video stream acquisition mechanism here can refer to the streaming proxy push server 2000F receiving the startup notification sent by the cloud device 200Y (i.e., a business notification for indicating the startup of the cloud game), or it can refer to the streaming proxy push server 2000F receiving the room configuration notification sent by the cloud device 200Y (i.e., a business notification for configuring a virtual room for the first object), or it can refer to the streaming proxy push server 2000F receiving the object access notification sent by the cloud device 200Y (i.e., a business notification for the second object to enter the virtual room), which will not be limited here.
[0098] Furthermore, the stream proxy push server 2000F can send a video stream acquisition request to the cloud device 200Y through the target stream proxy service, so that the cloud device 200Y can obtain the game live video stream 21z associated with the first object when configuring a virtual room for the first object. At this time, the cloud device 200Y can return the game live video stream 21z to the stream proxy push server 2000F through the target stream proxy service. Furthermore, the stream proxy push server 2000F can obtain the encapsulation strategy of the game live video stream 21z, and then can encapsulate the game live video stream 21 based on the encapsulation strategy to obtain an encapsulated video stream (for example, Figure 2 The encapsulated video stream 22z shown in FIG. 2 may be used to be delivered to a viewing terminal corresponding to a second object in the same virtual room as the first object via a content distribution service.
[0099] It can be seen from this that the cloud device 200Y used to run cloud games and the streaming proxy server 2000F used to pull the live game video stream belong to two different computer devices, and are not deployed on the same computer device. This not only can achieve large-scale live broadcast capabilities, but also can reduce the operating burden of the cloud device 200Y, thereby reducing the delay of cloud games during the live broadcast process.
[0100] Among them, after the computer device running the live streaming service determines the target stream proxy service that has a binding relationship with the target cloud device, the specific implementation method of obtaining the game live video stream associated with the first object returned by the target cloud device through the target stream proxy service can be referred to below Figure 3-Figure 7 The corresponding embodiment.
[0101] Further, see Figure 3 , Figure 3 This is a flow chart of a data processing method provided by an embodiment of the present application. Figure 3As shown, the method can be executed by a computer device running a live streaming service, and the computer device can be a live streaming server running a live streaming service separately (for example, the above Figure 1 The live streaming server 1300F shown in FIG. 1 may also be a streaming proxy push streaming server running a streaming proxy inference service (e.g., the above-mentioned Figure 2 The streaming proxy push streaming server 2000F shown in the figure is not limited here. The streaming proxy push streaming service here is obtained by merging the streaming proxy service and the live streaming service. For ease of understanding, the embodiment of the present application takes the method executed by the live streaming server as an example to illustrate, and the method may at least include the following steps S101-S103:
[0102] Step S101: determining a target stream proxy service that has a binding relationship with a target cloud device.
[0103] Among them, the live streaming server stores an address list associated with N stream proxy servers, N is a positive integer, one stream proxy server corresponds to one address, and the N stream proxy servers include a target stream proxy server for running the target stream proxy service. Specifically, when the live streaming server needs to obtain the live video stream of the game associated with the first object, it needs to determine the target stream proxy server that has a binding relationship with the target cloud device from the N stream proxy servers in advance, that is, when the live streaming server triggers the video stream acquisition mechanism, it can determine the target stream proxy server that has a binding relationship with the target cloud device from the N stream proxy servers. The target cloud device here can be a cloud game associated with the first object (for example, a cloud play user).
[0104] Among them, the triggering condition of the video stream acquisition mechanism here (for example, trigger condition 1) may refer to the live streaming server receiving a startup notification sent by the target cloud device (i.e., a business notification for indicating the start of the cloud game). Optionally, the triggering condition of the video stream acquisition mechanism (for example, trigger condition 2) may refer to the live streaming server receiving a room configuration notification sent by the target cloud device (i.e., a business notification for configuring a virtual room for the first object). Optionally, the triggering condition of the video stream acquisition mechanism (for example, trigger condition 3) may refer to the live streaming server receiving an object access notification sent by the target cloud device (i.e., a business notification for the second object to enter the virtual room), which will not be limited here.
[0105] It should be understood that the target cloud device can obtain the startup control instruction stream triggered by the first object through the access service and the push streaming service. The startup control instruction stream here is triggered by the first object for the cloud game on the first game interface of the cloud play terminal. Furthermore, the target cloud device can determine the business status of the target cloud device as the running state based on the startup control instruction stream, and generate a game startup video stream associated with the cloud game. The running state can be used to indicate that the target cloud device is running a cloud game. At this time, the target cloud device can return the game startup video stream to the cloud play terminal through the access service and the push streaming service, so that the cloud play terminal switches the terminal interface from the first game interface to the second game interface, and displays the game screen frame corresponding to the game startup video stream on the second game interface.
[0106] It is understandable that when the target cloud device receives the startup control instruction stream, it can also assign a game security identifier (SID) to the cloud game. The game security identifier here is generated based on the startup timestamp indicated by the startup control instruction stream, the machine address identifier of the target cloud device, and the random parameters determined by the target cloud device. Furthermore, the target cloud device can obtain the target device identifier of the target cloud device, and then generate a startup notification for indicating the startup of the cloud game based on the game security identifier and the target device identifier.
[0107] For further understanding, please refer to Figure 4 , Figure 4 This is a schematic diagram of a scenario for starting a cloud game provided by an embodiment of the present application. Figure 4 As shown, the cloud play terminal 410a in the embodiment of the present application can be a user terminal used by the first object (for example, object A) when playing cloud games. The cloud play terminal 410a can be the above-mentioned Figure 1 The cloud gaming terminal 110a in the corresponding embodiment. The cloud device 400Y in the embodiment of the present application can be used to run the cloud game associated with the object A. The cloud device 400Y can be the above-mentioned Figure 1 The cloud device 200Y in the corresponding embodiment.
[0108] like Figure 4 As shown, when object A needs to play a cloud game, it can perform a trigger operation on the cloud game client in the cloud game terminal 410a, so that the cloud game terminal 410a can display the first game interface associated with M cloud games (for example, Figure 4 The game interface 410J shown in FIG. 4 is a diagram showing a game interface 410J, where M is a positive integer. Figure 4As shown, the number of cloud games in the game interface 410J can be 4, for example, including cloud game 1, cloud game 2, cloud game 3 and cloud game 4. Further, object A can select a cloud game (for example, cloud game 4) from the 4 cloud games in the game interface 410J, that is, the object A can target Figure 4 The control 41K shown (for example, the "second play" control associated with the cloud game 4) performs a trigger operation, so that the cloud play terminal 410a can generate a start control instruction flow for starting the cloud game 4 (for example, Figure 4 Furthermore, the cloud play terminal 410a can send the start control instruction flow 4c to the cloud play terminal 410a through the access service and the push service. Figure 4 The cloud device 400Y shown. It is understandable that the cloud play terminal 410a can send the start control instruction stream 4c to the access server running the access service, and then the start control instruction stream 4c can be transmitted to the push stream server running the push stream service through the access server, so that the push stream server sends the start control instruction stream 4c to the cloud device 400Y.
[0109] At this time, the cloud device 400Y can determine the business state of the cloud device 400Y as the running state based on the startup control instruction flow. The running state here can be used to indicate that the cloud device 400Y is running the cloud game 4. At the same time, the cloud device 400Y can also generate a game startup video stream associated with the cloud game 4 (for example, Figure 4 Furthermore, the cloud device 400Y can return the game startup video stream 40z to the cloud play terminal 410a through the push streaming service and the access service. It is understood that the cloud device 400Y can send the game startup video stream 40z to the push streaming server, and then transmit the game startup video stream 40z to the access server through the push streaming server, so that the access server returns the game startup video stream 40z to the cloud play terminal 410a.
[0110] It should be understood that when the cloud play terminal 410a receives the game start video stream 40z, the cloud play terminal 410a can switch the terminal interface of the cloud play terminal 410a from the game interface 410J to the second game interface (for example, Figure 4 The game interface 420J shown in FIG. 40A can then display the game screen frame corresponding to the game startup video stream 40z on the game interface 420J. The game interface 420J can also include a control 42K, which can be used to instruct object A to create a room creation control for a virtual room.
[0111] It is understandable that when the cloud device 400Y receives the startup control instruction stream 4c sent by object A, it can also assign a game security identifier to the cloud game 4. Among them, the cloud device 400Y can obtain the startup timestamp indicated by the startup control instruction stream 4c. Furthermore, the cloud device 400Y can obtain the machine address identifier (for example, media access control address) of the cloud device 400Y and generate a random parameter for the cloud game 4. Among them, the Media Access Control Address (MAC address) is also called a local area network address (LAN Address), an Ethernet address (Ethernet Address) or a physical address (Physical Address). It is an address used to confirm the location of a network device (i.e., the cloud device 400Y).
[0112] At this time, the cloud device 400Y can generate a universal unique identifier (UUID) based on the startup timestamp, the machine address identifier, and the random parameter to indicate that the object A is currently playing the cloud game 4, and can then use the UUID as the game security identifier assigned to the cloud game 4. Furthermore, the cloud device 400Y can also obtain the target device identifier of the cloud device 400Y, and can then generate a startup notification indicating the startup of the cloud game 4 based on the game security identifier and the target device identifier.
[0113] In addition, when object A is playing a cloud game, a room creation operation can be performed on the control 42K in the game interface 420J, so that the cloud play terminal 410a generates a room creation instruction stream for sending to the cloud device 400Y, and then the cloud play terminal 410a can send the room creation instruction stream to the cloud device 400Y through the access service and the push stream service, so that the cloud device 400Y configures a virtual room for the object A. Among them, the specific implementation method of the cloud play terminal 410a sending the room creation instruction stream can refer to the specific implementation method of the cloud play terminal 410a sending the start control instruction stream, which will not be repeated here. In this way, when other objects of the cloud game client need to watch the live game video stream associated with object A, they can perform a trigger operation on the virtual room associated with object A in the viewing terminal corresponding to other objects, so that they can enter the virtual room of object A. At the same time, when the cloud device 400Y receives the room creation instruction stream triggered by object A, it can generate a room configuration notification for indicating the creation of a virtual room for object A.
[0114] For further understanding, please refer to Figure 5 , Figure 5 Schematic diagram of a scenario in which a second object enters a virtual room, provided by an embodiment of the present application. Figure 5As shown, the game interface 510J in the embodiment of the present application can be the first game interface displayed by the terminal interface of other objects (e.g., object B) of the cloud game client, that is, the game interface where the homepage is located. Among them, the display area 5Q1 in the game interface 510J (i.e., the display area where the popular relay room is located) can be used to display virtual rooms with higher popularity parameters. Since the display interface of the display area 5Q1 is limited, object B can perform a trigger operation (e.g., a left swipe operation) on the display area 5Q1 to view other virtual rooms.
[0115] It is understandable that object B can determine the virtual room of the first object (e.g., object A) in the cloud game client, and then enter the virtual room of the first object to obtain the live game video stream associated with object A. If the virtual room configured by the target cloud device for object A belongs to the first room type (e.g., a non-popular room type), the game room displayed in the display area 5Q1 of the game interface 510J does not include the virtual room of object A. At this time, object B can perform a trigger operation on the control 51K (e.g., the "room" control) in the game interface 510J, so that the user terminal corresponding to object B switches the terminal interface from the game interface 510J to the game interface 520J. Among them, the display area 5Q2 of the game interface 520J can be used to display all virtual rooms associated with the cloud game client. When object B needs to enter the virtual room of object A to watch users in the virtual room, object B can perform a trigger operation on the virtual room of object A displayed in the display area 5Q2, thereby causing the user terminal of object B to generate a room entry instruction stream. At this point, the user terminal of object B can send a room entry instruction stream to the target cloud device through the access service and the streaming service, so that the target cloud device generates an object access notification for instructing object B to enter the virtual room of object A. In this embodiment of the present application, object B entering object A's virtual room can be referred to as the second object in the virtual room, and the user terminal of object B can be referred to as the viewing terminal corresponding to the second object. Furthermore, when object B successfully enters object A's virtual room, the viewing terminal corresponding to object B can directly switch the terminal interface from game interface 520J to game interface 530J.
[0116] Optionally, if the virtual room configured by the target cloud device for object A belongs to the second room type (e.g., a popular room type), the game room displayed in display area 5Q1 of game interface 510J may include object A's virtual room. In this case, object B can directly perform a trigger operation on object A's virtual room in display area 5Q1, thereby entering object A's virtual room and becoming a viewing user in the virtual room. It is understood that when object B successfully enters object A's virtual room, the viewing terminal corresponding to object B can directly switch the terminal interface from game interface 510J to game interface 530J.
[0117] Among them, the game interface 530J may include a control 52K, where the control 52K can be used to instruct the second object to trigger the business control instruction flow in the cloud game instead of the first object. Among them, the game interface 530J can be used to display the display data associated with the virtual room of object A. For example, the display area 5Q3 in the game interface 530J can be used to display the audio and video data associated with the cloud game generated when the target cloud device obtains the business control instruction flow triggered by object A. The display area 5Q4 in the game interface 530J is used to display the audio and video data or text data generated when object A interacts with the second object in the virtual room during the live broadcast of object A, which is obtained by the cloud device. The display area 5Q5 in the game interface 530J is used to instruct object B to input text data or audio data, etc.
[0118] It should be understood that, for ease of explanation, the video stream acquisition mechanism triggered by the live streaming server in the embodiment of the present application can take trigger condition 1 as an example to illustrate that the live streaming server determines the target stream proxy server that has a binding relationship with the target cloud device from N stream proxy servers. It can be understood that since the live streaming server and the target cloud device can communicate through a message queue, the live streaming server can receive a startup notification sent by the target cloud device based on the communication relationship between the live streaming server and the target cloud device, so that the live streaming server can determine the target stream proxy server that has a binding relationship with the target cloud device.
[0119] Among them, the stream proxy service can be used to transfer network requests and data responses between business services (for example, live broadcast services) and the cloud devices to which they are bound, and has a certain back-to-source convergence function. For example, the target stream proxy service can not only provide a proxy function, that is, the business side (viewing terminal) does not need to know the existence of the target cloud device, but also provide a back-to-source convergence function, that is, multiple business parties (for example, multiple viewing terminals) request a live game video stream, and the target stream proxy service only needs to provide one video stream from the cloud device 100Y to achieve global convergence, and then send the obtained video stream to the live streaming server, so that the live streaming server can save and send the current video stream.
[0120] Furthermore, the live streaming server can obtain a candidate stream proxy server from the N stream proxy servers and obtain the address of the candidate stream proxy server from the address list. At this time, the live streaming server can generate a service query request based on the target device identifier and then send the service query request to the candidate stream proxy server via the address, so that the candidate stream proxy server matches the target device identifier with the candidate device identifier of the cloud device bound to the candidate stream proxy server to obtain a matching result. Furthermore, the live streaming server can receive the matching result returned by the candidate stream proxy server and, if the matching result indicates a successful match, use the candidate stream proxy server as the target stream proxy server bound to the target cloud device.
[0121] For ease of understanding, further reference is made to Table 1, which is a list of addresses associated with N stream proxy servers provided in an embodiment of the present application, wherein one stream proxy server corresponds to one address.
[0122] Table 1
[0123] Streaming Proxy Server address <![CDATA[Flow proxy server F1]]> <![CDATA[Address D1]]> <![CDATA[Flow proxy server F2]]> <![CDATA[Address D2]]> … … <![CDATA[Flow proxy server F N > <![CDATA[Address D N >
[0124] As shown in Table 1, the address corresponding to the stream proxy server F1 is address D1, the address corresponding to the stream proxy server F2 is address D2, and so on. N The corresponding address is address D N . It is understandable that one stream proxy server can correspond to one cloud device, that is, one stream proxy server has a binding relationship with one cloud device. Optionally, one stream proxy server can also correspond to multiple cloud devices, that is, one stream proxy server has a binding relationship with each of the multiple cloud devices. Among them, the number of cloud devices that have a binding relationship with the stream proxy server is not limited here. For example, the cloud devices that have a binding relationship with the stream proxy server F1 may include: cloud device Y 11 , cloud device Y 12 and cloud device Y13 ; The cloud devices having a binding relationship with the stream proxy server F2 may include: cloud device Y 21 ; ...; The cloud devices having a binding relationship with the stream proxy server F3 may include: cloud device Y N1 and cloud device Y N2 .
[0125] It should be understood that the live streaming server in the embodiment of the present application can obtain a candidate stream proxy server from the N stream proxy servers shown in Table 1. For example, the live streaming server can determine the stream proxy server F1 as a candidate stream proxy server, and then obtain the address of the candidate stream proxy server from the address list (for example, address D1 shown in Table 1). It is understandable that the live streaming server can determine the target device identifier (for example, device identifier S) of the target cloud device from the startup notification sent by the target cloud device. Furthermore, the live streaming server can generate a service query request for sending to the stream proxy server F1 based on the target device identifier, and then send the service query request to the stream proxy server F1 via address D1.
[0126] It is understandable that when the flow proxy server F1 receives the service query request, it can determine the candidate device identifiers of the cloud devices that have a binding relationship with the flow proxy server F1 (for example, cloud device Y 11 Device identifier S 11 , cloud device Y 12 Device identifier S 12 , cloud device Y 13 Device identifier S 13 ), the target device identifier (e.g., device identifier S) in the service query request can be matched with the three candidate device identifiers to obtain a matching result. If there is a candidate device identifier among the candidate device identifiers that matches the target device identifier in the service query request, a matching result indicating a successful match is obtained. Alternatively, if there is no candidate device identifier among the candidate device identifiers that matches the target device identifier, a matching result indicating a failed match is obtained.
[0127] It should be understood that the live streaming server can receive the matching result returned by the stream proxy server F1. When the matching result indicates a successful match, the live streaming server can use the stream proxy server F1 as the target stream proxy server with a binding relationship to the target cloud device. Optionally, when the matching result indicates a failed match, the live streaming server can determine that the stream proxy server F1 does not have a binding relationship with the target cloud device. In this case, the live streaming server can continue to obtain the stream proxy server F2 as a candidate stream proxy server from the N stream proxy servers, and then query whether the candidate device identifier of the cloud device bound to the stream proxy server F2 matches the target device identifier, and so on, until a target stream proxy server with a binding relationship to the target cloud device is determined.
[0128] Step S102: Send a video stream acquisition request to the target cloud device through the target stream proxy service, so that the target cloud device returns the game live video stream associated with the first object through the target stream proxy service when configuring a virtual room for the first object.
[0129] Specifically, upon obtaining a target stream proxy server that has a binding relationship with a target cloud device, the live streaming server may generate a video stream acquisition request for transmission to the target cloud device. It is understood that upon receiving the video stream acquisition request via the target stream proxy service running on the target stream proxy server, the target cloud device may determine the live game video stream associated with the first object when configuring a virtual room for the first object, and may then return the live game video stream to the live streaming server via the target stream proxy service.
[0130] like Figure 1As shown, since the cloud device 100Y and the live streaming server 1400F can communicate through the message queue, the live streaming server 1400f can determine the stream proxy server 1300F that has a binding relationship with the cloud device 100Y when receiving the startup notification sent by the cloud device 100Y. At this time, the live streaming server 1400F can send the generated video stream acquisition request to the cloud device 100Y through the stream proxy server 1300F, so that the cloud device 100Y can obtain the original game video stream associated with the first object when configuring the virtual room for the first object. Among them, the original game video stream here can be a first audio and video stream, a second audio and video stream, and a text data stream. Among them, the first audio and video stream here can include the audio and video stream associated with the cloud game generated by the cloud device 100Y when it obtains the business control instruction stream triggered by the first object, and the second audio and video stream here can include the audio and video stream generated when all objects in the virtual room interact during the live broadcast of the first object obtained by the cloud device 100Y. The text data stream here may include text data generated when the cloud device 100Y obtains all objects in the virtual room for interaction.
[0131] It is understandable that the device type of the cloud device is different, and the encapsulation format of the live game video stream returned by the cloud device to the live streaming server is different. For example, if the device type of the cloud device 100Y is a container type, then the embodiment of the present application can refer to the encapsulation format adopted by the cloud device 100Y when encapsulating the original game video stream as a first encapsulation format. If the device type of the cloud device 100Y is a board type, then the embodiment of the present application can refer to the encapsulation format adopted by the cloud device 100Y when encapsulating the original game video stream as a second encapsulation format. Wherein, the first encapsulation format here is different from the second encapsulation format. It is understandable that the first encapsulation format and the second encapsulation format both store video data with a video compression format (for example, H246) and audio data with an advanced audio decoding format (Advanced Audio Coding, referred to as AAC), and also store parameters such as audio and video timestamps and audio and video frame types, but due to the different storage order of each parameter during the encapsulation process, there are differences in the encapsulation format. In addition, the first encapsulation format also adds some redundant data, for example, adding a string such as 0000 at the beginning.
[0132] Therefore, after the cloud device 100Y encapsulates the original game video stream based on the device type of the cloud device 100Y, it can obtain the live game video stream associated with the first object. At this time, the cloud device 100Y can send the live game video stream to the streaming proxy server 1300F, so that the streaming proxy server 1300F returns the live game video stream to the live streaming server 1400F. In addition, when the cloud device 100Y determines the live game video stream associated with the first object, it can also return the live game video stream to the cloud play terminal 110a through the push streaming service and the access service.
[0133] Step S103: Obtain the encapsulation strategy of the live game video stream, and determine the encapsulated video stream corresponding to the live game video stream based on the encapsulation strategy.
[0134] Specifically, the live streaming server can obtain the encapsulation strategy of the live game stream. The encapsulation strategy here may include the device type of the target cloud device and the transmission protocol (for example, RTMP protocol). It should be understood that the live streaming server can determine the encapsulation format that matches the device type, and then parse the live game video stream based on the encapsulation format to obtain the original game video stream. At this time, the live video stream can encapsulate the original game video stream based on the transmission protocol to obtain an encapsulated video stream corresponding to the live game video stream. The encapsulated video stream here is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0135] In an embodiment of the present application, when the first object (i.e., the cloud play user) uses the cloud play terminal to live broadcast the cloud game, the target cloud device can be used to run the cloud game, so as to generate a live game video stream associated with the first object when receiving the business control instruction stream triggered by the first object. In addition, when the computer device running the live streaming service (i.e., the live streaming server or the stream proxy push server) determines the target stream proxy service with a binding relationship with the target cloud device, the computer device running the live streaming service can obtain the live game video stream associated with the first object through the target stream proxy service, and then obtain the encapsulated video stream corresponding to the live game video stream through the encapsulation strategy of the live game video stream, so as to facilitate the subsequent distribution to the viewing terminal through the content distribution service. It can be seen from this that the computer device used to run the cloud game (i.e., the target cloud device) and the computer device used to pull the live game video stream (i.e., the computer device deployed by the live streaming service) are two different computer devices, not the same computer device, and thus can achieve large-scale live broadcast capabilities in the cloud game live broadcast scenario, and reduce the operating burden of the target cloud device in the cloud game live broadcast scenario, thereby reducing the delay of the cloud game during the live broadcast process.
[0136] Further, see Figure 6 , Figure 6 This is a flow chart of a data processing method provided by an embodiment of the present application. Figure 6 As shown, the method can be interactively executed by the cloud play terminal corresponding to the first object, the target cloud device running the cloud game, the computer device running the live streaming service, and the viewing terminal corresponding to the second object. Figure 1 In the corresponding embodiment, the cloud gaming terminal 110a, the target cloud device can be the above Figure 1 The cloud device 100Y in the corresponding embodiment. The computer device running the live streaming service can be the above Figure 1 The live streaming server 1300F in the corresponding embodiment may also be the above Figure 2 The streaming agent push streaming server 2000F in the corresponding embodiment is not limited here. The viewing terminal corresponding to the second object can be the above-mentioned Figure 1 Any viewing terminal in the viewing terminal cluster in the corresponding embodiment, for example, viewing terminal 120a. The method may at least include the following steps S201 to S207:
[0137] In step S201, when the cloud gaming terminal of the first object obtains the start control instruction stream triggered by the first object for the cloud game, the cloud gaming terminal sends the start instruction stream to the target cloud device through the access service and the streaming service.
[0138] Specifically, the first object can perform a trigger operation on a control associated with the cloud game in the first game interface of the cloud play terminal, so that the cloud play terminal can generate a start-up control instruction stream for starting the cloud game. Furthermore, the cloud play terminal can send the start-up control instruction stream to an access server running an access service, and then the start-up control instruction stream can be transmitted to a push streaming server running a push streaming service through the access server, so that the push streaming server sends the start-up control instruction stream to the target cloud device.
[0139] In step S202, upon receiving the start control instruction stream, the target cloud device generates a start notification for instructing the start of the cloud game, and sends the start notification to a computer device running a live streaming service.
[0140] Specifically, when the target cloud device receives the start-up control instruction stream, it can assign a game security identifier to the cloud game. The game security identifier here is generated based on the start timestamp indicated by the start-up control instruction stream, the machine address identifier of the target cloud device, and the random parameters determined by the target cloud device. Furthermore, the target cloud device can obtain the target device identifier of the target cloud device, and then generate a start notification for indicating the start of the cloud game based on the game security identifier and the target device identifier. At this time, the target cloud device can send the start notification to the computer device running the live streaming service.
[0141] In step S203, the computer device running the live streaming service determines a target streaming proxy service that has a binding relationship with the target cloud device.
[0142] Specifically, a computer device running a live streaming service (e.g., a live streaming server) stores a list of addresses associated with N stream proxy servers, where N is a positive integer, one stream proxy server corresponds to one address, and the N stream proxy servers include a target stream proxy server for running a target stream proxy service. Specifically, when the live streaming server needs to obtain a live video stream of a game associated with a first object, it needs to determine in advance from the N stream proxy servers a target stream proxy server that has a binding relationship with a target cloud device, that is, when the live streaming server triggers the video stream acquisition mechanism, it can determine from the N stream proxy servers a target stream proxy server that has a binding relationship with a target cloud device. The target cloud device here can be a cloud game associated with a first object (e.g., a cloud play user).
[0143] In step S204, the computer device running the live streaming service sends a video stream acquisition request to the target cloud device through the target stream proxy service.
[0144] Specifically, when a computer device running a live streaming service determines that a target stream proxy service has a binding relationship with a target cloud device, it can generate a video stream acquisition request for sending to the target cloud device. Further, the computer device running a live streaming service can send the video stream acquisition request to the target cloud device through the target stream service.
[0145] In step S205, when configuring a virtual room for the first object, the target cloud device determines the game live video stream associated with the first object, and returns the game live video stream to the computer device running the live streaming service through the target stream proxy service.
[0146] Specifically, when the target cloud device configures a virtual room for the first object, the target cloud device can obtain the audio and video stream associated with the cloud game, and can then determine the obtained audio and video stream associated with the cloud game as the first audio and video stream. The first audio and video stream here refers to the audio and video stream generated by the target cloud device when it receives the service control instruction stream triggered by the first object. Simultaneously, the target cloud device can also obtain the audio and video stream generated by the interaction of all objects in the virtual room during the live broadcast of the first object, and can then determine the obtained audio and video stream as the second audio and video stream. Furthermore, the target cloud device can also obtain the text data stream generated by the interaction of all objects in the virtual room during the live broadcast of the first object. Furthermore, based on the first audio and video stream, the second audio and video stream, and the text data stream, the target cloud device can determine the original game video stream associated with the first object, and can then determine the device type of the target cloud device and encapsulate the original game video stream based on the encapsulation format determined by the device type, thereby obtaining the live game video stream associated with the first object. Furthermore, the target cloud device can return the live game video stream to the computer device running the live streaming service via the target stream proxy service.
[0147] Step S206: The computer device running the live streaming service obtains the encapsulation strategy of the live game video stream, and determines the encapsulated video stream corresponding to the live game video stream based on the encapsulation strategy.
[0148] Specifically, a computer device running a live streaming service can obtain an encapsulation strategy for a live game stream. The encapsulation strategy here may include the device type of the target cloud device and the transmission protocol (e.g., RTMP protocol). It should be understood that a computer device running a live streaming service can determine an encapsulation format that matches the device type, and can then parse the live game video stream based on the encapsulation format to obtain the original game video stream. At this point, the computer device running the live streaming service can encapsulate the original game video stream based on the transmission protocol to obtain an encapsulated video stream corresponding to the live game video stream.
[0149] The specific implementation of steps S201 to S206 can be found in the above Figure 3 The description of steps S101 to S103 in the corresponding embodiment will not be repeated here.
[0150] In step S207, the computer device running the live streaming service sends the encapsulated video stream to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0151] Specifically, when a connection is successfully established between a computer device running a live streaming service (e.g., a live streaming server) and a computer device running a content distribution service (i.e., a content distribution server), the live streaming server can, based on the connection, send the encapsulated video stream to the content distribution server. Furthermore, the content distribution server can, through the content distribution service, send the encapsulated video stream to the viewing terminal corresponding to the second object in the virtual room, allowing the viewing terminal to play the encapsulated video stream via the WebRTC application programming interface.
[0152] It should be understood that during the live broadcast of the first object, a second object in the virtual room can also replace the first object to trigger a business control instruction stream for the cloud game. At this time, this second object can be called the target object. It is understandable that the viewing terminal corresponding to the target object can send the business control instruction stream triggered by the target object to the target cloud device through the access service and the push stream service. At this time, the target cloud device can generate a live game video stream associated with the target object, which can then be sent to the live streaming server through the target stream proxy service. When the live streaming server determines the encapsulated video stream associated with the target object, the encapsulated video stream associated with the target object is sent to other objects in the virtual room except the target object through the content distribution service. The other objects here may include the first object and other second objects.
[0153] like Figure 5 As shown, if object B performs a trigger operation on control 52K, the viewing terminal corresponding to object B will generate a replacement control instruction stream, and then the replacement control instruction stream can be sent to the target cloud device through the access service and the push stream service, so that the target cloud device returns a replacement notification to the cloud play terminal corresponding to object A. When the cloud play terminal corresponding to object A receives the replacement notification and grants object B the replacement permission, it means that object B can play the cloud game instead of object A. At this time, the target cloud device can receive the business control instruction stream triggered by object B through the access service and the push stream service, and then generate a live game video stream associated with object B. Among them, when the target cloud device generates the live game video stream associated with object B, it can return the live game video stream associated with object B to the viewing terminal corresponding to object B through the push stream service and the access service. Optionally, the target cloud device can also send the live game video stream associated with object B to the live stream server through the target stream proxy service, so that when the live stream server determines the encapsulated video stream associated with object B, it will send the encapsulated video stream associated with object B to other objects in the virtual room other than object B through the content distribution service.
[0154] For further understanding, please refer to Figure 7 , Figure 7This is a flow chart of a live streaming service provided by an embodiment of the present application. Figure 7 As shown, the live streaming service in the embodiment of the present application can be applied to the cloud game background service architecture, wherein the cloud game background service architecture can include a live streaming service, a target stream proxy service, a database service, and a content distribution service. Among them, the streaming agent and the stream proxy service can be understood as different roles of the same service.
[0155] Since the computer device running the live streaming service (for example, the live streaming server) does not know on which computer device the streaming proxy service that has a binding relationship with the target cloud device is running, the live streaming server needs to execute step S71 in advance, and randomly select a streaming media proxy based on the address list associated with N streaming proxy services stored in itself to determine whether its streaming proxy service is the target streaming proxy service that has a binding relationship with the target cloud device.
[0156] It should be understood that when the live streaming server receives the startup notification sent by the target cloud device, it can obtain the game security identifier and the target device identifier in the startup notification. The live streaming server can execute step S72 to obtain the device type of the target cloud device based on the target device identifier and the database service. Among them, it can be understood that the live streaming server can generate a device query request for querying the device type of the target cloud device based on the target device identifier, and then send the device query request to a computer device running a database service (i.e., a database server), so that the database server obtains the device type of the target cloud device corresponding to the target device identifier based on the device query request. Further, the live streaming server can receive the device type of the target cloud device returned by the database server.
[0157] At the same time, the live streaming server can also execute step S73, verify the game security identifier through the target stream proxy service, and obtain an identifier verification result. It can be understood that the live streaming service can obtain the security identifier of the cloud game run by the target cloud device through the target stream proxy service, and then determine the obtained security identifier as the verification security identifier. Furthermore, the live streaming server can compare the game security identifier with the verification security identifier to obtain a comparison result. If the comparison result indicates that the game security identifier matches the verification security identifier, the live streaming server can obtain an identifier verification result indicating that the verification is successful. Optionally, if the comparison result indicates that the game security identifier does not match the verification security identifier, the live streaming server can obtain an identifier verification result indicating that the verification failed.
[0158] It is understood that when the identifier verification result indicates successful verification, the live streaming server can establish a mapping relationship between the game security identifier, the target device identifier, and the device type of the target cloud device. This mapping relationship can be stored in a database server that has a data exchange relationship with the live streaming server via a database service. Optionally, this mapping relationship can also be stored in the live streaming server's own local database via the database service, which is not limited here.
[0159] Among them, the live streaming service in the cloud game background service architecture can use a server library for encapsulating the original game video stream (for example, librtmpC library, a C library for encapsulating H264 encoding format and AAC encoding format into RTMP transmission protocol) to encapsulate the original game video stream to obtain an encapsulated video stream associated with the first game. In order to improve the concurrency of the live streaming service and reduce the delay in the live streaming process, the embodiment of the present application can transform the librtmpC library from synchronous to asynchronous. Among them, concurrency here refers to the fact that several programs are in a time period between being started and running, and these programs are running on the same processor, but at any point in time, only one program is running on the processor. Synchronization here refers to the sequential execution of the entire processing process, when each process is completed and the result is returned. It should be understood that synchronization is a linear execution method, and the execution process cannot be skipped. It is generally used for programs with strong process characteristics. Asynchronous only sends the call instruction, and the caller does not need to wait for the called method to be fully executed, but continues to execute the following process. Asynchronous processing is a way of parallel processing. You don't have to wait for a program to finish executing before executing other tasks.
[0160] For example, in an embodiment of the present application, a mutex lock can be used to avoid conflicting access to the connection establishment rule (i.e., the connection establishment function) in the librtmpC library. That is, when a connection relationship (i.e., a TCP link) needs to be established between a live streaming server and a content distribution server, the live streaming server needs to start a new thread to establish a connection. In the process of establishing a connection, since the connection establishment function in the librtmpC library is protected by a mutex lock, this means that only one thread can access the connection establishment function at the same time. This effectively ensures that the connection establishment function in the librtmpC library will not cause a program crash due to conflicting access to public resources, thereby effectively ensuring the smoothness of the game live video stream in subsequent pushes.
[0161] In addition, the embodiment of the present application can also change the socket established with the content distribution server from a blocking socket to a non-blocking socket, and establish a new application layer data packet buffer for each linked non-blocking socket, which means that each link includes not only the kernel's send buffer, but also the application layer's data packet buffer. Since the central processing unit (CPU) of the live streaming server operates as a non-blocking socket, when the data storage in the send buffer reaches the data storage threshold, although the live streaming server will return a failure, the CPU will not be idle, but will switch to another stream for processing. In other words, after the socket is changed to a non-blocking socket, the librtmpC library can transmit multiple audio and video streams in one thread, that is, when one of the streams is about to be blocked, the live streaming server can switch to transmitting another stream so that the live streaming server can continue to pull new game live video streams to store them in the application layer's data packet buffer. This can effectively increase the concurrency of the system, thereby reducing the waste of system resources and reducing the delay of live streaming.
[0162] At the same time, when the identifier verification result indicates that the verification is successful, the live streaming server may further execute step S74 to establish a connection relationship between the live streaming service and the computer device running the content distribution service (i.e., the content distribution server). It is understood that when the identifier verification result indicates that the verification is successful, the live streaming server may obtain the connection establishment rule protected by the mutex lock. Furthermore, the live streaming server may change the socket established with the content distribution server from a blocking socket to a non-blocking socket, and then establish a connection relationship between the live streaming server and the content distribution server based on the non-blocking socket and the connection establishment rule.
[0163] Furthermore, the live streaming server can execute step S75 to obtain the live game video stream associated with the first object through the target stream proxy service, and then obtain the encapsulation policy of the live game video stream. Based on the encapsulation policy, the live streaming server can determine the encapsulated video stream corresponding to the live game video stream. At this point, the live streaming server can execute step S76 to distribute the encapsulated video stream to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0164] In an embodiment of the present application, when the first object (i.e., the cloud play user) uses the cloud play terminal to live broadcast the cloud game, the target cloud device can be used to run the cloud game, so as to generate a live game video stream associated with the first object when receiving the business control instruction stream triggered by the first object. In addition, when the computer device running the live streaming service (i.e., the live streaming server or the stream proxy push server) determines the target stream proxy service with a binding relationship with the target cloud device, the computer device running the live streaming service can obtain the live game video stream associated with the first object through the target stream proxy service, and then obtain the encapsulated video stream corresponding to the live game video stream through the encapsulation strategy of the live game video stream, so as to facilitate the subsequent distribution to the viewing terminal through the content distribution service. It can be seen from this that the computer device used to run the cloud game (i.e., the target cloud device) and the computer device used to pull the live game video stream (i.e., the computer device deployed by the live streaming service) are two different computer devices, not the same computer device, and thus can achieve large-scale live broadcast capabilities in the cloud game live broadcast scenario, and reduce the operating burden of the target cloud device in the cloud game live broadcast scenario, thereby reducing the delay of the cloud game during the live broadcast process.
[0165] Further, see Figure 8 , Figure 8 : is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device 1 can be a computer program (including program code) running on a computer device, for example, the data processing device 1 is an application software; the data processing device 1 can be used to execute the corresponding steps of the method provided in an embodiment of the present application. Figure 8 As shown, the data processing device 1 can be run on a computer device deployed with a live streaming service. The computer device can be a computer device deployed with a live streaming service alone (i.e., a live streaming server), or a computer device deployed with a stream proxy push service (i.e., a business service obtained by merging the stream proxy service and the live streaming service) (i.e., a stream proxy push server). The data processing device 1 may include: a target stream proxy service determination module 11, a video stream acquisition request sending module 12, an encapsulated video stream determination module 13, an identifier acquisition module 14, a device type acquisition module 15, an identifier verification module 16, a mapping relationship establishment module 17, a connection relationship establishment module 18, and an encapsulated video stream sending module 19.
[0166] The target stream proxy service determination module 11 is used to determine a target stream proxy service that has a binding relationship with a target cloud device, where the target cloud device is used to run a cloud game associated with the first object.
[0167] The method is performed by a live streaming server, wherein the live streaming server stores an address list associated with N stream proxy servers, where N is a positive integer, one stream proxy server corresponds to one address, and the N stream proxy servers include a target stream proxy server for running a target stream proxy service;
[0168] The target flow proxy server determination module 11 includes: a start notification receiving unit 111 , a candidate flow proxy server acquiring unit 112 , a service query request sending unit 113 and a target flow proxy server determination unit 114 .
[0169] The start notification receiving unit 111 is used to receive a start notification sent by a target cloud device based on the communication relationship between the live streaming server and the target cloud device, where the start notification is generated by the target cloud device based on a target device identifier of the target cloud device;
[0170] The candidate stream proxy server acquiring unit 112 is configured to acquire a candidate stream proxy server from the N stream proxy servers and acquire an address of the candidate stream proxy server from an address list;
[0171] The service query request sending unit 113 is used to generate a service query request based on the target device identifier, and send the service query request to the candidate flow proxy server through the address, so that the candidate flow proxy server matches the target device identifier and the candidate device identifier of the cloud device bound to the candidate flow proxy server to obtain a matching result;
[0172] The target stream proxy server determining unit 114 is configured to receive a matching result returned by the candidate stream proxy server, and when the matching result indicates a successful match, use the candidate stream proxy server as a target stream proxy server having a binding relationship with the target cloud device.
[0173] The specific implementation of the start notification receiving unit 111, the candidate flow proxy server obtaining unit 112, the service query request sending unit 113 and the target flow proxy server determining unit 114 can be referred to above. Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.
[0174] The video stream acquisition request sending module 12 is configured to send a video stream acquisition request to a target cloud device via a target stream proxy service, so that when the target cloud device configures a virtual room for the first object, the target cloud device returns a live game video stream associated with the first object via the target stream proxy service. The live game video stream is generated by the target cloud device when it obtains a service control instruction stream triggered by the first object.
[0175] The encapsulated video stream determination module 13 is used to obtain the encapsulation strategy of the game live video stream, and determine the encapsulated video stream corresponding to the game live video stream based on the encapsulation strategy. The encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0176] The encapsulated video stream determination module 13 includes: an encapsulation strategy acquisition unit 131 , a parsing processing unit 132 and an encapsulation processing unit 133 .
[0177] The encapsulation strategy acquisition unit 131 is used to obtain the encapsulation strategy of the game live broadcast stream, where the encapsulation strategy includes the device type and transmission protocol of the target cloud device;
[0178] The parsing and processing unit 132 is used to determine the encapsulation format that matches the device type, and parse the live game video stream based on the encapsulation format to obtain the original game video stream;
[0179] The encapsulation processing unit 133 is used to encapsulate the original game video stream based on the transmission protocol to obtain an encapsulated video stream corresponding to the game live video stream.
[0180] The specific implementation of the encapsulation strategy acquisition unit 131, the parsing processing unit 132 and the encapsulation processing unit 133 can be found in the above Figure 3 The description of step S103 in the corresponding embodiment will not be repeated here.
[0181] Wherein, the method is executed by a live streaming server;
[0182] The identifier acquisition module 14 is used to obtain the game security identifier and the target device identifier in the activation notification when receiving the activation notification sent by the target cloud device;
[0183] The device type acquisition module 15 is configured to acquire the device type of the target cloud device based on the target device identifier.
[0184] The device type acquisition module 15 includes a device query request generating unit 151 , a device query request sending unit 152 and a device type receiving unit 153 .
[0185] The device query request generating unit 151 is configured to generate a device query request for querying the device type of the target cloud device based on the target device identifier;
[0186] The device query request sending unit 152 is used to send the device query request to the database server, so that the database server obtains the device type of the target cloud device corresponding to the target device identifier based on the device query request;
[0187] The device type receiving unit 153 is configured to receive the device type of the target cloud device returned by the database server.
[0188] The specific implementation of the device query request generating unit 151, the device query request sending unit 152 and the device type receiving unit 153 can be found in the above Figure 7 The description of step S72 in the corresponding embodiment will not be repeated here.
[0189] The identifier verification module 16 is used to verify the game security identifier through the target stream proxy service to obtain an identifier verification result.
[0190] The identifier verification module 16 includes: a verification identifier acquisition unit 161 , an identifier comparison unit 162 , a first verification result determination unit 163 and a second verification result determination unit 164 .
[0191] The verification identifier acquisition unit 161 is configured to acquire a security identifier of the cloud game running on the target cloud device through the target stream proxy service, and determine the acquired security identifier as the verification security identifier;
[0192] The identifier comparison unit 162 is used to compare the game security identifier with the verification security identifier to obtain a comparison result;
[0193] The first verification result determining unit 163 is configured to obtain an identifier verification result indicating successful verification if the comparison result indicates that the game security identifier matches the verification security identifier;
[0194] The second verification result determining unit 164 is configured to obtain an identifier verification result indicating a verification failure if the comparison result indicates that the game security identifier does not match the verification security identifier.
[0195] The specific implementation of the verification identifier acquisition unit 161, the identifier comparison unit 162, the first verification result determination unit 163 and the second verification result determination unit 164 can be referred to above. Figure 7 The description of step S73 in the corresponding embodiment will not be repeated here.
[0196] The mapping relationship establishment module 17 is used to establish a mapping relationship between the game security identifier, the target device identifier and the device type of the target cloud device when the identifier verification result indicates that the verification is successful. The mapping relationship is used to be stored in a database server that has a data interaction relationship with the live streaming server through a database service.
[0197] Wherein, the content distribution service is used to be deployed on the content distribution server;
[0198] The connection relationship establishing module 18 is configured to establish a connection relationship between the live streaming server and the content distribution server when the identifier verification result indicates that the verification is successful.
[0199] The connection relationship establishing module 18 includes: a connection establishment rule acquiring unit 181 , a socket changing unit 182 and a connection relationship establishing unit 183 .
[0200] The connection establishment rule acquisition unit 181 is configured to acquire the connection establishment rule protected by the mutex lock when the identifier verification result indicates that the verification is successful;
[0201] The socket changing unit 182 is used to change the socket established with the content distribution server from a blocking socket to a non-blocking socket;
[0202] The connection relationship establishing unit 183 is used to establish a connection relationship between the live streaming server and the content distribution server based on a non-blocking socket and a connection establishment rule.
[0203] The specific implementation of the connection rule acquisition unit 181, the socket change unit 182 and the connection relationship establishment unit 183 can be found in the above Figure 6 The description of step S207 in the corresponding embodiment will not be repeated here.
[0204] The packaged video stream sending module 19 is used to send the packaged video stream to the content distribution server based on the connection relationship between the live streaming server and the content distribution server, so that the content distribution server sends the packaged video stream to the viewing terminal corresponding to the second object.
[0205] The specific implementation of the target stream proxy service determination module 11, the video stream acquisition request sending module 12, the encapsulated video stream determination module 13, the identifier acquisition module 14, the device type acquisition module 15, the identifier verification module 16, the mapping relationship establishment module 17, the connection relationship establishment module 18 and the encapsulated video stream sending module 19 can be referred to above. Figure 6 The description of steps S201 to S207 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.
[0206] Further, see Figure 9 , Figure 9: is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device 2 can be a computer program (including program code) running on a computer device, for example, the data processing device 2 is an application software; the data processing device 2 can be used to execute the corresponding steps of the method provided in an embodiment of the present application. Figure 9 As shown, the data processing device 2 can be run on a target cloud device, which can be a computer device running a cloud game, or the target cloud device can be the above-mentioned Figure 2 The cloud device 200Y in the corresponding embodiment. The data processing device 2 may include: a video stream acquisition request receiving module 100, a game live video stream determining module 200, a game live video stream returning module 300, a startup control instruction stream acquiring module 400, a game startup video stream generating module 500, a game startup video stream returning module 600, an identifier allocating module 700, a startup notification generating module 800, and a startup notification sending module 900.
[0207] The video stream acquisition request receiving module 100 is used to obtain a video stream acquisition request sent by a live streaming service through a target stream proxy service that has a binding relationship with a target cloud device, where the target cloud device is used to run a cloud game associated with the first object;
[0208] The game live video stream determination module 200 is used to determine the game live video stream associated with the first object when configuring a virtual room for the first object. The game live video stream is generated when a service control instruction stream triggered by the first object is obtained;
[0209] The game live video stream return module 300 is used to return the game live video stream to the live streaming service through the target stream proxy service. The live streaming service is used to obtain the encapsulation strategy of the game live stream and determine the encapsulated video stream corresponding to the game live video stream based on the encapsulation strategy. The encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service.
[0210] The start-up control instruction stream acquisition module 400 is used to obtain the start-up control instruction stream triggered by the first object through the access service and the push streaming service. The start-up control instruction stream is triggered by the first object for the cloud game on the first game interface of the cloud play terminal;
[0211] The game startup video stream generation module 500 is used to determine the service state of the target cloud device as the running state based on the startup control instruction stream, and generate a game startup video stream associated with the cloud game, where the running state is used to indicate the running of the cloud game;
[0212] The game startup video stream return module 600 is used to return the game startup video stream to the cloud play terminal through the access service and the push streaming service, so that the cloud play terminal switches the terminal interface from the first game interface to the second game interface, and displays the game screen frame corresponding to the game startup video stream on the second game interface.
[0213] Wherein, the live streaming server is used to be deployed on the live streaming server;
[0214] The identifier allocation module 700 is used to allocate a game security identifier to the cloud game upon receiving a start control instruction stream, where the game security identifier is generated based on a start timestamp indicated by the start control instruction stream, a machine address identifier of a target cloud device, and a random parameter determined by the target cloud device;
[0215] The startup notification generation module 800 is used to obtain a target device identifier of a target cloud device and generate a startup notification for instructing the startup of a cloud game based on the game security identifier and the target device identifier;
[0216] The startup notification sending module 900 is used to send a startup notification to the live streaming server based on the communication relationship between the live streaming server and the target cloud device, so that the live streaming server determines the target stream proxy service that has a binding relationship with the target cloud device.
[0217] The specific implementation of the video stream acquisition request receiving module 100, the game live video stream determination module 200, the game live video stream return module 300, the start control instruction stream acquisition module 400, the game start video stream generation module 500, the game start video stream return module 600, the identifier allocation module 700, the start notification generation module 800 and the start notification sending module 900 can be found in the above Figure 6 The description of steps S201 to S207 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.
[0218] Further, see Figure 10 , Figure 10 This is a schematic diagram of a computer device provided in an embodiment of the present application. Figure 10 As shown, the computer device 3000 may be a computer device running a live streaming service (e.g., Figure 2 The streaming agent push streaming server 2000F in the corresponding embodiment), or the target cloud device running the cloud game (for example, the above Figure 2The cloud device 200Y in the corresponding embodiment), the computer device 3000 may include: at least one processor 3001, for example, a CPU, at least one network interface 3004, a user interface 3003, a memory 3005, and at least one communication bus 3002. The communication bus 3002 is used to realize the connection and communication between these components. The user interface 3003 may include a display (Display), a keyboard (Keyboard), and the network interface 3004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 3005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The storage 3005 may optionally also be at least one storage device located away from the aforementioned processor 3001. As Figure 10 As shown, the memory 3005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application.
[0219] exist Figure 10 In the computer device 3000 shown, the network interface 3004 is mainly used for network communication; the user interface 3003 is mainly used for providing an input interface for the user; and the processor 3001 can be used to call the device control application stored in the memory 3005.
[0220] It should be understood that the computer device 3000 described in the embodiment of the present application can execute the above Figure 3 or Figure 6 The description of the data processing method in the corresponding embodiment can also be performed as described above. Figure 8 In the corresponding embodiment, the data processing device 1 or Figure 9 The description of the data processing device 2 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.
[0221] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device 1 or the data processing device 2 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figure 3 or Figure 6The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed to be executed on one computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed in multiple locations and interconnected by a communication network. Multiple computing devices distributed in multiple locations and interconnected by a communication network can constitute a blockchain system.
[0222] On the one hand, the present application provides a computer program product or computer program, which includes computer instructions 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 can execute the above-mentioned Figure 3 or Figure 6 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.
[0223] For further information, see Figure 11 , Figure 11 1 is a structural diagram of a data processing system provided in an embodiment of the present application. The data processing system 3 may include a data processing device 11a and a data processing device 12a. The data processing device 11a may be the above-mentioned Figure 8 The data processing device 1 in the corresponding embodiment can be understood as follows: the data processing device 11a can be integrated into a computer device running a live streaming service (for example, the above-mentioned Figure 2 The data processing device 12a may be the streaming agent push streaming server 2000F in the corresponding embodiment, so it will not be described here in detail. Figure 9 The data processing device 2 in the corresponding embodiment can be understood as follows: the data processing device 12a can be integrated into or run a target cloud device for cloud gaming (for example, the above-mentioned Figure 2 The cloud device 200Y in the corresponding embodiment) is not described in detail here. In addition, the description of the beneficial effects of adopting the same method is not described in detail. For technical details not disclosed in the data processing system embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0224] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The above-described program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The above-described storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0225] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method, characterized in that: The method is performed by a live streaming server, and includes: Determining a target streaming proxy service having a binding relationship with a target cloud device, wherein the target cloud device is used to run the cloud game associated with the first object; the target streaming proxy service runs in a target proxy server; Sending a video stream acquisition request to the target cloud device through the target stream proxy service, so that the target cloud device returns a game live video stream associated with the first object through the target stream proxy service when configuring a virtual room for the first object, wherein the game live video stream is generated by the target cloud device when acquiring a service control instruction stream triggered by the first object; Changing the socket established with the content distribution server from a blocking socket to a non-blocking socket, creating a new application layer packet buffer for each connected non-blocking socket, and each connected non-blocking socket also includes a kernel send buffer; When the data storage in the sending buffer reaches a data storage threshold, the live game video stream is stored in a buffer in the application layer; Obtaining an encapsulation strategy for the live game video stream, the encapsulation strategy including the device type and transmission protocol of the target cloud device; Determine an encapsulation format that matches the device type, and parse the game live video stream in the sending buffer or the data packet buffer based on the encapsulation format to obtain an original game video stream; the original game video stream includes a first audio and video stream, a second audio and video stream, and a text data stream, the first audio and video stream includes an audio and video stream associated with the cloud game generated by the target cloud device when the target cloud device obtains the service control instruction stream triggered by the first object, the second audio and video stream includes an audio and video stream generated by the target cloud device when all objects in the virtual room interact during the live broadcast of the first object, and the text data stream includes text data generated when the target cloud device obtains all objects in the virtual room interact; The original game video stream is encapsulated based on the transmission protocol to obtain an encapsulated video stream corresponding to the game live video stream. The encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service in the content distribution server.
2. The method according to claim 1, characterized in that The method is performed by a live streaming server; The method further comprises: Upon receiving a startup notification sent by the target cloud device, obtaining a game security identifier and a target device identifier in the startup notification; Based on the target device identifier, obtaining the device type of the target cloud device; Verifying the game security identifier through the target stream proxy service to obtain an identifier verification result; When the identifier verification result indicates that the verification is successful, a mapping relationship is established between the game security identifier, the target device identifier and the device type of the target cloud device, and the mapping relationship is used to be stored in a database server that has a data interaction relationship with the live streaming server through a database service.
3. The method according to claim 2, characterized in that The acquiring the device type of the target cloud device based on the target device identifier includes: Based on the target device identifier, generating a device query request for querying the device type of the target cloud device; Sending the device query request to the database server, so that the database server obtains the device type of the target cloud device corresponding to the target device identifier based on the device query request; Receive the device type of the target cloud device returned by the database server.
4. The method according to claim 2, characterized in that The verifying the game security identifier by the target stream proxy service to obtain an identifier verification result includes: Obtaining, through the target streaming proxy service, a security identifier of the cloud game running on the target cloud device, and determining the obtained security identifier as a verification security identifier; Comparing the game security identifier with the verification security identifier to obtain a comparison result; If the comparison result indicates that the game security identifier matches the verification security identifier, obtaining an identifier verification result indicating successful verification; If the comparison result indicates that the game security identifier does not match the verification security identifier, an identifier verification result indicating a verification failure is obtained.
5. The method according to claim 4, characterized in that The method is performed by a live streaming server; The content distribution service is used to be deployed on a content distribution server; The method further comprises: When the identifier verification result indicates that the verification is successful, a connection relationship between the live streaming server and the content distribution server is established.
6. The method according to claim 5, characterized in that When the identifier verification result indicates that the verification is successful, establishing a connection relationship between the live streaming server and the content distribution server includes: When the identifier verification result indicates that the verification is successful, obtaining the connection establishment rule protected by the mutex lock; Changing the socket established with the content distribution server from a blocking socket to a non-blocking socket; Based on the non-blocking socket and the connection establishment rule, a connection relationship is established between the live streaming server and the content distribution server.
7. The method according to claim 5, characterized in that The method further comprises: Based on the connection relationship between the live streaming server and the content distribution server, the packaged video stream is sent to the content distribution server, so that the content distribution server sends the packaged video stream to the viewing terminal corresponding to the second object.
8. The method according to claim 1, characterized in that The obtaining of the encapsulation strategy of the live game video stream and determining the encapsulated video stream corresponding to the live game video stream based on the encapsulation strategy includes: Obtaining an encapsulation strategy for the live game stream, the encapsulation strategy including the device type and transmission protocol of the target cloud device; Determining an encapsulation format that matches the device type, and parsing the live game video stream based on the encapsulation format to obtain an original game video stream; The original game video stream is encapsulated based on the transmission protocol to obtain an encapsulated video stream corresponding to the game live video stream.
9. A data processing method, characterized in that: The method is executed by a target cloud device, and includes: Obtaining, through a target stream proxy service having a binding relationship with the target cloud device, a video stream acquisition request sent by the live streaming service, wherein the target cloud device is used to run the cloud game associated with the first object; the target stream proxy service runs in a target proxy server; When configuring a virtual room for the first object, determining a game live video stream associated with the first object, where the game live video stream is generated when a service control instruction stream triggered by the first object is obtained; The game live video stream is returned to the live streaming service through the target stream proxy service. The live streaming service is used to be deployed on the live streaming server. The live streaming service is used to change the socket established with the content distribution server from a blocking socket to a non-blocking socket, and a new application layer data packet buffer is established for each linked non-blocking socket. Each linked non-blocking socket also includes a kernel sending buffer; when the data storage of the sending buffer reaches the data storage threshold, the game live video stream is stored in the buffer in the application layer; the encapsulation strategy of the game live video stream is obtained, and the encapsulation strategy includes the device type and transmission protocol of the target cloud device; the encapsulation format that matches the device type is determined, and the game live video stream in the sending buffer or the data packet buffer is parsed and processed based on the encapsulation format to obtain Original game video stream; the original game video stream includes a first audio and video stream, a second audio and video stream and a text data stream, the first audio and video stream includes the audio and video stream associated with the cloud game generated by the target cloud device when the target cloud device obtains the business control instruction stream triggered by the first object, the second audio and video stream includes the audio and video stream generated by the target cloud device when all objects in the virtual room interact with each other during the live broadcast of the first object, and the text data stream includes the text data generated when the target cloud device obtains all objects in the virtual room when they interact with each other; the original game video stream is encapsulated based on the transmission protocol to obtain an encapsulated video stream corresponding to the game live broadcast video stream, and the encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service in the content distribution server.
10. The method according to claim 9, characterized in that The method further comprises: Obtaining, through the access service and the streaming service, a start control instruction stream triggered by the first object, wherein the start control instruction stream is triggered by the first object for the cloud game on the first game interface of the cloud play terminal; Based on the startup control instruction stream, determining the service state of the target cloud device as a running state, and generating a game startup video stream associated with the cloud game, wherein the running state is used to indicate the running of the cloud game; Through the access service and the streaming service, the game startup video stream is returned to the cloud play terminal, so that the cloud play terminal switches the terminal interface from the first game interface to the second game interface, and displays the game screen frame corresponding to the game startup video stream on the second game interface.
11. The method according to claim 9, characterized in that The method further comprises: Upon receiving a start control instruction stream, assigning a game security identifier to the cloud game, the game security identifier being generated based on a start timestamp indicated by the start control instruction stream, a machine address identifier of the target cloud device, and a random parameter determined by the target cloud device; Obtaining a target device identifier of the target cloud device, and generating a startup notification for instructing the startup of the cloud game based on the game security identifier and the target device identifier; Based on the communication relationship between the live streaming server and the target cloud device, the startup notification is sent to the live streaming server, so that the live streaming server determines the target stream proxy service that has a binding relationship with the target cloud device.
12. A data processing device, characterized in that: The device is executed by a live streaming server, and includes: a target stream proxy service determination module, configured to determine a target stream proxy service having a binding relationship with a target cloud device, wherein the target cloud device is configured to run the cloud game associated with the first object; the target stream proxy service is run in a target proxy server; a video stream acquisition request sending module, configured to send a video stream acquisition request to the target cloud device through the target stream proxy service, so that the target cloud device returns a live game video stream associated with the first object through the target stream proxy service when configuring a virtual room for the first object, wherein the live game video stream is generated by the target cloud device when acquiring a service control instruction stream triggered by the first object; The encapsulated video stream determination module is used to change the socket established with the content distribution server from a blocking socket to a non-blocking socket, and to create a new application layer data packet buffer for each linked non-blocking socket. Each linked non-blocking socket also includes a kernel send buffer. When the data storage in the sending buffer reaches a data storage threshold, the live game video stream is stored in a buffer in the application layer; The encapsulated video stream determination module includes an encapsulation strategy acquisition unit, a parsing processing unit and an encapsulation processing unit; The encapsulation strategy acquisition unit is used to acquire the encapsulation strategy of the live game video stream, wherein the encapsulation strategy includes the device type and transmission protocol of the target cloud device; The parsing and processing unit is used to determine an encapsulation format that matches the device type, and parse the game live video stream in the sending buffer or the data packet buffer based on the encapsulation format to obtain an original game video stream; the original game video stream includes a first audio and video stream, a second audio and video stream, and a text data stream, the first audio and video stream includes an audio and video stream associated with the cloud game generated by the target cloud device when the target cloud device obtains the service control instruction stream triggered by the first object, the second audio and video stream includes an audio and video stream generated by the target cloud device when all objects in the virtual room interact during the live broadcast of the first object, and the text data stream includes text data generated when the target cloud device obtains all objects in the virtual room interact; An encapsulation processing unit is used to encapsulate the original game video stream based on the transmission protocol to obtain an encapsulated video stream corresponding to the game live video stream, and the encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through a content distribution service.
13. A data processing device, characterized in that: The device is executed by a target cloud device, and includes: a video stream acquisition request receiving module, configured to acquire a video stream acquisition request sent by a live streaming service through a target stream proxy service having a binding relationship with the target cloud device, wherein the target cloud device is configured to run a cloud game associated with the first object; the target stream proxy service is run in a target proxy server; a game live video stream determination module, configured to determine a game live video stream associated with the first object when configuring a virtual room for the first object, the game live video stream being generated when a service control instruction stream triggered by the first object is obtained; A game live video stream return module is used to return the game live video stream to the live streaming service through the target stream proxy service. The live streaming service is used to be deployed on a live streaming server. The live streaming service is used to change the socket established with the content distribution server from a blocking socket to a non-blocking socket, and to establish a new application layer data packet buffer for each linked non-blocking socket. Each linked non-blocking socket also includes a kernel send buffer; when the data storage of the send buffer reaches the data storage threshold, the game live video stream is stored in the buffer in the application layer; the encapsulation strategy of the game live video stream is obtained, and the encapsulation strategy includes the device type and transmission protocol of the target cloud device; the encapsulation format that matches the device type is determined, and the game live video stream in the send buffer or the data packet buffer is encapsulated based on the encapsulation format. Parse and process to obtain the original game video stream; the original game video stream includes a first audio and video stream, a second audio and video stream and a text data stream, the first audio and video stream includes the audio and video stream associated with the cloud game generated by the target cloud device when the target cloud device obtains the business control instruction stream triggered by the first object, the second audio and video stream includes the audio and video stream generated by the target cloud device when all objects in the virtual room interact during the live broadcast of the first object, and the text data stream includes the text data generated when the target cloud device obtains all objects in the virtual room when they interact; the original game video stream is encapsulated based on the transmission protocol to obtain an encapsulated video stream corresponding to the game live broadcast video stream, and the encapsulated video stream is used to be sent to the viewing terminal corresponding to the second object in the virtual room through the content distribution service in the content distribution server.
14. A computer device, characterized in that: include: processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 11.
16. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The computer instructions are suitable for being read and executed by a processor, so as to enable a computer device having the processor to perform the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Live streaming method and device and server
CN108632646A
Cloud game live broadcast method, cloud game server and computer readable storage medium
CN111818004A
Cloud game live streaming method and device, storage medium and equipment
CN111918082A