Monitoring method, optimization method, electronic device, storage medium and program product
By monitoring the playback status of the media at the playback end, updating the actual playback time and determining the stuttering time, the problem of difficulty in accurately obtaining the media playback situation in the prior art is solved, and optimization support for media services is achieved.
Patent Information
- Application Number
- CN202411668266.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to accurately obtain media playback conditions, which leads to difficulties in optimizing media services.
By monitoring the playback status of the media on the playback end, including the stuttering status, playable status and on-the-playing status, the actual playback time and the stuttering time are updated, and the media playback status is obtained.
It realizes accurate acquisition of media playback situations, provides data support for media business optimization, and improves the quality and effectiveness of media business.
Smart Images

Figure CN119484905A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of computers and the like, and in particular to a playback monitoring method, a media optimization method, an electronic device, a readable storage medium, and a computer program product. Background Art
[0002] Video, audio and other media formats are common forms of content dissemination. In people's work and life, information can be disseminated by publishing videos or audio, or by watching videos and listening to audio. For example, you can learn about the surrounding environment of a certain location and the environment of a certain interior space by watching videos on a mobile phone APP.
[0003] In some cases, the publisher of the media wants to know how the media is played by the media audience so as to optimize the media business. Therefore, there is an urgent need for a technology that can accurately obtain the media playback situation. Summary of the invention
[0004] The present disclosure provides a playback monitoring method, a media optimization method, an electronic device, a readable storage medium, and a computer program product.
[0005] A first aspect of the present disclosure proposes a playback monitoring method, which is applied to a playback end, and the playback end is used to play media through a player. The method includes: monitoring the playback status of the media, the playback status including a stuck state, a playable state and a playing state; if the playback status of the media is a playing state, updating the actual playback time of the media until the playback status changes, and the actual playback time indicates the time duration of the playback state in the playing state; and if it is determined through the change of the playback status that the playback of the media is stuck, updating the actual playback time and determining the stuck time according to the change of the playback status.
[0006] According to some embodiments of the present disclosure, the playback status of the media is represented by status parameters, and different playback statuses correspond to different values of the status parameters. The playback status of the media is monitored, including: monitoring the status parameters of the media, and determining the playback status of the media through the monitored status parameters.
[0007] According to some embodiments of the present disclosure, determining that the playback of the media has been stuck by changing the playback state includes: in response to a stuck start condition being met, determining that the playback of the media has been stuck, the stuck start condition including: the playback state of the media changes from a non-stuck state to the stuck state.
[0008] According to some embodiments of the present disclosure, the actual playback duration is updated and the freeze duration is determined through changes in the playback status, including: determining a freeze start time when the playback status changes from a non-freezing status to the freeze state; in response to the playback status of the media changing from the freeze state to the playable status, determining a freeze end time, the freeze end time being the time when the playback status changes from the freeze state to the playable state; and determining the freeze duration based on the freeze start time and the freeze end time.
[0009] According to some embodiments of the present disclosure, the duration of the current freeze is determined based on the freeze start time and the freeze end time, including: if the difference between the freeze end time and the freeze start time is greater than the freeze duration threshold, then triggering an update of the number of freezes, and determining the difference between the freeze end time and the freeze start time as the duration of the current freeze.
[0010] According to some embodiments of the present disclosure, the jamming start condition also includes: the playing state of the media was in the playing state before changing to the jamming state.
[0011] According to some embodiments of the present disclosure, the actual playback duration is updated and the freeze duration is determined according to changes in the playback state, including: in response to the player switching from foreground operation to background operation when the playback state is the freeze state, determining a switching moment and triggering an update to the number of freezes, the switching moment being the moment when the player switches to background operation; and determining the freeze duration based on the difference between the switching moment and the freeze start moment, the freeze start moment being the moment when the playback state changes from a non-freeze state to the freeze state.
[0012] According to some embodiments of the present disclosure, the playback status also includes a playback completion status, and the method also includes: in response to any one of the freeze data reporting conditions being met, triggering the reporting of freeze data, the freeze data including the freeze duration, and the freeze data reporting conditions including one or more of the following: when the playback status changes from the freeze state to the playable state; when the player switches from foreground operation to background operation; the playback status changes to the playback completion status.
[0013] According to some embodiments of the present disclosure, updating the actual playback duration of the media includes: in response to the end of the callback cycle, determining the callback time difference between the end time of this callback cycle and the end time of the previous callback cycle; and updating the actual playback duration of the media by accumulating the callback time differences corresponding to different callback cycles.
[0014] According to some embodiments of the present disclosure, the callback period is less than 300 milliseconds.
[0015] According to some embodiments of the present disclosure, the actual playback duration is updated and the freeze duration is determined according to changes in the playback state, including: determining the freeze time difference between the start time of the freeze and the end time of the last callback cycle; and incorporating the freeze time difference into the actual playback duration of the media to update the actual playback duration.
[0016] According to some embodiments of the present disclosure, the playback state also includes a paused playback state, and the method further includes: in response to the playback state of the media changing from the playing state to the paused playback state, compensating the actual playback duration, and the compensated duration is less than or equal to the duration of the callback cycle.
[0017] According to some embodiments of the present disclosure, the method further includes: in response to the completion of the adjustment of the playback progress of the media, determining the adjustment duration of the playback progress of the media; and counting the adjustment duration into the actual playback duration.
[0018] According to some embodiments of the present disclosure, the playback state also includes a playback progress adjustment state, and when the playback state changes from the playback progress adjustment state to another state among the playback states, it is determined that the playback progress adjustment of the media is completed.
[0019] According to some embodiments of the present disclosure, determining the adjusted duration of the playback progress of the media includes: determining the adjusted playback progress after the playback progress of the media is adjusted; and determining the adjusted duration of the playback progress of the media based on the adjusted playback progress and the actual playback duration.
[0020] According to some embodiments of the present disclosure, the method further includes: in response to any one of the playback duration data reporting conditions being met, triggering the reporting of the playback duration data, the playback duration data including the actual playback duration, and the playback duration data reporting conditions including: the playback status changes to the playback completion status.
[0021] According to some embodiments of the present disclosure, the media is video or audio.
[0022] A second aspect of the present disclosure proposes a media optimization method, which is applied to a server, and the method includes: obtaining jamming data and playback duration data of the media, the jamming data and the playback duration data being obtained by the playback monitoring method described in any of the above-mentioned embodiments, the jamming data including the jamming duration, and the playback duration data including the actual playback duration; and optimizing the media based on the jamming data and the playback duration data, the optimization items including at least one of the media format and the buffer type.
[0023] A third aspect of the present disclosure proposes an electronic device, comprising: a memory, the memory storing execution instructions; and a processor, the processor executing the execution instructions stored in the memory, so that the processor executes the method described in any one of the above embodiments.
[0024] A fourth aspect of the present disclosure provides a readable storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the method described in any of the above embodiments.
[0025] A fifth aspect of the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it is used to implement the method described in any of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0027] Figure 1 A schematic diagram showing application scenarios of the playback monitoring method of some embodiments of the present disclosure is shown.
[0028] Figure 2 A schematic diagram of the overall process of the playback monitoring method M100 according to some embodiments of the present disclosure is shown.
[0029] Figure 3 A timing diagram showing changes in the playback status of media in some embodiments of the present disclosure.
[0030] Figure 4 The overall flow chart of the playback monitoring method M100 according to some other embodiments of the present disclosure is shown.
[0031] Figure 5 A schematic diagram of a process for determining a freeze duration in some embodiments of the present disclosure is shown.
[0032] Figure 6-Figure 8The overall flow chart of the playback monitoring method M100 according to some other embodiments of the present disclosure is shown.
[0033] Fig. 9 A timing diagram showing changes in the playback status of media in other embodiments of the present disclosure is shown.
[0034] Fig.10 The overall flow chart of the playback monitoring method M100 according to some other embodiments of the present disclosure is shown.
[0035] Fig.11 A timing diagram showing changes in the playback status of media in other embodiments of the present disclosure is shown.
[0036] Fig.12 The overall flow chart of the playback monitoring method M100 according to some other embodiments of the present disclosure is shown.
[0037] Fig.13 A schematic diagram of the overall process of the media optimization method M200 according to some embodiments of the present disclosure is shown.
[0038] Fig.14 1 is a schematic block diagram of the structure of an electronic device 1000 equipped with a playback monitoring device according to an embodiment of the present disclosure.
[0039] Fig.15 It is a schematic block diagram of the structure of an electronic device 2000 equipped with a media optimization device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0041] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0042] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.
[0043] The terms used herein are for the purpose of describing specific embodiments, rather than being restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or provided values that will be recognized by those of ordinary skill in the art.
[0044] After a video is released, the publisher may want to know the video playback status on the client, such as whether there is any freeze or other issues related to the video playback quality, as well as the actual playback time of the video on the client or other issues related to the video content quality. This allows the publisher to use these as feedback to adjust and optimize the video content, format, etc.
[0045] Taking real estate companies as an example, some companies will publish some online videos about houses on mobile apps or websites for target audiences such as buyers, renters, and owners to watch. For example, users who want to buy or rent a house can remotely learn about the house by watching the indoor inspection video of the house and the community environment video of the community where the house is located, so as to screen out the house that meets their needs; owners who have already purchased a house can remotely learn about the progress of the decoration and inspect the decoration by watching the house decoration video during the decoration process. These online videos can be pre-recorded and played in response to the user's trigger operation.
[0046] The video playback situation can reflect the quality and effect of the video playback service. Therefore, in the process of realizing the present invention, the inventors have found that the business side of the enterprise would like to know the video playback situation, and use the video playback situation to realize the recovery of the business indicators completed online by the business side of the enterprise. Among them, the business indicators include business indicators of video playback, such as freeze rate and completion rate. If these videos often freeze when watching, or users often exit watching before the video is finished, the business indicators can reflect these situations to a certain extent. The business side can understand these situations through the business indicators, which is convenient for the business side to adjust the configuration of the video playback service and to improve the video playback effect.
[0047] In order to enable the business party to obtain the playback status of the video, the present disclosure proposes a playback monitoring method.
[0048] Figure 1 The application scenario schematic diagram of the playback monitoring method of some embodiments of the present disclosure is shown. In this application scenario, a terminal device 10 and a server 20 may be included. The terminal device 10 can communicate with the server 20 to send and receive data or instructions. In the present disclosure, the terminal device 10 and the server 20 each include at least one processor and at least one memory.
[0049] Exemplarily, the terminal device 10 may be a terminal device held by a user, and the terminal device 10 may obtain data of the media to be played through the server 20 , thereby achieving loading and playing of the media to be played on the terminal device 10 .
[0050] exist Figure 1 The shapes and structures of the terminal device 10 and the server 20 shown in the figure should not be understood as limiting the scope of protection of the present disclosure. In the present disclosure, "terminal device" can be different types of electronic devices, for example, the terminal device can be a mobile phone, a tablet computer, a laptop computer or a desktop computer. In addition, the server 20 can be a server with a physical form or a cloud server, and the present disclosure does not limit the type of server.
[0051] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the implementation methods of the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are first introduced.
[0052] AVPlayer: A full-featured audio and video player that can play multiple formats and is suitable for a variety of electronic devices such as iPhone, iPod, and iPad.
[0053] Tracking: refers to implanting specific code or setting specific data collection points in the player or playback platform. During the playback process, some specific events in the running of the software application are monitored. The data collection points will be triggered when specific events occur, thereby obtaining specific information. Tracking can be implemented through programming using SDK (Software Development Kit).
[0054] Figure 2 FIG. 2 is a schematic diagram showing the overall flow of a playback monitoring method M100 according to some embodiments of the present disclosure. Figure 2As shown, the playback monitoring method M100 may include step S110, step S130 and step S150. The playback monitoring method M100 is applied to the playback end, and the playback end may be an electronic device such as a mobile phone or a tablet computer, that is, the playback monitoring method M100 may be executed by an electronic device such as a mobile phone or a tablet computer. The playback end is used to play the media through a player, that is, a player is installed in the electronic device implementing the playback monitoring method M100. The player may be an AVPlayer player or other types of players. The media may be video or audio, and the following description will take video as an example.
[0055] S110, monitoring the playing status of the media, wherein the playing status includes a stuck state, a playable state, and a playing state.
[0056] An APP may be configured in the playback end, and users may watch videos while using the APP. For example, in the scenario where users are looking for houses, the playback end is the user's mobile phone or other types of terminals, and the user opens the house-hunting APP on the terminal to query houses. In the process of browsing house information, you can intuitively understand the layout, decoration, etc. of the house by watching pre-recorded house videos. When the user clicks on the house video, the terminal can send a request to the background server of the house-hunting APP to load the house video. After a certain amount of video content is loaded, the house-hunting APP can start playing the house video through the built-in player for users to watch.
[0057] By repackaging the player (such as AVPlayer) on the playback end, the playback status of the property video can be monitored in real time during the video playback process, so as to determine and obtain the real-time playback status of the property video.
[0058] In the playback state, the stuck state indicates that the video is currently stuck, and the speed of buffering video data is lower than the video playback speed, resulting in the inability to play smoothly. The playable state indicates that the video has buffered some video data after the stuck state, so it can be played now; the playing state indicates that the video is currently being played normally. It is understandable that when stuck, the buffering time of the player can be set to 1 second, which can be more used for the calculation of the stuck duration and the actual playback duration in this embodiment.
[0059] The playback status can be obtained through callback. By registering an event listener to monitor various events of the player and executing the corresponding callback function when an event occurs, the player's callback is realized and the playback status is obtained.
[0060] S130, if the playing state of the media is the playing state, then update the actual playing time of the media until the playing state changes. The actual playing time indicates the time duration when the playing state is in the playing state. The updating of the actual playing time of the media may be performed periodically or in real time, both of which fall within the protection scope of the present disclosure.
[0061] Assume that after the user clicks on a property video, the player starts loading the property video and starts playing from the beginning of the video. The network is stable and the loading process remains normal. The video continues to be in the playing state. At this time, the actual playback time can be accumulated according to the preset cycle. That is, each time a complete preset cycle is played, the duration of the preset cycle is accumulated into the actual playback time, so that the actual playback time gradually increases from 0.
[0062] If at a certain moment A1, the playback state changes, indicating that the playback state is not in the playback state, for example, the playback state becomes a stuck state due to slow loading speed caused by unstable network, then the accumulation of actual playback time is stopped.
[0063] S150: If it is determined through the change of the playing state that the playing of the media is stuck, the actual playing time and the determined stuck time are updated according to the change of the playing state.
[0064] It is determined that at the above A1 moment, the playback state changes from the playing state to the stuck state, that is, the media playback is stuck. At this time, the player can perform the following two operations. The first operation is to start timing from the time when the stuck state is changed, and count the stuck duration by timing until the stuck state ends, and obtain the stuck duration of this stuck. The second operation is to end the accumulation of the actual playback time from the time when the stuck state is changed, and start accumulating the actual playback time again when the stuck state ends and the playback state changes to the playing state.
[0065] The execution entity for updating the actual playback duration and the execution entity for determining the freeze duration can both be the tracking points set in the player. The tracking points are responsible for the determination of various specific moments, calculation and update of duration, and other logic and operation contents. The freeze duration and the actual playback duration can be obtained through the tracking points.
[0066] Figure 3 A timing diagram showing the change in the playback status of a house video in some embodiments of the present disclosure. Figure 3 , V1 represents the house video being played, and the video length of V1 is 20 seconds. After the user clicks on the house video V1, the player starts to load the house video V1 and starts playing from the beginning of the video. At this time, the playback state of the video changes from the playable state to the playing state H1. The time when it changes to the playing state H1 is T0, which is the real time.
[0067] Starting from time T0, video V1 is played, during which the network is stable and the player loads the video data normally, and the actual playback time of the media can be updated periodically. When the player loads the video data of the 10th second of the video, the subsequent video data is not loaded due to unstable network. When the player plays to the 10th second of the video, there is a freeze due to the lack of buffered data, and the playback state changes from the playing state H1 to the freeze state H2. T1 is the starting time of this freeze. From the start of the video playback (time T0) to the freeze (time T1), the actual playback time of the player during this period is L1=10 seconds, that is, T1-T0=10s. The actual playback time realTime obtained by step S130 is accumulated to 10 seconds.
[0068] After the freeze occurs at time T1, the actual playback time realTime stops accumulating. When 5 seconds of real time have passed, that is, when the playback state remains in the freeze state for L2=5 seconds, the player buffers the subsequent video data from the background server, and then the player starts playing the listing video V1 again. T2 is the moment when the playback state changes from the freeze state H2 to the playing state H1, T2-T1=5s. The freeze time of this freeze is stalledTime of 5s.
[0069] After normal playback is resumed from time T2, the playback state remains in the playing state H1 until the video ends. During this period, the actual playback time of the player is L3 = 10 seconds. T3 is the time when the video ends, T3-T2 = 10s. The actual playback time realTime obtained by step S130 accumulates 10 seconds more during this period, and finally when the video ends, the accumulated value is 20s.
[0070] From the above process, we can know that during the playback of the property video V1, the user watched the video from the beginning to the natural end, a total of 25 seconds passed in reality, the actual playback time realTime was 20 seconds, the number of freezes was 1, and the freeze duration stalledTime was 5s.
[0071] According to the playback monitoring method proposed in the embodiment of the present invention, the freeze and viewing time are defined through code, which avoids the calculation of abnormal logic. By monitoring the playback status of the media and obtaining the freeze data and playback time data of the media from the start of playback to the exit of playback through the changes in the playback status, the business party can accurately understand the playback status of the video.
[0072] The playing state of the media can be represented by a state parameter. The values of the state parameters corresponding to different playing states can be different. Figure 4FIG. 1 is a schematic diagram showing the overall flow of a playback monitoring method M100 according to other embodiments of the present disclosure. Figure 4 In step S110, the method of monitoring the playing state of the media may include: monitoring the state parameters of the media, and determining the playing state of the media according to the monitored state parameters.
[0073] In the player, the playback state can be determined by the value of a single state parameter. In this case, the state parameter is used to indicate the playback state, and the current playback state is determined by the current value of the state parameter. In the player, the playback state can also be determined by multiple different state parameters. For example, the player can be configured with variables for the player's running state and loading state.
[0074] The running state PlayState can include the initial state (PlayStateUnknown), playing (PlayStatePlaying), paused state (PlayStatePaused), failed to play (PlayStatePlayFailed), and completed to play (PlayStatePlayStopped).
[0075] The loading state loadState can include the initial state (LoadStateUnknown), the ready-to-play state (LoadStatePrepare), the playable state (LoadStatePlayable), the automatic play state (LoadStatePlaythroughOK), the stuck state (LoadStateStalled), and other states.
[0076] The playing state can be determined by combining the values of the two state parameters, the running state and the loading state.
[0077] Figure 5 A schematic diagram of a process for determining a freeze duration in some embodiments of the present disclosure is shown. Figure 5 In step S150, determining the manner in which media playback freezes by changes in playback status may include step S151.
[0078] S151, in response to the jam start condition being met, determining that the media playback is jammed. The jam start condition includes: the media playback state changes from a non-jammed state to a jammed state. The non-jammed state is a state other than the jammed state in the playback state, such as the playing state. When the media playback state changes from the playing state to the jammed state, it is considered that the video playback is jammed. The judgment of whether jamming occurs is achieved through step S151.
[0079] See also Figure 3and Figure 5 In step S150, the method of updating the freeze duration according to the change of the playback status may include the following steps S152, S153 and S154.
[0080] S152, determining the freeze start time when the playback state changes from a non-freezing state to a freezing state.
[0081] The start time of the stall can be determined by the loadState of the player. When the value of the loadState changes to the value corresponding to the stall state (loadState==LoadStateStalled), the stalledBeginTime variable used to represent the start time of the stall is assigned to the current time. The current time at this time is the actual time when the value of the loadState changes to LoadStateStalled.
[0082] S153, in response to the media playback state changing from the stuck state to the playable state, determining the stuck end time, wherein the stuck end time is the time when the playback state changes from the stuck state to the playable state.
[0083] When the value of the loading state changes from the value corresponding to the stuck state to the value corresponding to the playable state (loadState == LoadStatePlayable), the current time is taken as the stuck end time. At this time, the current time is the actual time when the value of the loading state changes from LoadStateStalled to LoadStatePlayable.
[0084] Among them, the method of determining whether the loading state changes from a stuck state to a playable state can be to determine whether stalledBeginTime is greater than zero when loadState==LoadStatePlayable. If stalledBeginTime>0, it means that the playback state was in a stuck state before it became a playable state, that is, the current playback state change is from a stuck state to a playable state. If stalledBeginTime=0, it means that the playback state was not in a stuck state before it became a playable state, that is, the current playback state change was not from a stuck state to a playable state, for example, it changed from a paused state such as PlayStatePaused, then the stuck data will not be recorded. This can avoid incorrect recording of the stuck duration.
[0085] S154, determining the duration of the freeze according to the freeze start time and the freeze end time.
[0086] After the stalling end time is obtained, the difference d1 between the stalling end time and the stalling start time stalledBeginTime is calculated, and d1 is the stalling duration stalledTime1 of this stalling. At this time, stalledBeginTime can be reset to 0 to facilitate subsequent logical operations.
[0087] Through steps S152 to S154, the calculation of a single freeze duration and the updating of the freeze frequency are realized when normal playback continues after a freeze.
[0088] In step S154, the method of determining the duration of the freeze based on the freeze start time and the freeze end time may include the following steps: if the difference between the freeze end time and the freeze start time is greater than the freeze duration threshold, then triggering an update of the number of freezes, and determining the difference between the freeze end time and the freeze start time as the current freeze duration.
[0089] The freeze duration threshold is used to filter the freeze duration to obtain the effective freeze duration, and only the effective freeze duration is recorded when the freeze duration is updated. The freeze duration threshold can be set to 100 milliseconds. If the difference d1 calculated in step S154 is greater than 100ms, the number of freezes (stalledCount) will be increased by 1, that is, stalledCount +=1, thereby updating the number of freezes; at the same time, the difference d1 will be used as the current freeze duration stalledTime1. If the difference d1 calculated in step S154 is less than or equal to 100ms, the number of freezes will not be updated, and the current freeze duration will not be recorded.
[0090] Exemplarily, the jam start condition may also include: the playback state of the media was in the playing state before it became the jam state. That is, only the jam that occurs after the video starts playing will be recorded. In one embodiment, if the jam start condition is to be met, the following conditions 1 and 2 need to be met. Condition 1, the playback state changes from the non-jamming state to the jamming state; Condition 2, the playback state was in the playing state before it became the jamming state. If the video fails to load before it starts playing, it will not be considered as a jam, that is, condition 2 is not met.
[0091] The player can be set with a playingTime variable, which can be used to indicate whether the video has started playing. You can determine whether condition 2 is met by judging the value of playingTime. If playingTime>0, it means that the video has started playing, that is, condition 2 is met. If playingTime=0, it means that the video has not started playing, that is, condition 2 is not met.
[0092] Regarding the change of the value of playingTime, when the value of the running state is the value corresponding to the playing state (playState == PlayStatePlaying), the current real time value is used as the value of playingTime, and playingTime>0.
[0093] When the playback progress changes, it also means that the video has started playing. Whenever the playback progress changes, the current real time value is used as the value of playingTime. At this time, playingTime>0.
[0094] When the value of the running state is the value corresponding to the completion of playback (playState == PlayStatePlayStopped), the value of playingTime is reset, that is, playingTime = 0.
[0095] See also Figure 3 and Figure 5 In step S150, the method of updating the freeze duration according to the change of the playback status may also include the following steps S155 and S156.
[0096] S155, in response to the player switching from foreground operation to background operation when the playback state is a stuck state, determining a switching time and triggering an update of the number of stuck times, wherein the switching time is the time when the player switches to the background operation.
[0097] S156, determining the duration of the current freeze according to the difference between the switching time and the freeze start time, wherein the freeze start time is the time when the playback state changes from a non-freezing state to a freezing state.
[0098] If the APP exits and runs in the background of the mobile phone, the APP code may no longer execute logic. At this time, the system-level notification of the mobile phone operating system can be used to determine the switch between the foreground and the background of the APP. The APP can monitor the system-level notification in real time. If the notification of the APP switching from the foreground to the background is monitored, and the stalledBeginTime>0 at this time, it means that the APP is currently in a stalled state and the user switched the APP to the background due to the video playback stall.
[0099] At this time, the freeze duration stops accumulating because the APP enters the background. Therefore, when the APP switches to the background, the freeze count (stalledCount) is increased by 1, that is, stalledCount += 1, thereby updating the freeze count. At the same time, the switching time to the background is used as the freeze end time, and the difference d2 between the freeze end time and the freeze start time stalledBeginTime is used as the freeze duration stalledTime2.
[0100] Steps S155 and S156 are used to calculate the duration of a single freeze and update the number of freezes when the app is frozen and switched to the background. It is understandable that step S153 and step S155 are two different operation logics, which correspond to freeze duration records in different situations. In these two logics, whichever logic is satisfied will be executed.
[0101] Exemplarily, the playing state of the media may also include a playing-completed state. When the value of the running state of the player is a value corresponding to the playing-completed state (PlayState==PlayStatePlayStopped), it is considered that the video has finished playing.
[0102] Figure 6 FIG. 1 is a schematic diagram showing the overall flow of a playback monitoring method M100 according to other embodiments of the present disclosure. Figure 6 The playback monitoring method M100 may further include step S170.
[0103] S170, in response to any one of the jamming data reporting conditions being met, triggering jamming data reporting. The jamming data includes the jamming duration. The jamming data reporting conditions include one or more of the following: when the playback state changes from the jamming state to the playable state; when the player switches from the foreground operation to the background operation; when the playback state changes to the playback completion state.
[0104] Whenever the stuck state ends, the data of this stuck can be reported. The stuck data can be reported to the tracking SDK (Software Development Kit), and uploaded to the server through the tracking point for the business party to obtain. Combined with the description of steps S151 to S154, it can be seen that when the stuck ends and the video playback continues, the number of stuck times will be updated and the duration of this stuck will be determined. At this time, a stuck data report can be made, and the data such as the duration of this stuck can be reported to the tracking point SDK. Combined with the description of steps S155 and S156, it can be seen that when the APP switches to the background in the stuck state, the number of stuck times will be updated and the duration of this stuck will be determined. At this time, a stuck data report can also be made, and the data such as the duration of this stuck can be reported to the tracking point SDK.
[0105] In addition, the jam data can also be reported only when the video ends playing, that is, no matter how many times the same video freezes or switches between the foreground and the background during the same playback process, it is reported when the video finishes playing or the video exits playing. At this time, the jam data reported can include the jam duration of each jam during the playback process. The jam data is reported through step S170.
[0106] The jam data may also include one or more of the following: media ID, media address, media format, media service type, and buffer type. The media format may include the encoding standard for media compression and transmission. For example, the video format may include two formats, h265 and h264. The media service type refers to the type of business that the media is played for, such as for checking the decoration of a house, or for displaying the spatial layout of an undecorated house, and so on. The buffer type refers to the type of buffer duration for the first loading of the media, which may include 1 second, 3 seconds, 5 seconds, and other types.
[0107] Figure 7 FIG. 1 is a schematic diagram showing the overall flow of a playback monitoring method M100 according to other embodiments of the present disclosure. Figure 7 In step S130, the method of updating the actual playing time of the media may include the following steps S131 and S132.
[0108] S131, in response to the end of the callback cycle, determining the callback time difference between the end time of the current callback cycle and the end time of the previous callback cycle.
[0109] S132: Update the actual playing time of the media by accumulating the callback time differences corresponding to different callback cycles.
[0110] The callback period can be set by repackaging the player, and can be used for playback progress callback. After each callback period, the player will make a callback through a preset callback event, and the callback content can include the duration of the callback period. If the callback period is Q milliseconds, the callback duration of Q milliseconds will be used as the callback content for each normal callback. The callback content can also include the playback address of the video.
[0111] See also Figure 3 , when the video is not stuck, not paused and the buffer data is sufficient, such as in the L1 time period and the L3 time period, the video will play normally, and the actual playback time can be accumulated according to the callback cycle. When the callback cycle ends, the duration of the callback cycle is accumulated into the actual playback time.
[0112] The callback period of some players is 300ms. In this embodiment, the callback period is set to less than 300 milliseconds, for example, 100ms. If a callback is performed every 100ms, the actual playback time will increase by 100ms until a freeze or video pause or other situation occurs that causes the callback to stop. Setting the callback period to 100ms can ensure the accuracy and precision of calculating the freeze duration and the actual playback duration, and can also avoid excessive resource occupation caused by frequent callbacks.
[0113] The actual playing time is updated during the normal playing of the video through steps S131 and S132.
[0114] Figure 8 FIG. 1 is a schematic diagram showing the overall flow of a playback monitoring method M100 according to other embodiments of the present disclosure. Figure 8 In the case where the actual playback duration is updated through a callback cycle, in step S150, the method of updating the actual playback duration through changes in the playback status may include the above-mentioned steps S151 and S152, and the following steps S157 and S158.
[0115] S157, determining the freeze time difference between the freeze start time and the end time of the previous callback cycle.
[0116] S158: The freeze time difference is counted into the actual playback time of the media to update the actual playback time.
[0117] Fig. 9 A timing diagram showing the change of the playing state of the media in other embodiments of the present disclosure is shown. Fig. 9 For example, when the listing video V1 is playing normally, a callback is made at t0, and then it continues to play normally for 100ms. When it reaches t1, it also reaches the end of the callback cycle K1, so a callback corresponding to K1 is made, increasing the actual playback time by 100 milliseconds. Then it enters the callback cycle K2. At t2, 70 milliseconds after t1, the video freezes, and the freeze starts at t2. At this time, the end of the callback cycle K2 has not yet been reached, but the 70 milliseconds should be within the actual playback duration. Because the video is in a stuck state, the playback progress cannot be called back, but the loading state loadState can be obtained.
[0118] Therefore, in step S151 and step S152, loadState==LoadStateStalled is used to identify the current state of entering the stall state and obtain the time value of the stall start time. Then, in order to accurately time the actual playback time, step S157 is used to determine that the stall time difference is the stall time difference (70 milliseconds) between the stall start time t2 and the end time t1 of the previous callback cycle K1, and then the actual playback time is increased by 70 milliseconds.
[0119] Steps S157 and S158 are used to time the playback duration in the incomplete callback cycle before the freeze. It is understandable that steps S153, S155 and S157 are three different operation logics, where steps S153 and S155 correspond to the freeze duration records under different circumstances, and step S157 corresponds to the actual playback duration record at the freeze moment. Among these three logics, whichever logic is satisfied will be executed.
[0120] Exemplarily, the play state may also include a pause play state. When the user presses the pause button, the video will pause.
[0121] Fig.10 FIG. 1 is a schematic diagram showing the overall flow of a playback monitoring method M100 according to other embodiments of the present disclosure. Fig.10 The playback monitoring method M100 may further include step S161.
[0122] S161, in response to the media playing state changing from the playing state to the paused playing state, compensating the actual playing time, wherein the compensated time is less than or equal to the time of the callback cycle.
[0123] Fig.11 The following is a timing diagram showing the change of the media playback state according to other embodiments of the present disclosure. Fig.11 When the listing video V1 is playing normally, a callback is made at t3, and then it continues to play normally for 100ms. At t4, the end of the callback cycle K3 is reached, so the callback corresponding to K3 is made, increasing the actual playback time by 100 milliseconds. Then it enters the next callback cycle. At t5, 90 milliseconds after t4, that is, before the end of the next callback cycle, the user clicks on the video to temporarily pause the video playback for 2 seconds. At t6, 2 seconds later, the user clicks on the video to resume the video playback.
[0124] The time interval k1=90ms between time t5 and time t4, at time t5, the corresponding callback cycle has not ended, but this 90 milliseconds should be within the actual playing time. Therefore, in order to accurately time the actual playing time, the actual playing time is compensated in step S161.
[0125] Since the video is in the paused state, the playback progress cannot be called back, but the running state PlayState can be obtained. Therefore, the compensation method can be to use PlayState== PlayStatePaused to identify the current start of the pause state, and then include the preset compensation time in the actual playback time. The value of the preset compensation time is less than or equal to 100ms. For example, the actual playback time can be increased by 100ms as compensation. The compensation method can also be to determine the moment when the playback state changes from the playing state to the paused state, determine the time difference between the moment and the end time of the last callback cycle (90ms), and include the time difference in the actual playback time, thereby increasing the actual playback time by 90 milliseconds.
[0126] Step S161 is used to compensate the time that cannot be called back to the actual playback time when the video is paused.
[0127] Continue reading Fig.10 The playback monitoring method M100 may further include the following steps S162 and S163.
[0128] S162: In response to the media playback progress adjustment being completed, determining the adjustment duration of the media playback progress.
[0129] S163, the adjusted duration is included in the actual playback duration.
[0130] If the user drags the progress bar while watching a video, a callback event will be triggered. The dragging time of the playback progress can be obtained through the callback event, and this time will be included in the actual playback time, that is, the actual playback time is increased by the dragging time.
[0131] Exemplarily, the play state may also include a play progress adjustment state. When the play state changes from the play progress adjustment state to another state in the play state, it is determined that the play progress adjustment of the media is completed. For example, when the play state changes from the play progress adjustment state to the playing state, it indicates that the progress bar adjustment is completed.
[0132] In step S162, the method for determining the adjusted duration of the media playback progress may include the following steps: determining the adjusted playback progress after the media playback progress adjustment is completed; and determining the adjusted duration of the media playback progress based on the adjusted playback progress and the actual playback duration.
[0133] Will Fig.11 Used to illustrate the current progress adjustment scenario. The time from t3 to t5 is in normal playback state. Assume that the user starts to drag the progress bar from t5 and stops dragging the progress bar at t6. It takes 2 seconds for the user to drag the progress bar. k2 is assumed to be the change in the dragging progress. For example, k2=10 seconds, the user drags the video for 10 seconds, so the video is adjusted backward by 10 seconds, for example, from the progress of 10 minutes and 10 seconds to the progress of 10 minutes and 20 seconds. At t6, the progress adjustment is completed through the change in the playback state. At this time, the adjusted playback progress at t6 is obtained to be 10 minutes and 20 seconds. After the actual playback time is updated at the end of the last callback cycle, the actual playback time realTime is 10 minutes and 10 seconds. By calculating the difference between the adjusted playback progress and the actual playback time, it is determined that the adjusted time is 10 seconds. Counting 10 seconds into the actual playback time means that the actual playback time is increased by 10 seconds, thereby updating the actual playback time.
[0134] The user's fast-forward progress is counted into the actual playback duration through step S162 and step S163. It can be understood that step S162 and step S163 are two different operation logics, which correspond to the actual playback duration update in different situations. In these two logics, whichever logic is satisfied is executed.
[0135] Fig.12 FIG. 1 is a schematic diagram showing the overall flow of a playback monitoring method M100 according to other embodiments of the present disclosure. Fig.12 The playback monitoring method M100 may further include the following step S180.
[0136] S180, in response to any one of the conditions for reporting the playing time data being met, triggering the reporting of the playing time data. The playing time data includes the actual playing time. The playing time data reporting conditions may include: the playing state changes to the playing completed state.
[0137] Since the viewing time is for a whole video, the timing for reporting the playback time data can be after the video playback is finished, that is, when the value of the player's running state is the value corresponding to the playback completion state (PlayState == PlayStatePlayStopped). The playback time data can also include: one or more of the following: media ID, media address, media format, media service type, media format, and buffer type. The playback time data can be reported to the embedding SDK (Software Development Kit) and uploaded to the server through the embedding for the business party to obtain.
[0138] Fig.13FIG. 2 shows a schematic diagram of the overall process of the media optimization method M200 according to some embodiments of the present disclosure. Fig.13 As shown, the media optimization method M200 may include step S210 and step S230. The media optimization method M200 is applied to a server, which may include a server of a business system.
[0139] S210, obtaining the jamming data and the playing time data of the played media, wherein the jamming data and the playing time data are obtained by the playing monitoring method M100 of any of the above embodiments, the jamming data includes the jamming time, and the playing time data includes the actual playing time.
[0140] S230, optimizing the media according to the jamming data and the playback duration data, wherein the optimization item includes at least one of the media format and the buffer type.
[0141] After completing the playback of the house video V1, whether the video is automatically played or the user manually exits the playback, the business party can obtain the jamming data and playback duration data of the video V1. Among them, the jamming duration can be the overall jamming duration. For example, if the video is jammed twice during the playback process, the first jamming lasts for 3 seconds, and the second jamming lasts for 10 seconds, then the jamming duration obtained by the business party can be 13 seconds; the jamming duration can also be a single jamming duration, then the business party obtains two jamming durations, one for 3 seconds and the other for 10 seconds. The jamming data can also include the video ID, video address, video format, video service type and video buffering type of the house video V1.
[0142] The actual playback time is the actual length of time that users watch a video. For example, after a 1-minute video starts playing, it plays normally for 10 seconds, then freezes for 5 seconds, and then continues to play normally for 8 seconds. The user drags the progress bar to fast-forward the video by 15 seconds, and then continues to play normally for 3 seconds before the user exits the video. Without considering millisecond-level calculations, the actual playback time of the video is approximately 10+8+15+3=36 seconds.
[0143] If the duration of a freeze is greater than or equal to 100 milliseconds, it is considered a freeze. There are three levels of freezes, including short freezes, medium freezes, and long freezes. If the freeze duration is in the range of (100ms, 1000ms], it is determined to be a "short freeze" level; if the freeze duration is in the range of (1000ms, 5000ms], it is determined to be a "medium freeze" level; if the freeze duration is greater than 5000ms, it is determined to be a "long freeze" level.
[0144] By analyzing the jamming data and the playback time data, the format and buffer type of the video can be optimized. In step S230, the method of optimizing the media based on the jamming data and the playback time data may include the following steps: calculating the jamming rate and the completion rate based on the jamming data and the playback time data; and optimizing the media based on the jamming rate and the completion rate. Among them, the jamming rate is used to indicate the jamming situation of the media playback, and the calculation method is: total jamming time / actual playback time. The completion rate is used to indicate the playback situation of the media playback, and the calculation method is: actual playback time / the duration of the media itself. Taking the above-mentioned 1-minute house video V1 as an example, the jamming rate = 5 / 36, the completion rate = 36 / 60. If the completion rate is greater than 90%, it is considered that the completion rate has reached the completion state.
[0145] The video format and buffer type are determined by the stuttering rate and the completion rate. Assuming that the encoding format of the video is h265 format, the buffering type is 5 seconds, and multiple different users frequently experience stuttering when watching the video, and the duration of the stuttering is relatively long, the business party obtains the stuttering data and the playback duration data, and calculates the stuttering rate. If the stuttering rate is greater than the stuttering rate threshold, the format of the video can be optimized through step S230, and the encoding format is adjusted from h265 to h264 and re-encoded, thereby reducing the hardware requirements for the playback end, so that the video can be played more smoothly in the future and improve the playback quality; at the same time, the video is set to lower the buffering type to 3 seconds, so that when the user clicks on the video to enter the playback interface, the player will start playing when it buffers 3 seconds of video content, which can make the video playback smoother and improve the playback effect. In addition, through the size of the completion rate, it can also be determined whether the video content needs to be modified, and the content matching degree can be improved by modifying the video content, so as to focus on recommending videos that users are interested in.
[0146] Based on any of the above embodiments, the present disclosure further provides a playback monitoring device, which includes a status monitoring module and a duration updating module.
[0147] The status monitoring module is used to monitor the media playback status, which includes the stuck status, the playable status and the playing status.
[0148] The duration update module is used to perform the following steps: if the playback state of the media is in the playing state, the actual playback duration of the media can be periodically updated until the playback state changes. The actual playback duration refers to the duration of the playback state in the playing state. If the playback of the media is determined to be stuck through the change of the playback state, the actual playback duration is updated and the stuck duration is determined based on the change of the playback state.
[0149] The above modules can be implemented by computer program modules. The implementation process of the functions and effects of each module in the above device is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here.
[0150] Based on any of the above embodiments, the present disclosure further provides a media optimization device. The media optimization device comprises: the playback monitoring device of any of the above embodiments, a data acquisition module and a media optimization module. The playback monitoring device comprises a state monitoring module and a duration update module.
[0151] The data acquisition module is used to acquire the jamming data and playback duration data of the played media, wherein the jamming data and playback duration data are obtained by the playback monitoring device of any of the above embodiments, the jamming data includes the jamming duration, and the playback duration data includes the actual playback duration.
[0152] The media optimization module is used to optimize the media according to the jamming data and the playback duration data, wherein the optimization item includes at least one of the media format and the buffer type.
[0153] The above modules can be implemented by computer program modules. The implementation process of the functions and effects of each module in the above device is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here.
[0154] The execution subject of the playback monitoring method in the specific implementation of the present disclosure may be an electronic device such as a mobile phone, a tablet computer, etc. Therefore, based on any of the above implementations, the present disclosure also provides an electronic device, which can execute the playback monitoring method of any of the implementations described above in the present disclosure, and the playback monitoring device of any of the implementations described above can be configured on the electronic device.
[0155] Fig.14 1 is a schematic block diagram of an electronic device 1000 equipped with a playback monitoring device according to an embodiment of the present disclosure, wherein the playback monitoring device comprises a state monitoring module 1002 and a duration updating module 1004 .
[0156] The status monitoring module 1002 is used to monitor the playing status of the media, wherein the playing status includes a stuck status, a playable status and a playing status.
[0157] The duration update module 1004 is used to perform the following steps: if the playing state of the media is the playing state, the actual playing time of the media can be periodically updated until the playing state changes. The actual playing time indicates the time duration when the playing state is in the playing state. If the playing of the media is determined to be stuck by the change of the playing state, the actual playing time is updated and the stuck time is determined by the change of the playing state.
[0158] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0159] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0160] The processor 1200 may be a central processing unit (CPU). The processor 1200 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0161] The memory 1300 can be used as a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions of the computer program in the embodiment of the present disclosure. The processor 1200 implements the playback monitoring method by running the non-transitory software programs, instructions and modules stored in the memory 1300.
[0162] The memory 1300 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created by the processor 1200, such as structural data, model data, sample data, stiffness evaluation results, etc. of the bridge. In addition, the memory 1300 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1300 may optionally include a memory remotely arranged relative to the processor 1200, and these remote memories may be connected to the processor 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0163] The execution subject of the media optimization method in the specific implementation of the present disclosure may be an electronic device such as a desktop computer, a server, etc. Therefore, based on any of the above implementations, the present disclosure also provides an electronic device, which can execute the media optimization method of any of the implementations described above in the present disclosure, and the media optimization device of any of the implementations described above can be configured on the electronic device.
[0164] Fig.15 2 is a schematic block diagram of an electronic device 2000 equipped with a media optimization device according to an embodiment of the present disclosure, wherein the media optimization device includes a data acquisition module 2002 and a media optimization module 2004 .
[0165] The data acquisition module 2002 is used to acquire the jamming data and the playing time data of the playing media. The jamming data and the playing time data are obtained by the playing monitoring device of any of the above embodiments, the jamming data includes the jamming time, and the playing time data includes the actual playing time.
[0166] The media optimization module 2004 is used to optimize the media according to the jamming data and the play duration data, wherein the optimization item includes at least one of the media format and the buffer type.
[0167] The playback monitoring device includes a state monitoring module 1002 and a duration updating module 1004. The implementation process of the functions and effects of the state monitoring module 1002 and the duration updating module 1004 is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here. The functions and effects of the bus 2100, the processor 2200, the memory 2300 and the other circuits 2400 in the electronic device 2000 are the same as the functions and effects of the bus 1100, the processor 1200, the memory 1300 and the other circuits 1400 in the electronic device 1000, which will not be repeated here.
[0168] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0169] The present disclosure also provides a computer program product, and the method of the present disclosure can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.
[0170] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0171] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0172] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0173] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0174] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0175] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0176] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0177] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A playback monitoring method, applied to a playback end, characterized in that: The playback end is used to play the media through a player, and the method includes: Monitoring the playing status of the media, wherein the playing status includes a stuck state, a playable state, and a playing state; If the playing state of the media is the playing state, updating the actual playing time of the media until the playing state changes, the actual playing time indicating the time duration of the playing state in the playing state; and If it is determined through the change of the playing state that the playing of the media is stuck, the actual playing time is updated and the stuck time is determined based on the change of the playing state.
2. The playback monitoring method according to claim 1, characterized in that: The playing state of the media is represented by a state parameter, and different playing states correspond to different values of the state parameter. Monitoring the playing state of the media includes: The state parameters of the media are monitored, and the playing state of the media is determined according to the monitored state parameters.
3. The playback monitoring method according to claim 1, characterized in that: Determining that the playback of the media is stuck by the change of the playback state includes: In response to a jam start condition being met, it is determined that jam occurs in the playback of the media, the jam start condition comprising: the playback state of the media changes from a non-jamming state to the jamming state.
4. The playback monitoring method according to claim 3, characterized in that: Updating the actual playback duration and determining the freeze duration according to the change of the playback state includes: Determine a freeze start time when the playback state changes from a non-freeze state to the freeze state; In response to the playback state of the media changing from the stuck state to the playable state, determining a stuck end time, the stuck end time being a time when the playback state changes from the stuck state to the playable state; and Determine the duration of the freeze according to the freeze start time and the freeze end time; Optionally, determining the duration of the freeze according to the freeze start time and the freeze end time includes: If the difference between the end time of the freeze and the start time of the freeze is greater than the freeze duration threshold, the update of the number of freezes is triggered, and the difference between the end time of the freeze and the start time of the freeze is determined as the current freeze duration.
5. The playback monitoring method according to claim 3, characterized in that: The freeze start condition also includes: the playing state of the media was in the playing state before changing to the freeze state.
6. The playback monitoring method according to claim 1, characterized in that: Updating the actual playback duration and determining the freeze duration according to the change of the playback state includes: In response to the player switching from foreground operation to background operation when the playback state is the stuck state, determining a switching time and triggering an update of the number of stuck times, the switching time being the time when the player switches to background operation; and The duration of the freeze is determined according to the difference between the switching moment and the freeze start moment, where the freeze start moment is the moment when the playback state changes from the non-freezing state to the freezing state.
7. The playback monitoring method according to any one of claims 1 to 6, characterized in that: The playing state also includes a playing completion state, and the method further includes: In response to any one of the freeze data reporting conditions being met, the freeze data reporting is triggered, and the freeze data includes the freeze duration, and the freeze data reporting conditions include one or more of the following: when the playback state changes from the freeze state to the playable state; when the player switches from foreground operation to background operation; when the playback state changes to the playback completion state.
8. The playback monitoring method according to claim 1, characterized in that: Update the actual playing time of the media, including: In response to the end of the callback cycle, determining a callback time difference between the end time of the current callback cycle and the end time of the previous callback cycle; and Updating the actual playing time of the media by accumulating the callback time differences corresponding to different callback cycles; Optionally, updating the actual playback duration and determining the freeze duration according to the change of the playback state includes: Determine the time difference between the start time of the freeze and the end time of the previous callback cycle; and The freeze time difference is counted into the actual playing time of the media to update the actual playing time; Optionally, the playing state further includes a paused playing state, and the method further includes: In response to the media playing state changing from the playing state to the paused playing state, the actual playing time is compensated, and the compensated time is less than or equal to the time of the callback cycle.
9. The playback monitoring method according to claim 8, characterized in that: The method further comprises: In response to the completion of the adjustment of the playing progress of the media, determining the adjustment duration of the playing progress of the media; and The adjusted duration is included in the actual playback duration; Optionally, the playback state further includes a playback progress adjustment state, and when the playback state changes from the playback progress adjustment state to another state in the playback state, it is determined that the playback progress adjustment of the media is completed; Optionally, determining the adjustment duration of the media playback progress includes: Determining the adjusted playback progress of the media after the playback progress adjustment is completed; and The adjusted duration of the media's playback progress is determined according to the adjusted playback progress and the actual playback duration.
10. The playback monitoring method according to claim 8 or 9, characterized in that: The method further comprises: In response to any one of the playback duration data reporting conditions being met, reporting of the playback duration data is triggered, the playback duration data includes the actual playback duration, and the playback duration data reporting conditions include: the playback state changes to a playback completion state.
11. A media optimization method, applied in the background, characterized in that: The method comprises: Obtaining jamming data and playback duration data of the media, wherein the jamming data and the playback duration data are obtained by the playback monitoring method according to any one of claims 1 to 10, the jamming data includes the jamming duration, and the playback duration data includes the actual playback duration; and The media is optimized according to the jamming data and the playback duration data, and the optimization items include at least one of a media format and a buffer type.
12. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 11.
13. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program is used to implement the method according to any one of claims 1 to 11.
