Audio and radio file fragment type repeat play method and system at WEB end

A technology of file fragments and playback methods, applied in electrical components, image communication, selective content distribution, etc.

Active Publication Date: 2016-05-11
WUHAN TCL CORP RES CO LTD
15 Cites 3 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a method and system for repeatedly playing audio and video files on the W...
View more

Method used

And deposit in database (Database, be called for short DB) with key:value form, can switch between RDB and NOSQLDB easily like this, wherein, RDB refers to relational database (RelationalDatabase, be called for short RDB), and relational database is exactly based on Relational database is a way of using database to organize data. It is the most commonly used type in modern database management systems and one of the most effective forms of data organization. NoSQLDB refers to a non-relational database (NotonlyStructuredQueryLanguageDatabase, referred to as NoSQLDB). This type of database mainly uses a hash table, which has a specific key and a pointer to specific data. Specifically, memory caching technology can be used instead of DB or a layer of caching interface can be used for DB to speed up data extraction.
In sum, the present invention provides a kind of WEB end audio and video file fragment type repeat playing method and system, described method comprises: in WEB end audio and v...
View more

Abstract

The invention discloses an audio and radio file fragment type repeat play method and system at a WEB end. The method comprises following steps: when an audio and radio file fragment repeat play request input by a user is received in the play process of a WEB end audio and radio file, querying corresponding audio and radio file fragments on a server according to the input type of the repeat play request; and repeating the queried audio and radio file fragments at the WEB end. According to the method and the system of the invention, the user inputs fragment serial numbers by a keyboard or clicks the play time shaft of the audio and radio file by a mouse, the audio and radio file fragment type repeat play is realized; and convenience for repeating the audio and radio file is provided to the user.

Application Domain

Selective content distribution

Technology Topic

MultimediaSerial code +1

Image

  • Audio and radio file fragment type repeat play method and system at WEB end
  • Audio and radio file fragment type repeat play method and system at WEB end
  • Audio and radio file fragment type repeat play method and system at WEB end

Examples

  • Experimental program(1)

Example Embodiment

[0042] In order to make the objectives, technical solutions and effects of the present invention clearer and clearer, the present invention will be described in further detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
[0043] The present invention provides a flowchart of a preferred embodiment of a method for repeating playback of audio and video files on a WEB terminal, such as figure 1 shown, methods include:
[0044] Step S100: During the playback of the audio and video files on the WEB side, when a request for repeated playback of audio and video file segments input by the user is detected, the corresponding audio and video file segments are queried on the server based on the input type of the repeated playback request.
[0045] In specific implementation, during the playback of audio and video files on the WEB side, an event input by the user is detected, and the user clicks the time on the playback timeline or inputs a specific numerical value to trigger a repeated playback request of audio and video file segments. According to the playback request, the corresponding audio and video file segments are queried on the server, and the query result is returned to the WEB side. The input type of the repeat playback request includes the user clicking the time on the audio playback time axis with the mouse, or clicking the number key displayed on the WEB terminal with the mouse, or receiving the user inputting the numerical value through the keyboard.
[0046] Further, before step S100, it also includes:
[0047] Step S1: Divide the audio and video files on the WEB end into several segments in advance, and number them in the order of playback time to form segment serial numbers, obtain the playback start time and playback end time of each segment, and store them on the server.
[0048] During specific implementation, an audio and video file is obtained in advance on the WEB end, and according to certain rules, the audio and video file is divided into several audio and video file segments, wherein the audio and video files can also be abbreviated as segments. The definitions of the following clips are the same as the clips of audio and video files. Preferably, a complete sentence is used as a fragment. The clips are numbered in the order of playback time to form a unique clip serial number for each clip. Obtain the playback start time and playback end time corresponding to each segment and store them on the server. Preferably, the sequence number of the segment in a complete sentence of the audio and video file, the play start time, and the play end time are stored in a time array model TimeArrayModel.
[0049] In the specific implementation, the time segment model of the entire sentence of audio and video is as follows, and all the entire sentences constitute a complete repeat object (TimeArrayModel) structure, and the structure is as follows:
[0050] [
[0051] {
[0052] "serialNo":1,
[0053] "startTime":23,
[0054] "endTime":30
[0055]},
[0056]...
[0057] {
[0058] "serialNo":n,
[0059] "startTime":50,
[0060] "endTime": 60
[0061]}
[0062] ]
[0063] Among them, serialNo: the identification number of the repeating segment, which is used to assign a label to each segment for matching with the numeric key event, startTime: the starting time point of the repeating segment, and endTime: the ending time point of the repeating segment.
[0064] In step S200, the WEB terminal repeatedly plays the queried audio and video file segments.
[0065] During specific implementation, the WEB terminal receives and plays the audio and video file segments that need to be played repeatedly.
[0066] In a further embodiment, when the user requests the audio and video file segments to be played repeatedly by clicking the time on the play axis, the step S100 specifically includes:
[0067] Step S101, in the WEB terminal audio and video file playing process, real-time detection of user input;
[0068] Step S102: When it is detected that the user clicks on the playback timeline, the click time is obtained, the time interval corresponding to the click time is queried on the server, and the WEB terminal obtains the audio and video file segments corresponding to the time interval.
[0069] In specific implementation, during the playback of audio and video files on the WEB side, the user's input is detected in real time. When it is detected that the user clicks on the playback timeline, the click time obtained from the timeline is within a time interval given by the server, and the time interval is obtained. startTime and endTime of the current time interval.
[0070] In a further embodiment, when the user operates through a data key on the keyboard, the step S100 specifically includes:
[0071] Step S111, during the playback of the audio and video files on the WEB end, real-time detection of the user's input;
[0072] Step S112, when detecting that the user has input a number, query the server for the segment serial number corresponding to the number;
[0073] Step S113: Acquire the corresponding time interval according to the segment serial number, and the WEB terminal acquires the audio and video file segments corresponding to the time interval.
[0074] In the specific implementation, when the user does not use the mouse to operate, but uses the data key, when the current numeric key value and the data serialNo given by the server can match, the startTime corresponding to the matched serialNo is taken out as the start time of playback, corresponding to The endTime is the end time.
[0075] Specifically, when the WEB page side requests the server for an audio and video file, the server can simultaneously request the file with the same ID, and the file name of the paragraph data is the same as the ID of the audio and video file.
[0076] In a further embodiment, after the step S100 and before the step S200, the steps further include:
[0077] Step S130, the WEB terminal receives the user's instruction to set the number of times of playback.
[0078] During specific implementation, after judging whether the selected segment is legal, the web page will pop up a reminder for the number of repetitions to the user. After the user inputs the number of repetitions, the repetition process starts. Of course, after the prompt box for the number of repetitions pops up, you can also select it as the subsequent default option, so that all the repetition options selected later do not need to be filled in, and no prompt will pop up again. This further simplifies user operation behavior.
[0079] Specifically, after the step S1 and before the step S100, the steps further include:
[0080] In step S11, a shortcut key operation is preset, and when it is detected that the user performs the shortcut key operation, the last set operation is repeated.
[0081] In the specific implementation, after listening to the set N times, if you want to continue to repeat it for N times, it is inhumane to do the same operation last time, so the R operation is added (not necessarily the R key can defined as other keys), that is to repeat the last set operation again. For example, if you repeated [startTime, endTime] 3 times last time, then the R key represents repeating [startTime, endTime] 3 times.
[0082] The present invention also provides a flowchart of a specific embodiment 1 of a method for repeating playback of audio and video files on a WEB terminal, such as figure 2 shown, where methods include:
[0083] Step S10, start;
[0084] Step S20, obtaining the time array model from the server, the time array model needs to be stored in the server in advance, and the time array model specifically includes data such as the sequence number corresponding to the audio and video file segment, the playback start time, and the playback end time;
[0085] Step S30, start a mouse event monitoring program to determine whether the mouse clicks on the player timeline, if not, go to step S40, if so, go to step S50;
[0086] Step S40, judging whether the number button is pressed, specifically, start a keyboard event monitor, used to capture keyboard events, determine whether the user clicks the number button on the keyboard, if yes, then go to step S70, if not, go to step S92;
[0087] Step S50, obtaining the click time point on the time axis;
[0088] Step S60, judging whether the time array model has a time interval where the above-mentioned click time point is located, specifically, query the time array module in the server whether there is a time interval where the user click time point is located, wherein the time interval corresponds to the playback of the audio and video files The start time is up to the playback end time, if yes, then go to step S90, if not, go to step S92;
[0089] Step S70, judging whether there is a corresponding segment serial number equal to the key value in the time array model, and determining whether the key value of the numeric key clicked by the user exists in the time array model in the server, if yes, then go to step S80, if not, Then execute step S92;
[0090] Step S80, obtaining the playback start time corresponding to the segment sequence number;
[0091] Step S90, setting the player to jump to the playback start time point; specifically, the start time point refers to the above-mentioned starttime pre-stored in the server, which refers to the start playback time of a certain segment of audio and video;
[0092] Step S91, playing audio and video at a specified time, specifically, the specified time refers to the time interval where the click time point is located;
[0093] Step S92, end.
[0094] It should be noted that, in this embodiment, the user's operation is first determined by clicking on the time axis of the player, and when it is determined whether it is yes, then it is determined whether there are numeric buttons. This embodiment is not limited to this order, and it is also possible to determine whether there is Number keys, when it is judged to be no, then judge whether to click on the timeline of the player, but no matter which order, the purpose of repeating according to the user's needs can be achieved, which is not limited here.
[0095] Further, after listening to the set N times, if you want to continue to repeat it for N times, it is inhumane to do the same operation last time, so the R operation is added (not necessarily the R key can be defined). for other keys), that is, repeat the last set operation again. For example, if you repeated [startTime, endTime] 3 times last time, then the R key represents repeating [startTime, endTime] 3 times. The present invention also provides a flowchart of the second specific embodiment of a method for repeating playback of audio and video files on a WEB terminal, wherein the R key is a preset shortcut key used to repeat the last setting operation, such as image 3 shown, where methods include:
[0096] Step S11, start;
[0097] Step S12, obtaining the time array model from the server, the time array model needs to be stored in the server in advance, and the time array model specifically includes data such as the sequence number corresponding to the audio and video file segment, the playback start time, and the playback end time;
[0098] Step S13, start a mouse event monitoring program to determine whether the mouse clicks on the player timeline, if not, go to step S14, if so, go to step S15;
[0099] Step S14, judging whether the number key is pressed, specifically, start a keyboard event monitor, used for capturing keyboard events, to determine whether the user clicks the number key on the keyboard, if yes, then go to step S17, if not, go to step S141;
[0100] Step S141, determine whether it is the R key, if so, execute step S142, if not, execute step S195;
[0101] Step S142, obtaining the last set playback time interval and the number of repeated playbacks, and then performing step S191;
[0102] Step S15, obtaining the click time point on the time axis;
[0103] Step S16, judging whether the time array model exists in the time interval where the above-mentioned click time point is located, specifically, query the time array module in the server whether there is a time interval where the time point where the user clicks is located, wherein the time interval corresponds to the playback of the audio and video files If the start time is up to the end time of playback, step S19 is executed, if not, step S195 is executed;
[0104] Step S17: Determine whether there is a corresponding segment serial number equal to the key value in the time array model, and determine whether the key value of the numeric key clicked by the user exists in the time array model in the server, then execute step S18, if not, execute step S18 Step S195;
[0105] Step S18, obtaining the playback start time corresponding to the segment sequence number;
[0106] Step S19, pop up the number of plays;
[0107] Step S191, judging whether the number of times of playback is 0, if so, go to step S195, if not, go to step S192;
[0108] Step S192, setting the player to jump to the playback start time point, specifically, the start time point refers to the above-mentioned starttime pre-stored in the server, and refers to the start playback time of a certain segment of audio and video;
[0109] Step S193, playing audio and video at a specified time, specifically, the specified time refers to the time interval where the click time point is located;
[0110] Step S194, playing times-1;
[0111] Step S195, end.
[0112] It should be noted that, in this embodiment, the user's operation is first determined by clicking on the time axis of the player, and when it is determined whether it is yes, then it is determined whether there are numeric buttons. This embodiment is not limited to this order, and it is also possible to determine whether there is Number keys, when it is judged to be no, then judge whether to click on the timeline of the player, but no matter which order, the purpose of repeating according to the user's needs can be achieved, which is not limited here.
[0113]The present invention provides a specific application embodiment 3 of a method for repeating playback of audio and video files on a WEB side in segments. In this embodiment, in order to simplify the input method, here a number, unit (second, minute) plus a custom delimiter is added, and the beginning and end are automatically added (in this way, two less dots can be entered). The following is an example with "|" as the delimiter, the time unit is s, and the entire audio duration is 60s. The storage method of data in the background is as follows: Assuming that there are 5 segments in the audio, the playback durations are 10s, 12s, 13s, 15s, and 10s respectively. The storage method is as follows
[0114] 10|22|35|50.
[0115] The above values ​​will be converted into the following strings, which is convenient to speed up the background return time and reduce the background data parsing time. The storage form of the specific time array model is:
[0116] [
[0117] {
[0118] "serialNo":1,
[0119] "startTime":0,
[0120] "endTime": 10
[0121]},
[0122] {
[0123] "serialNo":2,
[0124] "startTime":10,
[0125] "endTime": 22
[0126]},
[0127] {
[0128] "serialNo":3,
[0129] "startTime":22,
[0130] "endTime": 35
[0131]},
[0132] {
[0133] "serialNo":4,
[0134] "startTime":35,
[0135] "endTime": 50
[0136]},
[0137] {
[0138] "serialNo":5,
[0139] "startTime":50,
[0140] "endTime": 60
[0141]}
[0142] ]
[0143] It is stored in the database (Database, DB for short) in the form of key:value, so that it is convenient to switch between RDB and NOSQLDB. Among them, RDB refers to relational database (RelationalDatabase, referred to as RDB), relational database is based on relational Database is a way of using database to organize data. It is one of the most commonly used in modern database management systems and one of the most effective forms of data organization. NoSQLDB refers to a non-relational database (NotonlyStructuredQueryLanguageDatabase, referred to as NoSQLDB). This type of database mainly uses a hash table, which has a specific key and a pointer to specific data. Specifically, in-memory caching technology can be used instead of DB or a layer of caching interface can be used for DB to speed up data extraction.
[0144] Suppose the audio and video name of the above example is englishOne. is stored in the following form
[0145] englishOne:
[0146] [
[0147] [
[0148] {
[0149] "serialNo":1,
[0150] "startTime":0,
[0151] "endTime": 10
[0152]},
[0153] {
[0154] "serialNo":2,
[0155] "startTime":10,
[0156] "endTime": 22
[0157]},
[0158] {
[0159] "serialNo":3,
[0160] "startTime":22,
[0161] "endTime": 35
[0162]},
[0163] {
[0164] "serialNo":4,
[0165] "startTime":35,
[0166] "endTime": 50
[0167]},
[0168] {
[0169] "serialNo":5,
[0170] "startTime":50,
[0171] "endTime": 60
[0172]}
[0173] ]
[0174] Database DAO layer design such as Figure 4 As shown, the DAO layer is a layered architecture of the database, and the Dao layer uses the object-relational mapping framework Hibernate to connect to the database and operate the database (add, delete, modify and query). The benefits of the above design can be found in Figure 4 seen in:
[0175] RDB and NoSQLDB can be replaced, and the whole of 1 can be replaced with the whole of 2. The design is flexible and can be adapted to small and large application scenarios. 1 can be used even when the amount of data used is large. In 1, if writes are frequent, NoSQLDB can be used instead of RDB. CacheLayer is the cache layer.
[0176] The present invention also provides a functional principle block diagram of a preferred embodiment of a WEB-side audio and video file segment type repeat playback system, such as Figure 5 shown, where the system includes:
[0177] The detection and query module 100 is used to query the corresponding audio and video file fragments on the server based on the input type of the repeated playback request when detecting the repeated playback request of the audio and video file segments input by the user during the playback of the audio and video files on the WEB terminal ; as described above.
[0178] The playing module 200 is used for the WEB terminal to repeatedly play the queried audio and video file segments; the details are as described above.
[0179] The described WEB terminal audio and video file segment type repeat playback system, wherein, the detection and query module specifically includes:
[0180] The first detection unit is used to detect the user's input in real time during the playback of the audio and video files on the WEB terminal; the details are as described above.
[0181] The first query unit is used to obtain the click time when it is detected that the user clicks on the playback time axis, query the time interval corresponding to the click time on the server, and obtain the audio and video file fragments of the corresponding time interval on the WEB side; the details are as above said.
[0182] The described WEB terminal audio and video file segment type repeat playback system, wherein, the detection and query module specifically includes:
[0183] The second detection unit is used for real-time detection of the user's input during the playback of the audio and video files on the WEB side; the details are as described above.
[0184] The second query unit is configured to query the server for the sequence number of the segment corresponding to the number when it is detected that the number is input by the user; the details are as described above.
[0185] The obtaining unit is configured to obtain the corresponding time interval according to the sequence number of the fragment, and the WEB terminal obtains the audio and video file fragments of the corresponding time interval; the details are as described above.
[0186] The described WEB terminal audio and video file segment type repeat playback system, wherein, the system also includes:
[0187] The playing times setting module is used for the WEB terminal to receive the user's instruction to set the playing times; the details are as described above.
[0188] The pre-storage module is used to divide the audio and video files on the WEB side into several segments in advance, and number them in the order of playback time to form segment serial numbers, obtain the playback start time and playback end time of each segment, and store them on the server; as above.
[0189] The shortcut key setting module is used to preset a shortcut key operation. When it is detected that the user performs the shortcut key operation, the last set operation is repeated; the details are as described above.
[0190] To sum up, the present invention provides a method and system for segmented playback of audio and video files on the WEB side. At the time, the corresponding audio and video file fragments are queried on the server based on the input type of the repeated playback request; the WEB terminal repeatedly plays the queried audio and video file fragments. In the present invention, the user inputs the segment serial number through the keyboard or clicks the playback timeline of the audio and video files to realize the segment-type repeated playback of the audio and video files, which provides convenience for the user to repeatedly play the audio and video files.
[0191] It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or transformations can be made according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products