Streaming media playback method and apparatus, electronic device, medium, and program product

By preloading smaller amounts of streaming media content and playing it in the background, the problem of stuttering and wasted bandwidth caused by the increase in video file size in streaming media players is solved, achieving a low-data-volume playback effect.

WO2026005703A1PCT designated stage Publication Date: 2026-01-02LEMON INC(GB)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/SG2025/050097
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-25
Filing Date
2025-02-12
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing streaming media players experience stuttering, device overheating, and wasted data when playing videos in the background due to the increased size of the video files and the need for real-time decoding and downloading.

Method used

By preloading smaller amounts of target video or audio data and playing them in the background, and selecting the target audio or video for background playback based on playback data, data consumption is reduced.

Benefits of technology

It reduces the risk of buffering and device overheating during background playback, saves data traffic, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SG2025050097_02012026_PF_FP_ABST
    Figure SG2025050097_02012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a streaming media playback method and apparatus, an electronic device, a medium, and a program product. The method comprises: receiving a switching request for a currently playing streaming media; in response to the switching request being a switching-to-background request, determining the currently playing streaming media as a target video, and acquiring playback data of the target video; and on the basis of the playback data of the target video, selecting target audio corresponding to the target video or the target video for background playback.
Need to check novelty before this filing date? Find Prior Art

Description

[0001]CROSS-REFERENCE TO RELATED APPLICATIONS The present application claims priority to a Chinese patent application with the application number 202410830880.9, the title of “Streaming media playing method, device, electronic equipment, medium and program product”, which was filed on June 25, 2024, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD The present application relates to the technical field of data playing processing, and in particular relates to a streaming media playing method, device, electronic equipment, medium and program product. BACKGROUND The existing technology, with the development of multimedia technology, more and more streaming media content is played through some terminal devices for users to enjoy. The present application aims to provide a streaming media playing method, device, electronic equipment, medium and program product. Based on the above purpose, the first aspect of the present application provides a streaming media playing method, comprising: receiving a switching request for a currently played streaming media; in response to the switching request being a switching background request, determining that the currently played streaming media is a target video, obtaining playing data of the target video; and selecting a target audio corresponding to the target video or performing background playing of the target video according to the playing data of the target video. Based on the same concept, the second aspect of the present application provides a streaming media playing device, comprising: a request receiving module configured to receive a switching request for a currently played streaming media; a playing data obtaining module configured to, in response to the switching request being a switching background request, determine that the currently played streaming media is a target video, and obtain playing data of the target video; and a background playing module configured to select a target audio corresponding to the target video or perform background playing of the target video according to the playing data of the target video. Based on the same concept, the third aspect of the present application provides an electronic equipment, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the method of the first aspect when executing the program. Based on the same concept, the fourth aspect of the present application provides a non-transitory computer readable storage medium, the non-transitory computer readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the method of the first aspect. Based on the same concept, the fifth aspect of the present application provides a computer program product, comprising computer program instructions, wherein when the computer program instructions run on a computer, the computer executes the method of the first aspect.BRIEF DESCRIPTION OF DRAWINGS In order to more clearly illustrate the technical solutions in the application or related art, the drawings needed to be used in the following embodiments or related art description will be briefly introduced. Obviously, the drawings in the following description are only examples of the application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings. FIG. 1 is a schematic diagram of an application scenario of an embodiment of the application; FIG. 2A is a flowchart of a streaming media playing method according to an embodiment of the application; FIG. 2B is a schematic diagram of data flow of each virtual machine of a playing program according to an embodiment of the application; FIG. 3 is a structural block diagram of a streaming media playing device according to an embodiment of the application; and FIG. 4 is a structural schematic diagram of an electronic device according to an embodiment of the application. DETAILED DESCRIPTION It should be understood that the data (including but not limited to the data itself, acquisition or use of the data) involved in the technical solutions of the present application should comply with the requirements of the relevant laws, regulations and provisions. The principles and spirits of the application will be described below with reference to a number of exemplary embodiments. It should be understood that these embodiments are presented only to enable those skilled in the art to better understand and implement the application, and do not limit the scope of the application in any way. On the contrary, these embodiments are provided to make the application more thorough and complete, and to fully convey the scope of the application to those skilled in the art. It should be understood that before using the technical solutions of each embodiment in the present disclosure, the user will be informed of the type, scope of use, use scenario, etc. of the personal information involved in a proper manner, and the authorization of the user will be obtained. For example, in response to receiving the active request of the user, the user is sent prompt information to explicitly prompt the user that the operation requested to be performed will require the acquisition and use of the personal information of the user. Thus, the user can voluntarily choose whether to provide personal information to the electronic device, application program, server or storage medium, etc. software or hardware that performs the operation of the technical solutions of the present disclosure according to the prompt information. As an optional but non-limiting implementation manner, in response to accepting the active request of the user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information may, for example, be presented in the form of text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device. It should be understood that the above notification and user authorization process is only illustrative, and does not limit the implementation manner of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation manner of the present disclosure. In this document, it should be understood that the number of any elements in the drawings is used for illustration only and not limitation, and any naming is only used for distinction and does not have any limiting meaning.Some current streaming players will cache the entire content of the streaming media regardless of the current playback state, which will cause a large amount of data overhead and is prone to slow loading or stuttering. With the continuous development and gradual acceleration of the network environment, the current mobile music player or music APP will not only provide users with traditional audio content consumption, but also expand the derivative content of music, such as MV, music creation video, music derivative works, to further enrich the consumption experience and enable users to experience the complete music ecosystem, greatly improving the audio-visual experience. However, with the enrichment of content genres, especially video content, the mobile streaming player needs more data to support these capabilities. The network environment of mobile devices changes frequently, and often causes slow content loading, stuttering, and other problems due to data connection quality issues. At the same time, more abundant audio-visual content will cause a large amount of data overhead, resulting in serious waste of traffic and unnecessary performance overhead, and also leading to the gradual increase of user mobile traffic costs and the increasing anxiety about traffic. With the development of music library and AI capabilities, more music features can be presented to users in video derivative content, such as climax (chorus) nodes, drum points, live points, and barrage burst points. Users usually move the playback timeline because of these features and pay more attention to the characteristic parts associated with the song. The audio-visual data of music video content can be separated, and the music part can be separated from the music video content to form an audio storage. Technical problem: In order to alleviate the impact of various uncertain factors on mobile devices described above and improve user experience, some music applications pre-load the data of the content in the front part of the audio-visual content to be played, or use a larger range of pre-loading. However, when using a music streaming APP, music is a process of hearing, and the use of vision is relatively rare, so most of the time is in the background, but it will return to the foreground according to actual needs. When a music streaming player is playing in the background, the file size of the music video will increase exponentially compared to traditional audio. When playing a video in the background, the player not only needs to process decoding in real time, but also needs to download the file data of the corresponding timeline range in time. In the case of unstable network connection, users often experience stuttering, device overheating, and other poor experiences due to insufficient data or insufficient device performance, and a large amount of traffic is wasted. Based on the above description, the principles and spirits of the present application will be explained in detail with reference to several representative embodiments of the present application. Referring to FIG. 1, it is an application scenario diagram of the streaming playback method provided by the embodiments of the present application.The application scenario includes a terminal device 101, a server 102, and a data storage system 103. Among them, the terminal device 101, the server 102, and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA), or other electronic devices capable of realizing the above functions, etc. The server 102 and the data storage system 103 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network architecture), and big data and artificial intelligence platforms, etc. Basic cloud computing services. The terminal device 101 is installed with an application program for playing streaming media (streaming media includes: audio and / or image and / or text formed data stream). After receiving a background switching request, and the currently played streaming media is a target video, the application program can select a content with smaller data volume from the target video or the corresponding target audio according to the current playing data of the target video, preload the corresponding playing content from the server 102, and play in the background based on the preloaded playing content. The data storage system W3 provides data storage support for the operation of the server 102, for example, for storing various streaming media data for preloading of the terminal device 101. The following describes the playing method of the streaming media according to the exemplary embodiments of the present application in combination with the application scenario of FIG. 1. It should be noted that the above application scenario is only shown for the purpose of facilitating understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. On the contrary, the embodiments of the present application can be applied to any applicable scenario. FIG. 2A shows a flowchart of the playing method of the streaming media according to the embodiments of the present application. The playing method of the streaming media provided by the embodiments of the present application is shown in FIG. 2A, which is applied to a terminal device and installs a playing program for playing streaming media in the terminal device. As shown in FIG. 2A, the method includes: step 201, receiving a switching request for the currently played streaming media. In specific implementation, the switching request for the currently played streaming media can be issued through voice, body action, touch gesture, or touch key, etc. In this way, the playing program on the terminal device can receive the switching request.The corresponding switching request can be a switching background request, a switching foreground request, or a switching content request. The streaming media of the embodiments of the present application mainly targets audio or video, wherein the audio part of the stripped soundtrack corresponding to each video is pre-stored in the server. In step 202, in response to the switching request being a switching background request, it is determined that the currently played streaming media is a target video, and the playing data of the target video is obtained. In specific implementation, the manner of determining that the switching request is a switching background request includes: determining that the received gesture is at least one of a switching background gesture, a switching background voice, a switching background key request, and a switching background action. If the playing program needs to be switched to the background for playing, and the currently played is the target video, the playing data of the target video can be obtained. The playing data specifically includes at least one of the total duration of the target video, the current playing time point, the duration capable of continuing playing after loading, and the remaining amount of the target video still needing to continue loading. In step 203, according to the playing data of the target video, the target audio corresponding to the target video or the target video is selected for background playing. In specific implementation, the data amount is analyzed according to the playing data of the target video. If the data amount required for loading the target audio corresponding to the target video is small, the target audio corresponding to the target video is selected for background playing; if the data amount required for continuing to play the target video is small, the target video is selected for background playing. Through the above scheme, when the switching background request is received, and the currently played streaming media is the target video, according to the current playing data of the target video, one content with a smaller data amount is selected from the target video or the corresponding target audio for background playing, so that waste of data traffic is avoided, and the risk of slow loading and playing lag is also reduced. In some embodiments, step 203 includes: in step 2031, it is determined that the playing data is the remaining amount of the target video still needing to be loaded. In step 2032, in response to the remaining amount being greater than the amount to be loaded of the target audio corresponding to the target video, the target audio is loaded and then played in the background. Alternatively, in step 2033, in response to the remaining amount being less than or equal to the amount to be loaded of the target audio corresponding to the target video, the target video is continuously loaded and then played in the background. In specific implementation, as shown in FIG. 2B, the content decision maker, the data protector, and the pre-loading data decision maker are provided in the playing program. Thus, when the switching background request is received, the content decision maker determines the remaining amount of the target video still needing to be loaded through the data protector.The content decision maker can analyze the size of the remaining amount and the size of the amount of target audio corresponding to the target video to be loaded: if greater than the amount of traffic consumed by continuing to load the target video, the content decision maker decides to select the target audio for background playing, at this time, since the current playing is the target video, the content decision maker will send a content switching signal to the preloading data decision maker; in this way, after the preloading data decision maker receives the content switching signal, it starts to load the characteristic data content (for example, the characteristic data lookup table LUT, Look-Up-Table) of the target audio from the service. ,The loaded target audio content is rendered and played. If the traffic consumed by the target video is less than or equal to the proof, the content decision maker selects the target video to continue background playing, and the target video loaded by the preloading data decision maker is continuously used to continue playing in the background. Through the above scheme, the data consumption of the content played in the background can be further ensured to be relatively low, so that the low data loading operation can be maintained during the background playing, thereby effectively reducing the situation of lag and device heating. In some embodiments, step 2032 includes: step 20321, determining the amount to be loaded of the target audio by taking the current playing time of the target video as the starting time of the target audio. In specific implementation, the content decision maker uses the data protector to call the amount to be loaded of the target audio from the current playing time of the target video to the end of playing. Then the content decision maker compares the remaining amount with the amount to be loaded. Step 20322, in response to the remaining amount being greater than the amount to be loaded, loading the target audio. In specific implementation, if the content decision maker determines that the remaining amount is greater than the amount to be loaded, it proves that the traffic consumed by the target video is large, and content switching is needed, so the target video is switched to the target audio, and a content switching signal is sent to the preloading data decision maker. The preloading data decision maker stops buffering the target video according to the content switching signal, and loads the target audio from the current playing time. Step 20323, switching to the target audio after the current buffered data of the target video is played in the background, and controlling the target audio to start background playing at the time point when the current buffered data of the target video is played. In specific implementation, the preloading data decision maker pre-buffers the target video, in order to avoid data waste, the current buffered data of the target video is rendered and played in the background first, then the time point when the current buffered data is played is determined, and the loaded target audio is controlled to start rendering and playing in the background from the time point when the current buffered data is played. Through the above scheme, the waste of buffered data can be avoided, and the loaded target audio can be controlled to start rendering and playing in the background from the time point when the current buffered data is played, further improving the continuation effect of background playing. In some embodiments, after the target audio or the target video is played in the background, the method further includes: step 104, obtaining the next audio corresponding to the next stream media to be played, loading and playing the next audio in the background.In specific implementation, generally, the preloading player has not preloaded the next stream media to be played. After the target video or target audio playing in the background is completed at the beginning, if the next stream media to be played in the background is the next audio, the preloading player directly loads and renders the next audio from the server and plays in the background. If the next stream media to be played in the background is the next video, the preloading player loads the next audio corresponding to the stripped audio track of the next video from the server and renders and plays in the background. In addition, if the preloading player has loaded at least part of the next video to be played, the preloading player judges the size of the data amount of the remaining content to be loaded and the data amount of the next audio corresponding to the next video. If the size is greater, the preloading player directly loads and renders the next audio and plays in the background. If the size is smaller, the preloading player loads and renders the next video and plays in the background, and continues to load the audio corresponding to the next stream media to be played and plays in the background after the next video playing in the background is completed. Through the above scheme, the low data amount playing state can be ensured during the background playing process, and the data amount consumption during the background playing process is further reduced. In some embodiments, during the background playing process, the method further includes: step 105, generating a content switching signal in response to receiving a foreground switching request. Step 106, determining the target switching content to be switched according to the content switching signal, and switching to the target switching content to play in the foreground. In specific implementation, when the playing program receives the foreground switching request, the content switching signal is generated. Thus, the received content switching signal selects the target switching content to be switched to play in the foreground, and then the target switching content is rendered in the foreground of the playing program to play. For example, during the background playing process of the target audio corresponding to the target video, the foreground switching request is received, the content switching signal is generated, the target switching content is determined as the target video, the target video is loaded from the time point corresponding to receiving the foreground switching request, and the playing of the target audio is switched to the playing of the target video from the time point corresponding to receiving the foreground switching request, and the target video plays in the foreground from the time point corresponding to receiving the foreground switching request. Through the above scheme, the normal running of the foreground playing can be ensured during the low data amount running process in the background. In some embodiments, step 106 includes: step 1061, determining the target switching content corresponding to the content switching signal, obtaining the cache data of the target switching content, performing a decoding operation on the cache data of the target switching content, and generating a progress synchronization signal.In specific implementation, as shown in FIG. 2B, the player includes a content switcher, a progress synchronizer, and a preloaded data decision maker. After the player receives a foreground switching request, a content switching signal is generated and sent to the content switcher. Thus, the content switcher determines the corresponding target switching content according to the content switching signal, selects the cached data of the target switching content, and performs decoding and other pre-rendering operations on the cached data. Then, a progress synchronization signal is sent to the progress synchronizer (step 1062). The progress synchronization signal is used to determine a time point for resuming playback, and the cached data of the target switching content is played in the foreground starting from the time point for resuming playback (C). In specific implementation, after receiving the progress synchronization signal, the progress synchronizer determines the time point for resuming playback according to the time point at which the foreground switching request is received, and then controls the preloaded data decision maker to play the cached data of the target switching content in the foreground at the time point for resuming playback. For example, if the target switching content is video content, the audio content and the video content need to be played simultaneously in the background. The progress synchronizer monitors the playback progress of the audio content and the video content in real time, so that the audio content and the video content are at the same playback progress, and the audio-visual synchronization is ensured. Through the above scheme, the target switching content for resuming playback and the content played in the background can be smoothly connected, and the audio-visual experience of the user is improved. In some embodiments, the method further includes: step 107, in response to receiving the target action feature, performing behavior decision analysis on the target action feature based on historical action features to obtain a behavior decision result, and determining whether the content needs to be switched based on the behavior decision result. In specific implementation, as shown in FIG. 2B, the player includes a behavior decision maker, a content decision maker, and a preloaded data decision maker. The behavior decision maker pre-stores historical action features. After receiving a target action feature, the behavior decision maker performs behavior decision analysis on the target action feature and the historical action features, and determines the action behavior corresponding to the target action feature as a behavior decision result. If the behavior decision result is a switching track behavior (for example, a song switching behavior or a video switching behavior), it is determined that the content needs to be switched, otherwise the content does not need to be switched. Step 108, in response to determining that the content needs to be switched, determining target loading data corresponding to the target action feature based on historical action features, and switching to the target loading data for playing. In specific implementation, if it is determined that the content needs to be switched, the target loading data required by the target action feature is determined based on the historical action features, the target loading data is sent to the content decision maker, a content switching signal is sent to the preloaded data decision maker by using the content decision maker, and the preloaded data decision maker is used to switch the currently played streaming media to the target loading data for playing.For example, the behavior decision maker determines that the behavior decision result is a song switching action, determines that the target loading data corresponding to the song switching action is a target song, sends a content switching signal to the pre-loading data decision maker by using the content decision maker, and plays the target song after the pre-loading data decision maker loads the target song from the server. Alternatively, in step 109, in response to determining that content switching is not required, the continuation data is loaded according to the currently played streaming media, and the continuation data is played. In a specific implementation, the behavior decision maker determines that the target action feature is an action behavior that does not require content switching, so that the content decision maker does not need to send a content switching signal to the pre-loading data decision maker, and the pre-loading data decision maker continues to load the continuation data of the currently played streaming media from the server according to the currently played streaming media, and then the pre-loading data decision maker plays the continuation data according to the play time. Through the above scheme, the content switching process of the streaming media can be completed, and the target action feature can be determined to belong to a content switching behavior according to the received target action feature, so that the purpose of switching the play is achieved. In some embodiments, step 107 includes: in step 1071, inputting the target action feature into a behavior decision model determined based on historical action features for behavior decision analysis, and outputting a behavior decision result, wherein a behavior decision model capable of making a behavior action decision is obtained by training a neural network model with historical action features. In step 1072, in response to the behavior decision result being a content switching action, it is determined that content switching is required. Alternatively, in step 1073, in response to the behavior decision result being an action other than the content switching action, it is determined that content switching is not required. In a specific implementation, a neural network model is constructed in advance, and then the neural network model is learned and trained by using historical action features, so that the neural network model is more and more accurate in identifying the action behavior of the action feature, and a behavior decision model is obtained. The behavior decision model is placed in the behavior decision maker, the target action feature is input into the behavior decision model of the behavior decision maker, the behavior decision model performs behavior decision analysis and processing, and the behavior action corresponding to the target action feature is output as a behavior decision result. In this way, it can be determined whether the target action feature belongs to a content switching action (for example, a song switching action or a video switching action) according to the behavior decision result. Through the above scheme, the behavior decision model obtained based on the learning and training of the neural network model is more accurate in behavior decision analysis of the target action feature, ensures the accuracy of the behavior decision result, and better determines whether content switching is required.In some embodiments, the training process of the behavior decision model includes: Step a, labeling historical action features with corresponding historical behavior decision labels to obtain training samples, wherein the historical behavior decision labels represent the behavior action O corresponding to the historical action features; Step b, using the training samples to train a pre-built neural network model, determining a loss function based on the difference between the training results and the historical behavior decision labels, and adjusting the parameters of the neural network model according to the loss function; Step c, in response to the completion of all training samples or the loss function satisfying a predetermined convergence condition, using the final neural network model as the behavior decision model O. Specifically, the training samples are converted into matrix feature vectors for subsequent input into the neural network model. The neural network model includes: an input layer, multiple hidden layers, and an output layer. The input layer has an input port with the same number of columns as the matrix feature vector, so that the matrix feature vector of the training samples can be input from the input port of the input layer. Multiple hidden layers are divided into layers for various behavior and action analyses. Each hidden layer sends its behavior and action analysis results to the next hidden layer. The last hidden layer combines the results of various behavior and action analyses and outputs them to the output layer. The output layer determines the corresponding behavior and action based on the various behavior and action analysis results and outputs the corresponding behavior and action as the training result. Then, a loss function is calculated based on the difference between the training result and the corresponding historical behavior decision label. The loss value is calculated based on the loss function, and the connection parameters between the layers in the neural network model are adjusted according to the loss value. Then, the process of step b above is repeated using the next training sample to continue training the neural network model based on the adjusted model. The training continues until all training samples are completed or the loss function meets the predetermined convergence condition (e.g., the loss value is less than the predetermined convergence threshold). The neural network model training ends, and the final neural network model is used as the behavior decision model. Through the above scheme, audio and video content can be loaded more accurately, further improving the smoothness of playback, reducing the performance overhead of terminal devices, and reducing network traffic consumption. In summary, the solutions described in the embodiments above allow for playback with a lower data volume when switching to background playback. This avoids loading large amounts of streaming media data, effectively reducing the risk of buffering and device overheating, while also saving data traffic, avoiding data waste, and lowering data charges. It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task.In the case of such a distributed scenario, one of the plurality of devices can only perform some or a plurality of steps of the method according to the embodiments of the present application, and the plurality of devices can interact with each other to complete the method. It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than those described above and still achieve desirable results. Also, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous. Based on the same idea, corresponding to the playing method of the stream media of any of the above-mentioned embodiments, the present application also provides a playing device of stream media. Referring to FIG. 3, the device comprises: a request receiving module 31 configured to receive a switching request for the currently played stream media; a playing data obtaining module 32 configured to determine that the currently played stream media is a target video in response to the switching request for background playing, and obtain playing data of the target video; and a background playing module 33 configured to perform background playing of the target audio corresponding to the target video or the target video according to the playing data of the target video. In some embodiments, the background playing module 33 is specifically configured to: determine a remaining amount of the playing data that needs to be continuously loaded for the target video; in response to the remaining amount being greater than a to-be-loaded amount of the target audio corresponding to the target video, load the target audio and then perform background playing; or, in response to the remaining amount being less than or equal to the to-be-loaded amount of the target audio corresponding to the target video, continuously load the target video and perform background playing. In some embodiments, the background playing module 33 is further configured to: determine the to-be-loaded amount of the target audio with a current playing time of the target video as a starting time of the target audio; in response to the remaining amount being greater than the to-be-loaded amount, load the target audio; and switch to the target audio after background playing of the current cache data of the target video is completed, and control the target audio to start background playing at a time point at which the current cache data of the target video is played. In some embodiments, the device further comprises a continuous playing module configured to, after background playing of the target audio or the target video is completed, obtain a next audio corresponding to a next stream media that needs to be played, load the next audio and perform background playing.In some embodiments, the device further comprises a foreground playing module configured to: in the background playing process, in response to receiving a foreground switching request, generate a content switching signal; determine a target switching content that needs to be switched according to the content switching signal, and switch to the target switching content for foreground playing. In some embodiments, the foreground playing module is specifically configured to: determine the target switching content corresponding to the content switching signal, obtain cache data of the target switching content, perform decoding operation on the cache data of the target switching content, and generate a progress synchronization signal; determine a time point for resuming playing according to the progress synchronization signal, and start foreground playing of the cache data of the target switching content at the time point for resuming playing. In some embodiments, the device further comprises a behavior decision module configured to: in response to receiving a target action feature, perform behavior decision analysis on the target action feature according to historical action features to obtain a behavior decision result, determine whether content needs to be switched according to the behavior decision result; in response to determining that content needs to be switched, determine target loading data corresponding to the target action feature based on the historical action features, and switch to the target loading data for playing; or in response to determining that content does not need to be switched, determine resuming playing data based on currently played streaming media, and play the resuming playing data. In some embodiments, the behavior decision module is further configured to: input the target action feature into a behavior decision model determined based on the historical action features for behavior decision analysis, and output a behavior decision result, wherein the behavior decision model capable of performing behavior action decision is obtained by training a neural network model with historical action features; in response to the behavior decision result being a content switching action, determine that content needs to be switched; or in response to the behavior decision result being an action other than the content switching action, determine that content does not need to be switched. In some embodiments, the device further comprises: a model training module configured to: label historical behavior decision labels corresponding to historical action features to obtain training samples, wherein the historical behavior decision labels represent behavior actions corresponding to the historical action features; perform training processing on a pre-constructed neural network model using the training samples, determine a loss function according to a difference between a training processing result and the historical behavior decision labels, and adjust parameters of the neural network model according to the loss function; and in response to the training samples being completely trained or the loss function satisfying a predetermined convergence condition, use a final neural network model as a behavior decision model. For the convenience of description, the above device is described in various modules according to functions. Of course, in the implementation of the present application, the functions of the modules can be implemented in one or more software and / or hardware.The apparatuses in the above embodiments are used to implement the corresponding methods in any of the preceding embodiments, and have the beneficial effects of the corresponding method embodiments, which are not repeated here. Based on the same concept, corresponding to the methods of any of the above embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of the preceding embodiments when executing the program. FIG. 4 shows a more specific hardware structure of an electronic device according to the present embodiment, which can include a processor 410, a memory 420, an input / output interface 430, a communication interface 440, and a bus 450. The processor 410, the memory 420, the input / output interface 430, and the communication interface 440 are connected to each other through the bus 450 for internal communication within the device. The processor 410 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided by the present embodiment. The memory 420 can be implemented by a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 420 can store an operating system and other application programs, and when the technical solutions provided by the present embodiment are implemented by software or firmware, the related program codes are stored in the memory 420 and called and executed by the processor 410. The input / output interface 430 is used to connect input / output modules to realize information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc. The communication interface 440 is used to connect a communication module (not shown in the figure) to realize the communication interaction between the present device and other devices. The communication module can realize communication through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFL, Bluetooth, etc.).The bus 450 includes a path for transmitting information between the various components (e.g., the processor 410, the memory 420, the input / output interface 430, and the communication interface 440) of the device. It should be noted that although the device is shown to include the processor 410, the memory 420, the input / output interface 430, the communication interface 440, and the bus 450, the device can also include other components necessary to run in the actual implementation. In addition, those skilled in the art can understand that the device can also only include components necessary to implement the embodiments of the present application, and does not necessarily include all the components shown in the figure. The electronic device of the above embodiment is used to implement the corresponding method in any of the preceding embodiments, and has the beneficial effects of the corresponding method implementation, which will not be repeated here. Based on the same concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer readable storage medium, which stores computer instructions for causing the computer to execute the method as described in any of the above embodiments. The computer readable medium of the present embodiment includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EHPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information accessible by a computing device. The storage medium of the above embodiment stores computer instructions for causing the computer to execute the method as described in any of the above embodiments, and has the beneficial effects of the corresponding method implementation, which will not be repeated here. Based on the same concept, corresponding to the method of any of the above embodiments, the present application also provides a computer program product including computer program instructions, which, when executed on a computer, cause the computer to execute the method as described in any of the above embodiments, have the beneficial effects of the corresponding method implementation, which will not be repeated here.Those skilled in the art will appreciate that the foregoing discussion regarding any of the embodiments has merely been provided by way of example and is not intended to limit the scope of the application, including the claims, in any way. Rather, the embodiments or features of the embodiments discussed above or features thereof can be combined with each other, in any manner, steps can be performed in any order, and there are many other variations of the embodiments described above, which have not been discussed, but which would be understood by those skilled in the art upon reading the foregoing description. Furthermore, for simplicity of explanation, and in order not to obscure the embodiments of the application with unnecessary detail, known power / ground connections to integrated circuits (ICs) and other components can or can not be shown in the figures (depending on the level of detail required to describe the embodiments of the application). In addition, while the embodiments of the application can be shown in block diagrams, flow charts, and the like, it is understood that the embodiments of the application can be implemented in a variety of ways, and that the embodiments of the application can be implemented using computer program code (that is, instructions) stored on computer-readable media such as magnetic disks, memory, read only memories (ROMs), etc. If desired, the code can be stored for use by or in connection with any computer-related system or method. In this manner, the code can be used to implement any type of computer-implemented steps, flow charts, and the like.

Claims

Claims 1. A method for playing streaming media, including: Receive a switching request for the currently playing streaming media; In response to the switching request being a background switching request, the currently playing streaming media is determined to be the target video, and the playback data of the target video is obtained; Based on the playback data of the target video, select the target audio or the target video corresponding to the target video for background playback.

2. The method according to claim 1, wherein selecting the target audio or the target video corresponding to the target video for background playback based on the playback data of the target video includes: The playback data is determined to be the remaining amount of the target video that needs to be loaded. In response to the remaining amount being greater than the amount of target audio to be loaded corresponding to the target video, the target audio is loaded and played in the background; Alternatively, in response to the remaining amount being less than or equal to the amount of target audio to be loaded corresponding to the target video, the target video continues to be loaded for background playback.

3. The method according to claim 2, wherein in response to the remaining amount being greater than the amount of target audio to be loaded corresponding to the target video, loading the target audio and then playing it in the background includes: The current playback time of the target audio is taken as the start time of the target audio, and the amount of the target audio to be loaded is determined. In response to the remaining amount being greater than the amount to be loaded, the target audio is loaded; After the current cached data of the target video finishes playing in the background, the system switches to the target audio and controls the target audio to begin background playback at the point when the current cached data of the target video finishes playing.

4. The method according to any one of claims 1 to 3, wherein after the target audio or the target video has finished playing in the background, it further includes: Retrieve the next audio file corresponding to the next streaming media file to be played, load the next audio file, and play it in the background.

5. The method according to claim 1, wherein during background playback, it further includes: In response to receiving a request to switch to the foreground, a content switching signal is generated; the target content to be switched to is determined based on the content switching signal, and the foreground playback is switched to the target content.

6. The method according to claim 5, wherein the method determines the target content to be switched according to the content switching signal, and switches to the target content for foreground playback, comprising: Determine the target content to be switched corresponding to the content switching signal, obtain the cached data of the target content to be switched, perform a decoding operation on the cached data of the target content to be switched, and generate a progress synchronization signal; The resume playback time point is determined based on the progress synchronization signal, and the cached data of the target switching content is recorded during the resume playback. The foreground playback begins at the specified time.

7. The method according to claim 1, further comprising: In response to receiving a target action feature, a behavioral decision analysis is performed on the target action feature based on historical action features to obtain a behavioral decision result. Based on the behavioral decision result, it is determined whether content needs to be switched. In response to determining that content needs to be switched, target loading data corresponding to the target action feature is determined based on historical action features, and playback is switched to the target loading data. Alternatively, in response to determining that content does not need to be switched, resume playback data is loaded based on the currently playing streaming media, and the resume playback data is played.

8. The method according to claim 7, wherein the step of performing behavioral decision analysis on the target action features based on historical action features to obtain a behavioral decision result, and determining whether content needs to be switched based on the behavioral decision result, includes: The target action features are input into a behavior decision model determined based on historical action features for behavior decision analysis, and the behavior decision result is output. Specifically, a behavior decision model capable of making behavior decisions is obtained by training a neural network model with historical action features. In response to the behavior decision result being a content switching action, it is determined that content needs to be switched; or, in response to the behavior decision result being an action other than the content switching action, it is determined that content does not need to be switched.

9. The method according to claim 8, wherein the training process of the behavioral decision model includes: The historical action features are labeled with corresponding historical behavior decision labels to obtain training samples, wherein the historical behavior decision labels represent the behavior actions corresponding to the historical action features; The training samples are used to train a pre-built neural network model. A loss function is determined based on the difference between the training results and the historical behavior decision labels. The parameters of the neural network model are adjusted according to the loss function. In response to the completion of training of all training samples or the loss function meeting a predetermined convergence condition, the final neural network model is used as the behavior decision model.

10. A streaming media playback device, comprising: The request receiving module is configured to receive switching requests for the currently playing streaming media; The playback data acquisition module is configured to respond to the switching request as a background switching request, determine that the currently playing streaming media is the target video, and acquire the playback data of the target video; The background playback module is configured to select the target audio or the target video corresponding to the target video for background playback based on the playback data of the target video.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as claimed in any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to cause a computer to perform the method as described in any one of claims 1 to 9.

13. A computer program product comprising computer program instructions, wherein when the computer program instructions perform a calculation... When run on the machine, the computer performs the method as described in any one of claims 1 to 9. 16

Citation Information

Patent Citations

  • Streaming media-based audio and video playback method and device

    CN109845280A

  • Audio and video switching method and device, computer equipment and readable storage medium

    CN111510755A

  • Video playing method and device, electronic equipment and storage medium

    CN114697722A