Method and device for synchronizing AR (Augmented Reality) label data in video stream and electronic equipment
By storing the AR tag data in the extended field of the encoded frame in the video stream, and determining the storage data type according to the encoded frame type, the problem of the separation of the AR tag data and the video data is solved, and the synchronous display of the AR tag data and the video data is realized. and high reliability display.
Patent Information
- Application Number
- CN202310444638.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2024-10-22
AI Technical Summary
In the existing technology, AR tag data and video data are stored separately, resulting in AR tag data and video data being separated and unable to be displayed simultaneously, which reduces the reliability of AR tag data.
During the encoding process of the video stream, the AR tag data is stored in the extension field of the encoded frame, and the stored AR tag data type is determined according to the type of the encoded frame (key frame, forward prediction frame, bidirectional interpolation frame, etc.), and During the decoding process, the AR tag data and video data are decoded and displayed synchronously.
It realizes the synchronous display of AR tag data and video data, improves the reliability of AR tag data, and maintains the codec compatibility of video data.
Smart Images

Figure CN118828087A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing technology, and in particular to a method, device and electronic device for synchronizing AR tag data in a video stream. Background Art
[0002] At present, AR tag data of the target object is usually added to the video. The AR tag data records the properties of the target object, such as name, geographic location, introduction, characteristics, etc. When playing the video, the AR tag data is played synchronously with the video, making it convenient for users to view the AR tag data of the target object in real time.
[0003] In the related art, AR tag data and video data are usually stored separately. The client first displays the video data, then reads the AR tag data from the database, and overlays the AR tag data on the playback window of the video data for display.
[0004] However, in the above-mentioned related technologies, AR tag data and video data are stored separately, resulting in the separation of AR tag data from video data. Thus, if the AR tag data cannot be read when displaying video data, the AR tag data display will fail, thereby reducing the reliability of the AR tag data display. Summary of the invention
[0005] In view of the problems existing in the prior art, embodiments of the present invention provide a method, device and electronic device for synchronizing AR tag data in a video stream.
[0006] The present invention provides a method for synchronizing AR tag data in a video stream, which is applied to an encoder. The method includes:
[0007] Encode the video stream to obtain an initial encoded frame sequence;
[0008] Determining target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence;
[0009] Storing each of the target AR tag data in an extended field corresponding to the coded frame to obtain a target coded frame sequence;
[0010] The target coded frame sequence is sent to a decoder.
[0011] According to a method for synchronizing AR tag data in a video stream provided by the present invention, when the type of the coded frame is a key frame type, the target AR tag data is full AR tag data;
[0012] The storing each of the target AR tag data into an extension field corresponding to the coded frame includes:
[0013] The full amount of AR tag data is stored in the extension field of the corresponding key frame.
[0014] According to a method for synchronizing AR tag data in a video stream provided by the present invention, when the type of the coded frame is a forward prediction frame type, the target AR tag data is first changed AR tag data relative to the first AR tag data; the first AR tag data is AR tag data corresponding to a forward prediction frame or a key frame that is before the forward prediction frame and closest to the forward prediction frame;
[0015] The storing each of the target AR tag data into an extension field corresponding to the coded frame includes:
[0016] The first changed AR tag data is stored in the corresponding forward prediction frame.
[0017] According to a method for synchronizing AR tag data in a video stream provided by the present invention, when the type of the coded frame is a bidirectional interpolation frame type, the target AR tag data is second changed AR tag data relative to the second AR tag data and the third AR tag data; the second AR tag data is AR tag data corresponding to a forward prediction frame or a key frame that is before the bidirectional interpolation frame and closest to the bidirectional interpolation frame; the third AR tag data is AR tag data corresponding to AR tag data corresponding to a forward prediction frame or a key frame that is after the bidirectional interpolation frame and closest to the bidirectional interpolation frame;
[0018] The storing each of the target AR tag data into an extension field corresponding to the coded frame includes:
[0019] The second changed AR tag data is stored in the corresponding bidirectional interpolation frame.
[0020] According to a method for synchronizing AR tag data in a video stream provided by the present invention, storing each target AR tag data in an extended field corresponding to the coded frame to obtain a target coded frame sequence includes:
[0021] Determine a first target key frame corresponding to a preset time, and store each target AR tag data in an extended field of the corresponding first target key frame to obtain the target coded frame sequence;
[0022] or,
[0023] Determine at least one second target key frame, determine the relative position between other key frames and their respective previous second target key frames, store each of the target AR tag data in an extended field of the corresponding second target key frame, and store the corresponding relative position in the extended field of each of the other key frames.
[0024] According to a method for synchronizing AR tag data in a video stream provided by the present invention, the target tag data includes tag display parameters; the tag display parameters corresponding to each of the encoded frames are general tag display parameters or specific tag display parameters.
[0025] The present invention also provides a method for synchronizing AR tag data in a video stream, which is applied to a decoder. The method comprises:
[0026] Receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream;
[0027] Determine the video data and full AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame;
[0028] The full amount of AR tag data is superimposed on the corresponding video data to obtain a target video stream, and the target video stream is displayed.
[0029] According to a method for synchronizing AR tag data in a video stream provided by the present invention, the method further includes:
[0030] Determine a target time corresponding to at least one target key frame on a time axis corresponding to the target video stream; the extended field of each target key frame stores full AR tag data;
[0031] The identification information corresponding to each of the target moments is set on the time axis.
[0032] The present invention also provides a device for synchronizing AR tag data in a video stream, the device comprising:
[0033] An encoding unit, used for encoding the video stream to obtain an initial encoding frame sequence;
[0034] A first determining unit, configured to determine target AR tag data corresponding to each coded frame based on a type of each coded frame in the initial coded frame sequence;
[0035] A storage unit, configured to store each of the target AR tag data into an extension field corresponding to the coded frame to obtain a target coded frame sequence;
[0036] A sending unit is used to send the target coded frame sequence to a decoder.
[0037] The present invention also provides a device for synchronizing AR tag data in a video stream, the device comprising:
[0038] a receiving unit, configured to receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream;
[0039] A second determining unit, configured to determine the video data and the full amount of AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame;
[0040] The display unit is used to superimpose the full amount of AR tag data on the corresponding video data to obtain a target video stream, and display the target video stream.
[0041] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for synchronizing AR tag data in a video stream as described in any one of the above is implemented.
[0042] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for synchronizing AR tag data in a video stream as described in any one of the above.
[0043] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the method for synchronizing AR tag data in a video stream as described in any one of the above.
[0044] The method, device and electronic device for synchronizing AR tag data in a video stream provided by the present invention determine the target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence obtained by encoding the video stream, store each target AR tag data in the extended field of the corresponding coded frame, and send the obtained target coded frame sequence to the decoder, so that the decoder obtains the video data and AR tag data corresponding to each coded frame based on the target coded frame sequence. The present invention stores the corresponding AR tag data in the extended field of each coded frame, so that the decoder can obtain the corresponding AR tag data while decoding the video data, so that the video data and the corresponding AR tag data can be displayed at the same time, thereby improving the reliability of the display of the AR tag data. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 It is one of the schematic diagrams of the message structure provided by the embodiment of the present invention;
[0047] Figure 2 This is the second schematic diagram of the message structure provided by the embodiment of the present invention;
[0048] Figure 3 This is the third schematic diagram of the message structure provided by the embodiment of the present invention;
[0049] Figure 4 This is one of the flowcharts of the method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention;
[0050] Figure 5 is a schematic diagram of an image provided by an embodiment of the present invention;
[0051] Figure 6 is a schematic diagram of storing AR tag data in a coding frame provided by an embodiment of the present invention;
[0052] Figure 7 This is a second flow chart of the method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention;
[0053] Figure 8 is an interactive diagram of a method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention;
[0054] Fig. 9 This is one of the structural schematic diagrams of the device for synchronizing AR tag data in a video stream provided by an embodiment of the present invention;
[0055] Fig.10 This is a second structural diagram of the device for synchronizing AR tag data in a video stream provided by an embodiment of the present invention;
[0056] Fig.11 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The encoding (compression) of the video is carried out in "groups", each group is called a Group of Picture (GOP), which represents a group of continuous pictures. GOP consists of an I frame and several B / P frames, and is the basic unit for video image encoders and decoders to access. Its arrangement order will be repeated until the end of the image. Among them, I frame is an internal coding frame, also known as a key frame, P frame is a forward prediction frame, also known as a forward reference frame, and B frame is a bidirectional interpolation frame, also known as a bidirectional reference frame. Simply put, I frame is a complete picture, while P frame and B frame record the changes relative to I frame. Without I frame, P frame and B frame cannot be decoded.
[0059] In the H.264 compression standard, I-frames, P-frames, and B-frames are used to represent transmitted video images. An I-frame is an independent frame that carries all the information and can be decoded independently without referring to other images. It can be simply understood as a static picture. The first frame in a video sequence is always an I-frame because it is a key frame. Figure 1 is one of the schematic diagrams of the message structure provided by the embodiment of the present invention, such as Figure 1 As shown, the first frame is an I frame.
[0060] P frames need to refer to the previous I frame or P frame to be encoded, which means the difference between the current frame and the previous I frame or the previous P frame. When decoding, the difference defined by the current frame needs to be superimposed with the previously cached picture to generate the final picture. Compared with I frames, P frames usually occupy fewer data bits, but the disadvantage is that P frames are very sensitive to transmission errors because they have complex dependencies on the previous P frames or I frames. Figure 2 This is a second schematic diagram of a message structure provided by an embodiment of the present invention, such as Figure 2 As shown, the first P frame needs to be encoded with reference to the previous I frame, the second P frame needs to be encoded with reference to the first P frame, and the third P frame needs to be encoded with reference to the second P frame.
[0061] The B frame records the difference between the current frame and the previous P frame or the previous I frame, and the difference between the current frame and the next P frame or the next I frame. In other words, to decode a B frame, it is necessary not only to obtain the previous cached picture, but also to obtain the picture after decoding, and to obtain the final picture by superimposing the previous and next pictures with the current frame data. The B frame has a high compression rate, but it has high requirements on decoding performance. Figure 3 This is a third schematic diagram of a message structure provided by an embodiment of the present invention, such as Figure 3 As shown, the first B frame needs to be encoded with reference to the previous I frame and the next P frame, and the second B frame needs to be encoded with reference to the previous I frame and the next P frame.
[0062] Combine the following Figure 4-Figure 8 The present invention describes a method for synchronizing augmented reality (AR) tag data in a video stream.
[0063] Figure 4 is one of the flow charts of the method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention, which is applied to an encoder. The encoder can be configured in a first electronic device, such as Figure 4 As shown, the method for synchronizing AR tag data in the video stream includes the following steps:
[0064] Step 401: Encode the video stream to obtain an initial encoded frame sequence.
[0065] For example, the encoder may encode the video stream based on the video format H.264 format or H.265 format to obtain an initial coded frame sequence including a plurality of coded frames, and corresponding video data is stored in a common field of each coded frame.
[0066] Step 402: Determine target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence.
[0067] For example, when an initial coding frame sequence is obtained, since the coding frames included in the initial coding frame sequence may be key frames (I frames), forward prediction frames (P frames), and bidirectional interpolation frames (B frames), etc., and each type of coding frame has a different coding method, the target AR tag data that needs to be stored in each coding frame can be determined based on the type of each coding frame.
[0068] Step 403: Store each of the target AR tag data into an extension field corresponding to the coded frame to obtain a target coded frame sequence.
[0069] For example, when it is determined that the target AR tag data needs to be stored in each coding frame, the target AR tag data is stored in the extended field of the corresponding coding frame, that is, the private field of the coding frame. After each target AR tag data is stored in the extended field of the corresponding coding frame, a target coding frame sequence is obtained. The common field of each coding frame in the target coding frame sequence stores the corresponding video data, and the private field stores the target AR tag data corresponding to the video data.
[0070] Step 404: Send the target coded frame sequence to a decoder.
[0071] For example, when the target coded frame sequence is obtained by encoding, the target coded frame sequence can be sent to the decoder, and the decoder decodes each coded frame in the target coded frame sequence based on the video format adopted by the encoder to obtain the video data and AR tag data corresponding to each coded frame, and superimposes the AR tag data on the corresponding video data for display.
[0072] The method for synchronizing AR tag data in a video stream provided by the present invention determines the target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence obtained by encoding the video stream, stores each target AR tag data in the extension field of the corresponding coded frame, and sends the obtained target coded frame sequence to the decoder, so that the decoder obtains the video data and AR tag data corresponding to each coded frame based on the target coded frame sequence. The present invention stores the corresponding AR tag data in the extension field of each coded frame, so that the encoder can obtain the corresponding AR tag data while decoding the video data, so that the video data and the corresponding AR tag data can be displayed at the same time, thereby improving the reliability of the display of the AR tag data; in addition, storing the AR tag data in the extension field of each coded frame does not affect the encoding and decoding of the existing video data, and can maintain the compatibility of the second electronic device equipped with the decoder. If the second electronic device equipped with the decoder supports the display of AR tag data, the AR tag data can be read and displayed from the extension field of each coded frame. If the second electronic device equipped with the decoder does not support the display of AR tag data, the video data can still be read and played normally from the extension field of each coded frame.
[0073] In one embodiment, when the type of the coded frame is a key frame type, the target AR tag data is full AR tag data; the above step 403 may be specifically implemented in the following manner:
[0074] The full amount of AR tag data is stored in the extension field of the corresponding key frame.
[0075] The full amount of AR tag data includes all AR tag data of each target object in the key frame, and the AR tag data of the target object may include at least one of the following: tag version information, tag display coordinates, tag display parameters, tag content, target object identification information, target object moving direction and target object moving speed. The tag content can be set based on the target object. For example, if the target object is a vehicle, the tag content can be the vehicle license plate information, vehicle model information, vehicle configuration information, etc. Figure 5 is a schematic diagram of an image provided by an embodiment of the present invention, such as Figure 5 As shown, the label content corresponding to the shopping mall in the image can be basic information, floor distribution, Internet cafe video, emergency plan and management personnel, etc.
[0076] For example, when the type of the encoded frame is a key frame type, the AR tag data of each target object in the corresponding picture can be recorded in the key frame. Therefore, when the AR tag data corresponding to the key frame is obtained, all data in the AR tag data corresponding to the key frame can be used as target AR tag data, that is, the full amount of tag data corresponding to the key frame can be used as target AR tag data, and the target AR tag data can be stored in the extended field of the key frame. For example, the screen corresponding to the key frame needs to display vehicle label 1, vehicle label 2 and person label 3, wherein the AR label data of vehicle label 1 may include: label version information 1, identification information CarID1, display coordinates 11, vehicle label style 1, label content 11, vehicle moving direction 11, vehicle moving speed 11; the AR label data of vehicle label 2 may include: label version information 1, identification information CarID2, display coordinates 21, vehicle label style 1, label content 21, vehicle moving direction 21, vehicle moving speed 21; the AR label data of person label 3 may include: label version information 2, identification information PersonID1, display coordinates 31, person label style 2, label content 31, person moving direction 31, person moving speed 31. The label style is reflected by the label display parameters.
[0077] It should be noted that, considering the continuity of the targets in the video stream, the identification information of the target can be added to the AR tag data, and the encoded frame can correspond to the same target based on the identification information; in addition, the tag version information is added to the AR tag data so that the decoder can determine the AR tag data that can be displayed based on the tag version information and the decoder version information, or when it is determined that the decoder version is lower based on the decoder version information and the tag version information, the decoder version can be upgraded based on the tag version information so that the decoder can display all AR tag data, thereby achieving the decoder's compatibility with different AR tag data.
[0078] The method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention can record the AR tag data of each target object in the corresponding picture in the extended field of the key frame when the type of the encoded frame is a key frame type, that is, record the full AR tag data in the extended field of the key frame to ensure that the decoder can read the full AR tag data in the key frame.
[0079] In one embodiment, when the type of the coded frame is a forward prediction frame type, the target AR tag data is first changed AR tag data relative to the first AR tag data; the first AR tag data is AR tag data corresponding to a forward prediction frame or a key frame that is before the forward prediction frame and closest to the forward prediction frame; the above step 403 may be specifically implemented in the following manner:
[0080] The first changed AR tag data is stored in the corresponding forward prediction frame.
[0081] For example, when the type of the encoded frame is a forward prediction frame type, the difference between the picture corresponding to the forward prediction frame and the picture corresponding to the previous key frame or the previous forward prediction frame that is closest to the forward prediction frame can be recorded in the forward prediction frame; therefore, when the AR tag data corresponding to the forward prediction frame is obtained, the first change AR tag data of the AR tag data corresponding to the forward prediction frame relative to the first AR tag data can be used as the target AR tag data, and the target AR tag data can be stored in the extended field of the forward prediction frame, wherein the first AR tag data is the AR tag data corresponding to the forward prediction frame or the key frame that is closest to the forward prediction frame before the forward prediction frame.
[0082] For example, the picture corresponding to the forward prediction frame needs to display vehicle label 1', vehicle label 2' and personnel label 3', wherein the AR label data of vehicle label 1' includes: label version information 1, identification information CarID1, display coordinates 12, vehicle label style 1, label content 11, vehicle moving direction 12, vehicle moving speed 12; the AR label data of vehicle label 2' includes: label version information 1, identification information CarID2, display coordinates 22, vehicle label style 1, label content 21, vehicle moving direction 22, vehicle moving speed 22; the AR label data of personnel label 3' includes: label version information 2, identification information PersonID1, display coordinates 31, personnel label style 2, label content 31, personnel moving direction 31, personnel moving speed 31.
[0083] The picture corresponding to the previous key frame of the forward prediction frame displays vehicle label 1, vehicle label 2 and person label 3, among which the AR label data of vehicle label 1 includes: label version information 1, identification information CarID1, display coordinates 11, vehicle label style 1, label content 11, vehicle moving direction 11, and vehicle moving speed 11; the AR label data of vehicle label 2 includes: label version information 1, identification information CarID2, display coordinates 21, vehicle label style 1, label content 21, vehicle moving direction 21, and vehicle moving speed 21; the AR label data of person label 3 includes: label version information 2, identification information PersonID1, display coordinates 31, person label style 2, label content 31, person moving direction 31, and person moving speed 31.
[0084] It can be concluded that the difference between vehicle tag 1' and vehicle tag 1 is: display coordinates 12, vehicle moving direction 12, vehicle moving speed 12, the difference between vehicle tag 2' and vehicle tag 2 is: display coordinates 22, vehicle moving direction 22, vehicle moving speed 22, and there is no difference between personnel tag 3' and personnel tag 3, then the first change AR tag data includes the difference data between vehicle tag 1' and vehicle tag 1, and the difference data between vehicle tag 2' and vehicle tag 2; in addition, in order to correspond to the same target object in different frames, the identification information of each target object can also be added to the first change AR tag data, then the first change AR tag data includes: CarID1, display coordinates 12, vehicle moving direction 12, vehicle moving speed 12; CarID2, display coordinates 22, vehicle moving direction 22 and vehicle moving speed 22.
[0085] It should be noted that when a new type of target object appears in the picture corresponding to the forward prediction frame, display parameters of this type of target object can be defined, and the present invention does not limit this.
[0086] The method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention, when the type of the encoded frame is a forward prediction frame type, can record the difference data between the picture corresponding to the forward prediction frame and the picture corresponding to the previous key frame or the previous forward prediction frame closest to the forward prediction frame in the extended field of the forward prediction frame, so that the decoder can read the difference data in the forward prediction frame, and obtain the full AR tag data corresponding to the forward prediction frame based on the difference data and the picture of the previous key frame or the previous forward prediction frame.
[0087] In one embodiment, when the type of the coded frame is a bidirectional interpolation frame type, the target AR tag data is second changed AR tag data relative to the second AR tag data and the third AR tag data; the second AR tag data is AR tag data corresponding to a forward prediction frame or a key frame that is before the bidirectional interpolation frame and closest to the bidirectional interpolation frame; the third AR tag data is AR tag data corresponding to AR tag data corresponding to a forward prediction frame or a key frame that is after the bidirectional interpolation frame and closest to the bidirectional interpolation frame; the above step 403 may be specifically implemented in the following manner:
[0088] The second changed AR tag data is stored in the corresponding bidirectional interpolation frame.
[0089] For example, when the type of the encoded frame is a bidirectional interpolation frame type, the difference between the picture corresponding to the bidirectional interpolation frame and the picture corresponding to the previous key frame or the previous forward predicted frame closest to the bidirectional interpolation frame, as well as the difference between the picture corresponding to the bidirectional interpolation frame and the picture corresponding to the next key frame or the next forward predicted frame closest to the bidirectional interpolation frame can be recorded in the bidirectional interpolation frame; therefore, when the AR tag data corresponding to the bidirectional interpolation frame is obtained, the second change AR tag data of the AR tag data corresponding to the bidirectional interpolation frame relative to the second AR tag data and the third AR tag data can be used as the target AR tag data, and the target AR tag data is stored in the extended field of the bidirectional interpolation frame, wherein the second AR tag data is the AR tag data corresponding to the forward predicted frame or key frame that is before the bidirectional interpolation frame and is closest to the bidirectional interpolation frame, and the third AR tag data is the AR tag data corresponding to the forward predicted frame or key frame that is after the bidirectional interpolation frame and is closest to the bidirectional interpolation frame.
[0090] For example, the picture corresponding to the bidirectional interpolation frame needs to display vehicle label 1", vehicle label 2" and person label 3", among which the AR label data of vehicle label 1" includes: label version information 1, identification information CarID1, display coordinates 11, vehicle label style 1, label content 11, vehicle moving direction 11, vehicle moving speed 11; the AR label data of vehicle label 2" includes: label version information 1, identification information CarID2, display coordinates 21, vehicle label style 1, label content 21, vehicle moving direction 21, vehicle moving speed 21; the AR label data of person label 3" includes: label version information 2, identification information PersonID1, display coordinates 32, person label style 2, label content 31, person moving direction 32, person moving speed 31.
[0091] The screen corresponding to the previous key frame of the bidirectional interpolation frame displays vehicle label 1, vehicle label 2 and person label 3, wherein the AR label data of vehicle label 1 includes: label version information 1, identification information CarID1, display coordinates 11, vehicle label style 1, label content 11, vehicle moving direction 11, and vehicle moving speed 11; the AR label data of vehicle label 2 includes: label version information 1, identification information CarID2, display coordinates 21, vehicle label style 1, label content 21, vehicle moving direction 21, and vehicle moving speed 21; the AR label data of person label 3 includes: label version information 2, identification information PersonID1, display coordinates 31, person label style 2, label content 31, person moving direction 31, and person moving speed 31.
[0092] The picture corresponding to the next forward prediction frame of the bidirectional interpolation frame displays vehicle label 1'", vehicle label 2' and personnel label 3', wherein the AR label data of vehicle label 1' includes: label version information 1, identification information CarID1, display coordinates 11, vehicle label style 1, label content 11, vehicle moving direction 11, vehicle moving speed 11; the AR label data of vehicle label 2' includes: label version information 1, identification information CarID2, display coordinates 21, vehicle label style 1, label content 21, vehicle moving direction 21, vehicle moving speed 21; the AR label data of personnel label 3' includes: label version information 2, identification information PersonID1, display coordinates 32, personnel label style 2, label content 31, personnel moving direction 32, personnel moving speed 32.
[0093] It can be concluded that vehicle tag 1” is no different from vehicle tag 1 and vehicle tag 1”’, vehicle tag 2” is no different from vehicle tag 1 and vehicle tag 2”’, the difference between personnel tag 3” and personnel tag 3 is the display coordinates 32 and the personnel moving direction 32, and the difference between personnel tag 3” and personnel tag 3”’ is the personnel moving speed 32. In addition, in order to correspond to the same target object in different frames, the identification information of each target object can be added to the second change AR tag data. The second change AR tag data includes: identification information PersonID1, display coordinates 32, personnel moving direction 32 and personnel moving speed 32.
[0094] The method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention can record, in the bidirectional interpolation frame, difference data between a picture corresponding to the bidirectional interpolation frame and a picture corresponding to the previous key frame or the previous forward prediction frame closest to the bidirectional interpolation frame, as well as difference data between a picture corresponding to the bidirectional interpolation frame and a picture corresponding to the next key frame or the next forward prediction frame closest to the bidirectional interpolation frame, when the type of the encoded frame is a bidirectional interpolation frame type, so that a decoder can read the difference data in the bidirectional interpolation frame, and obtain the full amount of AR tag data corresponding to the bidirectional interpolation frame based on the difference data and the pictures of the previous and next key frames or forward prediction frames.
[0095] In one embodiment, the above step 403 may be implemented in the following manner:
[0096] Determine a first target key frame corresponding to a preset time, and store each target AR tag data in an extended field of the corresponding first target key frame to obtain the target coded frame sequence;
[0097] or,
[0098] Determine at least one second target key frame, determine the relative position between other key frames and their respective previous second target key frames, store each of the target AR tag data in an extended field of the corresponding second target key frame, and store the corresponding relative position in the extended field of each of the other key frames.
[0099] For example, in order to reduce redundant storage of AR tag data, full AR tag data is not stored in each key frame, but full AR tag data is saved in some target key frames, and other key frames refer to the full AR tag data of the corresponding target key frames; specifically, in the first way, full AR tag data, that is, target AR tag data, is stored in the extended field of the first target key frame corresponding to each preset time; other key frames except the first target key frame in the initial coded frame sequence do not store full AR tag data, and when decoding other key frames, the decoder can read the AR tag data in the last key frame closest to the other key frames that stores the full AR tag data. R tag data; for example, each preset moment can be each full minute moment, that is, the 0th minute moment, the 1st minute moment, the 2nd minute moment, etc.; the second method, the moment corresponding to the key frame is not fixed, and at least one second target key frame can be randomly determined, and the target AR tag data, that is, the full amount of AR tag data is stored in the extended field of each second target key frame, and the relative position between other key frames and their respective previous second target key frames is determined, and the corresponding relative position is stored in the extended field of other key frames. In this way, when the decoder decodes other key frames, it can read the AR tag data in the corresponding second target key frame based on the relative position in other key frames.
[0100] The method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention does not store full AR tag data in each key frame, but stores full AR tag data in some target key frames, and other key frames reference the full AR tag data of the corresponding target key frames to reduce redundant storage of AR tag data.
[0101] Figure 6 FIG. 1 is a schematic diagram of AR tag data stored in a coding frame according to an embodiment of the present invention. Figure 6 As shown, taking the IBBP frame as an example, the extended field of the I frame stores the first AR tag data IARInfo, that is, the full AR tag data; the extended field of the first B frame stores the second change AR tag data BARInfo1 relative to the I frame and the P frame; the extended field of the second B frame stores the second change AR tag data BARInfo2 relative to the I frame and the P frame; the extended field of the P frame stores the first change AR tag data PARInfo relative to the I frame.
[0102] In one embodiment, the target label data includes label display parameters; the label display parameters corresponding to each of the encoded frames are general label display parameters or specific label display parameters.
[0103] The general label display parameters are label display parameters that can be reused by the AR label data corresponding to each target object, and the specific label display parameters can be redefined parameters or parts that are different from the general label display parameters.
[0104] For example, considering that there may be many labels of target objects in the picture, the format of each label may be the same or different, so the general label display parameters can be defined first, that is, the AR label data corresponding to each target object can refer to the general label display parameters. If the label display parameters required by the target object are different from the general label display parameters, the new label display parameters are redefined, and the new label display parameters are the specific label display parameters; if the label display parameters required by the target object are partially the same as the general label display parameters, the difference is used as the specific label display parameters. The use of general label display parameters can greatly compress the amount of information in the AR label data and reduce the amount of information stored in each coded frame. For example, the general label display parameters can be defined as: the font of the text is font 1, the color of the text is color 1, and the size of the text is size 1; if the label display parameters required by the target object are: the font of the text is font 1, the color of the text is color 1, and the size of the text is size 2, then the specific label display parameters are: the size of the text is size 2.
[0105] It should be noted that corresponding universal label display parameters can also be defined for each type of target object. For example, the universal label display parameters of a vehicle are defined as follows: the font of the text is font 1, the color of the text is color 1, and the size of the text is size 1; the universal label display parameters of a building are defined as follows: the font of the text is font 2, the color of the text is color 2, and the size of the text is size 2. The present invention is not limited to this.
[0106] Figure 7 FIG. 2 is a flow chart of a method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention, which is applied to a decoder. The decoder can be configured in a second electronic device, such as Figure 7 As shown, the method for synchronizing AR tag data in the video stream includes the following steps:
[0107] Step 701, receiving a target coding frame sequence sent by an encoder; the target coding frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coding frame, and the target AR tag data is AR tag data corresponding to each coding frame determined based on the type of each coding frame in an initial coding frame sequence obtained by encoding a video stream.
[0108] Step 702: Based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame, determine the video data and full AR tag data corresponding to each coded frame.
[0109] For example, when receiving the target coded frame sequence, the decoder can decode each coded frame in the target coded frame sequence based on the video format adopted by the encoder. Specifically, it needs to decode each coded frame based on the type of each coded frame and the target AR tag data stored in each coded frame to obtain the video data and full AR tag data corresponding to each coded frame; Figure 6 As shown, the decoder can read the full AR tag data IARInfo from the I frame; read the second change AR tag data BARInfo1 from the first B frame, and synthesize the full AR tag data of the first B frame based on the IARInfo in the I frame and the full AR tag data corresponding to the P frame; read the second change AR tag data BARInfo2 from the second B frame, and synthesize the full AR tag data of the second B frame based on the IARInfo in the I frame and the full AR tag data corresponding to the P frame; read the first change AR tag data PARInfo from the P frame, and synthesize the full AR tag data of the P frame based on the IARInfo in the I frame.
[0110] Step 703: superimpose the full amount of AR tag data on the corresponding video data to obtain a target video stream, and display the target video stream.
[0111] For example, when the video data and full AR tag data corresponding to each coded frame are decoded, the full AR tag data can be superimposed on the video layer displaying the video data for display. The specific display can be based on the label display parameters in the AR tag data corresponding to each coded frame. For example, the label display parameters are the font of the text is font 1, the color of the text is color 1, and the size of the text is size 1, then the corresponding AR tag data is displayed in font 1, color 1, and size 1.
[0112] It should be noted that when displaying the full amount of AR tag data, it can also be displayed based on user needs. For example, the user sets that only AR tag data about the vehicle needs to be displayed, and the full amount of AR tag data includes AR tag data about the vehicle and personnel, then only AR tag data about the vehicle will be displayed.
[0113] It should be noted that, since the full AR tag data includes tag version information, when the decoder reads the tag version information, it determines the AR tag data that can be displayed based on the tag version information and the version information of the decoder. For example, the decoder version only supports the display of AR tag data about vehicles, and the full AR tag data includes AR tag data about vehicles and personnel, then the decoder displays the AR tag data about vehicles; alternatively, when the decoder determines that the version of the decoder is lower based on the decoder version information and the tag version information, the decoder version can be upgraded based on the tag version information so that the decoder can display all the full AR tag data, thereby achieving the decoder's compatibility with different AR tag data.
[0114] The method for synchronizing AR tag data in a video stream provided by the present invention comprises the following steps: a decoder receives a target coding frame sequence sent by an encoder, the target coding frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coding frame, the target AR tag data is the AR tag data corresponding to each coding frame determined based on the type of each coding frame in an initial coding frame sequence obtained by encoding the video stream, and the decoder obtains the video data and AR tag data corresponding to each coding frame based on the target coding frame sequence. The present invention stores the corresponding AR tag data in the extended field of each coding frame, so that the decoder can obtain the corresponding AR tag data while decoding the video data, so that the video data and the corresponding AR tag data can be displayed simultaneously, thereby improving the reliability of the display of the AR tag data.
[0115] In one embodiment, the method for synchronizing AR tag data in the video stream further includes the following steps:
[0116] Determine a target time corresponding to at least one target key frame on a time axis corresponding to the target video stream; the extended field of each target key frame stores full AR tag data;
[0117] The identification information corresponding to each of the target moments is set on the time axis.
[0118] For example, a target moment corresponding to at least one target key frame storing full AR tag data can be determined on the timeline corresponding to the target video stream, and identification information corresponding to each target moment can be set on the timeline. The identification information can be a circle of a preset color or a preset shape, etc. In this way, when playing the video stream, the user can click on the moment corresponding to the identification information to obtain and display the full AR tag data.
[0119] It should be noted that when the full AR tag data is not stored in all key frames, the user may not be able to obtain the full AR tag data when choosing to start playing the video data stream at a specific time. In this case, the incremental playback method can be adopted, that is, the decoder displays the AR tag data as long as it decodes it, and gradually superimposes the decoded AR tag data.
[0120] The method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention determines a target moment corresponding to at least one target key frame storing full AR tag data on a timeline corresponding to a target video stream, and sets identification information corresponding to each target moment on the timeline, so that a user can click on a key frame containing full AR tag data to start playback based on the identification information, thereby ensuring that the full AR tag data can be obtained.
[0121] Figure 8 is an interactive diagram of a method for synchronizing AR tag data in a video stream provided by an embodiment of the present invention, which is applied to an encoder and a decoder. The encoder can be configured in a first electronic device, and the decoder can be configured in a second electronic device, such as Figure 8 As shown, the method for synchronizing AR tag data in the video stream includes the following steps:
[0122] Step 801: Encode the video stream to obtain an initial encoded frame sequence.
[0123] Step 802: Determine target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence.
[0124] Step 803: Store each of the target AR tag data into an extension field corresponding to the coded frame to obtain a target coded frame sequence.
[0125] Step 804: Send the target coded frame sequence to a decoder.
[0126] Step 805 : Based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame, determine the video data and full AR tag data corresponding to each coded frame.
[0127] Step 806: superimpose the full amount of AR tag data on the corresponding video data to obtain a target video stream, and display the target video stream.
[0128] The following is a description of an apparatus for synchronizing AR tag data in a video stream provided by the present invention. The apparatus for synchronizing AR tag data in a video stream described below and the method for synchronizing AR tag data in a video stream described above can be referenced to each other.
[0129] Fig. 9 FIG. 1 is a schematic diagram of a structure of a device for synchronizing AR tag data in a video stream provided by an embodiment of the present invention. Fig. 9 As shown, the device 900 for synchronizing AR tag data in a video stream includes an encoding unit 901, a first determining unit 902, a storage unit 903, and a sending unit 904; wherein:
[0130] The encoding unit 901 is used to encode the video stream to obtain an initial encoding frame sequence;
[0131] A first determining unit 902 is configured to determine target AR tag data corresponding to each coded frame based on a type of each coded frame in the initial coded frame sequence;
[0132] A storage unit 903 is used to store each of the target AR tag data into an extension field corresponding to the coding frame to obtain a target coding frame sequence;
[0133] The sending unit 904 is configured to send the target coded frame sequence to a decoder.
[0134] The device for synchronizing AR tag data in a video stream provided by the present invention determines the target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence obtained by encoding the video stream, stores each target AR tag data in the extended field of the corresponding coded frame, and sends the obtained target coded frame sequence to the decoder, so that the decoder obtains the video data and AR tag data corresponding to each coded frame based on the target coded frame sequence. The present invention stores the corresponding AR tag data in the extended field of each coded frame, so that the decoder can obtain the corresponding AR tag data while decoding the video data, so that the video data and the corresponding AR tag data can be displayed at the same time, thereby improving the reliability of the display of the AR tag data.
[0135] Based on any of the above embodiments, when the type of the coded frame is a key frame type, the target AR tag data is full AR tag data; and the storage unit 903 is specifically used for:
[0136] The full amount of AR tag data is stored in the extension field of the corresponding key frame.
[0137] Based on any of the foregoing embodiments, when the type of the coded frame is a forward prediction frame type, the target AR tag data is first changed AR tag data relative to the first AR tag data; the first AR tag data is AR tag data corresponding to a forward prediction frame or a key frame that is before the forward prediction frame and closest to the forward prediction frame; the storage unit 903 is specifically used to:
[0138] The first changed AR tag data is stored in the corresponding forward prediction frame.
[0139] Based on any of the foregoing embodiments, when the type of the coded frame is a bidirectional interpolation frame type, the target AR tag data is second changed AR tag data relative to the second AR tag data and the third AR tag data; the second AR tag data is AR tag data corresponding to a forward predicted frame or a key frame that is before the bidirectional interpolation frame and is closest to the bidirectional interpolation frame; the third AR tag data is AR tag data corresponding to AR tag data corresponding to a forward predicted frame or a key frame that is after the bidirectional interpolation frame and is closest to the bidirectional interpolation frame; the storage unit 903 is specifically used to:
[0140] The second changed AR tag data is stored in the corresponding bidirectional interpolation frame.
[0141] Based on any of the above embodiments, the storage unit 903 is specifically used for:
[0142] Determine a first target key frame corresponding to a preset time, and store each target AR tag data in an extended field of the corresponding first target key frame to obtain the target coded frame sequence;
[0143] or,
[0144] Determine at least one second target key frame, determine the relative position between other key frames and their respective previous second target key frames, store each of the target AR tag data in an extended field of the corresponding second target key frame, and store the corresponding relative position in the extended field of each of the other key frames.
[0145] Fig.10 FIG. 2 is a second structural diagram of an apparatus for synchronizing AR tag data in a video stream provided by an embodiment of the present invention. Fig.10As shown, the device 1000 for synchronizing AR tag data in a video stream includes a receiving unit 1001, a second determining unit 1002 and a display unit 1003; wherein:
[0146] A receiving unit 1001 is configured to receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream;
[0147] A second determining unit 1002 is configured to determine the video data and full AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame;
[0148] The display unit 1003 is used to superimpose the full amount of AR tag data on the corresponding video data to obtain a target video stream, and display the target video stream.
[0149] The device for synchronizing AR tag data in a video stream provided by the present invention comprises a decoder receiving a target coding frame sequence sent by an encoder, the target coding frame sequence being a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coding frame, the target AR tag data being the AR tag data corresponding to each coding frame determined based on the type of each coding frame in an initial coding frame sequence obtained by encoding the video stream, and the decoder obtaining video data and AR tag data corresponding to each coding frame based on the target coding frame sequence. The present invention stores the corresponding AR tag data in the extended field of each coding frame, so that the decoder can obtain the corresponding AR tag data while decoding the video data, so that the video data and the corresponding AR tag data can be displayed simultaneously, thereby improving the reliability of the display of the AR tag data; in addition, storing the AR tag data in the extended field of each coding frame does not affect the encoding and decoding of the existing video data, and can maintain the compatibility of the second electronic device equipped with the decoder. If the second electronic device equipped with the decoder supports the display of AR tag data, the AR tag data can be read and displayed from the extended field of each coding frame. If the second electronic device equipped with the decoder does not support the display of AR tag data, the video data can still be read and played normally from the extended field of each coding frame.
[0150] Based on any of the above embodiments, the device 1000 for synchronizing AR tag data in a video stream further includes:
[0151] A third determining unit is used to determine a target time corresponding to at least one target key frame on a time axis corresponding to the target video stream; the extended field of each target key frame stores full AR tag data;
[0152] The setting unit is used to set identification information corresponding to each target moment on the time axis.
[0153] Fig.11 is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention, such as Fig.11 As shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140. The processor 1110 may call the logic instructions in the memory 1130 to execute the method for synchronizing AR tag data in the video stream, the method comprising: encoding the video stream to obtain an initial encoding frame sequence;
[0154] Determining target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence;
[0155] Storing each of the target AR tag data in an extended field corresponding to the coded frame to obtain a target coded frame sequence;
[0156] The target coded frame sequence is sent to a decoder.
[0157] Alternatively, the processor 1110 may call the logic instructions in the memory 1130 to execute the following method:
[0158] Receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream;
[0159] Determine the video data and full AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame;
[0160] The full amount of AR tag data is superimposed on the corresponding video data to obtain a target video stream, and the target video stream is displayed.
[0161] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0162] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the method for synchronizing AR tag data in a video stream provided by the above methods, the method including: encoding the video stream to obtain an initial encoded frame sequence;
[0163] Determining target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence;
[0164] Storing each of the target AR tag data in an extended field corresponding to the coded frame to obtain a target coded frame sequence;
[0165] The target coded frame sequence is sent to a decoder.
[0166] Alternatively, when the computer program is executed by a processor, the following method is implemented:
[0167] Receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream;
[0168] Determine the video data and full AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame;
[0169] The full amount of AR tag data is superimposed on the corresponding video data to obtain a target video stream, and the target video stream is displayed.
[0170] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the method for synchronizing AR tag data in a video stream provided by the above methods, the method comprising: encoding the video stream to obtain an initial encoded frame sequence;
[0171] Determining target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence;
[0172] Storing each of the target AR tag data in an extended field corresponding to the coded frame to obtain a target coded frame sequence;
[0173] The target coded frame sequence is sent to a decoder.
[0174] Alternatively, when the program instructions are executed by a computer, the computer can implement the following method:
[0175] Receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream;
[0176] Determine the video data and full AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame;
[0177] The full amount of AR tag data is superimposed on the corresponding video data to obtain a target video stream, and the target video stream is displayed.
[0178] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0179] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for synchronizing augmented reality (AR) tag data in a video stream. It is characterized in that Applied to an encoder, the method comprises: Encode the video stream to obtain an initial encoded frame sequence; Determining target AR tag data corresponding to each coded frame based on the type of each coded frame in the initial coded frame sequence; Storing each of the target AR tag data in an extended field corresponding to the coded frame to obtain a target coded frame sequence; The target coded frame sequence is sent to a decoder.
2. The method for synchronizing AR tag data in a video stream according to claim 1, It is characterized in that In a case where the type of the coded frame is a key frame type, the target AR tag data is full AR tag data; The storing each of the target AR tag data into an extension field corresponding to the coded frame includes: The full amount of AR tag data is stored in the extension field of the corresponding key frame.
3. The method for synchronizing AR tag data in a video stream according to claim 1 or 2, It is characterized in that In the case where the type of the coded frame is a forward prediction frame type, the target AR tag data is first changed AR tag data relative to the first AR tag data; the first AR tag data is AR tag data corresponding to a forward prediction frame or a key frame that is before the forward prediction frame and closest to the forward prediction frame; The storing each of the target AR tag data into an extension field corresponding to the coded frame includes: The first changed AR tag data is stored in the corresponding forward prediction frame.
4. The method for synchronizing AR tag data in a video stream according to claim 3, It is characterized in that In a case where the type of the coded frame is a bidirectional interpolation frame type, the target AR tag data is second changed AR tag data relative to the second AR tag data and the third AR tag data; the second AR tag data is AR tag data corresponding to a forward predicted frame or a key frame that is before the bidirectional interpolation frame and closest to the bidirectional interpolation frame; the third AR tag data is AR tag data corresponding to AR tag data corresponding to a forward predicted frame or a key frame that is after the bidirectional interpolation frame and closest to the bidirectional interpolation frame; The storing each of the target AR tag data into an extension field corresponding to the coded frame includes: The second changed AR tag data is stored in the corresponding bidirectional interpolation frame.
5. The method for synchronizing AR tag data in a video stream according to claim 1 or 2, It is characterized in that The storing of each of the target AR tag data into the extension field corresponding to the coded frame to obtain a target coded frame sequence includes: Determine a first target key frame corresponding to a preset time, and store each target AR tag data in an extended field of the corresponding first target key frame to obtain the target coded frame sequence; or, Determine at least one second target key frame, determine the relative position between other key frames and their respective previous second target key frames, store each of the target AR tag data in an extended field of the corresponding second target key frame, and store the corresponding relative position in the extended field of each of the other key frames.
6. The method for synchronizing AR tag data in a video stream according to claim 1 or 2, It is characterized in that The target label data includes label display parameters; the label display parameters corresponding to each of the encoding frames are general label display parameters or specific label display parameters.
7. A method for synchronizing AR tag data in a video stream, It is characterized in that Applied to a decoder, the method comprises: Receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream; Determine the video data and full AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame; The full amount of AR tag data is superimposed on the corresponding video data to obtain a target video stream, and the target video stream is displayed.
8. The method for synchronizing AR tag data in a video stream according to claim 7, It is characterized in that The method further comprises: Determine a target time corresponding to at least one target key frame on a time axis corresponding to the target video stream; the extended field of each target key frame stores full AR tag data; The identification information corresponding to each of the target moments is set on the time axis.
9. A device for synchronizing AR tag data in a video stream, It is characterized in that The device comprises: An encoding unit, used for encoding the video stream to obtain an initial encoding frame sequence; A first determining unit, configured to determine target AR tag data corresponding to each coded frame based on a type of each coded frame in the initial coded frame sequence; A storage unit, configured to store each of the target AR tag data into an extension field corresponding to the coded frame to obtain a target coded frame sequence; A sending unit is used to send the target coded frame sequence to a decoder.
10. A device for synchronizing AR tag data in a video stream, It is characterized in that The device comprises: a receiving unit, configured to receive a target coded frame sequence sent by an encoder; the target coded frame sequence is a sequence obtained by the encoder storing target AR tag data in an extended field of a corresponding coded frame, and the target AR tag data is AR tag data corresponding to each coded frame determined based on the type of each coded frame in an initial coded frame sequence obtained by encoding a video stream; A second determining unit, configured to determine the video data and the full amount of AR tag data corresponding to each coded frame based on the type of each coded frame in the target coded frame sequence and the target AR tag data corresponding to each coded frame; The display unit is used to superimpose the full amount of AR tag data on the corresponding video data to obtain a target video stream, and display the target video stream.
