Multimedia playback method, device, and computer equipment

By obtaining the playback status data of the multimedia data stream, determining the fluency and adaptively adjusting the bit rate, the problem of poor multimedia playback quality under a fixed bit rate is solved, achieving higher fluency and quality.

CN115550695BActive Publication Date: 2025-09-16TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110742237.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2025-09-16
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

Under complex and changing network conditions, the use of a fixed bit rate multimedia playback method results in poor playback quality of the multimedia data stream.

Method used

By obtaining the target playback status data of the multimedia data stream within the target statistical period and the reference playback status data within N reference statistical periods, the target playback smoothness of the multimedia data stream is determined, and the playback bit rate is decided based on the smoothness to achieve adaptive bit rate switching.

Benefits of technology

Improves the playback smoothness and quality of multimedia data streams, ensures that the bit rate adapts to the current network status, reduces lag, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550695B_ABST
    Figure CN115550695B_ABST
Patent Text Reader

Abstract

The present application proposes a multimedia playback method, apparatus, and computer equipment. The multimedia playback method includes: after obtaining target playback status data of a multimedia data stream within a target statistical period, obtaining N reference playback status data of the multimedia data stream within N reference statistical periods; using the target playback status data and the N reference playback status data to determine the target playback fluency of the multimedia data stream within the target statistical period; making a decision on the playback bit rate of the multimedia data stream based on the target playback fluency to obtain the playback bit rate after the decision; switching the current playback bit rate of the multimedia data to the playback bit rate after the decision, and playing the multimedia data stream based on the playback bit rate after the decision. Through the present application, the accuracy of the target playback fluency can be improved, thereby improving the playback fluency and playback quality of the multimedia data stream.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a multimedia playback method, a multimedia playback device, and computer equipment. Background Art

[0002] With the rapid development of internet technology, streaming media services have become a popular and sought-after trend in internet services. Streaming media services refer to services based on multimedia data streams, such as live video streaming, live voice streaming, and video playback services based on video data streams. Currently, computers typically use a fixed bitrate to play multimedia data streams, thereby providing these streaming services. However, in complex and volatile network conditions, using a fixed bitrate for multimedia playback can result in poor playback quality. Therefore, how to play multimedia data streams and improve their playback quality has become a research hotspot. Summary of the Invention

[0003] The embodiments of the present application provide a multimedia playback method, apparatus, computer device, and storage medium, which can improve the accuracy of target playback fluency, thereby improving the playback fluency and playback quality of multimedia data streams.

[0004] In one aspect, an embodiment of the present application provides a multimedia playback method, the method comprising:

[0005] After obtaining the target playback status data of the multimedia data stream within the target statistical period, obtaining N reference playback status data of the multimedia data stream within N reference statistical periods, where N is a positive integer; one reference statistical period corresponds to one reference playback status data, and the reference statistical period refers to a statistical period earlier than the target statistical period;

[0006] Determine the target playback smoothness of the multimedia data stream within a target statistical period using the target playback state data and N reference playback state data;

[0007] According to the target playback smoothness, the playback bit rate of the multimedia data stream is determined to obtain the determined playback bit rate;

[0008] The current playback bit rate of the multimedia data is switched to the decided playback bit rate, and the multimedia data stream is played based on the decided playback bit rate. The current playback bit rate refers to the latest playback bit rate used during the playback of the multimedia data stream.

[0009] In one aspect, an embodiment of the present application provides a multimedia playback device, comprising:

[0010] an acquiring unit, configured to acquire, after acquiring the target playback status data of the multimedia data stream within the target statistical period, N reference playback status data of the multimedia data stream within N reference statistical periods, where N is a positive integer; one reference statistical period corresponds to one reference playback status data, and the reference statistical period refers to a statistical period earlier than the target statistical period;

[0011] a processing unit, configured to determine a target playback smoothness of the multimedia data stream within a target statistical period using the target playback state data and N reference playback state data;

[0012] The processing unit is further configured to determine the playback bit rate of the multimedia data stream based on the target playback smoothness, and obtain the determined playback bit rate;

[0013] The switching unit is used to switch the current playback bit rate of the multimedia data to the decided playback bit rate, and play the multimedia data stream based on the decided playback bit rate. The current playback bit rate refers to: the latest playback bit rate used during the playback of the multimedia data stream.

[0014] On the one hand, an embodiment of the present application provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the above-mentioned multimedia playback method.

[0015] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is read and executed by a processor of a computer device, the computer device executes the above-mentioned multimedia playback method.

[0016] In one aspect, embodiments of the present application provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the multimedia playback method described above.

[0017] In an embodiment of the present application, after obtaining the target playback status data of the multimedia data stream in the target statistical period (i.e., the current statistical period), the target playback fluency of the multimedia data stream in the target statistical period can be determined by combining the target playback status data and N reference playback status data of the multimedia data stream in N reference statistical periods; in this way, not only the accuracy of the target playback fluency can be effectively improved, but also the target playback fluency can reflect the current playback state of the multimedia data stream to a certain extent. Thus, when the playback bit rate of the multimedia data stream is decided according to the target playback fluency, the accuracy of the playback bit rate after the decision is obtained is high and can be adapted to the current playback state to a certain extent. Then, the playback bit rate of the multimedia data stream can be switched from the current playback bit rate to the playback bit rate after the decision, and the multimedia data stream can be played based on the playback bit rate after the decision; it can be seen that the embodiment of the present application can realize adaptive bit rate switching of the multimedia data stream, and play multimedia data by playing multimedia data at a more accurate playback bit rate after the decision, which can effectively improve the playback fluency and playback quality of the multimedia data stream. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1a This is a schematic diagram of the principle of a multimedia playback solution provided in an embodiment of the present application;

[0020] Figure 1b This is a schematic diagram of the structure of a blockchain provided by an embodiment of the present application;

[0021] Figure 1c This is a schematic diagram of the structure of another blockchain provided in an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of a multimedia playback scenario provided by an embodiment of the present application;

[0023] Figure 3 This is a flowchart of a multimedia playback method provided by an embodiment of the present application;

[0024] Figure 4 This is a flow chart of determining target playback fluency provided by an embodiment of the present application;

[0025] Figure 5 This is a structural diagram of a multimedia playback device provided in an embodiment of the present application;

[0026] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0028] The embodiment of the present application proposes a multimedia playback solution that can flexibly play multimedia data streams, thereby improving the playback quality and playback fluency of multimedia data streams. Figure 1a As shown, the general principle of this multimedia playback solution is as follows: During the playback of a multimedia data stream, the playback status data of the multimedia data stream can be obtained once every time interval T0 (i.e., a statistical period) based on the playback start time of the multimedia data stream. After obtaining the playback status data of the multimedia data stream in the current statistical period, the playback status data of one or more statistical periods before the current statistical period can also be obtained. The current statistical period, which can also be called the target statistical period, refers to the statistical period that is earlier than the current system time and closest to the current system time. For example, if the playback start time of the multimedia data stream is 9:30, and the playback status data is reported every 10 minutes, then the statistical periods include: 9:30-9:40, 9:40-9:50, 9:50-10:00, etc.; if the current system time is 10:01, then the current statistical period is 9:50-10:00. After obtaining each playback status data, the obtained playback status data can be verified for validity, and the playback smoothness of the multimedia data stream within the current statistical period can be determined using the playback status data that has passed the validity verification; and based on the determined playback smoothness, the playback bit rate of the multimedia data stream is adaptively switched, so that the multimedia data stream continues to be played based on the switched playback bit rate.

[0029] It can be seen that the multimedia playback scheme mentioned in the embodiment of the present application can have the following beneficial effects: based on the various playback status data counted in the process of playing the multimedia data stream, the playback smoothness of the multimedia data stream within the current statistical period is determined in real time, and the determined playback smoothness can be matched with the network status in real time, thereby completing seamless bit rate switching, and ultimately achieving the maximum playback quality of the multimedia data stream under the minimum lag constraint, thereby improving the playback smoothness and playback quality of the multimedia data stream.

[0030] In an optional implementation, the multimedia playback solution of the present application can be combined with blockchain technology; for example, the playback status data reported by the multimedia playback device in each statistical period, the playback fluency and playback bit rate determined by the computer device, and other data can be uploaded to the blockchain for storage, thereby ensuring that these data on the blockchain are not easily tampered with. Among them, blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. See Figure 1b As shown in Figure 1, the blockchain can be composed of multiple blocks; the first block can be called the genesis block. The genesis block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp, and difficulty value, while the block body stores the input information. The next block of the genesis block uses the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores the input information feature value of the current block, the block header feature value, version number, timestamp, and difficulty value of the parent block, and so on. Therefore, the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0031] Based on this, the following takes the storage of playback status data in the blockchain as an example to explain the specific implementation method of how to store data in the blockchain: First, the playback status data can be added to the block body of the target block, and the style file in the block body is hashed to obtain the Merkle hash value. Secondly, a random algorithm can be used to generate a random number, and the calculated Merkle hash value, random number, version number, previous block hash value, current timestamp and current difficulty value are used to form the block header of the target block, such as Figure 1c As shown. The version number refers to the version information of the relevant block protocol in the blockchain; the previous block hash value refers to the characteristic value of the block header of the previous block; the current timestamp refers to the system time when the block header is composed; and the current difficulty value refers to the calculated difficulty value, which is a fixed value within a fixed time period and is re-determined after the fixed time period has expired. Then, a characteristic value algorithm (such as the SHA256 algorithm) can be used to perform one or more hash operations on the content contained in the block header to obtain the characteristic value of the block header of the target block; the number of hash operations here can be determined based on the computational difficulty; the greater the computational difficulty, the greater the number of hash operations. After obtaining the target block based on the above steps, the target block can be broadcast to each consensus node in the blockchain network for consensus processing; after consensus processing, the target block is added to the blockchain.

[0032] Regarding the description of the multimedia playback solution mentioned above, the following points need to be explained:

[0033] ①The above mentioned Figure 1a This is merely an example of the general principles of the multimedia playback solution proposed in the embodiments of the present application and is not intended to limit the scope of the present invention. For example, in other embodiments, after obtaining various playback status data, the computer device may also directly determine the playback smoothness of the multimedia data stream within the current statistical period based on the obtained playback status data, without performing a validity check on the playback status data, etc.

[0034] ② The multimedia playback solution mentioned above can be executed by a computer device, which can be a terminal device or a server. Among them, the terminal device can be a mobile phone, tablet computer, laptop computer, PDA, mobile internet device (MID), vehicle, vehicle-mounted equipment, roadside equipment, aircraft, wearable device, smart TV, etc., such as smart watch, smart bracelet, pedometer, etc., and other devices with multimedia playback functions, etc.; 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 cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as basic cloud computing services such as big data and artificial intelligence platforms, etc.

[0035] Furthermore, the computer device and the multimedia playback device used to play the multimedia data stream can be the same device or different devices. When the computer device and the multimedia playback device are different devices, the multimedia playback device can report playback status data once every period T0 (i.e., a statistical period) to report the playback status data for each statistical period to the computer device for processing. The so-called multimedia playback device refers to any device with multimedia playback capabilities, such as a smartphone, tablet computer, desktop computer, smartwatch, etc. Furthermore, the multimedia playback device can also install and run a variety of multimedia playback clients, such as a video playback client, a live video client, a live voice client, etc.

[0036] ③ When the computer device and the multimedia playback device are different devices, although the above description is based on the example of the computer device executing the multimedia playback scheme; in other embodiments, the multimedia data scheme can also be executed by the multimedia playback device and the computer device together. For example, after the multimedia playback device collects the playback status data of the current statistical period, it can also not report the playback status data of the current statistical period to the computer device first, but the multimedia playback device can obtain the playback status data of one or more statistical periods before the current statistical period, and can perform validity verification on each of the obtained playback status data, and then report the playback status data that passes the validity verification to the computer device, so that the computer device can directly use the playback status data that passes the validity verification to perform subsequent processing. For another example, after obtaining the playback status data of the current statistical period, the multimedia playback device can also perform operations such as validity verification and playback fluency determination, and report the determined playback fluency to the computer device, and the computer device can directly perform steps such as adaptive bit rate switching of the playback bit rate of the multimedia data stream based on the determined playback fluency.

[0037] ④ When the computer device and the multimedia playback device are different devices, the computer device and the multimedia playback device can be directly or indirectly connected through wired or wireless communication, and this application does not impose any restrictions on this. Optionally, the computer device and the multimedia playback device can be located within the blockchain network or outside the blockchain network, and this is not limited. When any of the computer device and the multimedia playback device is located within the blockchain network, the device can upload all internally stored data to the blockchain network for storage; and the device can also record the operation process it performs on the blockchain. For example, the computer device can record the operation process corresponding to each operation such as the operation of determining the playback fluency and the switching operation of the adaptive bit rate switching on the blockchain. This can not only ensure the fairness and justice of the process, but also make the process traceable, thereby improving the security of the process.

[0038] ⑤The multimedia playback solution mentioned above can be applied to any streaming media service, such as live video service, live voice service, video playback service based on video data stream, etc. The following takes the live video service as an example, where the multimedia data stream is the video data stream. Figure 2 As shown in the figure: when the multimedia playback solution is applied to the live video service, the multimedia playback device mentioned above can be the terminal device 220 used by the audience user, and the computer device can be the server 230 for implementing the live video service. Specifically, in the live video service, the application process of the multimedia playback solution is as follows:

[0039] In a specific implementation, the terminal device 210 used by the anchor user can collect live images in real time, generate a video data stream, and send the video data stream to the terminal device 220 used by the audience user through the server 230. Accordingly, the terminal device 220 can play the video data stream to display the corresponding live images to the audience user in the user interface. During the process of the terminal device 220 playing the video data stream, the playback status data of the video data stream can be reported to the server 230 every time period T0; accordingly, each time the server 230 receives a piece of playback status data, it can obtain the playback status data received in the past, and combine the currently received playback status data with the historically received playback status data to jointly determine the playback smoothness of the video data stream in the current statistical period. Next, the server 230 can send the determined playback smoothness to the terminal device 220 used by the viewer user, so that the terminal device 220 can make a real-time evaluation decision on the playback bit rate of the video data stream based on the determined playback smoothness to obtain the decided playback bit rate; and can switch the current playback bit rate of the multimedia data to the decided playback bit rate, thereby playing the video data stream based on the decided playback bit rate.

[0040] Of course, the specific steps for determining the target playback smoothness do not necessarily need to be performed by the server, but may also be performed directly by the terminal device 220 used by the viewer user. Alternatively, after determining the playback smoothness, the server 230 further determines a playback bitrate based on the determined playback smoothness, and sends the determined playback bitrate to the viewer terminal 220, causing the terminal device 220 to switch the current playback bitrate of the multimedia data to the determined playback bitrate, thereby playing the video data stream based on the determined playback bitrate.

[0041] Since the determined playback smoothness can effectively and accurately evaluate the current live broadcast status, the terminal device 220 uses the playback bit rate determined according to the determined playback smoothness to play the video data stream, which can effectively reduce the jamming of the live video while ensuring the quality of the live video as much as possible when the audience is watching the real-time live broadcast. Figure 2 As shown, if the current network status of the terminal device 220 is unstable or the network quality is poor, video freezes will occur in the playback interface S10 displayed when the terminal device 220 plays the video data stream. Then, basically, the solution provided in this application can switch the playback bit rate of the video data stream after evaluating the current network status of the terminal device 220 through the determined playback smoothness. Then, when the video data stream is played based on the playback bit rate after the switching process, the playback interface S20 currently displayed by the terminal device 220 can clearly display the live video, thereby improving the user's viewing experience.

[0042] Based on the above analysis, the following Figure 3 Describe the multimedia playback method of this application. Figure 3 , Figure 3 This is a flowchart of a multimedia playback method provided by an embodiment of the present application. The multimedia playback method can be executed by a computer device, and the computer device and the multimedia playback device are the same or different; when the computer device and the multimedia playback device are different, the multimedia playback method can also be executed by the multimedia playback device and the computer device together. For ease of explanation, the embodiment of the present application takes the computer device executing the multimedia playback method as an example; Figure 3 As shown, the multimedia playback method may include steps S310 to S340.

[0043] S310: After obtaining the target playback state data of the multimedia data stream within the target statistical period, obtain N reference playback state data of the multimedia data stream within N reference statistical periods.

[0044] In the embodiment of the present application, the multimedia data stream can be an audio and video data stream, a video data stream or an audio data stream, and this is not limited. Among them, the audio and video data stream or the video data stream can be, for example: the data stream generated by the terminal device used by the anchor user during the live video broadcast of the anchor user; or, it can be the data stream of any video resource (such as a TV series, movie, etc.) downloaded in real time through a network channel, etc. The audio data stream can be, for example: the data stream generated by the terminal device used by the anchor user during the live voice broadcast of the anchor user; or, it can be the data stream of any music downloaded in real time through a network channel, and this application does not make specific limitations on this.

[0045] Among them, the target statistical period can also be called the current statistical period, and the specific definition can be found in the above description. The "N" in the N reference statistical periods is a positive integer, and one reference statistical period corresponds to one reference playback status data; the so-called reference statistical period refers to a statistical period earlier than the target statistical period, and the reference statistical period can be called a historical statistical period, for example. In the embodiment of the present application, the N reference statistical periods can be N continuous statistical periods or N discontinuous statistical periods. For example, assuming N=3, one statistical period is 10 minutes, and the current time of playing the multimedia data stream is 11:00, then the current statistical period can be 11:00-11:10, and the reference statistical period can be 10:50-11:00, 10:40-10:50, 10:30-10:40. For another example, the current statistical period can be 11:00-11:10, and the reference statistical period can be 10:50-11:00, 10:30-10:40, 10:10-10:20. It should be noted that N can be a preset value preset by the user in advance, or N can be a value determined in real time according to the application scenario of the multimedia data stream, and this application does not limit this.

[0046] For example, a multimedia data stream refers to an audio or video stream in a live broadcast scenario. If a statistical period is 10 minutes, then the number of statistical periods from the time the host user starts broadcasting (assuming it is 11:00) to the current time (assuming it is 12:00) is determined to be N, and N = 6. Alternatively, if the user presets N = 3, then the number from the time the host user starts broadcasting (assuming it is 11:00) to the current time (assuming it is 12:00) is N = 3. In addition, if the user preset value is greater than the number of all statistical periods, then the number of all statistical periods can be determined as N.

[0047] In addition, any playback status data is generated based on the status detection result after the playback status of the multimedia data stream is detected within any statistical period. Among them, any statistical period can refer to a target statistical period or any reference statistical period; accordingly, any playback status data can refer to the target playback status data or any reference playback status data among N reference playback status data. In other words, the target playback status data refers to the data generated based on the status detection result corresponding to the target statistical period after the playback status of the multimedia data stream is detected within the target statistical period; any reference playback status data refers to the data generated based on the status detection result corresponding to the corresponding reference statistical period after the playback status of the multimedia data stream is detected within the corresponding reference statistical period.

[0048] Specifically, the playback status data of any statistical period may include playback status parameters under K status dimensions, where K is a positive integer. When the multimedia data stream is a video data stream or an audio data stream, the K status dimensions may include but are not limited to: frame rate dimension, freeze dimension, and so on. When the multimedia data stream is an audio and video data stream, the K status dimensions may include but are not limited to: frame rate dimension, freeze dimension, audio and video synchronization dimension, and so on. Accordingly, the playback status parameter under the frame rate dimension may be the playback frame rate, the playback status parameter under the freeze dimension may be the number of freezes, and the playback status parameter under the audio and video synchronization dimension may be a value calculated based on the audio and video synchronization time difference. That is to say, the playback status data of any statistical period may include: one or more of the playback frame rate under the frame rate dimension, the number of freezes under the freeze dimension, and the target audio and video synchronization time difference under the audio and video synchronization dimension. Among them:

[0049] Playback frame rate: refers to the number of multimedia frames played within a unit of time (e.g., 1 second). Specifically, the playback frame rate can be determined based on the duration of any statistical period and the number of data frames played within any statistical period. Specifically, the calculation formula for the playback frame rate is shown in the following formula (1):

[0050] fps=F / T0 (1)

[0051] In formula (1), fps represents the playback frame rate, T0 represents the duration of any statistical period, and F refers to the total number of multimedia data frames played during the T0 period; wherein the multimedia data frames include one or both of audio frames and video frames.

[0052] Number of freezes: refers to the number of freezes that occur during the playback of multimedia data within any statistical period; if the playback interval between any two adjacent data frames in the multimedia data stream exceeds the preset interval, it indicates that the multimedia data stream has freezes. The number of freezes can be represented by Nk, and the preset interval can be represented by Tk (ms). In actual application, Tk can be set based on manual experience or according to the requirements of different application scenarios. For example, it can usually be set to Tk = 200ms.

[0053] The target audio and video synchronization time difference is calculated based on the mean of the audio and video synchronization time differences of each data frame played in any statistical period of the multimedia data stream; the target audio and video synchronization time difference can be equal to the mean of the audio and video synchronization time differences of each data frame played in any statistical period of the multimedia data stream, or can be the mean variance or standard deviation further calculated based on the mean of each audio and video synchronization time difference, etc. Among them, any data frame includes an audio frame and a corresponding video frame, and the audio and video synchronization time difference of any data frame refers to: the difference between the actual playback time of the audio frame in any data frame and the actual playback time of the corresponding video frame. Based on this, the calculation formula of the audio and video synchronization time difference of any data frame can be shown as the following formula (2):

[0054] Pts diff =Pts audio -Pts video (2)

[0055] In formula (2), Pts audio Refers to the actual playback time of the audio frame in any data frame, Pts video It refers to the actual playback time of the video frame in any data frame.

[0056] Furthermore, taking the target audio and video synchronization time difference as an example, which is equal to the average of the audio and video synchronization time differences of each data frame played in any statistical period of the multimedia data stream, the calculation formula of the target audio and video synchronization time difference is shown in the following formula (3):

[0057] Pts i =Pts f / F (3)

[0058] In formula (3), F represents the total number of data frames in any statistical period, Pts f It refers to the sum of the audio and video synchronization time differences of each data frame in F data frames.

[0059] It should be noted that, in addition to including one or more of the above-mentioned playback frame rate, number of freezes, and target audio and video synchronization time difference, the playback status data corresponding to any statistical period may also include other information. For example, the playback status data corresponding to any statistical period may also include the average download bit rate; the average download bit rate can be represented by Br (kbps), which refers to the average value between the download bit rates of the multimedia data stream downloaded at various time points within any statistical period. In other words, the average download bit rate can be obtained by calculating the average of the actual download bit rates corresponding to various time points within any statistical period. For another example, when the multimedia playback device is in the background playback state, the playback status data corresponding to any statistical period may also include a background status flag. The so-called background status flag refers to a flag used to indicate that the multimedia playback device is in background playback mode; when the multimedia device is in the foreground playback state, the playback status data corresponding to any statistical period may not include the background status flag. The so-called background playback state refers to the state in which the multimedia playback device is playing the multimedia data stream, but the playback interface of the multimedia data stream is not presented on the terminal screen; correspondingly, the foreground playback state refers to the state in which the multimedia playback device is playing the multimedia data stream and at the same time the playback interface of the multimedia data stream is presented on the terminal screen.

[0060] S320: Determine a target playback smoothness of the multimedia data stream within a target statistical period using the target playback status data and N reference playback status data.

[0061] In an embodiment of the present application, the playback status data can be used to determine the playback smoothness of the multimedia data stream during the playback process. Therefore, in one possible implementation method, the target playback status data and N reference playback status data can be directly used to determine the target playback smoothness of the multimedia data stream within the target statistical period.

[0062] In another possible implementation, in order to estimate and measure the playback smoothness of the current multimedia data stream as accurately as possible during playback, the acquired playback status data (including the target playback status data and N reference playback status data) needs to be validated. Playback status data that fails the validation test is considered invalid and filtered out. The target playback smoothness of the multimedia data stream within the target statistical period is determined using the playback status data that passes the validation test.

[0063] In the above manner, after obtaining the target playback status data and N reference playback status data, each playback status data in the target playback status data and the N reference playback status data is subjected to validity detection, and the playback status data that fails the validity detection is filtered out to ensure the validity and referenceability of the adopted playback status data. Furthermore, the target playback fluency of the multimedia data stream within the target statistical period can be determined based on the target playback status data and the playback status data in the N reference playback status data that pass the validity detection. It can be seen that the target playback fluency finally determined is more accurate.

[0064] S330: Decision is made on the playback bit rate of the multimedia data stream according to the target playback smoothness, and the decided playback bit rate is obtained.

[0065] In one possible implementation, a decision is made on the playback bit rate of a multimedia data stream based on a target playback smoothness to obtain the playback bit rate after the decision is made, which can include the following steps: first, the bit rate level at which the current playback bit rate of the multimedia data is located is used as the current bit rate level, and a level adjustment strategy corresponding to the target playback smoothness is obtained; wherein, in the case that the multimedia data stream is an audio and video data stream, the bit rate level can be, for example, Blu-ray, HD, UHD, SD, etc.; then, the current bit rate level is adjusted according to the level adjustment strategy to obtain an adjusted bit rate level; finally, the playback bit rate corresponding to the adjusted bit rate level is determined as the playback bit rate after the decision is made.

[0066] In specific implementation, if the target playback smoothness is greater than or equal to the first smoothness threshold, the level adjustment strategy is used to indicate: adjust the current bit rate level in the upward direction so that the adjusted bit rate level is higher than the current bit rate level. For example, assuming that the server provides S-channel video streams Vr with bit rates from low to high i (0<i<S), the default bit rate level is BR t0 The target playback smoothness is represented by the smoothness factor, which is represented by θ. Then, we will adaptively adjust the playback bit rate of the multimedia data stream based on the smoothness factor θ. If the smoothness factor θ of the target statistical period is greater than 2, the current bit rate level is Vr i , then adjust the bit rate Vr downward i-1 , in order to ensure the smoothness and playback quality of multimedia data streams during playback.

[0067] In a specific implementation, if the target playback smoothness and the smoothness corresponding to the P consecutive statistical periods before the target statistical period are both less than or equal to the second smoothness threshold, the level adjustment strategy is used to indicate: adjust the current bitrate level in the downward direction so that the adjusted bitrate level is lower than the current bitrate level; where P∈[1,N]. For example, if the smoothness factor θ of the P consecutive reported statistical periods is 0, the current bitrate level is Vr i , you can adjust the bit rate Vr upwards i+1 , in order to ensure the smoothness and playback quality of multimedia data streams during playback.

[0068] In another possible implementation, a decision is made on the playback bit rate of the multimedia data stream based on the target playback smoothness to obtain the playback bit rate after the decision. The following steps may also be included: first, a mapping relationship table between smoothness and playback bit rate is obtained; then, a playback bit rate that has a mapping relationship with the target playback smoothness is searched in the mapping relationship table as the playback bit rate after the decision.

[0069] For example, different target playback smoothness can correspond to different playback bit rates after decision. That is, there is a mapping relationship between the target playback smoothness and the playback bit rate. Therefore, first, based on the target playback smoothness, the playback bit rate mapping relationship corresponding to the target playback smoothness can be obtained, and then the playback bit rate after decision of the multimedia data stream can be directly determined based on the playback bit rate mapping relationship.

[0070] For example, the target playback smoothness can be expressed by the smoothness factor, which can be expressed as θ, and the playback bit rate after the decision can be expressed as Vr i The mapping relationship between the smoothness and the playback bit rate can be represented by a mapping relationship table, which can be shown in Table 1 below:

[0071] Table 1. Mapping relationship between smoothness and playback bitrate

[0072] Fluency Playback bitrate <![CDATA[θ1]]> <![CDATA[Vr1]]> <![CDATA[θ2]]> <![CDATA[Vr2]]> <![CDATA[θ3]]> <![CDATA[Vr3]]> <![CDATA[θ n ]]> <![CDATA[Vr n ]]>

[0073] Then, after determining the target playback smoothness, the determined playback bitrate of the multimedia data stream can be determined according to the mapping table shown in Table 1. For example, if the target playback smoothness is θ1, the determined playback bitrate of the multimedia data stream is Vr1. For another example, if the target playback smoothness is θ2, the determined playback bitrate of the multimedia data stream is Vr2. Similarly, the determined playback bitrate of the multimedia data stream is determined based on the target playback smoothness to obtain the determined playback bitrate of the multimedia data stream.

[0074] Of course, in addition to being represented by a mapping relationship table, the mapping relationship between smoothness and playback bit rate can also be represented by other mapping methods, such as arrays, functions, and charts. The embodiment of the present application does not specifically limit the mapping method.

[0075] S340: Switch the current playback bit rate of the multimedia data to the decided playback bit rate, and play the multimedia data stream based on the decided playback bit rate.

[0076] Among them, the current playback bit rate refers to: the latest playback bit rate adopted during the playback of the multimedia data stream. In one possible implementation, at the moment when the playback bit rate after the decision is made, it can be determined that it is the latest playback bit rate; or, taking into account the factor of network delay, after the playback bit rate after the decision is made, it is determined that it is the latest playback bit rate. In another possible implementation, at the moment when the target playback status data is obtained, it can be determined that it is the latest playback bit rate; or, taking into account the factor of network delay, after the target playback status data is obtained, it is determined that it is the latest playback bit rate. In another possible implementation, at the moment when it is determined that the target playback fluency is obtained, it is determined that it is the latest playback bit rate; or, taking into account the factor of network delay, after it is determined that the target playback fluency is obtained, it is determined that it is the latest playback bit rate, etc. The embodiments of the present application do not make specific limitations on this.

[0077] In one possible implementation, during playback of the multimedia data stream based on the playback bitrate determined after bitrate switching, the computer device may continue to obtain playback status data of the multimedia data stream every T0 period according to the aforementioned steps, and repeatedly execute steps S310-S330 to determine the next playback bitrate determined for the multimedia data stream at which bitrate switching is required during playback (if the bitrate switching condition is not met, the bitrate switching process is not performed). Through the above-described approach, adaptive bitrate switching of the multimedia data stream during playback is achieved, thereby enhancing the user experience.

[0078] In an embodiment of the present application, after obtaining the target playback status data of the multimedia data stream in the target statistical period (i.e., the current statistical period), the target playback fluency of the multimedia data stream in the target statistical period can be determined by combining the target playback status data and N reference playback status data of the multimedia data stream in N reference statistical periods; this method can not only effectively improve the accuracy of the target playback fluency, but also enable the target playback fluency to reflect the current playback state of the multimedia data stream to a certain extent. As a result, when the playback bit rate of the multimedia data stream is decided based on the target playback fluency, the accuracy of the playback bit rate after the decision is obtained is high and can be adapted to the current playback state to a certain extent. Then, the playback bit rate of the multimedia data stream can be switched from the current playback bit rate to the playback bit rate after the decision, and the multimedia data stream can be played based on the playback bit rate after the decision; it can be seen that the embodiment of the present application can realize adaptive bit rate switching of the multimedia data stream, and play multimedia data by playing multimedia data at a more accurate playback bit rate after the decision, which can effectively improve the playback fluency and playback quality of the multimedia data stream.

[0079] See Figure 4 , Figure 4 This is a flow chart of determining target playback fluency provided by an embodiment of the present application. Figure 4 The embodiment shown can be Figure 3 A specific embodiment of step S320 in the embodiment. Figure 4 As shown, the method for determining the target playback fluency may include steps S410 to S440.

[0080] S410: Traverse the target playback state data and N reference playback state data.

[0081] In specific implementation, the method of traversing the target playback status data and each playback status data in the N reference playback status data can be: traversing in sequence according to the time order of the statistical period corresponding to each playback status data; or it can be: randomly traversing the target playback status data and each playback status data in the N reference playback status data. The embodiment of the present application does not specifically limit the traversal method.

[0082] S420: Acquire attribute information of the currently traversed play status data, and perform validity verification on the currently traversed play status data according to the attribute information.

[0083] The attribute information includes: the statistical period identifier corresponding to the currently traversed play status data. Then, the method of performing validity verification on the currently traversed play status data based on the attribute information may include any of the following methods:

[0084] (1) If the statistical period indicated by the statistical period identifier is the initial statistical period, it is determined that the currently traversed playback status data has not passed the validity check; if the statistical period indicated by the statistical period identifier in the attribute information is not the initial statistical period, it is determined that the currently traversed playback status data has passed the validity check; wherein, the initial statistical period refers to the statistical period at which the multimedia data stream is played for the first time.

[0085] In specific implementations, the first reported playback status data after the initial playback of a multimedia data stream (corresponding to the initial statistical period) is considered invalid. Because the initial playback frame rate and average download bitrate of a multimedia data stream fluctuate significantly after its initial playback, the first reported playback status data is considered invalid.

[0086] (2) Detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier; if the playback state is a background playback state, determining that the currently traversed playback state data has failed the validity check; if the playback state is a foreground playback state, determining that the currently traversed playback state data has passed the validity check; wherein, the multimedia playback device refers to a device that plays a multimedia data stream.

[0087] Regarding method (2), in one possible implementation, the attribute information further includes: the playback frame rate and average download bit rate of the multimedia data stream within the statistical period indicated by the statistical period identifier. Then, detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier may include the following steps:

[0088] If the playback frame rate and average download bit rate in the attribute information meet the preset conditions, it is determined that the multimedia playback device is in a background playback state during the statistical period indicated by the statistical period identifier. The background playback state means that the playback interface of the multimedia playback device is closed (hidden), that is, the playback interface of the multimedia playback device is not visible to the user, but the playback functions of the multimedia playback device are still operating normally.

[0089] If the preset condition is not met, it is determined that the multimedia playback device is in a foreground playback state during the statistical period indicated by the statistical period identifier. The foreground playback state means that the playback interface of the multimedia playback device is open (displayed), that is, the playback interface of the multimedia playback device is visible to the user and the playback functions of the multimedia playback device are still operating normally.

[0090] The preset conditions include: the playback frame rate in the attribute information is an invalid frame rate (the invalid frame rate can be set by the user, for example, the invalid frame rate is equal to 0), and the average download bit rate is greater than the preset bit rate threshold. The preset bit rate threshold can be determined based on the current bit rate level Vri of the multimedia data stream. For example, the preset bit rate threshold is: the current bit rate level Vr of the multimedia data stream i 50% of.

[0091] For example, the preset conditions may be: fps=0 and Br>Vr i *50%. That is, the playback frame rate in the attribute information is equal to 0 and the average download bit rate Br is greater than the current bit rate level Vr of the multimedia data stream i 50% of.

[0092] With respect to method (2), in another possible implementation, detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier may further include the following steps:

[0093] Detect the background status flag in the currently traversed playback status data:

[0094] If the background state flag is detected, it is determined that the multimedia playback device is in a background playback state within the statistical period indicated by the statistical period identifier;

[0095] If the background state flag is not detected, it is determined that the multimedia playback device is in a foreground playback state within the statistical period indicated by the statistical period identifier.

[0096] (3) Detect whether there is a bit rate switching operation within the statistical period indicated by the statistical period identifier; if so, determine that the currently traversed playback status data fails the validity check; if not, determine that the currently traversed playback status data passes the validity check.

[0097] In specific implementations, the playback status data collected during the first statistical period after a bitrate switch occurs during the playback of a multimedia data stream is considered invalid. This means that after a bitrate switch occurs, the first reported data after the switch is subject to fluctuation and instability.

[0098] In the above manner, after obtaining the target playback status data and N reference playback status data, each playback status data in the target playback status data and the N reference playback status data is subjected to validity detection, and the playback status data that fails the validity detection is filtered out to ensure the validity and referenceability of the adopted playback status data. Furthermore, the target playback fluency of the multimedia data stream within the target statistical period can be determined based on the target playback status data and the playback status data in the N reference playback status data that pass the validity detection. It can be seen that the target playback fluency finally determined is more accurate.

[0099] S430: If the validity check is passed, the currently traversed play status data is determined as valid play status data.

[0100] In a specific implementation, if the currently traversed playback state data passes the validity check, the currently traversed playback state data is determined to be valid playback state data; if the currently traversed playback state data fails the validity check, the currently traversed playback state data is determined to be invalid playback state data. Furthermore, the invalid playback state data is filtered out.

[0101] S440: After the target playback status data and N reference playback status data are traversed to obtain M valid playback status data, a target playback smoothness of the multimedia data stream within a target statistical period is determined based on the M valid playback status data.

[0102] In specific implementation, M is a positive integer. Determining the target playback smoothness of the multimedia data stream within the target statistical period based on the M valid playback status data can include the following steps: first, determining the smoothness factor under each state dimension based on the playback state parameters under each state dimension in the M valid playback status data; then, determining the target playback smoothness of the multimedia data stream within the target statistical period based on the smoothness factor under each state dimension.

[0103] Next, we will introduce the specific calculation methods of the fluency factor under each state dimension.

[0104] In one possible implementation, the K state dimensions include a frame rate dimension, and the playback state data for any statistical period includes the playback frame rate under the frame rate dimension. The smoothness factor under the frame rate dimension is determined as follows: First, a baseline playback frame rate is obtained, and based on the baseline playback frame rate and the playback frame rate in each valid playback state data, the frame rate fluctuation for the statistical period corresponding to each valid playback state data is determined; second, the average of the determined frame rate fluctuations is calculated to obtain a reference frame rate fluctuation; and then, based on the reference frame rate fluctuation and a preset frame rate fluctuation threshold, the smoothness factor under the frame rate dimension is determined.

[0105] In a specific implementation, the reference frame rate fluctuation can be the average frame rate fluctuation obtained by calculating the mean, or the reference frame rate fluctuation can be the result of further performing a variance or mean square error calculation on the average frame rate fluctuation. Furthermore, the reference frame rate fluctuation can also be the maximum frame rate fluctuation among the determined frame rate fluctuations, or the minimum frame rate fluctuation among the determined frame rate fluctuations, etc., which are not specifically limited in the embodiments of the present application.

[0106] For example, the smoothness factor in the frame rate dimension can be expressed as θ fps ,θ fps The calculation method is as follows:

[0107] First, based on the playback frame rate fps in each valid playback state data in M ​​valid playback state data i (0<i<M), first calculate the frame rate fluctuation of the statistical period corresponding to each valid playback status data, as shown in formula (4):

[0108]

[0109] Among them, fps mean Indicates the benchmark playback frame rate. The benchmark playback frame rate can be obtained in at least two ways: one is to directly obtain the preset benchmark playback frame rate through multi-bitrate transcoding configuration, and the second is to obtain it by performing an average calculation based on historical statistical playback status data.

[0110] Next, the average of each determined frame rate fluctuation is calculated to obtain a reference frame rate fluctuation. The reference frame rate fluctuation can be calculated as shown in formula (5):

[0111]

[0112] Finally, according to the relationship between the reference frame rate fluctuation and the preset frame rate fluctuation threshold Thfps, θ fps Calculation of Th. fpsThe settings can be customized based on manual experience, for example, the settings can be made based on the different acceptance levels of users on the smoothness of multimedia data stream playback, such as Th fps =2. Then determine the smoothness factor θ under the frame rate dimension fps It can be shown as formula (6):

[0113]

[0114] Furthermore, based on formula (6), the reference frame rate fluctuation and the preset frame rate fluctuation threshold Th can be used to calculate the frame rate fluctuation. fps The difference between them further determines θ fps For example, the reference frame rate fluctuation can be compared with the preset frame rate fluctuation threshold Th fps The difference between the two is taken as θ fps . Such as Th fps =2, F = 5, then θ fps =3; F = 4, then θ fps =2, and so on. For another example, the reference frame rate fluctuation can be further compared with the preset frame rate fluctuation threshold Th fps The difference between the two is divided into intervals, and each interval corresponds to a fluency factor θ fps If the difference is less than 0, the fluency factor θ fps =0; the difference value is greater than or equal to 0 and less than or equal to 2, then the fluency factor θ fps =1; if the difference value is greater than 2 and less than or equal to 4, then the fluency factor θ fps =2, and so on.

[0115] In another possible implementation, the K state dimensions include a jamming dimension, and the playback state data of any statistical period includes the number of jams under the jamming dimension. The smoothness factor under the jamming dimension is determined as follows:

[0116] Performing an average operation on the number of freezes in M ​​valid playback status data to obtain a reference number of freezes;

[0117] If the reference number of freezes is greater than the freeze threshold, the smoothness factor under the freeze dimension is determined to be a first value;

[0118] If the reference number of freezes is less than or equal to the freeze threshold, the smoothness factor under the freeze dimension is determined to be a second value.

[0119] In a specific implementation, the reference number of freezes can be the average number of freezes obtained based on mean calculation, or the reference number of freezes can be the result obtained by further performing variance or mean square error calculation based on the average number of freezes. In addition, the reference number of freezes can also be the maximum number of freezes among the M valid playback status data, or the reference number of freezes can be the minimum number of freezes among the M valid playback status data, etc. This embodiment of the application does not specifically limit this.

[0120] For example, the smoothness factor under the jamming dimension can be expressed as θ Nk ,θ Nk The calculation method is as follows:

[0121] First, based on the number of freezes Nk__i (0<i<M) in each of the M valid playback status data, calculate the reference freeze number The calculation method is shown in formula (7):

[0122]

[0123] Then, based on the reference number of jams and the jamming threshold Th nk The relationship between θ Nk Calculation of Th. nk It is also possible to customize the settings based on manual experience, for example, it can be set based on the different acceptance levels of users on the smoothness of multimedia data stream playback, such as Th nk =1. Among them, θ Nk The calculation method of is shown in formula (8):

[0124]

[0125] Furthermore, based on formula (8), θ can be further determined according to the difference between the reference number of freezes and the freeze threshold. Nk For example, the difference between the reference jamming times and the jamming times threshold can be used as θ Nk . Such as Th nk =1, Then θ Nk =2; Then θ Nk =1, and so on. For another example, the difference between the reference jamming times and the jamming times threshold can be further divided into intervals, and each interval corresponds to a fluency factor θ Nk If the difference is less than 0, the fluency factor θ Nk =0; the difference value is greater than or equal to 0 and less than or equal to 2, then the fluency factor θ Nk=1; if the difference value is greater than 2 and less than or equal to 4, then the fluency factor θ Nk =2, and so on.

[0126] In another possible implementation, the multimedia data stream is an audio and video data stream, the K state dimensions include an audio and video synchronization dimension, and the playback state data for any statistical period includes a target audio and video synchronization time difference in the audio and video synchronization dimension. The smoothness factor in the audio and video synchronization dimension is determined as follows:

[0127] Arrange the M statistical periods corresponding to the M valid playback data in order, with one valid playback data corresponding to one statistical period;

[0128] Based on the arrangement position of each statistical period in the M statistical periods and the target audio and video synchronization time difference in the M valid playback status data, M-1 audio and video synchronization fluctuations are calculated; one audio and video synchronization fluctuation is determined based on the target audio and video synchronization time difference in two adjacent valid playback status data. Two adjacent valid playback status data means that the arrangement positions of the statistical periods corresponding to the two valid playback status data are adjacent;

[0129] It should be noted that the term "adjacent" here can refer to either forward-adjacent or backward-adjacent. Forward-adjacent means that the statistical period corresponding to a certain valid playback status data is arranged before the statistical period corresponding to another valid playback status data. For example, if the statistical period T1 corresponding to valid playback status data 1 is 11:00-11:10, and the statistical period T2 corresponding to valid playback status data 2 is 11:10-11:20, then valid playback status data 1 and valid playback status data 2 are forward-adjacent. Similarly, backward-adjacent means that the statistical period corresponding to a certain valid playback status data is arranged after the statistical period corresponding to another valid playback status data. For example, if the statistical period T1 corresponding to valid playback status data 1 is 11:10-11:20, and the statistical period T2 corresponding to valid playback status data 2 is 11:00-11:10, then valid playback status data 1 and valid playback status data 2 are backward-adjacent.

[0130] The mean of M-1 audio and video synchronization fluctuations is calculated to obtain a reference audio and video synchronization fluctuation; and the smoothness factor under the audio and video synchronization dimension is calculated based on the reference audio and video synchronization fluctuation, the first limit threshold, and the second limit threshold.

[0131] In a specific implementation, the reference audio and video synchronization fluctuation can be the average audio and video synchronization fluctuation obtained by mean calculation, or the reference audio and video synchronization fluctuation can be the result obtained by further performing a variance or mean square error calculation on the average audio and video synchronization fluctuation. Furthermore, the reference audio and video synchronization fluctuation can also be the maximum audio and video synchronization fluctuation among M-1 audio and video synchronization fluctuations, or the reference audio and video synchronization fluctuation can be the minimum audio and video synchronization fluctuation among M-1 audio and video synchronization fluctuations, etc. This embodiment of the present application does not specifically limit this.

[0132] For example, the smoothness factor in the audio and video synchronization dimension can be expressed as θ pts ,θ pts The calculation method is as follows:

[0133] First, the M statistical periods corresponding to the M valid playback data are arranged in order, and based on the target audio and video synchronization time difference Pts in each valid playback status data in the M valid playback status data arranged in order, i , calculate the audio and video synchronization fluctuation degree ΔPts between the two statistical periods before and after i , ΔPts i The calculation formula is shown in formula (9):

[0134]

[0135] Among them, Th min is the lowest limit threshold, if Pts i is less than the minimum limit threshold, then ΔPts i The judgment is 0.

[0136] Then, the mean of the M-1 audio and video synchronization fluctuations is calculated to obtain the reference audio and video synchronization fluctuation. The calculation method of the reference audio and video synchronization fluctuation P is shown in formula (10):

[0137]

[0138] Finally, the smoothness factor θ under the audio and video synchronization dimension is calculated based on the reference audio and video synchronization fluctuation, the first limit threshold, and the second limit threshold. pts As shown in formula (11):

[0139]

[0140] Among them, Th fps is the first limiting threshold, Th max is the second limiting threshold, when P is greater than the threshold Th fps Or the target audio and video synchronization time difference Pts in a valid playback status data i Higher than Thmax When θ pts is 1. Among them, Th fps and Th max It can be customized according to human experience, for example, it can be set to 300 (ms), Th max Can be set to 10000 (ms).

[0141] In one possible implementation, based on the fluency factors under each state dimension, determining the target playback fluency of the multimedia data stream within the target statistical period can include the following steps: first, obtaining the weight of each state dimension; then, using the weight of each state dimension, performing weighted summation on the fluency factors under each state dimension to obtain the target playback fluency of the multimedia data within the target statistical period.

[0142] In another possible implementation, the smoothness factor under any state dimension among the smoothness factors under each state dimension can also be directly used as the target playback smoothness. For example, the smoothness factor under the frame rate dimension can be directly used as the target playback smoothness, or the smoothness factor under the jamming dimension can be directly used as the target playback smoothness, or the smoothness factor under the audio and video synchronization dimension can be directly used as the target playback smoothness. Of course, the smoothness factors under any two state dimensions among the smoothness factors under each state dimension can also be used as the target playback smoothness. For example, the target playback smoothness is determined based on the smoothness factor under the frame rate dimension and the smoothness factor under the jamming dimension, or the target playback smoothness is determined based on the smoothness factor under the jamming dimension and the smoothness factor under the audio and video synchronization dimension, or the target playback smoothness is determined based on the smoothness factor under the frame rate dimension and the smoothness factor under the audio and video synchronization dimension.

[0143] For example, based on the smoothness factor under each state dimension: including the smoothness factor θ under the frame rate dimension fps , the smoothness factor θ under the jamming dimension Nk , the smoothness factor θ under the audio and video synchronization dimension pts , the final target playback smoothness can be expressed by θ, then the calculation formula of θ can be shown as formula (12):

[0144] θ=θ fps +θ Nk +θ pts (12)

[0145] Of course, further, you can also set corresponding weights for the smoothness factors in the three state dimensions, namely, the smoothness factor in the frame rate dimension, the smoothness factor in the stuttering dimension, and the smoothness factor in the audio and video synchronization dimension, according to their importance. Then, based on the weights of each state dimension, perform weighted sum calculation on the smoothness factor in the frame rate dimension, the smoothness factor in the stuttering dimension, and the smoothness factor in the audio and video synchronization dimension, and finally obtain the target playback smoothness.

[0146] For example, suppose the weight of the smoothness factor under the frame rate dimension is α1, the weight of the smoothness factor under the jamming dimension is α2, and the weight of the smoothness factor under the audio and video synchronization dimension is α3. Then, based on the weight of each state dimension, θ fps ,θ Nk and θ pts The target playback smoothness obtained after weighted processing can be expressed as formula (13):

[0147] θ=α1*θ fps +α2*θ Nk +α3*θ pts (13)

[0148] Among them, the specific values ​​of α1, α2 and α3 can be set according to manual experience, or according to the actual situation of the multimedia data stream in different application scenarios. The embodiments of the present application do not make specific limitations on this.

[0149] In an embodiment of the present application, the target playback smoothness is determined based on components from three state dimensions: frame rate dimension, freeze dimension, and audio and video synchronization dimension. Since the determination of the target playback smoothness is considered from multiple state dimensions, the data sources are relatively rich and diverse, which makes the final determined target playback smoothness more accurate.

[0150] See Figure 5 , Figure 5 This is a schematic diagram of the structure of a multimedia playback device provided by an embodiment of the present application. The multimedia playback device 500 can be applied to Figure 3 and Figure 4 Computer device in the corresponding method embodiment. The multimedia playback device 500 can be a computer program (including program code) running in a lightweight node, for example, the multimedia playback device 500 is an application software; the device can be used to execute the corresponding steps of the method provided in the embodiment of the present application. The multimedia playback device 500 may include:

[0151] The acquiring unit 501 is configured to acquire, after acquiring the target playback state data of the multimedia data stream within the target statistical period, N reference playback state data of the multimedia data stream within N reference statistical periods, where N is a positive integer; one reference statistical period corresponds to one reference playback state data, and the reference statistical period refers to a statistical period earlier than the target statistical period;

[0152] The processing unit 502 is configured to determine a target playback smoothness of the multimedia data stream within a target statistical period using the target playback state data and N reference playback state data;

[0153] The processing unit 502 is further configured to determine the playback bit rate of the multimedia data stream according to the target playback smoothness, and obtain the determined playback bit rate;

[0154] The switching unit 503 is used to switch the current playback bit rate of the multimedia data to the decided playback bit rate, and play the multimedia data stream based on the decided playback bit rate. The current playback bit rate refers to: the latest playback bit rate used during the playback of the multimedia data stream.

[0155] In one possible implementation, when the processing unit 502 uses the target playback state data and the N reference playback state data to determine the target playback smoothness of the multimedia data stream within the target statistical period, it is specifically configured to:

[0156] Traverse the target playback state data and N reference playback state data;

[0157] Obtaining the attribute information of the currently traversed playback status data, and performing validity verification on the currently traversed playback status data based on the attribute information;

[0158] If the validity check is passed, the currently traversed playback state data is determined as valid playback state data;

[0159] After the target playback state data and N reference playback state data are traversed to obtain M valid playback state data, the target playback smoothness of the multimedia data stream within the target statistical period is determined based on the M valid playback state data, where M is a positive integer.

[0160] In one possible implementation, the attribute information includes: a statistical period identifier corresponding to the currently traversed play status data; when the processing unit 502 performs validity verification on the currently traversed play status data according to the attribute information, it is specifically configured to:

[0161] If the statistical period indicated by the statistical period identifier is the initial statistical period, it is determined that the currently traversed playback status data has failed the validity check; if the statistical period indicated by the statistical period identifier in the attribute information is not the initial statistical period, it is determined that the currently traversed playback status data has passed the validity check; wherein the initial statistical period refers to the statistical period in which the multimedia data stream is played for the first time;

[0162] Alternatively, detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier; if the playback state is a background playback state, determining that the currently traversed playback state data fails the validity check; if the playback state is a foreground playback state, determining that the currently traversed playback state data passes the validity check; wherein the multimedia playback device refers to a device that plays the multimedia data stream;

[0163] Alternatively, it is detected whether there is a bit rate switching operation within the statistical period indicated by the statistical period identifier; if so, it is determined that the currently traversed playback status data has not passed the validity check; if not, it is determined that the currently traversed playback status data has passed the validity check.

[0164] In one possible implementation, the attribute information further includes: a playback frame rate and an average download bit rate of the multimedia data stream within the statistical period indicated by the statistical period identifier; and when the processing unit 502 detects the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier, it is specifically configured to:

[0165] If the playback frame rate and the average download bit rate in the attribute information meet the preset conditions, it is determined that the playback state of the multimedia playback device is a background playback state within the statistical period indicated by the statistical period identifier;

[0166] If the preset condition is not met, determining that the multimedia playback device is in a foreground playback state within the statistical period indicated by the statistical period identifier;

[0167] The preset conditions include: the playback frame rate in the attribute information is an invalid frame rate, and the average download bit rate is greater than a preset bit rate threshold.

[0168] In a possible implementation, when detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier, the processing unit 502 is specifically configured to:

[0169] Detect the background status flag in the currently traversed playback status data;

[0170] If the background state flag is detected, it is determined that the multimedia playback device is in a background playback state within the statistical period indicated by the statistical period identifier;

[0171] If the background state flag is not detected, it is determined that the multimedia playback device is in a foreground playback state within the statistical period indicated by the statistical period identifier.

[0172] In a possible implementation, the playback state data of any statistical period includes playback state parameters under K state dimensions, any statistical period is a target statistical period or a reference statistical period, and K is a positive integer;

[0173] When determining the target playback fluency of the multimedia data stream within the target statistical period based on the M valid playback status data, the processing unit 502 is specifically configured to:

[0174] Determine the fluency factor under each state dimension according to the playback state parameters under each state dimension in the M valid playback state data;

[0175] Based on the fluency factors under each state dimension, a target playback fluency of the multimedia data stream within a target statistical period is determined.

[0176] In a possible implementation, the K state dimensions include a frame rate dimension, and the playback state data of any statistical period includes the playback frame rate under the frame rate dimension;

[0177] The smoothness factor in the frame rate dimension is determined as follows:

[0178] Obtaining a reference playback frame rate, and determining the frame rate fluctuation of the statistical period corresponding to each valid playback state data based on the reference playback frame rate and the playback frame rate in each valid playback state data;

[0179] The determined frame rate fluctuations are averaged to obtain a reference frame rate fluctuation. The smoothness factor under the frame rate dimension is determined based on the reference frame rate fluctuation and a preset frame rate fluctuation threshold.

[0180] In a possible implementation, the K status dimensions include a freeze dimension, and the playback status data of any statistical period includes the number of freezes in the freeze dimension;

[0181] The smoothness factor under the jamming dimension is determined as follows:

[0182] Performing an average operation on the number of freezes in M ​​valid playback status data to obtain a reference number of freezes;

[0183] If the reference number of freezes is greater than the freeze threshold, the smoothness factor under the freeze dimension is determined to be a first value;

[0184] If the reference number of freezes is less than or equal to the freeze threshold, the smoothness factor under the freeze dimension is determined to be a second value.

[0185] In a possible implementation, the multimedia data stream is an audio and video data stream, the K state dimensions include an audio and video synchronization dimension, and the playback state data of any statistical period includes a target audio and video synchronization difference in the audio and video synchronization dimension;

[0186] The target audio and video synchronization time difference is calculated based on the average of the audio and video synchronization time differences of each data frame played within any statistical period of the multimedia data stream. Each data frame includes an audio frame and a corresponding video frame. The audio and video synchronization time difference of any data frame refers to the difference between the actual playback time of the audio frame and the actual playback time of the corresponding video frame in any data frame.

[0187] The smoothness factor under the audio and video synchronization dimension is determined as follows:

[0188] Arrange the M statistical periods corresponding to the M valid playback data in order, with one valid playback data corresponding to one statistical period;

[0189] Based on the arrangement position of each statistical period in the M statistical periods and the target audio and video synchronization time difference in the M valid playback status data, M-1 audio and video synchronization fluctuations are calculated; one audio and video synchronization fluctuation is determined based on the target audio and video synchronization time difference in two adjacent valid playback status data. Two adjacent valid playback status data means that the arrangement positions of the statistical periods corresponding to the two valid playback status data are adjacent;

[0190] The mean of M-1 audio and video synchronization fluctuations is calculated to obtain a reference audio and video synchronization fluctuation; and the smoothness factor under the audio and video synchronization dimension is calculated based on the reference audio and video synchronization fluctuation, the first limit threshold, and the second limit threshold.

[0191] In one possible implementation, when determining the target playback fluency of the multimedia data stream within the target statistical period based on the fluency factors under each state dimension, the processing unit 502 is specifically configured to:

[0192] Get the weight of each state dimension;

[0193] The weight of each state dimension is used to perform weighted summation on the fluency factors under each state dimension to obtain the target playback fluency of the multimedia data within the target statistical period.

[0194] In one possible implementation, when the processing unit 502 determines the playback bit rate of the multimedia data stream based on the target playback smoothness and obtains the determined playback bit rate, it is specifically configured to:

[0195] The bit rate level of the current playback bit rate of the multimedia data is used as the current bit rate level, and a level adjustment strategy corresponding to the target playback smoothness is obtained;

[0196] Adjust the current bit rate level according to the level adjustment strategy to obtain the adjusted bit rate level;

[0197] The playback bit rate corresponding to the adjusted bit rate level is determined as the playback bit rate after the decision.

[0198] In one possible implementation, if the target playback smoothness is greater than or equal to the first smoothness threshold, the profile adjustment strategy is used to indicate: adjusting the current bitrate profile in an upward adjustment direction so that the adjusted bitrate profile is higher than the current bitrate profile;

[0199] If the target playback smoothness and the smoothness corresponding to P consecutive statistical periods before the target statistical period are both less than or equal to the second smoothness threshold, the level adjustment strategy is used to indicate: adjust the current bit rate level in the downward adjustment direction so that the adjusted bit rate level is lower than the current bit rate level; where P∈[1, N].

[0200] In one possible implementation, when the processing unit 502 determines the playback bit rate of the multimedia data stream based on the target playback smoothness and obtains the determined playback bit rate, it is specifically configured to:

[0201] Get the mapping table between fluency and playback bitrate;

[0202] The mapping table is used to find the playback bit rate that has a mapping relationship with the target playback smoothness, and the playback bit rate is used as the playback bit rate after the decision.

[0203] In an embodiment of the present application, after obtaining the target playback status data of the multimedia data stream in the target statistical period (i.e., the current statistical period), the target playback fluency of the multimedia data stream in the target statistical period can be determined by combining the target playback status data and N reference playback status data of the multimedia data stream in N reference statistical periods; in this way, not only the accuracy of the target playback fluency can be effectively improved, but also the target playback fluency can reflect the current playback state of the multimedia data stream to a certain extent. Thus, when the playback bit rate of the multimedia data stream is decided according to the target playback fluency, the accuracy of the playback bit rate after the decision is obtained is high and can be adapted to the current playback state to a certain extent. Then, the playback bit rate of the multimedia data stream can be switched from the current playback bit rate to the playback bit rate after the decision, and the multimedia data stream can be played based on the playback bit rate after the decision; it can be seen that the embodiment of the present application can realize adaptive bit rate switching of the multimedia data stream, and play multimedia data by playing multimedia data at a more accurate playback bit rate after the decision, which can effectively improve the playback fluency and playback quality of the multimedia data stream.

[0204] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 600 is used to execute Figure 2 and Figure 4 The steps performed by a computer device in the corresponding method embodiment are as follows: the computer device 600 includes: one or more processors 610; one or more input devices 620; one or more output devices 630; and a memory 640. The processors 610, input devices 620, output devices 630, and memory 640 are connected via a bus 650. The memory 640 is used to store a computer program, which includes program instructions. The processor 610 is used to call the program instructions stored in the memory 640 to perform the following operations:

[0205] After obtaining the target playback status data of the multimedia data stream within the target statistical period, obtaining N reference playback status data of the multimedia data stream within N reference statistical periods, where N is a positive integer; one reference statistical period corresponds to one reference playback status data, and the reference statistical period refers to a statistical period earlier than the target statistical period;

[0206] Determine the target playback smoothness of the multimedia data stream within a target statistical period using the target playback state data and N reference playback state data;

[0207] According to the target playback smoothness, the playback bit rate of the multimedia data stream is determined to obtain the determined playback bit rate;

[0208] The current playback bit rate of the multimedia data is switched to the decided playback bit rate, and the multimedia data stream is played based on the decided playback bit rate. The current playback bit rate refers to the latest playback bit rate used during the playback of the multimedia data stream.

[0209] In one possible implementation, when the processor 610 uses the target playback state data and N reference playback state data to determine the target playback smoothness of the multimedia data stream within the target statistical period, it calls the program instructions stored in the memory 640 and performs the following operations:

[0210] Traverse the target playback state data and N reference playback state data;

[0211] Obtaining the attribute information of the currently traversed playback status data, and performing validity verification on the currently traversed playback status data based on the attribute information;

[0212] If the validity check is passed, the currently traversed playback state data is determined as valid playback state data;

[0213] After the target playback state data and N reference playback state data are traversed to obtain M valid playback state data, the target playback smoothness of the multimedia data stream within the target statistical period is determined based on the M valid playback state data, where M is a positive integer.

[0214] In one possible implementation, the attribute information includes: a statistical period identifier corresponding to the currently traversed playback status data; when the processor 610 performs validity verification on the currently traversed playback status data based on the attribute information, it calls program instructions stored in the memory 640 and performs the following operations:

[0215] If the statistical period indicated by the statistical period identifier is the initial statistical period, it is determined that the currently traversed playback status data has failed the validity check; if the statistical period indicated by the statistical period identifier in the attribute information is not the initial statistical period, it is determined that the currently traversed playback status data has passed the validity check; wherein the initial statistical period refers to the statistical period in which the multimedia data stream is played for the first time;

[0216] Alternatively, detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier; if the playback state is a background playback state, determining that the currently traversed playback state data fails the validity check; if the playback state is a foreground playback state, determining that the currently traversed playback state data passes the validity check; wherein the multimedia playback device refers to a device that plays the multimedia data stream;

[0217] Alternatively, it is detected whether there is a bit rate switching operation within the statistical period indicated by the statistical period identifier; if so, it is determined that the currently traversed playback status data has not passed the validity check; if not, it is determined that the currently traversed playback status data has passed the validity check.

[0218] In one possible implementation, the attribute information further includes: a playback frame rate and an average download bit rate of the multimedia data stream within a statistical period indicated by the statistical period identifier; when the processor 610 detects the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier, it calls the program instructions stored in the memory 640 and performs the following operations:

[0219] If the playback frame rate and the average download bit rate in the attribute information meet the preset conditions, it is determined that the playback state of the multimedia playback device is a background playback state within the statistical period indicated by the statistical period identifier;

[0220] If the preset condition is not met, determining that the multimedia playback device is in a foreground playback state within the statistical period indicated by the statistical period identifier;

[0221] The preset conditions include: the playback frame rate in the attribute information is an invalid frame rate, and the average download bit rate is greater than a preset bit rate threshold.

[0222] In a possible implementation, when the processor 610 detects the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier, it calls the program instructions stored in the memory 640 and performs the following operations:

[0223] Detect the background status flag in the currently traversed playback status data;

[0224] If the background state flag is detected, it is determined that the multimedia playback device is in a background playback state within the statistical period indicated by the statistical period identifier;

[0225] If the background state flag is not detected, it is determined that the multimedia playback device is in a foreground playback state within the statistical period indicated by the statistical period identifier.

[0226] In a possible implementation, the playback state data of any statistical period includes playback state parameters under K state dimensions, any statistical period is a target statistical period or a reference statistical period, and K is a positive integer;

[0227] When determining the target playback smoothness of the multimedia data stream within the target statistical period based on the M valid playback status data, the processor 610 calls the program instructions stored in the memory 640 to perform the following operations:

[0228] Determine the fluency factor under each state dimension according to the playback state parameters under each state dimension in the M valid playback state data;

[0229] Based on the fluency factors under each state dimension, a target playback fluency of the multimedia data stream within a target statistical period is determined.

[0230] In a possible implementation, the K state dimensions include a frame rate dimension, and the playback state data of any statistical period includes the playback frame rate under the frame rate dimension;

[0231] The smoothness factor in the frame rate dimension is determined as follows:

[0232] Obtaining a reference playback frame rate, and determining the frame rate fluctuation of the statistical period corresponding to each valid playback state data based on the reference playback frame rate and the playback frame rate in each valid playback state data;

[0233] The determined frame rate fluctuations are averaged to obtain a reference frame rate fluctuation. The smoothness factor under the frame rate dimension is determined based on the reference frame rate fluctuation and a preset frame rate fluctuation threshold.

[0234] In a possible implementation, the K status dimensions include a freeze dimension, and the playback status data of any statistical period includes the number of freezes in the freeze dimension;

[0235] The smoothness factor under the jamming dimension is determined as follows:

[0236] Performing an average operation on the number of freezes in M ​​valid playback status data to obtain a reference number of freezes;

[0237] If the reference number of freezes is greater than the freeze threshold, the smoothness factor under the freeze dimension is determined to be a first value;

[0238] If the reference number of freezes is less than or equal to the freeze threshold, the smoothness factor under the freeze dimension is determined to be a second value.

[0239] In a possible implementation, the multimedia data stream is an audio and video data stream, the K state dimensions include an audio and video synchronization dimension, and the playback state data of any statistical period includes a target audio and video synchronization difference in the audio and video synchronization dimension;

[0240] The target audio and video synchronization time difference is calculated based on the average of the audio and video synchronization time differences of each data frame played within any statistical period of the multimedia data stream. Each data frame includes an audio frame and a corresponding video frame. The audio and video synchronization time difference of any data frame refers to the difference between the actual playback time of the audio frame and the actual playback time of the corresponding video frame in any data frame.

[0241] The smoothness factor under the audio and video synchronization dimension is determined as follows:

[0242] Arrange the M statistical periods corresponding to the M valid playback data in order, with one valid playback data corresponding to one statistical period;

[0243] Based on the arrangement position of each statistical period in the M statistical periods and the target audio and video synchronization time difference in the M valid playback status data, M-1 audio and video synchronization fluctuations are calculated; one audio and video synchronization fluctuation is determined based on the target audio and video synchronization time difference in two adjacent valid playback status data. Two adjacent valid playback status data means that the arrangement positions of the statistical periods corresponding to the two valid playback status data are adjacent;

[0244] The mean of M-1 audio and video synchronization fluctuations is calculated to obtain a reference audio and video synchronization fluctuation; and the smoothness factor under the audio and video synchronization dimension is calculated based on the reference audio and video synchronization fluctuation, the first limit threshold, and the second limit threshold.

[0245] In one possible implementation, when determining the target playback smoothness of the multimedia data stream within the target statistical period based on the smoothness factors under each state dimension, the processor 610 calls the program instructions stored in the memory 640 to perform the following operations:

[0246] Get the weight of each state dimension;

[0247] The weight of each state dimension is used to perform weighted summation on the fluency factors under each state dimension to obtain the target playback fluency of the multimedia data within the target statistical period.

[0248] In one possible implementation, the processor 610 determines the playback bit rate of the multimedia data stream based on the target playback smoothness. When the determined playback bit rate is obtained, the processor 610 calls the program instructions stored in the memory 640 to perform the following operations:

[0249] The bit rate level of the current playback bit rate of the multimedia data is used as the current bit rate level, and a level adjustment strategy corresponding to the target playback smoothness is obtained;

[0250] Adjust the current bit rate level according to the level adjustment strategy to obtain the adjusted bit rate level;

[0251] The playback bit rate corresponding to the adjusted bit rate level is determined as the playback bit rate after the decision.

[0252] In one possible implementation, if the target playback smoothness is greater than or equal to the first smoothness threshold, the profile adjustment strategy is used to indicate: adjusting the current bitrate profile in an upward adjustment direction so that the adjusted bitrate profile is higher than the current bitrate profile;

[0253] If the target playback smoothness and the smoothness corresponding to P consecutive statistical periods before the target statistical period are both less than or equal to the second smoothness threshold, the level adjustment strategy is used to indicate: adjust the current bit rate level in the downward adjustment direction so that the adjusted bit rate level is lower than the current bit rate level; where P∈[1, N].

[0254] In one possible implementation, the processor 610 determines the playback bit rate of the multimedia data stream based on the target playback smoothness. When the determined playback bit rate is obtained, the processor 610 calls the program instructions stored in the memory 640 to perform the following operations:

[0255] Get the mapping table between fluency and playback bitrate;

[0256] The mapping table is used to find the playback bit rate that has a mapping relationship with the target playback smoothness, and the playback bit rate is used as the playback bit rate after the decision.

[0257] It should be understood that the computer device described in the embodiments of the present application can execute the above Figure 3 and Figure 4 The description of the multimedia playing method in the corresponding embodiment can also be performed as described above. Figure 5 The description of the multimedia playback device 500 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.

[0258] In addition, it should be noted that the embodiment of the present application further provides a computer storage medium, and the computer storage medium stores a computer program executed by the multimedia playback device 500 mentioned above, and the computer program includes program instructions. When the processor executes the above program instructions, it can execute the above Figure 3 and Figure 4 The method in the corresponding embodiment will therefore not be described in detail here. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computer device, or executed on multiple computer devices located at one location, or executed on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.

[0259] 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 computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device can perform the above-mentioned Figure 3 and Figure 4 The method in the corresponding embodiment will therefore not be described in detail here.

[0260] In an embodiment of the present application, after obtaining the target playback status data of the multimedia data stream in the target statistical period (i.e., the current statistical period), the target playback fluency of the multimedia data stream in the target statistical period can be determined by combining the target playback status data and N reference playback status data of the multimedia data stream in N reference statistical periods; in this way, not only the accuracy of the target playback fluency can be effectively improved, but also the target playback fluency can reflect the current playback state of the multimedia data stream to a certain extent. Thus, when the playback bit rate of the multimedia data stream is decided according to the target playback fluency, the accuracy of the playback bit rate after the decision is obtained is high and can be adapted to the current playback state to a certain extent. Then, the playback bit rate of the multimedia data stream can be switched from the current playback bit rate to the playback bit rate after the decision, and the multimedia data stream can be played based on the playback bit rate after the decision; it can be seen that the embodiment of the present application can realize adaptive bit rate switching of the multimedia data stream, and play multimedia data by playing multimedia data at a more accurate playback bit rate after the decision, which can effectively improve the playback fluency and playback quality of the multimedia data stream.

[0261] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0262] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A multimedia playback method, characterized in that: include: After obtaining the target playback state data of the multimedia data stream within the target statistical period, obtaining N reference playback state data of the multimedia data stream within N reference statistical periods, where N is a positive integer; A reference statistical period corresponds to a reference playback status data, and the reference statistical period refers to a statistical period earlier than the target statistical period; Determining a target playback smoothness of the multimedia data stream within the target statistical period using the target playback state data and the N reference playback state data; Determining a playback bit rate of the multimedia data stream according to the target playback smoothness to obtain a determined playback bit rate; Switching the current playback bit rate of the multimedia data to the determined playback bit rate, and playing the multimedia data stream based on the determined playback bit rate, where the current playback bit rate refers to the most recently used playback bit rate during playback of the multimedia data stream; The step of using the target playback state data and the N reference playback state data to determine the target playback smoothness of the multimedia data stream within the target statistical period includes: Traversing the target playback state data and the N reference playback state data; Acquire attribute information of the currently traversed playback state data, and perform validity verification on the currently traversed playback state data according to the attribute information; wherein the attribute information includes a statistical period identifier corresponding to the currently traversed playback state data; If the validity check is passed, the currently traversed play status data is determined as valid play status data; After the target playback state data and the N reference playback state data are traversed to obtain M valid playback state data, determining a target playback smoothness of the multimedia data stream within the target statistical period based on the M valid playback state data, where M is a positive integer; The performing validity check on the currently traversed playback status data according to the attribute information includes: If the statistical period indicated by the statistical period identifier is the initial statistical period, determining that the currently traversed playback status data has failed the validity check; if the statistical period indicated by the statistical period identifier in the attribute information is not the initial statistical period, determining that the currently traversed playback status data has passed the validity check; wherein the initial statistical period refers to the statistical period in which the multimedia data stream is played for the first time; Alternatively, detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier; if the playback state is a background playback state, determining that the currently traversed playback state data fails the validity check; if the playback state is a foreground playback state, determining that the currently traversed playback state data passes the validity check; wherein the multimedia playback device refers to a device that plays the multimedia data stream; Alternatively, it is detected whether there is a bit rate switching operation within the statistical period indicated by the statistical period identifier; if so, it is determined that the currently traversed playback status data fails the validity check; if not, it is determined that the currently traversed playback status data passes the validity check.

2. The method according to claim 1, wherein The attribute information further includes: the playback frame rate and average download bit rate of the multimedia data stream within the statistical period indicated by the statistical period identifier; and the detection of the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier includes: If the playback frame rate and the average download bit rate in the attribute information meet a preset condition, determining that the multimedia playback device is in a background playback state within the statistical period indicated by the statistical period identifier; If the preset condition is not met, determining that the multimedia playback device is in a foreground playback state within the statistical period indicated by the statistical period identifier; The preset conditions include: the playback frame rate in the attribute information is an invalid frame rate, and the average download bit rate is greater than a preset bit rate threshold.

3. The method according to claim 1, wherein The detecting of the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier includes: Detecting a background status flag in the currently traversed playback status data; If the background state flag is detected, determining that the multimedia playback device is in a background playback state within the statistical period indicated by the statistical period identifier; If the background state flag is not detected, it is determined that the playback state of the multimedia playback device is the foreground playback state within the statistical period indicated by the statistical period flag.

4. The method according to claim 1, wherein The playback state data of any statistical period includes playback state parameters under K state dimensions, wherein any statistical period is the target statistical period or the reference statistical period, and K is a positive integer; Determining a target playback smoothness of the multimedia data stream within the target statistical period based on the M valid playback status data includes: Determining a fluency factor under each state dimension according to the playback state parameters under each state dimension in the M valid playback state data; Based on the fluency factors under the various state dimensions, a target playback fluency of the multimedia data stream within the target statistical period is determined.

5. The method according to claim 4, wherein The K state dimensions include a frame rate dimension, and the playback state data of any statistical period includes the playback frame rate under the frame rate dimension; The smoothness factor under the frame rate dimension is determined as follows: Obtaining a reference playback frame rate, and determining the frame rate fluctuation of the statistical period corresponding to each valid playback state data according to the reference playback frame rate and the playback frame rate in each valid playback state data; The determined frame rate fluctuations are averaged to obtain a reference frame rate fluctuation; and a smoothness factor under the frame rate dimension is determined based on the reference frame rate fluctuation and a preset frame rate fluctuation threshold.

6. The method according to claim 4, wherein The K status dimensions include a freeze dimension, and the playback status data of any statistical period includes the number of freezes under the freeze dimension; The smoothness factor under the jamming dimension is determined as follows: Performing a mean operation on the number of freezes in the M valid playback status data to obtain a reference number of freezes; If the reference number of freezes is greater than the freeze threshold, the smoothness factor under the freeze dimension is determined to be a first value; If the reference number of freezes is less than or equal to the freeze threshold, the smoothness factor under the freeze dimension is determined to be a second value.

7. The method according to claim 4, wherein The multimedia data stream is an audio and video data stream, the K state dimensions include an audio and video synchronization dimension, and the playback state data of any statistical period includes a target audio and video synchronization time difference under the audio and video synchronization dimension; The target audio and video synchronization time difference is calculated based on the average of the audio and video synchronization time differences of each data frame played in the multimedia data stream within any statistical period; any data frame includes an audio frame and a corresponding video frame, and the audio and video synchronization time difference of any data frame refers to: the difference between the actual playback time of the audio frame in the any data frame and the actual playback time of the corresponding video frame; The smoothness factor under the audio and video synchronization dimension is determined as follows: Arrange the M statistical periods corresponding to the M valid playback status data in order, with one valid playback status data corresponding to one statistical period; M-1 audio-video synchronization fluctuations are calculated based on the arrangement position of each statistical period in the M statistical periods and the target audio-video synchronization time difference in the M valid playback status data. One audio-video synchronization fluctuation is determined based on the target audio-video synchronization time difference in two adjacent valid playback status data. Two adjacent valid playback status data refer to: the arrangement positions of the statistical periods corresponding to the two valid playback status data are adjacent. The mean of the M-1 audio and video synchronization fluctuations is calculated to obtain a reference audio and video synchronization fluctuation; and the smoothness factor under the audio and video synchronization dimension is calculated based on the reference audio and video synchronization fluctuation, the first limit threshold and the second limit threshold.

8. The method according to claim 4, wherein The determining, based on the fluency factors under the various state dimensions, a target playback fluency of the multimedia data stream within the target statistical period, includes: Obtaining the weight of each state dimension; The weights of the various state dimensions are used to perform weighted summation on the fluency factors under the various state dimensions to obtain the target playback fluency of the multimedia data within the target statistical period.

9. The method according to claim 1, wherein The step of determining the playback bit rate of the multimedia data stream according to the target playback fluency to obtain the determined playback bit rate includes: The bit rate level of the current playback bit rate of the multimedia data is used as the current bit rate level, and a level adjustment strategy corresponding to the target playback smoothness is obtained; Adjusting the current bit rate level according to the level adjustment strategy to obtain an adjusted bit rate level; The playback bit rate corresponding to the adjusted bit rate level is determined as the playback bit rate after the decision.

10. The method according to claim 9, wherein If the target playback smoothness is greater than or equal to the first smoothness threshold, the level adjustment strategy is used to indicate: adjusting the current bit rate level in an upward adjustment direction so that the adjusted bit rate level is higher than the current bit rate level; If the target playback smoothness and the smoothness corresponding to P consecutive statistical periods before the target statistical period are both less than or equal to the second smoothness threshold, the level adjustment strategy is used to indicate: adjusting the current bit rate level in a downward adjustment direction so that the adjusted bit rate level is lower than the current bit rate level; wherein P∈[1, N].

11. The method according to claim 1, wherein The step of determining the playback bit rate of the multimedia data stream according to the target playback smoothness to obtain the determined playback bit rate includes: Get the mapping table between fluency and playback bitrate; The mapping relationship table is searched for a playback bit rate that has a mapping relationship with the target playback smoothness, and the playback bit rate is used as the playback bit rate after the decision.

12. A multimedia playback device, characterized in that: The device comprises: an acquiring unit, configured to, after acquiring target playback status data of the multimedia data stream within a target statistical period, acquire N reference playback status data of the multimedia data stream within N reference statistical periods, where N is a positive integer; one reference statistical period corresponds to one reference playback status data, and the reference statistical period refers to a statistical period earlier than the target statistical period; a processing unit, configured to determine a target playback smoothness of the multimedia data stream within the target statistical period using the target playback state data and the N reference playback state data; The processing unit is further configured to determine a playback bit rate of the multimedia data stream based on the target playback smoothness, and obtain a determined playback bit rate; a switching unit, configured to switch a current playback bit rate of the multimedia data to the determined playback bit rate, and play the multimedia data stream based on the determined playback bit rate, wherein the current playback bit rate refers to the most recently adopted playback bit rate during playback of the multimedia data stream; The processing unit is specifically configured to: Traversing the target playback state data and the N reference playback state data; Acquire attribute information of the currently traversed playback state data, and perform validity verification on the currently traversed playback state data according to the attribute information; wherein the attribute information includes a statistical period identifier corresponding to the currently traversed playback state data; If the validity check is passed, the currently traversed play status data is determined as valid play status data; After the target playback state data and the N reference playback state data are traversed to obtain M valid playback state data, determining a target playback smoothness of the multimedia data stream within the target statistical period based on the M valid playback state data, where M is a positive integer; The processing unit is specifically configured to: If the statistical period indicated by the statistical period identifier is the initial statistical period, determining that the currently traversed playback status data has failed the validity check; if the statistical period indicated by the statistical period identifier in the attribute information is not the initial statistical period, determining that the currently traversed playback status data has passed the validity check; wherein the initial statistical period refers to the statistical period in which the multimedia data stream is played for the first time; Alternatively, detecting the playback state of the multimedia playback device within the statistical period indicated by the statistical period identifier; if the playback state is a background playback state, determining that the currently traversed playback state data fails the validity check; if the playback state is a foreground playback state, determining that the currently traversed playback state data passes the validity check; wherein the multimedia playback device refers to a device that plays the multimedia data stream; Alternatively, it is detected whether there is a bit rate switching operation within the statistical period indicated by the statistical period identifier; if so, it is determined that the currently traversed playback status data fails the validity check; if not, it is determined that the currently traversed playback status data passes the validity check.

13. A computer device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the multimedia playback method according to any one of claims 1 to 11 is implemented.

14. A computer storage medium, characterized in that The computer storage medium stores program instructions, which, when executed, are used to implement the multimedia playback method according to any one of claims 1 to 11.

15. A computer program product, characterized in that The computer program product includes a computer program or computer instructions, and when the computer program or computer instructions are executed by a processor, the multimedia playback method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Code rate control method and device of multimedia file, medium and equipment

    CN112866756A