CN115883864A - Video coding and decoding method and device for recording multi-dimensional data and terminal equipment - Google Patents

Video coding and decoding method and device for recording multi-dimensional data and terminal equipment Download PDF

Info

Publication number
CN115883864A
CN115883864A CN202211635283.8A CN202211635283A CN115883864A CN 115883864 A CN115883864 A CN 115883864A CN 202211635283 A CN202211635283 A CN 202211635283A CN 115883864 A CN115883864 A CN 115883864A
Authority
CN
China
Prior art keywords
data
frame
video
pixel
video frame
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
CN202211635283.8A
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.)
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power 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 State Grid Corp of China SGCC, Marketing Service Center of State Grid Hebei Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202211635283.8A priority Critical patent/CN115883864A/en
Publication of CN115883864A publication Critical patent/CN115883864A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application is applicable to the technical field of video signal coding, and provides a video coding and decoding method, a video coding and decoding device and terminal equipment for recording multidimensional data, wherein the method comprises the following steps: when a first video frame is collected, acquiring real-time data corresponding to the first video frame; the real-time data comprises information of acquisition equipment for acquiring the first video frame and environment information of the environment where the acquisition equipment is located; splicing the real-time data into byte data according to a preset format; converting the byte data into a data frame format to generate frame data; superposing the frame data on the first video frame according to a preset pixel arrangement mode to obtain a second video frame, and storing the second video frame; and responding to a preset instruction, and analyzing the real-time data from the second video frame. According to the method and the device, the monitoring state information can be effectively stored and read on the basis of not increasing an additional storage database.

Description

Video coding and decoding method and device for recording multi-dimensional data and terminal equipment
Technical Field
The present application relates to the field of video signal coding technologies, and in particular, to a video coding and decoding method and apparatus for recording multidimensional data, and a terminal device.
Background
The video monitoring is to monitor, record and backtrack the video image by acquiring the video image information of the monitored target, and manually or automatically make corresponding actions according to the video image information so as to achieve the monitoring, control, safety precaution and intelligent management of the monitored target. Video monitoring is widely applied to military affairs, customs, public security, fire control, forestry, dams, airports, railways, ports, urban traffic and other public places, and is gradually popularized to household safety precaution and entertainment application along with the improvement of technology and the reduction of cost. With the development of intelligent monitoring equipment, behavior recognition algorithms are integrated in intelligent monitoring, behaviors of pedestrians or vehicles in a picture scene can be recognized and judged, and an alarm is generated to prompt a user under appropriate conditions.
The monitoring technology goes through a plurality of different stages, the image monitoring technology is the core content of video monitoring, but structured data and alarm information generated in the monitoring process need to be stored in an additional database, and are generally difficult to store in real time along with the high synchronization of videos. When the monitoring state at a certain time is read, it is difficult to find real-time monitoring state information, such as illumination intensity, real-time identification data, real-time temperature, etc., and it is necessary to spend extra calculation effort to find various monitoring states for deduction, which is time-consuming and labor-consuming.
Disclosure of Invention
In order to solve the problems in the related art, embodiments of the present application provide a video encoding and decoding method, apparatus, and terminal device for recording multidimensional data, so as to implement effective storage and reading of monitoring state information without adding an additional storage database.
The application is realized by the following technical scheme:
in a first aspect, an embodiment of the present application provides a video encoding and decoding method for recording multidimensional data, including: when a first video frame is collected, acquiring real-time data corresponding to the first video frame; the real-time data comprises information of acquisition equipment for acquiring the first video frame and environment information of the environment where the acquisition equipment is located;
splicing the real-time data into byte data according to a preset format;
converting the byte data into a data frame format to generate frame data;
superposing frame data on the first video frame according to a preset pixel arrangement mode to obtain a second video frame, and storing the second video frame;
and responding to a preset instruction, and analyzing the real-time data from the second video frame.
In one possible implementation, converting the byte data into a data frame format, and generating frame data includes:
dividing the byte data into multi-frame data when the byte number of the byte data exceeds the preset maximum byte number of one frame of data;
converting each sub-byte data into a data frame format based on a frame data mark formed by a characteristic value, a multi-frame mark and a head identification mark of each sub-byte data of the multi-frame data to generate frame data; the head identification mark is used for marking whether the byte data contains pixel data; the multi-frame mark is used for identifying whether the byte data is multi-frame data or not;
and when the byte number of the byte data does not exceed the preset maximum byte number of one frame of data, the byte data is single-frame data, and the single-frame data is converted into a data frame format based on a frame data mark formed by the characteristic value, the multi-frame mark and the head identification mark of the single-frame data to generate frame data.
In a possible implementation manner, superimposing frame data on a first video frame according to a preset pixel arrangement manner to obtain a second video frame includes:
selecting a preset pixel arrangement mode of pixel points of frame data based on the video format and the storage mode of the first video frame; the preset pixel arrangement mode of the pixel points comprises a single-pixel representation method and a multi-pixel joint representation method;
converting the frame data into a pixel array based on a preset pixel arrangement mode of the pixel points; the pixel array represents digitized information of real-time data;
and superposing the pixel array on the first video frame to obtain a second video frame.
In a possible implementation manner, the parsing real-time data from the second video frame in response to a preset instruction includes: responding to a preset instruction, and reading a second video frame;
and extracting real-time data from the second video frame based on a preset pixel arrangement mode.
In one possible implementation manner, extracting real-time data from the second video frame based on a preset pixel arrangement manner includes:
when the characteristic value of the frame data mark in the second video frame is different from the characteristic value of the frame data mark in the video frame of the previous frame, restoring the pixel array in the second video frame into frame data according to the rule of the preset pixel arrangement mode to obtain first restored frame data;
real-time data is extracted based on the first restored frame data.
In one possible implementation, extracting real-time data based on the first restored frame data includes:
judging whether the first restored frame data is correctly restored or not based on the characteristic value of the first restored frame data;
if the first restored frame data is correctly restored, identifying whether the first restored frame data is multi-frame data;
if the first restored frame data is multi-frame data, merging each frame data of the first restored frame data to obtain second restored frame data;
and extracting real-time data based on the second restored frame data to obtain digitalized information of the real-time data.
In one possible implementation, when the second video frame is saved, the frame data is stored in the same frame as the second video frame.
In one possible implementation, the single-pixel representation method includes a black-and-white binary color pixel representation method, a gray-scale color pixel representation method, a 256-color pixel representation method, and a 24-bit true-color pixel representation method;
the multi-pixel joint representation method comprises the step of combining a preset number of adjacent pixel points into one data point, wherein the pixel representation utilizes a pixel representation method, a gray color pixel representation method, a 256-color pixel representation method and a 24-bit true color pixel representation method.
In a second aspect, an embodiment of the present application provides a video encoding and decoding apparatus for recording multi-dimensional data, including:
the acquisition module is used for acquiring real-time data corresponding to the first video frame when the first video frame is acquired; the real-time data comprises information of acquisition equipment for acquiring the first video frame and environment information of the environment where the acquisition equipment is located;
the data splicing module is used for splicing the real-time data into byte data according to a preset format;
the format conversion module is used for converting the byte data into a data frame format and generating frame data;
the pixel superposition module is used for superposing the frame data on the first video frame according to a preset pixel arrangement mode to obtain a second video frame and storing the second video frame;
and the analysis module is used for responding to a preset instruction and analyzing the real-time data from the second video frame.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the method according to any one of the first aspect when executing the computer program.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
according to the embodiment of the application, the image information of the video is converted into the digital information, the digital information is formed according to the preset pixel arrangement mode and is superposed on the original image, and the monitoring state information can be effectively stored and read on the basis of not increasing an additional storage database.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the prior art description will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic flowchart of a video encoding and decoding method for recording multi-dimensional data according to an embodiment of the present application;
fig. 2 is a schematic style diagram of a pixel arrangement manner formed by a pixel representation method using black and white binary colors according to an embodiment of the present application;
fig. 3 is a schematic diagram of a pixel arrangement formed by a pixel representation method using gray colors according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of data overlay provided by an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a pixel array superimposed on a video frame according to an embodiment of the present application;
FIG. 6 is a flow chart of data parsing provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of a video encoding and decoding apparatus for recording multi-dimensional data according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings and the detailed description, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a video encoding and decoding method for recording multi-dimensional data according to an embodiment of the present application, and referring to fig. 1, the detailed description of the video encoding and decoding method for recording multi-dimensional data is as follows:
in step 101, when a first video frame is acquired, acquiring real-time data corresponding to the first video frame; the real-time data includes information of a capture device capturing the first video frame and environmental information of an environment in which the capture device is located.
For example, the acquisition device may include a camera, and the real-time data may include a number of the camera, a position of the camera, a model of the camera, an ambient temperature, and a light intensity.
For example, if the collecting device is an intelligent camera in an electric power business hall, the real-time data may further include real-time number of people in queue, illumination intensity, temperature, unexpected situations of people (such as falling, loud noise, etc.), and the like.
In step 102, the real-time data is spliced into byte data according to a preset format.
Illustratively, the real-time data comprises a data byte stream according to fields such as 20 bytes of equipment number, 50 bytes of equipment name, 50 bytes of installation place, 50 bytes of equipment model, 4 bytes of installation angle x, 4 bytes of installation angle y, 4 bytes of installation angle z, 4 bytes of temperature, 4 bytes of focal length, 4 bytes of ISO 4, 4 bytes of aperture, 4 bytes of light intensity, 4 bytes of number of people in queue, 4 bytes of number of people falling over the ground, 4 bytes of starting time of people falling over the ground, 1 byte of continuous mark of people falling over the ground, 1 byte of mark of recovery of people falling over the ground, 4 bytes of people in a viewed range, and the like.
In step 103, the byte data is converted into a data frame format, generating frame data.
Specifically, step 103 includes: dividing the byte data into multi-frame data when the byte number of the byte data exceeds the preset maximum byte number of one frame of data; converting each sub-byte data into a data frame format based on a frame data mark formed by a characteristic value of each sub-byte data of the multi-frame data, a multi-frame mark and a head identification mark to generate frame data; the head identification mark is used for marking whether the byte data contains pixel data; the multi-frame flag is used to identify whether the byte data is multi-frame data.
And when the byte number of the byte data does not exceed the preset maximum byte number of one frame of data, the byte data is single-frame data, and the single-frame data is converted into a data frame format based on a frame data mark formed by the characteristic value, the multi-frame mark and the head identification mark of the single-frame data to generate frame data.
For example, the data frame format in the present application is to facilitate identifying data pixels in an image, and an identification flag needs to be added to a header of the pixel to distinguish whether pixel data exists, and this part of data is referred to as "flag data". The flag data is followed by a multi-frame flag in the format "current frame/total frame". And after the multi-frame marking, the characteristic value of the frame data is used for verifying the data correctness. The frame data characteristic value is followed by specific data content. According to the actual engineering requirements, such as information including camera numbers, positions, models, temperatures, light intensity, identified specific data and the like, the data length is not required to be specific, but the main content of the video is preferably not covered, the data content is longer, and a group of data can be stored by using multiple frames.
In one embodiment, the predetermined maximum number of bytes of a frame of data is 480 bytes, and if the total length of the data byte stream is not greater than 480 bytes, it is considered as a single frame of data, and all data can be saved in one frame. The feature code 20 bytes of the byte stream of the single frame data calculated by the SHA1 algorithm is added to the front end of the byte stream. The number of bytes (4 bytes) calculated for each byte stream is appended to the front end of the byte stream. The front end of each byte stream is added with the serial number (2 bytes) of the current sub-byte stream and the total number (2 bytes) of the sub-byte streams, no sub-byte stream exists, and the total number and the current number are both 1. The front ends of all byte streams are added with a Data character string occupying 4 bytes to form frame Data.
If the total length of the data byte stream is greater than 480 bytes, 480 bytes are stored in each frame, the required total frame number is calculated, the byte stream is divided into a plurality of sub-byte data by taking 480 bytes as a subsection, and one sub-byte data is one sub-byte stream, namely divided into a plurality of sub-byte streams.
The signature code 20 bytes of each sub-byte stream calculated by the SHA1 algorithm is added to the front end of the sub-byte stream. The number of bytes (4 bytes) calculated for each sub-byte stream is appended to the front of the sub-byte stream. The front end of each byte stream is added with the serial number (2 bytes) of the current sub-byte stream and the total number (2 bytes) of the sub-byte streams, no sub-byte stream exists, and the total number and the current number are both 1. The front ends of all byte streams are added with a Data character string occupying 4 bytes to form frame Data.
In step 104, the frame data is superimposed on the first video frame according to a preset pixel arrangement mode to obtain a second video frame, and the second video frame is stored.
Specifically, step 104 may include: selecting a preset pixel arrangement mode of pixel points of frame data based on the video format and the storage mode of the first video frame; the preset pixel arrangement mode of the pixel point comprises a single-pixel representation method and a multi-pixel joint representation method Converting the frame data into a pixel array based on a preset pixel arrangement mode of the pixel points; the pixel array represents digitized information of the real-time data. And superposing the pixel array on the first video frame to obtain a second video frame.
Illustratively, the single-pixel representation method includes a black-and-white binary color pixel representation method, a gray-scale color pixel representation method, a 256-color pixel representation method, and a 24-bit true-color pixel representation method.
The multi-pixel joint representation method comprises the step of combining a preset number of adjacent pixel points into one data point, wherein the pixel representation utilizes a pixel representation method, a gray color pixel representation method, a 256-color pixel representation method and a 24-bit true color pixel representation method.
As an example, a pattern of a pixel arrangement formed by a pixel representation method using black and white binary colors is illustrated in fig. 2. The pixel points only use two colors of RGB (0, 0) and RGB (255 ), each pixel point represents 1bit information, the RGB (0, 0) is not limited to represent 1 or 0, and engineering can be defined according to requirements. One byte is represented by 8 consecutive pixel points.
An example of a pattern of a pixel arrangement formed by a pixel representation method using gray colors is shown in fig. 3. The pixels use 0-255 levels of gray scale color, and each pixel represents 8bit (1 byte) information.
Illustratively, a pattern of pixel arrangement is formed by a pixel representation method of 256 colors. The pixel points use 256 color colors, wherein the R channel uses 3 bits, the G channel uses 3 bits, the B channel uses 3 bits, wherein 2 bits represent color information, and the last 1bit is a parity bit for the first 8 bits. Each pixel point represents 8bit (1 byte) information.
Illustratively, the pixel arrangement pattern is formed by a pixel representation method of 24-bit true color. Pixel points use RGB three channel colors of 0-255 levels, and each pixel point represents 24bit (3 bytes) of information.
Illustratively, the multi-pixel joint representation method includes combining a preset number of adjacent pixel points into a data point, and forming a pixel arrangement pattern by using a 24-bit true color pixel representation method.
Illustratively, the frame data is stored in-frame with the second video frame when the second video frame is saved.
In one embodiment, the first video frame is an original video frame, the resolution of the original video frame is 1920 × 1080, the frame data is converted into a binary format, 0 is represented by black, 1 is represented by white, and the signal is superimposed on the original video image in a black-white binary color manner to form a new video frame, that is, the second video frame is stored.
In one embodiment, in order to better understand the scheme of the present application, the process from step 101 to step 104 is represented by a data overlay flow chart, as shown in fig. 4. Acquiring real-time data to be stored, such as temperature, light intensity, identification content and the like, and splicing the data into byte data according to a preset format. Judging whether the byte data is sent in a multi-frame mode, if so, dividing the data into a plurality of single-frame data, calculating the characteristic value of each frame of data, adding a multi-frame mark and head identification to each frame to form a frame data mark, generating a pixel array of the frame data according to a preset pixel arrangement method, and overlapping the pixel array to a video frame for storage. Otherwise, directly calculating the characteristic value of the byte data, adding multi-frame marks and head identification to form a frame data mark, generating a pixel array by the frame data according to a preset pixel arrangement method, and overlapping the pixel array to a video frame for storage.
Illustratively, the pixel array is generated according to a preset pixel arrangement method, and can be superimposed at any position of the video frame on the premise of not covering the main content of the video. For example, the pixel array may be superimposed on top of the location of the video frame, as shown in fig. 5.
In step 105, in response to the preset instruction, the real-time data is parsed from the second video frame.
Specifically, reading the second video frame in response to the preset instruction includes: identifying a head identification mark of a frame data mark in the second video frame, and if the head identification mark does not exist, determining that pixel data does not exist in the second video frame; and if the head identification mark exists, determining that the byte data in the second video frame comprises pixel data. After determining that the pixel data is contained, calculating a characteristic value of a frame data marker in the second video frame.
For example, after the video is saved, after a period of time, real-time data when the recorded video is desired to be extracted from the video, such as the current ambient temperature, can be directly parsed from the video frame of the original video without occupying additional storage resources.
Illustratively, if there is no header flag, and there is no pixel data in the second video frame, then there is no need to parse the second video frame.
Specifically, extracting real-time data from the second video frame based on the preset pixel arrangement mode includes: when the characteristic value of the frame data mark in the second video frame is different from the characteristic value of the frame data mark in the video frame of the previous frame, restoring the pixel array in the second video frame into frame data according to the rule of the preset pixel arrangement mode to obtain first restored frame data; real-time data is extracted based on the first restored frame data.
For example, when a video is saved, a plurality of video frames may be duplicated, and when the feature values are detected to be identical, the video frames are identical, so that repeated parsing is not needed.
Specifically, extracting real-time data based on the first restored frame data includes: judging whether the first restored frame data is correctly restored or not based on the characteristic value of the first restored frame data; if the first restored frame data is correctly restored, identifying whether the first restored frame data is a plurality of single frame data; if the first restored frame data is a plurality of single frame data, merging each single frame data of the first restored frame data to obtain second restored frame data; and extracting real-time data based on the second restored frame data to obtain digitalized information of the real-time data.
For example, comparing the feature value of the first restored frame data with the feature value of the originally stored video frame indicates that the data is correctly restored, and then the extracted real-time data is correct. If the feature values of the first restored frame data are the same and the feature values of the first restored frame data are different, the first restored frame data are not restored to the originally stored video frame data, and at this time, the real-time data are extracted from the second video frame again based on the preset pixel arrangement mode.
In an embodiment, to better understand the solution of the present application, the process of parsing the saved second video frame is represented by a data parsing flowchart, as shown in fig. 6. In response to a preset command, identifying a frame data flag in the second video frame, wherein the frame data flag is 'flag data' in a frame data format. After the frame data marks are identified, whether the characteristic value in the frame data mark in the second video frame is the same as the characteristic value in the frame data mark in the video frame of the previous frame or not is judged, and when the characteristic value in the frame data mark in the second video frame is different from the characteristic value in the frame data mark in the video frame of the previous frame, the pixel array in the second video frame is restored into frame data according to the rule of the preset pixel arrangement mode, so that first restored frame data is obtained. And when the characteristic value in the frame data mark in the second video frame is the same as the characteristic value in the frame data mark in the video frame of the previous frame, ending the task.
Continuously calculating the characteristic value of the first restored frame data, comparing the characteristic value of the first restored frame data with the corresponding characteristic value of the stored video frame, and judging whether the first restored frame data is correctly restored; if the characteristic value of the first restored frame data is the same as the characteristic value of the corresponding stored video frame, correctly restoring the first restored frame data, and then identifying whether the first restored frame data is multi-frame data or not; and if the first restored frame data is a plurality of single frame data, merging each single frame data of the first restored frame data to obtain second restored frame data. And extracting real-time data based on the second restored frame data, and outputting digitalized information of the real-time data. If the first restored frame data is not multi-frame data, the digitalized information of the real-time data is directly output. And if the first recovery frame data is not recovered correctly, ending the task.
In one embodiment, when Data is read, it is first verified whether M pixels from the left of the video are binary pixel arrangement of "Data", and if so, it indicates that there is additional Data in the frame. Reading N pixel arrangements, converting color information into 0 and 1 to form binary data, converting the binary data into numerical values, and determining the length of the byte stream.
Illustratively, first, it is verified whether the left 32 pixels of the video are binary pixel arrangements of "Data". If so, it indicates that additional data exists for the frame. Reading 33-64 pixel arrangement, converting color information into 0 and 1 to form binary data, and converting the binary data into numerical value to determine the length of byte stream. The number of pixels of the byte stream length is read in sequence, converted into a binary system, and then converted into a data stream. And comparing the characteristic value of the first 20 bytes of the data stream with the characteristic value calculated by the following data, and if the data are consistent, determining that the data are correct, and sequentially analyzing the data stream according to a specified format.
The video coding and decoding method for recording the multidimensional data is realized by utilizing the image processing technology, the image information of the video is converted into the digital information, the digital information formed according to the preset pixel arrangement mode is superposed on the original image, partial pixel points of the original image are covered, the information is more in type and is not easily and directly identified by human eyes, and the superposed data can be visible and stored; the monitoring state information can be effectively stored and read on the basis of not increasing an additional storage database, hardware cost is not required to be increased, and functions of storing, searching and the like of specific data can be realized only by software adjustment.
It should be understood that, the sequence numbers of the above steps do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation to the implementation process of the embodiment of the present application.
Fig. 7 shows a block diagram of a video codec apparatus for recording multi-dimensional data according to an embodiment of the present application, which corresponds to the video codec method for recording multi-dimensional data according to the foregoing embodiment.
Referring to fig. 7, the video encoding and decoding apparatus for recording multidimensional data in the embodiment of the present application may include an obtaining module 201, a data splicing module 202, a format conversion module 203, a pixel overlapping module 204, and an analyzing module 205.
The acquiring module 201 is configured to acquire real-time data corresponding to a first video frame when the first video frame is acquired; the real-time data includes information of a capture device capturing the first video frame and environmental information of an environment in which the capture device is located.
And the data splicing module 202 is configured to splice the real-time data into byte data according to a preset format.
The format conversion module 203 is configured to convert the byte data into a data frame format, and generate frame data.
The pixel superimposing module 204 is configured to superimpose the frame data onto the first video frame according to a preset pixel arrangement manner to obtain a second video frame, and store the second video frame.
And the parsing module 205 is configured to parse real-time data from the second video frame in response to a preset instruction.
Illustratively, the format conversion module 203 is configured to convert the byte data into a data frame format, and generate frame data, specifically including: and when the byte number of the byte data exceeds the preset maximum byte number of one frame of data, dividing the byte data into multi-frame data. Converting each sub-byte data into a data frame format based on a frame data mark formed by a characteristic value of each sub-byte data of the multi-frame data, a multi-frame mark and a head identification mark to generate frame data; the head identification mark is used for marking whether the byte data contains pixel data; the multi-frame flag is used to identify whether the byte data is multi-frame data. And when the byte number of the byte data does not exceed the preset maximum byte number of one frame of data, the byte data is single-frame data, and the single-frame data is converted into a data frame format based on a frame data mark formed by the characteristic value, the multi-frame mark and the head identification mark of the single-frame data to generate frame data.
Illustratively, the pixel superimposing module 204 is configured to superimpose frame data onto the first video frame according to a preset pixel arrangement manner to obtain a second video frame, and specifically includes: selecting a preset pixel arrangement mode of pixel points of frame data based on the video format and the storage mode of the first video frame; the preset pixel arrangement mode of the pixel point comprises a single-pixel representation method and a multi-pixel combined representation method. Converting the frame data into a pixel array based on a preset pixel arrangement mode of the pixel points; the pixel array represents digitized information of the real-time data. And superposing the pixel array on the first video frame to obtain a second video frame.
Illustratively, the parsing module 205 is configured to respond to a preset instruction and read a second video frame, and specifically includes: identifying a head identification mark of a frame data mark in the second video frame, and if the head identification mark does not exist, determining that pixel data does not exist in the second video frame; and if the head identification mark exists, determining that the byte data in the second video frame comprises pixel data. After determining that the pixel data is contained, calculating the characteristic value of the frame data mark in the second video frame.
Illustratively, the parsing module 205 is configured to extract the real-time data from the second video frame based on the preset pixel arrangement manner, and specifically includes: and when the characteristic value of the frame data mark in the second video frame is different from the characteristic value of the frame data mark in the video frame of the previous frame, restoring the pixel array in the second video frame into frame data according to the rule of the preset pixel arrangement mode to obtain first restored frame data. Real-time data is extracted based on the first restored frame data.
Illustratively, extracting the real-time data based on the first restored frame data includes: judging whether the first restored frame data is correctly restored or not based on the characteristic value of the first restored frame data; if the first restored frame data is correctly restored, identifying whether the first restored frame data is multi-frame data; if the first restored frame data is multi-frame data, merging each frame data of the first restored frame data to obtain second restored frame data; and extracting real-time data based on the second restored frame data to obtain the digital information of the real-time data.
Illustratively, the frame data is stored in-frame with the second video frame when the second video frame is saved.
It should be noted that, for the information interaction, the execution process, and other contents between the above-mentioned apparatuses, the specific functions and the technical effects of the embodiments of the method of the present application are based on the same concept, and specific reference may be made to the section of the embodiments of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides a terminal device, and referring to fig. 8, the terminal device 300 may include: at least one processor 310 and a memory 320, wherein the memory 320 stores a computer program operable on the at least one processor 310, and the processor 310 executes the computer program to implement the steps of any of the method embodiments described above, such as the steps 101 to 105 in the embodiment shown in fig. 1. Alternatively, the processor 310, when executing the computer program, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 201 to 205 shown in fig. 7.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 320 and executed by the processor 310 to accomplish the present application. The one or more modules/units may be a series of computer program segments capable of performing specific functions, which are used to describe the execution of the computer program in the terminal device 300.
Those skilled in the art will appreciate that fig. 8 is merely an example of a terminal device and is not meant to be limiting and may include more or fewer components than shown, or some components may be combined, or different components such as input output devices, network access devices, buses, etc.
The Processor 310 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 320 may be an internal storage unit of the terminal device, or may be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. The memory 320 is used for storing the computer programs and other programs and data required by the terminal device. The memory 320 may also be used to temporarily store data that has been output or is to be output.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The video encoding and decoding method for recording multi-dimensional data provided by the embodiment of the application can be applied to terminal equipment such as computers, tablet computers, notebook computers, netbooks and Personal Digital Assistants (PDAs), and the specific type of the terminal equipment is not limited at all by the embodiment of the application.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the embodiments of the video encoding and decoding method for recording multidimensional data may be implemented.
The embodiments of the present application provide a computer program product, which, when running on a mobile terminal, enables the mobile terminal to implement the steps in the embodiments of the video encoding and decoding method for recording multidimensional data when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal device, recording medium, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunication signals, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In some jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and proprietary practices.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (10)

1. A video encoding and decoding method for recording multi-dimensional data, comprising:
when a first video frame is collected, acquiring real-time data corresponding to the first video frame; the real-time data comprises information of acquisition equipment for acquiring the first video frame and environment information of the environment where the acquisition equipment is located;
splicing the real-time data into byte data according to a preset format;
converting the byte data into a data frame format to generate frame data;
superposing the frame data on the first video frame according to a preset pixel arrangement mode to obtain a second video frame, and storing the second video frame;
and responding to a preset instruction, and analyzing the real-time data from the second video frame.
2. The video encoding and decoding method for recording multi-dimensional data according to claim 1, wherein the converting the byte data into a data frame format to generate frame data comprises:
dividing the byte data into multi-frame data when the byte number of the byte data exceeds the preset maximum byte number of one frame of data;
converting each sub-byte data into a data frame format based on a frame data mark formed by a characteristic value, a multi-frame mark and a head identification mark of each sub-byte data of the multi-frame data, and generating frame data; the header identification flag is used for marking whether the byte data contains pixel data; the multi-frame mark is used for identifying whether the byte data is multi-frame data or not;
and when the byte number of the byte data does not exceed the preset maximum byte number of one frame of data, the byte data is single-frame data, and the single-frame data is converted into a data frame format based on a frame data mark formed by the characteristic value, the multi-frame mark and the head identification mark of the single-frame data to generate frame data.
3. The video encoding and decoding method for recording multi-dimensional data according to claim 2, wherein the superimposing the frame data onto the first video frame according to a predetermined pixel arrangement to obtain a second video frame comprises:
selecting a preset pixel arrangement mode of pixel points of the frame data based on the video format and the storage mode of the first video frame; the preset pixel arrangement mode of the pixel points comprises a single-pixel representation method and a multi-pixel joint representation method;
converting the frame data into a pixel array based on a preset pixel arrangement mode of the pixel points; the pixel array represents digitized information of the real-time data;
and superposing the pixel array on the first video frame to obtain the second video frame.
4. The video encoding and decoding method for recording multi-dimensional data according to claim 1, wherein parsing the real-time data from the second video frame in response to a predetermined command comprises:
responding to a preset instruction, and reading the second video frame;
and extracting the real-time data from the second video frame based on the preset pixel arrangement mode.
5. The video encoding/decoding method for recording multi-dimensional data according to claim 4, wherein said extracting the real-time data from the second video frame based on the predetermined pixel arrangement comprises:
when the characteristic value of the frame data mark in the second video frame is different from the characteristic value of the frame data mark in the video frame of the previous frame, restoring the pixel array in the second video frame into frame data according to the rule of the preset pixel arrangement mode to obtain first restored frame data;
and extracting the real-time data based on the first restored frame data.
6. The video encoding/decoding method for recording multi-dimensional data according to claim 5, wherein said extracting the real-time data based on the first restored frame data comprises:
judging whether the first restoration frame data is correctly restored or not based on the characteristic value of the first restoration frame data;
if the first restored frame data is correctly restored, identifying whether the first restored frame data is a plurality of single frame data;
if the first restored frame data is a plurality of single frame data, merging each single frame data of the first restored frame data to obtain second restored frame data;
and extracting the real-time data based on the second restored frame data to obtain the digital information of the real-time data.
7. The video encoding and decoding method for recording multi-dimensional data according to claim 1, wherein the frame data is stored in the same frame as the second video frame when the second video frame is saved.
8. The video encoding and decoding method for recording multi-dimensional data according to claim 3, wherein the single-pixel representation method includes a black-and-white binary color pixel representation method, a gray-scale color pixel representation method, a 256-color pixel representation method, and a 24-bit true-color pixel representation method;
the multi-pixel joint representation method comprises the step of combining a preset number of adjacent pixel points into one data point, wherein the pixel representation utilizes the pixel representation method, the gray color pixel representation method, the 256 color pixel representation method and the 24-bit true color pixel representation method.
9. A video encoding/decoding apparatus for recording multi-dimensional data, comprising:
the acquisition module is used for acquiring real-time data corresponding to the first video frame when the first video frame is acquired; the real-time data comprises information of acquisition equipment for acquiring the first video frame and environment information of the environment where the acquisition equipment is located;
the data splicing module is used for splicing the real-time data into byte data according to a preset format;
the format conversion module is used for converting the byte data into a data frame format to generate frame data;
the pixel superposition module is used for superposing the frame data on the first video frame according to a preset pixel arrangement mode to obtain a second video frame and storing the second video frame;
and the analysis module is used for responding to a preset instruction and analyzing the real-time data from the second video frame.
10. A terminal device comprising a memory and a processor, the memory having stored therein a computer program operable on the processor, wherein the processor, when executing the computer program, implements a video codec method for recording multi-dimensional data according to any one of claims 1 to 8.
CN202211635283.8A 2022-12-19 2022-12-19 Video coding and decoding method and device for recording multi-dimensional data and terminal equipment Pending CN115883864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211635283.8A CN115883864A (en) 2022-12-19 2022-12-19 Video coding and decoding method and device for recording multi-dimensional data and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211635283.8A CN115883864A (en) 2022-12-19 2022-12-19 Video coding and decoding method and device for recording multi-dimensional data and terminal equipment

Publications (1)

Publication Number Publication Date
CN115883864A true CN115883864A (en) 2023-03-31

Family

ID=85753983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211635283.8A Pending CN115883864A (en) 2022-12-19 2022-12-19 Video coding and decoding method and device for recording multi-dimensional data and terminal equipment

Country Status (1)

Country Link
CN (1) CN115883864A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000092461A (en) * 1998-09-10 2000-03-31 Sony Corp Additional information superimposing method and video signal output device
JP2006227330A (en) * 2005-02-18 2006-08-31 Dainippon Printing Co Ltd Embedding device/method of information to audio signals, extraction device/method of information from audio signals
CN102223487A (en) * 2011-07-21 2011-10-19 杭州海康威视数字技术股份有限公司 Method and device for storing and playing additional information in video code stream
CN102263987A (en) * 2010-05-31 2011-11-30 佳能株式会社 Image processing apparatus and control method thereof
WO2013150724A1 (en) * 2012-04-03 2013-10-10 パナソニック株式会社 Transmitting device, reproducing device, and transmitting and receiving method
US20180150967A1 (en) * 2015-05-26 2018-05-31 Obschestvo S Ogranichennoi Otvetstvennostyu "Laboratoria 24" Entity visualization method
CN112950951A (en) * 2021-01-29 2021-06-11 浙江大华技术股份有限公司 Intelligent information display method, electronic device and storage medium
CN114205649A (en) * 2021-12-08 2022-03-18 无锡英菲感知技术有限公司 Image data processing method, device, equipment and storage medium
CN115086572A (en) * 2022-06-29 2022-09-20 浙江大华技术股份有限公司 Image transmission method and device and electronic equipment
WO2022193244A1 (en) * 2021-03-18 2022-09-22 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method of embedding additional data onto raw pixel data and electronic device
US20220383443A1 (en) * 2021-05-31 2022-12-01 Canon Kabushiki Kaisha Digital watermark analysis apparatus and digital watermark analysis method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000092461A (en) * 1998-09-10 2000-03-31 Sony Corp Additional information superimposing method and video signal output device
JP2006227330A (en) * 2005-02-18 2006-08-31 Dainippon Printing Co Ltd Embedding device/method of information to audio signals, extraction device/method of information from audio signals
CN102263987A (en) * 2010-05-31 2011-11-30 佳能株式会社 Image processing apparatus and control method thereof
CN102223487A (en) * 2011-07-21 2011-10-19 杭州海康威视数字技术股份有限公司 Method and device for storing and playing additional information in video code stream
WO2013150724A1 (en) * 2012-04-03 2013-10-10 パナソニック株式会社 Transmitting device, reproducing device, and transmitting and receiving method
US20180150967A1 (en) * 2015-05-26 2018-05-31 Obschestvo S Ogranichennoi Otvetstvennostyu "Laboratoria 24" Entity visualization method
CN112950951A (en) * 2021-01-29 2021-06-11 浙江大华技术股份有限公司 Intelligent information display method, electronic device and storage medium
WO2022193244A1 (en) * 2021-03-18 2022-09-22 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method of embedding additional data onto raw pixel data and electronic device
US20220383443A1 (en) * 2021-05-31 2022-12-01 Canon Kabushiki Kaisha Digital watermark analysis apparatus and digital watermark analysis method
CN114205649A (en) * 2021-12-08 2022-03-18 无锡英菲感知技术有限公司 Image data processing method, device, equipment and storage medium
CN115086572A (en) * 2022-06-29 2022-09-20 浙江大华技术股份有限公司 Image transmission method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李武森;迟泽英;陈文建;: "一种新型视频图像压缩存储系统", 南京理工大学学报(自然科学版), no. 05, 30 October 2007 (2007-10-30) *

Similar Documents

Publication Publication Date Title
CN109858371B (en) Face recognition method and device
CN109409238B (en) Obstacle detection method and device and terminal equipment
CN111898416A (en) Video stream processing method and device, computer equipment and storage medium
CN111627215A (en) Video image identification method based on artificial intelligence and related equipment
CN109116129B (en) Terminal detection method, detection device, system and storage medium
CN108563651B (en) Multi-video target searching method, device and equipment
CN114373189A (en) Behavior detection method and apparatus, terminal device and storage medium
CN113011254B (en) Video data processing method, computer equipment and readable storage medium
CN111523388A (en) Method and device for associating non-motor vehicle with person and terminal equipment
WO2022222445A1 (en) Event detection output method, event policy determination method and apparatus, electronic device, and computer-readable storage medium
CN113963162A (en) Helmet wearing identification method and device, computer equipment and storage medium
CN112712005B (en) Training method of recognition model, target recognition method and terminal equipment
CN111898448B (en) Pedestrian attribute identification method and system based on deep learning
CN115883864A (en) Video coding and decoding method and device for recording multi-dimensional data and terminal equipment
JP2019050553A (en) Image processing apparatus, image providing apparatus, control method of the same, and program
CN112291538A (en) Video monitoring data storage method and device
CN116057570A (en) Machine learning device and image processing device
CN111985304A (en) Patrol alarm method, system, terminal equipment and storage medium
CN109977891A (en) A kind of object detection and recognition method neural network based
CN114491648B (en) Block chain data privacy protection method for video live broadcast social big data
CN107592297B (en) Method, system and terminal equipment for mobile detection
CN215186950U (en) Pedestrian red light running behavior evidence acquisition device based on face recognition technology
CN110798656A (en) Method, device, medium and equipment for processing monitoring video file
CN113099264A (en) Block chain monitoring video tamper-proof method and system based on global features
WO2019093561A1 (en) Apparatus and method for preventing forgery/falsification of video data

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