CN111312298A - Audio and video playing method and system based on time scheduling - Google Patents

Audio and video playing method and system based on time scheduling Download PDF

Info

Publication number
CN111312298A
CN111312298A CN202010118934.0A CN202010118934A CN111312298A CN 111312298 A CN111312298 A CN 111312298A CN 202010118934 A CN202010118934 A CN 202010118934A CN 111312298 A CN111312298 A CN 111312298A
Authority
CN
China
Prior art keywords
playing
audio
video
time
played
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010118934.0A
Other languages
Chinese (zh)
Other versions
CN111312298B (en
Inventor
王焱俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology Co Ltd
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 Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202010118934.0A priority Critical patent/CN111312298B/en
Publication of CN111312298A publication Critical patent/CN111312298A/en
Application granted granted Critical
Publication of CN111312298B publication Critical patent/CN111312298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10009Improvement or modification of read or write signals
    • G11B20/10018Improvement or modification of read or write signals analog processing for digital recording or reproduction
    • 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

Abstract

The application discloses an audio and video playing method based on time scheduling, which comprises the following steps: setting a playing flag bit; setting playing time; and playing the audio and video according to the playing flag bit and the playing time. Compared with the prior art, the method has the following beneficial effects: 1. the method is suitable for all Internet of things equipment with an audio playing function, has portability, and is suitable for platforms with different chip architectures. 2. The current audio can be played flexibly according to the set time. 3. The currently played audio can be switched at will, and the currently played task can be stopped at any time.

Description

Audio and video playing method and system based on time scheduling
Technical Field
The application relates to the field of Internet of things, in particular to an audio and video playing method based on time scheduling.
Background
In the prior art, security products generally have an audio playing function, for example, a security gateway has a function of arming and disarming. Playing stay and arm when deploying defense; playing disarm when disarming; when alarming, the alarming sound of ten minutes needs to be played, which is completed by the cyclic playing of the alarming sound of one second; when the 30S countdown is started, the 30S dripping sound is played first (the dripping sound is played circularly for one second), the countdown is carried out, and then the static and arm are played.
However, the prior art has the following disadvantages:
1. certain audio cannot be played circularly within a specified time, and only certain audio can be played independently.
2. Due to the technology related to the existing gateway product, the playing of the audio is performed only after the current audio is played, for example, the audio 1 is currently played, and the audio 2 to be played needs to wait for the completion of the playing of the audio 1 and cannot be played immediately. Therefore, in order to solve the problem, the audio playing can be switched at will (the current playing task is interrupted, the audio required by the current instruction is played), for example, the audio 1 is being played at this time, then the app can issue a command to play the audio 2, and the audio horse will cancel the current playing and play the audio 2.
Disclosure of Invention
The application mainly aims to provide an audio and video playing method based on time scheduling, which comprises the following steps:
setting a playing flag bit;
setting playing time;
and playing the audio and video according to the playing flag bit and the playing time.
Optionally, playing the audio/video according to the playing flag bit and the playing time includes:
when the mark character of the playing mark bit represents the audio and video to be played, and when the playing time is 0, playing the audio and video to be played once;
when the marker character of the playing marker bit represents the audio and video to be played, and when the playing time is n, playing the audio and video to be played at the time corresponding to n;
wherein n is a positive integer.
Optionally, playing the audio/video according to the playing flag bit and the playing time includes:
recording the starting playing time and the time of finishing the audio and video playing;
detecting whether the current time in the playing process exceeds the audio and video playing time in real time;
when the previous time exceeds the audio and video playing time, changing the mark character of the playing mark bit to ensure that the mark character represents that no audio and video to be played exists;
and stopping playing the current audio and video.
Optionally, the audio/video playing method based on time scheduling further includes:
in the process of playing the audio and video, changing the mark character of the playing mark bit to ensure that the mark character represents that the audio and video to be played does not exist;
stopping playing the current audio and video;
calling other audios and videos;
resetting the marker characters of the playing marker bits to enable the marker characters to represent the audio and video to be played;
and playing the other audios and videos.
Optionally, n is 30, and n corresponds to 30 seconds.
Optionally, when the flag character of the playing flag bit is TRUE, it indicates that the audio/video is to be played; and when the flag character of the playing flag bit is FALSE, the audio and video to be played is not shown.
According to another aspect of the present application, there is also provided an audio/video playing system based on time scheduling, including:
the first setting module is used for setting a playing flag bit;
the second setting module is used for setting the playing time;
and the playing module is used for playing the audio and video according to the playing zone bit and the playing time.
The application also discloses a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of being executed by the processor, wherein the processor realizes the method of any one of the above items when executing the computer program.
The application also discloses a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements the method of any of the above.
The present application also discloses a computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
Compared with the prior art, the method has the following beneficial effects:
1. the method is suitable for all Internet of things equipment with an audio playing function, has portability, and is suitable for platforms with different chip architectures.
2. The current audio can be played flexibly according to the set time.
3. The currently played audio can be switched at will, and the currently played task can be stopped at any time.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
fig. 1 is a schematic flowchart of an audio/video playing method based on time scheduling according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an audio/video playing method based on time scheduling according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the present application; and
FIG. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Referring to fig. 1-2, an embodiment of the present application provides an audio and video playing method based on time scheduling, including:
s2: setting a playing flag bit;
s4: setting playing time;
s6: and playing the audio and video according to the playing flag bit and the playing time.
In an embodiment of the present application, playing the audio and video according to the playing flag bit and the playing time includes:
when the mark character of the playing mark bit represents the audio and video to be played, and when the playing time is 0, playing the audio and video to be played once;
when the marker character of the playing marker bit represents the audio and video to be played, and when the playing time is n, playing the audio and video to be played at the time corresponding to n;
wherein n is a positive integer.
In an embodiment of the present application, playing the audio and video according to the playing flag bit and the playing time includes:
recording the starting playing time and the time of finishing the audio and video playing;
detecting whether the current time in the playing process exceeds the audio and video playing time in real time;
when the previous time exceeds the audio and video playing time, changing the mark character of the playing mark bit to ensure that the mark character represents that no audio and video to be played exists;
and stopping playing the current audio and video.
In an embodiment of the application, the audio and video playing method based on time scheduling further includes:
in the process of playing the audio and video, changing the mark character of the playing mark bit to ensure that the mark character represents that the audio and video to be played does not exist;
stopping playing the current audio and video;
calling other audios and videos;
resetting the marker characters of the playing marker bits to enable the marker characters to represent the audio and video to be played;
and playing the other audios and videos.
In an embodiment of the present application, n is 30, and the time corresponding to n is 30 seconds.
In an embodiment of the application, when a flag character of a playing flag bit is TRUE, it indicates that an audio/video to be played is to be played; and when the flag character of the playing flag bit is FALSE, the audio and video to be played is not shown.
The application also claims an audio and video playing system based on time scheduling, comprising:
the first setting module is used for setting a playing flag bit;
the second setting module is used for setting the playing time;
and the playing module is used for playing the audio and video according to the playing zone bit and the playing time.
For example, the playback flow is as follows:
1.1 audio playing flag bit: audio _ play _ start, when the value is TRUE, it represents that there is audio to play, and when it is FALSE, it represents that the current audio play is stopped.
1.2 audio playing time: the play _ time, when 0, represents that the current audio only needs to be played once, and when not 0, for example, this value is 30, represents that the current audio needs to be played for 30S.
1.3 Audio Play host service: the service detects the value of audio _ play _ start, if TRUE, it indicates that there is audio to be played, and simultaneously obtains the audio file and play _ time that need to be played currently, where play _ time is 0, and only plays once, but not 0, and then plays in a loop; if it is FALSE, it indicates that the current playing task needs to be stopped.
1.4 Play time control service: the service detects the values of audio _ play _ start and play _ time as in the service of 1.3, and the service will execute when the audio _ play _ start is TRUE and the play _ time is not 0. For example, audio _ play _ start is TRUE, path _ time is 30S, the service just starts to record the current time and the time of audio playing end +30S, and then always detects whether the current time exceeds the audio playing time, if so, the audio _ play _ start is FALSE, and after detecting that the value is FALSE, the service of 1.3 stops the current playing task.
2. For better control of audio playback, two functions are also implemented:
2.1Audio Play Enable: and an audio _ run, which sets audio _ play _ start to TRUE, and sets the current play time, and sets the currently played audio.
2.2Audio Play stop: audio _ stop, which sets audio _ play _ start to FALSE
And will set the current playing time to 0.
3. With the above components in mind, and by way of example, the alert audio is currently required to be played for 30 seconds, and when half of the alert audio is required to be played, the disarm audio is then stopped.
3.1 first the 1.3 audio playback main service and the 1.4 playback time control service are running in the background all the time.
3.2 execute 2.1audio _ run, set audio _ play _ start to TRUE, play _ time to 30S, current audio to warning.
3.3 the service of 1.3 and 1.4 above would get these settings, 1.3 would loop through the current audio until audio _ play _ start is FALSE, and then exit.
3.4 the Play time control service will detect whether the current time exceeds the audio play time, if yes, audio _ play _ start is FALSE, and at the same time the audio play main service detects this value and stops playing.
3.5 when half of the warning sound is played, we want to play the disc, and will first execute 2.2audio _ stop, stop the current audio playing, and play the disc after calling audio _ run.
The above embodiments are examples of playing audio, but not limited thereto. Those skilled in the art can change the type of the playing file, such as video file, etc., according to the actual requirement, and all fall within the scope of the claimed application.
Compared with the prior art, the method has the following beneficial effects:
1. the method is suitable for all Internet of things equipment with an audio playing function, has portability, and is suitable for platforms with different chip architectures.
2. The current audio can be played flexibly according to the set time.
3. The currently played audio can be switched at will, and the currently played task can be stopped at any time.
In addition, in the above embodiment, when the playing time n is 30, the corresponding time is 30 seconds. This is because the scenes that need to be played in the above-described embodiment are shorter for the audio to be played. However, the present invention is not limited thereto. The time unit corresponding to n, such as minutes, hours, even days, months or years, etc., can be changed by those skilled in the art according to actual needs, and all fall within the scope of the present application.
Referring to fig. 3, the present application further provides a computer device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of the above methods when executing the computer program.
Referring to fig. 4, a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements any of the methods described above.
A computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. An audio and video playing method based on time scheduling is characterized by comprising the following steps:
setting a playing flag bit;
setting playing time;
and playing the audio and video according to the playing flag bit and the playing time.
2. The audio/video playing method based on time scheduling according to claim 1, wherein playing audio/video according to the playing flag bit and the playing time thereof comprises:
when the mark character of the playing mark bit represents the audio and video to be played, and when the playing time is 0, playing the audio and video to be played once;
when the marker character of the playing marker bit represents the audio and video to be played, and when the playing time is n, playing the audio and video to be played at the time corresponding to n;
wherein n is a positive integer.
3. The audio/video playing method based on time scheduling according to claim 2, wherein playing audio/video according to the playing flag bit and the playing time thereof comprises:
recording the starting playing time and the time of finishing the audio and video playing;
detecting whether the current time in the playing process exceeds the audio and video playing time in real time;
when the previous time exceeds the audio and video playing time, changing the mark character of the playing mark bit to ensure that the mark character represents that no audio and video to be played exists;
and stopping playing the current audio and video.
4. The audio-video playing method based on time scheduling according to claim 3, wherein the audio-video playing method based on time scheduling further comprises:
in the process of playing the audio and video, changing the mark character of the playing mark bit to ensure that the mark character represents that the audio and video to be played does not exist;
stopping playing the current audio and video;
calling other audios and videos;
resetting the marker characters of the playing marker bits to enable the marker characters to represent the audio and video to be played;
and playing the other audios and videos.
5. The method according to claim 4, wherein n is 30, and the time corresponding to n is 30 seconds.
6. The audio-video playing method based on time scheduling according to claim 5, wherein when the flag character of the playing flag bit is TRUE, it indicates that the audio-video is to be played; and when the flag character of the playing flag bit is FALSE, the audio and video to be played is not shown.
7. An audio and video playing system based on time scheduling is characterized by comprising:
the first setting module is used for setting a playing flag bit;
the second setting module is used for setting the playing time;
and the playing module is used for playing the audio and video according to the playing zone bit and the playing time.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, a non-transitory readable storage medium, having stored therein a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1-6.
10. A computer program product comprising computer readable code that, when executed by a computer device, causes the computer device to perform the method of any of claims 1-6.
CN202010118934.0A 2020-02-26 2020-02-26 Audio and video playing method and system based on time scheduling Active CN111312298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010118934.0A CN111312298B (en) 2020-02-26 2020-02-26 Audio and video playing method and system based on time scheduling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010118934.0A CN111312298B (en) 2020-02-26 2020-02-26 Audio and video playing method and system based on time scheduling

Publications (2)

Publication Number Publication Date
CN111312298A true CN111312298A (en) 2020-06-19
CN111312298B CN111312298B (en) 2021-08-20

Family

ID=71148093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010118934.0A Active CN111312298B (en) 2020-02-26 2020-02-26 Audio and video playing method and system based on time scheduling

Country Status (1)

Country Link
CN (1) CN111312298B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870694A (en) * 2005-05-27 2006-11-29 华为技术有限公司 Method for broadcasting opera browser
CN101064895A (en) * 2006-06-05 2007-10-31 北京恒基伟业投资发展有限公司 Method for controlling play of mobile phone bell
CN101902467A (en) * 2010-07-06 2010-12-01 中兴通讯股份有限公司 Method and system for realizing random display of polyphonic ringtones
CN102682820A (en) * 2012-05-03 2012-09-19 福建星网视易信息系统有限公司 Method and system for embedding type linux platform media playing
CN102970484A (en) * 2012-11-27 2013-03-13 惠州Tcl移动通信有限公司 Sound prompt method in photographing and electronic equipment based on method
CN106777099A (en) * 2016-12-14 2017-05-31 掌阅科技股份有限公司 The processing method of business speech data, device and terminal device
CN109756784A (en) * 2018-12-21 2019-05-14 广州酷狗计算机科技有限公司 Method for playing music, device, terminal and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870694A (en) * 2005-05-27 2006-11-29 华为技术有限公司 Method for broadcasting opera browser
CN101064895A (en) * 2006-06-05 2007-10-31 北京恒基伟业投资发展有限公司 Method for controlling play of mobile phone bell
CN101902467A (en) * 2010-07-06 2010-12-01 中兴通讯股份有限公司 Method and system for realizing random display of polyphonic ringtones
CN102682820A (en) * 2012-05-03 2012-09-19 福建星网视易信息系统有限公司 Method and system for embedding type linux platform media playing
CN102970484A (en) * 2012-11-27 2013-03-13 惠州Tcl移动通信有限公司 Sound prompt method in photographing and electronic equipment based on method
CN106777099A (en) * 2016-12-14 2017-05-31 掌阅科技股份有限公司 The processing method of business speech data, device and terminal device
CN109756784A (en) * 2018-12-21 2019-05-14 广州酷狗计算机科技有限公司 Method for playing music, device, terminal and storage medium

Also Published As

Publication number Publication date
CN111312298B (en) 2021-08-20

Similar Documents

Publication Publication Date Title
US10397212B2 (en) Information device, data processing system, data processing method, and non-transitory storage medium for executing content upon authentication
CN109600669B (en) Object playing monitoring method and device, storage medium and processor
CN109313566B (en) Audio playing method and device of virtual machine and mobile terminal
CN112560114B (en) Method and device for calling intelligent contract
CN107423095B (en) Data processing method and device adaptive to hardware, storage medium and computer equipment
CN110944231B (en) Monitoring method and device of video player
CN107454447B (en) Plug-in loading method and device for player and television
CN110124316B (en) Method and device for processing special effects in game, electronic equipment and storage medium
CN111312298B (en) Audio and video playing method and system based on time scheduling
CN108073424B (en) Calling method and device of component interface
CN106997313B (en) Signal processing method and system of application program and terminal equipment
CN108882041B (en) Player state acquisition method and device
CN110721474B (en) Method and device for editing game skills
CN111046377B (en) Method and device for loading dynamic link library, electronic equipment and storage medium
CN108874658A (en) A kind of sandbox analysis method, device, electronic equipment and storage medium
CN109213534A (en) A kind of method and device of extension live streaming software function
CN112053699A (en) Method and device for processing game card voice change
JP2019502506A (en) How to unlock game content
CN108647516B (en) Method and device for defending against illegal privilege escalation
CN110691278A (en) Method, storage medium, electronic device and system for preventing plug-in misjudgment in live broadcast
CN112546616B (en) Game skill processing method, system and device and electronic equipment
US9978423B2 (en) Modified playback rate for portions of video content
CN109800567B (en) Method and device for monitoring foreground application starting and terminal equipment
CN107144439A (en) A kind of program request cinema equipment detection method and device
CN111159654A (en) Block chain-based digital album retail method, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant