A method and device for determining playback progress

Through interval counting technology and bitMap data structure, the problem of inaccurate playback progress statistics in the existing technology is solved, more accurate progress calculation is achieved, and multiple statistics and missing statistics are avoided.

CN113779306BActive Publication Date: 2024-10-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010875821.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-25
Publication Date
2024-10-18
Estimated Expiration
2040-08-25

AI Technical Summary

Technical Problem

In the prior art, there are multiple statistics and missing statistics when counting playback progress, resulting in inaccurate playback progress.

Method used

Interval counting technology is used to divide the total playback time into multiple counting intervals. The counting intervals are obtained by monitoring playback events and pause/end events. The bitMap data structure is used for back-end processing to avoid repeated statistics and missing statistics.

Benefits of technology

It improves the calculation accuracy of playback progress, ensures the accuracy of progress statistics, and avoids excessive statistics or missing statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113779306B_ABST
    Figure CN113779306B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for determining playback progress, and relates to the field of computer technology. A specific implementation of the method includes: after monitoring that an object playback event is triggered, obtaining a first time point corresponding to the current playback position of the object, and determining a first counting interval where the first time point is located; after monitoring that an object pause event or a playback end event is triggered, obtaining a second time point corresponding to the object pause position or playback end position, and determining a second counting interval where the second time point is located; determining the counting interval from the first counting interval to the second counting interval, and determining the playback progress of the object based on the number of counting intervals. This implementation uses a bitMap data structure so that the playback duration of each counting interval is only counted once, avoiding multiple counting or missing counting, and improving the accuracy of progress calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In some scenarios, it is often necessary to check the progress of users' playback objects, such as learning platforms, where the audience level of the video can be determined by counting the viewing progress; such as level-breaking task platforms, where watching videos is a task and the task can only be completed when the actual viewing progress is greater than the set percentage.

[0003] Currently, when playing an object, the front end counts the current playback position and playback duration, and submits them to the back end for storage when the following events occur: the user fast-forwards, rewinds, closes the player, and the object is played normally.

[0004] 1) The backend divides the cumulative result of all playback durations by the total duration to obtain the playback progress percentage;

[0005] 2) The backend first determines whether the current playback position is less than the maximum playback position currently played by the user. If so, it is considered to be repeated playback, and the playback time is not accumulated. Finally, the accumulated result is divided by the total time to obtain the playback progress percentage.

[0006] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems:

[0007] 1) Method 1 has multiple statistics: When a user repeatedly plays a certain segment of an object, the front end will send the playback duration to the back end for accumulation multiple times, which will eventually appear as the repeated accumulation of the playback duration of the segment. The playback progress obtained by statistics is greater than the actual playback progress.

[0008] 2) Method 2 has a situation where statistics are missed: when the user object directly fast-forwards and then rewinds to a position smaller than the fast-forward position and pauses, the front end sends the playback position to the back end during fast-forwarding. During rewinding and pausing, the maximum playback position saved by the back end is larger than the current playback position. Therefore, the playback duration is not accumulated, and the playback progress obtained by statistics is smaller than the actual playback progress. Summary of the invention

[0009] In view of this, an embodiment of the present invention provides a method and device for determining a playback progress, which can at least solve the problems of inaccurate playback progress statistics, multiple statistics, and missed statistics in the prior art.

[0010] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for determining a playback progress is provided, comprising:

[0011] After monitoring that the object playback event is triggered, obtaining a first time point corresponding to the current playback position of the object, and determining a first counting interval in which the first time point is located;

[0012] After monitoring that an object pause event or a playback end event is triggered, obtaining a second time point corresponding to the object pause position or the playback end position, and determining a second counting interval in which the second time point is located;

[0013] Determine a counting interval from the first counting interval to the second counting interval, and determine a playback progress of the object based on the number of the counting intervals.

[0014] Optionally, determining the first counting interval in which the first time point is located includes:

[0015] The ratio of the first time point to the size of the counting interval is calculated, and the ratio is rounded down or rounded up to determine the first counting interval in which the ratio is located.

[0016] Optionally, determining the playback progress of the object based on the number of counting intervals includes:

[0017] Obtaining the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of counting intervals;

[0018] Determine a bit in the bit space corresponding to the counting interval, and set the value of the bit to a predetermined value;

[0019] The statistical value is the number of bits of the predetermined value, and the ratio of the number of bits to the total number of counting intervals is calculated, and the ratio is used as the playback progress of the object.

[0020] Optionally, determining the bit in the bit space corresponding to the counting interval includes:

[0021] Store the counting interval number and the object playback result in an array;

[0022] The result of obtaining the count interval number in the array is that the count interval number has been played, and the bit corresponding to the count interval number in the bit space is determined.

[0023] Optionally, storing the number of the counting interval and the object playback result in the array together also includes: for a counting interval, if there are multiple playback results, performing a union operation on the multiple playback results to obtain the playback result of the counting interval.

[0024] Optionally, obtaining the total number of counting intervals of the object includes: obtaining the total playback time of the object, calculating the ratio of the total playback time to the size of the counting interval and rounding up to obtain the total number of counting intervals.

[0025] Optionally, the method further includes: generating a key name based on the object identifier and the user identifier, and establishing a corresponding relationship between the key name and the bit space; and

[0026] In response to the operation of querying the bit space, the bit space corresponding to the user identifier and the identifier of the object is queried.

[0027] To achieve the above object, according to another aspect of an embodiment of the present invention, a device for determining a playback progress is provided, comprising:

[0028] A playing module, configured to obtain a first time point corresponding to a current playing position of the object after monitoring that an object playing event is triggered, and determine a first counting interval in which the first time point is located;

[0029] A pause module, configured to obtain a second time point corresponding to the object pause position or the playback end position after monitoring that an object pause event or a playback end event is triggered, and determine a second counting interval in which the second time point is located;

[0030] The calculation module is used to determine the counting interval from the first counting interval to the second counting interval, and determine the playback progress of the object based on the number of the counting intervals.

[0031] Optionally, the playback module is used to:

[0032] The ratio of the first time point to the size of the counting interval is calculated, and the ratio is rounded down or rounded up to determine the first counting interval in which the ratio is located.

[0033] Optionally, the computing module is used to:

[0034] Obtaining the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of counting intervals;

[0035] Determine a bit in the bit space corresponding to the counting interval, and set the value of the bit to a predetermined value;

[0036] The statistical value is the number of bits of the predetermined value, and the ratio of the number of bits to the total number of counting intervals is calculated, and the ratio is used as the playback progress of the object.

[0037] Optionally, the computing module is used to:

[0038] Store the counting interval number and the object playback result in an array;

[0039] The result of obtaining the count interval number in the array is that the count interval number has been played, and the bit corresponding to the count interval number in the bit space is determined.

[0040] Optionally, the computing module is further used for:

[0041] For a counting interval, if there are multiple playback results, a union operation is performed on the multiple playback results to obtain the playback result of the counting interval.

[0042] Optionally, the computing module is used to:

[0043] The total playback time of the object is obtained, and the ratio of the total playback time to the size of the counting interval is calculated and rounded up to obtain the total number of the counting intervals.

[0044] Optionally, the computing module is further used for:

[0045] Based on the object identifier and the user identifier, a key name is generated, and a corresponding relationship between the key name and the bit space is established; and

[0046] In response to the operation of querying the bit space, the bit space corresponding to the user identifier and the identifier of the object is queried.

[0047] To achieve the above objective, according to another aspect of an embodiment of the present invention, a playback progress determination electronic device is provided.

[0048] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned playback progress determination methods.

[0049] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned methods for determining playback progress is implemented.

[0050] According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: abandoning the idea of ​​accumulating playback time, the front-end divides the total playback time of the object into multiple counting intervals based on the interval counting technology, and retains the played counting intervals in the form of an array; the back-end uses the bitMap data structure so that each counting interval is only counted once, avoiding multiple counting or missing statistics, and improving the accuracy of progress calculation.

[0051] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0053] Figure 1 is a schematic diagram of the main flow of a method for determining a playback progress according to an embodiment of the present invention;

[0054] Figure 2 is a flow chart of an optional method for determining playback progress according to an embodiment of the present invention;

[0055] Figure 3 is a flowchart of a specific method for determining playback progress according to an embodiment of the present invention;

[0056] Figure 4 is a schematic diagram of main modules of a device for determining a playback progress according to an embodiment of the present invention;

[0057] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0058] Figure 6 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0060] It should be noted that this solution is applicable to playing videos or voices with a fixed total playing time, and is mainly described by taking the playing of videos as an example.

[0061] See also Figure 1 , which shows a main flow chart of a method for determining a playback progress provided by an embodiment of the present invention, comprising the following steps:

[0062] S101: after monitoring that an object playback event is triggered, obtaining a first time point corresponding to a current playback position of the object, and determining a first counting interval in which the first time point is located;

[0063] S102: after monitoring that an object pause event or a playback end event is triggered, obtaining a second time point corresponding to the object pause position or the playback end position, and determining a second counting interval in which the second time point is located;

[0064] S103: Determine a counting interval from the first counting interval to the second counting interval, and determine a playback progress of the object based on the number of the counting intervals.

[0065] In the above implementation, for steps S101 and S102, first determine the total number of counting intervals of the object totalIndexNum = RoundUp(videoLength / interval); wherein RoundUp represents rounding up, videoLength represents the total playback time, and interval represents the size of the counting interval, which can be customized by users or developers according to business characteristics, such as 500ms, 1s, 5s, etc.

[0066] Set currentTime to indicate the playback position of the object in the current player. The counting interval is index, which can start from 0 or 1:

[0067] 1)Index starts numbering from 0 and the maximum is totalIndexNum-1, such as 0, 1, 2, ..., totalIndexNum-1.

[0068] If the remainder of currentTime%interval is 0, the counting interval number index = current Time / interval-1, otherwise it is RoundDown(currentTime / interval). Assuming that the time point of the current playback position is 20s and the counting interval size is 3s, the ratio of the two is 6.67, which is rounded down to 6, and the counting interval number 6 is obtained.

[0069] 2)Index starts numbering from 1 and the maximum is totalIndexNum, such as 1, 2, 3, ..., totalIndexNum.

[0070] If the remainder of currentTime%interval is 0, the counting interval number index=current Time / interval, otherwise it is RoundUp(currentTime / interval). Similarly, assuming that the time point of the current playback position is 20s, the counting interval size is 3s, corresponding to the 7th counting interval, the counting interval number is 7.

[0071] In addition, each counting interval corresponds to a certain time point. Taking the counting interval size of 3s as an example, 16-18s corresponds to the 6th counting interval, and 19-21s corresponds to the 7th counting interval. Therefore, no matter whether the index starts from 0 or 1, the counting interval where the ratio is located can be determined first.

[0072] Set the listener object playback event on the front end. When the event is triggered, call the setInterval() method to specify the counting interval size as the period to count the first counting interval of the playback object. Set the object pause event and the object playback end event. When clearInterval() is called or the window is closed, setInterval() stops executing the function and determines the second counting interval of the position when the pause or playback stops. The object playback end includes two situations: the normal playback of the object is completed and the player is closed.

[0073] Taking video pause as an example, the execution code is as follows:

[0074] / / Video pause

[0075] pauseEvent()

[0076] clearInterval(this.timer);

[0077] }

[0078] For step S103, after the playback of the object is paused or ended, the front end sends the counting intervals from the first counting interval to the second counting interval (including the first counting interval, the second counting interval and the counting intervals between the two) to the back end through the Restful interface, so that the back end can calculate the playback progress based on the number of counting intervals and the total number of counting intervals of the object.

[0079] The formula for the actual object playback progress is as follows:

[0080] progress=bitOneNum / totalIndexNum

[0081] Among them, progress indicates the progress of the object playback, and the unit is percentage; bitOneNum indicates the cumulative total of the counting interval, and totalIndexNum indicates the total number of the counting interval.

[0082] The subsequent backend processing obtains the object playback progress. The front end can obtain the object playback progress from the back end through the RestFul interface to perform playback in different scenarios. For example, in the task execution platform, it is determined whether the progress meets the required percentage. If it meets the percentage, it means the task is completed.

[0083] The method provided in the above embodiment abandons the idea of ​​accumulating the playback time, divides the total playback time of the object into multiple counting intervals, determines the played counting intervals according to the playback position, and provides a data basis for calculating the playback progress.

[0084] See also Figure 2 , shows a schematic diagram of an optional playback progress determination process according to an embodiment of the present invention, comprising the following steps:

[0085] S201: after monitoring that an object playback event is triggered, obtaining a first time point corresponding to a current playback position of the object, and determining a first counting interval in which the first time point is located;

[0086] S202: after monitoring that an object pause event or a playback end event is triggered, obtaining a second time point corresponding to the object pause position or the playback end position, and determining a second counting interval in which the second time point is located;

[0087] S203: determining a counting interval from the first counting interval to the second counting interval, obtaining a total number of counting intervals of the object, and establishing a bit space corresponding to the total number of counting intervals;

[0088] S204: Determine a bit in the bit space corresponding to the counting interval, and set the value of the bit to a predetermined value;

[0089] S205: Counting the number of bits whose value is the predetermined value, calculating the ratio of the number of bits to the total number of counting intervals, and using the ratio as the playback progress of the object.

[0090] In the above embodiment, for steps S201 and S202, see Figure 1 The description of steps S101 and S102 is not repeated here.

[0091] In the above implementation, for steps S203 to S205, the backend provides two RestfulApis, which are used to save the object playback interval counting data and transmit the playback progress, respectively, and both are interfaces provided to the outside.

[0092] The counting interval numbers are continuous and dense, and usually large in number. Therefore, in order to save backend storage space, Bit-map (bitmap and massive data processing) or long array storage can be used. Bit-map is preferred in this solution.

[0093] The basic idea of ​​Bit-map is to use a bit to mark the value corresponding to an element, and the key is the element. Since Bit-map uses bits to store data, it can greatly save storage space. The design is as follows:

[0094] key=videoId:userId

[0095] offset=index

[0096] value = 0 or 1

[0097] Among them, videoId represents the id of the object being played, which is used to uniquely identify an object; userId represents the user id of the object being played, which is used to uniquely identify a user; offset represents the position of the bit, that is, the index of each counting interval of the object that has been played; value indicates whether the object has been played, 1 indicates that it has been played, and 0 indicates that it has not been played.

[0098] Furthermore, a fixed prefix can be added to the key according to the business scenario, such as user:video:progress, which indicates the progress of the user playing the video, or it can be replaced with other string representations.

[0099] Suppose you want to sort the five counting intervals (4, 7, 2, 5, 3) from 0 to 7 (here we assume that the counting intervals are not repeated). First, create an 8-byte space and set all bytes in this space to 0. Then traverse these five counting intervals. The first counting interval is numbered 4. Starting from the left, set the value of the fifth byte to 1. Do the same for the remaining counting intervals. Finally, you get:

[0100] 0 0 1 1 1 1 0 1

[0101] Traverse the bytes area and output the positions (2, 3, 4, 5, 7) with a value of 1 to achieve the purpose of sorting. Establish the correspondence between the key and the byte space, and construct the Bit-map data to store the user ID, object ID, and playback result as a data structure.

[0102] Furthermore, when the user plays forward and backward or repeatedly plays the same object segment, a union operation can be performed based on all its playback results. As long as there is one playback, the playback result is set to have been played.

[0103] At this time, the formula for the actual object playback progress is as follows:

[0104] progress=bitOneNum / totalIndexNum

[0105] Among them, progress indicates the progress of object playback, and the unit is percentage; bitOneNum indicates the cumulative total number of counting intervals with bit value 1, and totalIndexNum indicates the total number of counting intervals.

[0106] The method provided in the above embodiment is based on the interval counting technology and uses the bitMap data structure to perform a union operation on the playback results of each counting interval, and only counts the playback time once, avoiding multiple counting or missing counting.

[0107] See also Figure 3 , shows a schematic flow chart of another optional method for determining playback progress according to an embodiment of the present invention, comprising the following steps:

[0108] S301: after monitoring that an object playback event is triggered, obtaining a first time point corresponding to a current playback position of the object, and determining a first counting interval in which the first time point is located;

[0109] S302: after monitoring that an object pause event or a playback end event is triggered, obtaining a second time point corresponding to the object pause position or the playback end position, and determining a second counting interval in which the second time point is located;

[0110] S303: storing the number of the counting interval and the object playback result together in an array;

[0111] S304: Obtain the total number of counting intervals of the object, and establish a bit space corresponding to the total number of counting intervals;

[0112] S305: Obtain the number of the counting interval whose result is played in the array, determine the bit corresponding to the counting interval number in the bit space, and set the value of the bit to a predetermined value;

[0113] S306: Counting the number of bits whose value is the predetermined value, calculating the ratio of the number of bits to the total number of counting intervals, and using the ratio as the playback progress of the object.

[0114] In the above embodiment, for steps S301 to S302, see Figure 1 For the description of steps S101 and S102, steps S304 and S306, see Figure 2 The description of steps S203 and S205 is not repeated here.

[0115] In the above implementation, for steps S303 and S305, in order to simplify the data processing operation, the playback results of each counting interval can be recorded in the form of an array, and the played array is set to a predetermined value, such as 1.

[0116] Taking video playback as an example, the operation code is as follows:

[0117] / / Video playback event

[0118] playEvent:function(){

[0119] this.timer=setlntervaK handler: ()=>{

[0120] / / Video playback statistics interval serial number

[0121] let index=this.player.currentTime / this.interval;

[0122] / / Set this interval to 1, indicating that it has been watched

[0123] this.s[index] = 1;

[0124] },this.interval);

[0125] }

[0126] Among them, this.s[index] is an array, indicating whether the video in the index-th counting interval is played, and the subscript is the counting interval number, 1 means it has been played, and 0 means it has not been played (0 / 1 is just an example). For example, if the counting interval size is 1, and the user has played to the 4th second, then define array A, A[0]=1, A[1]=1, A[2]=1, A[3]=1, indicating that 1 to 4 seconds have been played.

[0127] It should be noted that there is only one array of counting interval numbers for each played object. For example, in the above example, the current playback position is 20 seconds, the counting interval size is 3 seconds, and the 7th counting interval is calculated. The corresponding array is A[7]=1. The array for 19 seconds is the same, and only one is retained.

[0128] Therefore, although the array can be generated by time points, counting interval numbers and playback results, the purpose of this solution is to calculate the playback progress and the dependence on time points is relatively small, so the method of not including time points in the array is preferred.

[0129] In addition, the counting interval size cannot be set too large. For example, although the array is obtained in the above example, the object of 20 to 21 seconds in the counting interval is still not played, and there is a certain error. In this case, the counting interval needs to be adaptively reduced. For example, videos are usually played in seconds, so it is preferred to set the counting interval size to 1 second playback unit.

[0130] The method provided in the above embodiment abandons the idea of ​​accumulating playback time. The front-end divides the total playback time of the object into multiple counting intervals based on the interval counting technology, and retains the played counting intervals in the form of an array; the back-end uses the bitMap data structure so that the playback time of each counting interval is only counted once, avoiding multiple counting or missing counting, and improving the accuracy of progress calculation.

[0131] See also Figure 4 , shows a schematic diagram of main modules of a playback progress determination device 400 provided in an embodiment of the present invention, including:

[0132] The playing module 401 is used to obtain a first time point corresponding to the current playing position of the object after monitoring that the object playing event is triggered, and determine a first counting interval in which the first time point is located;

[0133] The pause module 402 is used to obtain a second time point corresponding to the object pause position or the playback end position after monitoring that the object pause event or the playback end event is triggered, and determine the second counting interval where the second time point is located;

[0134] The calculation module 403 is used to determine the counting interval from the first counting interval to the second counting interval, and determine the playback progress of the object based on the number of the counting intervals.

[0135] In the implementation device of the present invention, the playback module 401 is used to:

[0136] The ratio of the first time point to the size of the counting interval is calculated, and the ratio is rounded down or rounded up to determine the first counting interval in which the ratio is located.

[0137] In the implementation device of the present invention, the calculation module 403 is used to:

[0138] Obtaining the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of counting intervals;

[0139] Determine a bit in the bit space corresponding to the counting interval, and set the value of the bit to a predetermined value;

[0140] The statistical value is the number of bits of the predetermined value, and the ratio of the number of bits to the total number of counting intervals is calculated, and the ratio is used as the playback progress of the object.

[0141] In the implementation device of the present invention, the calculation module 403 is used to:

[0142] The number of the counting interval and the object playback result are stored in an array;

[0143] The result of obtaining the count interval number in the array is that the count interval number has been played, and the bit corresponding to the count interval number in the bit space is determined.

[0144] In the implementation device of the present invention, the calculation module 403 is further used for: for a counting interval, if there are multiple playback results, then a union operation is performed on the multiple playback results to obtain the playback result of the counting interval.

[0145] In the implementation device of the present invention, the calculation module 403 is used to: obtain the total playback time of the object, calculate the ratio of the total playback time to the size of the counting interval and round it up to obtain the total number of the counting intervals.

[0146] In the implementation device of the present invention, the calculation module 403 is further used to: generate a key name based on the identifier of the object and the user identifier, and establish a corresponding relationship between the key name and the bit space; and

[0147] In response to the operation of querying the bit space, the bit space corresponding to the user identifier and the identifier of the object is queried.

[0148] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.

[0149] Figure 5 An exemplary system architecture 500 is shown in which embodiments of the present invention may be applied.

[0150] like Figure 5 As shown, the system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505 (just an example). The network 504 is used to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0151] The user can use the terminal devices 501, 502, 503 to interact with the server 505 through the network 504 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 501, 502, 503.

[0152] The terminal devices 501 , 502 , and 503 may be various electronic devices having display screens and supporting web browsing, and the server 505 may be a server providing various services.

[0153] It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the device is generally set in the server 505 .

[0154] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0155] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0156] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0157] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0158] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.

[0159] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0160] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and playback of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or playback, or can be implemented with a combination of dedicated hardware and computer instructions.

[0161] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a play module, a pause module, and a calculation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the calculation module may also be described as a "play progress calculation module."

[0162] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0163] After monitoring that the object playback event is triggered, obtaining a first time point corresponding to the current playback position of the object, and determining a first counting interval in which the first time point is located;

[0164] After monitoring that an object pause event or a playback end event is triggered, obtaining a second time point corresponding to the object pause position or the playback end position, and determining a second counting interval in which the second time point is located;

[0165] Determine a counting interval from the first counting interval to the second counting interval, and determine a playback progress of the object based on the number of the counting intervals.

[0166] According to the technical solution of the embodiment of the present invention, the front end divides the total playback time of the object into multiple counting intervals based on the interval counting technology, and retains the played counting intervals in the form of an array, so that the playback time of each counting interval is only counted once; the back end uses the bitMap data structure to process the array, avoiding multiple counting or missing counting, and improving the accuracy of progress calculation.

[0167] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for determining a playback progress, characterized in that: include: After monitoring that the object playback event is triggered, obtaining a first time point corresponding to the current playback position of the object, and determining a first counting interval in which the first time point is located; After monitoring that an object pause event or a playback end event is triggered, obtaining a second time point corresponding to the object pause position or the playback end position, and determining a second counting interval in which the second time point is located; Determining a counting interval from the first counting interval to the second counting interval, and determining a playback progress of the object based on the number of the counting intervals, comprises: Obtaining the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of counting intervals; Determine a bit in the bit space corresponding to the counting interval, and set the value of the bit to a predetermined value; The statistical value is the number of bits of the predetermined value, calculating the ratio of the number of bits to the total number of counting intervals, and using the ratio as the playback progress of the object; Based on the object identifier and the user identifier, a key name is generated, and a corresponding relationship between the key name and the bit space is established; and In response to the operation of querying the bit space, the bit space corresponding to the user identifier and the identifier of the object is queried.

2. The method according to claim 1, characterized in that The determining the first counting interval in which the first time point is located includes: The ratio of the first time point to the size of the counting interval is calculated, and the ratio is rounded down or rounded up to determine the first counting interval in which the ratio is located.

3. The method according to claim 1, characterized in that: The determining of the bit position in the bit space corresponding to the counting interval includes: Store the counting interval number and the object playback result in an array; The result of obtaining the count interval number in the array is that the count interval number has been played, and the bit corresponding to the count interval number in the bit space is determined.

4. The method according to claim 3, characterized in that The step of storing the number of the counting interval and the object playback result in an array together also includes: For a counting interval, if there are multiple playback results, a union operation is performed on the multiple playback results to obtain the playback result of the counting interval.

5. The method according to claim 1, characterized in that The obtaining the total number of counting intervals of the object includes: The total playback time of the object is obtained, and the ratio of the total playback time to the size of the counting interval is calculated and rounded up to obtain the total number of the counting intervals.

6. A device for determining a playback progress, characterized in that: include: A playing module, configured to obtain a first time point corresponding to a current playing position of the object after monitoring that an object playing event is triggered, and determine a first counting interval in which the first time point is located; A pause module, configured to obtain a second time point corresponding to the object pause position or the playback end position after monitoring that an object pause event or a playback end event is triggered, and determine a second counting interval in which the second time point is located; A calculation module, configured to determine a counting interval from the first counting interval to the second counting interval, and determine a playback progress of the object based on the number of the counting intervals, comprising: Obtaining the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of counting intervals; Determine a bit in the bit space corresponding to the counting interval, and set the value of the bit to a predetermined value; The statistical value is the number of bits of the predetermined value, calculating the ratio of the number of bits to the total number of counting intervals, and using the ratio as the playback progress of the object; Based on the object identifier and the user identifier, a key name is generated, and a corresponding relationship between the key name and the bit space is established; and In response to the operation of querying the bit space, the bit space corresponding to the user identifier and the identifier of the object is queried.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and device for regulating streaming media data transmission

    CN104509061A

  • Method and device for dividing video duration

    CN106658228A