Multimedia file playing method, device, computer equipment and storage medium
By obtaining the gyroscope, gravity sensor and light intensity data of the mobile terminal, the user's viewing status is accurately determined, which solves the problem of misjudgment in the existing technology and improves the user experience of multimedia file playback.
Patent Information
- Application Number
- CN202211510076.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-11-29
AI Technical Summary
Existing methods for detecting whether a user is watching multimedia files have misjudgment problems that affect the user experience. For example, light detection is prone to misjudgment, camera detection requires permission and is inaccurate, and gravity detection is prone to static misjudgment.
By obtaining the gyroscope, gravity sensor and light intensity data of the mobile terminal, the extreme characteristic points and consistency changes of the sensor data are determined, and the user's viewing status is accurately determined, thereby controlling the playback status of multimedia files.
It achieves a more accurate judgment of the user's viewing status, intelligently pauses the playback of multimedia files, improves the user experience, avoids misjudgments, and enhances the accuracy of user operations.
Smart Images

Figure CN115834764B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of multimedia technology, and in particular to a multimedia file playing method, device, computer equipment and computer-readable storage medium. Background Art
[0002] At present, with the maturity of multimedia technology in mobile terminals, it is becoming more and more common for users to watch multimedia through mobile terminals, such as watching videos or electronic novels through mobile terminals. However, when users watch multimedia files, there are often temporary interruptions. For example, when the user leaves the mobile terminal that is playing the multimedia file, or performs some operations such as blocking or turning over the mobile terminal, and forgets to interrupt the multimedia file or fails to interrupt the multimedia file, when the user needs to return, he needs to drag the progress bar of the multimedia file or slide the screen to return to the position before leaving.
[0003] In the prior art, the light intensity of the current environment is generally detected periodically through a photosensitive element. If the light intensity detected N times in a row is less than or equal to a preset threshold, the mobile phone terminal pauses playing the video and records the progress of the video playing; or determines whether the mobile terminal is in a stationary state. If it is in a stationary state, the camera is used to determine whether the user is watching the video. If it is detected that no user is watching, the video playback is paused; and the camera is used to detect whether a fixed area is watching. If it is detected that no user is watching, the playback is paused and the playback position is recorded, and the playback continues when a user is detected.
[0004] However, the inventors of the present application have discovered that the prior art solutions that rely solely on light detection are prone to misjudgment, such as when the lights are suddenly turned off, or when the user enters a car or a dark environment, which affects the user experience; the method of detecting the user through a camera first requires that the mobile terminal device be integrated with a camera or similar device, and secondly requires the user to enable corresponding permissions, and the user is generally sensitive to camera permissions; and determining whether the device is in a stationary state solely through the use of gravity is prone to misjudgment, such as when the device is placed still or actively blocked. These methods all have the problem of inaccurate detection, which affects the user experience. Summary of the invention
[0005] In view of the above problems, the embodiments of the present invention provide a multimedia file playing method, apparatus, computer equipment and computer-readable storage medium, which are used to solve the problem of inaccurate detection in the prior art.
[0006] According to one aspect of an embodiment of the present invention, a method for playing a multimedia file is provided, the method comprising:
[0007] Obtain various sensor data from mobile terminals;
[0008] determining a viewing status of the multimedia file by a user according to extreme feature points and consistency changes of the sensor data;
[0009] The playing state of the multimedia file is controlled according to the viewing state.
[0010] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0011] Determine a characteristic point time in each type of sensor data, wherein the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold;
[0012] The viewing status of the user viewing the multimedia file is determined based on the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data; the consistency behavior detection time is the time when the change of the sensor extreme value between multiple first preset periods before the feature point time is greater than the first extreme value change threshold, and the time when the change of the sensor extreme value of each type of sensor between multiple first preset periods after the feature point time is less than the second extreme value change threshold.
[0013] In an optional manner, the sensor data includes gyroscope data, gravity sensor data, and light intensity data;
[0014] Determining the viewing status of the user viewing the multimedia file according to the feature point time in the various sensor data and the consistency behavior detection time in the various sensor data, including:
[0015] Calculate the time difference of the characteristic points of various sensor data to obtain the maximum value of the extreme time difference;
[0016] The viewing status of the user viewing the multimedia file is determined by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data.
[0017] In an optional manner, determining the viewing status of the user viewing the multimedia file by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data includes:
[0018] When Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2, it is determined that the viewing state of the user viewing the multimedia file is a first abnormal state;
[0019] When K*Max(tl11, tg11, ts11)+C2<Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is a second abnormal state;
[0020] When Max(Δ11, Δ12, Δ13)>K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is normal;
[0021] Among them, Max() represents the maximum value among multiple values, Δ11 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the gravity sensor; Δ12 represents the comparative extreme time difference between the feature point time of the gravity sensor and the feature point time of the light intensity; Δ13 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the light intensity; tl11 represents the first consistent behavior detection time of the gyroscope; tg11 represents the first consistent behavior detection time of the gravity sensor; ts11 represents the first consistent behavior detection time of the light intensity; K represents the relationship coefficient; C1 represents the user behavior deviation constant; C2 represents the device environment deviation constant.
[0022] In an optional manner, controlling the playback state of the multimedia file according to the viewing state includes: pausing the playback of the multimedia file when the viewing state of the multimedia file is abnormal;
[0023] After controlling the playing state of the multimedia file according to the viewing state, the method further includes: automatically playing the multimedia file when a user return is detected.
[0024] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0025] Determine a characteristic point time in the target sensor data; the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold;
[0026] Determine consistent changes in other types of sensor data before and after the feature point;
[0027] A viewing status of the multimedia file by the user is determined according to the consistency change.
[0028] In an optional manner, statistics are collected on the time during which the data of each type of sensor remains unchanged and the time between the user operation and the current time;
[0029] When the time for which the data remains unchanged and the time from the user operation to the current time are both greater than a preset first time threshold, adjusting the playback volume of the multimedia file;
[0030] When no user operation is detected within a second time threshold after the playback volume of the multimedia file is adjusted, and the data of each type of sensor remains unchanged, it is determined that the viewing state of the user viewing the multimedia file is an abnormal state.
[0031] According to another aspect of an embodiment of the present invention, there is provided a multimedia file playing device, comprising:
[0032] An acquisition module is used to acquire various sensor data of the mobile terminal;
[0033] A determination module, configured to determine a viewing status of the multimedia file by a user according to extreme feature points and consistency changes of the sensor data;
[0034] The control module is used to control the playing state of the multimedia file according to the viewing state.
[0035] According to another aspect of an embodiment of the present invention, there is provided a computer device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0036] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the multimedia file playing method.
[0037] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, wherein at least one executable instruction is stored in the storage medium. When the executable instruction is executed on a computer device, the computer device executes the operation of the multimedia file playing method.
[0038] The embodiment of the present invention obtains various sensor data of the mobile terminal; the various sensor data include at least one of gyroscope data, gravity sensor data and light intensity data; determines the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data; controls the playback state of the multimedia file according to the viewing state, can accurately judge the viewing state of the user viewing the multimedia file, intelligently pause the playback of the multimedia file, and improve the user experience.
[0039] Furthermore, the embodiments of the present invention can comprehensively determine the user's viewing status by detecting and judging the extreme feature points and consistency changes of various sensor data of the mobile terminal, combining the data of each sensor in the same time period, and can more accurately determine the user's current viewing status, thereby improving the accuracy of judging the user's viewing status. In the event of a sudden interruption in the user's video viewing, such as blocking, turning over, putting the mobile terminal in a bag or pocket, or similar scenarios, or the user not watching the video for a long time, the video playback environment information can be obtained in a timely manner, and the video playback can be intelligently paused, the screen turned off, or the screen is turned off after a period of time.
[0040] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0042] Figure 1 A schematic diagram showing a flow chart of a multimedia file playing method provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram showing the structure of a multimedia file playing device provided by an embodiment of the present invention is shown;
[0044] Figure 3 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0045] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0046] Figure 1 The flowchart of the multimedia file playing method provided by the embodiment of the present invention is shown, and the method is executed by a computer device. The computer device can be a mobile terminal, a tablet computer, a palm reader, a wearable device, a smart terminal and other devices, and the embodiment of the present invention does not make specific restrictions. Figure 1 As shown, the method comprises the following steps:
[0047] Step 110: Acquire various sensor data of the mobile terminal.
[0048] The various types of sensor data include at least one of gyroscope data, gravity sensor data and light intensity data, which are acquired through a gyroscope, gravity sensor and light sensor integrated in the mobile terminal.
[0049] Step 120: Determine the viewing status of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data.
[0050] The multimedia file may be a multimedia file such as an audio file, a video file or an audio book file, and the embodiment of the present invention does not impose any specific limitation thereto.
[0051] For similar scenarios such as turning the mobile terminal upside down, putting the mobile terminal into a bag or pocket, and placing the mobile terminal close to an obstruction, the user's intention is obvious, the sensor feature data is also relatively obvious and easy to identify and process, and there is no common interference abnormal scenario. When the agreed sensor data feature is reached, it can be determined, and the state of the mobile terminal is determined by determining whether it occurs "simultaneously", thereby determining the viewing state of the user watching the multimedia file. At this time, the consistency change of the sensor data feature is: the change of the sensor extreme value between multiple first preset cycles before the feature point time is greater than the first extreme value change threshold, and the change of the sensor extreme value between multiple first preset cycles after the feature point time is less than the second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold. Therefore, the viewing state of the terminal can be determined by the feature point time and consistency change. Specifically, the feature point time is the critical time point when the change of the sensor extreme value changes from greater than the first extreme value change threshold to less than the second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold.
[0052] Among them, in one embodiment of the present invention, the feature point time in each type of sensor data is determined by the following method: determining the feature point time corresponding to the extreme feature point of the gyroscope according to the gyroscope data; determining the feature point time corresponding to the extreme feature point of the gravity sensor according to the gravity sensor data; determining the feature point time corresponding to the extreme feature point of light intensity according to the light intensity data. Specifically, each type of sensor data is stored in a storage container (such as a queue) of a corresponding fixed time period Tc (such as 20s), and the container only stores the data of the most recent fixed time period Tc, and automatically overwrites the expired data (similar to the first-in-first-out of a queue). For a certain type of sensor data, the data extreme values are periodically obtained from the most recent time with a fixed duration of the first preset period Tt (for example, 2s) to the historical data. For example, when obtaining the maximum and minimum values from the current time point to the previous Tt time period, the detection is performed every Ta (for example, 1s) within the first preset period Tt, and the extreme values (maximum and minimum values) within each Ta are recorded, and the extreme values of the Ta period are compared with the extreme values obtained in the next n1 (n1>0, n1 is not recommended to be too large, and the value is, for example, 1) detection periods Ta to obtain the final extreme value feature points and extreme value time points of the first preset period Tt. If the difference between the maximum values of adjacent Ta periods is less than a threshold, or the difference between the minimum values of adjacent Ta periods is less than a threshold (for example, a value of 10 or an angle of 20 degrees), the extreme value corresponding to the Ta period closest to the current time is taken as the final extreme value, and the recorded extreme value survival time should not be greater than n2 Tt time intervals, where n2>0, and the value can be, for example, 1. Among them, in order to facilitate calculation, the embodiment of the present invention pre-processes various types of sensor data to obtain sensor data characteristic values, so that the extreme values of the data characteristic values in each period can be determined from the data characteristic values corresponding to each time point, for example, the light data Li is converted into a percentage system of 0-100, 0 is the darkest and 100 is the brightest; the gyroscope data Ts is converted into three-dimensional data of x, y, and z, the data changes from 0 to 360 degrees, and the horizontal placement angle is 0; the gravity sensing data Gj is converted into three-dimensional data of x, y, and z, the data changes from 0 to +-90 degrees and +- acceleration changes.
[0053] The difference between the maximum and minimum values in each first preset period Tt obtained in the fixed time period Tc is compared with the first extreme value change threshold to determine whether the sensor data of this type in the fixed time period Tc is greater than the first extreme value change threshold. If it is not reached, continue to detect. If it is reached, record the time points of each extreme value in the fixed time period Tc, and record the sensor data in the fixed time period Tc and the subsequent time period Tb (for example, 6s). Continue to observe n3 (n3>=0) Tcc (for example, 0.5s) detection cycles. When the data after the extreme value appears at a certain time point i1 in the fixed time period Tc and the subsequent time period Tb, continue to generate new extreme values, and the extreme value data is relatively stable (for example, the change is less than 10) or converges, it can be determined that the time point i1 is the feature point time, that is, the feature point time corresponding to the first extreme value feature point that meets the agreed condition state. The agreed condition state is that the change of the extreme value before the time point corresponding to the extreme value is greater than the first extreme value change threshold, and the change of the extreme value after the extreme value is less than the second extreme value change threshold. The feature point time corresponding to each type of sensor data can be obtained through the above method, recorded as (i1, j1, s1), where i1 represents the feature point time corresponding to the extreme feature point of light intensity; j1 represents the feature point time corresponding to the extreme feature point of the gravity sensor; s1 represents the feature point time corresponding to the extreme feature point of the gyroscope. If the data after the extreme value continues to fluctuate back and forth (for example, from 90 degrees to 30 degrees to 70 degrees) without convergence, the feature point time cannot be determined. The scene thresholds can be selected as follows: light value is less than 10 or others, gyroscope angle change is greater than 80 degrees or others, gravity angle change is greater than 80 degrees or others.
[0054] Among them, if the characteristic point time (i1, j1, s1) of each type of sensor data is obtained, it means that the various types of sensor data are changing consistently. Since it is necessary to determine whether the consistency changes of various types of sensors occur simultaneously in similar scenarios such as turning the mobile terminal upside down, putting the mobile terminal into a bag or pocket, and other large-scale operations such as bringing the terminal close to an obstruction, it is necessary to further determine the consistency behavior detection time. Among them, the time when the extreme value first appears within the fixed time period Tc is the consistency change time (tl11, tg11, ts11). Determine the time when the change of the gyroscope extreme value between multiple first preset periods before the characteristic point time is greater than the first extreme value change threshold, which is the first consistency behavior detection time ts11 of the gyroscope; determine the time when the change of the gyroscope extreme value between multiple second preset periods after the characteristic point time is less than the second extreme value change threshold as the second consistency behavior detection time ts12 of the gyroscope. Determine the time when the change of the extreme value of the gravity sensor between the multiple first preset periods before the feature point time is greater than the first extreme value change threshold as the first consistency behavior detection time tg11 of the gravity sensor; determine the time when the change of the extreme value of the gravity sensor between the multiple second preset periods after the feature point time is less than the second extreme value change threshold as the second consistency behavior detection time tg12 of the gravity sensor. Determine the time when the change of the extreme value of light intensity between the multiple first preset periods before the feature point time is greater than the first extreme value change threshold as the first consistency behavior detection time tl11 of light intensity; determine the time when the change of the light intensity between the multiple second preset periods after the feature point time is less than the second extreme value change threshold as the second consistency behavior detection time tl12 of light intensity.
[0055] Among them, the characteristics of various types of sensor data are:
[0056] 1. Light intensity sensor: Within the time tl11 before a time point i1, the value of Li1 changes consistently and the change is greater than a threshold value Lc. Within the detection time tl12 after a time point i1, Li1 tends to zero or is less than a threshold value Lc and lasts for n inspection cycles, n>0 and can be set. The threshold value Lc is obtained through multiple actual tests.
[0057] 2. Gravity sensor: Within the time tg11 before a time point j1, the value of Gj1 changes consistently and the change is greater than a threshold (for example, at least one of the three dimensions changes in a positive or negative direction or returns to zero). Within the detection time tg12 after a time point j1, the value of Gj1 remains unchanged or fluctuates slightly (for example, there is no change in the numerical direction of the three dimensions).
[0058] 3. Gyroscope: Within the time ts11 before a time point s1, the value of Ts1 changes consistently and the change is greater than a threshold (for example, at least one direction changes by more than 90 degrees). Within the detection time ts12 after a time point s1, the value of Ts1 remains unchanged or fluctuates slightly (for example, changes in the three directions are all less than 80 degrees).
[0059] Under normal circumstances, user behavior is fast or slow, and the speed of user behavior is reflected in the consistency behavior detection time (tl11, tg11, ts11). The faster the user behavior, the shorter the consistency behavior detection time, and the smaller the feature time difference should be. The slower the user behavior, the longer the consistency behavior detection time, and the larger the feature time difference should be. That is, the feature time difference is linearly proportional to the consistency behavior detection time. The relationship coefficient is K (K is obtained through actual testing) and the deviation constant (the deviation constant includes the subjective user behavior constant C1 and the device environment related constant C2, see below). Abnormal user subjective behavior, such as pausing in the middle of an operation and then continuing, this subjective abnormal behavior will also be reflected in the characteristic time difference. This abnormal behavior can be detected by monitoring the change in gravity acceleration or other sensor behavior. Actively monitoring this abnormal behavior and adding time to judgment is a processing method. Here, a time constant C1 (the value of C1 is, for example, 1s, and the value obtained from the experience test results is preferred) is used instead and dynamically adjusted according to user behavior. In addition, there are differences in sensor sensitivity. Here, a time constant C2 is used (the value of C2 is obtained based on actual tests, and may be different for terminals with different types of configurations).
[0060] Therefore, in the embodiment of the present invention, the maximum value of the extreme value time difference and the maximum value of the consistency behavior detection time of various sensor data are compared through the following algorithm to determine the viewing status of the user viewing the multimedia file:
[0061] When Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2, it is determined that the viewing state of the user viewing the multimedia file is a first abnormal state; wherein the first abnormal state means that the user's viewing state satisfies the "simultaneous" constraint condition and is a viewing abnormal state.
[0062] When K*Max(tl11, tg11, ts11)+C2<Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user for viewing the multimedia file is the second abnormal state; wherein the second abnormal state means that the user's viewing state basically satisfies the "simultaneous" constraint condition, which is also an abnormal viewing state.
[0063] When Max(Δ11, Δ12, Δ13)>K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is normal;
[0064] Among them, Max() represents the maximum value among multiple values, Δ11 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the gravity sensor; Δ12 represents the comparative extreme time difference between the feature point time of the gravity sensor and the feature point time of the light intensity; Δ13 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the light intensity; tl11 represents the first consistent behavior detection time of the gyroscope; tg11 represents the first consistent behavior detection time of the gravity sensor; ts11 represents the first consistent behavior detection time of the light intensity; K represents the relationship coefficient; C1 represents the user behavior deviation constant; C2 represents the device environment deviation constant; Δ11=|i1-j1|; Δ12=|i1-s1|; Δ13=|j1-s1|.
[0065] In another embodiment of the present invention, the feature point time of light or another sensor can be used as the feature point time of all sensors, and the data features of gravity and gyroscope or other two sensors can be compared with the scene data features for judgment. It includes: determining the feature point time in the target sensor data; determining the consistency change in other types of sensor data before and after the feature point time; and determining the viewing state of the user watching the multimedia file according to the consistency change. Specifically, by determining the feature point time of the extreme value feature point in the target sensor data, the feature point time is the critical time point when the sensor extreme value changes from greater than the first extreme value change threshold to less than the second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold. After determining that there is a feature point time in the target sensor, it is determined that the extreme value of the target sensor satisfies the consistency change. The consistency change is that the change of the sensor extreme value of the target sensor between the first preset periods before the feature point time at the feature point time is greater than the first extreme value change threshold, and the change of the sensor extreme value of the target sensor in the first preset periods after the feature point time is less than the second extreme value change threshold. After determining the characteristic point time of the target sensor, the characteristic point time of the target sensor is used as the characteristic point time of other sensors to determine whether the data of other types of sensors before and after the characteristic point time conform to the consistency change. If it conforms, it is determined that the viewing state of the user viewing the multimedia file is an abnormal state. If any one does not conform, it is determined to be a normal state.
[0066] Specifically, taking the characteristic point time of the light sensor as the characteristic point time of other sensors, the data within a fixed time interval before and after the characteristic point time is analyzed and judged. Within a fixed time before the characteristic point time, the data of at least one dimension among the three dimensions of the gravity or gyroscope sensor changes consistently and the change angle is greater than the first preset threshold. After the characteristic point time, the data changes of the three dimensions of the gravity or gyroscope sensor are all greater than the first preset threshold. Since for other sensors, this characteristic point time is not an exact time, the consistency of data changes before and after the characteristic point time is a major factor involved in the judgment. Among them, the method for obtaining this characteristic point time is the same as described above and will not be elaborated here. The process for judging the consistent change of data is as follows: Analyze the data within the time period before and after the characteristic point time (denoted as T1). Since different sensors have different response speeds and different user behavior characteristics, it may not be possible to obtain sufficient characteristic values within the Tt time period. Therefore, the period Tt for determining the extreme value of other sensors needs to be greater than the first preset period for determining the characteristic point time in the light intensity data. Even if sufficient characteristics are obtained within one Tt period, it can still be extended by n Tt. Starting from the characteristic point time data, count the data extreme values within the previous n*Tt: If the discrete value of the extreme value within n*Tt is less than the dynamic characteristic value threshold, it is considered that the consistent change is not satisfied; if the extreme value discrete value within n*Tt satisfies the dynamic characteristic value threshold, judge whether there are other extreme value points within the two extreme value points that satisfy the dynamic characteristic value threshold until an extreme value point closer to the characteristic point time and satisfying the dynamic characteristic value threshold is found. If an extreme value point closer to the characteristic point time and satisfying the dynamic characteristic value threshold can be found and the data between this extreme value point and the characteristic point time also satisfies the corresponding dynamic characteristic value threshold, it is considered that the consistent change is satisfied; if an extreme value point closer to the characteristic point time and satisfying the dynamic characteristic value threshold cannot be found and the data after this extreme value is stable or convergent, it can also be considered that the dynamic characteristic value threshold is satisfied when n*Tt < C1; if in the second case above, an extreme value point closest to the characteristic point time and satisfying the dynamic characteristic value threshold is not found, but the sensors after the obtained characteristic point time are all extreme values of different types that are the closest to the characteristic point time among the existing extreme values (for example, there was a minimum value of 30 before the characteristic point time, and the data obtained in real time after the characteristic point time is 60, 62...), then the judgment is delayed and the judgment is made when more data is obtained. Among them, this dynamic characteristic value threshold is a threshold judgment for the extreme value itself, and this dynamic characteristic value threshold can be set accordingly according to the specific scenario, and no specific limitation is made in the embodiments of the present invention. In another embodiment of the present invention, this dynamic characteristic value threshold can be calculated according to the following algorithm:
[0067]
[0068] Among them, K1, K2 and K3 are all calculated through the test curve, the proximal extreme value refers to the extreme value closest to the feature point time, and the distal extreme value refers to the extreme value farthest from the feature point time. Through the above algorithm, the dynamic feature value threshold can be calculated.
[0069] In another embodiment of the present invention, after determining the time of the characteristic point in the target sensor data, when determining the consistency change in other types of sensor data before and after the characteristic point time, the consistency change in other types of sensor data before and after the characteristic point time can be determined by determining the discreteness between the extreme values in the sensor data. Specifically, the data in the time period before and after the characteristic time point (counted as T1) is analyzed. Due to different sensor response speeds and different user behavior characteristics, sufficient characteristic values may not be obtained within the Tt time period. When sufficient features are obtained within a Tt period, n (n>0, n*Tt is recommended to be less than 4s or other small values) Tt can be postponed. The data extreme values within the previous n*Tt are counted with the characteristic time point data as the starting point:
[0070] 1) Take the characteristic value corresponding to the characteristic point time as an extreme point and push forward to find another extreme point, judge the discrete values of the two extreme points and compare them with the dynamic characteristic value threshold (the dynamic characteristic value threshold is determined according to the change direction of the maximum value or minimum value, for example, the current minimum value can be used as a reference point, such as the current minimum value is 20 degrees, then the dynamic characteristic value threshold is 60 degrees, and the subsequent current minimum value is 10 degrees, then the dynamic characteristic value threshold is 80 degrees). If the dynamic characteristic value threshold requirement is met, it is considered that the agreed state is met; if the dynamic characteristic value threshold requirement is not met and the discrete amplitude of the two extreme points is relatively small (such as 10 degrees, or it can be considered that the range of numerical fluctuation convergence), continue to push forward to find an extreme point with a relatively large discrete amplitude (such as 30 degrees, preferably, the minimum value in the agreed change threshold is used as a reference). If it is not found but the value is stable (for example, only the data at both ends have relatively large extreme value changes, but the extreme change is less than the dynamic threshold, and other data are stable and convergent), it can be considered that the agreed state is met, otherwise the following judgment is performed;
[0071] 2) If the extreme discrete value within n*Tt is less than the dynamic characteristic value threshold (dynamic threshold, with the minimum value as the reference point, for example, the minimum value is 30 degrees, then the threshold is 60 degrees, and if the minimum value is 10 degrees, then the threshold is 80 degrees), it is considered that the agreed state is not met;
[0072] 3) If the extreme value discrete values within n*Tt satisfy the dynamic eigenvalue threshold, determine whether there are other extreme value points within the two extreme value points that satisfy the eigenvalue. Continuing like this, find the extreme value point closer to the characteristic time point that satisfies the dynamic eigenvalue threshold. If such an extreme value point can be found and the data between the extreme value point and the characteristic point time also satisfies the corresponding consistent change (such as the data being stable or convergent), it is considered to meet the agreed conditions. If such an extreme value point cannot be found and the data after the extreme value point is stable or convergent, it can also be considered to meet the agreed state when n*Tt < C1;
[0073] If no extreme value point closer to the characteristic point time is found to satisfy the data characteristics under the above 3), but the monitoring data after the obtained characteristic point time are all extreme values of different types from the existing extreme values closest to the characteristic time point (for example, there was a minimum value of 30 before the characteristic point time, the data at the characteristic point time is the closest maximum value, and the data obtained in real time after the characteristic point time are 60, 62... all maximum values), an optional delay in judgment can be made to judge when more data is obtained, and it can also be considered to meet the agreed state. Among them, the dynamic eigenvalue threshold is a threshold judgment for the extreme value itself, and the dynamic eigenvalue threshold can be set accordingly according to the specific scenario, and the embodiments of the present invention do not make specific restrictions. In another embodiment of the present invention, the dynamic eigenvalue threshold can be calculated according to the following algorithm:
[0074]
[0075] Among them, K1, K2, and K3 are all calculated from the test curve. The proximal extreme value refers to the extreme value closest to the characteristic point time, and the distal extreme value is the extreme value farthest from the characteristic point time. Through the above algorithm, the dynamic eigenvalue threshold can be calculated.
[0076] In another abnormal scenario of the present invention, such as non-user subjective意愿 scenarios such as dropping the mobile terminal when playing with it or accidentally dropping it, and user subjective意愿 scenarios such as suddenly sitting or lying down on the mobile terminal in a relatively dark environment when using the mobile terminal, these scenarios can also use the judgment of certain sensor data to determine the user's viewing state, and can also distinguish and process by setting the dynamic eigenvalue threshold to determine the consistent change of each sensor (such as the gravity being 0 or negative, and the gyroscope direction change exceeding 360 degrees).
[0077] The above-mentioned meeting the agreed state means meeting the scene consistency change characteristics. Among them, the agreed characteristics of the eigenvalues of various scenarios, light, gravity, and gyroscope are shown in Table 1:
[0078] Table 1:
[0079]
[0080] In an embodiment of the present invention, the extreme feature point of the sensor data may be a feature value corresponding to the user operation time point when the user has not operated for a long time; the consistency change may be the consistency of the data of various sensors without feature values. The time during which the data of various sensors remain unchanged and the time of user operation from the current time are counted; when the time during which the data remain unchanged and the time during which the user operation from the current time are both greater than the preset first time threshold, the playback volume of the multimedia file is adjusted; when no user operation is detected within the second time threshold after adjusting the playback volume of the multimedia file, and the data of various sensors remain unchanged, it is determined that the viewing state of the user viewing the multimedia file is an abnormal state. Specifically, for a scene in which the user has not operated for a long time, the statistical data in various sensor data can be recorded as Tc (Tc is the smallest sensor value among the various sensor data that remain unchanged) and the time during which the user operation is from the current time Ti. When Min (Tc, Ti) is greater than the set threshold Tt, it is determined that the viewing state of the user is an abnormal state due to long-term inactivity.
[0081] Step 130: Control the playing status of the multimedia file according to the viewing status.
[0082] Wherein, when the viewing state of the user watching the multimedia file is abnormal, the playback of the multimedia file is paused. When the user's return is detected, the multimedia file is automatically played. Wherein, the extreme feature points and consistency changes of various sensor data can be continuously detected through the aforementioned steps to determine whether the user has returned. In an embodiment of the present invention, when the user's viewing state is abnormal due to long-term inactivity, the volume of the played audio can also be adjusted (for example, the volume is from 100 to 0, and the time is maintained for several seconds, such as 2s) to attract the user's attention. If the user does not operate and the sensor value continues to remain unchanged, the video playback can be paused and the screen turned off after the prompt is repeated n times (n>1). If there is a user operation behavior in the middle, the user behavior is recorded and the video playback is no longer actively monitored for pause operations.
[0083] In an embodiment of the present invention, in order to improve the user experience, when the sensor feature point time is detected, the playback state of the multimedia file is controlled, such as stopping the audio playback. When it is determined that an abnormal state is determined by consistency changes, the audio and video playback continues to be stopped.
[0084] The embodiment of the present invention obtains various sensor data of the mobile terminal; the various sensor data include at least one of gyroscope data, gravity sensor data and light intensity data; determines the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data; controls the playback state of the multimedia file according to the viewing state, can accurately judge the viewing state of the user viewing the multimedia file, intelligently pause the playback of the multimedia file, and improve the user experience.
[0085] Furthermore, the embodiments of the present invention can comprehensively determine the user's viewing status by detecting and judging the extreme feature points and consistency changes of various sensor data of the mobile terminal, combining the data of each sensor in the same time period, and can more accurately determine the user's current viewing status, thereby improving the accuracy of judging the user's viewing status. In the event of a sudden interruption in the user's video viewing, such as blocking, turning over, putting the mobile terminal in a bag or pocket, or similar scenarios, or the user not watching the video for a long time, the video playback environment information can be obtained in a timely manner, and the video playback can be intelligently paused, the screen turned off, or the screen is turned off after a period of time.
[0086] Figure 2 FIG. 1 is a schematic diagram showing the structure of a multimedia file playing device provided by an embodiment of the present invention. Figure 2 As shown, the device 300 includes:
[0087] An acquisition module 310 is used to acquire various sensor data of the mobile terminal;
[0088] A determination module 320, configured to determine a viewing status of the multimedia file by the user according to the extreme feature points and consistency changes of the sensor data;
[0089] The control module 330 is used to control the playing state of the multimedia file according to the viewing state.
[0090] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0091] Determine a characteristic point time in each type of sensor data, wherein the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold;
[0092] The viewing status of the user viewing the multimedia file is determined based on the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data; the consistency behavior detection time is the time when the change of the sensor extreme value between multiple first preset periods before the feature point time is greater than the first extreme value change threshold, and the time when the change of the sensor extreme value of each type of sensor between multiple first preset periods after the feature point time is less than the second extreme value change threshold.
[0093] In an optional manner, the sensor data includes gyroscope data, gravity sensor data, and light intensity data;
[0094] Determining the viewing status of the user viewing the multimedia file according to the feature point time in the various sensor data and the consistency behavior detection time in the various sensor data, including:
[0095] Calculate the time difference of the characteristic points of various sensor data to obtain the maximum value of the extreme time difference;
[0096] The viewing status of the user viewing the multimedia file is determined by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data.
[0097] In an optional manner, determining the viewing status of the user viewing the multimedia file by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data includes:
[0098] When Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2, it is determined that the viewing state of the user viewing the multimedia file is a first abnormal state;
[0099] When K*Max(tl11, tg11, ts11)+C2<Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is a second abnormal state;
[0100] When Max(Δ11, Δ12, Δ13)>K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is normal;
[0101] Among them, Max() represents the maximum value among multiple values, Δ11 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the gravity sensor; Δ12 represents the comparative extreme time difference between the feature point time of the gravity sensor and the feature point time of the light intensity; Δ13 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the light intensity; tl11 represents the first consistent behavior detection time of the gyroscope; tg11 represents the first consistent behavior detection time of the gravity sensor; ts11 represents the first consistent behavior detection time of the light intensity; K represents the relationship coefficient; C1 represents the user behavior deviation constant; C2 represents the device environment deviation constant.
[0102] In an optional manner, controlling the playback state of the multimedia file according to the viewing state includes: pausing the playback of the multimedia file when the viewing state of the multimedia file is abnormal;
[0103] After controlling the playing state of the multimedia file according to the viewing state, the method further includes: automatically playing the multimedia file when a user return is detected.
[0104] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0105] Determine a characteristic point time in the target sensor data; the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold;
[0106] Determine consistent changes in other types of sensor data before and after the feature point;
[0107] A viewing status of the multimedia file by the user is determined according to the consistency change.
[0108] In an optional manner, statistics are collected on the time during which the data of each type of sensor remains unchanged and the time between the user operation and the current time;
[0109] When the time for which the data remains unchanged and the time from the user operation to the current time are both greater than a preset first time threshold, adjusting the playback volume of the multimedia file;
[0110] When no user operation is detected within a second time threshold after the playback volume of the multimedia file is adjusted, and the data of each type of sensor remains unchanged, it is determined that the viewing state of the user viewing the multimedia file is an abnormal state.
[0111] The specific working process of the multimedia file playing device of the embodiment of the present invention is substantially consistent with the specific implementation steps of the above method embodiment, and will not be repeated here.
[0112] The embodiment of the present invention obtains various sensor data of the mobile terminal; the various sensor data include at least one of gyroscope data, gravity sensor data and light intensity data; determines the viewing status of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data; controls the playback status of the multimedia file according to the viewing status, and can intelligently pause the playback of the multimedia file, thereby improving the user experience.
[0113] Figure 3 The schematic diagram of the structure of the computer device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.
[0114] like Figure 3 As shown, the computer device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0115] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned embodiment of the method for playing multimedia files.
[0116] Specifically, the program 410 may include program code including computer executable instructions.
[0117] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0118] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0119] The program 410 may be specifically called by the processor 402 to enable the computer device to perform the following operations:
[0120] Obtain various sensor data from mobile terminals;
[0121] determining a viewing status of the multimedia file by a user according to extreme feature points and consistency changes of the sensor data;
[0122] The playing state of the multimedia file is controlled according to the viewing state.
[0123] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0124] Determine a characteristic point time in each type of sensor data, wherein the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold;
[0125] The viewing status of the user viewing the multimedia file is determined based on the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data; the consistency behavior detection time is the time when the change of the sensor extreme value between multiple first preset periods before the feature point time is greater than the first extreme value change threshold, and the time when the change of the sensor extreme value of each type of sensor between multiple first preset periods after the feature point time is less than the second extreme value change threshold.
[0126] In an optional manner, the sensor data includes gyroscope data, gravity sensor data, and light intensity data;
[0127] Determining the viewing status of the user viewing the multimedia file according to the feature point time in the various sensor data and the consistency behavior detection time in the various sensor data, including:
[0128] Calculate the time difference of the characteristic points of various sensor data to obtain the maximum value of the extreme time difference;
[0129] The viewing status of the user viewing the multimedia file is determined by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data.
[0130] In an optional manner, determining the viewing status of the user viewing the multimedia file by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data includes:
[0131] When Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2, it is determined that the viewing state of the user viewing the multimedia file is a first abnormal state;
[0132] When K*Max(tl11, tg11, ts11)+C2<Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is a second abnormal state;
[0133] When Max(Δ11, Δ12, Δ13)>K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is normal;
[0134] Among them, Max() represents the maximum value among multiple values, Δ11 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the gravity sensor; Δ12 represents the comparative extreme time difference between the feature point time of the gravity sensor and the feature point time of the light intensity; Δ13 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the light intensity; tl11 represents the first consistent behavior detection time of the gyroscope; tg11 represents the first consistent behavior detection time of the gravity sensor; ts11 represents the first consistent behavior detection time of the light intensity; K represents the relationship coefficient; C1 represents the user behavior deviation constant; C2 represents the device environment deviation constant.
[0135] In an optional manner, controlling the playback state of the multimedia file according to the viewing state includes: pausing the playback of the multimedia file when the viewing state of the multimedia file is abnormal;
[0136] After controlling the playing state of the multimedia file according to the viewing state, the method further includes: automatically playing the multimedia file when a user return is detected.
[0137] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0138] Determine a characteristic point time in the target sensor data; the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold;
[0139] Determine consistent changes in other types of sensor data before and after the feature point;
[0140] A viewing status of the multimedia file by the user is determined according to the consistency change.
[0141] In an optional manner, statistics are collected on the time during which the data of each type of sensor remains unchanged and the time between the user operation and the current time;
[0142] When the time for which the data remains unchanged and the time from the user operation to the current time are both greater than a preset first time threshold, adjusting the playback volume of the multimedia file;
[0143] When no user operation is detected within a second time threshold after the playback volume of the multimedia file is adjusted, and the data of each type of sensor remains unchanged, it is determined that the viewing state of the user viewing the multimedia file is an abnormal state.
[0144] The embodiment of the present invention obtains various sensor data of the mobile terminal; the various sensor data include at least one of gyroscope data, gravity sensor data and light intensity data; determines the viewing status of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data; controls the playback status of the multimedia file according to the viewing status, and can intelligently pause the playback of the multimedia file, thereby improving the user experience.
[0145] An embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores at least one executable instruction. When the executable instruction is executed on a computer device, the computer device executes the multimedia file playing method in any of the above method embodiments.
[0146] The executable instructions can be specifically used to cause the computer device to perform the following operations:
[0147] Obtain various sensor data from mobile terminals;
[0148] determining a viewing status of the multimedia file by a user according to extreme feature points and consistency changes of the sensor data;
[0149] The playing state of the multimedia file is controlled according to the viewing state.
[0150] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0151] Determine a characteristic point time in each type of sensor data, wherein the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold;
[0152] The viewing status of the user viewing the multimedia file is determined based on the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data; the consistency behavior detection time is the time when the change of the sensor extreme value between multiple first preset periods before the feature point time is greater than the first extreme value change threshold, and the time when the change of the sensor extreme value of each type of sensor between multiple first preset periods after the feature point time is less than the second extreme value change threshold.
[0153] In an optional manner, the sensor data includes gyroscope data, gravity sensor data, and light intensity data;
[0154] Determining the viewing status of the user viewing the multimedia file according to the feature point time in the various sensor data and the consistency behavior detection time in the various sensor data, including:
[0155] Calculate the time difference of the characteristic points of various sensor data to obtain the maximum value of the extreme time difference;
[0156] The viewing status of the user viewing the multimedia file is determined by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data.
[0157] In an optional manner, determining the viewing status of the user viewing the multimedia file by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data includes:
[0158] When Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2, it is determined that the viewing state of the user viewing the multimedia file is a first abnormal state;
[0159] When K*Max(tl11, tg11, ts11)+C2<Max(Δ11, Δ12, Δ13)<K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is a second abnormal state;
[0160] When Max(Δ11, Δ12, Δ13)>K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing state of the user viewing the multimedia file is normal;
[0161] Among them, Max() represents the maximum value among multiple values, Δ11 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the gravity sensor; Δ12 represents the comparative extreme time difference between the feature point time of the gravity sensor and the feature point time of the light intensity; Δ13 represents the comparative extreme time difference between the feature point time of the gyroscope and the feature point time of the light intensity; tl11 represents the first consistent behavior detection time of the gyroscope; tg11 represents the first consistent behavior detection time of the gravity sensor; ts11 represents the first consistent behavior detection time of the light intensity; K represents the relationship coefficient; C1 represents the user behavior deviation constant; C2 represents the device environment deviation constant.
[0162] In an optional manner, controlling the playback state of the multimedia file according to the viewing state includes: pausing the playback of the multimedia file when the viewing state of the multimedia file is abnormal;
[0163] After controlling the playing state of the multimedia file according to the viewing state, the method further includes: automatically playing the multimedia file when a user return is detected.
[0164] In an optional manner, determining the viewing state of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data includes:
[0165] Determine a characteristic point time in the target sensor data; the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold;
[0166] Determine consistent changes in other types of sensor data before and after the feature point;
[0167] A viewing status of the multimedia file by the user is determined according to the consistency change.
[0168] In an optional manner, statistics are collected on the time during which the data of each type of sensor remains unchanged and the time between the user operation and the current time;
[0169] When the time for which the data remains unchanged and the time from the user operation to the current time are both greater than a preset first time threshold, adjusting the playback volume of the multimedia file;
[0170] When no user operation is detected within a second time threshold after the playback volume of the multimedia file is adjusted, and the data of each type of sensor remains unchanged, it is determined that the viewing state of the user viewing the multimedia file is an abnormal state.
[0171] The embodiment of the present invention obtains various sensor data of the mobile terminal; the various sensor data include at least one of gyroscope data, gravity sensor data and light intensity data; determines the viewing status of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data; controls the playback status of the multimedia file according to the viewing status, and can intelligently pause the playback of the multimedia file, thereby improving the user experience.
[0172] An embodiment of the present invention provides a multimedia file playing device, which is used to execute the multimedia file playing method.
[0173] An embodiment of the present invention provides a computer program, which can be called by a processor to enable a computer device to execute the multimedia file playing method in any of the above method embodiments.
[0174] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed on a computer, the computer executes the multimedia file playing method in any of the above method embodiments.
[0175] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description made to specific languages above is for disclosing the best mode of the present invention.
[0176] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0177] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0178] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0179] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A multimedia file playing method, characterized in that: The method comprises: Obtain various sensor data from mobile terminals; Determining the viewing status of the user watching the multimedia file according to the extreme feature points and consistency changes of the sensor data, including: determining the feature point time of the extreme feature points in each type of the sensor data, the feature point time being a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold; determining the viewing status of the user watching the multimedia file according to the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data; the consistency behavior detection time is the time when the change of the sensor extreme value between multiple first preset periods before the feature point time is greater than the first extreme value change threshold, and the time when the change of the sensor extreme value of each type of sensor in multiple first preset periods after the feature point time is less than the second extreme value change threshold; The sensor data includes gyroscope data, gravity sensor data and light intensity data; determining the viewing state of the user viewing the multimedia file according to the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data, including: calculating the difference in the feature point time of each type of sensor data to obtain the maximum value of the extreme time difference; determining the viewing state of the user viewing the multimedia file by comparing the maximum value of the extreme time difference with the maximum value of the consistency behavior detection time of each type of sensor data; The determining the viewing status of the multimedia file by the user by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data includes: When Max(Δ11, Δ 12. Δ 13)<K*Max(tl11, tg11, ts11)+C2, determining that the viewing state of the user viewing the multimedia file is a first abnormal state; When K*Max(tl11, tg11, ts11)+C2<Max(Δ11, Δ 12. Δ 13)<K*Max(tl11, tg11, ts11)+C2+C1, determining that the viewing state of the user viewing the multimedia file is a second abnormal state; When Max(Δ11, Δ 12. Δ 13)>K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing status of the user viewing the multimedia file is normal; Among them, Max() represents the maximum value among multiple values, Δ11 represents the comparative extreme time difference between the characteristic point time of the gyroscope and the characteristic point time of the gravity sensor; Δ12 represents the comparative extreme time difference between the characteristic point time of the gravity sensor and the characteristic point time of the light intensity; Δ13 represents the comparative extreme time difference between the characteristic point time of the gyroscope and the characteristic point time of the light intensity; tl11 represents the first consistency behavior detection time of the gyroscope; tg11 represents the first consistency behavior detection time of the gravity sensor; ts11 represents the first consistency behavior detection time of the light intensity; K represents the relationship coefficient; C1 represents the user behavior deviation constant; C2 represents the device environment deviation constant; The playing state of the multimedia file is controlled according to the viewing state.
2. The method according to claim 1, characterized in that The controlling the playing state of the multimedia file according to the viewing state includes: When the viewing status of the multimedia file by the user is abnormal, pausing the playing of the multimedia file; After controlling the playing state of the multimedia file according to the viewing state, the method further includes: automatically playing the multimedia file when a user return is detected.
3. The method according to claim 1, characterized in that The determining, according to the extreme feature points and consistency changes of the sensor data, a viewing state of the user viewing the multimedia file includes: Determine a characteristic point time in the target sensor data; the characteristic point time is a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold; Determine consistent changes in other types of sensor data before and after the feature point; A viewing status of the multimedia file by the user is determined according to the consistency change.
4. The method according to claim 1, characterized in that The method further comprises: Count the time that the data of each type of sensor remains unchanged and the time from the user operation to the current time; When the time for which the data remains unchanged and the time from the user operation to the current time are both greater than a preset first time threshold, adjusting the playback volume of the multimedia file; When no user operation is detected within a second time threshold after the playback volume of the multimedia file is adjusted, and the data of each type of sensor remains unchanged, it is determined that the viewing state of the user viewing the multimedia file is an abnormal state.
5. A multimedia file playing device, characterized in that: The device comprises: An acquisition module is used to acquire various sensor data of the mobile terminal; A determination module, for determining the viewing status of the user viewing the multimedia file according to the extreme feature points and consistency changes of the sensor data, including: determining the feature point time of the extreme feature points in each type of the sensor data, the feature point time being a critical time point when the sensor extreme value changes from being greater than a first extreme value change threshold to being less than a second extreme value change threshold; the first extreme value change threshold is greater than the second extreme value change threshold; determining the viewing status of the user viewing the multimedia file according to the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data; the consistency behavior detection time is the time when the change of the sensor extreme value between multiple first preset periods before the feature point time is greater than the first extreme value change threshold, and the time when the change of the sensor extreme value of each type of sensor in multiple first preset periods after the feature point time is less than the second extreme value change threshold; The sensor data includes gyroscope data, gravity sensor data and light intensity data; determining the viewing state of the user viewing the multimedia file according to the feature point time in each type of sensor data and the consistency behavior detection time in each type of sensor data, including: calculating the difference in the feature point time of each type of sensor data to obtain the maximum value of the extreme time difference; determining the viewing state of the user viewing the multimedia file by comparing the maximum value of the extreme time difference with the maximum value of the consistency behavior detection time of each type of sensor data; The determining the viewing status of the multimedia file by the user by comparing the maximum value of the extreme value time difference with the maximum value of the consistency behavior detection time of various sensor data includes: When Max(Δ11, Δ 12. Δ 13)<K*Max(tl11, tg11, ts11)+C2, determining that the viewing state of the user viewing the multimedia file is a first abnormal state; When K*Max(tl11, tg11, ts11)+C2<Max(Δ11, Δ 12, Δ 13)<K*Max(tl11, tg11, ts11)+C2+C1, determining that the viewing state of the user viewing the multimedia file is a second abnormal state; When Max(Δ11, Δ 12, Δ 13)>K*Max(tl11, tg11, ts11)+C2+C1, it is determined that the viewing status of the user viewing the multimedia file is normal; Among them, Max() represents the maximum value among multiple values, Δ11 represents the comparative extreme time difference between the characteristic point time of the gyroscope and the characteristic point time of the gravity sensor; Δ12 represents the comparative extreme time difference between the characteristic point time of the gravity sensor and the characteristic point time of the light intensity; Δ13 represents the comparative extreme time difference between the characteristic point time of the gyroscope and the characteristic point time of the light intensity; tl11 represents the first consistency behavior detection time of the gyroscope; tg11 represents the first consistency behavior detection time of the gravity sensor; ts11 represents the first consistency behavior detection time of the light intensity; K represents the relationship coefficient; C1 represents the user behavior deviation constant; C2 represents the device environment deviation constant; The control module is used to control the playing state of the multimedia file according to the viewing state.
6. A computer device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the multimedia file playing method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on a computer device, the computer device executes the operation of the multimedia file playing method according to any one of claims 1 to 4.
