Disclosure of Invention
An objective of the present application is to provide a live broadcast starting method, a live broadcast starting device, and an electronic device, so as to solve a problem of how to save live broadcast resources such as power.
In a first aspect, an embodiment of the present application provides a live broadcast startup method, where the method includes: acquiring an image acquired by a camera; identifying whether a target object is included in the image; if the target object exists in the image, determining the state of the target object based on at least two continuous frames of the image; and if the state of the target object is a preset state, starting live video plug flow.
In an alternative embodiment, the identifying whether the target object is included in the image includes: inputting the image into a preset animal image model to obtain the animal type of the image; and determining whether the target object is contained in the image or not according to the animal species.
In an optional implementation manner, after the live video stream pushing is started, the method further includes: adding push messages corresponding to the animal species in the live video, wherein the push messages comprise propaganda and protection slogans and/or animal profiles.
In an optional implementation manner, after the opening live video push streaming, the method further includes: and sending a live watching prompt to a user terminal of a target user, wherein the target user is a user of which the interest tag comprises a target object.
In an optional implementation manner, the interest tag includes the target object and a degree of interest in the target object, and the sending a live viewing reminder to a user terminal of a target user includes: if a plurality of live video push streams are started simultaneously, determining the sending sequence of the live watching reminders according to the interest degree of the target user in the target object of each live video; and sending the live watching prompt to the user terminal of the target user according to the sending sequence.
In an optional implementation manner, after sending the live viewing reminder to the user terminal of the target user, the method further includes: and storing the live video, and pushing a watching address of the live video to the user terminal of the target user who does not respond to the live watching prompt.
In an optional embodiment, the method further comprises: if the monitored duration of the number of the live broadcast watching people is less than the preset number of people and is greater than a first preset duration threshold, closing the live broadcast stream pushing; and restarting live video plug flow when the target user is monitored to respond to the live watching prompt.
In an optional implementation manner, if the duration of the live video that does not include the target object is greater than a second preset duration threshold, or the duration of the target object that is not in the preset state is greater than a third preset duration threshold, closing the live video stream pushing.
In a second aspect, an embodiment of the present application provides a live broadcast starting device, which includes an obtaining module, configured to obtain an image acquired by a camera; the identification module is used for identifying whether a target object is included in the image; a determining module, configured to determine, if the target object exists in the image, a state of the target object based on at least two consecutive frames of the image; and the starting module is used for starting live video plug flow if the state of the target object is a preset state.
In a third aspect, an electronic device is provided, where the electronic device includes a memory and a processor, and the memory stores a computer program, and when the processor executes the computer program, the live broadcast startup method of the first aspect is implemented.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the live starting method according to the first aspect.
The embodiment of the application provides a live broadcast starting method, a live broadcast starting device and electronic equipment, wherein the method comprises the following steps: acquiring an image acquired by a camera; identifying whether a target object is included in the image; if the target object exists in the image, determining the state of the target object based on at least two continuous frames of the image; and if the state of the target object is a preset state, starting live video plug flow. The live broadcast video plug flow is started only when the collected image comprises a target object and the target object is in a preset state, live broadcast contents which are interested by a user do not appear in a live broadcast area, or the problem of waste of live broadcast resources such as electric power, flow, a transmission channel and machine equipment caused by live broadcast when the live broadcast is watched in an unmanned mode is solved, and the technical effect of saving the live broadcast resources such as the electric power, the flow, the transmission channel and the machine equipment is achieved.
Detailed Description
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 some embodiments of the present application, and not all embodiments.
The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present application, are intended to indicate only specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another, and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments.
Example 1
Referring to fig. 1, fig. 1 is a schematic block diagram illustrating a flow of steps of a live broadcast startup method according to an embodiment of the present application.
As shown in fig. 1, a live broadcast startup method provided in the embodiment of the present application may be applied to a server, and includes S110 to S140.
S110: and acquiring an image collected by the camera.
In the embodiment of the application, a camera is built at a position where a target object often appears and disappears by selecting a proper watching position. When the target object is an animal, the camera should also be set up in a position that does not disturb the normal life of the target object. Preferably, the camera is an infrared sensing camera, and can still shoot images even at night.
Specifically, the image may be an image shot by the camera every other preset time period, or an image captured every other preset time period in a video shot by the camera.
S120: identifying whether a target object is included in the image.
In the embodiment of the present application, the target object is an object of interest to a user, and may be an animal, a plant, a natural scene, or the like. The animals comprise monkeys, elephants, peacocks and the like; the plant comprises epiphyllum oxypetalum and sunflower; the natural scenes include sunrise, sunset, clouds, tidal rise, tidal fall, and the like.
In an alternative embodiment, the identifying whether the target object is included in the image includes:
inputting the image into a preset animal image model to obtain the animal type of the image;
and determining whether the target object is contained in the image or not according to the animal species.
Specifically, the animal types of the animal pictures can be manually marked by collecting a plurality of animal pictures with different angles and different sizes, the marked animal pictures are used as training samples for forming a preset animal image model, the training samples are input into the preset animal image model, and the trained preset animal image model is obtained when the training stopping condition is met. The preset animal image model can identify the animal species. And the server inputs the image into the preset animal image model, the preset animal image model extracts the characteristics of the image, and the animal type of the image is output according to the characteristics of the image. And the server determines whether the target object is contained in the image according to the comparison between the animal type and the target object type.
S130: and if the target object exists in the image, determining the state of the target object based on at least two continuous frames of the image.
Specifically, the state of the target object may be an active state or a static state, and the active state of the target object includes animal walking, animal feeding, plant flowering, natural scene change, and the like. The resting state includes the animal sleeping, etc. If the target object exists in the image, comparing the difference of each pixel of the target object in the first frame image and the last frame image of at least two continuous frames of images, and determining that the target object is in an active state when the pixel ratio with the difference exceeds a pixel ratio preset threshold value.
It is understood that the pixel ratio preset threshold may be set according to actual requirements, and is not limited herein. For example, the threshold may be preset based on the distance of the camera from the target point at which the target animal is presented in the screen. Furthermore, the method can also be used for correcting in the later use process, if the preset threshold is 50%, but the sensitivity is not high enough, and if the animal activity scene is found to be missed by the system in the manual quality inspection process, the preset threshold can be properly adjusted down.
In this embodiment, the server inputs at least two consecutive frames of the image to a target object state model, the target object state model extracts features of the image, and outputs a state of a target object of the image according to the features of the image.
S140: and if the state of the target object is a preset state, starting live video plug flow.
Specifically, each target object is provided with a corresponding preset state, and the preset state can be an active state of the target object, and can also be a specific state of the target object, such as peacock spreading its tail, elephant eating, monkey hanging over, epiphyllum blooming, sunrise, and the like. And the server determines whether the state of the target object is a preset state or not according to the comparison between the state of the target object and the preset state corresponding to the type of the target object. And if the state of the target object is a preset state, the server pushes the live video collected by the camera to the user terminal so as to start live video streaming. For example, the preset state of the target object is that a peacock is spreading its tail, and if the state of the target object is that the peacock walks, live video plug flow is not started; and if the target object is in a peacock tail spreading state, starting live video plug flow.
In order to facilitate the user to view the interested live content instantly, in an optional implementation manner, after the live video streaming is started, the method further includes:
and sending a live watching prompt to a user terminal of a target user, wherein the target user is a user of which the interest tag comprises a target object.
In this embodiment, the target users include users who have subscribed to live broadcast, users who have analyzed preferences according to user habits, and the like. The live broadcast watching reminding way comprises one or more of short messages, system notifications, application (APP) in-station messages and the like. The system notification is consistent with the standard notification of each mobile phone system. The short message can be a text short message notice of pure characters or characters plus links, and can also be a live broadcast picture screenshot plus characters and other multimedia messages after the live broadcast video is started. By the short message system and the system notification, the user can be notified in real time after the live broadcast starts, the attention and time of the user are saved, the user can watch the live broadcast more pertinently, and the technical effect of watching the demand of the user is better met.
Specifically, the sending of the live viewing reminder to the user terminal of the target user includes:
if a plurality of live video push streams are started simultaneously, determining the sending sequence of the live watching reminders according to the interest degree of the target user in the target object of each live video;
and sending the live watching prompt to the user terminal of the target user according to the sending sequence.
Further, the interest level of the target object comprises an interest score and/or an interest level. The interest level can be obtained through video information browsed by a user history or reserved live broadcast information. And if the live video push streams are started simultaneously, preferentially sending live watching prompts with high interest degrees according to the interest degrees of the target users in the target objects of the live videos.
It can be understood that when the target user is watching a certain live video, such as hanging a monkey upside down, if the live video with a peacock spreading its tail is started and the interest level of the target user in the live video with a peacock spreading its tail is higher than that of the live video with a monkey upside down, a live viewing prompt of the peacock spreading its tail is sent to the target user; if the video live broadcast starting of the tail spreading of the peacock is monitored, and the interest degree of the target user in the video live broadcast of the tail spreading of the peacock is lower than the interest degree of the video live broadcast of the overhead hanging of the monkey, the live broadcast watching prompt of the tail spreading of the peacock is not sent to the target user.
In order to improve the animal protection awareness of the target user, in an alternative embodiment, after the live video streaming is started, the method further includes:
adding push messages corresponding to the animal species in the live broadcast video, wherein the push messages comprise propaganda protection slogan and/or animal introduction.
Specifically, the server can add the push message of the propaganda slogan and/or the animal profile corresponding to the animal species in the live broadcast video according to the identified animal species, so that when a target user watches the live broadcast, the animal propaganda protection slogan and/or the animal profile are displayed on a live broadcast interface to carry out animal protection knowledge propaganda, and the animal protection consciousness of the target user is improved. It is understood that the animal profile includes an animal species profile, an animal life habit profile, an animal distribution profile, and the like.
For example, when the identified animal species is a hare, a propaganda slogan of "i look nice but i do not eat nicely" is added in the live broadcast video; when the identified animal species is mink, the fact that my fur can only keep warm by oneself and people do not strangely robbe the clothes when people wear clothes is added in a live broadcast video, and the mink is also called mink rat and is mainly distributed in Wularshan, siberia, mongolia and northeast China. The mink body is slender, yellow or purple black, the food is diversified, and the main food is fish; when the identified animal species is pheasants, a propaganda slogan which is good for health and far away from the wild flavor is added into the live broadcast video.
In order to facilitate the target user to watch the missed live video of interest, in an optional implementation manner, after sending the live watching prompt to the user terminal of the target user, the method further includes:
and storing the live video, and pushing a watching address of the live video to the user terminal of the target user who does not respond to the live watching prompt.
Specifically, if the target user does not respond to the live broadcast watching prompt, the target user is considered not to watch the live broadcast of the video, the server stores the live broadcast video, and pushes the watching address of the live broadcast video to the user terminal of the target user who does not respond to the live broadcast watching prompt, so that the target user can watch the missed interested live broadcast of the video.
In order to better save live resources such as power, in an optional embodiment, the method further includes:
if the monitored duration of the number of the live broadcast watching people is less than the preset number of people and is greater than a first preset duration threshold, closing the live broadcast stream pushing;
and when it is monitored that the target user responds to the live broadcast watching prompt, restarting live broadcast video plug flow.
Specifically, the preset number of people and the first preset time threshold may be set according to actual needs, and are not limited herein. For example, if the duration of the number of the monitored live broadcast watching people is equal to 0 is longer than 5 minutes, the live broadcast video is considered to be watched without people, and live broadcast push flow is closed to save live broadcast resources such as power. And when the target user is detected to meet the live broadcast watching prompt, the target user is considered to want to watch the live broadcast, and the live broadcast video plug flow is restarted so that the target user can watch the live broadcast.
In order to better save live broadcast resources such as power, traffic, transmission channels, and machine devices, in another optional implementation manner, if the duration that the target object is not included in the live broadcast video is greater than a second preset duration threshold, or the duration that the state of the target object is not a preset state is greater than a third preset duration threshold, the live broadcast video stream pushing is closed.
Specifically, the second preset duration threshold and the third preset duration threshold may be set according to actual requirements, and are not limited herein. If the duration time of the live video without the target object is greater than a second preset duration threshold, the target object is considered to leave the camera shooting area, and at the moment, live video plug flow is closed so as to save live resources such as power. If the duration that the state of the target object is not the preset state is longer than a third preset duration threshold, for example, when it is detected that the duration that the peacock is not the spread is longer than five minutes, the peacock is considered to have completed the spread action, and at this time, the live video plug flow is closed, so as to save live resources such as electric power.
The live broadcast starting method provided by the embodiment of the application comprises the following steps: acquiring an image acquired by a camera; identifying whether a target object is included in the image; if the target object exists in the image, determining the state of the target object based on at least two continuous frames of the image; and if the state of the target object is a preset state, starting live video plug flow. The live broadcast video plug flow is started only when the collected image comprises a target object and the target object is in a preset state, live broadcast contents which are interested by a user do not appear in a live broadcast area, or the problem of waste of live broadcast resources such as electric power, flow, a transmission channel and machine equipment caused by live broadcast when the live broadcast is watched in an unmanned mode is solved, and the technical effect of saving the live broadcast resources such as the electric power, the flow, the transmission channel and the machine equipment is achieved.
Example 2
Referring to fig. 2, fig. 2 is a block diagram schematically illustrating a structure of a live broadcast starting device according to an embodiment of the present application. The livebroadcast startup device 200 includes anacquisition module 210, anidentification module 220, adetermination module 230, and astartup module 240.
The acquiringmodule 210 is configured to acquire an image acquired by a camera;
an identifyingmodule 220 for identifying whether a target object is included in the image;
a determiningmodule 230, configured to determine, if the target object exists in the image, a state of the target object based on at least two consecutive frames of the image;
and the startingmodule 240 is configured to start live video plug flow if the state of the target object is a preset state.
Optionally, the identifyingmodule 220 includes:
the animal species obtaining submodule is used for inputting the image into a preset animal image model and obtaining the animal species of the image;
and the target object determining submodule is used for determining whether the target object is contained in the image or not according to the animal species.
Optionally, the livebroadcast starting device 200 further includes an adding module, and the adding module is configured to add a propaganda protection slogan corresponding to the animal type in the live broadcast video.
Optionally, the livebroadcast starting apparatus 200 further includes a sending module, where the sending module is configured to send a live broadcast watching reminder to a user terminal of a target user, where the target user is a user whose interest tag includes a target object.
Optionally, the interest tag includes the target object and a degree of interest in the target object, and the live viewing reminder is sent to a user terminal of a target user; the sending module comprises:
optionally, the sending order determining sub-module is configured to determine, if multiple live video streams are started simultaneously, a sending order of the live viewing reminder according to a degree of interest of the target user in a target object of each live video;
and the live broadcast watching prompt sending submodule is used for sending the live broadcast watching prompt to the user terminal of the target user according to the sending sequence.
Optionally, the livebroadcast starting apparatus 200 further includes a storage module, where the storage module is configured to store the live broadcast video and push a viewing address of the live broadcast video to the user terminal of the target user who does not respond to the live broadcast viewing reminder.
Optionally, thelive starting device 200 further includes a closing module and a re-opening module;
the closing module is used for closing the live broadcast plug flow if the duration of the monitored live broadcast watching number of people is less than the preset number of people and is greater than a first preset duration threshold;
and the restarting module is used for restarting live video plug flow when the target user is monitored to respond to the live watching prompt.
Optionally, the closing module is further configured to close the live video stream if the duration of the live video not including the target object is greater than a second preset duration threshold, or the duration of the target object in a state other than the preset state is greater than a third preset duration threshold.
The above device is used for executing the method provided in embodiment 1, and the implementation principle and technical effect are similar, which are not described herein again.
The embodiment of the application further discloses an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the live broadcast starting method in embodiment 1 is realized.
The embodiment of the application also discloses a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the live broadcast starting method in the embodiment 1 is realized.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.