CN113486210A - Video playing method, device, equipment and medium during awakening of battery camera - Google Patents

Video playing method, device, equipment and medium during awakening of battery camera Download PDF

Info

Publication number
CN113486210A
CN113486210A CN202110741521.2A CN202110741521A CN113486210A CN 113486210 A CN113486210 A CN 113486210A CN 202110741521 A CN202110741521 A CN 202110741521A CN 113486210 A CN113486210 A CN 113486210A
Authority
CN
China
Prior art keywords
image frame
time
battery camera
historical
historical image
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.)
Pending
Application number
CN202110741521.2A
Other languages
Chinese (zh)
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.)
Ningbo Xingxun Intelligent Technology Co ltd
Original Assignee
Ningbo Xingxun Intelligent 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 Ningbo Xingxun Intelligent Technology Co ltd filed Critical Ningbo Xingxun Intelligent Technology Co ltd
Priority to CN202110741521.2A priority Critical patent/CN113486210A/en
Publication of CN113486210A publication Critical patent/CN113486210A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/7867Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, title and artist information, manually generated time, location and usage information, user ratings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • H04N23/661Transmitting camera control signals through networks, e.g. control via the Internet

Abstract

The invention belongs to the technical field of video data processing, solves the technical problem of poor user experience effect caused by long waiting time for real-time video processing through a battery camera in the prior art, and provides a video playing method, a device, equipment and a medium for awakening the battery camera. The method comprises the steps that a battery shoots an image and sends the image to a server when being awakened every time, a historical image frame database is established in the server, when a user sends a video request every time, in the process that a P2P is established between a battery camera and a user side, the server sends the historical image frame corresponding to the awakening time to the user side to be played in the historical image frame database, the waiting time of the video request of the user can be reduced, meanwhile, the picture difference of a monitoring area in a certain specific time based on a specific scene is small, the historical image is played, so that the effect of displaying the video of a simulated scene of the user entering the monitoring area in advance is achieved, and the user experience effect is improved.

Description

Video playing method, device, equipment and medium during awakening of battery camera
Technical Field
The invention relates to the technical field of video data processing, in particular to a method, a device, equipment and a medium for playing a video when a battery camera is awakened.
Background
With the development of video technology, a mobile terminal is used in the market to check real-time pictures acquired by a camera terminal in real time, so that the activity condition of a target object in a camera monitoring area is mastered; the technology has very important significance in nursing old people and infants, and can improve the nursing efficiency of nursing infants and old people.
The method comprises the steps that a battery is adopted to supply power to video terminal equipment, so that the application scene of a video terminal can be improved, however, when a user checks a real-time video of a battery camera through an App of a mobile terminal, a message of a video request needs to be sent out firstly, a server sends the message to the battery camera, the camera starts to be awakened after receiving the message, then initialization operation is carried out, and in the initialization operation process, the network position of the battery camera is sent to the server through a network, so that the user terminal can only obtain the network position of the battery camera; after the battery camera is awakened and initialized, the battery camera and a mobile terminal of a user establish P2P, and after the P2P is established, the user can check real-time video data sent by the battery camera through an App; according to the method, a long waiting time is needed from the time when the user sends the video request to the time when the real-time video data sent by the battery camera is received, the experience effect of the user is influenced, and the popularization and the application of the battery camera are not facilitated.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a medium for playing a video when a battery camera wakes up, so as to solve the technical problem of poor user experience effect caused by long waiting time required for real-time video playing through the battery camera.
The technical scheme adopted by the invention is as follows:
the invention provides a video playing method when a battery camera is awakened, which comprises the following steps:
acquiring a wake-up instruction of the battery camera;
traversing a historical image frame database according to the time information corresponding to the awakening instruction, and outputting the historical image frame corresponding to the time information of the awakening instruction to a user terminal;
playing the historical image frame on a video watching interface corresponding to the user terminal;
and each frame of image in the historical image frame database is an image frame obtained by processing the image captured by the battery camera when the battery camera is awakened every time according to the capturing moment.
Preferably, the traversing the historical image frame database according to the time information corresponding to the wake-up instruction and outputting the historical image frame corresponding to the time information of the wake-up instruction to the user terminal includes:
after the battery camera is awakened every time, controlling the battery camera to perform snapshot to obtain each image frame of the snapshot;
establishing the historical image frame database according to each captured image frame;
traversing a historical image frame database according to the time information corresponding to the awakening instruction, and outputting the historical image frame corresponding to the time information of the awakening instruction to a user terminal.
Preferably, the establishing the historical image frame database according to the captured image frames comprises:
acquiring the snapshot time of each frame of image to be snapshot;
classifying the captured frame images according to the capturing time to obtain historical image frame groups;
carrying out image fusion on each image frame of each historical image frame group through fuzzy processing to obtain each historical image frame corresponding to each historical image frame group;
and each historical image frame forms the historical image frame database.
Preferably, the classifying the captured images according to the capturing time to obtain each historical image frame group includes:
acquiring preset time for segmenting time and snapshot time of each frame of image to be snapshot;
segmenting the time according to the preset time length to obtain continuous time periods;
and classifying the scared frame images according to the time period to which each snapshot time belongs to obtain each historical image frame group.
Preferably, the image fusion of the image frames of each of the historical image frame groups by the blur processing to obtain each of the historical image frames corresponding to each of the historical image frame groups includes:
acquiring a quantity threshold of the quantity of image frames required for image fusion;
carrying out similarity comparison on the currently captured image frame and the previously captured image frame in the same corresponding historical image frame group, and outputting a first comparison result;
and outputting a historical image frame corresponding to the battery camera awakened at the current time next time according to the first comparison result.
Preferably, the outputting the historical image frame corresponding to the battery camera awakening at the current time next time according to the first comparison result includes:
if the first comparison result is that the current captured image frame is similar to the image frame captured in the corresponding time period in the previous time, then:
acquiring the number of continuous image frames corresponding to the image frames similar to and continuous with the current snapshot image frame;
comparing the number of the continuous image frames with the number threshold value, and outputting a second comparison result;
according to the second comparison result, outputting a historical image frame corresponding to the battery camera awakened at the current time next time;
or if the first comparison result is that the currently captured image frame is not similar to the previously captured image frame, continuing to use the previous history image frame as the history image frame of the history image frame group.
Preferably, the outputting the historical image frame corresponding to the next awakening of the battery camera at the current time according to the second comparison result includes:
if the second comparison result is that the number of the continuous image frames is larger than or equal to the number threshold, selecting a plurality of image frames which are the same as the number threshold from the number of the continuous image frames for fusion to obtain a new historical image frame; the new historical image frame is an image obtained by fusing a plurality of continuous image frames including the current grabbing image frame through blurring processing;
and if the second comparison result is that the number of the continuous image frames is smaller than the number threshold, continuing to use the previous historical image frame as the historical image frame of the historical image frame group.
The invention also provides a video playing device when the battery camera is awakened, which comprises:
an instruction acquisition module: wake-up instructions for a battery camera;
the instruction processing module: the historical image frame database is traversed according to the time information corresponding to the awakening instruction, and the historical image frame corresponding to the time information of the awakening instruction is output to the user terminal;
the video playing module: the video watching interface is used for playing the historical image frame on a video watching interface corresponding to the user terminal;
and each frame of image in the historical image frame database is an image frame obtained by processing the image captured by the battery camera when the battery camera is awakened every time according to the capturing moment.
The present invention also provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of the above.
The invention also provides a medium having stored thereon computer program instructions which, when executed by a processor, implement the method of any of the above.
In conclusion, the beneficial effects of the invention are as follows:
according to the video playing method, device, equipment and medium for awakening the battery camera, one image is captured and sent to the server when the battery is awakened each time, the historical image frame database is established in the server, when a user sends a video request each time, in the process that the battery camera and a user side establish P2P, the server sends the historical image frame corresponding to the awakening time in the historical image frame database to the user side for playing, the waiting time of the video request of the user can be reduced, meanwhile, the image difference of a monitoring area in a certain specific time based on a specific scene is small, the historical image is played, so that the effect of video display of a simulated scene of the user entering the monitoring area in advance is achieved, and the user experience effect is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, without any creative effort, other drawings may be obtained according to the drawings, and these drawings are all within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a method for rapidly waking up a battery camera in embodiment 1 of the present invention;
fig. 2 is a schematic flow chart of uploading a network address of a battery camera in embodiment 1 of the present invention;
fig. 3 is a flowchart illustrating a P2P response task in embodiment 1 of the present invention;
fig. 4 is a schematic flowchart of a video playing method when a battery camera wakes up according to embodiment 2 of the present invention;
fig. 5 is a schematic flowchart of creating a historical image frame database according to embodiment 2 of the present invention;
fig. 6 is a schematic flowchart of acquiring history image frames according to embodiment 2 of the present invention;
fig. 7 is a schematic flowchart of a video playing data transmission method when a battery camera wakes up according to embodiment 3 of the present invention;
fig. 8 is a flowchart illustrating playing of a history image frame according to embodiment 3 of the present invention;
fig. 9 is a schematic flowchart of acquiring first video data according to embodiment 3 of the present invention;
fig. 10 is a flowchart illustrating a process of acquiring second video data according to embodiment 3 of the present invention;
fig. 11 is a schematic structural diagram of a fast wake-up apparatus for a battery camera in embodiment 4 of the present invention;
fig. 12 is a block diagram of a video playback device when a battery camera wakes up according to embodiment 5 of the present invention;
fig. 13 is a schematic structural diagram of a video playback data transmission device when a battery camera wakes up according to embodiment 6 of the present invention;
fig. 14 is a schematic structural diagram of an electronic device in embodiment 7 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. In the description of the present invention, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In case of conflict, it is intended that the embodiments of the present invention and the individual features of the embodiments may be combined with each other within the scope of the present invention.
The video playing method of the battery camera comprises the following steps: a user sends a video request to an auxiliary server through an App, the auxiliary server sends a wake-up instruction to a battery camera according to the video request instruction, the battery camera wakes up according to the wake-up instruction, and then a P2P communication network is established with the App; the user receives and plays video data collected by the battery camera transmitted through P2P through the App, wherein the battery camera is a camera powered by a storage battery.
The video playing method of the battery camera specifically comprises the following steps:
the method comprises the steps of firstly, acquiring a video request instruction and time information of the video request instruction;
specifically, when a video request instruction sent by a user through the App is received, time information at this time is obtained, where the time information may be sending time of the request instruction sent by the user, or may be receiving time of the video request instruction.
Secondly, awakening the battery camera according to the video request instruction and establishing a P2P network connection;
specifically, the establishment of the P2P network comprises a network penetration task and a network response task, before a video request instruction does not exist, a battery camera end establishes a wifi peer-to-peer network through a wifi module of a battery camera, and a shared socket is carried out through the wifi peer-to-peer network wifi module and a main control chip so as to upload a network address of the battery camera in real time, so that when a user sends a video request instruction through an App, the network address of the battery camera can be directly obtained, the battery camera does not need to be initialized according to the video request instruction and then sends the network address to the user, and the awakening time is reduced; after receiving the awakening instruction, the battery camera directly performs initialization and awakening actions, and then responses are performed without waiting for the time of receiving the network address of the battery camera by a user, so that the awakening speed is increased.
Thirdly, playing a historical image frame corresponding to the time information in the process of establishing the P2P network;
specifically, the battery camera video always has the awakening time, and in the awakening process, as the daily work and rest time and the activity range of the infant are very regular, the historical image frame corresponding to the current time is used for simulating the current real environment in the process of waiting for the video to be established, so that the false image of the video started is provided for the user, and the experience effect of the user is improved; further, the historical image is an image with low definition, such as subjected to gaussian blurring processing.
Fourthly, after the P2P network is established, video playing is carried out through the P2P network at a first coding rate;
wherein the first coding code rate is a gradually increasing dynamic code rate.
Specifically, after the P2P is established, video transmission is started at a low bit rate, the video bit rate is continuously increased, natural transition from a historical image to a video picture of a real scene can be ensured, the duration of 2 to 3I frames is approximate, video data comprises the I frames and the P frames, the I frames are key frames, the P frames are common frames, during encoding, one I frame is followed by a plurality of P frames, the P frames are decoded only after the I frames are decoded successfully, and in a video starting stage, only the I frames are transmitted, the P frames are not transmitted, and the natural transition time can be shortened.
Implementation mode one
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a battery camera wake-up method according to embodiment 1 of the present invention; the method comprises the following steps:
s10: uploading the network address of the battery camera in real time through a shared network socket;
specifically, in a battery camera terminal with a camera, a communication module of the battery camera and a main control module establish a peer-to-peer network, and a socket server and a socket client are established in the peer-to-peer network, so that socket sharing is realized; the network address of the battery camera is uploaded to an auxiliary server of P2P (Peer-to-Peer network) through the communication module, the network address is the IP address of the battery camera, wherein the communication module and the main control module can be used as a socket server and a socket client, the communication module is a wifi chip, and the main control module is a main control chip.
In an embodiment, referring to fig. 2, in the battery camera sleep state, the S10 includes:
s101: establishing a wifi peer-to-peer network by using a wifi module of the battery camera, and establishing a socket server in the wifi peer-to-peer network;
specifically, the battery camera comprises a main control module and a wifi module, a wifi peer-to-peer network is established through the wifi module, and a socket server is established in the wifi peer-to-peer network.
S102: adding a main control module of the battery camera into the wifi peer-to-peer network, and creating a socket client in the wifi peer-to-peer network;
specifically, when the battery camera does not perform video data transmission with any communication device, the main control module adds the wifi peer-to-peer network created by the wifi module, and creates a socket client in the wifi peer-to-peer network, so that a data transmission channel constructed by the socket server and the socket client exists in the wifi peer-to-peer network.
S103: through the socket server and the transmission channel provided by the socket client, the wifi module acquires the network address of the battery camera from the main control chip in real time and uploads the network address.
Specifically, sharing of network sockets is achieved through transmission channels provided by the socket server and the socket client, so that the wifi module can acquire a network address, namely an IP address, of the battery camera recorded in the main control module; then uploading the IP address to an auxiliary server of P2P, wherein the auxiliary server establishes a server of P2P for the first terminal device and the second terminal device; here, P2P is a peer-to-peer network between the battery camera and the mobile terminal App.
S11: completing a network penetration task of P2P network connection according to the network address before receiving a battery camera wake-up instruction;
specifically, before a battery camera wake-up instruction is received, namely the battery camera is in a dormant state, the main control chip and the wifi chip are both in a standby working state, the wifi chip of the battery camera acquires the IP address of the battery camera recorded in the main control chip by a shared network socket method and actively reports the IP address to the auxiliary server of P2P, so that when the wake-up instruction is not received, the IP address of the battery camera is acquired by the auxiliary server, the auxiliary server does not need to acquire the IP address of the battery camera after receiving the wake-up instruction, a network task for acquiring the IP address of the battery camera belongs to a task part of network penetration in P2P network connection, and the task part is recorded as a network penetration task.
S12: after receiving a battery camera awakening instruction, completing a network response task of P2P network connection according to the awakening instruction;
wherein, after completing the network penetrating task and the network answering task, the P2P network communication link establishment is completed.
Specifically, a user sends a video viewing request instruction through an App of a mobile terminal, an auxiliary server of P2P sends a wake-up instruction to a battery camera according to the video viewing request instruction, the battery camera performs system initialization according to the wake-up instruction after receiving the wake-up instruction of the battery camera, and partial tasks of network response of P2P network connection are started after the system initialization and are marked as network response tasks; thus, the P2P is established, and then the user views real-time pictures in the monitoring area of the battery camera through the P2P established by the App and the battery camera.
In one embodiment, referring to fig. 3, the S12 includes:
s121: awakening the battery camera according to the awakening instruction, and performing system initialization on the battery camera after the battery camera is awakened;
specifically, the App of the mobile terminal sends a video request instruction to the auxiliary server, the auxiliary server sends a wake-up instruction to the battery camera through the wifi chip in a message mode, the battery camera receives the wake-up instruction through the shared network socket of the wifi peer-to-peer network, then wakes up the battery camera, and then initialization operation is carried out.
S122: after the battery camera wakes up, inquiring about the IP network position for establishing P2P through an auxiliary server of P2P;
specifically, after the battery camera is awakened, the auxiliary server queries the IP network location of the mobile terminal that needs to establish P2P with the battery camera, that is, the IP address and port of the mobile terminal where the App is located.
S123: and establishing connection according to the IP network position, and completing the network response task of P2P network connection.
Specifically, after the battery camera wakes up, an attempt is made to connect the IP network location queried from the auxiliary server, and after the connection is successful, the network of the P2P is indicated to be completed, so that the communication link between the battery camera and the mobile terminal is established, and the user can view the video data of the battery camera through the App display interface of the mobile terminal.
In an embodiment, the S122 further includes that after the battery camera wakes up, the battery camera takes a picture of the monitored area to obtain a captured image frame, and uploads the captured image frame to the auxiliary server for storage.
In an embodiment, waking up the battery camera further comprises:
acquiring a video request instruction;
specifically, when a user needs to remotely view a monitoring area of the battery camera, the user sends a video request instruction to an auxiliary server through an App of the mobile terminal, and the auxiliary server is used for establishing P2P between the battery camera and the mobile terminal.
Generating a battery camera awakening instruction according to the video request instruction, and extracting time information corresponding to the video request instruction;
specifically, after receiving a video request instruction sent by a user through the App, the auxiliary server sends a message for waking up the battery camera to the battery camera, and meanwhile, obtains time information of the video request instruction, where the time information may be sending time of the request instruction sent by the user or receiving time of the video request instruction.
And displaying a historical image frame corresponding to the time information in the auxiliary server on an App display interface of the mobile terminal according to the time information of the video request instruction.
Specifically, the auxiliary server traverses a historical image frame database according to the time information, sends historical image frames which are the same as the time information and have different dates to an App at a user mobile terminal, and displays the historical image frames corresponding to the time information on an App interface; such as: if the time information corresponding to the video request instruction is 14:00, displaying image frames belonging to 14:00 in the historical image frames on a display interface of an App (application), so that a user can see virtual pictures of a monitoring area within the waiting time established by awakening and P2P by a battery camera after sending a video request; the monitored object of the battery camera is a target object of life regularity such as infants, old people and the like; because the activity content difference of the infants and the old in each time period every day is small, the historical image frames with the same display time as the request time are adopted, the effect of synchronizing the video request and the video data transmission can be achieved, and the user experience effect is improved.
In an embodiment, the displaying, according to the time information of the video request instruction, the historical image frame corresponding to the time information in the auxiliary server on the App display interface of the mobile terminal includes:
classifying the image frames captured when the battery camera is awakened according to capturing time to obtain each historical image frame group corresponding to each capturing time;
specifically, when the battery camera is awakened every time, capturing an image at the first time as an environment image of a monitored area at the moment and uploading the image to the auxiliary server, and classifying the uploaded image frames by the auxiliary server according to capturing time to obtain image frame groups corresponding to the capturing time; such as a group of snap-shot images of the battery camera at 14:00 wake-up, a snap-shot image at 08:45 wake-up, a snap-shot image at 12:00 wake-up, etc.
It should be noted that: the snapshot time of each frame of image in each historical image frame group has a range, and if the snapshot time difference is set to be 3 minutes, the time of each frame of image corresponding to the speed of 14:00 is the snapshot image within 3 minutes of 14: 00-14: 03 every day.
Fusing each image frame in each historical image frame group to obtain the historical image frame corresponding to each awakening time of the battery camera;
specifically, after the frames of the captured images are classified according to capturing time, history image frame groups corresponding to the capturing time are generated, and then the history image frame groups are fused into corresponding history image frames, and the history image frames are used for selecting the history image frames corresponding to the request time to be displayed at an App end when a user sends a video request at the corresponding time through the App.
And displaying the historical image frame corresponding to the timestamp on an App display interface of the mobile terminal according to the timestamp of the video request instruction.
In an embodiment, the fusing the image frames in each of the historical image frame groups to obtain the historical image frame corresponding to the battery camera at each wake-up time includes:
storing each image frame in each historical image frame group in a first storage area according to the capturing time;
specifically, each snapshot image frame is stored in the first storage area, and the history image frames are sorted according to dates corresponding to the snapshot time in each history image group, so that when the monitoring area of the battery camera is changed, the history image frame can be updated by the latest snapshot image frame in time, the similarity between the history image frame and the current monitoring image is high, and the user experience effect is improved.
And respectively fusing all the snap-shot image frames of all the historical image frame groups in the first storage interval, and outputting all the historical image frames to a second storage area for storage.
Specifically, for each historical image frame group, the captured image frames of each group are respectively fused by a preset rule to obtain each historical image frame corresponding to the historical image frame group, where the preset rule includes but is not limited to: the number of the snap-shot image frames used for image synthesis, the similarity of each snap-shot image frame used for fusion, and the snap-shot time of each snap-shot image frame used for fusion.
By adopting the battery camera awakening method of the embodiment, the battery camera actively reports the network address to the auxiliary server in a dormant state through sharing the network socket; therefore, the network penetration task of P2P is completed before the awakening instruction is received, after the video request sent by the user is received, the battery camera is awakened from the dormant state, then the rest network response task of P2P network construction is completed, the P2P network construction is completed, the waiting time of the video request of the user is saved, and the user experience effect is improved.
Example 2
Referring to fig. 4, fig. 4 is a schematic flow chart of a battery camera video method according to embodiment 2 of the present invention, and embodiment 2 is a specific implementation manner of nursing infants and the elderly with a battery camera based on embodiment 1, where the method includes:
s20: acquiring a wake-up instruction of the battery camera;
specifically, the battery camera is used for saving electric quantity when a baby and an old person are cared; the video data of the monitored area is usually stored at the edge, that is, the video data is not transmitted to a far end, so that the standby time of the battery camera is prolonged; when a user makes a video request of a battery camera through an App of a mobile terminal, a video request instruction is sent to an auxiliary server through the App, a far-end server sends a wake-up instruction to a battery camera terminal according to the video request instruction, after the battery camera wakes up according to the wake-up instruction, a network position (IP address) of the battery camera is sent to the server, the auxiliary server forwards the network position to the App of the user, so that a user side obtains the network address of the battery camera, then response information of the battery camera about the video request is received, the mobile terminal and the battery camera P2P are built, and then video data transmission is carried out through a P2P network communication link.
S21: traversing a historical image frame database according to the time information corresponding to the awakening instruction, and outputting the historical image frame corresponding to the time information of the awakening instruction to a user terminal;
specifically, in the process of establishing a network communication link between the mobile terminal and the battery camera P2P, the server extracts time information corresponding to a current awakening instruction and traverses a historical image frame database; the historical image frames corresponding to the historical video requests with the same request time are transmitted to the mobile terminal, a user can see the historical image frames on a video watching interface of an App, and because the scene difference of the same time on different dates is small in the nursing scenes of infants and old people, the user can feel that the video watching process is entered in the visual sense by playing the historical images at the same time to simulate real monitoring videos to the user, and the experience effect of the user is improved.
S22: playing the historical image frame on a video watching interface corresponding to the user terminal;
and each frame of image in the historical image frame database is an image frame obtained by processing the image captured by the battery camera when the battery camera is awakened every time according to the capturing moment.
Specifically, when the battery camera is awakened each time, the battery camera performs one-time snapshot on a monitored area, uploads a snapshot image frame to the auxiliary server, and stores the snapshot image frame in the first storage area; and then, carrying out fusion processing on the image frames captured in the first storage area, wherein the fusion processing includes image fusion without being limited to adopting Gaussian blur to obtain historical image frames with low code rate, and storing the historical image frames in the second storage area.
In one embodiment, referring to fig. 5, the S21 includes:
s211: after the battery camera is awakened every time, controlling the battery camera to perform snapshot to obtain each image frame of the snapshot;
specifically, after the battery camera is awakened every time, the monitoring area corresponding to the battery camera is captured once, so that a plurality of historical images captured by awakening the battery camera at any time every day are obtained.
S212: establishing the historical image frame database according to each captured image frame;
specifically, the captured image frames are classified, gaussian-blurred, fused and the like, so that historical image frames corresponding to the awakening times are obtained, and a historical image frame database composed of the historical image frames is obtained.
S213: traversing a historical image frame database according to the time information corresponding to the awakening instruction, and outputting the historical image frame corresponding to the time information of the awakening instruction to a user terminal.
In one embodiment, the S21 includes:
acquiring a first historical image frame corresponding to the awakening instruction at this time and a first snapshot image snapshot at a second time corresponding to the awakening instruction at the previous time;
carrying out similarity comparison on the first historical image frame and the characteristic image in the first snapshot image, correcting the first historical image frame according to a comparison result to obtain a historical image frame corresponding to the time information of the awakening instruction at this time, and outputting the historical image frame to a user terminal;
wherein the characteristic image is a movable object excluding the infant, and the similarity contrast includes a category and a position of the movable object. Specifically, according to the awakening time of the awakening instruction, a first historical image frame which is sent to a user App by an auxiliary server in the awakening stage (P2P establishing stage) of the battery camera for display is determined, and meanwhile, a first image which is captured by the battery camera when the battery camera is awakened for the last time is obtained; comparing the similarity of the characteristic image of the first historical image and the first image, wherein the characteristic image is a movable object without a baby, and mainly comprises the following steps: small objects such as toys and books, specifically, the category and position information of the characteristic image are compared; therefore, the difference of the first historical image frame on the small object compared with the first image is determined, then the first historical image frame is calibrated, the scene simulated by the historical image is closer to the environment of the current camera detection area, and the simulation effect is improved.
In an embodiment, the performing similarity comparison between the first historical image frame and the feature image in the first captured image, correcting the first historical image frame according to a comparison result, obtaining a historical image frame corresponding to the time information of the wake-up instruction, and outputting the historical image frame to the user terminal includes:
determining a first image area needing to be adjusted in the first historical image frame according to a comparison result;
acquiring first color information of each pixel point corresponding to the first image area in the first image;
replacing the color information of each pixel point in the first image area with the first color information to obtain a historical image frame corresponding to the time information of the awakening instruction, and outputting the historical image frame to a user terminal;
wherein the first image area comprises at least one of: the object image needs to be replaced, deleted, and the background image added after the object image is deleted.
Specifically, when an article a does not exist in the first image in the first history image frame, marking an area corresponding to the article a in the first history image frame as a first image area, acquiring position information of all pixel points of the article a and color information of each pixel point, and replacing the color information of each corresponding pixel point in the first image area with the color information of each pixel point, so that the pattern of the article a is transferred to the first image area, and the brightness information is original brightness information of the first image area; similarly, when the article B existing in the first historical image frame does not exist in the first image, the color information of each pixel point of the first image area corresponding to the article B in the first image is acquired, the color information of each pixel point corresponding to the article B in the first image area is replaced by the color information of each pixel point, the daily life of the baby is regular, and the growth of the baby is continuously known about different things, so that the preference of the baby to toys, books and cards is unfixed, small articles near the baby can be different in the same time period in time, and the reality of environment simulation can be improved by adopting the method, and the video experience of a user is improved.
In an embodiment, referring to fig. 6, the step S212 includes:
s2121: acquiring the snapshot time of each frame of image to be snapshot;
specifically, when the battery camera is awakened each time, the current monitoring area is captured, and capturing time of captured image frames is recorded.
S2122: classifying the captured frame images according to the capturing time to obtain historical image frame groups;
specifically, classifying the images according to the image frames with the same snapshot time to obtain a plurality of groups of snapshot images; if the snapshot time is 0 point 3 point, 0 point 6 point … 8 point, 8 point 3 point, 8 point 6 point … 23 point 51 point, 23 point 57 point, 24 point 0 point and the like of each day, classifying the same snapshot time of each day of the snapshot image to obtain historical image frame groups with the same snapshot time; if the battery camera is awakened 20 times at 8 points per day, the historical image frame group with the awakening time of 8 points comprises 20 frames of images; if the battery camera is awakened 15 times at 12 points per day, then 15 images are captured in total, and the historical image frame group with the awakening time of 12 points comprises 15 images.
S2123: carrying out image fusion on each image frame of each historical image frame group through fuzzy processing to obtain each historical image frame corresponding to each historical image frame group;
and each historical image frame forms the historical image frame database.
Specifically, after the captured image frames are grouped according to capturing time, blurring processing is carried out on each image frame in each historical image frame group, so that color information of each pixel point of different image frames is fused, each group of historical image frames are obtained, each group of historical image frames are blurred and low-bit-rate images, each group of historical image frames form a historical image frame database, and when a user sends a video request from an App end, the historical image frame corresponding to the time is selected from the historical image frame database according to the request time and sent to the user for playing.
In an embodiment, the classifying the captured images according to the capturing time to obtain the historical image frame groups includes:
acquiring preset time for segmenting time and snapshot time of each frame of image to be snapshot;
specifically, the awakening times are classified into the same awakening time, and the preset duration corresponding to the time difference of the same awakening time is set; if the preset time is 3 minutes, the battery camera is awakened at 8 am every day, which comprises: all wake events of the battery camera within 3 minutes of 8 am to 8 am each day.
Segmenting the time according to the preset time length to obtain continuous time periods;
specifically, 24 hours per day is divided into a plurality of continuous time periods according to a preset time length, and if the preset time length is 5 minutes, each hour is divided into 12 continuous time periods.
And classifying the captured frame images according to the time period to which each capturing time belongs to obtain each historical image frame group.
Specifically, after 24 hours per day are divided according to preset time length, each frame image is classified into a corresponding time period according to the capturing time of each frame image, and the time period in which the captured image frame exists is recorded as a corresponding historical image frame group.
In an embodiment, the performing image fusion on each image frame of each history image frame group through a blurring process to obtain each history image frame corresponding to each history image frame group includes:
acquiring a quantity threshold of the quantity of image frames required for image fusion;
specifically, each history image frame in the history image frame database is synthesized by a certain number of image frames, and a threshold value of the number of image frames required for synthesizing the history image frame is set.
Carrying out similarity comparison on the currently captured image frame and the previously captured image frame in the corresponding historical image frame group, and outputting a first comparison result;
and outputting a historical image frame corresponding to the battery camera awakened at the current time next time according to the first comparison result.
Specifically, the image frames captured after the battery camera is awakened each time are uploaded to an auxiliary server and stored in a first storage area, meanwhile, the image frames captured this time are compared with the image frames captured at the previous time in similarity, and whether the corresponding historical image frames need to be updated or not is determined according to the comparison result; if the image needs to be updated, updating the historical image frame, and displaying the updated historical image frame at the App end of the user when the battery camera is awakened at the next current time; if the updating is not needed, when the battery camera is awakened at the next current time, the previous historical image frame is still displayed at the App end of the user.
It should be noted that: the similarity comparison comprises the comparison without limitation of a target scene and the comparison of the activity state of a target object; for example, when monitoring infants and the old: the battery camera monitors scene background change caused by angle change in the same space, scene background change caused by space change monitored by the battery camera, and action state change caused by working and resting time change of infants and/or old people, such as working and resting time change of infants and old people caused by seasonal change.
In an embodiment, if the first comparison result is that the currently captured image frame is similar to the previously captured image frame, the outputting the historical image frame corresponding to the next awakening of the battery camera at the current time according to the first comparison result includes:
acquiring the number of continuous image frames corresponding to the image frames similar to and continuous with the current snapshot image frame;
specifically, if the currently captured image frame is similar to the previous image frame captured at the same time before the currently captured image frame, the two image frames are marked as two similar and continuous image frames, and so on, and the number of the continuous and similar image frames is obtained.
Comparing the number of the continuous image frames with the number threshold value, and outputting a second comparison result;
and outputting a historical image frame corresponding to the battery camera awakened at the current time next time according to the second comparison result.
Specifically, the number of continuous and similar image frames is compared with a number threshold, the comparison result is recorded as a second comparison result, if the requirement is met, the historical image frame is updated, otherwise, the historical image frame is not updated, and the prior historical image frame is still reserved.
In an embodiment, the outputting the historical image frame corresponding to the next awakening of the battery camera at the current time according to the second comparison result includes:
if the second comparison result is that the number of the continuous image frames is larger than or equal to the number threshold, selecting a plurality of image frames which are the same as the number threshold from the number of the continuous image frames for fusion to obtain a new historical image frame; the new historical image frame is an image obtained by fusing a plurality of continuous image frames including the currently captured image frame through blurring processing.
Specifically, if the similar and continuous image frames are greater than or equal to the quantity threshold, selecting a plurality of image frames equal to the quantity threshold from the similar and continuous image frames for fusion to obtain a new historical image frame; the selected multi-frame image comprises the image frame of the current snapshot and each frame image continuous with the image frame of the current snapshot. And if the number threshold is 3 images, the similar and continuous image frames are 5 images which are 1 st, 2 nd, 3 rd, 4 th and 5 th in sequence, and the image taken at the time is the 5 th image, selecting the 3 images for fusion as the 3 rd, 4 th and 5 th images, fusing the 3 images after Gaussian blur to obtain a new historical image frame, and displaying the new historical image frame at the user App end when the battery camera is awakened at the next time.
And if the second comparison result is that the number of the continuous image frames is smaller than the number threshold, continuing to use the previous historical image frame as the historical image frame of the historical image frame group.
Specifically, if the similar and continuous image frames are smaller than the number threshold, the current historical image frame is not updated; if the number threshold is 3 images, the number of similar and continuous image frames is 2, namely the 1 st image and the 2 nd image in sequence, and the current historical image frame is marked as the image frame A, the image frame A is still sent to the App end of the user to be played when the battery camera is awakened at the next time.
In an embodiment, if the first comparison result is that the currently captured image frame is not similar to the previously captured image frame, the previous history image frame is continuously used as the history image frame of the history image frame group.
Specifically, if the currently captured image frame is not similar to the image frame captured last time, the current historical image frame is not updated, and if the current historical image frame is recorded as the image frame a, the image frame a is still sent to the user App end to be played when the battery camera is awakened at the next time.
By adopting the battery camera video method of the embodiment, one image is captured and sent to the server when the battery is awakened each time, the historical image frame database is established in the server, when a user sends a video request each time, in the process of establishing P2P between the battery camera and the user side, the server sends the historical image frame corresponding to the awakening time in the historical image frame database to the user side for playing, the waiting time of the video request of the user can be reduced, meanwhile, the picture difference of a monitoring area in a certain specific time based on a specific scene is small, the historical image is played, so that the user can enter the simulated scene of the monitoring area in advance to achieve the video display effect, and the user experience effect is improved.
Example 3
Referring to fig. 7, fig. 7 is a method for transmitting video data of a battery camera according to embodiment 3 of the present invention, where embodiment 3 is a specific implementation that a user establishes a P2P with the battery camera through an App remote device on the basis of embodiment 1 and embodiment 2, and the method includes:
s30: acquiring a video request instruction sent by a user side;
specifically, the battery camera is used for saving electric quantity when a baby and an old person are cared; the video data of the monitored area is usually stored at the edge, that is, the video data is not transmitted to a far end, so that the standby time of the battery camera is prolonged; when a user carries out a video request of the battery camera through the App of the mobile terminal, the App sends a video request instruction to the auxiliary server, and the far-end server sends a wake-up instruction to the battery camera terminal according to the video request instruction, so that IP position information of the battery camera is obtained, and a mobile terminal and battery camera P2P network communication link is established for carrying out video data transmission.
S31: according to the video request instruction, before the battery camera is awakened, outputting a historical image frame to a user side;
specifically, before the battery camera is awakened and in the process of establishing a P2P network communication link between the mobile terminal and the battery camera, the server extracts time information in a current video request instruction and traverses a historical image frame database; the historical image frames corresponding to the historical video requests with the same video request time are transmitted to the mobile terminal, a user can see the historical image frames on a video watching interface of an App, and because the scene difference of the same time on different dates is small in the nursing scenes of infants and old people, the user can be visually induced to enter a video watching process by playing the historical images at the same time to simulate real monitoring videos to the user, and the experience effect of the user is improved.
In one embodiment, referring to fig. 8, the S31 includes:
s311: generating a wake-up instruction for waking up the battery camera according to the video request instruction;
s312: awakening the battery camera according to the awakening instruction;
s313: and in the battery camera awakening process, traversing the historical image frame database according to the timestamp of the video request instruction, and outputting the historical image frame corresponding to the timestamp of the video request instruction to a user side.
Specifically, in the process of establishing a network communication link between the mobile terminal and the battery camera P2P, the server extracts time information in a current video request instruction and traverses a historical image frame database; the historical image frames corresponding to the historical video requests with the same video request time are transmitted to the mobile terminal, a user can see the historical image frames on a video watching interface of an App, and because the scene difference of the same time on different dates is small in the nursing scenes of infants and old people, the user can be visually induced to enter a video watching process by playing the historical images at the same time to simulate real monitoring videos to the user, and the experience effect of the user is improved.
In one embodiment, the method further comprises, after the battery camera wakes up:
after the battery camera is awakened, capturing a monitoring area to obtain a captured image frame;
specifically, after the battery camera is awakened every time, the monitoring area corresponding to the battery camera is captured once, so that a plurality of historical images captured by awakening the battery camera at any time every day are obtained.
Uploading the captured image frames to an auxiliary server;
and establishing the historical image frame database according to each captured image frame stored by the auxiliary server.
Specifically, the captured image frames are classified, gaussian-blurred, fused and the like, so that historical image frames corresponding to the awakening times are obtained, and a historical image frame database composed of the historical image frames is obtained.
S32: in a first time period after the battery camera is awakened, encoding video data acquired by the battery camera at a first encoding code rate to obtain first video data watched at a user side;
specifically, after the battery camera is awakened and P2P is established with the App at the user side, the video encoder is set to be the first low-bit-rate encoding code rate to encode the video data collected by the battery camera, and the video data encoded by the first encoding code rate is recorded as the first video data, so that the video data seen by the user at the App side is gradually and smoothly transited from the historical image frame to the real-time video data collected by the battery camera, and the visual experience of the user in watching videos is improved.
In one embodiment, the first coding rate is a dynamic rate that is gradually increased with the time for establishing the P2P between the user terminal and the battery camera.
Specifically, the first coding rate is a dynamic rate, and is gradually increased along with the time for establishing the user side and the P2P of the battery camera, and after the first time period is over, the coding rate reaches a second coding rate corresponding to the normal rate.
In one embodiment, referring to fig. 9, the S32 includes:
s321: coding the video data in a first time period according to the first coding rate to obtain first I frame data and first P frame data corresponding to the video data;
specifically, according to the video frame rate, the video data is encoded by adopting a first encoding rate, if the video frame rate is 20 frames/second, one I frame is encoded, and then 19P frames are encoded on the basis of the I frame, and the operations are repeated until the first time period is finished.
S322: truncating the first P frame data to obtain the first video data only comprising continuous first I frame data.
Specifically, all first P frame data encoded by the first encoding rate are discarded, and only the first I frame data is retained, that is, the first I frame data is uploaded, the first P frame data is not uploaded, and the video data downloaded at the user side is continuous I frame data not including P frames, so that the minimum data amount transmitted in the early transition period is ensured, and the video data transmission efficiency is improved.
In an embodiment, before playing the first video data, the method further includes:
acquiring a first frame image of the first video data;
specifically, after the P2P between the battery camera and the user side App is established, the battery camera starts to encode the acquired video data at the first encoding rate, and acquires a first encoded frame image, that is, a first I frame image.
Comparing the first frame image with the historical image frame to obtain image difference information of the first image frame and the historical image frame;
specifically, the first frame image is compared with the historical image frame displayed on the App interface at the moment, and image difference information between the two images is determined, specifically, the image is divided into a plurality of areas according to a preset rule, for example, the image is divided into 9 sub-images according to a 9-grid mode, the image is divided into three circles, namely an inner circle, a middle circle, an outer circle and an inner circle, each circle comprises a plurality of sub-images, or the image is randomly divided into a plurality of sub-images according to a fixed size, and the specific division mode is not limited to the above modes; and comparing each sub-image respectively to obtain image difference information of the two images, wherein the abnormal image information comprises image type difference, color difference, brightness difference, protection degree difference and the like which are not limited among the sub-images.
Decoding and playing the first image frame according to the image difference information;
specifically, a plurality of decoding methods for the first image are stored in advance, and the decoding methods include, but are not limited to: decoding from the image center to the image edge extension scheme, decoding from the image edge to the image center contraction scheme, decoding from top to bottom, decoding from bottom to top, decoding from left to right, decoding in a spiral format, and the like.
Wherein the image difference comprises at least one of: image position information with image difference, figure class information, color difference value, brightness difference value and saturation difference value of image area with image difference.
In an embodiment, the decoding and playing the first image frame according to the image difference information includes:
partitioning the picture of the historical image frame to obtain a plurality of sub-pictures;
sorting the sub-pictures in a descending or ascending manner according to the color difference value, the brightness difference value or the saturation difference value of the image difference to obtain a pre-decoding sequence of each sub-picture;
specifically, after obtaining the difference values of the color difference, the brightness and the saturation between the first image and each sub-image in the historical image frame, the sub-images are sorted according to the corresponding difference values, and then the pre-decoding sequence is generated in a descending or ascending manner.
Comparing the pre-decoding sequence with the decoding sequences of the decoding modes in the database one by one to obtain the coincidence degree of the decoding sequences of the decoding modes in the database and the pre-decoding sequence;
and taking a decoding mode corresponding to the coincidence degree meeting the requirement as a target decoding mode, and decoding and playing the first image frame in the target decoding mode.
Specifically, the pre-decoding sequence is compared with the decoding sequences of the decoding modes in the database one by one, the coincidence degree of the pre-decoding sequence and the decoding sequences in the decoding modes is determined, and the decoding mode with the coincidence degree meeting the requirement is selected as a target decoding mode; by the method, the pictures with large difference can be decoded firstly, and then the pictures with small difference are decoded step by step, so that natural transition between the historical image frame and the first image is realized, and the user experience effect is improved.
S33: after a first time period after the battery camera is awakened, encoding the video data acquired by the battery camera at a second encoding code rate to obtain second video data watched at a user side;
wherein the code rate of the first video data is smaller than that of the second video data.
Specifically, after the code rate of the video encoder is gradually increased to the second encoding code rate, the real-time video data collected by the battery camera is encoded at the second encoding code rate, so that the second video data is obtained.
In an embodiment, referring to fig. 10, the S33 includes:
s331: coding the video data after the first time period according to the second coding rate to obtain second I frame data and second P frame data corresponding to the video frame rate;
specifically, according to the video frame rate, the video data is encoded by adopting a second encoding rate, if the video frame rate is 20 frames/second, one I frame is encoded, and then 19P frames are encoded on the basis of the I frame, and the operations are repeated until the video is finished.
S332: and packing the second I frame data and the second P frame data according to the frame rate to obtain the second video data.
Specifically, I frame data and P frame data encoded by the video encoder are packed according to the video frame rate to obtain complete video data, and then the complete video data is uploaded, and the video data received at the user side is a data packet. If the video frame rate is 20 frames/second, encoding an I frame, then encoding 19P frames on the basis of the I frame, then forming a data packet by the 20 frames of images to obtain a GOP (group of pictures), and repeating the above operations until the video is finished.
In one embodiment, before the battery camera wakes up, the method further comprises:
establishing a wifi peer-to-peer network by using a wifi module of the battery camera, and establishing a socket server in the wifi peer-to-peer network;
specifically, the battery camera comprises a main control module and a wifi module, a wifi peer-to-peer network is established through the wifi module, and a socket server is established in the wifi peer-to-peer network.
Adding a main control module of the battery camera into the wifi peer-to-peer network, and creating a socket client in the wifi peer-to-peer network;
specifically, when the battery camera is in a dormant state, the main control module is added into a wifi peer-to-peer network created by the wifi module, and a socket client is created in the wifi peer-to-peer network, so that a data transmission channel constructed by the socket server and the socket client exists in the wifi peer-to-peer network.
Through the socket server and the transmission channel provided by the socket client, the wifi module acquires the network address of the battery camera from the main control chip and uploads the network address.
Specifically, sharing of network sockets is achieved through transmission channels provided by the socket server and the socket client, so that the wifi module can acquire a network address, namely an IP address, of the battery camera recorded in the main control module; then uploading the IP address to an auxiliary server of P2P, wherein the auxiliary server establishes a server of P2P for the first terminal device and the second terminal device; here, P2P is a peer-to-peer network between the battery camera and the mobile terminal App.
By adopting the video data transmission method of the battery camera in the embodiment, when a video request instruction sent by a user from a user side is received, the stored historical image frame shot by the battery camera is sent to the user side for playing, meanwhile, the battery camera is awakened, a low-bit-rate video is transmitted to the user side in a transition time period after the battery camera is awakened, and a normal-bit-rate video is carried out in a normal time period; the video experience effect of the video waiting time of the battery camera can be improved, and the experience effect of smoothly transitioning the historical image frames to the normal video can be achieved by setting the transition video time with low code rate.
Example 4
Embodiment 4 of the present invention further provides a battery camera wake-up apparatus based on the methods of embodiments 1 to 3, and referring to fig. 11, the method includes:
a network address uploading module: the system comprises a server and a server, wherein the server is used for uploading a network address of a battery camera in real time through a shared network socket;
a first network building module: completing a network penetrating task of P2P network connection according to the network address before receiving a battery camera wake-up instruction;
a second network building module: the network response task is used for completing the P2P network connection according to the awakening instruction after the battery camera awakening instruction is received;
wherein, after completing the network penetrating task and the network answering task, the P2P network communication link establishment is completed.
By adopting the battery camera wake-up device of the embodiment, the battery camera actively reports the network address to the auxiliary server in a dormant state through sharing the network socket; therefore, the network penetration task of P2P is completed before the awakening instruction is received, after the video request sent by the user is received, the battery camera is awakened from the dormant state, then the rest network response task of P2P network construction is completed, the P2P network construction is completed, the waiting time of the video request of the user is saved, and the user experience effect is improved.
It should be noted that the apparatus further includes the remaining technical solutions described in embodiments 1 to 3, which are not described herein again.
Example 5
For a specific application of the battery camera based on embodiment 4, please refer to fig. 12, fig. 12 is a video apparatus of the battery camera, the apparatus includes:
an instruction acquisition module: wake-up instructions for a battery camera;
the instruction processing module: the historical image frame database is traversed according to the time information corresponding to the awakening instruction, and the historical image frame corresponding to the time information of the awakening instruction is output to the user terminal;
the video playing module: the video watching interface is used for playing the historical image frame on a video watching interface corresponding to the user terminal;
and each frame of image in the historical image frame database is an image frame obtained by processing the image captured by the battery camera when the battery camera is awakened every time according to the capturing moment.
By adopting the battery camera video device of the embodiment, one image is captured and sent to the server when the battery is awakened every time, the historical image frame database is established in the server, when a user sends a video request every time, in the process of establishing P2P between the battery camera and the user side, the server sends the historical image frame corresponding to the awakening time in the historical image frame database to the user side for playing, the waiting time of the video request of the user can be reduced, meanwhile, the picture difference of a monitoring area in a certain specific time based on a specific scene is small, the historical image is played, so that the simulated scene of the user entering the monitoring area in advance achieves a video watching effect, and the user experience effect is improved.
It should be noted that the apparatus further includes the remaining technical solutions described in embodiment 4, and details are not described herein.
Example 6
Further specific application of the battery camera video based on embodiments 4 and 5 is shown in fig. 13, where fig. 13 is a video data transmission device for a battery camera, the device includes:
an instruction acquisition module: the system comprises a video request command for acquiring a video request command sent by a user side;
the instruction processing module: the video server is used for outputting historical image frames to a user side before the battery camera is awakened according to the video request instruction;
a first encoding module: the method comprises the steps that video data collected by a battery camera are coded at a first coding rate within a first time period after the battery camera is awakened, and first video data watched at a user side are obtained;
a second encoding module: the video data acquisition module is used for encoding the video data acquired by the battery camera at a second encoding code rate after a first time period after the battery camera is awakened to obtain second video data watched at a user side;
and the code rate of the first video data is smaller than that of the second video data.
By adopting the video data transmission device of the battery camera in the embodiment, when a video request instruction sent by a user from a user side is received, the stored historical image frame shot by the battery camera is sent to the user side for playing, meanwhile, the battery camera is awakened, a low-bit-rate video is transmitted to the user side in a transition time period after the battery camera is awakened, and a normal-bit-rate video is carried out in a normal time period; the video experience effect of the video waiting time of the battery camera can be improved, and the experience effect of smoothly transitioning the historical image frames to the normal video can be achieved by setting the transition video time with low code rate.
It should be noted that the apparatus further includes the remaining technical solutions described in embodiment 4 and/or embodiment 5, and details are not described herein.
Example 7
The present invention provides an electronic device and storage medium, as shown in FIG. 14, comprising at least one processor, at least one memory, and computer program instructions stored in the memory.
Specifically, the processor may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present invention, and the electronic device includes at least one of the following: the wearing equipment that camera, mobile device that has the camera, have the camera.
The memory may include mass storage for data or instructions. By way of example, and not limitation, memory may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. The memory may include removable or non-removable (or fixed) media, where appropriate. The memory may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory is non-volatile solid-state memory. In a particular embodiment, the memory includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor reads and executes the computer program instructions stored in the memory to implement any one of the battery camera video playing method, the battery camera wake-up method, and the battery camera video data transmission method in the above embodiments.
In one example, the electronic device may also include a communication interface and a bus. The processor, the memory and the communication interface are connected through a bus and complete mutual communication.
The communication interface is mainly used for realizing communication among modules, devices, units and/or equipment in the embodiment of the invention.
A bus comprises hardware, software, or both that couple components of an electronic device to one another. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. A bus may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
In summary, embodiments of the present invention provide a battery camera video playing method, a wake-up method, a video data transmission method, a device, an apparatus, and a storage medium.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A video playing method when a battery camera is awakened, which is characterized by comprising the following steps:
acquiring a wake-up instruction of the battery camera;
traversing a historical image frame database according to the time information corresponding to the awakening instruction, and outputting the historical image frame corresponding to the time information of the awakening instruction to a user terminal;
playing the historical image frame on a video watching interface corresponding to the user terminal;
and each frame of image in the historical image frame database is an image frame obtained by processing the image captured by the battery camera when the battery camera is awakened every time according to the capturing moment.
2. The method for playing video when a battery camera wakes up according to claim 1, wherein traversing a historical image frame database according to the time information corresponding to the wake-up instruction and outputting the historical image frame corresponding to the time information of the wake-up instruction to a user terminal comprises:
after the battery camera is awakened every time, controlling the battery camera to perform snapshot to obtain each image frame of the snapshot;
establishing the historical image frame database according to each captured image frame;
traversing a historical image frame database according to the time information corresponding to the awakening instruction, and outputting the historical image frame corresponding to the time information of the awakening instruction to a user terminal.
3. The method for playing video when a battery camera wakes up according to claim 2, wherein the establishing the historical image frame database according to the captured image frames comprises:
acquiring the snapshot time of each frame of image to be snapshot;
classifying the captured frame images according to the capturing time to obtain historical image frame groups;
carrying out image fusion on each image frame of each historical image frame group through fuzzy processing to obtain each historical image frame corresponding to each historical image frame group;
and each historical image frame forms the historical image frame database.
4. The method for playing the video when the battery camera is awakened according to claim 3, wherein the step of classifying the captured frame images according to the capturing time to obtain each historical image frame group comprises:
acquiring preset time for segmenting time and snapshot time of each frame of image to be snapshot;
segmenting the time according to the preset time length to obtain continuous time periods;
and classifying the scared frame images according to the time period to which each snapshot time belongs to obtain each historical image frame group.
5. The method for playing video when a battery camera wakes up according to claim 4, wherein the image fusion of the image frames of the historical image frame groups by the blur processing to obtain the historical image frames corresponding to the historical image frame groups comprises:
acquiring a quantity threshold of the quantity of image frames required for image fusion;
carrying out similarity comparison on the currently captured image frame and the previously captured image frame in the same corresponding historical image frame group, and outputting a first comparison result;
and outputting a historical image frame corresponding to the battery camera awakened at the current time next time according to the first comparison result.
6. The method for playing video when a battery camera wakes up according to claim 5, wherein the outputting the historical image frame corresponding to the battery camera that wakes up at the current time next time according to the first comparison result comprises:
if the first comparison result is that the current captured image frame is similar to the image frame captured in the corresponding time period in the previous time, then:
acquiring the number of continuous image frames corresponding to the image frames similar to and continuous with the current snapshot image frame;
comparing the number of the continuous image frames with the number threshold value, and outputting a second comparison result;
according to the second comparison result, outputting a historical image frame corresponding to the battery camera awakened at the current time next time;
or if the first comparison result is that the currently captured image frame is not similar to the previously captured image frame, continuing to use the previous history image frame as the history image frame of the history image frame group.
7. The method for playing video when a battery camera wakes up according to claim 6, wherein the outputting the historical image frame corresponding to the battery camera that wakes up at the current time next time according to the second comparison result comprises:
if the second comparison result is that the number of the continuous image frames is larger than or equal to the number threshold, selecting a plurality of image frames which are the same as the number threshold from the number of the continuous image frames for fusion to obtain a new historical image frame; the new historical image frame is an image obtained by fusing a plurality of continuous image frames including the current snapshot image frame through fuzzy processing;
and if the second comparison result is that the number of the continuous image frames is smaller than the number threshold, continuing to use the previous historical image frame as the historical image frame of the historical image frame group.
8. A video playback device when a battery camera wakes up, the device comprising:
an instruction acquisition module: wake-up instructions for a battery camera;
the instruction processing module: the historical image frame database is traversed according to the time information corresponding to the awakening instruction, and the historical image frame corresponding to the time information of the awakening instruction is output to the user terminal;
the video playing module: the video watching interface is used for playing the historical image frame on a video watching interface corresponding to the user terminal;
and each frame of image in the historical image frame database is an image frame obtained by processing the image captured by the battery camera when the battery camera is awakened every time according to the capturing moment.
9. An electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of claims 1-7.
10. A medium having stored thereon computer program instructions, which, when executed by a processor, implement the method of any one of claims 1-7.
CN202110741521.2A 2021-06-30 2021-06-30 Video playing method, device, equipment and medium during awakening of battery camera Pending CN113486210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110741521.2A CN113486210A (en) 2021-06-30 2021-06-30 Video playing method, device, equipment and medium during awakening of battery camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110741521.2A CN113486210A (en) 2021-06-30 2021-06-30 Video playing method, device, equipment and medium during awakening of battery camera

Publications (1)

Publication Number Publication Date
CN113486210A true CN113486210A (en) 2021-10-08

Family

ID=77937276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110741521.2A Pending CN113486210A (en) 2021-06-30 2021-06-30 Video playing method, device, equipment and medium during awakening of battery camera

Country Status (1)

Country Link
CN (1) CN113486210A (en)

Similar Documents

Publication Publication Date Title
CN106303289B (en) Method, device and system for fusion display of real object and virtual scene
CN107302711B (en) Processing system of media resource
EP4261778A1 (en) Posture estimation method related apparatus
CN114615513B (en) Video data generation method and device, electronic equipment and storage medium
EP2858038A2 (en) Editing image data
CN107424117B (en) Image beautifying method and device, computer readable storage medium and computer equipment
CN112001274A (en) Crowd density determination method, device, storage medium and processor
CN111131817A (en) Screen sharing method, device, storage medium and screen sharing system
CN113489774A (en) Video playing method, awakening method, device, equipment and medium for battery camera
WO2021057477A1 (en) Video encoding and decoding method and related device
CN110740290A (en) Monitoring video previewing method and device
CN114581566A (en) Animation special effect generation method, device, equipment and medium
CN111967397A (en) Face image processing method and device, storage medium and electronic equipment
CN113343895B (en) Target detection method, target detection device, storage medium and electronic equipment
CN114598919A (en) Video processing method, video processing device, computer equipment and storage medium
US11425316B2 (en) Image fusion method, image capturing apparatus, and mobile platform system
CN113365130B (en) Live broadcast display method, live broadcast video acquisition method and related devices
CN113486210A (en) Video playing method, device, equipment and medium during awakening of battery camera
CN113489989A (en) Video data transmission method, device, equipment and medium during awakening of battery camera
US20200013432A1 (en) Image processing apparatus, image processing method, camera apparatus, remote control apparatus, and camera system
CN117041608A (en) Data processing method and storage medium for linking on-line exhibition and off-line exhibition
CN112437332B (en) Playing method and device of target multimedia information
CN115861121A (en) Model training method, image processing method, device, electronic device and medium
US8798689B2 (en) Apparatus and method for controlling function of communication module in portable terminal
CN114143475A (en) Global light simulation method and system applicable to virtual movie shooting

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