Method and device for determining playing progress

文档序号:1952860 发布日期:2021-12-10 浏览:11次 中文

阅读说明:本技术 一种播放进度确定方法和装置 (Method and device for determining playing progress ) 是由 胡艳侠 于 2020-08-25 设计创作,主要内容包括:本发明公开了一种播放进度确定方法和装置,涉及计算机技术领域。该方法的一具体实施方式包括:在监听到对象播放事件被触发后,获取与对象的当前播放位置对应的第一时间点,确定第一时间点所处第一记数区间;在监听到对象暂停事件或播放结束事件被触发后,获取与对象暂停位置或播放结束位置对应的第二时间点,确定第二时间点所处第二记数区间;确定从第一记数区间到第二记数区间的记数区间,基于记数区间的数量确定对象的播放进度。该实施方式使用bitMap数据结构使得对于每个记数区间的播放时长只会统计一次,避免了多统计或漏统计的情况,提高了进度计算的准确性。(The invention discloses a method and a device for determining playing progress, and relates to the technical field of computers. One embodiment of the method comprises: after monitoring that an object playing event is triggered, acquiring a first time point corresponding to the current playing position of the object, and determining a first counting interval where the first time point is located; after monitoring that the object pause event or the play end event is triggered, acquiring a second time point corresponding to the object pause position or the play end position, and determining a second counting interval where the second time point is located; and determining a counting interval from the first counting interval to the second counting interval, and determining the playing progress of the object based on the number of the counting intervals. The implementation mode uses the bitMap data structure to enable the playing duration of each counting interval to be counted only once, so that the condition of multiple counting or missing counting is avoided, and the accuracy of progress calculation is improved.)

1. A playing progress determination method is characterized by comprising the following steps:

after monitoring that an object playing event is triggered, acquiring a first time point corresponding to the current playing position of an object, and determining a first counting interval where the first time point is located;

after monitoring that an object pause event or a play end event is triggered, acquiring a second time point corresponding to an object pause position or a play end position, and determining a second counting interval where the second time point is located;

and determining a counting interval from the first counting interval to the second counting interval, and determining the playing progress of the object based on the number of the counting intervals.

2. The method of claim 1, wherein determining the first count interval at the first time point comprises:

and calculating the ratio of the first time point to the size of the counting interval, and rounding the ratio downwards or upwards to determine the first counting interval in which the ratio is positioned.

3. The method of claim 1, wherein determining the playback progress of the object based on the number of counting intervals comprises:

acquiring the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of the counting intervals;

determining a bit corresponding to the counting interval in the bit space, and setting the value of the bit to a preset value;

and calculating the ratio of the number of the bits to the total number of the counting intervals, and taking the ratio as the playing progress of the object.

4. The method of claim 3, wherein the determining the bits in the bit space corresponding to the count interval comprises:

storing the number of the counting interval and the object playing result into an array together;

and acquiring the counting interval number which has been played as a result in the array, and determining the bit corresponding to the counting interval number in the bit space.

5. The method of claim 4, wherein storing the number of the counting interval and the object playing result into an array together comprises:

and for a counting interval, if a plurality of playing results exist, carrying out union operation on the plurality of playing results to obtain the playing result of the counting interval.

6. The method of claim 3, wherein obtaining the total number of counting intervals of the subject comprises:

and acquiring the total playing time length of the object, calculating the ratio of the total playing time length to the size of the counting interval, and rounding up to obtain the total number of the counting interval.

7. The method of claim 3, further comprising:

generating a key name based on the identification of the object and the user identification, and establishing a corresponding relation between the key name and the bit space; and

and responding to the operation of inquiring the bit space, and inquiring the bit space corresponding to the user identification and the identification of the object.

8. A playback progress determining apparatus, comprising:

the playing module is used for acquiring a first time point corresponding to the current playing position of the object after monitoring that an object playing event is triggered, and determining a first counting interval where the first time point is located;

the pause module is used for acquiring a second time point corresponding to the pause position or the play end position of the object and determining a second counting interval in which the second time point is located after monitoring that the pause event or the play end event of the object is triggered;

and the calculating module is used for determining a counting interval from the first counting interval to the second counting interval and determining the playing progress of the object based on the number of the counting intervals.

9. An electronic device, comprising:

one or more processors;

a storage device for storing one or more programs,

when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.

10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.

Technical Field

The invention relates to the technical field of computers, in particular to a method and a device for determining playing progress.

Background

In some scenes, the progress of a user playing object is often required to be checked, such as a learning platform, and the audience degree of a video is judged by counting the watching progress; for example, in a breakthrough type task platform, a video is watched as a task, and the task can be completed only when the actual watching progress is larger than a set percentage.

At present, when an object is played, the front end counts the current playing position and playing duration, and submits the current playing position and playing duration to the back end for storage when the following events occur: the user fast forwards, backwards, closes the player and the object plays normally.

1) The back end divides the accumulated results of all the playing time lengths by the total time length to obtain the percentage of the playing progress;

2) the back end firstly judges whether the current playing position is smaller than the maximum playing position played by the user at present, if so, the playing is considered to be repeated, the playing time length is not accumulated, and finally the accumulated result is divided by the total time length to obtain the playing progress percentage.

In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:

1) in the first mode, there are multiple statistical cases: when a user repeatedly plays a certain segment of an object, the front end sends the playing duration to the rear end for accumulation for multiple times, the accumulation is finally expressed as the repeated accumulation of the playing duration of the segment, and the playing progress obtained through statistics is larger than the actual playing progress.

2) The case of missing statistics exists in the second mode: when the user object is directly fast forwarded and then replayed to a position smaller than the fast forwarding position for pause, the front end sends the playing position to the rear end during fast forwarding, and the maximum playing position stored by the rear end is larger than the current playing position during rewind pause, so that the playing time length of the time is not accumulated, and the counted playing progress is smaller than the actual playing progress.

Disclosure of Invention

In view of this, embodiments of the present invention provide a method and an apparatus for determining a playing progress, which can at least solve the problems of inaccurate statistics of the playing progress, multiple statistics, and missed statistics in the prior art.

In order to achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a play progress determining method including:

after monitoring that an object playing event is triggered, acquiring a first time point corresponding to the current playing position of an object, and determining a first counting interval where the first time point is located;

after monitoring that an object pause event or a play end event is triggered, acquiring a second time point corresponding to an object pause position or a play end position, and determining a second counting interval where the second time point is located;

and determining a counting interval from the first counting interval to the second counting interval, and determining the playing progress of the object based on the number of the counting intervals.

Optionally, the determining a first counting interval where the first time point is located includes:

and calculating the ratio of the first time point to the size of the counting interval, and rounding the ratio downwards or upwards to determine the first counting interval in which the ratio is positioned.

Optionally, the determining the playing progress of the object based on the number of the counting intervals includes:

acquiring the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of the counting intervals;

determining a bit corresponding to the counting interval in the bit space, and setting the value of the bit to a preset value;

and calculating the ratio of the number of the bits to the total number of the counting intervals, and taking the ratio as the playing progress of the object.

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

storing the number of the counting interval and the object playing result into an array together;

and acquiring the counting interval number which has been played as a result in the array, and determining the bit corresponding to the counting interval number in the bit space.

Optionally, the storing the number of the counting interval and the object playing result into an array together further includes: and for a counting interval, if a plurality of playing results exist, carrying out union operation on the plurality of playing results to obtain the playing result of the counting interval.

Optionally, the obtaining of the total number of counting intervals of the object includes: and acquiring the total playing time length of the object, calculating the ratio of the total playing time length to the size of the counting interval, and rounding up to obtain the total number of the counting interval.

Optionally, the method further includes: generating a key name based on the identification of the object and the user identification, and establishing a corresponding relation between the key name and the bit space; and

and responding to the operation of inquiring the bit space, and inquiring the bit space corresponding to the user identification and the identification of the object.

To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a play progress determining apparatus including:

the playing module is used for acquiring a first time point corresponding to the current playing position of the object after monitoring that an object playing event is triggered, and determining a first counting interval where the first time point is located;

the pause module is used for acquiring a second time point corresponding to the pause position or the play end position of the object and determining a second counting interval in which the second time point is located after monitoring that the pause event or the play end event of the object is triggered;

and the calculating module is used for determining a counting interval from the first counting interval to the second counting interval and determining the playing progress of the object based on the number of the counting intervals.

Optionally, the playing module is configured to:

and calculating the ratio of the first time point to the size of the counting interval, and rounding the ratio downwards or upwards to determine the first counting interval in which the ratio is positioned.

Optionally, the calculating module is configured to:

acquiring the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of the counting intervals;

determining a bit corresponding to the counting interval in the bit space, and setting the value of the bit to a preset value;

and calculating the ratio of the number of the bits to the total number of the counting intervals, and taking the ratio as the playing progress of the object.

Optionally, the calculating module is configured to:

storing the number of the counting interval and the object playing result into an array together;

and acquiring the counting interval number which has been played as a result in the array, and determining the bit corresponding to the counting interval number in the bit space.

Optionally, the calculating module is further configured to:

and for a counting interval, if a plurality of playing results exist, carrying out union operation on the plurality of playing results to obtain the playing result of the counting interval.

Optionally, the calculating module is configured to:

and acquiring the total playing time length of the object, calculating the ratio of the total playing time length to the size of the counting interval, and rounding up to obtain the total number of the counting interval.

Optionally, the calculating module is further configured to:

generating a key name based on the identification of the object and the user identification, and establishing a corresponding relation between the key name and the bit space; and

and responding to the operation of inquiring the bit space, and inquiring the bit space corresponding to the user identification and the identification of the object.

To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an electronic device for determining a play progress.

The electronic device of the embodiment of the invention comprises: one or more processors; a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement any of the above-described play progress determination methods.

To achieve the above object, according to a further aspect of the embodiments of the present invention, there is provided a computer-readable medium having a computer program stored thereon, the program, when executed by a processor, implementing any one of the above-mentioned play progress determination methods.

According to the scheme provided by the invention, one embodiment of the invention has the following advantages or beneficial effects: abandoning the idea of accumulating the playing time length, dividing the total playing time length of an object into a plurality of counting intervals by using a technology of counting the number of intervals at the front end, and reserving the played counting intervals in an array form; the back end uses the bitMap data structure to make statistics only once for each counting interval, thereby avoiding the condition of multi-statistics or missing statistics and improving the accuracy of progress calculation.

Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.

Drawings

The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:

fig. 1 is a schematic main flow chart of a play progress determining method according to an embodiment of the present invention;

fig. 2 is a flowchart illustrating an alternative method for determining a playing progress according to an embodiment of the present invention;

fig. 3 is a flowchart illustrating a specific play progress determining method according to an embodiment of the present invention;

fig. 4 is a schematic diagram of main blocks of a play progress determination apparatus according to an embodiment of the present invention;

FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;

FIG. 6 is a schematic block diagram of a computer system suitable for use with a mobile device or server implementing an embodiment of the invention.

Detailed Description

Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

It should be noted that the present solution is applicable to playing a video or a voice with a fixed total duration, and mainly takes playing video as an example for description.

Referring to fig. 1, a main flowchart of a method for determining a play progress provided by an embodiment of the present invention is shown, including the following steps:

s101: after monitoring that an object playing event is triggered, acquiring a first time point corresponding to the current playing position of an object, and determining a first counting interval where the first time point is located;

s102: after monitoring that an object pause event or a play end event is triggered, acquiring a second time point corresponding to an object pause position or a play end position, and determining a second counting interval where the second time point is located;

s103: and determining a counting interval from the first counting interval to the second counting interval, and determining the playing progress of the object based on the number of the counting intervals.

In the above embodiment, in steps S101 and S102, first, the total number totalIndexNum of the counting intervals to be targeted is determined to be RoundUp (videoLength/interval); the Rou ndUp indicates rounding up, the videoLength indicates the total playing time, and the interval indicates the size of the counting interval, which can be customized by a user or a developer according to service characteristics, such as 500ms, 1s, 5s, and the like.

Setting currentTime to indicate the playing position of the object in the current player, where the number of the counting interval is index, which may be from 0, or from 1:

1) index is numbered from 0 and is at most totalIndexNum-1, such as 0, 1, 2, …, totalIndexNum-1.

If the remainder of the current Time% interval is 0, the count interval number index is current Time/interval-1, otherwise it is RoundDown (current Time/interval). Assuming that the time point of the current playing position is 20s, the size of the counting interval is 3s, the ratio of the two is 6.67, and the number of the counting interval is 6 by rounding down.

2) index is numbered from 1 and is at most totalIndexNum, such as 1, 2,3, …, totalIndexNum.

If the remainder of the current Time% interval is 0, the count interval number index is current Time/interval, otherwise, it is routup (current Time/interval). Also, assume that the time point of the current playing position is 20s, the size of the counting interval is 3s, and the counting interval number is 7 corresponding to the 7 th counting interval.

Besides, each counting interval corresponds to a certain time point, and similarly, the counting interval size is 3s, 16-18 s correspond to the 6 th counting interval, and 19-21 s correspond to the 7 th counting interval. Therefore, whether index is numbered from 0 or 1, the count interval in which the ratio is located can be determined first.

Setting a monitoring object playing event at the front end, calling a setInterval () method when the event is triggered, and counting a first counting interval of a playing object by taking the size of the specified counting interval as a period. Setting an object pause event and an object play end event, and when the clearInterval () is called or the window is closed, setInterval () stops executing the function and determines a second counting interval of the position where pause or play is stopped; the end of the object playing comprises two conditions of the completion of the normal object playing and the closing of the player.

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

v/video pause

pauseEventO{

clearlnterval(this.timer);

}

For step S103, after the object playback is paused or finished, the front end sends the counting interval from the first counting interval to the second counting interval (including the first counting interval, the second counting interval, and the counting interval therebetween) to the back end through the Restful interface, so as to calculate the playback progress based on the number of the counting intervals and the total number of the counting intervals of the object at the back end.

The formula of the playing progress of the actual object is as follows:

progress=bitOneNum/totalIndexNum

wherein progress represents the playing progress of the object, and the unit is percentage; bitOneNum represents the total number of counting intervals, totalIndexNum represents the total number of counting intervals.

And the subsequent back-end processing obtains the object playing progress, and the front-end can acquire the object playing progress from the back-end through a RestFul interface so as to execute playing under different scenes, for example, judging whether the progress meets the required percentage in the task execution platform, and if so, indicating that the task is finished.

The method provided by the embodiment abandons the idea of accumulating the playing time length, divides the total playing time length of the object into a plurality of counting intervals, determines the played counting interval according to the playing position, and provides a data basis for calculating the playing progress.

Referring to fig. 2, a schematic diagram illustrating an alternative playback progress determination process according to an embodiment of the present invention is shown, including the following steps:

s201: after monitoring that an object playing event is triggered, acquiring a first time point corresponding to the current playing position of an object, and determining a first counting interval where the first time point is located;

s202: after monitoring that an object pause event or a play end event is triggered, acquiring a second time point corresponding to an object pause position or a play end position, and determining a second counting interval where the second time point is located;

s203: determining a counting interval from the first counting interval to the second counting interval, acquiring the total number of the counting intervals of the object, and establishing a bit space corresponding to the total number of the counting intervals;

s204: determining a bit corresponding to the counting interval in the bit space, and setting the value of the bit to a preset value;

s205: and calculating the ratio of the number of the bits to the total number of the counting intervals, and taking the ratio as the playing progress of the object.

In the above embodiment, for steps S201 and S202, reference may be made to the description of steps S101 and S102 shown in fig. 1, and details are not repeated here.

In the above embodiment, for steps S203 to S205, the back end provides two RestfulApi for storing the count data of the target playing interval and transmitting the playing progress, which are provided as external interfaces.

The numbering interval numbers are continuous and dense, and the number is usually large, so in order to save the back-end storage space, Bit-map (bitmap and mass data processing) or long type array storage can be used, and Bit-map is preferred in the scheme.

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. Because the Bit-map uses Bit bits to store data, the storage space can be greatly saved. The design is as follows:

key=videoId:userId

offset=index

value 0 or 1

Wherein, the videoId represents the id of the played object to uniquely identify one object; userId represents the user id of the playing object to uniquely identify one user, offset represents the bit position, i.e. the number index of each counting interval of the played object, value represents whether the object is played, 1 represents played, and 0 represents not played.

Furthermore, a fixed prefix, such as user: video: progress, can be added to the key for the service scene to indicate the progress of the user in playing the video, and can also be replaced by other character strings for indication.

Assuming that the 5 count interval numbers (4,7,2,5,3) within 0-7 are to be sorted (assuming here that the count intervals are not repeated), an 8byte space is first opened up and all byte bits under these spaces are set to 0. Traversing the 5 counting interval numbers, wherein the first counting interval number is 4, starting from left to back, setting the value of the 5 th byte bit as 1, and finally obtaining the following result for the rest counting interval numbers in the same way:

0 0 1 1 1 1 0 1

and traversing the bytes area, and outputting the position (2,3,4,5,7) with the value of 1 to achieve the purpose of sorting. And establishing a corresponding relation between the key and the byte space, and establishing Bit-map data so as to store the user identifier, the object identifier and the playing result into a data structure.

Further, when the user has the situation of forward and backward movement or the same object segment is played repeatedly, the union operation can be performed based on all the playing results, and as long as there is one playing, the playing result is set to be played.

At this time, the formula of the playing progress of the actual object is as follows:

progress=bitOneNum/totalIndexNum

wherein progress represents the playing progress of the object, and the unit is percentage; bitOneNum represents the total number of counting intervals with a bit value of 1, and totalIndexNum represents the total number of counting intervals.

The method provided by the embodiment is based on the interval counting technology, the bitMap data structure is used for carrying out the union operation on the playing result of each counting interval, the playing duration is counted only once, and the condition of multiple counting or missing counting is avoided.

Referring to fig. 3, a schematic flow chart of another optional play progress determining method according to an embodiment of the present invention is shown, including the following steps:

s301: after monitoring that an object playing event is triggered, acquiring a first time point corresponding to the current playing position of an object, and determining a first counting interval where the first time point is located;

s302: after monitoring that an object pause event or a play end event is triggered, acquiring a second time point corresponding to an object pause position or a play end position, and determining a second counting interval where the second time point is located;

s303: storing the number of the counting interval and the object playing result into an array together;

s304: acquiring the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of the counting intervals;

s305: acquiring the number of the counting interval with the played result in the array, determining the bit corresponding to the number of the counting interval in the bit space, and setting the value of the bit as a preset value;

s306: and calculating the ratio of the number of the bits to the total number of the counting intervals, and taking the ratio as the playing progress of the object.

In the above embodiment, for steps S301 to S302, reference may be made to the description of steps S101 and S102 shown in fig. 1, and for steps S304 and S306, reference may be made to the description of steps S203 and S205 shown in fig. 2, which are not described again here.

In the above embodiment, for the steps S303 and S305, in order to simplify the data processing operation, the playing results of each count section may be recorded in the form of an array, and the played array is set to a predetermined value, such as 1.

Taking video playing as an example, the operation codes are as follows:

// video Play event

playEvent:function(){

this.timer=setlntervaK handler:()=>{

V/video Play statistical Interval sequence number

let index=this.player.currentTime/this.interval;

Setting this interval to 1 indicates that it has been viewed

this.s[index]=1;

},this.interval);

}

Where this.s [ index ] is an array indicating whether the video in the index-th count section is played, the index is the count section number, 1 indicates played, and 0 indicates not played (0/1 is merely an example). For example, if the count interval size is 1 and the user has played the 4 th s, an array a is defined, where a [0] ═ 1, a [1] ═ 1, a [2] ═ 1, and a [3] ═ 1, which indicates that all 1 to 4s have been played.

It should be noted that there is only one array of count interval numbers for each played object. The time point of the current playing position is 20s, the counting interval size is 3s in the above example, the 7 th counting interval is obtained through calculation, the corresponding array is a [7] is 1, and only one is reserved for the same array of 19 s.

Thus, although the array may be generated by the time point, the count section number, and the playback result, the present embodiment is intended to calculate the playback progress and has a small dependency on the time point, and therefore, a mode in which the time point is not included in the array is preferable.

In addition, the size of the counting interval cannot be set too large. As described above, although the array is obtained, the object of 20-21 s in the counting interval is not played, and there is a certain error. For this case, the count interval needs to be adaptively reduced, and since the video class is usually played in units of seconds, it is preferable to set the count interval size to 1s play unit.

The method provided by the embodiment abandons the idea of accumulating the playing time length, and the front end is based on the interval counting technology, so that the total object playing time length is divided into a plurality of counting intervals, and the played counting intervals are reserved in an array form; the back end uses the bit map data structure to make the playing time length of each counting interval only be counted once, thereby avoiding the condition of multiple counting or missing counting and improving the accuracy of progress calculation.

Referring to fig. 4, a schematic diagram of main modules of a play progress determining apparatus 400 according to an embodiment of the present invention is shown, including:

the playing module 401 is configured to, after it is monitored that an object playing event is triggered, acquire a first time point corresponding to a current playing position of an object, and determine a first counting interval where the first time point is located;

a pause module 402, configured to, after it is monitored that an object pause event or a play end event is triggered, obtain a second time point corresponding to an object pause position or a play end position, and determine a second counting interval where the second time point is located;

a calculating module 403, configured to determine a count interval from the first count interval to the second count interval, and determine the playing progress of the object based on the number of the count interval.

In the device for implementing the present invention, the playing module 401 is configured to:

and calculating the ratio of the first time point to the size of the counting interval, and rounding the ratio downwards or upwards to determine the first counting interval in which the ratio is positioned.

In the device for implementing the present invention, the calculating module 403 is configured to:

acquiring the total number of counting intervals of the object, and establishing a bit space corresponding to the total number of the counting intervals;

determining a bit corresponding to the counting interval in the bit space, and setting the value of the bit to a preset value;

and calculating the ratio of the number of the bits to the total number of the counting intervals, and taking the ratio as the playing progress of the object.

In the device for implementing the present invention, the calculating module 403 is configured to:

storing the number of the counting interval and the object playing result into an array together;

and acquiring the counting interval number which has been played as a result in the array, and determining the bit corresponding to the counting interval number in the bit space.

In the implementation apparatus of the present invention, the calculating module 403 is further configured to: and for a counting interval, if a plurality of playing results exist, carrying out union operation on the plurality of playing results to obtain the playing result of the counting interval.

In the device for implementing the present invention, the calculating module 403 is configured to: and acquiring the total playing time length of the object, calculating the ratio of the total playing time length to the size of the counting interval, and rounding up to obtain the total number of the counting interval.

In the implementation apparatus of the present invention, the calculating module 403 is further configured to: generating a key name based on the identification of the object and the user identification, and establishing a corresponding relation between the key name and the bit space; and

and responding to the operation of inquiring the bit space, and inquiring the bit space corresponding to the user identification and the identification of the object.

In addition, the detailed implementation of the device in the embodiment of the present invention has been described in detail in the above method, so that the repeated description is not repeated here.

Fig. 5 illustrates an exemplary system architecture 500 to which embodiments of the invention may be applied.

As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505 (by way of example only). The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 501, 502, 503.

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

It should be noted that the method provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus is generally disposed in the server 505.

It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.

Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.

As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that 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 section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.

The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 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, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.

In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.

It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a playing module, a pausing module and a calculating module. The names of these modules do not in some cases constitute a limitation to the module itself, and for example, the calculation module may also be described as a "play progress calculation module".

As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:

after monitoring that an object playing event is triggered, acquiring a first time point corresponding to the current playing position of an object, and determining a first counting interval where the first time point is located;

after monitoring that an object pause event or a play end event is triggered, acquiring a second time point corresponding to an object pause position or a play end position, and determining a second counting interval where the second time point is located;

and determining a counting interval from the first counting interval to the second counting interval, and determining the playing progress of the object based on the number of the counting intervals.

According to the technical scheme of the embodiment of the invention, the front end is based on the interval counting technology, the total playing time length of an object is divided into a plurality of counting intervals, and the played counting intervals are reserved in an array form, so that the playing time length of each counting interval is counted only once; the back end processes the array by using the bitMap data structure, thereby avoiding the condition of multi-statistics or missing statistics and improving the accuracy of progress calculation.

The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种信息展示方法、装置、计算机设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!