Data recording method, device and equipment
By collecting and encapsulating multimedia data during cloud games on the cloud server side, the problems of high cloud game recording and development costs and poor recording quality are solved, and resource conservation and user experience are achieved.
Patent Information
- Application Number
- CN202211517349.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-11-29
AI Technical Summary
In cloud gaming scenarios, when the prior art is used for game recording, the development cost is high, the terminal equipment resources are occupied, and the recording quality is poor, which affects the user experience.
Target data (voice, operation, video data) is collected on the cloud server side and packaged into multimedia data, and stored in a preset location to avoid recording on the terminal device, reducing development costs and improving recording quality.
It saves client system resources, improves user experience and data recording quality, and reduces development costs.
Smart Images

Figure CN115988257B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data recording method, apparatus, and device. Background Art
[0002] With the development of broadband and network technologies, low-latency, high-bandwidth networks are gradually becoming part of everyday life. Cloud gaming, as a popular application scenario requiring low latency and high bandwidth, has also seen rapid growth.
[0003] In cloud gaming scenarios, users often need to record their gameplay. Related technologies often use a method for recording gameplay: using the terminal device's built-in recording function. This method requires cloud gaming vendors to develop products, consumes significant resources, and carries high development costs. Another method uses the terminal device's screen recording function, which consumes significant system resources, impacting the user's gaming experience and prone to unclear recordings and poor data quality. Summary of the Invention
[0004] Various aspects of the present application provide a data recording method, apparatus, and device to improve the quality of data recording, save system resources and development costs, and enhance user experience.
[0005] In a first aspect, an embodiment of the present application provides a data recording method, applied to a cloud server, the method comprising:
[0006] During the cloud game operation, when a recording request is received, target data corresponding to a target data type is collected, wherein the recording request includes the target data type;
[0007] When a stop recording request is received, data collection is stopped, and the collected target data is encapsulated to obtain target multimedia data;
[0008] The target multimedia data is stored in a preset storage location.
[0009] In a possible implementation, the target data includes target voice data, target operation data, and target video data; and starting to collect target data corresponding to the target data type includes:
[0010] Collecting the target voice data according to the voice information uploaded by the client, and collecting the target operation data according to the operation information uploaded by the client;
[0011] Obtain the downlink audio and video data packets of the cloud game, and collect the target video data based on the downlink audio and video data packets; or obtain the original audio and video data packets of the cloud game, and collect the target video data based on the original audio and video data packets.
[0012] In a possible implementation, encapsulating the collected target data to obtain target multimedia data includes:
[0013] For target data corresponding to each target data type, adding time information to the target data to obtain a target data file;
[0014] The target multimedia data is synthesized according to the target data file.
[0015] In a possible implementation, synthesizing the target multimedia data according to the target data file includes:
[0016] Determine a multimedia data template and set video parameters; the multimedia data template includes a target area corresponding to each target data;
[0017] sorting the target data files according to the time information, and taking the data with the smallest time information as the initial data;
[0018] According to the video parameters and the initial data, sequentially acquiring target data in each of the target data files;
[0019] Processing the target data according to a preset processing rule, and adding the processed target data to a target area corresponding to the target data to obtain multimedia data;
[0020] The multimedia data is encoded to obtain the target multimedia data.
[0021] In one possible implementation, the multimedia data template includes a first area and a second area; the first area corresponds to target video data; the second area corresponds to target operation data; and processing the target data according to a preset processing rule and adding the target data to a target location of the multimedia data template includes:
[0022] When the target data is target video data, decoding the target video data, and rendering the decoded target video data to the first area;
[0023] When the target data is target operation data, determining an operation button corresponding to the target operation data, and displaying the operation button in the second area according to a preset display mode;
[0024] When the target data is target voice data, the target voice data is mixed with the audio included in the target video data to obtain mixed audio data.
[0025] In a possible implementation, after obtaining the target multimedia data, the method further includes:
[0026] Acquiring tag information and associating the tag information with the target multimedia data;
[0027] The tag information is stored in the preset storage location.
[0028] In a possible implementation, after storing the target multimedia data in a preset storage location, the method further includes:
[0029] Acquire a search word, and determine at least one target tag information including the search word in the tag information corresponding to each target multimedia data;
[0030] The target multimedia data corresponding to the at least one target tag information is sent to the client.
[0031] In a possible implementation, after storing the target multimedia data in a preset storage location, the method further includes:
[0032] receiving a playback request and acquiring target multimedia data from the preset storage location;
[0033] In each rendering cycle, the target multimedia data is rendered and sent to the client, and historical operation data corresponding to the target multimedia data is determined; the historical operation data includes a historical key sequence and first time information corresponding to the historical key sequence;
[0034] In each rendering cycle, current operation data is obtained; the current operation data includes a current key sequence and second time information corresponding to the current key sequence;
[0035] Determining a first deviation between the target key sequence and the current key sequence, and determining a second deviation between the first time information and the second time information;
[0036] The matching degree between the current operation data and the historical operation data is determined according to the first deviation value and the second deviation value in each rendering cycle.
[0037] In a second aspect, an embodiment of the present application provides a data recording method, applied to a client, the method comprising:
[0038] During the running of the cloud game, in response to a first touch operation input to a preset recording control, displaying an alternative data type;
[0039] In response to a selection operation input on the candidate data type, adding the target data type corresponding to the selection operation to a recording request, and sending the recording request to a cloud server;
[0040] In response to a second touch operation input to the preset recording control, a stop recording request is sent to the cloud server.
[0041] In a possible implementation, after sending the stop recording request to the cloud server, the method further includes:
[0042] In response to the third touch operation, displaying a search control;
[0043] In response to an input operation on the search control, obtaining a search term and sending the search term to the cloud server;
[0044] receiving at least one target multimedia data returned by the cloud server, and displaying the at least one target multimedia data;
[0045] In response to a fourth touch operation on the at least one target multimedia data, the target multimedia data corresponding to the fourth touch operation is played.
[0046] In a third aspect, an embodiment of the present application provides a data recording device, applied to a cloud server, comprising:
[0047] The acquisition module is configured to, when receiving a recording request during the operation of the cloud game, start acquiring target data corresponding to a target data type, wherein the recording request includes the target data type;
[0048] The encapsulation module is used to stop data collection and encapsulate the collected target data to obtain target multimedia data when a stop recording request is received;
[0049] The storage module is used to store the target multimedia data in a preset storage location.
[0050] In a possible implementation, the target data includes target voice data, target operation data, and target video data; and the acquisition module is specifically configured to:
[0051] Collecting the target voice data according to the voice information uploaded by the client, and collecting the target operation data according to the operation information uploaded by the client;
[0052] Obtain the downlink audio and video data packets of the cloud game, and collect the target video data based on the downlink audio and video data packets; or obtain the original audio and video data packets of the cloud game, and collect the target video data based on the original audio and video data packets.
[0053] In a possible implementation, the encapsulation module is specifically configured to:
[0054] For target data corresponding to each target data type, adding time information to the target data to obtain a target data file;
[0055] The target multimedia data is synthesized according to the target data file.
[0056] In a possible implementation, the encapsulation module is specifically configured to:
[0057] Determine a multimedia data template and set video parameters; the multimedia data template includes a target area corresponding to each target data;
[0058] sorting the target data files according to the time information, and taking the data with the smallest time information as the initial data;
[0059] According to the video parameters and the initial data, sequentially acquiring target data in each of the target data files;
[0060] Processing the target data according to a preset processing rule, and adding the processed target data to a target area corresponding to the target data to obtain multimedia data;
[0061] The multimedia data is encoded to obtain the target multimedia data.
[0062] In a possible implementation, the multimedia data template includes a first area and a second area; the first area corresponds to target video data; the second area corresponds to target operation data; and the encapsulation module is specifically configured to:
[0063] When the target data is target video data, decoding the target video data, and rendering the decoded target video data to the first area;
[0064] When the target data is target operation data, determining an operation button corresponding to the target operation data, and displaying the operation button in the second area according to a preset display mode;
[0065] When the target data is target voice data, the target voice data is mixed with the audio included in the target video data to obtain mixed audio data.
[0066] In one possible embodiment, the device is further used for:
[0067] Acquiring tag information and associating the tag information with the target multimedia data;
[0068] The tag information is stored in the preset storage location.
[0069] In one possible embodiment, the device is further used for:
[0070] Acquire a search word, and determine at least one target tag information including the search word in the tag information corresponding to each target multimedia data;
[0071] The target multimedia data corresponding to the at least one target tag information is sent to the client.
[0072] In one possible embodiment, the device is further used for:
[0073] receiving a playback request and acquiring target multimedia data from the preset storage location;
[0074] In each rendering cycle, the target multimedia data is rendered and sent to the client, and historical operation data corresponding to the target multimedia data is determined; the historical operation data includes a historical key sequence and first time information corresponding to the historical key sequence;
[0075] In each rendering cycle, current operation data is obtained; the current operation data includes a current key sequence and second time information corresponding to the current key sequence;
[0076] Determining a first deviation between the target key sequence and the current key sequence, and determining a second deviation between the first time information and the second time information;
[0077] The matching degree between the current operation data and the historical operation data is determined according to the first deviation value and the second deviation value in each rendering cycle.
[0078] In a fourth aspect, an embodiment of the present application provides a data recording device, applied to a client, comprising:
[0079] A display module, configured to display an alternative data type in response to a first touch operation input to a preset recording control during the running of the cloud game;
[0080] a first sending module, configured to, in response to a selection operation input on the candidate data type, add a target data type corresponding to the selection operation to a recording request, and send the recording request to a cloud server;
[0081] The second sending module is used to send a stop recording request to the cloud server in response to a second touch operation input to the preset recording control.
[0082] In one possible embodiment, the device is further used for:
[0083] In response to the third touch operation, displaying a search control;
[0084] In response to an input operation on the search control, obtaining a search term and sending the search term to the cloud server;
[0085] receiving at least one target multimedia data returned by the cloud server, and displaying the at least one target multimedia data;
[0086] In response to a fourth touch operation on the at least one target multimedia data, the target multimedia data corresponding to the fourth touch operation is played.
[0087] In a fifth aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor;
[0088] The memory stores computer-executable instructions;
[0089] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the data recording method described in any one of the first aspect or the second aspect.
[0090] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the data recording method described in any one of the first aspect or the second aspect.
[0091] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data recording method shown in any one of the first aspect or the second aspect.
[0092] In an embodiment of the present application, during the operation of a cloud game, upon receiving a recording request, the cloud server begins collecting target data corresponding to the target data type, which is included in the recording request. Upon receiving a stop recording request, the cloud server stops data collection and encapsulates the collected target data to obtain target multimedia data. Finally, the cloud server stores the target multimedia data in a preset storage location. Thus, in an embodiment of the present application, the cloud server records the target data based on the client's recording request and stop recording request, and encapsulates the collected target data as target multimedia data. This can conserve client system resources, improve the user experience, enhance the quality of data recording, and reduce development costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0094] Figure 1 A schematic diagram of an application scenario provided by an exemplary embodiment of the present application;
[0095] Figure 2 A flowchart of a data recording method provided by an exemplary embodiment of the present application;
[0096] Figure 3 A flowchart of another data recording method provided by an exemplary embodiment of the present application;
[0097] Figure 4 A schematic diagram of data recording interaction provided by an exemplary embodiment of the present application;
[0098] Figure 5 A flowchart of another data recording method provided by an exemplary embodiment of the present application;
[0099] Figure 6 A schematic diagram of a multimedia data template provided for an exemplary embodiment of the present application;
[0100] Figure 7 A logical schematic diagram of target multimedia data synthesis provided by an exemplary embodiment of the present application;
[0101] Figure 8 A flowchart of another data recording method provided by an exemplary embodiment of the present application;
[0102] Figure 9 A logical diagram of a training mode provided for an exemplary embodiment of the present application;
[0103] Figure 10A flowchart of another data recording method provided by an exemplary embodiment of the present application;
[0104] Figure 11 A schematic diagram of a target multimedia data search result provided by an exemplary embodiment of the present application;
[0105] Figure 12 A system interaction diagram of a data recording method provided by an exemplary embodiment of the present application;
[0106] Figure 13 A schematic structural diagram of a data recording device provided by an exemplary embodiment of the present application;
[0107] Figure 14 A schematic structural diagram of a data recording device provided by an exemplary embodiment of the present application;
[0108] Figure 15 A schematic structural diagram of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0109] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. 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.
[0110] Figure 1 This is a schematic diagram of an application scenario provided by an exemplary embodiment of the present application. Figure 1 As shown, it includes a cloud server 101 and a client 102. The cloud server 101 can refer to a server end, specifically a computer or other device; the client 102 can be a mobile phone, a computer, a wearable device, etc. The embodiment of the application does not limit the specific types of the cloud server and the client.
[0111] like Figure 1As shown in , a preset recording control 1021 may be provided in the client 102. When the user needs to record the game during the cloud game, the user may touch the preset recording control 1021. After receiving the user's touch input for the preset recording control 1021, the client 102 may send a recording request to the cloud server 101, and the cloud server 101 starts recording the game based on the recording request. When the user needs to end the game recording, the preset recording control 1021 may be touched again; after receiving the user's touch input for the preset recording control 1021, the client 102 may send a stop recording request to the cloud server 101; the cloud server 101 may end the game recording process based on the stop recording request, and package the collected audio and video data, user terminal operation data, and voice and audio data, etc., to generate a multimedia data file and store it in the cloud. The user can then load the multimedia data file for viewing or sharing.
[0112] In recent years, with the development of broadband and mobile communication technologies, low-latency, high-bandwidth networks have gradually become commonplace, and a diverse ecosystem of applications based on mature networks has rapidly developed. Cloud gaming, a popular low-latency, high-bandwidth application scenario, has also seen rapid growth. Cloud gaming is a cloud-based gaming format in which all games are run server-side. Leveraging powerful server-side rendering and processing technology, cloud gaming can encode and output the corresponding audio and video data packets in real time. These packets are then transmitted to the client over the network. The client only needs basic video decoding capabilities to provide users with a high-quality gaming experience.
[0113] As cloud gaming continues to develop, related applications are also expanding. For example, applications related to user gaming social interaction are becoming increasingly popular. Users can engage in social interaction by recording and sharing their gaming sessions. Consequently, the demand for recording and sharing gaming sessions in cloud gaming scenarios is becoming increasingly prominent.
[0114] In related technologies, two methods are commonly used to record cloud games: one is through native cloud game support, where the client records based on the cloud game's own recording function. This method requires product development by each cloud game manufacturer, which consumes a lot of resources and has high development costs. The other method is to record the screen through the client. On the one hand, this recording method consumes a lot of system resources, causing client operation lag and affecting the user's gaming experience; on the other hand, the client's recording effect is affected by the user's actual network transmission. When the network signal fluctuates, the recorded data is prone to problems such as unclearness.
[0115] In an embodiment of the present application, during the operation of a cloud game, upon receiving a recording request, the cloud server begins collecting target data corresponding to the target data type, which is included in the recording request. Upon receiving a stop recording request, the cloud server stops data collection and encapsulates the collected target data to obtain target multimedia data. Finally, the cloud server stores the target multimedia data in a preset storage location. Thus, in an embodiment of the present application, the cloud server records the target data based on the client's recording request and stop recording request, and encapsulates the collected target data as target multimedia data. This can conserve client system resources, improve the user experience, enhance the quality of data recording, and reduce development costs.
[0116] The technical solutions shown in this application are described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be repeated in different embodiments.
[0117] Figure 2 This is a flow chart of a data recording method provided by an exemplary embodiment of the present application. Figure 4 , the method is applied to the cloud server and may specifically include:
[0118] S201. During the operation of the cloud game, when a recording request is received, start collecting target data corresponding to the target data type, and the recording request includes the target data type.
[0119] The execution entity of the embodiments of the present application may be a cloud server or a data recording device provided in the cloud server. The data recording device may be implemented by software or a combination of software and hardware. The embodiments of the present application do not limit the specific form of the execution entity.
[0120] In an embodiment of the present application, a recording request may refer to a request sent by a client to start recording a game, and the recording request may specifically refer to a request message requesting the cloud server to start recording mode, etc. The target data type may refer to the type of data or data source that needs to be recorded, determined by the client based on the user's selection operation, and may specifically include operation data, voice data, and video data, etc. Among them, operation data may refer to operation records of input devices such as handles and touch screens related to the current game; voice data may refer to the microphone information of the client, and may specifically refer to the user's voice information; video data may refer to the audio and video data of the cloud game itself. Of course, the target data type may also include other data types, which are not limited in the embodiment of the present application. The target data type may be included in the recording request, determined by the client based on the user's selection operation and uploaded to the cloud server.
[0121] The target data can refer to real-time data collected by the cloud server. In this step, after receiving the recording request, the cloud server can enter recording mode and continuously collect target data corresponding to each target data type. During the recording process, the client can run the cloud game normally, and the user can also experience the cloud game normally.
[0122] S202: When a request to stop recording is received, data collection is stopped, and the collected target data is encapsulated to obtain target multimedia data.
[0123] In the embodiment of the present application, the stop recording request may refer to a request uploaded by the client to stop game recording. The target multimedia data may refer to the final multimedia file recording the game process, specifically a video file in a data stream format (DAT). The embodiment of the present application does not limit the specific format of the target multimedia data.
[0124] In this step, after receiving the stop recording request, the cloud server can exit recording mode, stop data collection, and package the collected target data to obtain the target multimedia data. In this way, the cloud server can record the game process and obtain the target multimedia data without occupying the client's system resources, ensuring that users can experience the cloud game normally on the client. Moreover, because the cloud game runs on the cloud server, the recording of game audio and video data is not affected by network fluctuations, ensuring the clarity and quality of the game recording. In addition, the cloud server's recording process does not rely on the cloud game's internal recording function and can be widely applied to the recording of different types of cloud games, saving resources and reducing development costs.
[0125] S203: Store the target multimedia data in a preset storage location.
[0126] In the embodiments of the present application, the preset storage location may refer to a pre-set storage location for target multimedia data, specifically a game process data management backend or a preset database. This preset storage location may be located within the cloud server or on another cloud server. The embodiments of the present application do not limit the specific deployment of the preset storage location. In this step, after the cloud server completes the game recording and packages the target multimedia data, it can upload the target multimedia data to the preset storage location, allowing users to subsequently review or share the data.
[0127] In an embodiment of the present application, during the operation of a cloud game, upon receiving a recording request, the cloud server begins collecting target data corresponding to the target data type, which is included in the recording request. Upon receiving a stop recording request, the cloud server stops data collection and encapsulates the collected target data to obtain target multimedia data. Finally, the cloud server stores the target multimedia data in a preset storage location. Thus, in an embodiment of the present application, the cloud server records the target data based on the client's recording request and stop recording request, and encapsulates the collected target data as target multimedia data. This can conserve client system resources, improve the user experience, enhance the quality of data recording, and reduce development costs.
[0128] Based on the above embodiments, Figure 3 , the above step S201 of the data recording method is further described in detail. Figure 3 This is a flow chart of another data recording method provided by an exemplary embodiment of the present application. Figure 3 , the data recording method may include:
[0129] S301. Target data includes target voice data, target operation data, and target video data. Target voice data is collected based on voice information uploaded by the client, and target operation data is collected based on operation information uploaded by the client.
[0130] In the embodiment of the present application, the target voice data may include voice information input by the user on the client, etc. The target operation data may include operation information such as operation keys input by the user on the client, etc. The target video data may include audio and video data corresponding to the game screen of the cloud game, etc.
[0131] During cloud gaming, the cloud server typically runs both the game process and a streaming service. The streaming service receives audio and video data from the game process, compresses it, and sends it to the client. The client collects user input, including voice and operation information, and uploads this information to the streaming service on the cloud server. The streaming service receives the voice and operation information uploaded by the client and injects it into the game process, allowing the game process to run normally.
[0132] In an embodiment of the present application, after entering the recording mode, the cloud server can start running the game data recording service for game recording. The client cloud game software development kit (SDK) collects the user's operation information and voice information and uploads it to the streaming service. At this time, the streaming service not only transmits the operation information and voice information to the game process, but also sends the operation information and voice information to the game data recording service. The game data recording service can continuously collect target operation data and target voice data based on the operation information and voice information. In this way, the cloud server can ensure the normal operation of the cloud game while recording data, without occupying the client's system resources, thereby improving the user experience.
[0133] S302. Obtain the downlink audio and video data packets of the cloud game, and collect target video data based on the downlink audio and video data packets; or, obtain the original audio and video data packets of the cloud game, and collect target video data based on the original audio and video data packets.
[0134] In the embodiment of the present application, the downlink audio and video data packet may refer to the data packet sent by the streaming service to the client after encoding and compression. The original audio and video data packet may refer to the original data packet sent by the game process to the streaming service, which includes the audio and picture texture information of the original output of the game process. When collecting the target video data, the cloud server can adopt one of the following two methods:
[0135] One way is that the cloud server can directly reuse the downlink audio and video data packets of the streaming service in the cloud game, and collect the target video data based on the downlink audio and video data packets without further encoding processing, which can save the encoding resources of the cloud server.
[0136] Another approach is for the cloud server to obtain the original audio and video data packets output by the game process. Using the game data recording service, the cloud server uses independent encoding to compress the video data in the original audio and video data packets at a higher bit rate to obtain high-definition target video data. This can improve the image quality of the game recording and further enhance the quality and clarity of the recorded image. In actual applications, the cloud server can use either of the above two methods to collect the target video data, and of course other methods can also be used. This embodiment of the application does not limit this.
[0137] For example, Figure 4 The following is a schematic diagram of an interactive data record provided by an exemplary embodiment of the present application. Figure 4 As shown, during the cloud game operation, when the cloud server receives a recording request, it enters the recording mode. Figure 4The game process, streaming service and game data recording service are running in the dashed box. The client collects the voice information and operation information input by the user and uploads them to the streaming service; on the one hand, the streaming service injects the voice information and operation information into the game process to ensure the normal operation of the cloud game, and on the other hand, sends the voice information and operation information to the game data recording service. The game data recording service can collect target voice data and target operation data in real time based on the voice information and operation information. At the same time, the streaming service obtains the original audio and video data packets from the game process, compresses them to obtain downlink audio and video data packets, and sends them to the client, so that the client can load the game screen normally. When collecting target video data, the game data recording service can reuse the downlink audio and video data packets to collect target video data, or it can independently encode the original audio and video data packets to collect target video data. In this way, the game data recording service can collect target data of different target data types, will not be affected by network fluctuations, and can improve the picture quality and clarity of the game recording.
[0138] Based on the above embodiments, the following Figure 5 , the above step S202 of the data recording method is further described in detail. Figure 5 This is a flow chart of another data recording method provided by an exemplary embodiment of the present application. Figure 5 , the data recording method may include:
[0139] S501 : For target data corresponding to each target data type, add time information to the target data to obtain a target data file.
[0140] In the embodiments of the present application, time information can refer to a specific time point or a timestamp, can refer to the actual moment corresponding to the acquisition of the target data, or can refer to a relative moment starting from the moment of recording as time 0 and gradually increasing. When the game data recording service in the cloud server encapsulates the target data corresponding to each target data type, it can add a timestamp to the target data to form target data files corresponding to different target data types. The cloud server can then synthesize the target multimedia data based on the target data files. In this way, by adding time information to the target data to obtain the target data files and further synthesizing the target multimedia data, the accuracy of the data recording can be improved, and the quality of the data recording can be further improved.
[0141] Specifically, for target video data, when using downlink audio and video data packets to collect target video data, the game data recording service does not need to perform encoding processing, and can directly save the data in the downlink audio and video data packets as target video data in the form of a naked stream (original code stream); when using original audio and video data packets to collect target video data, the game data recording service needs to perform independent compression encoding and save the encoded data stream as target video data. In addition, the game data recording service needs to add time information to each video frame in the target video data, that is, to timestamp each video frame to obtain the target data file, so as to ensure that the original game screen can be restored during playback. The game recording service can record the target data file corresponding to the video data as game.dat.
[0142] For the voice information uploaded by the client, the cloud server can directly save the voice information and obtain the target voice data; at the same time, it can record the timestamp of each voice information, and then resample and compress the target voice data through the secondary compression method to obtain the target data file user_audio.dat corresponding to the voice data.
[0143] For the operation information uploaded by the client, the cloud server can directly save the operation information and obtain the target operation data; at the same time, the cloud server can record the timestamps corresponding to the input events such as each operation key in the operation information, and save them in sequence to obtain the target data file user_control.dat corresponding to the operation data.
[0144] In addition, for the target data file, the game data recording service can generate a packaged data description file game_record.info. This description file can describe the data structure of the target data file and store customized information such as scenes or tags set by the client.
[0145] It should be understood that the name and format of the above-mentioned target data file are merely examples and can be flexibly set based on actual needs during actual application, and the embodiments of the present application do not limit this.
[0146] S502: Determine a multimedia data template and set video parameters; the multimedia data template includes target areas corresponding to various target data.
[0147] In embodiments of the present application, a multimedia data template may refer to a display template corresponding to target multimedia data, which may include multiple target areas, each of which is used to display target data of a different target data type. A cloud server may store multiple multimedia data templates. When synthesizing target multimedia data, a multimedia data template may be determined based on preset selection rules. For example, a user-specified multimedia data template may be selected or chosen according to a preset priority order. Embodiments of the present application do not limit the specific method for determining the multimedia data template.
[0148] Video parameters may refer to video encoding parameters, specifically including frame rate, bit rate, resolution, etc. The frame rate may be expressed as the number of frames displayed per second (fps); the bit rate may refer to the number of bits transmitted per unit time, which may be expressed as bits per second (bps); and the resolution may refer to the amount of image data, which may usually be expressed in pixels per inch (ppi). The specific values of the video parameters may be preset or default values, or may be set according to the image quality requirements of the recorded game video. The embodiments of the present application do not limit the specific values and setting methods of the video parameters.
[0149] For example, Figure 6 A schematic diagram of a multimedia data template provided by an exemplary embodiment of the present application. Figure 6 As shown, the multimedia data template includes a first area 601 and a second area 602, wherein the first area 601 is a main view, which can be used to display target video data, and the main screen of the game recorded by the cloud server can be rendered in this main view area. The second area 602 can be used to display target operation data, specifically a client model that matches the client that the user is operating at the time. When an input button in the target operation data is read, the button corresponding to the client model can be highlighted, and text can be used as auxiliary information together with the operation button. Different types of client models can be pre-stored in the cloud server, and each client model corresponds to a different client identifier; the client can carry its corresponding client identifier when uploading a recording request, so that the cloud server can determine the client model corresponding to the current user based on the client identifier in the recording request. Of course, the client model can also directly adopt the default setting, and the embodiment of the present application does not limit the specific method of determining the client model.
[0150] It should be understood that the multimedia data template may also be in other forms, for example, it may include more areas, and the embodiments of the present application are not limited to this.
[0151] S503: Sort the target data files according to time information, and use the data with the smallest time information as the initial data.
[0152] In the embodiment of the present application, the cloud server can obtain target data files corresponding to different target data types, specifically including game.dat, user_audio.dat, and user_control.dat. The cloud server can then sort the target data files from smallest to largest according to time information, and read a set of target data with the smallest time information from the target data files as initial data. The time information corresponding to the initial data can be T1, and the data can subsequently be read frame by frame according to the sorting.
[0153] S504: Obtain target data in each target data file in sequence according to the video parameters and the initial data.
[0154] In an embodiment of the present application, after determining the initial data, the cloud server can read the target data in each target data file frame by frame. Specifically, the cloud server can determine the time interval ΔT corresponding to each video frame according to the frame rate set in the video parameters, and read the target data from the target data file within each time interval. For example, when the frame rate in the video parameters is 30fps, the corresponding time interval ΔT is 33 milliseconds (ms). For the first video frame, the cloud server can obtain the target data from T1 to T1+ΔT. At this time, the cloud server can read the target data from game.dat, user_audio.dat and user_control.dat respectively, and can obtain the target video data, target voice data and target operation data accordingly.
[0155] S505 : Process the target data according to a preset processing rule, and add the processed target data to a target area corresponding to the target data to obtain multimedia data.
[0156] In an embodiment of the present application, the preset processing rules may refer to pre-set rules for processing target data of different target types, which may specifically include processing rules for video data, voice data, and operation data. After reading the target data frame by frame, the cloud server may process the target data and add the processed target data to the corresponding target area of the multimedia data template to obtain multimedia data. The cloud server may then encode the multimedia data corresponding to each video frame to form a video file to obtain the target multimedia data. In this way, by reading and processing the data frame by frame, the accuracy of data processing can be improved, and the quality of game recording can be further improved.
[0157] In a possible implementation, step S505 may include the following steps (1) to (3):
[0158] (1) The multimedia data template includes a first area and a second area; the first area corresponds to the target video data; the second area corresponds to the target operation data; when the target data is the target video data, the target video data is decoded and the decoded target video data is rendered to the first area.
[0159] In the embodiment of the present application, the first area may refer to the area in the multimedia data template used to render the target video data, and may refer to the main view area of the multimedia data template; the second area may refer to the area in the multimedia data template used to display the target operation data. With respect to the target video data, the cloud server may decode the target video data and render the decoded target video data into the first area of the multimedia data template. Specifically, the cloud server may render the main game screen included in the target video data into the main view of the multimedia data template.
[0160] (2) When the target data is target operation data, the operation button corresponding to the target operation data is determined, and the operation button is displayed in the second area according to a preset display mode.
[0161] In the embodiment of the present application, the preset display mode may be highlighting, flashing, and / or text display. For the target operation data, the cloud server may determine the operation button of the target operation data in each video frame, import the client model into the second area, and display the operation button in the client model according to the preset display mode, thereby improving the intuitiveness of the operation button display.
[0162] (3) When the target data is target voice data, the target voice data is mixed with the audio included in the target video data to obtain mixed audio data.
[0163] In this embodiment of the present application, the cloud server can first decode the target voice data, and then mix the decoded target voice data with the audio of the target video data to obtain mixed audio data. In this way, the target voice data includes the user's voice information, and the target video data includes the game audio. The two are mixed and subsequently encoded to ensure a more natural and smooth sound.
[0164] It should be understood that the serial numbers in the embodiments of the present application are only used for distinction and are not intended to limit the order of the steps. Based on actual needs, the order of the steps can be flexibly adjusted, and the embodiments of the present application do not limit this.
[0165] S506: Encode the multimedia data to obtain target multimedia data.
[0166] In an embodiment of the present application, after acquiring the multimedia data corresponding to each video frame, the cloud server can send the multimedia data to the audio and video encoder for encoding optimization processing. Subsequently, the target data of the next frame can be read, and the multimedia data can be generated and encoded. After all the target data has been read, the audio and video encoder can generate a multimedia file game_record.dat, which is the final target multimedia data. In this way, by reading the target data frame by frame and performing encoding processing, the cloud server can improve the accuracy of data processing, thereby improving the quality of data recording.
[0167] For example, Figure 7 A logical diagram of target multimedia data synthesis provided by an exemplary embodiment of the present application. Figure 7 As shown, when generating target multimedia data, the cloud server can first determine the multimedia data template and set video parameters, such as frame rate and bit rate. The cloud server can then sort the target data files according to time information (i.e., timestamps) and read the target data with the smallest timestamp from the target data files as the initial data. This smallest timestamp can be recorded as T1. The cloud server can then determine the time interval ΔT corresponding to each video frame and read the target data from the first video frame, i.e., from T1 to T1+ΔT.
[0168] The cloud server can process target data of different target data types according to preset rules. Specifically, for the target video data read from game.dat, the cloud server can decode the target video data and render the decoded target video data into the first area of the multimedia data template; for the target operation data read from user_control.dat, the cloud server can determine the operation button corresponding to the target operation data and display the operation button in the second area of the multimedia data template according to the preset method; for the target voice data read from user_audio.dat, the cloud server can decode the target voice data and mix it with the audio in the target video data to obtain the mixed audio data.
[0169] After processing the target video data, target operation data, and target voice data, the cloud server obtains multimedia data corresponding to a video frame. This multimedia data can then be input into the audio and video encoder for encoding. The cloud server then determines whether the target data has been read. If not, it continues to read the target data within the next time interval ΔT. If so, it outputs the target multimedia data through the audio and video encoder. This optimized processing of the target data to generate a multimedia file improves data processing accuracy, resulting in higher-quality, smoother recorded video files.
[0170] In a possible implementation, the data recording method further includes the following steps (4) to (5):
[0171] (4) Obtain tag information and associate the tag information with the target multimedia data.
[0172] In the embodiment of the present application, tag information may refer to identification information, specifically keywords or other words associated with the cloud game scene. The embodiment of the present application does not limit the specific content of the tag information. After obtaining the target multimedia data, the cloud server may add tag information to the target multimedia data based on the custom information uploaded by the client and entered by the user, and associate the tag information with the target multimedia data.
[0173] (5) Store the tag information in a preset storage location.
[0174] In the embodiment of the present application, the cloud server can associate the tag information with the target multimedia data and store it in a preset storage location. In this way, by setting the tag information and storing it in association with the target multimedia data, the recognition of the target multimedia data can be improved, making it easier to search and find, and it can also meet the actual needs of users and improve the user experience.
[0175] In a possible implementation, the data recording method further includes the following steps (6) to (7):
[0176] (6) Obtain a search term, and determine at least one target tag information including the search term in the tag information corresponding to each target multimedia data.
[0177] In the embodiments of the present application, a search term may refer to a term searched by a user. Target tag information may refer to target tag information including the search term. Specifically, a user may trigger a preset search control to be displayed on the client, and the user may enter a search term in the preset search control. After obtaining the search term, the client may upload the search term to a cloud server. The cloud server receives the search term and determines at least one target tag information including the search term.
[0178] (7) Sending target multimedia data corresponding to at least one target tag information to the client.
[0179] In the embodiment of the present application, after determining the target tag information, the cloud server can send the target multimedia data corresponding to at least one target tag information to the client, so that the client can display the search results for the user to view. In this way, the target multimedia data can be quickly searched and found, improving the user experience.
[0180] Based on the above embodiments, Figure 8 Schematic diagram of another data recording method provided by the exemplary embodiment of the present application. Figure 8 As shown, the data recording method may further include:
[0181] S801: Receive a playback request and obtain target multimedia data from a preset storage location.
[0182] In an embodiment of the present application, the playback of target multimedia data can include two modes: one is a browsing mode, in which the user can watch the target multimedia data recorded by other users and learn about the relevant information of the cloud game, such as game instructions, game strategies, and game peripheral resources; the other mode is a training mode. The training mode is based on the browsing mode and adds an input matching verification process between the current user and the target multimedia data recording user in the same scenario, so as to realize synchronous operation training.
[0183] In this step, the client may include a playback control. When a user wishes to play back the target multimedia data, they may touch the playback control. Upon receiving the touch operation on the playback control, the client may generate a playback request and send the playback instruction to the cloud server. Upon receiving the playback request, the cloud server may initiate the playback service and load the target multimedia data from a preset storage location for parsing and rendering.
[0184] S802. In each rendering cycle, render the target multimedia data and send the rendered target multimedia data to the client, and determine the historical operation data corresponding to the target multimedia data; the historical operation data includes a historical key sequence and the first time information corresponding to the historical key sequence.
[0185] In the embodiments of the present application, the rendering cycle may refer to the rendering time interval of the cloud server, which may be determined based on video parameters and the processing power of the cloud server. For example, it may refer to the time of one video frame. The embodiments of the present application do not limit the specific length of the rendering cycle. Historical operation data may refer to the operation data corresponding to the target multimedia data during recording. Specifically, it may include a historical key sequence consisting of each operation key and first time information consisting of the timestamp corresponding to each operation key.
[0186] In this step, when parsing the target multimedia data for rendering, the cloud server can parse the multimedia data file game_record.dat, perform video rendering according to the rendering cycle, and send the rendered video data to the client for playback. In each rendering cycle, the cloud server can read the historical operation data of the current rendering cycle based on the target data file user_control.dat.
[0187] S803: Acquire current operation data in each rendering cycle; the current operation data includes a current key sequence and second time information corresponding to the current key sequence.
[0188] In the embodiment of the present application, the current operation data may refer to the operation data of the current user, which may include a current key sequence composed of various operation keys and second time information composed of timestamps corresponding to each current key.
[0189] During this step, the cloud server can confirm whether the target multimedia data is currently playing. If so, it ends the playback process. If not, the cloud server can continue to render and output the next frame of the target multimedia data. At the same time, it can determine the historical operation data corresponding to the current rendering cycle from the target multimedia data and cache it in the input queue. During the current rendering cycle, the cloud server can receive the current user's current operation data through the data channel of the streaming service and subsequently compare the two to determine the degree of match between the two.
[0190] S804: Determine a first deviation between the historical key sequence and the current key sequence, and determine a second deviation between the first time information and the second time information.
[0191] In the embodiment of the present application, the first deviation value may refer to the deviation value between key sequences, which may be determined based on the degree of similarity of the operation keys. Specifically, it may be determined by the number of keys between two operation key sequences, the order of the keys, etc. For example, within a rendering cycle, the historical key sequence includes 5 operation keys, but the current operation key sequence only includes 4 operation keys, which are the same as the first 4 keys in the historical key sequence. In this case, the deviation between the two can be determined to be 20%. Of course, the first deviation value may also be calculated using other methods, which are not limited in the embodiment of the present application.
[0192] The second deviation value may refer to the deviation value between the time information, and may be determined based on the time difference of the operation keys. For example, within a rendering cycle, the historical key sequence is the same as the current key sequence, both including 5 operation keys. The cloud server may subtract the time information corresponding to each operation key to obtain the difference between the second time information and the first time information, and then take the average value to obtain the second deviation value. Of course, the second deviation value may also be calculated in other ways, which is not limited in the embodiments of the present application.
[0193] S805: Determine a matching degree between the current operation data and the historical operation data according to the first deviation value and the second deviation value.
[0194] In the embodiment of the present application, the degree of matching may refer to the degree of matching between the current operation data and the historical operation data. After determining the first deviation value and the second deviation value, the client may determine the degree of matching between the two based on the magnitude of the deviation values. The smaller the first deviation value and the second deviation value, the greater the degree of matching. The specific calculation method can be flexibly set based on actual needs. For example, a matching function or a matching table can be set, and the matching table includes matching degrees corresponding to different deviation values. The embodiment of the present application does not limit the specific calculation method of the matching degree.
[0195] In this step, the cloud server can obtain a matching degree within each rendering cycle. After the target multimedia data is played, the cloud server can obtain multiple matching degrees. At this time, the cloud server can take the average of all matching degrees to obtain the matching degree of the current operation data and the historical operation data. The cloud server can then send this matching degree to the client, which will display it to the current user. In this way, by comparing the operation data of the game recording user with the current user, the cloud server can enable the current user to achieve synchronous training and improve the user's gaming experience. The user also does not need to frequently switch screens for comparison operations, which can simplify the user's operation and save the user's time. In addition, the video parsing and rendering and the matching degree calculation process are all implemented in the cloud server, which will not occupy the client's system resources and can ensure a normal user experience.
[0196] For example, Figure 9 A logical diagram of a training mode provided by an exemplary embodiment of the present application. Figure 9 As shown, after receiving a playback request uploaded by a client, the cloud server can initiate the playback service. The cloud server can retrieve the target multimedia data from a preset storage location and parse it. The cloud server can determine whether playback has completed. If not, during each rendering cycle, the cloud server renders a frame of the target multimedia data and sends it to the client for playback. It also determines historical operation data for the current rendering cycle. Simultaneously, during each rendering cycle, the cloud server can retrieve current operation data from the client. The cloud server can determine the degree of match based on the deviation between the historical and current operation data. Specifically, the degree of match can be updated by taking an average. If playback of the target multimedia data has completed, the cloud server can output the final degree of match and send it to the client for display. In this way, in training mode, the cloud server can simultaneously replay the game video while continuing to receive the current user's operation data, compare the differences between the two processes, and ultimately calculate a degree of match for the current user, enhancing the user experience.
[0197] On the basis of the above embodiments, the data recording method in the embodiments of the present application is specifically described below with the client as the execution subject. Figure 10 Schematic diagram of another data recording method provided by the exemplary embodiment of the present application. Figure 10 As shown, the method is applied to the client and specifically includes:
[0198] S1001. During the operation of the cloud game, in response to a first touch operation input to a preset recording control, display an alternative data type.
[0199] In the embodiment of the present application, the preset recording control may refer to a pre-set function control for game recording. The first touch operation may refer to a click operation, etc. The alternative data type may refer to a pre-set data type, which may specifically include video data, voice data, and operation data, etc.
[0200] In this step, if the user needs to record the game while experiencing the cloud game, he can perform a first touch operation on the preset recording control. In response to the first touch operation, the client can display alternative data types for the user to choose.
[0201] S1002. In response to a selection operation on an alternative data type input, add a target data type corresponding to the selection operation to a recording request, and send the recording request to a cloud server.
[0202] In an embodiment of the present application, a selection operation may refer to an operation such as a user clicking on an alternative data type. After the client displays the alternative data types, the user may select one or more of the alternative data types. In response to the user's selection operation, the client may determine the alternative data type corresponding to the selection operation as the target data type. The client may then add the target data type to a recording request and send the recording request to the cloud server. After receiving the recording request, the cloud server may enter data recording mode and collect target data corresponding to the target data type.
[0203] S1003: In response to a second touch operation input to the preset recording control, a stop recording request is sent to the cloud server.
[0204] In this embodiment of the present application, the second touch operation may be an input operation such as a click by the user to end recording. After receiving the second touch operation on the preset recording control, the client may send a stop recording request to the cloud server. After receiving the stop recording request, the cloud server may stop data collection, encapsulate and package the collected target data to obtain a target multimedia data file, and store the target multimedia data file in a preset storage location.
[0205] In an embodiment of the present application, during the operation of a cloud game, in response to a first touch operation input to a preset recording control, the client displays an alternative data type; in response to a selection operation input to the alternative data type, the client adds the target data type corresponding to the selection operation to a recording request and sends the recording request to the cloud server; in response to a second touch operation input to the preset recording control, the client sends a stop recording request to the cloud server. In this way, in an embodiment of the present application, the client only needs to send a recording request and a stop recording request to the cloud server, and the cloud server records the target data and encapsulates the collected target data into target multimedia data. This can save client system resources, improve the user experience, improve the quality of data recording, and reduce development costs.
[0206] In a possible implementation, the data recording method may further include the following steps (8) to (9):
[0207] (8) Display label input control.
[0208] (9) In response to an input operation on the tag input control, obtain tag information and send the tag information to the cloud server.
[0209] In an embodiment of the present application, during the operation of a cloud game, when a user needs to add a custom tag to target multimedia data, the user can perform a preset operation or click a preset tag control in the client. The client can display a tag input control in response to the user's preset operation or the click operation on the preset tag control. Afterwards, the user can enter custom information in the tag input control, which can be text, voice, or pictures. In response to the user's input operation, the client can use the custom information corresponding to the input operation as tag information. Finally, the client can upload the tag information to the cloud server so that the cloud server can associate the tag information with the target multimedia data for storage, facilitating subsequent data search.
[0210] In a possible implementation, the data recording method may further include the following steps (10) to (13):
[0211] (10) In response to the third touch operation, a search control is displayed.
[0212] In the embodiment of the present application, the third touch operation may be a click, double-click, slide, press a physical button, or follow a shortcut key. When a user needs to search for target multimedia data during a cloud game, the third touch operation can be performed on the current game screen without switching screens. The client receives and responds to the third touch operation and can display a search control.
[0213] (11) In response to an input operation on a search control, a search term is obtained and sent to a cloud server.
[0214] (12) Receive at least one target multimedia data returned by the cloud server, and display at least one target multimedia data.
[0215] In an embodiment of the present application, a user may enter a search term in a search control. The client obtains the search term based on the user's input operation and sends the search term to a cloud server. The cloud server may perform a search based on the search term and determine at least one target tag information including the search term. At the same time, the cloud server may return at least one target multimedia data corresponding to the at least one target tag information to the client. After receiving the at least one target multimedia data, the client may display the at least one target multimedia data on a display screen.
[0216] (13) In response to a fourth touch operation on at least one target multimedia data, play the target multimedia data corresponding to the fourth touch operation.
[0217] In an embodiment of the present application, the fourth touch operation may refer to a click operation, etc. The user can select one of at least one target multimedia data displayed on the client to play, and the client responds to the user's fourth touch operation, determines the target multimedia data corresponding to the fourth touch operation and plays it. Optionally, the user can view the target multimedia data through an authorization code, which may be a password or a random code, etc., which is not limited in this embodiment of the present application. In an embodiment of the present application, the above-mentioned quick search process of the client can be carried out simultaneously in the scenario where the user experiences cloud gaming, without the user having to switch screens, and the operation is simpler and more convenient.
[0218] For example, Figure 11 A schematic diagram of a target multimedia data search result provided by an exemplary embodiment of the present application. Figure 11 As shown, a search control 1101 is displayed in the game screen of the cloud game, and search results 1102 and search results 1103 are also displayed. Specifically, in the process of experiencing the cloud game, the user can wake up the data search function of the cloud game through a third touch operation in the current game scene. At this time, the client can display the search control 1101 in response to the third touch operation. After the user enters the search term in the search control 1101, the client can upload the search term to the cloud server. The cloud server determines at least one target tag information including the search term through query matching, and at the same time determines the target multimedia data corresponding to each target tag information, and returns at least one target multimedia data to the client. The client can select at least one target multimedia data and display it as a search result, for example Figure 11 In this way, the client can perform the search process during the cloud game running process, and realize the search in the scene where the user experiences the game, without switching pages, and the operation is simple and convenient, which improves the user experience.
[0219] Based on any of the above embodiments, Figure 12 This is a system interaction diagram of a data recording method provided by an exemplary embodiment of the present application. Figure 12As shown, the interactive system for data recording may include a client, a cloud server, and a preset storage location. Specifically, user A can connect to the cloud game server, i.e., the cloud server, through the cloud game SDK in client A, to start and use a specific cloud game. When the user enters a certain game scene, if the user needs to turn on the data recording function, the user can perform a first touch operation on the preset recording control, and client A can send a recording request to the cloud server in response to the first touch operation. At this time, the cloud server will enter the data recording mode and will collect target data types corresponding to target data. After that, the cloud server can end data collection based on the stop recording request, and package the collected target data to obtain target multimedia data, and finally store the target multimedia data in the preset storage location.
[0220] The target multimedia data can be pushed to other users according to the specified rules. If other users have access needs, they can obtain access rights to the data through certain authorization means such as authorization codes. Specifically, user B can touch the playback function control, and the client sends a playback request to the cloud server in response to the touch operation. The cloud server can start the playback service and obtain the target multimedia data from the preset storage location for parsing and rendering, and transmit it to the client for playback. Specifically, during the playback process, there can be two playback modes. One is the normal browsing mode, that is, in the user's current cloud game screen, a small video window is started to watch the target multimedia data saved by other players. The other is the training mode. While rendering and parsing the target multimedia data and sending it to the client for playback, the cloud server determines the historical operation data and receives the current operation data of the current user, compares the deviation between the two, and determines the matching degree between the current operation data and the historical operation data.
[0221] In the related art, traditional game recording methods have the problems of high development costs, large system resource occupation, impact on user gaming experience, unclear recording, and poor data recording quality. In terms of data sharing, with traditional sharing methods, users can only upload locally recorded gaming videos to various forums or video websites, and other users can only watch user-recorded videos. The functions are relatively simple. In addition, since these resources are distributed in various corners, the cost of user searches is also relatively high. In particular, users may need to switch back and forth during the experience of cloud games, which affects the user experience. While experiencing cloud games, users need to switch between multiple windows to search and view game recording data. The operation is relatively cumbersome and the user experience is poor.
[0222] In the embodiment of the present application, the cloud server records the target data according to the recording request and the stop recording request of the client, and encapsulates the collected target data into target multimedia data. There is no need for the manufacturer to invest in new development, which reduces development costs; there is no need to configure any tools on the client, which is relatively simple and convenient. The cloud server stores the target multimedia data in a preset storage location for a long time. The preset storage location can be an open cloud game data platform. Other users can search for the target multimedia data while experiencing the cloud game, and can directly access the target multimedia data after obtaining authorization, which facilitates the user's search needs for related resources. After the user stores the recorded target multimedia data in a preset storage location, such as a cloud game data platform, as the amount of data increases, a game strategy community that users can search and browse can be formed on the cloud server, which is convenient for users to experience games, view strategies, and imitate strategies, meeting the user's social needs and further enhancing the user experience.
[0223] In addition, in the embodiment of the present application, the playback service of the cloud server provides two playback modes. In the normal browsing mode, users can watch videos recorded by other users during the cloud game process. In the training mode, the cloud server can provide the same scene playback and receive the current operation data input by the current user. At the same time, it compares the process differences between the historical operation data and the current operation data to determine the matching degree between the two. In this way, in the embodiment of the present application, the game can be recorded through the cloud server, and the search, sharing and playback of the target multimedia data can be realized, which lowers the user's threshold for using cloud games, can enhance the user's interest in cloud games, improve the user's usage experience, and thus can enhance the user's stickiness to cloud games.
[0224] Figure 13 This is a schematic diagram of a data recording device provided by an exemplary embodiment of the present application. Figure 13 , the data recording device 130 is applied to the cloud server, specifically including:
[0225] The acquisition module 131 is configured to, when receiving a recording request during the cloud game operation, start acquiring target data corresponding to a target data type, where the recording request includes the target data type;
[0226] The encapsulation module 132 is configured to stop data collection upon receiving a request to stop recording, and encapsulate the collected target data to obtain target multimedia data;
[0227] The storage module 133 is configured to store the target multimedia data in a preset storage location.
[0228] In a possible implementation, the target data includes target voice data, target operation data, and target video data; the acquisition module 131 is specifically configured to:
[0229] Collect target voice data based on the voice information uploaded by the client, and collect target operation data based on the operation information uploaded by the client;
[0230] Obtain the downlink audio and video data packets of the cloud game, and collect the target video data based on the downlink audio and video data packets; or obtain the original audio and video data packets of the cloud game, and collect the target video data based on the original audio and video data packets.
[0231] In a possible implementation, the encapsulation module 132 is specifically configured to:
[0232] For the target data corresponding to each target data type, time information is added to the target data to obtain a target data file;
[0233] Synthesize target multimedia data according to the target data file.
[0234] In a possible implementation, the encapsulation module 132 is specifically configured to:
[0235] Determine a multimedia data template and set video parameters; the multimedia data template includes target areas corresponding to various target data;
[0236] Sort the target data files according to time information, and use the data with the smallest time information as the initial data;
[0237] According to the video parameters and the initial data, the target data in each target data file is obtained in sequence;
[0238] Processing the target data according to a preset processing rule, and adding the processed target data to a target area corresponding to the target data to obtain multimedia data;
[0239] The multimedia data is encoded to obtain target multimedia data.
[0240] In a possible implementation, the multimedia data template includes a first area and a second area; the first area corresponds to the target video data; the second area corresponds to the target operation data; the encapsulation module 132 is specifically configured to:
[0241] When the target data is target video data, decoding the target video data and rendering the decoded target video data to the first area;
[0242] When the target data is target operation data, determining an operation button corresponding to the target operation data, and displaying the operation button in a preset display mode in the second area;
[0243] When the target data is target voice data, the target voice data is mixed with the audio included in the target video data to obtain mixed audio data.
[0244] In one possible implementation, the device 130 is further configured to:
[0245] Acquire tag information and associate the tag information with target multimedia data;
[0246] Store the tag information to the preset storage location.
[0247] In one possible implementation, the device 130 is further configured to:
[0248] Acquire a search word, and determine at least one target tag information including the search word in the tag information corresponding to each target multimedia data;
[0249] Sending target multimedia data corresponding to at least one target tag information to the client.
[0250] In one possible implementation, the device 130 is further configured to:
[0251] receiving a playback request and obtaining target multimedia data from a preset storage location;
[0252] In each rendering cycle, the target multimedia data is rendered and sent to the client, and historical operation data corresponding to the target multimedia data is determined; the historical operation data includes a historical key sequence and first time information corresponding to the historical key sequence;
[0253] In each rendering cycle, current operation data is obtained; the current operation data includes the current key sequence and the second time information corresponding to the current key sequence;
[0254] Determine a first deviation value between the target key sequence and the current key sequence, and determine a second deviation value between the first time information and the second time information;
[0255] The matching degree between the current operation data and the historical operation data is determined according to the first deviation value and the second deviation value in each rendering cycle.
[0256] The data recording device 130 provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0257] Figure 14 This is a schematic diagram of a data recording device provided by an exemplary embodiment of the present application. Figure 14 The data recording device 140 is applied to the client and specifically includes:
[0258] The display module 141 is configured to display the candidate data types in response to a first touch operation input to a preset recording control during the operation of the cloud game;
[0259] A first sending module 142 is configured to, in response to a selection operation input on an alternative data type, add a target data type corresponding to the selection operation to a recording request, and send the recording request to a cloud server;
[0260] The second sending module 143 is configured to send a recording stop request to the cloud server in response to a second touch operation input to the preset recording control.
[0261] In one possible implementation, the device 140 is further configured to:
[0262] In response to the third touch operation, displaying a search control;
[0263] In response to an input operation on a search control, obtaining a search term and sending the search term to a cloud server;
[0264] receiving at least one target multimedia data returned by the cloud server, and displaying the at least one target multimedia data;
[0265] In response to a fourth touch operation on at least one target multimedia data, playing the target multimedia data corresponding to the fourth touch operation.
[0266] The data recording device 140 provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principles and beneficial effects are similar and will not be repeated here.
[0267] Figure 15 This is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application, see Figure 15 The electronic device 150 may include a processor 151 and a memory 152. Exemplarily, the processor 151 and the memory 152 are interconnected via a bus 153.
[0268] Memory 152 stores computer-executable instructions;
[0269] The processor 151 executes the computer-executable instructions stored in the memory 152 , so that the processor 151 performs the data recording method as shown in the above method embodiment.
[0270] Accordingly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the data recording method of the above method embodiment.
[0271] Accordingly, an embodiment of the present application may also provide a computer program product, including a computer program. When the computer program is executed by a processor, it can implement the data recording method shown in the above method embodiment.
[0272] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0273] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0274] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0275] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0276] In a typical configuration, a computing device includes one or more processors, input / output interfaces, network interfaces, and memory.
[0277] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0278] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0279] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0280] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A data recording method, characterized in that: Applied to a cloud server, the method comprises: During the operation of the cloud game, when a recording request is received from a client, the target data corresponding to the target data type is collected, and the recording request includes the target data type; When a request to stop recording is received, data collection is stopped, and the collected target data is encapsulated to obtain target multimedia data; storing the target multimedia data in a preset storage location; The encapsulation of the collected target data to obtain target multimedia data includes: for the target data corresponding to each target data type, processing the target data according to preset rules to obtain the target multimedia data; wherein the preset rules are: when the target data is target video data, decoding the target video data, and rendering the decoded target video data into the first area of the multimedia data template; when the target data is target operation data, determining the operation button corresponding to the target operation data, and displaying the operation button in the second area of the multimedia data template according to a preset manner.
2. The method according to claim 1, characterized in that The target data includes target voice data, target operation data and target video data; The starting to collect target data corresponding to the target data type includes: Collecting the target voice data according to the voice information uploaded by the client, and collecting the target operation data according to the operation information uploaded by the client; Obtain the downlink audio and video data packets of the cloud game, and collect the target video data according to the downlink audio and video data packets; or obtain the original audio and video data packets of the cloud game, and collect the target video data according to the original audio and video data packets.
3. The method according to claim 1 or 2, characterized in that: The target data corresponding to each target data type is processed according to a preset rule to obtain the target multimedia data, including: For target data corresponding to each target data type, adding time information to the target data to obtain a target data file; The target multimedia data is synthesized according to the target data file.
4. The method according to claim 3, characterized in that The step of synthesizing the target multimedia data according to the target data file comprises: Determine a multimedia data template and set video parameters; the multimedia data template includes a target area corresponding to each target data; Sort the target data files according to the time information, and use the data with the smallest time information as initial data; According to the video parameters and the initial data, sequentially acquiring target data in each of the target data files; Processing the target data according to a preset processing rule, and adding the processed target data to a target area corresponding to the target data to obtain multimedia data; The multimedia data is encoded to obtain the target multimedia data.
5. The method according to claim 4, characterized in that The multimedia data template includes a first area and a second area; the first area corresponds to target video data; the second area corresponds to target operation data; the processing of the target data according to a preset processing rule and adding the target data to a target position of the multimedia data template includes: When the target data is target video data, decoding the target video data, and rendering the decoded target video data to the first area; When the target data is target operation data, determining an operation button corresponding to the target operation data, and displaying the operation button in the second area according to a preset display mode; When the target data is target voice data, the target voice data is mixed with the audio included in the target video data to obtain mixed audio data.
6. The method according to any one of claims 1 to 5, characterized in that: After obtaining the target multimedia data, the method further includes: Acquire tag information, and associate the tag information with the target multimedia data; The tag information is stored in the preset storage location.
7. The method according to claim 6, characterized in that After storing the target multimedia data in a preset storage location, the method further includes: Acquire a search word, and determine at least one target tag information including the search word in the tag information corresponding to each target multimedia data; The target multimedia data respectively corresponding to the at least one target tag information is sent to the client.
8. The method according to any one of claims 1 to 7, characterized in that: After storing the target multimedia data in a preset storage location, the method further includes: receiving a playback request, and acquiring target multimedia data from the preset storage location; In each rendering cycle, the target multimedia data is rendered and sent to the client, and historical operation data corresponding to the target multimedia data is determined; the historical operation data includes a historical key sequence and first time information corresponding to the historical key sequence; In each rendering cycle, current operation data is obtained; the current operation data includes a current key sequence and second time information corresponding to the current key sequence; Determine a first deviation value between the historical key sequence and the current key sequence, and determine a second deviation value between the first time information and the second time information; The matching degree between the current operation data and the historical operation data is determined according to the first deviation value and the second deviation value in each rendering cycle.
9. A data recording method, characterized in that: Applied to a client, the method comprises: During the running of the cloud game, in response to a first touch operation input to a preset recording control, displaying an alternative data type; In response to a selection operation on the candidate data type input, adding a target data type corresponding to the selection operation to a recording request, and sending the recording request to a cloud server; In response to a second touch operation input to the preset recording control, a stop recording request is sent to the cloud server, so that the cloud server stops data collection when receiving the stop recording request, and processes the target data corresponding to each target data type according to preset rules to obtain target multimedia data; wherein the preset rules are: when the target data is target video data, the target video data is decoded, and the decoded target video data is rendered into the first area of the multimedia data template; when the target data is target operation data, the operation button corresponding to the target operation data is determined, and the operation button is displayed in the second area of the multimedia data template in a preset manner.
10. The method according to claim 9, characterized in that After sending the request to stop recording to the cloud server, the method further includes: In response to the third touch operation, displaying a search control; In response to an input operation on the search control, obtaining a search term and sending the search term to the cloud server; receiving at least one target multimedia data returned by the cloud server, and displaying the at least one target multimedia data; In response to a fourth touch operation on the at least one target multimedia data, the target multimedia data corresponding to the fourth touch operation is played.
11. A data recording device, characterized in that: Applied to cloud servers, including: A collection module, used for starting to collect target data corresponding to a target data type when receiving a recording request from a client during the operation of a cloud game, wherein the recording request includes the target data type; The encapsulation module is used to stop data collection and encapsulate the collected target data to obtain target multimedia data when receiving a request to stop recording, wherein the encapsulation of the collected target data to obtain the target multimedia data includes: for the target data corresponding to each target data type, processing the target data according to a preset rule to obtain the target multimedia data; wherein the preset rule is: when the target data is target video data, decoding the target video data and rendering the decoded target video data into a first area of a multimedia data template; when the target data is target operation data, determining an operation button corresponding to the target operation data and displaying the operation button in a preset manner in a second area of the multimedia data template; The storage module is used to store the target multimedia data in a preset storage location.
12. An electronic device, characterized in that: include: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the data recording method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the data recording method according to any one of claims 1 to 10 when executed by a processor.
14. A computer program product, characterized in that The invention comprises a computer program, which implements the data recording method according to any one of claims 1 to 10 when being executed by a processor.
