Data transmission method and device

By obtaining the frame rate information in video transmission and determining the target decoding rate, and requesting matching encoded data from the server, the problem of lag caused by mismatch in decoding performance in video transmission is solved, and the stability of the decoding process is improved.

CN119653090APending Publication Date: 2025-03-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311206003.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

During video transmission, the video version selected by the client is likely to be inconsistent with the decoding performance, resulting in stuttering during decoding.

Method used

By sending a transmission request for data to be played to the server, obtaining frame rate information, and determining the target decoding rate based on the decoding rate, sending the screen display parameters corresponding to the target decoding rate to the server, and obtaining the encoded data returned by the server.

Benefits of technology

Ensure that the encoded data matches the decoding performance of the client, improve the stability of the decoding process, and avoid lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119653090A_ABST
    Figure CN119653090A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data transmission method and device. According to the embodiment of the invention, a transmission request of to-be-played data can be sent to a server, and frame rate information of the to-be-played data returned by the server is acquired; a plurality of associated picture display parameters and a decoding rate corresponding to each picture display parameter are obtained, and the decoding rate refers to the number of frames decoded in unit time under the picture display parameters; determining a target decoding rate from the decoding rates according to the frame rate information; sending a picture display parameter corresponding to the target decoding rate to a server; and obtaining coded data returned by the server based on the transmission request. In the embodiment of the invention, the to-be-played data is coded according to the picture display parameter corresponding to the target decoding rate, so that the coded data can be matched with the decoding performance of the client, and the coded data can be smoothly decoded according to the target decoding rate after the coded data returned by the server is acquired. Therefore, the scheme can improve the stability of the decoding process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a data transmission method and device. Background Art

[0002] During the video transmission process, the server will encode the original video data according to the preset resolution and generate video versions with different resolutions. The client can select a suitable video version from the multiple video versions provided by the server to decode and play according to its own resolution and network conditions.

[0003] However, the decoding performance of the client is mainly determined by multiple decoding factors such as hardware equipment, decoder, and software optimization. The video version selected by the client is prone to mismatching the decoding performance. Using a mismatched video version for decoding will cause lag. Summary of the invention

[0004] The embodiments of the present application provide a data transmission method and device, which can improve the stability of the decoding process.

[0005] The present application provides a data transmission method, including:

[0006] Send a transmission request for the data to be played to the server, and obtain the frame rate information of the data to be played returned by the server;

[0007] Obtaining multiple associated screen display parameters and a decoding rate corresponding to each screen display parameter, where the decoding rate refers to the number of frames decoded per unit time under the screen display parameter;

[0008] Determine a target decoding rate from the decoding rate according to the frame rate information;

[0009] Sending the screen display parameters corresponding to the target decoding rate to the server;

[0010] Based on the transmission request, the encoded data returned by the server is obtained, where the encoded data is data obtained by encoding the to-be-played data according to the screen display parameters corresponding to the target decoding rate.

[0011] The present application also provides a data transmission device, including:

[0012] A frame rate acquisition unit, used to send a transmission request for the to-be-played data to the server, and acquire the frame rate information of the to-be-played data returned by the server;

[0013] A relationship acquisition unit, used to acquire a plurality of associated picture display parameters and a decoding rate corresponding to each picture display parameter, wherein the decoding rate refers to the number of frames decoded per unit time under the picture display parameter;

[0014] A frame rate determination unit, configured to determine a target decoding rate from a decoding rate according to the frame rate information;

[0015] A parameter sending unit, used for sending the screen display parameters corresponding to the target decoding rate to the server;

[0016] The data acquisition unit is used to acquire the coded data returned by the server based on the transmission request, where the coded data is the data obtained by encoding the to-be-played data by the server according to the screen display parameters corresponding to the target decoding rate.

[0017] In some embodiments, determining a target decoding rate from a decoding rate according to the frame rate information includes:

[0018] Acquire the previous playback data of the data to be played and the frame rate information of the previous playback data, wherein the playback sequence number of the previous playback data is located before the playback sequence number of the data to be played;

[0019] If the variation between the frame rate information of the to-be-played data and the frame rate information of the previously-played data satisfies a preset condition, a target decoding rate is determined from the number of decoded frames according to the frame rate information.

[0020] In some embodiments, before acquiring the associated multiple picture display parameters and the decoding rate corresponding to each picture display parameter, the method further includes:

[0021] Acquire multiple associated test data, where the multiple test data have different screen display parameters;

[0022] The test data is converted to obtain an average conversion time, where the average conversion time is the average time required to convert each frame in the test data;

[0023] Divide the unit time by the average conversion time to obtain the decoding rate of the test data;

[0024] Based on the test data, a decoding rate corresponding to the picture display parameters is determined.

[0025] In some embodiments, the average conversion time includes the average decoding time and the average rendering time. The average decoding time is the average time required for decoding each frame in the test data. The average rendering time is the average time required for rendering the decoded test data. The unit time is divided by the average conversion time to obtain the decoding rate of the test data, including:

[0026] If the test data is in parallel mode, the maximum processing time is determined from the average decoding time and the average rendering time, and the parallel mode indicates that decoding and rendering are performed in parallel;

[0027] Divide the unit time by the longest processing time to get the decoding rate of the test data;

[0028] If the test data is in serial mode, the average decoding time and the average rendering time are added to obtain the average processing time. The serial mode indicates that decoding and rendering are performed sequentially;

[0029] Divide the unit time by the average processing time to get the decoding rate of the test data.

[0030] In some embodiments, obtaining the associated plurality of test data includes:

[0031] Acquire recommended display parameters, where the recommended display parameters include a first display parameter and a second display parameter, where the first display parameter is the number of pixels in the horizontal direction of the client, and the second display parameter is the number of pixels in the vertical direction of the client;

[0032] Determining a screen display ratio of the client according to the first display parameter and the second display parameter;

[0033] Sending a data acquisition request to the server, the data acquisition request including recommended display parameters and the screen display ratio of the client;

[0034] Based on the data acquisition request, multiple test data associated with the client sent by the server are acquired, the screen display parameters of the test data are not greater than the recommended display parameters, and the screen display ratio of the test data is the same as the screen display ratio of the client.

[0035] In some embodiments, after dividing the unit time by the average conversion time to obtain the decoding rate of the test data, the method further includes:

[0036] Based on the screen display parameters of the multiple test data, the multiple test data are sorted to obtain a sorted test data sequence, where the test data sequence includes first test data and second test data, the first test data is adjacent to the second test data, and the screen display parameter of the first test data is less than the screen display parameter of the second test data;

[0037] If the decoding rate of the second test data is greater than the decoding rate of the first test data, the decoding rate of the second test data is updated.

[0038] In some embodiments, after obtaining the encoded data returned by the server based on the transmission request, the method further includes:

[0039] According to the picture display parameters corresponding to the target decoding rate, the encoded data is decoded to obtain the data to be played;

[0040] The data to be played is displayed according to the screen display parameters corresponding to the target decoding rate.

[0041] The present application also provides a data transmission method, including:

[0042] Obtaining a transmission request for the data to be played sent by the client;

[0043] According to the transmission request, the frame rate information of the data to be played is sent to the client;

[0044] Based on the frame rate information, the target display parameters sent by the client are obtained. The target display parameters refer to the screen display parameters of the client under the frame rate information.

[0045] According to the target display parameters, the data to be played is encoded to obtain encoded data;

[0046] Sends encoded data to the client.

[0047] The present application also provides a data transmission device, including:

[0048] A request acquisition unit, used to acquire a transmission request for the to-be-played data sent by the client;

[0049] A frame rate sending unit, used to send frame rate information of the data to be played to the client according to the transmission request;

[0050] A parameter acquisition unit, used to acquire a target display parameter sent by the client based on the frame rate information, where the target display parameter refers to a screen display parameter of the client under the frame rate information;

[0051] A data encoding unit, used for encoding the data to be played according to the target display parameters to obtain encoded data;

[0052] The data sending unit is used to send the encoded data to the client.

[0053] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores multiple instructions; the processor loads instructions from the memory to execute the steps in any one of the data transmission methods provided in the embodiments of the present application.

[0054] An embodiment of the present application also provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps in any one of the data transmission methods provided in the embodiments of the present application.

[0055] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in any one of the data transmission methods provided in the embodiment of the present application.

[0056] The embodiment of the present application can send a transmission request for the data to be played to the server, and obtain the frame rate information of the data to be played returned by the server; obtain multiple associated screen display parameters, and the decoding rate corresponding to each screen display parameter, the decoding rate refers to the number of frames decoded per unit time under the screen display parameters; determine the target decoding rate from the decoding rate according to the frame rate information; send the screen display parameters corresponding to the target decoding rate to the server; based on the transmission request, obtain the encoded data returned by the server, the encoded data is the data obtained by the server encoding the data to be played according to the screen display parameters corresponding to the target decoding rate.

[0057] In this application, since the screen display parameters associated with the client can correspond to its decoding rate, and the decoding rate can reflect the decoding performance of the client, the screen display parameters of the client can correspond to the decoding performance of the client. The client can determine the target decoding rate that matches the frame rate information from the decoding rate, so that the server can encode the data to be played according to the screen display parameters corresponding to the target decoding rate, so that the encoded data can match the decoding performance of the client, so that after obtaining the encoded data returned by the server, the encoded data can be smoothly decoded according to the target decoding rate. As a result, the stability of the decoding process is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0059] Figure 1a It is a scenario schematic diagram of the data transmission method provided in an embodiment of the present application;

[0060] Figure 1b It is a flowchart of the data transmission method provided in the embodiment of the present application applied on the client side;

[0061] Figure 2 It is a flowchart of the data transmission method provided in the embodiment of the present application applied on the server side;

[0062] Figure 3a is a flowchart of processing test data provided by an embodiment of the present application;

[0063] Figure 3b is a flow chart for creating a corresponding relationship between a decoding rate and a picture display parameter provided in an embodiment of the present application;

[0064] Figure 4 It is a structural diagram of the data transmission device provided in an embodiment of the present application applied on the client side;

[0065] Figure 5 It is a structural diagram of the data transmission device provided in an embodiment of the present application applied on the server side;

[0066] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0068] The embodiments of the present application provide a data transmission method and device.

[0069] The data transmission device may be integrated into an electronic device, which may be a terminal, a server, or the like. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC); the server may be a single server or a server cluster consisting of multiple servers.

[0070] In some embodiments, the data transmission device may also be integrated into multiple electronic devices. For example, the data transmission device may be integrated into multiple servers, and the data transmission method of the present application may be implemented by multiple servers.

[0071] In some embodiments, the server may also be implemented in the form of a terminal.

[0072] For example, refer to Figure 1a The electronic device 01 can send a transmission request for the data to be played to the server 02, and obtain the frame rate information of the data to be played returned by the server 02; obtain multiple associated screen display parameters, and the decoding rate corresponding to each screen display parameter, the decoding rate refers to the number of frames decoded per unit time under the screen display parameters; determine the target decoding rate from the decoding rate according to the frame rate information; send the screen display parameters corresponding to the target decoding rate to the server 02; based on the transmission request, obtain the encoded data returned by the server 02, the encoded data is the data obtained by the server encoding the data to be played according to the screen display parameters corresponding to the target decoding rate.

[0073] Among them, since the screen display parameters associated with the client can correspond to its decoding rate, and the decoding rate can reflect the decoding performance of the client, the screen display parameters of the client can correspond to the decoding performance of the client. The client can determine the target decoding rate that matches the frame rate information from the decoding rate, so that the server can encode the data to be played according to the screen display parameters corresponding to the target decoding rate, so that the encoded data can match the decoding performance of the client, so that after obtaining the encoded data returned by the server, the encoded data can be smoothly decoded according to the target decoding rate. As a result, the stability of the decoding process is improved.

[0074] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0075] In this embodiment, a data transmission method is provided, which is applied to a client, such as Figure 1b As shown, the specific process of the data transmission method can be as follows:

[0076] 110. Send a transmission request for the data to be played to the server, and obtain frame rate information of the data to be played returned by the server.

[0077] The server stores multimedia data, which can be transmitted to multiple clients via a network so that the clients can play the multimedia data.

[0078] The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The client can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The client and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0079] Multimedia data can be recorded videos (movies, TV shows, videos, etc.), cloud game video streams, online live broadcast data, etc.

[0080] The data to be played is multimedia data that the client needs to obtain from the server. For example, the data to be played can be recorded videos, cloud game video streams, online live broadcast data, etc. that the client needs to obtain from the server.

[0081] The transmission request is used to request the server to transmit the data to be played to the client.

[0082] The frame rate information reflects the number of frames of the data to be played per unit time.

[0083] For example, the transmission request may request the server to transmit a recorded video to the client. Since the rhythm of the recorded video may be different in multiple time periods, the recorded video may have different frame rate information in different time periods.

[0084] For example, the transmission request may also request the server to transmit a cloud game video stream to the client. The cloud game video stream is a video stream composed of game images generated by the server based on user input. Due to the influence of the network, user input, etc., the frame rate information of the cloud game video stream generated by the server in different time periods may be different.

[0085] For example, the transmission request can also request the server to transmit live video to the client. The host can send the real-time generated video to the server, and the client can obtain the video from the server through the transmission request. Due to the influence of the host's network jitter, live broadcast software failure, etc., the frame rate information of the video generated by the host in different time periods may be different.

[0086] 120. Acquire multiple associated picture display parameters and a decoding rate corresponding to each picture display parameter, where the decoding rate refers to the number of frames decoded per unit time under the picture display parameter.

[0087] Among them, the picture display parameter refers to the resolution of the client, which is used to indicate the number of pixels that the client can display to measure the degree of detail displayed by the client. A higher picture display parameter means that more pixels can be used to display images, and more pixels can provide more details and higher clarity.

[0088] For example, since different clients may have different screen panels, display controllers, and graphics cards, the resolutions supported by different clients may be different, and the same client may support multiple resolutions.

[0089] The decoding rate refers to the number of frames decoded by the client's decoder per unit time under the screen display parameters.

[0090] The unit time is used to measure the decoding efficiency of the client's decoder. For example, the unit time may be 1 second, and the number of frames decoded within 1 second may measure the decoding efficiency of the client's decoder. The unit time is not limited here.

[0091] For example, when the client updates the system version, installs an application, cleans up the recycle bin, etc., the decoding efficiency of the client's decoder may be affected. In this way, the decoding rate corresponding to each screen display parameter may be re-determined.

[0092] In some embodiments, in order to make the picture display parameter correspond to the decoding rate, before obtaining the associated multiple picture display parameters and the decoding rate corresponding to each picture display parameter, the method further includes:

[0093] Acquire multiple associated test data, where the multiple test data have different screen display parameters;

[0094] The test data is converted to obtain an average conversion time, where the average conversion time is the average time required to convert each frame in the test data;

[0095] Divide the unit time by the average conversion time to obtain the decoding rate of the test data;

[0096] Based on the test data, a decoding rate corresponding to the picture display parameters is determined.

[0097] The test data is multimedia data used to test the decoding efficiency of a client decoder, and the plurality of test data have different picture display parameters.

[0098] For example, the test data may be test multimedia data pre-set in the client, or test multimedia data pre-set in the server, or test multimedia data with different picture display parameters randomly obtained by the client from the server when the client needs to recalculate the decoding rate corresponding to the picture display parameters, and so on.

[0099] The average conversion time is equal to the total time it takes the client to convert the test data divided by the number of frames of the test data.

[0100] For example, if the total time for the client to convert the test data is 2 seconds, and the number of frames of the test data is 80, then the average conversion time = 0.025 milliseconds (ms). If the unit time is 1 second, then the decoding rate of the test data = 1 ÷ 0.025 = 40 FPS, 40 FPS means that the client displays 40 frames per second, where FPS (Frames Per Second) can correspond to the decoding rate through the test data, where as the picture display parameters of the test data increase, the decoding rate of the client decreases.

[0101] In some embodiments, in order to calculate the decoding rate of the client, the average conversion time includes the average decoding time and the average rendering time. The average decoding time is the average time required for decoding each frame in the test data. The average rendering time is the average time required for rendering the decoded test data. The unit time is divided by the average conversion time to obtain the decoding rate of the test data, including:

[0102] If the test data is in parallel mode, the maximum processing time is determined from the average decoding time and the average rendering time, and the parallel mode indicates that decoding and rendering are performed in parallel;

[0103] Divide the unit time by the longest processing time to get the decoding rate of the test data;

[0104] If the test data is in serial mode, the average decoding time and the average rendering time are added to obtain the average processing time. The serial mode indicates that decoding and rendering are performed sequentially;

[0105] Divide the unit time by the average processing time to get the decoding rate of the test data.

[0106] The parallel mode indicates that when the client converts the test data, decoding and rendering can be performed simultaneously in the same time period. For example, when the client converts the test data, two independent threads can be used to process it, one of which is responsible for decoding the test data and transferring the decoded data in the test data to the buffer, and the other thread is responsible for obtaining the decoded data from the buffer and performing rendering operations. The two threads can be executed simultaneously.

[0107] The average decoding time is equal to the total time to decode the test data divided by the number of frames of the test data.

[0108] The average rendering time is the total time to render the decoded test data divided by the number of frames of the test data.

[0109] The maximum processing time is the longest time between the average decoding time and the average rendering time when the test data is in parallel mode. For example, if the average decoding time is greater than the average rendering time, the maximum processing time is the average decoding time; if the average rendering time is greater than the average decoding time, the maximum processing time is the average rendering time; if the average rendering time is equal to the average decoding time, the maximum processing time is equal to the average rendering time or the average decoding time.

[0110] The serial mode indicates that when the client converts the test data, decoding and rendering need to be performed sequentially. For example, when the client converts the test data, it can use a thread to process it. The thread first decodes and then renders any frame in the test data, and repeats the above steps until all frames in the test data are decoded and rendered.

[0111] The average processing time is the sum of the average decoding time and the average rendering time when the test data is in serial mode.

[0112] In some embodiments, in order to obtain test data associated with a client, obtaining multiple associated test data includes:

[0113] Acquire recommended display parameters, where the recommended display parameters include a first display parameter and a second display parameter, where the first display parameter is the number of pixels in the horizontal direction of the client, and the second display parameter is the number of pixels in the vertical direction of the client;

[0114] Determining a screen display ratio of the client according to the first display parameter and the second display parameter;

[0115] Sending a data acquisition request to the server, the data acquisition request including recommended display parameters and the screen display ratio of the client;

[0116] Based on the data acquisition request, multiple test data associated with the client sent by the server are acquired, the screen display parameters of the test data are not greater than the recommended display parameters, and the screen display ratio of the test data is the same as the screen display ratio of the client.

[0117] The recommended display parameter is the maximum resolution supported by the client, and different models or types of clients may have different recommended display parameters. For example, the type of the client may be a computer, a mobile phone, a television, etc. Different models of clients of the same type may have different recommended display parameters.

[0118] The first display parameter is the number of pixels of the recommended display parameter in the horizontal direction.

[0119] The second display parameter is the number of pixels of the recommended display parameter in the vertical direction.

[0120] For example, if the recommended display parameter of the client is 3200×2000, the first display parameter is 3200, and the second display parameter is 2000. 3200 means that the client can display a maximum of 3200 pixels in the horizontal direction, and 2000 means that the client can display a maximum of 2000 pixels in the vertical direction.

[0121] The screen display ratio is the ratio of the number of pixels in the horizontal direction to the number of pixels in the vertical direction of the client.

[0122] For example, if the recommended display parameters are 3200×2000, the screen display ratio = 3200:2000 = 16:10.

[0123] The data acquisition request is used to request the server to send test data to the client. The request carries the recommended display parameters and the client's screen display ratio.

[0124] For example, when the client updates the system version, installs an application, cleans up the recycle bin, etc., it can send a data acquisition request to update the decoding rate corresponding to the client's screen display parameters.

[0125] In some embodiments, considering that the decoding performance of the client is affected by multiple decoding factors, that is, the decoding performance of the client changes dynamically, resulting in that the decoding rates of multiple test data may not gradually decrease as the picture display parameters gradually increase, in order to associate the decoding rate of the test data with the picture display parameters so that the decoding rate of the test data can gradually decrease according to the gradual increase of the picture display parameters, after the unit time is divided by the average conversion time to obtain the decoding rate of the test data, the method further includes:

[0126] Based on the screen display parameters of the multiple test data, the multiple test data are sorted to obtain a sorted test data sequence, where the test data sequence includes first test data and second test data, the first test data is adjacent to the second test data, and the screen display parameter of the first test data is less than the screen display parameter of the second test data;

[0127] If the decoding rate of the second test data is greater than the decoding rate of the first test data, the decoding rate of the second test data is updated.

[0128] The test data sequence is a sequence obtained by arranging multiple test data according to the screen display parameters of the multiple test data. For example, the test data sequence can be a sequence obtained by arranging multiple test data from large to small or from small to large according to the screen display parameters of the multiple test data.

[0129] The first test data may be any test data in the test data sequence except the test data having the maximum picture display parameter.

[0130] For example, if the test data sequence is arranged from large to small, the first test data is any test data except the first test data. If the test data sequence is arranged from small to large, the first test data is any test data except the last test data.

[0131] The second test data is test data adjacent to the first test data in the test data sequence, and its screen display parameter is greater than the screen display parameter of the first test data.

[0132] For example, when the test data sequence is arranged from large to small, if the first test data is the last test data, then the second test data is the second to last test data, etc. When the test data sequence is arranged from small to large, if the first test data is the first test data, then the second test data is the second test data.

[0133] For example, if the decoding rate of the second test data is greater than the decoding rate of the first test data, when updating the decoding rate of the second test data, the decoding rate of the second test data can be made equal to the decoding rate of the first test data, or the decoding rate of the second test data can be made = the decoding rate of the first test data - a preset value, and so on.

[0134] 130. Determine a target decoding rate from the decoding rate according to the frame rate information.

[0135] The target decoding rate is a decoding rate that matches the frame rate information among the decoding rates corresponding to the multiple picture display parameters.

[0136] For example, when the same picture display parameter can correspond to multiple decoding rates, if the frame rate information is between the multiple decoding rates corresponding to the picture display parameter, a decoding rate close to the frame rate information can be determined as the target decoding rate from the multiple decoding rates corresponding to the picture display parameter. If the frame rate information is the same as a decoding rate corresponding to the picture display parameter, then the decoding rate can be used as the target decoding rate, and so on.

[0137] For example, when the same screen display parameter can correspond to a decoding rate, the decoding rate that is the same as the frame rate information can be used as the target decoding rate, or the decoding rate that is closest to the frame rate information can be used as the target decoding rate, and so on.

[0138] In some embodiments, considering that the server can continuously send multiple segments of video data to the client, if the client needs to calculate the target decoding rate matching each segment of video data, the number of interactions between the server and the client is increased, and it is not convenient to quickly obtain video data from the server. According to the frame rate information, the target decoding rate is determined from the decoding rate, including:

[0139] Acquire the previous playback data of the data to be played and the frame rate information of the previous playback data, wherein the playback sequence number of the previous playback data is located before the playback sequence number of the data to be played;

[0140] If the variation between the frame rate information of the to-be-played data and the frame rate information of the previously-played data satisfies a preset condition, a target decoding rate is determined from the number of decoded frames according to the frame rate information.

[0141] The play sequence number of the data to be played is the sequence number of the data to be played in the client.

[0142] The play sequence number of the previous play data is one digit before the play sequence number of the data to be played, and the previous play data is located in the client.

[0143] For example, when the current playback data may be data currently being played by the client, the to-be-played data is data that needs to be played after the previous playback data is played. If the current playback data may also be data waiting to be played in the client cache, the to-be-played data is data waiting to be played after the previous playback data.

[0144] The frame rate information of the previous playback data reflects the number of frames of the previous playback data in a unit time.

[0145] The variation is the ratio between the number of frames of the data to be played in a unit time and the number of frames of the previous played data in a unit time.

[0146] The preset conditions are pre-set conditions used to measure the amount of change.

[0147] For example, if the detected change amount meets the preset condition, the target decoding rate can be determined from the decoded frame number according to the frame rate information. If the detected change amount does not meet the preset condition, the screen display parameters used in encoding the previous playback data are continued to be used to encode the data to be played.

[0148] 140. Send the screen display parameters corresponding to the target decoding rate to the server.

[0149] The screen display parameter corresponding to the target decoding rate is the optimal resolution that the client can support when decoding using the target decoding rate, so as to avoid decoding timeout or a short decoding time.

[0150] 150. Based on the transmission request, obtain the encoded data returned by the server, where the encoded data is data obtained by encoding the to-be-played data by the server according to the screen display parameters corresponding to the target decoding rate.

[0151] The encoded data is data obtained by encoding the to-be-played data by the server according to the screen display parameters corresponding to the target decoding rate.

[0152] For example, after sending the picture display parameters corresponding to the target decoding rate to the server, the encoded data can be obtained from the server through a transmission request.

[0153] In some embodiments, in order to decode and play the video data, after obtaining the encoded data returned by the server based on the transmission request, the following is further included:

[0154] According to the picture display parameters corresponding to the target decoding rate, the encoded data is decoded to obtain the data to be played;

[0155] The data to be played is displayed according to the screen display parameters corresponding to the target decoding rate.

[0156] For example, if the data to be played is a recorded video, the encoded data can be decoded according to the picture display parameters corresponding to the target decoding rate, which can fully utilize the client's decoding performance so that the client can use the optimal picture display parameters (display parameters corresponding to the target decoding rate) to display the data to be played.

[0157] For example, if the data to be played is a live video or a cloud game video stream, after the client receives the encoded data, it can stably decode the encoded data according to the screen display parameters corresponding to the target decoding rate and the target decoding rate, so that the data to be played can be displayed smoothly on the client according to the screen display parameters corresponding to the target decoding rate.

[0158] As can be seen from the above, the embodiments of the present application can send a transmission request for the data to be played to the server, and obtain the frame rate information of the data to be played returned by the server; obtain multiple associated screen display parameters, and the decoding rate corresponding to each screen display parameter, the decoding rate refers to the number of frames decoded per unit time under the screen display parameters; determine the target decoding rate from the decoding rate according to the frame rate information; send the screen display parameters corresponding to the target decoding rate to the server; based on the transmission request, obtain the encoded data returned by the server, the encoded data is the data obtained by the server encoding the data to be played according to the screen display parameters corresponding to the target decoding rate.

[0159] Therefore, since the screen display parameters associated with the client of this solution can correspond to its decoding rate, and the decoding rate can reflect the decoding performance of the client, the screen display parameters of the client can correspond to the decoding performance of the client. The client can determine the target decoding rate that matches the frame rate information from the decoding rate, so that the server can encode the data to be played according to the screen display parameters corresponding to the target decoding rate, so that the encoded data can match the decoding performance of the client. After obtaining the encoded data returned by the server, the encoded data can be smoothly decoded according to the target decoding rate. As a result, the stability of the decoding process is improved.

[0160] The present application also provides a data transmission method. Figure 2 As shown, the specific process of the data transmission method can be as follows:

[0161] 210. Obtain a transmission request for the to-be-played data sent by the client.

[0162] 220. Send frame rate information of the to-be-played data to the client according to the transmission request.

[0163] 230. Based on the frame rate information, obtain the target display parameter sent by the client, where the target display parameter refers to the screen display parameter of the client under the frame rate information.

[0164] The target display parameter is the optimal resolution that the client can use under the frame rate information.

[0165] In some embodiments, in order to facilitate encoding of the data to be played, based on the frame rate information, the target display parameters sent by the client are obtained, including:

[0166] Sending multiple associated test data to the client, the multiple test data having different picture display parameters, so that the client can obtain a decoding rate corresponding to the picture display parameters according to the test data;

[0167] Based on the decoding rate corresponding to the picture display parameter, the target display parameter sent by the client and matching the frame rate information is obtained.

[0168] In some embodiments, in order to enable the client to establish a correspondence between the picture display parameter and the decoding rate, after sending the associated multiple test data to the client, the method further includes:

[0169] Obtaining a data acquisition request, the data acquisition request includes a recommended display parameter, the recommended display parameter includes a first display parameter and a second display parameter, the first display parameter is the number of pixels in the horizontal direction of the client, and the second display parameter is the number of pixels in the vertical direction of the client;

[0170] Determining a screen display ratio of the client according to the first display parameter and the second display parameter;

[0171] Based on the data acquisition request, multiple associated test data are sent to the client, the screen display parameters of the test data are not greater than the recommended display parameters, and the screen display ratio of the test data is the same as the screen display ratio of the client.

[0172] 240. Encode the data to be played according to the target display parameters to obtain encoded data.

[0173] 250. Send the encoded data to the client.

[0174] From the above, it can be seen that the embodiment of the present application can obtain a transmission request for data to be played sent by a client; according to the transmission request, send the frame rate information of the data to be played to the client; based on the frame rate information, obtain the target display parameters sent by the client, the target display parameters refer to the screen display parameters of the client under the frame rate information; according to the target display parameters, encode the data to be played to obtain encoded data; and send the encoded data to the client.

[0175] In this application, multiple clients can access the server and obtain the data to be played from the server. In order to match the decoding performance of each client, the target display parameters sent by each client can be obtained based on the frame rate information of the data to be played, so that the encoded data matching the decoding performance can be sent to different clients, so that the client can encode the data smoothly. Thus, the stability of the decoding process is improved.

[0176] The method described in the above embodiment will be further described in detail below.

[0177] In this embodiment, a data transmission system is taken as an example to describe the method of the embodiment of the present application in detail.

[0178] A specific process of a data transmission system is as follows:

[0179] 310. When the client starts the application, the client first enters the decoding and rendering capability detection module, tests the test data with different screen display parameters, and records the average decoding time and average rendering time of each test data during conversion. However, the client generates the decoding rate of the test data and the screen display parameters corresponding to the decoding rate based on the average decoding time and average rendering time of the test data.

[0180] After the client enters the decoding and rendering capability detection module, Figure 3a As shown, perform the following steps:

[0181] (1) detecting recommended display parameters, where the recommended display parameters include a first display parameter and a second display parameter, where the first display parameter is the number of pixels in the horizontal direction of the client, and the second display parameter is the number of pixels in the vertical direction of the client;

[0182] For example, the computer can obtain the recommended display parameters by calling interfaces such as CGDisplayBounds(), CGDisplayScreenSize(), GetSystemMetrics(), etc. If the recommended display parameters cannot be detected or the reading fails, the first display parameter and the second display parameter are both set to 0.

[0183] (2) Determine whether the first display parameter and the second display parameter are both greater than 0. If the conditions are met, proceed to step (3); otherwise, terminate the module.

[0184] (3) Calculate the screen display ratio = first display parameter / second display parameter;

[0185] (4) Sending a data acquisition request to the server according to the screen display ratio, where the data acquisition request includes the recommended display parameters and the screen display ratio of the client;

[0186] (5) Multiple test data will be stored in advance in the server. Multiple tests have different screen display ratios, and multiple test data with the same screen display ratio have different screen display parameters (only one test data is stored for each screen display parameter). After the server receives the screen display ratio sent by the client, it will send all the test data with the screen display ratio of the client and screen display parameters less than the recommended display parameters to the client. The number of test data associated with the client is recorded as n;

[0187] For example, the server stores in advance a lot of test data of 16:9 bitstreams (3840x2160, 2560x1440, 1920x1080, 1280x720, 960x540, 640x360 bitstreams), 16:10 bitstreams (3840x2400, 2560x1600, 1920x1200, 1280x800, 960x600, 640x400 bitstreams) and other test data of different screen display parameters corresponding to other screen display ratios. If the recommended display parameter of the client is 1920x1080, the server will send the test data with a screen display ratio of 16:9 and a screen display parameter not greater than 1920x1080 to the client, including test data of 1920x1080, 1280x720, 960x540, and 640x360. In this case, the test data n=4. Thereafter, step (6) is entered.

[0188] (6) Sort the multiple test data associated with the client from small to large according to the screen display parameter, and record the test data with the sorting number as test data 1, test data 2, ..., test data n, and record the number of pixels of the test data in the horizontal direction as w1, w2, ..., wn, and the number of pixels of the test data in the vertical direction as h1, h2, ..., hn;

[0189] For example, as shown in the example in step (5), after sorting, test data 1 to test data 4 are test data with screen display parameters of 640x360, 960x540, 1280x720, and 1920x1080, respectively, and the corresponding w1 to w4 are equal to 640, 960, 1280, and 1920, respectively, and the corresponding h1 to h4 are equal to 360, 540, 720, and 1080, respectively.

[0190] (7) Set variable i = 1. Go to step (8);

[0191] (8) Determine whether the variable i is not greater than the test data n. If the condition is met, go to step (9), otherwise end the module;

[0192] (9), decode the rendering test data i, and proceed to step (10);

[0193] (10), record the average decoding time (decode time_i) and the average rendering time (render time_i), and proceed to step (11).

[0194] (11) The variable i is incremented, that is, i=i+1, and the process goes to step (8).

[0195] Among them, the design of the decoding and rendering capability detection module fully considers the client's screen display ratio, which can reduce the distortion that may be caused by non-proportional scaling of screen display parameters and further improve the image quality.

[0196] After the decoding and rendering capability detection module is finished, the client can obtain n pieces of associated test data, and calculate the average decoding time and average rendering time of each piece of test data on the client. Then, the client calculates the highest decoding rate that can be supported corresponding to different screen display parameters, such as Figure 3b As shown, the specific steps are as follows:

[0197] (I), input the first display parameter, the second display parameter and the number of test data n obtained by the decoding and rendering capability detection module, and enter step (II);

[0198] (II), determine whether the first display parameter is equal to 0 or the second display parameter is equal to 0 or n is equal to 0, if the condition is met, enter step (III), otherwise enter step (X), enter step (III);

[0199] (III), input the test data output by the decoding and rendering capability detection module, that is, the average decoding time set {decode time_1, ..., decode time_n} and the average rendering time set {render time_1, ..., render time_n} corresponding to the screen display parameters of each test data of all tests, and enter step (IV);

[0200] (IV), let variable i = 1, and go to step (V);

[0201] (V) Determine whether the variable i is not greater than the test quantity n. If the condition is met, proceed to step (VI), otherwise end the process;

[0202] (VI), select to enter step (VII) or step (VIII) according to the current decoding and rendering mode. If it is a parallel mode (decoding and rendering are two independent threads), enter step (VII); otherwise (decoding and rendering are the same thread, decoding first and then rendering), enter step (VIII);

[0203] (VII), calculate the maximum decoding rate fps_i supported by the client under the screen display parameters = 1000 / max(decode_time_i,render_time_i), and proceed to step (IX);

[0204] (VIII) Calculate the highest decoding rate supported by the client under the screen display parameters fps_i = 1000 / (decode_time_i + render_time_i), and proceed to step (IX);

[0205] (IX) Determine whether the variable i is greater than 1. If the condition is met, proceed to step (X); otherwise, proceed to step (XI);

[0206] (X), fps_i = min(fps_i (decoding rate of the second test data), fps_(i-1) (decoding rate of the first test data)), proceed to step (XI);

[0207] For example, the premise of step (X) is that according to engineering experience, the decoding and rendering time of the small screen display parameters will normally be lower than the test data of the large screen display parameters, that is, the maximum decoding rate supported by the small screen display parameters should not be less than the large screen display parameters. In step (V) of the decoding and rendering capability detection module, the test data has been sorted from small to large according to the screen display parameters, so the larger the n of fps_n, the larger the corresponding screen display parameter, which should be lower than fps_i~fps_(n-1). Therefore, fps_1, fps_2,..., fps_n should be a monotonically decreasing trend.

[0208] (Ⅺ), the variable i is incremented, that is, i=i+1, and the process goes to step (V);

[0209] (XII) Output the default configuration table (correspondence between decoding rate and screen display parameters), and end the process. The setting method of the default configuration table is not limited here, and can be set according to the nature of the business and prior knowledge, for example, the following table 1 can be output.

[0210] Decoding rate Screen display parameters (0,30] 2560x1440 (30,60] 1920x1080 (60,+∞) 1280x720

[0211] Table 1

[0212] If the above process can enter the calculation of fps_i, that is, the default configuration table is not output, then Table 2 (a comparison table of picture display parameters corresponding to different decoding rates) is output.

[0213]

[0214]

[0215] Table 2

[0216] For example, let's continue to use the example in step (5) of the decoding and rendering capability detection module to explain Table 2. In this example, n is equal to 4, test data_1 to test data_4 are test data with resolutions of 640x360, 960x540, 1280x720, and 1920x1080, respectively, and the corresponding w_1 to w_4 are equal to 640, 960, 1280, and 1920, respectively, and the corresponding h_1 to h_4 are equal to 360, 540, 720, and 1080, respectively. Figure 2 The fps_1 to fps_4 calculated by the method shown are 130fps, 100fps, 70fps, and 40fps respectively, and the generated comparison table is Table 3.

[0217] Decoding rate (fps) Screen display parameters (0,40] 1920x1080 (40,70] 1280x720 (70,100] 960x540 (100,130] 640x360 (130,+∞) Minimum screen display parameters (such as 400x300)

[0218] Table 3

[0219] 320. After the client starts the video communication, the server transmits the frame rate information of the data to be transmitted to the client in real time.

[0220] 330. After detecting the frame rate change, the client enters the resolution selection module, searches for the frame rate information corresponding to the target decoding rate in the picture display parameters corresponding to the decoding rate, and feeds back the picture display parameters corresponding to the target decoding rate to the encoder adjustment module of the server to modify the picture display parameters of the data to be played.

[0221] For example, in the above example, 60fps (frame rate information) matches (40,70] (target decoding rate) in Table 3, and 1280x720 (screen display parameter corresponding to the target decoding rate) is fed back to the resolution adjustment module of the server. Finally, the server adjusts the resolution of data acquisition and video encoding to 1280x720, and then transmits the encoded data to the client in real time, and the adjustment of the data to be played is completed through the server collaboration.

[0222] The present invention adjusts the picture display parameters of the data to be played through the collaborative cooperation between the client and the server, and can obtain the corresponding picture display parameters under the frame rate information of the data to be played in real time, so as to provide the user with the best picture quality experience.

[0223] This application can be applied to real-time audio and video interactive products, such as cloud games, interactive live broadcasts, video conferencing, video calls, etc.

[0224] From the above, we can see that the decoding and rendering capabilities of the client model can be fully exploited so that the client can set the corresponding screen display parameters under the current frame rate information to provide users with the best picture quality experience.

[0225] In order to better implement the above method, the embodiment of the present application also provides a data transmission device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0226] For example, in this embodiment, the method of the embodiment of the present application will be described in detail by taking the data transmission device specifically integrated in the client as an example.

[0227] For example, Figure 4 As shown, the data transmission device may include a frame rate acquisition unit 410, a relationship acquisition unit 420, a frame rate determination unit 430, a parameter sending unit 440, and a data acquisition unit 450, as follows:

[0228] (i) Frame rate acquisition unit 410.

[0229] The frame rate acquisition unit 410 is used to send a transmission request of the to-be-played data to the server, and acquire the frame rate information of the to-be-played data returned by the server.

[0230] (ii) Relationship acquisition unit 420.

[0231] The relationship acquisition unit 420 is used to acquire multiple associated picture display parameters and a decoding rate corresponding to each picture display parameter, where the decoding rate refers to the number of frames decoded per unit time under the picture display parameter.

[0232] In some embodiments, before acquiring the associated multiple picture display parameters and the decoding rate corresponding to each picture display parameter, the method further includes:

[0233] Acquire multiple associated test data, where the multiple test data have different screen display parameters;

[0234] The test data is converted to obtain an average conversion time, where the average conversion time is the average time required to convert each frame in the test data;

[0235] Divide the unit time by the average conversion time to obtain the decoding rate of the test data;

[0236] Based on the test data, a decoding rate corresponding to the picture display parameters is determined.

[0237] In some embodiments, the average conversion time includes an average decoding time and an average rendering time. The average decoding time is the average time required for decoding each frame in the test data. The average rendering time is the average time required for rendering the decoded test data. The unit time is divided by the average conversion time to obtain the decoding rate of the test data, including:

[0238] If the test data is in parallel mode, the maximum processing time is determined from the average decoding time and the average rendering time, and the parallel mode indicates that decoding and rendering are performed in parallel;

[0239] Divide the unit time by the longest processing time to get the decoding rate of the test data;

[0240] If the test data is in serial mode, the average decoding time and the average rendering time are added to obtain the average processing time. The serial mode indicates that decoding and rendering are performed sequentially;

[0241] Divide the unit time by the average processing time to get the decoding rate of the test data.

[0242] In some embodiments, obtaining the associated plurality of test data includes:

[0243] Acquire recommended display parameters, where the recommended display parameters include a first display parameter and a second display parameter, where the first display parameter is the number of pixels in the horizontal direction of the client, and the second display parameter is the number of pixels in the vertical direction of the client;

[0244] Determining a screen display ratio of the client according to the first display parameter and the second display parameter;

[0245] Sending a data acquisition request to the server, the data acquisition request including recommended display parameters and the screen display ratio of the client;

[0246] Based on the data acquisition request, multiple test data associated with the client sent by the server are acquired, the screen display parameters of the test data are not greater than the recommended display parameters, and the screen display ratio of the test data is the same as the screen display ratio of the client.

[0247] In some embodiments, after dividing the unit time by the average conversion time to obtain the decoding rate of the test data, the method further includes:

[0248] Based on the screen display parameters of the multiple test data, the multiple test data are sorted to obtain a sorted test data sequence, where the test data sequence includes first test data and second test data, the first test data is adjacent to the second test data, and the screen display parameter of the first test data is less than the screen display parameter of the second test data;

[0249] If the decoding rate of the second test data is greater than the decoding rate of the first test data, the decoding rate of the second test data is updated.

[0250] (iii) Frame rate determination unit 430.

[0251] The frame rate determining unit 430 is configured to determine a target decoding rate from the decoding rate according to the frame rate information.

[0252] In some embodiments, determining a target decoding rate from a decoding rate according to the frame rate information includes:

[0253] Acquire the previous playback data of the data to be played and the frame rate information of the previous playback data, wherein the playback sequence number of the previous playback data is located before the playback sequence number of the data to be played;

[0254] If the variation between the frame rate information of the to-be-played data and the frame rate information of the previously-played data satisfies a preset condition, a target decoding rate is determined from the number of decoded frames according to the frame rate information.

[0255] (iv) Parameter sending unit 440.

[0256] The parameter sending unit 440 is used to send the screen display parameters corresponding to the target decoding rate to the server.

[0257] (V) Data acquisition unit 450.

[0258] The data acquisition unit 450 is used to acquire the encoded data returned by the server based on the transmission request, where the encoded data is data obtained by encoding the to-be-played data by the server according to the screen display parameters corresponding to the target decoding rate.

[0259] In some embodiments, after obtaining the encoded data returned by the server based on the transmission request, the method further includes:

[0260] According to the picture display parameters corresponding to the target decoding rate, the encoded data is decoded to obtain the data to be played;

[0261] The data to be played is displayed according to the screen display parameters corresponding to the target decoding rate.

[0262] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0263] As can be seen from the above, the data transmission device of this embodiment is configured such that a frame rate acquisition unit sends a transmission request for the data to be played to the server, and obtains the frame rate information of the data to be played returned by the server; a relationship acquisition unit obtains multiple associated screen display parameters, and a decoding rate corresponding to each screen display parameter, where the decoding rate refers to the number of frames decoded per unit time under the screen display parameters; a frame rate determination unit determines a target decoding rate from the decoding rate based on the frame rate information; a parameter sending unit sends the screen display parameters corresponding to the target decoding rate to the server; and a data acquisition unit is configured to obtain the encoded data returned by the server based on the transmission request, where the encoded data is the data obtained by the server encoding the data to be played according to the screen display parameters corresponding to the target decoding rate.

[0264] Therefore, the embodiments of the present application can improve the stability of the decoding process.

[0265] For example, in this embodiment, the method of the embodiment of the present application will be described in detail by taking the data transmission device specifically integrated in the server as an example.

[0266] For example, Figure 5 As shown, the data transmission device may include a request acquisition unit 510, a frame rate sending unit 520, a parameter acquisition unit 530, a data encoding unit 540 and a data sending unit 550, as follows:

[0267] (i) Request acquisition unit 510.

[0268] The request acquisition unit 510 is used to acquire a transmission request for the to-be-played data sent by the client.

[0269] (ii) Frame rate sending unit 520.

[0270] The frame rate sending unit 520 is used to send frame rate information of the to-be-played data to the client according to the transmission request.

[0271] (iii) Parameter acquisition unit 530.

[0272] The parameter acquisition unit 530 is used to acquire the target display parameters sent by the client based on the frame rate information, where the target display parameters refer to the screen display parameters of the client under the frame rate information.

[0273] (iv) Data encoding unit 540.

[0274] The data encoding unit 540 is used to encode the data to be played according to the target display parameters to obtain encoded data.

[0275] (V) Data sending unit 550.

[0276] The data sending unit 550 is used to send the encoded data to the client.

[0277] As can be seen from the above, the data transmission device of this embodiment is composed of a request acquisition unit that acquires a transmission request for the data to be played sent by the client; a frame rate sending unit that sends the frame rate information of the data to be played to the client according to the transmission request; a parameter acquisition unit that acquires the target display parameters sent by the client based on the frame rate information, and the target display parameters refer to the screen display parameters of the client under the frame rate information; a data encoding unit is used to encode the data to be played according to the target display parameters to obtain encoded data; and a data sending unit sends the encoded data to the client.

[0278] Therefore, the embodiments of the present application can improve the stability of the decoding process.

[0279] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.

[0280] In some embodiments, the data transmission device may also be integrated into multiple electronic devices. For example, the data transmission device may be integrated into multiple servers, and the data transmission method of the present application may be implemented by multiple servers.

[0281] In this embodiment, the electronic device of this embodiment is a client as an example for detailed description, for example, Figure 6 As shown, it shows a schematic diagram of the structure of the client involved in the embodiment of the present application, specifically:

[0282] The client may include one or more processing core processors 610, one or more computer-readable storage media memories 620, a power supply 630, an input module 640, and a communication module 650. Those skilled in the art will appreciate that Figure 6 The client structure shown in the figure does not constitute a limitation on the client, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0283] The processor 610 is the control center of the client, and uses various interfaces and lines to connect various parts of the entire client. It executes various functions of the client and processes data by running or executing software programs and / or modules stored in the memory 620, and calling data stored in the memory 620. In some embodiments, the processor 610 may include one or more processing cores; in some embodiments, the processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 610.

[0284] The memory 620 can be used to store software programs and modules. The processor 610 executes various functional applications and data processing by running the software programs and modules stored in the memory 620. The memory 620 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the client, etc. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 620 may also include a memory controller to provide the processor 610 with access to the memory 620.

[0285] The client also includes a power supply 630 for supplying power to various components. In some embodiments, the power supply 630 can be logically connected to the processor 610 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 630 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0286] The client may further include an input module 640, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0287] The client may also include a communication module 650. In some embodiments, the communication module 650 may include a wireless module. The client may perform short-range wireless transmission through the wireless module of the communication module 650, thereby providing the user with wireless broadband Internet access. For example, the communication module 650 may be used to help the user send and receive emails, browse web pages, and access streaming media.

[0288] Although not shown, the client may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 610 in the client will load the executable files corresponding to the processes of one or more applications into the memory 620 according to the following instructions, and the processor 610 will run the application stored in the memory 620 to achieve various functions, as follows:

[0289] Send a transmission request for the data to be played to the server, and obtain the frame rate information of the data to be played returned by the server;

[0290] Obtaining multiple associated screen display parameters and a decoding rate corresponding to each screen display parameter, where the decoding rate refers to the number of frames decoded per unit time under the screen display parameter;

[0291] Determine a target decoding rate from the decoding rate according to the frame rate information;

[0292] Sending the screen display parameters corresponding to the target decoding rate to the server;

[0293] Based on the transmission request, the encoded data returned by the server is obtained, where the encoded data is data obtained by encoding the to-be-played data according to the screen display parameters corresponding to the target decoding rate.

[0294] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0295] As can be seen from the above, since the screen display parameters associated with the client can correspond to its decoding rate, and the decoding rate can reflect the decoding performance of the client, the screen display parameters of the client can correspond to the decoding performance of the client. The client can determine the target decoding rate that matches the frame rate information from the decoding rate, so that the server can encode the data to be played according to the screen display parameters corresponding to the target decoding rate, so that the encoded data can match the decoding performance of the client. After obtaining the encoded data returned by the server, the encoded data can be smoothly decoded according to the target decoding rate. As a result, the stability of the decoding process is improved.

[0296] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0297] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the data transmission methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0298] Send a transmission request for the data to be played to the server, and obtain the frame rate information of the data to be played returned by the server;

[0299] Obtaining multiple associated screen display parameters and a decoding rate corresponding to each screen display parameter, where the decoding rate refers to the number of frames decoded per unit time under the screen display parameter;

[0300] Determine a target decoding rate from the decoding rate according to the frame rate information;

[0301] Sending the screen display parameters corresponding to the target decoding rate to the server;

[0302] Based on the transmission request, the encoded data returned by the server is obtained, where the encoded data is data obtained by encoding the to-be-played data according to the screen display parameters corresponding to the target decoding rate.

[0303] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0304] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including a computer program / instruction, the computer program / instruction being stored in a computer-readable storage medium. A processor of an electronic device reads the computer program / instruction from the computer-readable storage medium, and the processor executes the computer program / instruction, so that the electronic device executes the method provided in various optional implementations of the data transmission provided in the above embodiments.

[0305] Since the instructions stored in the storage medium can execute the steps in any one of the data transmission methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the data transmission methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0306] The above is a detailed introduction to a data transmission method and device provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data transmission method, characterized in that: include: Sending a transmission request for the data to be played to the server, and obtaining frame rate information of the data to be played returned by the server; Acquire multiple associated picture display parameters and a decoding rate corresponding to each of the picture display parameters, wherein the decoding rate refers to the number of frames decoded per unit time under the picture display parameters; Determining a target decoding rate from the decoding rates according to the frame rate information; Sending the screen display parameters corresponding to the target decoding rate to the server; Based on the transmission request, the encoded data returned by the server is obtained, where the encoded data is data obtained by the server encoding the data to be played according to the screen display parameters corresponding to the target decoding rate.

2. The data transmission method according to claim 1, characterized in that: The step of determining a target decoding rate from the decoding rate according to the frame rate information includes: Acquire the previous playback data of the data to be played and the frame rate information of the previous playback data, wherein the playback sequence number of the previous playback data is located before the playback sequence number of the data to be played; If the variation between the frame rate information of the to-be-played data and the frame rate information of the previously-played data satisfies a preset condition, a target decoding rate is determined from the decoded frame number according to the frame rate information.

3. The data transmission method according to claim 1, characterized in that: Before acquiring the associated multiple picture display parameters and the decoding rate corresponding to each of the picture display parameters, the method further includes: Acquire a plurality of associated test data, wherein the plurality of test data have different screen display parameters; Performing conversion processing on the test data to obtain an average conversion time, where the average conversion time is an average time required to convert each frame of the test data; Dividing the unit time by the average conversion time to obtain a decoding rate of the test data; Based on the test data, a decoding rate corresponding to the picture display parameter is determined.

4. The data transmission method according to claim 3, characterized in that: The average conversion time includes the average decoding time and the average rendering time. The average decoding time is the average time required for decoding each frame in the test data. The average rendering time is the average time required for rendering the decoded test data. The decoding rate of the test data is obtained by dividing the unit time by the average conversion time, including: If the test data is in a parallel mode, determining a maximum processing time from the average decoding time and the average rendering time, the parallel mode indicating that decoding and rendering are performed in parallel; Dividing the unit time by the longest processing time to obtain a decoding rate of the test data; If the test data is in a serial mode, the average decoding time and the average rendering time are added to obtain an average processing time, and the serial mode indicates that decoding and rendering are performed sequentially; The unit time is divided by the average processing time to obtain the decoding rate of the test data.

5. The data transmission method according to claim 3, characterized in that: The obtaining of the associated multiple test data includes: Acquire recommended display parameters, where the recommended display parameters include a first display parameter and a second display parameter, where the first display parameter is the number of pixels in the horizontal direction of the client, and the second display parameter is the number of pixels in the vertical direction of the client; Determining a screen display ratio of the client according to the first display parameter and the second display parameter; Sending a data acquisition request to the server, wherein the data acquisition request includes the recommended display parameter and the screen display ratio of the client; Based on the data acquisition request, multiple test data associated with the client sent by the server are acquired, the screen display parameters of the test data are not greater than the recommended display parameters, and the screen display ratio of the test data is the same as the screen display ratio of the client.

6. The data transmission method according to claim 3, characterized in that: After dividing the unit time by the average conversion time to obtain the decoding rate of the test data, the method further includes: Based on the screen display parameters of the multiple test data, the multiple test data are sorted to obtain a sorted test data sequence, the test data sequence includes first test data and second test data, the first test data is adjacent to the second test data, and the screen display parameter of the first test data is smaller than the screen display parameter of the second test data; If the decoding rate of the second test data is greater than the decoding rate of the first test data, the decoding rate of the second test data is updated.

7. The data transmission method according to claim 1, characterized in that: After obtaining the encoded data returned by the server based on the transmission request, the method further includes: Decoding the encoded data according to the picture display parameters corresponding to the target decoding rate to obtain the data to be played; The data to be played is displayed according to the screen display parameters corresponding to the target decoding rate.

8. A data transmission method, characterized in that: include: Obtaining a transmission request for the data to be played sent by the client; Sending frame rate information of the to-be-played data to the client according to the transmission request; Based on the frame rate information, acquiring a target display parameter sent by the client, the target display parameter referring to a screen display parameter of the client under the frame rate information; According to the target display parameters, the data to be played is encoded to obtain encoded data; The encoded data is sent to the client.

9. A data transmission device, characterized in that: include: A frame rate acquisition unit, used to send a transmission request for the to-be-played data to the server, and acquire frame rate information of the to-be-played data returned by the server; A relationship acquisition unit, used to acquire a plurality of associated picture display parameters and a decoding rate corresponding to each of the picture display parameters, wherein the decoding rate refers to the number of frames decoded per unit time under the picture display parameters; a frame rate determining unit, configured to determine a target decoding rate from the decoding rate according to the frame rate information; A parameter sending unit, used for sending the screen display parameters corresponding to the target decoding rate to the server; A data acquisition unit is used to acquire the encoded data returned by the server based on the transmission request, wherein the encoded data is data obtained by the server encoding the data to be played according to the screen display parameters corresponding to the target decoding rate.

10. A data transmission device, characterized in that: include: A request acquisition unit, used to acquire a transmission request for the to-be-played data sent by the client; A frame rate sending unit, configured to send frame rate information of the to-be-played data to the client according to the transmission request; A parameter acquisition unit, configured to acquire a target display parameter sent by the client based on the frame rate information, wherein the target display parameter refers to a screen display parameter of the client under the frame rate information; A data encoding unit, used for encoding the data to be played according to the target display parameters to obtain encoded data; A data sending unit is used to send the encoded data to the client.