WO2020172858A1 - 媒体播放序列生成方法、装置及系统和计算机可读存储介质 - Google Patents

媒体播放序列生成方法、装置及系统和计算机可读存储介质 Download PDF

Info

Publication number
WO2020172858A1
WO2020172858A1 PCT/CN2019/076513 CN2019076513W WO2020172858A1 WO 2020172858 A1 WO2020172858 A1 WO 2020172858A1 CN 2019076513 W CN2019076513 W CN 2019076513W WO 2020172858 A1 WO2020172858 A1 WO 2020172858A1
Authority
WO
WIPO (PCT)
Prior art keywords
media
identifiers
sequence
play
quotient
Prior art date
Application number
PCT/CN2019/076513
Other languages
English (en)
French (fr)
Inventor
韩丹
王伙荣
宗靖国
辛来
Original Assignee
西安诺瓦电子科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安诺瓦电子科技有限公司 filed Critical 西安诺瓦电子科技有限公司
Priority to US17/043,730 priority Critical patent/US11741997B2/en
Priority to PCT/CN2019/076513 priority patent/WO2020172858A1/zh
Priority to CN201980028796.2A priority patent/CN112042204A/zh
Publication of WO2020172858A1 publication Critical patent/WO2020172858A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/102Programmed access in sequence to addressed parts of tracks of operating record carriers
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/102Programmed access in sequence to addressed parts of tracks of operating record carriers
    • G11B27/105Programmed access in sequence to addressed parts of tracks of operating record carriers of operating discs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/34Indicating arrangements 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists

Definitions

  • This application relates to the field of media playback technology, and in particular to a media playback sequence generation method, a media playback sequence generation device, a media playback sequence generation system, and a computer-readable storage medium.
  • the order of media playback is not only to play another media in sequence according to the number of times it has been played, but also to evenly sort the media and then play them in sequence. Therefore, how to achieve uniform ordering of multiple media in the list is a technical problem to be solved at present.
  • the embodiments of the present application provide a method for generating a media play sequence, a device for generating a media play sequence, a system for generating a media play sequence, and a computer-readable storage medium to achieve uniform ordering of multiple media.
  • a method for generating a media play sequence proposed in an embodiment of the present application includes the steps of: (a) acquiring multiple media identifiers corresponding to multiple media and multiple media play times corresponding to the multiple media identifiers; (b) Determine the size of the maximum number of media play times in the plurality of media play times relative to the sum of the remaining media play times to obtain the judgment result; and (c) Select one of a plurality of different generation methods according to the judgment result Generate a media play sequence for use by a media player to play the multiple media, wherein the media play sequence includes the multiple media identifiers, and the number of each media identifier in the media play sequence is equal to The number of times of media playing corresponding to the media identifier.
  • the step (c) includes: (c1) when the judgment result is that the maximum number of media play times is less than or equal to the sum of the remaining media play times, selecting the multiple different The first generation manner in the generation manners generates the media play sequence, wherein the first generation manner is:
  • the quotient of the remaining media identifiers in the sorted object array, and the initial insertion positions of the remaining media identifiers in the plurality of initial segments determine all Inserting positions of the remaining media identifiers in the plurality of initial segments, respectively, to obtain a plurality of target segments containing the plurality of media identifiers, wherein each of the plurality of media identifiers is located in the The total number of the multiple target segments is equal to the quotient of the media identifier in the sorted object array;
  • the media play sequence is obtained.
  • the step (c) includes: (c2) when the judgment result is that the maximum number of media play times is greater than the sum of the remaining media play times, and the condition is met: the multiple media identifiers The number of is equal to 2 and the minimum number of media play times among the plurality of media play times is 1, and a second generation method among the plurality of different generation methods is selected to generate the media play sequence, wherein the second generation method is :
  • the quotient obtained by dividing the sum value by 2 is rounded down to determine the target position of the media identifier with the minimum number of media playback times in the multiple segments;
  • the step (c) includes: (c3) when the judgment result is that the maximum number of media play times is greater than the sum of the remaining media play times, and the condition is not met: the multiple media The number of identifiers is equal to 2 and the minimum number of media play times among the plurality of media play times is 1, and a third generation method among the plurality of different generation methods is selected to generate the media play sequence, wherein the third generation method for:
  • Sorting according to the size of the multiple media playing times to obtain a third object array that associates the multiple media identifiers with the multiple media playing times;
  • Inserting the multiple media identifiers in the third object data into the two-dimensional array as the media identifiers to be inserted in order to obtain the media playback sequence specifically includes:
  • an apparatus for generating a media play sequence proposed in an embodiment of the present application includes: an acquisition module configured to acquire multiple media identifiers of multiple media and multiple media play times corresponding to the multiple media identifiers; The judging module is used for judging the relative size of the sum of the maximum number of media play times and the remaining number of media play times among the multiple media play times to obtain the judgment result; and the generating module is used for selecting multiple different One of the generation methods is to generate a media play sequence for use by a media player to play the multiple media, wherein the media play sequence includes the multiple media identifiers, and each of the media identifiers is used in the media play sequence The number in is equal to the media play times of the media identifier.
  • the generation module includes a plurality of generation units and a selection unit, the plurality of generation units are used to provide the plurality of different generation modes, and the selection unit is used to As a result of the judgment, one of the multiple generating units is selected to generate the media play sequence.
  • the multiple generating units include a first generating unit, and the first generating unit is configured to:
  • the quotient of the remaining media identifiers in the sorted object array, and the initial insertion positions of the remaining media identifiers in the plurality of initial segments determine all Inserting positions of the remaining media identifiers in the plurality of initial segments, respectively, to obtain a plurality of target segments containing the plurality of media identifiers, wherein each of the plurality of media identifiers is located in the The total number of the multiple target segments is equal to the quotient of the media identifier in the sorted object array;
  • the media play sequence is obtained.
  • the multiple generating units further include a second generating unit, and the second generating unit is used to:
  • the quotient obtained by dividing the sum value by 2 is rounded down to determine the target position of the media identifier with the minimum number of media playback times in the multiple segments;
  • the multiple generating units further include a third generating unit, and the third generating unit is configured to:
  • Sorting according to the size of the multiple media playing times to obtain a third object array that associates the multiple media identifiers with the multiple media playing times;
  • Inserting the multiple media identifiers in the third object data into the two-dimensional array as the media identifiers to be inserted in sequence to obtain the media play sequence specifically includes:
  • a media playback sequence generation system proposed by an embodiment of the present application includes: a processor and a memory; wherein the memory stores instructions executed by the processor, and the instructions cause the processor to perform operations To perform any of the aforementioned media playback sequence generation methods.
  • a media playback sequence generation system proposed by an embodiment of the present application includes: a server end and a browser end, wherein the browser end connects to the server end through a web page link address to jointly execute any of the foregoing Media playback sequence generation method.
  • a computer-readable storage medium provided by an embodiment of the present application is a non-volatile memory and stores program code.
  • the program code implements any of the foregoing when executed by one or more processors Media playback sequence generation method.
  • the media playback sequence generation method, a media playback sequence generation device, a media playback sequence generation system, and a computer-readable storage medium can perform a uniform sorting algorithm to generate a uniformly sorted media playback sequence for the media
  • the player is used to evenly play multiple media, which can solve the pain point of the industry product that cannot evenly play media advertisements.
  • Fig. 1 is a flowchart of a method for generating a media play sequence according to the first embodiment of the application.
  • Fig. 2 is a flowchart of sub-steps of step S15 in Fig. 1.
  • Fig. 3 is a partial schematic diagram of a playlist display interface according to the first embodiment of the application.
  • 4A-4F are schematic diagrams of the states of inserting five media identifiers into multiple segments in the first embodiment of the application.
  • Fig. 5 is a flowchart of another sub-step of step S15 in Fig. 1.
  • 6A-6B are schematic diagrams of the state of inserting two media identifiers into multiple segments in the first embodiment of this application.
  • Figures 7A-7C are schematic diagrams of states in which three media identifiers are inserted into multiple segments in the first embodiment of the application.
  • FIG. 8A is a schematic diagram of modules of an apparatus for generating a media play sequence according to a second embodiment of the application.
  • FIG. 8B is a schematic diagram of units of the generating module in FIG. 8A.
  • FIG. 9 is a schematic structural diagram of a system for generating a media play sequence according to a third embodiment of the application.
  • FIG. 10 is a schematic diagram of a computer-readable storage medium according to a fourth embodiment of this application.
  • FIG. 11 is a schematic structural diagram of a system for generating a media play sequence according to a fifth embodiment of this application.
  • FIG. 12 is a schematic diagram of a display interface of a media play sequence according to the fifth embodiment of the application.
  • the method for generating a media play sequence includes, for example, the following steps:
  • S11 Obtain multiple media identities corresponding to multiple media and multiple media play times corresponding to the multiple media identities.
  • step S15 on the one hand, referring to Fig. 2, when the maximum number of media play times is less than or equal to the sum of the remaining media play times, sub-steps S1511-S1518 are executed to generate a media play sequence, specifically:
  • S1511 Obtain the greatest common divisor of the multiple media play times, and obtain multiple quotients of the multiple media play times divided by the greatest common divisor to obtain the correlation between the multiple media identifiers and the Multiple quotient object array;
  • S1512 Sort the object array according to the size of the multiple quotient values to obtain a sorted object array
  • S1516 Determine, according to the first media identification sequence and the second media identification sequence, that the remaining media identifications in the sorted object array except for the media identification with the largest quotient value are in the multiple initial points.
  • the playlist presented on the display interface shown in FIG. 3 which contains five media with media identifications A, B, C, D, and E, and each media identification A, B, C
  • the media play times corresponding to, D, and E are 4, 4, 8, 6, and 2, respectively.
  • the five media can be any combination of media such as videos, pictures, text, and RSS information.
  • the insertion sequence of each media identifier in the four initial segments is to insert A B E D, then the initial insertion position of A is 0, and the initial insertion position of B is 0.
  • the initial insertion position is 1, the initial insertion position of E is 2, and the initial insertion position of D is 3.
  • Math.floor ((Max/nowValue)*(n-1))+start to calculate each media one by one Identifies all insertion positions of ABED; where nowValue represents the number of current media identifiers, n is an integer and ranges from 1 to nowValue, start represents the initial insertion position of the current media identifier, and Math.floor is a round-down function;
  • sub-step S1530 is executed to determine whether: the number of the multiple media identifiers is equal to 2 and the The minimum number of media play times among multiple media play times is 1.
  • sub-steps S1531-S1534 are executed to generate a media play sequence, specifically:
  • S1531 Generate a second object array that associates the multiple media identifiers with the multiple media play times;
  • S1532 Calculate the sum of the number of times the multiple media are played, and generate multiple segments whose number is equal to the sum;
  • S1534 Insert a media identifier with the minimum number of media play times into a target segment corresponding to the target position among the multiple segments, and in the multiple segments except for the target segment Inserting the remaining media identifiers of the multiple media identifiers into the remaining segments of to obtain the media play sequence.
  • the minimum number of media plays is 1.
  • it contains two media with media identifiers A and B, and media corresponding to the two media identifiers A and B
  • the number of plays is 6 and 1, respectively.
  • the two media can be any combination of media such as videos, pictures, text, and RSS information.
  • step S13 is executed, because the maximum number of media play times is 6, and the sum of the remaining media play times is 1, the result of the judgment is: the maximum number of media play times is greater than the sum of the remaining media play times, and the condition "said multiple The number of media identifiers is equal to 2 and the minimum number of media play times among the multiple media play times is 1", then the sub-steps S1531-S1534 shown in FIG. 5 are executed to generate a media play sequence, that is:
  • S1551 Sort according to the size of the multiple media play times to obtain a third object array that associates the multiple media identifiers with the multiple media play times;
  • S1552 Calculate the sum of the number of times the multiple media are played, and generate a two-dimensional array with a length equal to the sum;
  • S1553 Inserting the multiple media identifiers in the third object data into the two-dimensional array as the media identifiers to be inserted in sequence to obtain the media playback sequence, which specifically includes: (a) obtaining the two-dimensional The number of empty arrays in the array to obtain the acquisition result, and generate a position object array for recording the position of the empty array in the two-dimensional array; and (b) according to the acquisition result and the media to be inserted Calculate the insertion position of the to-be-inserted media identifier in the two-dimensional array with the identified number of times of media play.
  • a playlist that includes three media with media identifiers A, B, and C, and the number of media play times corresponding to the three media identifiers A, B, and C are 6, 1, and 2, respectively.
  • the three media can be any combination of media such as videos, pictures, text, and RSS information.
  • step (z5) the insertion positions of A in the two-dimensional array are 0, 1, 3, 4, 6, and 7, as shown in Figure 7A;
  • this embodiment when this embodiment is applied to the playback of list media advertisements, using the uniform sorting method of this embodiment, a uniformly distributed media playback sequence can be obtained for playback, which solves the pain point of not being able to broadcast media advertisements evenly in industry products. Furthermore, the uniform sorting method of this embodiment is not only limited to the play of list media advertisements, but can also be applied to other similar scenarios.
  • a media playback sequence generation device 80 provided by the second embodiment of the present application includes: an acquisition module 81, a judgment module 83, and a generation module 85.
  • the acquiring module 81 is used to acquire multiple media identifiers corresponding to multiple media and multiple media playing times corresponding to the multiple media identifiers, for example; the judging module 83 is used to determine the multiple media playing times. The maximum number of media playback times relative to the sum of the remaining media playback times to obtain the judgment result; and the generating module 85 is configured to select one of a plurality of different generation methods according to the judgment result to generate a media playback sequence for media playback
  • the media player is used to play the multiple media, wherein the media play sequence includes the multiple media identifiers, and the number of each media identifier in the media play sequence is equal to the media play of the media identifier frequency.
  • the acquisition module 81, the judgment module 83, and the generation module 85 may be software modules, which are stored in a non-volatile memory and are executed by the processor to perform step S11 in the foregoing first embodiment. , S13 and S15.
  • the generating module 85 of this embodiment includes, for example, a selection unit 851 and multiple generating units such as a first generating unit 8531, a second generating unit 8532, and a third generating unit 8532.
  • the selection unit 851 is, for example, configured to select one of the multiple generating units 8531-8533 to generate the media play sequence according to the judgment result.
  • the first generating unit 8531 is, for example, configured to (i) obtain the greatest common divisor of the multiple media playing times, and obtain multiple quotients of the multiple media playing times divided by the greatest common divisor to obtain the correlation
  • the multiple media identifiers and the multiple quotient object arrays ; (ii) sort the object arrays according to the size of the multiple quotient values to obtain the sorted object array; (iii) use the After sorting, the media identifier with the largest quotient in the object array is segmented to obtain multiple initial segments; (iv) obtaining the media identifier with the quotient that can divide the maximum quotient in the sorted object array , To form a first media identification sequence; (v) Obtain media identifications in the sorted object array that have a quotient that cannot divide the maximum quotient to form a second media identification sequence; (vi) According to the first The media identification sequence and the second media identification sequence determine the initial insertion positions of the remaining media identifications in the sorted object array except for the
  • the second generating unit 8532 is, for example, configured to (a) generate a second object array that associates the multiple media identifiers with the multiple media play times; (b) calculate the sum of the multiple media play times, and generate The number of segments equal to the sum value; (c) the quotient obtained by dividing the sum value by 2 is rounded down to determine that the media identifier with the minimum number of media plays is in the plurality of segments A target position in a segment; and (d) inserting a media identifier having the minimum number of media playback times in a target segment corresponding to the target position among the plurality of segments, and inserting a media identifier in the plurality of segments Inserting the remaining media identifiers of the multiple media identifiers into the remaining segments except the target segment to obtain the media play sequence.
  • the third generating unit 8533 is, for example, configured to (1) sort according to the size of the multiple media playing times to obtain a third object array that associates the multiple media identifiers with the multiple media playing times; (2) Calculate the sum of the number of times the multiple media are played, and generate a two-dimensional array with a length equal to the sum; and (3) sequentially use the multiple media identifiers in the third object data as the media to be inserted Inserting the identifier into the two-dimensional array to obtain the media play sequence specifically includes: obtaining the number of empty arrays in the two-dimensional array to obtain the obtaining result, and generating a record for recording the empty array in the two-dimensional A position object array of positions in the array; and calculating the insertion position of the to-be-inserted media flag in the two-dimensional array according to the obtained result and the number of times of media playing of the to-be-inserted media flag.
  • the selection unit 851, the first generation unit 8531, the second generation unit 8532, and the third generation unit 8533 please refer to the sub-steps S1511-1518, S1531-1534, and S1531-1534 in step S15 in the aforementioned first embodiment.
  • the related description of S1551-S1553 will not be repeated here.
  • the selection unit 851, the first generation unit 8531, the second generation unit 8532, and the third generation unit 8533 may be software modules, stored in a non-volatile memory and executed by the processor to perform related operations. Perform the sub-steps S1511-1518, S1531-1534, and S1551-S1553 in step S15 in the foregoing first embodiment.
  • the uniform sorting method executed by the media play sequence generating device 80 of the present embodiment can be used to obtain a uniformly distributed media play sequence for playing, which solves the problem of industry products.
  • the pain point of evenly playing media advertisements; furthermore, the uniform sorting method implemented in this embodiment is not limited to the playing of list media advertisements, and can also be applied to other similar scenarios.
  • a media playback sequence generation system 90 provided by the third embodiment of the present application includes: a processor 91 and a memory 93; wherein, the memory 93 stores instructions executed by the processor 91, and the instructions are, for example, The processor 91 is caused to perform operations to perform the media play sequence generation method described in the foregoing first embodiment.
  • a computer-readable storage medium 100 provided by the fourth embodiment of the present application is a non-volatile memory and stores program code, which is implemented when executed by one or more processors The media play sequence generation method described in the foregoing first embodiment.
  • a media playback sequence generation system 110 provided by the fifth embodiment of the present application includes: a server 111 and a browser 113.
  • the browser 113 connects to the server 111 through the web page link address to jointly execute the media play sequence generation method described in the first embodiment.
  • the browser 113 is, for example, a computer with a browser installed. It can download a playlist from the server 111 for display (for example, as shown in Figure 3), or it can be used by the user to add, modify, and delete the playlist and save it to Server side 111.
  • the disclosed system, device and/or method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units/modules is only a logical function division.
  • there may be other division methods for example, multiple units or modules may be Combined or can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the unit/module described as a separate component may or may not be physically separated, and the component displayed as a unit/module may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple channels. On the network unit. Some or all of the units/modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each functional unit/module in each embodiment of the present application may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one.
  • Unit/module The above-mentioned integrated unit/module can be realized in the form of hardware, or in the form of hardware plus software functional unit/module.
  • the above-mentioned integrated unit/module implemented in the form of a software functional unit/module may be stored in a computer readable storage medium.
  • the above-mentioned software functional unit is stored in a storage medium and includes several instructions to make one or more processors of a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in the various embodiments of this application Part of the steps.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc., which can store program codes Medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

本申请实施例公开了媒体播放序列生成方法、装置及系统和计算机可读存储介质。所述方法例如包括步骤:(a)获取多个媒体分别对应的多个媒体标识和所述多个媒体标识分别对应的多个媒体播放次数;(b)判断所述多个媒体播放次数中的最大媒体播放次数相对于剩余媒体播放次数之和的大小,以得到判断结果;以及(c)根据所述判断结果选择多个不同生成方式之一生成媒体播放序列,以供媒体播放器使用来播放所述多个媒体,其中所述媒体播放序列包含所述多个媒体标识、且每一个所述媒体标识在所述媒体播放序列中的数量等于所述媒体标识对应的所述媒体播放次数。本申请实施例可以生成均匀排序的媒体播放序列供媒体播放器使用来均匀播放多个媒体。

Description

媒体播放序列生成方法、装置及系统和计算机可读存储介质 技术领域
本申请涉及媒体播放技术领域,尤其涉及一种媒体播放序列生成方法、一种媒体播放序列生成装置、一种媒体播放序列生成系统以及一种计算机可读存储介质。
背景技术
在LED显示行业,用户往往需要制作一个播放清单,给播放清单添加多个媒体,每个媒体设置不同的播放次数,来充分使用当前显示屏幕,完成其商业广告的推广和展示。
但是媒体的播放顺序不仅仅是依次将一个媒体按照其播放次数播放完成后,再播放另一个媒体,更多的是需要把媒体进行均匀排序后再依次播放。因此如何实现清单中多个媒体的均匀排序是目前有待解决的技术问题。
发明内容
本申请的实施例提供一种媒体播放序列生成方法、一种媒体播放序列生成装置、一种媒体播放序列生成系统以及一种计算机可读存储介质,以实现多个媒体的均匀排序。
一方面,本申请实施例提出的一种媒体播放序列生成方法,包括步骤:(a)获取多个媒体分别对应的多个媒体标识和所述多个媒体标识分别对应的多个媒体播放次数;(b)判断所述多个媒体播放次数中的最大媒体播放次数相对于剩余媒体播放次数之和的大小,以得到判断结果;以及(c)根据所述判断结果选择多个不同生成方式之一生成媒体播放序列,以供媒体播放器使用来播放所述多个媒体,其中所述媒体播放序列包含所述多个媒体标识、且每一个所述媒体标识在所述媒体播放序列中的数量等于所述媒体标识对应的所述媒体播放次数。
在本申请的一个实施例中,所述步骤(c)包括:(c1)当所述判断结果为所述最大媒体播放次数小于或等于所述剩余媒体播放次数之和,选择所述多个不同生成方式中的第一生成方式生成所述媒体播放序列,其中所述第一生成方式为:
获取所述多个媒体播放次数的最大公约数,并获取所述多个媒体播放次数分别除以所述最大公约数的多个商值,以得到关联所述多个媒体标识和所述多个商值的对象数组;
按照所述多个商值的大小对所述对象数组进行排序,以得到排序后对象数组;
利用所述排序后对象数组中具有最大商值的媒体标识进行分段占位,以得到多个初始分段;
获取所述排序后对象数组中具有商值能够整除所述最大商值的媒体标识,以形成第一媒体标识序列;
获取所述排序后对象数组中具有商值不能整除所述最大商值的媒体标识,以形成第二媒体标识序列;
根据所述第一媒体标识序列和所述第二媒体标识序列确定所述排序后对象数组中除具有所述最大商值的媒体标识之外的剩余媒体标识分别在所述多个初始分段中的起始插入位置;
根据所述最大商值、所述剩余媒体标识分别在所述排序后对象数组中的商值和所述剩余媒体标识分别在所述多个初始分段中的所述起始插入位置,确定所述剩余媒体标识分别在所述多个初始分段中的插入位置,以得到包含所述多个媒体标识的多个目标分段,其中所述多个媒体标识中的每一个媒体标识在所述多个目标分段中的总数量等于所述媒体标识在所述排序后对象数组中的商值;以及
根据所述多个目标分段和所述最大公约数,得到所述媒体播放序列。
在本申请的一个实施例中,所述步骤(c)包括:(c2)当所述判断结果为所述最大媒体播放次数大于剩余媒体播放次数之和、且满足条件:所述多个媒体标识的数量等于2且所述多个媒体播放次数中的最小媒体播放次数为1,选择所述多个不同生成方式中的第二生成方式生成所述媒体播放序列,其中所述第二生成方式为:
生成关联所述多个媒体标识和所述多个媒体播放次数的第二对象数组;
计算所述多个媒体播放次数的和值,并生成数量等于所述和值的多个分段;
将所述和值除以2得到的商值向下取整,以确定具有所述最小媒体播放次数的媒体标识在所述多个分段中的目标位置;以及
在所述多个分段中对应所述目标位置的一个目标分段中插入具有所述最小媒体播放次数的媒体标识,并在所述多个分段中除所述目标分段之外的剩余分段中插入所述多个媒体标识中的剩余媒体标识,以得到所述媒体播放序列。
在本申请的一个实施例中,所述步骤(c)包括:(c3)当所述判断结果为所述最大媒体播放次数大于剩余媒体播放次数之和、且不满足条件:所述多个媒体标识的数量等于2且所述多个媒体播放次数中的最小媒体播放次数为1,选择所述多个不同生成方式中的第三生成方式生成所述媒体播放序列,其中所述第三生成方式为:
按照所述多个媒体播放次数的大小进行排序,以得到关联所述多个媒体标识和所述多个媒体播放次数的第三对象数组;
计算所述多个媒体播放次数的和值,并生成长度等于所述和值的二维数组;以及
将所述第三对象数据中的所述多个媒体标识依序作为待插入媒体标识插入所述二维数组以得到所述媒体播放序列,具体包括:
获取所述二维数组中的空数组的数量以得到获取结果,并生成用于记录所述空数组在所述二维数组中之位置的位置对象数组;以及
根据所述获取结果和所述待插入媒体标识的所述媒体播放次数计算所述待插入媒体标识在所述二维数组中的插入位置。
另一方面,本申请实施例提出的一种媒体播放序列生成装置,包括:获取模块,用于获取多个媒体的多个媒体标识和所述多个媒体标识分别对应的多个媒体播放次数;判断模块,用于判断所述多个媒体播放次数中的最大媒体播放次数与剩余媒体播放次数之和的相对大小,以得到判断结果;以及生成模块,用于根据所述判断结果选择多个不同生成方式之一生成媒体播放序列,以供媒体播放器使用来播放所述多个媒体,其中所述媒体播放序列包含所述多个媒体标识、且每一个所述媒体标识在所述媒体播放序列中的数量等于所述媒体标识的所述媒体播放次数。
在本申请的一个实施例中,所述生成模块包括多个生成单元和选择单元,所述多个生成单元用于分别提供所述多个不同生成方式,且所述选择单元用于根据所述判断结果选择多个生成单元之一生成所述媒体播放序列。
在本申请的一个实施例中,所述多个生成单元包括第一生成单元,且所述第一生成单元用于:
获取所述多个媒体播放次数的最大公约数,并获取所述多个媒体播放次数分别除以所述最大公约数的多个商值,以得到关联所述多个媒体标识和所述多个商值的对象数组;
按照所述多个商值的大小对所述对象数组进行排序,以得到排序后对象数组;
利用所述排序后对象数组中具有最大商值的媒体标识进行分段占位,以得到多个初始分段;
获取所述排序后对象数组中具有商值能够整除所述最大商值的媒体标识,以形成第一媒体标识序列;
获取所述排序后对象数组中具有商值不能整除所述最大商值的媒体标识,以形成第二媒体标识序列;
根据所述第一媒体标识序列和所述第二媒体标识序列确定所述排序后对象数组中除具有所述最大商值的媒体标识之外的剩余媒体标识分别在所述多个初始分段中的起始插入位置;
根据所述最大商值、所述剩余媒体标识分别在所述排序后对象数组中的商值和所述剩余媒体标识分别在所述多个初始分段中的所述起始插入位置,确定所述剩余媒体标识分别在所述多个初始分段中的插入位置,以得到包含所述多个媒体标识的多个目标分段,其中所述多个媒体标识中的每一个媒体标识在所述多个目标分段中的总数量等于所述媒体标识在所述排序后对象数组中的商值;以及
根据所述多个目标分段和所述最大公约数,得到所述媒体播放序列。
在本申请的一个实施例中,所述多个生成单元还包括第二生成单元,且所述第二生成 单元用于:
生成关联所述多个媒体标识和所述多个媒体播放次数的第二对象数组;
计算所述多个媒体播放次数的和值,并生成数量等于所述和值的多个分段;
将所述和值除以2得到的商值向下取整,以确定具有所述最小媒体播放次数的媒体标识在所述多个分段中的目标位置;以及
在所述多个分段中对应所述目标位置的一个目标分段中插入具有所述最小媒体播放次数的媒体标识,并在所述多个分段中除所述目标分段之外的剩余分段中插入所述多个媒体标识中的剩余媒体标识,以得到所述媒体播放序列。
在本申请的一个实施例中,所述多个生成单元还包括第三生成单元,且所述第三生成单元用于:
按照所述多个媒体播放次数的大小进行排序,以得到关联所述多个媒体标识和所述多个媒体播放次数的第三对象数组;
计算所述多个媒体播放次数的和值,并生成长度等于所述和值的二维数组;以及
将所述第三对象数据中的所述多个媒体标识依序作为待插入媒体标识插入所述二维数组以得到所述媒体播放序列,其具体包括:
获取所述二维数组中的空数组的数量以得到获取结果,并生成用于记录所述空数组在所述二维数组中之位置的位置对象数组;以及
根据所述获取结果和所述待插入媒体标识的所述媒体播放次数计算所述待插入媒体标识在所述二维数组中的插入位置。
再一方面,本申请实施例提出的一种媒体播放序列生成系统,包括:处理器和存储器;其中所述存储器存储有所述处理器执行的指令,且所述指令使得所述处理器执行操作以进行前述任意一种媒体播放序列生成方法。
又一方面,本申请实施例提出的一种媒体播放序列生成系统,包括:服务器端和浏览器端,其中所述浏览器端通过网页链接地址连接所述服务器端,以共同执行前述任意一种媒体播放序列生成方法。
再又一方面,本申请实施例提出的一种计算机可读存储介质,其为非易失性存储器且存储有程序代码,所述程序代码被一个或多个处理器执行时实现前述任意一种媒体播放序列生成方法。
本申请实施例的媒体播放序列生成方法、一种媒体播放序列生成装置、一种媒体播放序列生成系统以及一种计算机可读存储介质可执行均匀排序算法,以生成均匀排序的媒体播放序列供媒体播放器使用来均匀播放多个媒体,从而可以解决行业产品中不能均匀播放媒体广告的痛点问题。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请第一实施例的一种媒体播放序列生成方法的流程图。
图2为图1中步骤S15的子步骤流程图。
图3为本申请第一实施例的一种播放清单显示界面的局部示意图。
图4A-4F为本申请第一实施例中将五个媒体标识插入多个分段中的状态示意图。
图5为图1中步骤S15的另一子步骤流程图。
图6A-6B为本申请第一实施例中将两个媒体标识插入多个分段中的状态示意图。
图7A-7C为本申请第一实施例中将三个媒体标识插入多个分段中的状态示意图。
图8A为本申请第二实施例的一种媒体播放序列生成装置的模块示意图。
图8B为图8A中生成模块的单元示意图。
图9为本申请第三实施例的一种媒体播放序列生成系统的结构示意图。
图10为本申请第四实施例的一种计算机可读存储介质的示意图。
图11为本申请第五实施例的一种媒体播放序列生成系统的结构示意图。
图12为本申请第五实施例的一种媒体播放序列的显示界面示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
【第一实施例】
如图1所示,本申请第一实施例提供的一种媒体播放序列生成方法,例如包括以下步骤:
S11:获取多个媒体分别对应的多个媒体标识和所述多个媒体标识分别对应的多个媒体播放次数;
S13:判断所述多个媒体播放次数中的最大媒体播放次数相对于剩余媒体播放次数之和的大小,以得到判断结果;
S15:根据所述判断结果选择多个不同生成方式之一生成媒体播放序列,以供媒体播放器使用来播放所述多个媒体,其中所述媒体播放序列包含所述多个媒体标识、且每一个所述媒体标识在所述媒体播放序列中的数量等于所述媒体标识的所述媒体播放次数。
对于步骤S15,一方面,参见图2,当所述最大媒体播放次数小于或等于所述剩余媒体 播放次数之和,则执行子步骤S1511-S1518来生成媒体播放序列,具体为:
S1511:获取所述多个媒体播放次数的最大公约数,并获取所述多个媒体播放次数分别除以所述最大公约数的多个商值,以得到关联所述多个媒体标识和所述多个商值的对象数组;
S1512:按照所述多个商值的大小对所述对象数组进行排序,以得到排序后对象数组;
S1513:利用所述排序后对象数组中具有最大商值的媒体标识进行分段占位,以得到多个初始分段;
S1514:获取所述排序后对象数组中具有商值能够整除所述最大商值的媒体标识,以形成第一媒体标识序列;
S1515:获取所述排序后对象数组中具有商值不能整除所述最大商值的媒体标识,以形成第二媒体标识序列;
S1516:根据所述第一媒体标识序列和所述第二媒体标识序列确定所述排序后对象数组中除具有所述最大商值的媒体标识之外的剩余媒体标识分别在所述多个初始分段中的起始插入位置;
S1517:根据所述最大商值、所述剩余媒体标识分别在所述排序后对象数组中的商值和所述剩余媒体标识分别在所述多个初始分段中的所述起始插入位置,确定所述剩余媒体标识分别在所述多个初始分段中的插入位置,以得到包含所述多个媒体标识的多个目标分段,其中所述多个媒体标识中的每一个媒体标识在所述多个目标分段中的总数量等于所述媒体标识在所述排序后对象数组中的商值;以及
S1518:根据所述多个目标分段和所述最大公约数,得到所述媒体播放序列。
举例来说,现有一个播放清单,例如图3所示显示界面呈现的播放清单,其包含媒体标识分别为A、B、C、D和E的五个媒体,各个媒体标识A、B、C、D和E对应的媒体播放次数分别为4、4、8、6和2。此处的五个媒体可以是视频、图片、文本、RSS信息等媒体的任意组合。
首先,执行步骤S11,通过获取各个媒体的媒体标识(A、B、C、D、E)和相对应的媒体播放次数(4、4、8、6、2),可以得到一个初始对象数组PL={‘A’:4,‘B’:4,‘C’:8,‘D’:6,‘E’:2}。
然后,执行步骤S13,因为最大媒体播放次数为8,剩余媒体播放次数之和为(4+4+6+2=16),从而得到的判断结果为:最大媒体播放次数小于剩余媒体播放次数之和,则接下来执行图2所示的子步骤S1511-S1518以生成媒体播放序列,也即:
(x1)求初始对象数组PL中的各个媒体播放次数(4、4、8、6、2)的最大公约数,然后对初始对象数组PL中的每一个媒体标识对应的媒体播放次数除以最大公约数2,以得到新对象数组newPL={‘A’:2,‘B’:2,‘C’:4,‘D’:3,‘E’:1};
(x2)按照新对象数组newPL中每一项的值,对newPL进行降序排列,以得到排序后对象数组arrPL={‘C’:4,‘D’:3,‘A’:2,‘B’:2,‘E’:1};
(x3)用排序后对象数组arrPL中具有最大值(Max=4)的媒体标识C进行分段占位,以得到多个初始分段例如如图4A所示的四个初始分段;
(x4)获取排序后对象数组arrPL中其值能使最大值Max被整除的媒体标识,以形成由大到小排序的媒体标识序列:ABE;
(x5)获取排序后对象数组arrPL中其值不能使最大值Max被整除的媒体标识,以形成由大到小排序的媒体标识序列:D;
(x6)由上述步骤(x4)和步骤(x5)得出,各个媒体标识在四个初始分段的插入顺序为依次插入A B E D,那么A的起始插入位置为0,B的起始插入位置为1,E的起始插入位置为2,D的起始插入位置为3;结合公式Math.floor((Max/nowValue)*(n-1))+start可以逐一计算出各个媒体标识ABED的所有插入位置;其中nowValue表示当前媒体标识的个数,n为整数且取值为1至nowValue,start表示当前媒体标识的起始插入位置,Math.floor为向下取整函数;
(x7)A的间隔参数为Max/nowValue=4/2=2,根据Math.floor(2*(n-1))+0计算出A的插入位置为0和2,例如图4B所示;
(x8)B的间隔参数为Max/nowValue=4/2=2,根据Math.floor(2*(n-1))+1计算出B的插入位置为1和3,例如图4C所示;
(x9)E的间隔参数为Max/nowValue=4/1=4,根据Math.floor(4*(n-1))+2计算出E的插入位置为2,例如图4D所示;
(x10)D的间隔参数Max/nowValue=4/3≈1.3,根据Math.floor(1.3*(n-1))+3计算出D的插入位置为3、4和5,因为D的插入位置(index)中的4和5满足条件大于或等于Max,故按照公式index=index-Max进行处理得到D最终的插入位置为3、0和1,例如图4E所示;至此生成了一轮均匀的媒体序列,
(x11)因为最大公约数为2,需要遍历两轮,所以最终生成的媒体播放序列例如图4F所示。
承上述,另一方面,参见图5,当所述最大媒体播放次数大于所述剩余媒体播放次数之和,则执行子步骤S1530以判断是否:所述多个媒体标识的数量等于2且所述多个媒体播放次数中的最小媒体播放次数为1。当子步骤S1530的判断结果为“是”,执行子步骤S1531-S1534来生成媒体播放序列,具体为:
S1531:生成关联所述多个媒体标识和所述多个媒体播放次数的第二对象数组;
S1532:计算所述多个媒体播放次数的和值,并生成数量等于所述和值的多个分段;
S1533:将所述和值除以2得到的商值向下取整,以确定具有所述最小媒体播放次数的媒体标识在所述多个分段中的目标位置;以及
S1534:在所述多个分段中对应所述目标位置的一个目标分段中插入具有所述最小媒体播放次数的媒体标识,并在所述多个分段中除所述目标分段之外的剩余分段中插入所述多个媒体标识中的剩余媒体标识,以得到所述媒体播放序列。
举例来说,现有一个播放清单,其只有两个媒体且媒体的最小播放次数为1,例如包含媒体标识分别为A和B的两个媒体,且这两个媒体标识A和B对应的媒体播放次数分别为6和1。此处的两个媒体可以是视频、图片、文本、RSS信息等媒体的任意组合。
首先,执行步骤S11,通过获取各个媒体的媒体标识(A、B)和相对应的媒体播放次数(6、1),以得到一个初始对象数组PL={‘A’:6,‘B’:1}。
然后,执行步骤S13,因为最大媒体播放次数为6,剩余媒体播放次数之和为1,从而得到的判断结果为:最大媒体播放次数大于剩余媒体播放次数之和、且满足条件“所述多个媒体标识的数量等于2且所述多个媒体播放次数中的最小媒体播放次数为1”,则接下来执行图5所示的子步骤S1531-S1534以生成媒体播放序列,也即:
(y1)依据各个媒体标识的媒体播放次数,对初始对象数组PL做降序处理,以得到新对象数组newPL={‘A’:6,‘B’:1}(对应第二对象数组);
(y2)求各个媒体标识的媒体播放次数的和值total=(6+1)=7,并生成数量等于和值total的多个分段,例如图6A所示;
(y3)依据公式Math.floor(total/2)求出近中间位置,作为具有最小媒体播放次数1的媒体标识B在图6A所示多个分段中的目标位置;
(y4)将具有最小媒体播放次数1的媒体标识B插入到与步骤(y3)得到的目标位置相对应的分段内,图6A中的其他分段均由媒体标识A填充,最终生成均匀排序的媒体播放序列,例如图6B所示。
再者,在图5中,当子步骤S1530的判断结果为“否”,则执行子步骤S1551-1553来生成媒体播放序列,具体为:
S1551:按照所述多个媒体播放次数的大小进行排序,以得到关联所述多个媒体标识和所述多个媒体播放次数的第三对象数组;
S1552:计算所述多个媒体播放次数的和值,并生成长度等于所述和值的二维数组;以及
S1553:将所述第三对象数据中的所述多个媒体标识依序作为待插入媒体标识插入所述二维数组以得到所述媒体播放序列,其具体包括:(a)获取所述二维数组中的空数组的数量以得到获取结果,并生成用于记录所述空数组在所述二维数组中之位置的位置对象数组;以及(b)根据所述获取结果和所述待插入媒体标识的所述媒体播放次数计算所述待插入媒体标识在所述二维数组中的插入位置。
举例来说,现有一个播放清单,其例如包含媒体标识分别为A、B和C的三个媒体, 且这三个媒体标识A、B和C对应的媒体播放次数分别为6、1和2。此处的三个媒体可以是视频、图片、文本、RSS信息等媒体的任意组合。
首先,执行步骤S11,通过获取各个媒体的媒体标识(A、B、C)和相对应的媒体播放次数(6、1、2),以得到一个初始对象数组PL={‘A’:6,‘B’:1,‘C’:2}。
然后,执行步骤S13,因为最大媒体播放次数为6,剩余媒体播放次数之和为(1+2)=3,从而得到的判断结果为:最大媒体播放次数大于剩余媒体播放次数之和、且不满足条件“所述多个媒体标识的数量等于2且所述多个媒体播放次数中的最小媒体播放次数为1”,则接下来执行图5所示的子步骤S1551-S1553以生成媒体播放序列,也即:
(z1)依据各个媒体标识的媒体播放次数,对初始对象数组PL做降序处理,以得到新对象数组newPL={A:6,C:2,B:1}(对应第三对象数组);
(z2)求各个媒体标识的媒体播放次数的和值total=(6+2+1)=9,生成一个长度为9的二维数组,例如arrArr={[],[],[],[],[],[],[],[],[]};
(z3)计算二维数组中空数组的数量nullTotal,并生成用于记录空数组在二维数组arrArr中之位置的位置对象数组arrObj={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8};
(z4)采用公式Math.floor(nullTotal/count*i),其中count表示为当前媒体标识的媒体播放次数,i为整数且取值为0至count;
(z5)依据步骤(z4)得出A在二维数组中的插入位置为0、1、3、4、6和7,例如图7A所示;
(z6)再次执行步骤(z3)和步骤(z4),位置对象数组改变为arrObj={0:2,1:5,2:8},从而得出B在二维数组中的插入位置为2和5,例如图7B所示;
(z7)再次执行步骤(z3)和步骤(z4),位置对象数组改变为arrObj={0:8},从而得出C在二维数组中的插入位置为8,例如图7C所示,至此生成均匀排序的媒体播放序列;也即循环执行步骤(z3)和(z4),直到确定好所有媒体标识的插入位置。
综上所述,本实施例应用于清单媒体广告播放时,采用本实施例的均匀排序方法,可以得出一个均匀分布的媒体播放序列进行播放,解决行业产品中不能均匀播放媒体广告的痛点问题;再者,本实施例的均匀排序方法不仅仅局限于清单媒体广告播放,还可以应用于其他类似多种场景。
【第二实施例】
如图8A所示,本申请第二实施例提供的一种媒体播放序列生成装置80,包括:获取模块81、判断模块83和生成模块85。
其中,获取模块81例如用于获取多个媒体分别对应的多个媒体标识和所述多个媒体标识分别对应的多个媒体播放次数;判断模块83例如用于判断所述多个媒体播放次数中的最 大媒体播放次数相对于剩余媒体播放次数之和的大小,以得到判断结果;以及生成模块85例如用于根据所述判断结果选择多个不同生成方式之一生成媒体播放序列,以供媒体播放器使用来播放所述多个媒体,其中所述媒体播放序列包含所述多个媒体标识、且每一个所述媒体标识在所述媒体播放序列中的数量等于所述媒体标识的所述媒体播放次数。
至于获取模块81、判断模块83和生成模块85的具体功能细节可参考前述第一实施例中步骤S11、S13和S15的相关描述,在此不再赘述。此外,值得一提的是,获取模块81、判断模块83和生成模块85可以为软件模块,存储于非易失性存储器中且由处理器执行相关操作以进行前述第一实施例中的步骤S11、S13和S15。
参见图8B,本实施例的生成模块85例如包括:选择单元851和多个生成单元例如第一生成单元8531、第二生成单元8532及第三生成单元8532。
其中,选择单元851例如用于根据所述判断结果选择多个生成单元8531-8533之一生成所述媒体播放序列。
第一生成单元8531例如用于(i)获取所述多个媒体播放次数的最大公约数,并获取所述多个媒体播放次数分别除以所述最大公约数的多个商值,以得到关联所述多个媒体标识和所述多个商值的对象数组;(ii)按照所述多个商值的大小对所述对象数组进行排序,以得到排序后对象数组;(iii)利用所述排序后对象数组中具有最大商值的媒体标识进行分段占位,以得到多个初始分段;(iv)获取所述排序后对象数组中具有商值能够整除所述最大商值的媒体标识,以形成第一媒体标识序列;(v)获取所述排序后对象数组中具有商值不能整除所述最大商值的媒体标识,以形成第二媒体标识序列;(vi)根据所述第一媒体标识序列和所述第二媒体标识序列确定所述排序后对象数组中除具有所述最大商值的媒体标识之外的剩余媒体标识分别在所述多个初始分段中的起始插入位置;(vii)根据所述最大商值、所述剩余媒体标识分别在所述排序后对象数组中的商值和所述剩余媒体标识分别在所述多个初始分段中的所述起始插入位置,确定所述剩余媒体标识分别在所述多个初始分段中的插入位置,以得到包含所述多个媒体标识的多个目标分段,其中所述多个媒体标识中的每一个媒体标识在所述多个目标分段中的总数量等于所述媒体标识在所述排序后对象数组中的商值;以及(viii)根据所述多个目标分段和所述最大公约数,得到所述媒体播放序列。
第二生成单元8532例如用于(a)生成关联所述多个媒体标识和所述多个媒体播放次数的第二对象数组;(b)计算所述多个媒体播放次数的和值,并生成数量等于所述和值的多个分段;(c)将所述和值除以2得到的商值向下取整,以确定具有所述最小媒体播放次数的媒体标识在所述多个分段中的目标位置;以及(d)在所述多个分段中对应所述目标位置的一个目标分段中插入具有所述最小媒体播放次数的媒体标识,并在所述多个分段中除所述目标分段之外的剩余分段中插入所述多个媒体标识中的剩余媒体标识,以得到所述媒体播放序列。
第三生成单元8533例如用于(1)按照所述多个媒体播放次数的大小进行排序,以得到关 联所述多个媒体标识和所述多个媒体播放次数的第三对象数组;(2)计算所述多个媒体播放次数的和值,并生成长度等于所述和值的二维数组;以及(3)将所述第三对象数据中的所述多个媒体标识依序作为待插入媒体标识插入所述二维数组以得到所述媒体播放序列,其具体包括:获取所述二维数组中的空数组的数量以得到获取结果,并生成用于记录所述空数组在所述二维数组中之位置的位置对象数组;以及根据所述获取结果和所述待插入媒体标识的所述媒体播放次数计算所述待插入媒体标识在所述二维数组中的插入位置。
至于选择单元851、第一生成单元8531、第二生成单元8532和第三生成单元8533的具体功能细节可参考前述第一实施例中关于步骤S15中的各个子步骤S1511-1518、S1531-1534及S1551-S1553的相关描述,在此不再赘述。此外,值得一提的是,选择单元851、第一生成单元8531、第二生成单元8532和第三生成单元8533可以为软件模块,存储于非易失性存储器中且由处理器执行相关操作以进行前述第一实施例中关于步骤S15中的各个子步骤S1511-1518、S1531-1534及S1551-S1553。
综上所述,本实施例应用于清单媒体广告播放时,采用本实施例媒体播放序列生成装置80执行的均匀排序方法,可以得出一个均匀分布的媒体播放序列进行播放,解决行业产品中不能均匀播放媒体广告的痛点问题;再者,本实施例执行的均匀排序方法不仅仅局限于清单媒体广告播放,还可以应用于其他类似多种场景。
【第三实施例】
如图9所示,本申请第三实施例提供的一种媒体播放序列生成系统90,包括:处理器91和存储器93;其中,存储器93存储由处理器91执行的指令,且所述指令例如使得处理器91执行操作以进行前述第一实施例所述的媒体播放序列生成方法。
【第四实施例】
如图10所示,本申请第四实施例提供的一种计算机可读存储介质100,其为非易失性存储器且存储有程序代码,所述程序代码被一个或多个处理器执行时实现前述第一实施例所述的媒体播放序列生成方法。
【第五实施例】
如图11所示,本申请第五实施例提供的一种媒体播放序列生成系统110,包括:服务器端111和浏览器端113。浏览器端113通过网页链接地址连接服务器端111,以共同执行前述第一实施例所述的媒体播放序列生成方法。浏览器端113例如是安装有浏览器的计算机,其可以从服务器端111下载播放清单进行显示(例如图3所示),也可以供用户对播放清单进行增加、修改、删除等操作并保存至服务器端111。再者,如图12所示,用户在浏览器端113通过网页链接地址连接服务器端111后,可以点击排序按钮SB并选择【均匀排序】选项,则可以执行媒体播放序列生成方法,例如根据图3所示播放清单可以生成一种媒体播放序列显示在图12所示显示界面内。
此外,可以理解的是,前述各个实施例仅为本发明的示例性说明,在技术特征不冲突、结构不矛盾、不违背本发明的发明目的前提下,各个实施例的技术方案可以任意组合、搭配使用。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和/或方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元/模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多路单元或模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元/模块可以是或者也可以不是物理上分开的,作为单元/模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多路网络单元上。可以根据实际的需要选择其中的部分或者全部单元/模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元/模块可以集成在一个处理单元/模块中,也可以是各个单元/模块单独物理存在,也可以两个或两个以上单元/模块集成在一个单元/模块中。上述集成的单元/模块既可以采用硬件的形式实现,也可以采用硬件加软件功能单元/模块的形式实现。
上述以软件功能单元/模块的形式实现的集成的单元/模块,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)的一个或多个处理器执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (12)

  1. 一种媒体播放序列生成方法,其特征在于,包括步骤:
    (a)获取多个媒体分别对应的多个媒体标识和所述多个媒体标识分别对应的多个媒体播放次数;
    (b)判断所述多个媒体播放次数中的最大媒体播放次数相对于剩余媒体播放次数之和的大小,以得到判断结果;以及
    (c)根据所述判断结果选择多个不同生成方式之一生成媒体播放序列,以供媒体播放器使用来播放所述多个媒体,其中所述媒体播放序列包含所述多个媒体标识、且每一个所述媒体标识在所述媒体播放序列中的数量等于所述媒体标识对应的所述媒体播放次数。
  2. 如权利要求1所述的媒体播放序列生成方法,其特征在于,所述步骤(c)包括:
    (c1)当所述判断结果为所述最大媒体播放次数小于或等于所述剩余媒体播放次数之和,选择所述多个不同生成方式中的第一生成方式生成所述媒体播放序列,其中所述第一生成方式为:
    获取所述多个媒体播放次数的最大公约数,并获取所述多个媒体播放次数分别除以所述最大公约数的多个商值,以得到关联所述多个媒体标识和所述多个商值的对象数组;
    按照所述多个商值的大小对所述对象数组进行排序,以得到排序后对象数组;
    利用所述排序后对象数组中具有最大商值的媒体标识进行分段占位,以得到多个初始分段;
    获取所述排序后对象数组中具有商值能够整除所述最大商值的媒体标识,以形成第一媒体标识序列;
    获取所述排序后对象数组中具有商值不能整除所述最大商值的媒体标识,以形成第二媒体标识序列;
    根据所述第一媒体标识序列和所述第二媒体标识序列确定所述排序后对象数组中除具有所述最大商值的媒体标识之外的剩余媒体标识分别在所述多个初始分段中的起始插入位置;
    根据所述最大商值、所述剩余媒体标识分别在所述排序后对象数组中的商值和所述剩余媒体标识分别在所述多个初始分段中的所述起始插入位置,确定所述剩余媒体标识分别在所述多个初始分段中的插入位置,以得到包含所述多个媒体标识的多个目标分段,其中所述多个媒体标识中的每一个媒体标识在所述多个目标分段中的总数量等于所述媒体标识在所述排序后对象数组中的商值;以及
    根据所述多个目标分段和所述最大公约数,得到所述媒体播放序列。
  3. 如权利要求1所述的媒体播放序列生成方法,其特征在于,所述步骤(c)包括:
    (c2)当所述判断结果为所述最大媒体播放次数大于剩余媒体播放次数之和、且满足条件:所述多个媒体标识的数量等于2且所述多个媒体播放次数中的最小媒体播放次数为1,选择所述多个不同生成方式中的第二生成方式生成所述媒体播放序列,其中所述第二生成方式为:
    生成关联所述多个媒体标识和所述多个媒体播放次数的第二对象数组;
    计算所述多个媒体播放次数的和值,并生成数量等于所述和值的多个分段;
    将所述和值除以2得到的商值向下取整,以确定具有所述最小媒体播放次数的媒体标识在所述多个分段中的目标位置;以及
    在所述多个分段中对应所述目标位置的一个目标分段中插入具有所述最小媒体播放次数的媒体标识,并在所述多个分段中除所述目标分段之外的剩余分段中插入所述多个媒体标识中的剩余媒体标识,以得到所述媒体播放序列。
  4. 如权利要求1所述的媒体播放序列生成方法,其特征在于,所述步骤(c)包括:
    (c3)当所述判断结果为所述最大媒体播放次数大于剩余媒体播放次数之和、且不满足条件:所述多个媒体标识的数量等于2且所述多个媒体播放次数中的最小媒体播放次数为1,选择所述多个不同生成方式中的第三生成方式生成所述媒体播放序列,其中所述第三生成方式为:
    按照所述多个媒体播放次数的大小进行排序,以得到关联所述多个媒体标识和所述多个媒体播放次数的第三对象数组;
    计算所述多个媒体播放次数的和值,并生成长度等于所述和值的二维数组;以及
    将所述第三对象数据中的所述多个媒体标识依序作为待插入媒体标识插入所述二维数组以得到所述媒体播放序列,具体包括:
    获取所述二维数组中的空数组的数量以得到获取结果,并生成用于记录所述空数组在所述二维数组中之位置的位置对象数组;以及
    根据所述获取结果和所述待插入媒体标识的所述媒体播放次数计算所述待插入媒体标识在所述二维数组中的插入位置。
  5. 一种媒体播放序列生成装置,其特征在于,包括:
    获取模块,用于获取多个媒体的多个媒体标识和所述多个媒体标识分别对应的多个媒体播放次数;
    判断模块,用于判断所述多个媒体播放次数中的最大媒体播放次数与剩余媒体播放次数之和的相对大小,以得到判断结果;以及
    生成模块,用于根据所述判断结果选择多个不同生成方式之一生成媒体播放序列,以供媒体播放器使用来播放所述多个媒体,其中所述媒体播放序列包含所述多个媒体标识、且每一个所述媒体标识在所述媒体播放序列中的数量等于所述媒体标识的所述媒体播放次 数。
  6. 如权利要求5所述的媒体播放序列生成装置,其特征在于,所述生成模块包括多个生成单元和选择单元,所述多个生成单元用于分别提供所述多个不同生成方式,且所述选择单元用于根据所述判断结果选择多个生成单元之一生成所述媒体播放序列。
  7. 如权利要求6所述的媒体播放序列生成装置,其特征在于,所述多个生成单元包括第一生成单元,且所述第一生成单元用于:
    获取所述多个媒体播放次数的最大公约数,并获取所述多个媒体播放次数分别除以所述最大公约数的多个商值,以得到关联所述多个媒体标识和所述多个商值的对象数组;
    按照所述多个商值的大小对所述对象数组进行排序,以得到排序后对象数组;
    利用所述排序后对象数组中具有最大商值的媒体标识进行分段占位,以得到多个初始分段;
    获取所述排序后对象数组中具有商值能够整除所述最大商值的媒体标识,以形成第一媒体标识序列;
    获取所述排序后对象数组中具有商值不能整除所述最大商值的媒体标识,以形成第二媒体标识序列;
    根据所述第一媒体标识序列和所述第二媒体标识序列确定所述排序后对象数组中除具有所述最大商值的媒体标识之外的剩余媒体标识分别在所述多个初始分段中的起始插入位置;
    根据所述最大商值、所述剩余媒体标识分别在所述排序后对象数组中的商值和所述剩余媒体标识分别在所述多个初始分段中的所述起始插入位置,确定所述剩余媒体标识分别在所述多个初始分段中的插入位置,以得到包含所述多个媒体标识的多个目标分段,其中所述多个媒体标识中的每一个媒体标识在所述多个目标分段中的总数量等于所述媒体标识在所述排序后对象数组中的商值;以及
    根据所述多个目标分段和所述最大公约数,得到所述媒体播放序列。
  8. 如权利要求7所述的媒体播放序列生成装置,其特征在于,所述多个生成单元还包括第二生成单元,且所述第二生成单元用于:
    生成关联所述多个媒体标识和所述多个媒体播放次数的第二对象数组;
    计算所述多个媒体播放次数的和值,并生成数量等于所述和值的多个分段;
    将所述和值除以2得到的商值向下取整,以确定具有所述最小媒体播放次数的媒体标识在所述多个分段中的目标位置;以及
    在所述多个分段中对应所述目标位置的一个目标分段中插入具有所述最小媒体播放次数的媒体标识,并在所述多个分段中除所述目标分段之外的剩余分段中插入所述多个媒体标识中的剩余媒体标识,以得到所述媒体播放序列。
  9. 如权利要求7或8所述的媒体播放序列生成装置,其特征在于,所述多个生成单元还包括第三生成单元,且所述第三生成单元用于:
    按照所述多个媒体播放次数的大小进行排序,以得到关联所述多个媒体标识和所述多个媒体播放次数的第三对象数组;
    计算所述多个媒体播放次数的和值,并生成长度等于所述和值的二维数组;以及
    将所述第三对象数据中的所述多个媒体标识依序作为待插入媒体标识插入所述二维数组以得到所述媒体播放序列,具体包括:
    获取所述二维数组中的空数组的数量以得到获取结果,并生成用于记录所述空数组在所述二维数组中之位置的位置对象数组;以及
    根据所述获取结果和所述待插入媒体标识的所述媒体播放次数计算所述待插入媒体标识在所述二维数组中的插入位置。
  10. 一种媒体播放序列生成系统,包括:处理器和存储器;其中所述存储器存储有所述处理器执行的指令,且所述指令使得所述处理器执行操作以进行如权利要求1至4任意一项所述的媒体播放序列生成方法。
  11. 一种媒体播放序列生成系统,包括:服务器端和浏览器端,其中所述浏览器端通过网页链接地址连接所述服务器端,以共同执行如权利要求1至4任意一项所述的媒体播放序列生成方法。
  12. 一种计算机可读存储介质,其中,所述计算机可读存储介质为非易失性存储器且存储有程序代码,所述程序代码被一个或多个处理器执行时实现如权利要求1至4任意一项所述的媒体播放序列生成方法。
PCT/CN2019/076513 2019-02-28 2019-02-28 媒体播放序列生成方法、装置及系统和计算机可读存储介质 WO2020172858A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/043,730 US11741997B2 (en) 2019-02-28 2019-02-28 Method, device and system for generating media playback sequence
PCT/CN2019/076513 WO2020172858A1 (zh) 2019-02-28 2019-02-28 媒体播放序列生成方法、装置及系统和计算机可读存储介质
CN201980028796.2A CN112042204A (zh) 2019-02-28 2019-02-28 媒体播放序列生成方法、装置及系统和计算机可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/076513 WO2020172858A1 (zh) 2019-02-28 2019-02-28 媒体播放序列生成方法、装置及系统和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2020172858A1 true WO2020172858A1 (zh) 2020-09-03

Family

ID=72239117

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/076513 WO2020172858A1 (zh) 2019-02-28 2019-02-28 媒体播放序列生成方法、装置及系统和计算机可读存储介质

Country Status (3)

Country Link
US (1) US11741997B2 (zh)
CN (1) CN112042204A (zh)
WO (1) WO2020172858A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080103893A1 (en) * 2006-10-30 2008-05-01 Yahoo! Inc. System and method for generating forecasted bids for advertisement keywords
CN101742274A (zh) * 2009-12-04 2010-06-16 苏州昂信科技有限公司 一种流媒体广告投放视频调度方法
CN103533397A (zh) * 2013-09-29 2014-01-22 浙江省公众信息产业有限公司 节目内容分发方法和装置
CN106162253A (zh) * 2015-04-16 2016-11-23 腾讯科技(北京)有限公司 多媒体信息播放次序确定方法及服务器

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002238045A (ja) * 2000-12-07 2002-08-23 Sony Computer Entertainment Inc サービス提供方法、サービス提供プログラムが記録されたコンピュータ読み取り可能な記録媒体、プログラム実行装置、コンテンツ配信システム、コンテンツ配信プログラムが記録されたコンピュータ読み取り可能な記録媒体、サービス提供プログラム、コンテンツ配信プログラム
JP2002344405A (ja) * 2001-03-16 2002-11-29 Matsushita Electric Ind Co Ltd データ放送スケジュールシステム、それに関する装置、方法、記録媒体またはプログラム
US10015536B2 (en) * 2011-11-04 2018-07-03 Mitsubishi Electric Corporation Content-display scheduling system and content-display scheduling method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080103893A1 (en) * 2006-10-30 2008-05-01 Yahoo! Inc. System and method for generating forecasted bids for advertisement keywords
CN101742274A (zh) * 2009-12-04 2010-06-16 苏州昂信科技有限公司 一种流媒体广告投放视频调度方法
CN103533397A (zh) * 2013-09-29 2014-01-22 浙江省公众信息产业有限公司 节目内容分发方法和装置
CN106162253A (zh) * 2015-04-16 2016-11-23 腾讯科技(北京)有限公司 多媒体信息播放次序确定方法及服务器

Also Published As

Publication number Publication date
CN112042204A (zh) 2020-12-04
US11741997B2 (en) 2023-08-29
US20210383842A1 (en) 2021-12-09

Similar Documents

Publication Publication Date Title
CN1812393B (zh) 基于用户行为的数字媒体传输的方法、设备和系统
US10318502B2 (en) Intelligent identification of multimedia content for grouping
US8484227B2 (en) Caching and synching process for a media sharing system
US8880599B2 (en) Collection digest for a media sharing system
US7752265B2 (en) Source indicators for elements of an aggregate media collection in a media sharing system
CN101443849B (zh) 视频浏览用户界面
US7853712B2 (en) Activity indicators in a media sharing system
CN108259939B (zh) 新视频推送控制方法、装置及服务器
US20140214849A1 (en) Correlating categories of attributes of contents with classification elements
US20100094834A1 (en) Bridging in a media sharing system
US20070204227A1 (en) Graphical playlist
JP7175957B2 (ja) 繰り返しの再生を回避するための、メディアタイトルの以前にストリーミングされた部分の特定
US10628385B2 (en) Virtual collection of entities in sync process
JP2009510532A5 (zh)
US20080104219A1 (en) Content Sharing System, Content Management Server, Client Station, Method for Managing Content, Method for Acquiring Content, and Program
CN102236669A (zh) 推荐列表的生成方法和装置、媒体服务器、客户端及方法
CN102214193A (zh) 信息处理装置、客户端装置、服务器装置
US20080125889A1 (en) Method and system for customization of entertainment selections in response to user feedback
CN109767267A (zh) 一种用于广告投放的目标用户推荐方法及装置
JP2010147507A (ja) コンテンツ再生装置
WO2020172858A1 (zh) 媒体播放序列生成方法、装置及系统和计算机可读存储介质
CN107911749A (zh) 一种合演图谱的展示、提供方法、客户端及服务器
KR102278048B1 (ko) 영상 처리 장치, 이의 제어 방법 및 컴퓨터 프로그램이 기록된 기록 매체
CN109857907A (zh) 视频定位方法和装置
CN106375827B (zh) 弹幕处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19917305

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19917305

Country of ref document: EP

Kind code of ref document: A1