Multifunctional data embedding method and system based on file tail and computer equipment

By adding multifunctional data at the end of the file in the standard media file format, the problem of custom format files being incompatible in third-party applications is solved, and the file compatibility and user experience is improved.

CN119485024APending Publication Date: 2025-02-18SHENZHEN YUANSU CHUANGDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411602904.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, files in custom formats are not compatible in third-party applications, resulting in the inability to view or play these contents directly.

Method used

Make sure the file can still play normally in third-party applications by adding multi-function data file tails at the ends of file in standard media file formats such as MP4 and JPEG.

Benefits of technology

It realizes compatibility between custom data and standard format files, ensures the universality of the file and improves user experience, and allows additional data to be embedded at the end of the file, such as anti-shake data and motion state data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119485024A_ABST
    Figure CN119485024A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a multifunctional data embedding method and system based on a file end and computer equipment, and the method comprises the steps: obtaining shooting data and corresponding multifunctional data, carrying out the packaging of the shooting data in a standard media file format, adding the multifunctional data at the tail end of a packaging file, and carrying out the storage. According to the method, the structural integrity of the file is not influenced, the problem of compatibility between the custom data and the standard format file is effectively solved, the third-party application program can identify the custom data as the standard media file format and normally play the custom data, flexible use of the data in different application environments is realized, and the user experience and wide application of the data are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a multifunctional data embedding method, system and computer device based on file tail. Background Art

[0002] With the continuous development of camera technology, modern camera products provide a variety of modes and functions when shooting, such as slow motion, night scene, panorama, wide angle, macro and other modes. These modes will not only record high-quality images and videos during shooting, but also capture some additional data, such as anti-shake data, movement direction and movement status during shooting, etc. This data is very important for improving the playback experience, post-processing, and content-based optimization.

[0003] Traditionally, custom data can be stored with videos or images using custom packaging formats. However, custom formats have a significant drawback, that is, files can only be parsed and played in specific software, resulting in incompatibility issues when using third-party applications, and the content cannot be directly viewed or played. This incompatibility limits the improvement of user experience and the wide application of data in the current diverse media software environment. Summary of the invention

[0004] The present application provides a multifunctional data embedding method based on the file tail, aiming to solve the technical problem in the prior art that third-party applications are not compatible with the custom format, resulting in the inability to directly view or play.

[0005] The present application provides a multifunctional data embedding method based on a file tail, which is characterized by comprising:

[0006] Acquire shooting data and multifunctional data corresponding to the shooting data, wherein the shooting data includes video data and image data, and the multifunctional data includes anti-shake data, motion direction data, and motion status data corresponding to the video data or the image data;

[0007] Encapsulating the shooting data in a standard media file format to obtain a packaged file;

[0008] Add a multifunctional data file tail at the end of the encapsulated file and store it to obtain a shooting file;

[0009] When the third-party application reads the shooting file, the third-party application reads the shooting data corresponding to the standard media file format of the shooting file to view or play the shooting data.

[0010] Preferably, the step of adding a multifunctional data file trailer to the end of the encapsulated file and storing the trailer to obtain the shot file comprises:

[0011] Add the multifunctional data to the end of the encapsulation file according to a preset specification format, wherein the preset specification format includes byte format data and a preset flag bit;

[0012] The encapsulated file with the multifunctional data added thereto is stored to obtain a shooting file with a file tail.

[0013] Preferably, after the step of obtaining the shot file with a file tail, the method further comprises:

[0014] When the dedicated application reads the shooting file, the dedicated application reads the flag bit at the end of the shooting file in reverse order, and determines whether the flag bit is consistent with the preset flag bit;

[0015] If the flag bit is consistent with the preset flag bit, it is determined that the shooting file contains multi-function data;

[0016] A dedicated application parses the multi-function data and combines it with the shooting data for playback enhancement.

[0017] Preferably, the standard media file formats include MP4 format and JPEG format.

[0018] Preferably, the multifunctional data also includes lens parameter data, position data, and shooting status data.

[0019] Preferably, the dedicated application parses the multifunctional data and performs playback enhancement processing in combination with the shooting data, including:

[0020] A dedicated application parses the multifunctional data to obtain multiple data types;

[0021] Multiple data types are optimized accordingly and integrated with shooting data based on fusion technology to increase video playback.

[0022] Preferably, the step of performing corresponding optimization processing on multiple types of data and integrating them with the shooting data based on fusion technology includes:

[0023] Perform corresponding optimization processing on multiple types of data, where the optimization processing includes deformation correction, color calibration, and lighting parameter optimization;

[0024] Based on OpenGL fusion technology, the optimized type data is fused with the shooting data, and the fusion result is encoded into a video format.

[0025] The present application also provides a multifunctional data embedding system based on a file tail, comprising:

[0026] An acquisition module, used to acquire shooting data and multifunctional data corresponding to the shooting data, wherein the shooting data includes video data and image data, and the multifunctional data includes anti-shake data, motion direction data, and motion status data corresponding to the video data or the image data;

[0027] The encapsulation module is used to encapsulate the shooting data in a standard media file format to obtain an encapsulated file;

[0028] A storage module is used to add a multifunctional data file tail at the end of the encapsulated file and store it to obtain a shooting file;

[0029] The third-party application is used for, when the third-party application reads the shooting file, the third-party application reads the shooting data corresponding to the standard media file format of the shooting file to view or play the shooting data.

[0030] Preferably, the storage module comprises:

[0031] An adding unit, used for adding the multifunctional data to the end of the encapsulation file according to a preset specification format, wherein the preset specification format includes byte format data and a preset flag bit;

[0032] The storage unit is used to store the encapsulated file with the multifunctional data added thereto to obtain a shooting file with a file tail.

[0033] A dedicated application, which is used for reading the flag bit at the end of the shooting file in reverse order when the dedicated application reads the shooting file, and determining whether the flag bit is consistent with the preset flag bit;

[0034] If the flag bit is consistent with the preset flag bit, it is determined that the shooting file contains multi-function data;

[0035] A dedicated application is also used to parse the multi-function data and combine it with the shooting data for playback enhancement processing.

[0036] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0037] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0038] The beneficial effects of this application are:

[0039] 1. Custom data embedding: By embedding custom data at the end of standard MP4 and JPEG format files, the problem of directly modifying the file format in traditional technology causing third-party applications to be unable to recognize it is solved. This allows users to add anti-shake data, movement direction, movement status and other information without sacrificing file compatibility.

[0040] 2. File compatibility: The original playback capabilities of standard media files are retained to ensure that the files can be played normally in third-party applications. Users do not need to worry about compatibility issues when playing files on different platforms and applications, which greatly improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 The figure is a schematic diagram of a method flow of an embodiment of the present application.

[0042] Figure 2 A schematic diagram of the system structure of an embodiment of the present application.

[0043] Figure 3 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.

[0044] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0046] like Figure 1-Figure 3 As shown, the present application provides a multifunctional data embedding method based on the file tail, including:

[0047] S1. Acquire shooting data and multifunctional data corresponding to the shooting data, wherein the shooting data includes video data and image data, and the multifunctional data includes anti-shake data, motion direction data, and motion state data corresponding to the video data or the image data;

[0048] S2, encapsulating the shooting data in a standard media file format to obtain an encapsulated file;

[0049] S3, adding a multifunctional data file tail to the end of the encapsulated file and storing it to obtain a shooting file;

[0050] S4. When the third-party application reads the shooting file, the third-party application reads the shooting data corresponding to the standard media file format of the shooting file to view or play the shooting data.

[0051] As described in the above steps S1-S4, the present application provides a new data storage method - "file tail", which allows custom data to be embedded in standard media files while maintaining the compatibility of standard media files with third-party applications. Specifically, first obtain the shooting data and the corresponding multi-function data. The multi-function data can be defined according to user needs, that is, the above-mentioned custom data, which may include anti-shake data, movement direction and movement state during shooting, etc. The shooting data is encapsulated in a standard media file format, and the multi-function data is added to the end of the encapsulated file for storage. In this way, the stored shooting file includes the multi-function data. Since most of the audio and video encapsulation technologies on the market write the video-related information into the header of the video, the relevant information of the header will be used during encoding and decoding so that we can accurately create a decoder encoder. The present application writes the relevant information (multi-function data) to the end of the file. This method does not affect the structural integrity of the file and the playback compatibility of third-party applications. Therefore, it does not affect the playback of the video standard format. As long as the player of the third-party application follows the encoding and decoding of the audio and video standard encapsulation format, it will not affect the playback of the video. For example, when the third-party application is encoding, it needs to find the start code and the end code of each frame. For example, the encoding of h264 needs to find 00000001 of each frame. Now there is data 00000001674D402A 9A6402D02DD80B7010101400000FA40003A983A1800F420003D092EF 2E343001E840007A 125DE5C3E11089CF 00000001, then the data between these two 00000001 is a valid video frame, and any one of them cannot be missing. If it cannot be found, it will be considered that it has reached the end of the video, so the multi-function data at the end of the file is automatically ignored. Therefore, even if the shooting file contains the "file end", third-party applications can still recognize it as a standard media file format and play it normally, and there will be no parsing problems due to the existence of multi-function data. Through this new data storage method, we have effectively solved the problem of compatibility between custom data and standard format files, which not only ensures the versatility of the file, but also realizes the flexible use of data in different application environments, improving user experience and the wide application of data.

[0052] In one embodiment, the step S3 of adding a multifunctional data file trailer to the end of the encapsulated file and storing the file to obtain the shot file includes:

[0053] S31, adding the multifunctional data to the end of the encapsulation file according to a preset specification format, wherein the preset specification format includes byte format data and a preset flag bit;

[0054] S32: Store the packaged file with the multifunctional data added thereto to obtain a shooting file with a file tail.

[0055] As described in the above steps S31-S32, the present application adds the multi-function data to the end of the file in the form of stream data (byte format, binary), and formulates a preset flag. The data structure of the end of the file is: multi-function data + preset flag. The preset flag can be defined according to needs. There is no unique limitation here. For example, the flag can be "0x010x020x03". After adding, it is stored to obtain a shot file with a file end.

[0056] In one embodiment, after the step S32 of obtaining the shot file with the file tail, the method further includes:

[0057] S33, when the dedicated application reads the shooting file, the dedicated application reads the flag bit at the end of the shooting file in reverse order, and determines whether the flag bit is consistent with the preset flag bit;

[0058] S34, if the flag bit is consistent with the preset flag bit, it is determined that the shooting file contains multi-function data;

[0059] S35. A dedicated application parses the multifunctional data and combines it with the shooting data to perform playback enhancement processing.

[0060] As described in the above steps S33-S35, although the third-party application can open the shooting file, it cannot read the multimedia data. Therefore, the present application can read the shooting file based on the dedicated application, and identify the flag bit at the end of the file in the shooting file in reverse order. Assuming that the preset flag bit is "0x010x020x03", it is only necessary to read the data of the flag bit size from the end of the file to the front and compare it with the preset flag bit (0x010x020x03) to see if they are consistent. If they are consistent, it means that there is multi-function data, which can provide a richer playback experience (such as stabilization of video playback based on anti-shake data). This method ensures that the data at the end of the file can be flexibly expanded without affecting the original file structure. And through specific flag bits, the multi-function data in the end of the file can be quickly located and read, which improves the efficiency of data extraction. Users can quickly obtain the required information in the dedicated application, thereby achieving more efficient anti-shake processing and other functions.

[0061] In one embodiment, the standard media file formats include MP4 format and JPEG format. Among them, MP4 format: MP4 is a widely used video file format, which is characterized by good compatibility and file encapsulation capabilities. The MP4 format supports multiple encoding and decoding methods and is suitable for playback devices on different platforms. This format allows metadata to be added to the header and tail of the video file, which is the basis for the present application to embed file tail data; JPEG format: JPEG is a common image format with high compression efficiency and a wide range of application scenarios. The JPEG format also supports adding data to the tail of the image file. The present application takes advantage of this to embed custom data into the tail of the JPEG file to ensure that the file can still be opened and viewed as a standard JPEG image in third-party software.

[0062] In one embodiment, the multifunctional data also includes lens parameter data, position data, and shooting status data. By embedding multifunctional data at the end of the file, the present application can flexibly add multiple shooting modes and sensor data (such as anti-shake parameters, motion status, etc.) without having to redefine the entire file format. This expansion method ensures that the addition of new functions does not affect the use of existing functions. That is, regardless of whether the end of the file contains custom data, the file can be played as an ordinary MP4 or JPEG file in a standard media player. This compatibility is maintained based on a deep understanding of the file format encapsulation and decoding process, so that the presence of custom data will not affect the normal parsing of mainstream players.

[0063] In one embodiment, the dedicated application parses the multifunctional data and combines the shooting data to perform a playback enhancement process step S35, including:

[0064] S351, a dedicated application program parses the multifunctional data to obtain multiple data types;

[0065] S352, performing corresponding optimization processing on multiple data types, and integrating them with the shooting data based on fusion technology to increase video playback.

[0066] As described in the above steps S351-S352, the data at the end of the file can be parsed through a dedicated application, and further processed according to the specific data type (such as anti-shake data, shooting direction, etc.), so as to achieve refined use of the shooting data. For example, the playback effect optimized by custom data, such as smooth playback of anti-shake video. This also ensures the effective storage and reading of multi-functional data in a standard format, and also solves the problem of compatibility of third-party applications.

[0067] In one embodiment, the step of performing corresponding optimization processing on multiple types of data and integrating them with the captured data based on fusion technology includes:

[0068] S3521, performing corresponding optimization processing on multiple types of data, wherein the optimization processing includes deformation correction, color calibration, and illumination parameter optimization;

[0069] S3522. Based on OpenGL fusion technology, the optimized type data is fused with the shooting data, and the fusion result is encoded into a video format.

[0070] As described in the above steps S3521-S3522, with the support of fusion technology and the integration of shooting data, we can write relevant parameters to the end of the file when shooting. These parameters may include key information such as shooting mode (such as video or photo), resolution, duration, timestamp, etc. In addition, some important auxiliary data can also be recorded, such as anti-shake information: when shooting in a shaking environment, the device's gyroscope can collect jitter parameters in real time, and then use these data in image processing to optimize image quality, reduce jitter effects, and make the video present a smoother and clearer picture. In addition, the range of parameters that can be recorded at the end of the file can be further expanded to provide support for more application scenarios. In addition to anti-shake processing, according to the type of data, the video or picture content can also be adjusted in various ways, such as deformation correction, color calibration, and lighting optimization, so that the final imaging effect is more in line with the shooting environment and needs.

[0071] In summary, this application provides two reading modes (third-party application and dedicated application), and users can choose the most suitable mode according to their needs, which provides users with more flexibility and choices and improves the user experience.

[0072] The present application also provides a multifunctional data embedding system based on a file tail, comprising:

[0073] An acquisition module 1 is used to acquire shooting data and multifunctional data corresponding to the shooting data, wherein the shooting data includes video data and image data, and the multifunctional data includes anti-shake data, motion direction data, and motion status data corresponding to the video data or the image data;

[0074] Encapsulation module 2, used to encapsulate the shooting data in a standard media file format to obtain an encapsulated file;

[0075] The storage module 3 is used to add a multifunctional data file tail to the end of the encapsulated file and store it to obtain a shooting file;

[0076] The third-party application 4 is used for, when the third-party application reads the shooting file, the third-party application reads the shooting data corresponding to the standard media file format of the shooting file to view or play the shooting data.

[0077] As mentioned above, the modular design enables each functional module to be updated and optimized independently, enhancing the maintainability of the system, which allows new functions to be added to the system in the future without affecting the existing processing flow.

[0078] In one embodiment, the storage module 3 includes:

[0079] An adding unit, used for adding the multifunctional data to the end of the encapsulation file according to a preset specification format, wherein the preset specification format includes byte format data and a preset flag bit;

[0080] The storage unit is used to store the encapsulated file with the multifunctional data added thereto to obtain a shooting file with a file tail.

[0081] A dedicated application, which is used for reading the flag bit at the end of the shooting file in reverse order when the dedicated application reads the shooting file, and determining whether the flag bit is consistent with the preset flag bit;

[0082] If the flag bit is consistent with the preset flag bit, it is determined that the shooting file contains multi-function data;

[0083] A dedicated application is also used to parse the multi-function data and combine it with the shooting data for playback enhancement processing.

[0084] It should be noted that each module and unit in the file tail-based multifunctional data embedding system corresponds one-to-one to the steps in the file tail-based multifunctional data embedding method.

[0085] like Figure 3 As shown, the present application also provides a computer device, which may be a server, and its internal structure may be as shown in Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store all data required for the process of the multifunctional data embedding method based on the file tail. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the multifunctional data embedding method based on the file tail is implemented.

[0086] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0087] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, any of the above-mentioned multifunctional data embedding methods based on the file tail is implemented.

[0088] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0089] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0090] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A multifunctional data embedding method based on file tail, characterized in that: include: Acquire shooting data and multifunctional data corresponding to the shooting data, wherein the shooting data includes video data and image data, and the multifunctional data includes anti-shake data, motion direction data, and motion status data corresponding to the video data or the image data; Encapsulating the shooting data in a standard media file format to obtain a packaged file; Add a multifunctional data file tail at the end of the encapsulated file and store it to obtain a shooting file; When the third-party application reads the shooting file, the third-party application reads the shooting data corresponding to the standard media file format of the shooting file to view or play the shooting data.

2. The multifunctional data embedding method based on file tail according to claim 1, characterized in that: The step of adding a multifunctional data file tail to the end of the encapsulated file and storing the file to obtain the shot file comprises: Add the multifunctional data to the end of the encapsulation file according to a preset specification format, wherein the preset specification format includes byte format data and a preset flag bit; The encapsulated file with the multifunctional data added thereto is stored to obtain a shooting file with a file tail.

3. The multifunctional data embedding method based on file tail according to claim 2, characterized in that: After the step of obtaining the shot file with the file tail, the method further includes: When the dedicated application reads the shooting file, the dedicated application reads the flag bit at the end of the shooting file in reverse order, and determines whether the flag bit is consistent with the preset flag bit; If the flag bit is consistent with the preset flag bit, it is determined that the shooting file contains multi-function data; A dedicated application parses the multi-function data and combines it with the shooting data for playback enhancement.

4. The multifunctional data embedding method based on file tail according to claim 1, characterized in that: The standard media file formats include MP4 format and JPEG format.

5. The multifunctional data embedding method based on file tail according to claim 1, characterized in that: The multifunctional data also includes lens parameter data, position data, and shooting status data.

6. The multifunctional data embedding method based on file tail according to claim 3 is characterized in that: The dedicated application parses the multifunctional data and performs playback enhancement processing in combination with the shooting data, including: A dedicated application parses the multifunctional data to obtain multiple types of data; Multiple types of data are optimized and integrated with the shooting data based on fusion technology to enhance the video playback effect.

7. The multifunctional data embedding method based on file tail according to claim 6, characterized in that: The step of performing corresponding optimization processing on multiple types of data and integrating them with the shooting data based on fusion technology includes: Perform corresponding optimization processing on multiple types of data, where the optimization processing includes deformation correction, color calibration, and lighting parameter optimization; Based on OpenGL fusion technology, the optimized type data is fused with the shooting data, and the fusion result is encoded into a video format.

8. A multifunctional data embedding system based on file tail, characterized in that: include: An acquisition module, used to acquire shooting data and multifunctional data corresponding to the shooting data, wherein the shooting data includes video data and image data, and the multifunctional data includes anti-shake data, motion direction data, and motion status data corresponding to the video data or the image data; The encapsulation module is used to encapsulate the shooting data in a standard media file format to obtain an encapsulated file; A storage module is used to add a multifunctional data file tail at the end of the encapsulated file and store it to obtain a shooting file; The third-party application is used for, when the third-party application reads the shooting file, the third-party application reads the shooting data corresponding to the standard media file format of the shooting file to view or play the shooting data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.