CN115396687A - Method, device, live broadcast system and equipment for processing service data in media resource - Google Patents

Method, device, live broadcast system and equipment for processing service data in media resource Download PDF

Info

Publication number
CN115396687A
CN115396687A CN202211028360.3A CN202211028360A CN115396687A CN 115396687 A CN115396687 A CN 115396687A CN 202211028360 A CN202211028360 A CN 202211028360A CN 115396687 A CN115396687 A CN 115396687A
Authority
CN
China
Prior art keywords
data
preset
file
media resource
resource file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211028360.3A
Other languages
Chinese (zh)
Other versions
CN115396687B (en
Inventor
郭亚斌
甘鹏龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN202211028360.3A priority Critical patent/CN115396687B/en
Priority claimed from CN202211028360.3A external-priority patent/CN115396687B/en
Publication of CN115396687A publication Critical patent/CN115396687A/en
Application granted granted Critical
Publication of CN115396687B publication Critical patent/CN115396687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • H04N21/26233Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving content or additional data duration or size, e.g. length of a movie, size of an executable file
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • H04N21/4394Processing of audio elementary streams involving operations for analysing the audio stream, e.g. detecting features or characteristics in audio streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/85406Content authoring involving a specific file format, e.g. MP4 format

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of multimedia and network live broadcast, and provides a method and a device for processing service data in media resources, a live broadcast system, electronic equipment and a storage medium. The method and the device can quickly and accurately extract the service data from the file data of the media resource file, effectively avoid the increase of the volume packet and reduce the use complexity. The method comprises the following steps: after a media resource file containing service data is obtained, preset data used for carrying out data matching in the media resource file is determined, data matching is carried out in file data of the media resource file according to the preset data, therefore, target data limited by the position of the preset data in the file data is determined, and the service data is obtained according to the target data.

Description

Method, device, live broadcast system and equipment for processing service data in media resource
Technical Field
The present application relates to the field of multimedia and network live broadcast technologies, and in particular, to a method and an apparatus for processing service data in a media resource, a live broadcast system, an electronic device, and a computer-readable storage medium.
Background
With the development of multimedia and network technologies, media resources such as audio and video can be sent to a receiving end by a server in the form of media resource files such as MP4 and the like for the receiving end to parse the files so as to obtain and play corresponding media resources for a user.
In some scenarios, data generated by a service, i.e., service data, needs to be inserted into a media resource file, and the related capabilities of the media resource files such as MP4 files can be extended, for example, dynamic data is inserted into the MP4 file, and the difficulty in maintaining the service data and the media resources can be reduced by integrating the service data into the media resource file.
In the prior art, service data is inserted into a media resource file, the service data may be inserted into a Metadata (Metadata) field of the media resource file by embedding an ffmpeg frame, or a box of the media resource file is operated to create a box field and the service data is inserted into a newly added box field, so that file data of the media resource file is unpacked through the ffmpeg frame and the data of the Metadata field is extracted at the same time when the media resource file is parsed, such that a ffmpeg third-party library is required to be relied on and the embedding of the ffmpeg frame causes an increase in a file volume packet, or a developer is required to be familiar with a packaging format of the media resource file such as MP4 to parse the data, and the use complexity is high.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a live broadcast system, an electronic device, and a computer-readable storage medium for processing service data in a media resource.
In a first aspect, the present application provides a method for processing service data in a media resource. The method comprises the following steps:
acquiring a media resource file; the media resource file comprises service data;
determining preset data for data matching in the media resource file;
performing data matching in file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data;
and obtaining the service data according to the target data.
In one embodiment, the preset data comprises preset head data and preset tail data; the performing data matching in the file data of the media resource file according to the preset data and determining the target data limited by the position of the preset data in the file data comprises: performing data matching in the file data of the media resource file according to the preset header data, and acquiring the back-stage file data of the media resource file from the position where the preset header data is located; and performing data matching in the back-end file data according to the preset tail data to obtain target data of the back-end file data which is stopped before the position of the preset tail data.
In one embodiment, the preset data comprises preset head data and preset tail data; performing data matching in file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data, including: performing data matching in the file data of the media resource file according to the preset tail data to acquire front-segment file data of the media resource file, wherein the file data of the media resource file is stopped before the position of the preset tail data; and performing data matching in the front-segment file data according to the preset head data to obtain target data starting from the position of the preset head data in the front-segment file data.
In a second aspect, the present application provides a method for processing service data in a media resource. The method comprises the following steps:
acquiring service data and determining preset data;
obtaining a data combination to be written according to the service data and preset data; the data combination comprises the service data and preset data; the preset data is used for limiting the position of the business data in the data combination;
writing the data combination into a media resource file to obtain a media resource file containing the service data;
and sending the media resource file containing the service data to a receiving end so that the receiving end can perform data matching in the file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data to obtain the service data.
In one embodiment, the preset data includes preset header data and preset trailer data; the obtaining of the data combination to be written according to the service data and the preset data includes: and adding the preset head data at the head of the service data and adding the preset tail data at the tail of the service data to obtain the data combination to be written.
In a third aspect, the present application provides an apparatus for processing service data in a media resource. The device comprises:
the file acquisition module is used for acquiring a media resource file; the media resource file comprises service data;
the data determining module is used for determining preset data for performing data matching in the media resource file;
the data matching module is used for performing data matching in file data of the media resource file according to the preset data and determining target data limited by the position of the preset data in the file data;
and the data obtaining module is used for obtaining the service data according to the target data.
In a fourth aspect, the present application provides an apparatus for processing service data in a media resource. The device comprises:
the data acquisition module is used for acquiring service data and determining preset data;
the combination obtaining module is used for obtaining a data combination to be written according to the service data and preset data; the data combination comprises the service data and preset data; the preset data is used for limiting the position of the business data in the data combination;
the data writing module is used for writing the data combination into a media resource file to obtain a media resource file containing the service data;
and the file sending module is used for sending the media resource file containing the service data to a receiving end so that the receiving end can perform data matching in the file data of the media resource file according to the preset data, and determine target data limited by the position of the preset data in the file data to obtain the service data.
In a fifth aspect, the present application provides a live broadcast system. The system comprises: a live broadcast server and a terminal; the live broadcast server is used for writing live broadcast service data into a live broadcast media resource file according to the method and sending the live broadcast service data to the terminal; the terminal is used for acquiring the live broadcast service data from the live broadcast media resource file from the live broadcast server according to the method.
In a sixth aspect, the present application provides an electronic device. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program:
acquiring a media resource file; the media resource file comprises service data; determining preset data for performing data matching in the media resource file; performing data matching in file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data; and obtaining the service data according to the target data.
In a seventh aspect, the present application provides an electronic device. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program:
acquiring service data and determining preset data; obtaining a data combination to be written according to the service data and preset data; wherein the data combination comprises the service data and preset data; the preset data is used for limiting the position of the business data in the data combination; writing the data combination into a media resource file to obtain the media resource file containing the service data; and sending the media resource file containing the service data to a receiving end so that the receiving end performs data matching in the file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data to obtain the service data.
In an eighth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a media resource file; the media resource file comprises service data; determining preset data for performing data matching in the media resource file; performing data matching in file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data; and obtaining the service data according to the target data.
In a ninth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring service data and determining preset data; obtaining a data combination to be written according to the service data and preset data; the data combination comprises the service data and preset data; the preset data is used for limiting the position of the business data in the data combination; writing the data combination into a media resource file to obtain a media resource file containing the service data; and sending the media resource file containing the service data to a receiving end so that the receiving end performs data matching in the file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data to obtain the service data.
After a media resource file containing the service data is obtained, the preset data used for data matching in the media resource file is determined, and data matching is performed in the file data of the media resource file according to the preset data, so that target data limited by the position of the preset data in the file data is determined, and the service data is obtained according to the target data. The scheme can quickly and accurately extract the service data from the file data of the media resource file based on a data matching mode, so that the dependence of a receiving terminal on an ffmpeg frame can be removed, the increase of a volume packet is effectively avoided, developers do not need to be skilled in mastering the packaging format of the media resource file, the use complexity is reduced, and the use cost is greatly reduced.
Drawings
Fig. 1 is an application scenario diagram of a method for processing service data in a media resource according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for processing service data in a media resource according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for processing service data in a media resource in an application example of the present application;
fig. 4 is a flowchart illustrating a method for processing service data in a media resource according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of a live broadcast system in an embodiment of the present application;
fig. 6 is a block diagram illustrating a structure of an apparatus for processing service data in a media resource according to an embodiment of the present application;
fig. 7 is a block diagram illustrating an apparatus for processing service data in a media resource according to another embodiment of the present application;
fig. 8 is an internal structural view of an electronic device in an embodiment of the present application;
fig. 9 is an internal structural diagram of an electronic device in another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for processing service data in a media resource provided in the embodiment of the present application may be applied to an application scenario as shown in fig. 1, where the application scenario may include a receiving end 110 and a sending end 120 of a media resource file, and the receiving end 110 may communicate with the sending end 120 through a network. The receiving end 110 may be, but not limited to, various personal computers, notebook computers, smart phones, and tablet computers, and the sending end 120 may be a server, and may be specifically implemented by an independent server or a server cluster formed by multiple servers.
The following describes, based on the application scenario shown in fig. 1, implementation of the method for processing service data in media resources on the receiving end 110 and the sending end 120 in sequence according to various embodiments and corresponding drawings.
In an embodiment, as shown in fig. 2, a method for processing service data in a media resource is provided, and the method may be executed by the receiving end 110, and specifically includes the following steps:
step S201, a media resource file is acquired.
In this step, the receiving end 110 may receive a media resource file from the sending end 120, where the media resource file is a media resource file containing service data. For example, the sending end 120 may write related data such as a mask position of a video frame as service data into a media resource file such as MP4, and the receiving end 110 receives the media resource file containing the related data such as the mask position of the video frame from the sending end 120. When the service data is written in the media resource file by the sending end 120, the preset data is also written in the media resource file, where the preset data may specifically be data formed by a specific character string, and after the service data and the preset data are written in the media resource file, the preset data has a position-limited relationship with the service data in the media resource file in which the service data and the preset data are written, that is, the file data of the media resource file includes the service data and the preset data, and the preset data is used as known data, and the position of the preset data (i.e., the position of the preset data in the file data) is used for limiting the position of the service data.
Step S202, determining preset data for performing data matching in the media resource file.
In this step, the receiving end 110 may determine preset data for performing data matching in the media resource file after receiving the media resource file containing the service data from the sending end 120. As mentioned above, the preset data is known, and specifically may be data composed of a specific character string, in practical applications, the receiving end 110 may perform information interaction with the sending end 120 in advance, and the sending end 120 may agree with the receiving end 110 with the preset data for performing data matching on the media resource file sent from the sending end 120, so that the receiving end 110 may obtain the preset data that is agreed in advance for performing data matching in the media resource file after receiving the media resource file.
Step S203, performing data matching in the file data of the media resource file according to the preset data, and determining the target data limited by the position of the preset data in the file data.
And step S204, obtaining service data according to the target data.
In the above steps S203 and S204, after the receiving end 110 obtains the media resource file and the preset data, the receiving end 110 performs data matching in the file data of the media resource file according to the preset data, that is, retrieves the position of the preset data in the file data, if the preset data is composed of a specific character string, in step S203, the receiving end 110 searches the file data of the media resource file for the position of the specific character string, and after obtaining the position of the preset data in the file data, the receiving end can determine the target data defined by the position of the preset data accordingly, and then in step S204, the receiving end 110 can use the target data as the service data to complete the process of parsing the service data from the media resource file.
The method of the embodiment can quickly and accurately extract the service data from the file data of the media resource file based on a data matching mode, so that the dependence of a receiving end on an ffmpeg frame can be removed, the increase of a volume packet is effectively avoided, developers do not need to be skilled in mastering the packaging format of the media resource file, the use complexity is reduced, and the use cost is greatly reduced.
In some of these embodiments, the preset data may include preset header data and preset trailer data; the performing data matching in the file data of the media resource file according to the preset data in step S203 to determine the target data defined by the position of the preset data in the file data may include:
performing data matching in the file data of the media resource file according to the preset head data to obtain the back-stage file data of the media resource file from the position of the preset head data; and performing data matching in the back-stage file data according to the preset tail data to obtain target data of the back-stage file data which is stopped before the position of the preset tail data.
In this embodiment, the preset data may include preset header data and preset trailer data, specifically, when the sending end 120 writes the service data and the preset data into the media resource file, the preset data is respectively added to the head and the tail of the service data, the preset data added to the head of the service data is referred to as preset header data, the preset data added to the tail of the service data is referred to as preset trailer data, both the preset header data and the preset trailer data may be composed of specific character strings, the two preset data may be different to improve the retrieval efficiency, for example, the preset header data may be "export mp4 [", the preset trailer data may be "] ] export mp4", the preset service data is represented as data, and the sending end 120 writes the "export mp4[ [ data ] ] export mp4" into the media resource file. Therefore, after obtaining the media resource file and determining the preset header data and the preset trailer data, the receiving end 110 may first perform data matching in the file data of the media resource file according to the preset header data, so as to obtain data, called as the next file data, in the file data of the media resource file beginning after the position of the preset header data, and then perform data matching in the next file data according to the preset trailer data, so as to obtain data, which is the target data, of the next file data ending before the position of the preset trailer data. According to the scheme of this embodiment, the service data can be quickly and accurately extracted and obtained based on the data matching between the preset header data and the preset trailer data that are set at the head and the tail of the service data at the sending end 120.
In some other embodiments, the preset data may include preset header data and preset trailer data; the performing data matching in the file data of the media resource file according to the preset data in step S203 to determine the target data defined by the position where the preset data is located in the file data may include:
performing data matching in the file data of the media resource file according to the preset tail data to acquire front-segment file data of the media resource file, which is suspended before the position of the preset tail data; and performing data matching in the front-segment file data according to the preset head data to obtain target data starting from the position of the preset head data in the front-segment file data.
In this embodiment, the preset data includes preset header data and preset trailer data, when the sender 120 writes the service data and the preset data into the media resource file, the preset header data is added to the header of the service data, and the preset trailer data is added to the trailer of the service data, so as to write the expropump 4[ [ data ] ] expropump 4 "into the media resource file. Corresponding to the above embodiment, after obtaining the media resource file and determining the preset header data and the preset trailer data, the receiving end 110 may first perform data matching in the file data of the media resource file according to the preset trailer data, so as to obtain data where the file data of the media resource file is suspended before the position of the preset trailer data, where the data is called front-segment file data, and then perform data matching in the front-segment file data according to the preset header data, so as to obtain data beginning after the position of the preset header data in the front-segment file data, where the data is the target data. In the solution of this embodiment, data matching based on the preset header data and the preset trailer data that are set at the head and the tail of the service data at the sending end 120 may also be implemented, so as to quickly and accurately extract and obtain the service data.
As an application example of the method of the present application, referring to fig. 3, the sending end 120 may still use ffmpeg to encapsulate the media resource, when encapsulating the media resource, the sending end 120 may write the service data into a Metadata section of the MP4 file, and then when writing the service data, add preset header data "export MP4[ [" and preset tail data "] ] export MP4", and by adding the preset header data and the preset tail data, write the "export MP4[ [ data ] ] export MP4" into the MP4 file, and then send the MP4 file to the receiving end 110. Therefore, when the receiving end 110 receives the MP4 file, the data of the MP4 file can be directly read, and the service data can be analyzed in a data matching manner, so that the dependence of the receiving end 110 on the ffmpeg frame can be eliminated, developers do not need to master the packaging format of media resource files such as the MP4 file, the use complexity is reduced, and the use cost is reduced. Specifically, after receiving the MP4 file, the receiving end 110 may load the MP4 file into the memory, read the file data, may first traverse to obtain preset header data "export MP4 [", obtain the back-end file data starting after the position of the preset header data when the preset header data is matched, then traverse to obtain preset tail data "]exportmp 4" based on the back-end file data, and obtain the target data of the back-end file data ending before the position of the preset tail data when the preset tail data is matched, where the target data is the service data inserted into the Metadata section by the sending end 120, and after the service data is analyzed, the service layer may use the service data.
In an embodiment, as shown in fig. 4, a method for processing service data in a media resource is provided, where the method is executable by a sending end 120, and specifically includes the following steps:
step S401, acquiring service data and determining preset data.
In this step, the sending end 120 obtains the service data that needs to be written into the media resource file, and determines the preset data. Illustratively, the service data may be related data such as a mask position of a video frame, the preset data may specifically be data formed by a specific character string, the sending end 120 may perform information interaction with the receiving end 110 in advance, and the sending end 120 may agree with the receiving end 110 with the preset data, so that the receiving end 110 is used for performing data matching on a media resource file sent from the sending end 120.
And step S402, obtaining a data combination to be written according to the service data and the preset data.
In this step, the sending end 120 obtains a data combination to be written according to the service data and the preset data, where the data combination includes the service data and the preset data, and may be composed of the service data and the preset data, and the preset data is used for performing position limitation on the service data in the data combination. As an example, the preset data may include preset header data and preset trailer data, and step S402 may include: and adding preset head data at the head of the business data and preset tail data at the tail of the business data to obtain a data combination to be written. Specifically, the sending end 120 may add preset header data "exportmp4 [" at the head of the service data, and then add preset tail data "] ] exportmp4" at the tail of the service data, so as to obtain a data combination to be written as "exportmp4[ [ data ] ] exportmp4", thereby facilitating the receiving end 110 to quickly and accurately parse the service data from the media resource file based on data matching.
Step S403, writing the data combination into the media resource file to obtain a media resource file containing the service data.
Specifically, the sender 120 may write the data combination "export mp4[ [ data ] ] export mp4" into the media resource file, so as to obtain the media resource file containing the service data.
Step S404, the media resource file containing the service data is sent to the receiving end, so that the receiving end performs data matching in the file data of the media resource file according to the preset data, determines the target data limited by the position of the preset data in the file data, and obtains the service data.
In this step, after obtaining the media resource file including the service data, the sending end 120 may send the media resource file including the service data to the receiving end 110, and after receiving the media resource file, the receiving end 110 may perform data matching in the file data of the media resource file according to preset data that is predetermined in advance, so as to determine target data defined by a position where the preset data is located in the file data of the media resource file, so as to obtain the service data. The specific parsing manner of the service data in the media resource file by the receiving end 110 may refer to the related contents disclosed in the foregoing embodiments, and is not described herein again.
According to the method of the embodiment, the sending end 120 obtains the data combination to be written according to the service data and the preset data, writes the data combination into the media resource file, and sends the media resource file to the receiving end 110, so that the receiving end 110 can extract the service data from the media resource file quickly and accurately based on a data matching mode, dependence of the receiving end on an ffmpeg frame can be removed, increase of a volume packet is effectively avoided, developers do not need to master the packaging format of the media resource file skillfully, use complexity is reduced, and use cost is greatly reduced.
In one embodiment, as shown in fig. 5, a live system is provided that may include a live server and a terminal. The live broadcast server can be in communication connection with the terminal through the Internet. The live broadcast server may be configured to write live broadcast service data into a live broadcast media resource file according to the method for processing service data in a media resource executed by the sending end 120 as described above, and send the live broadcast service data to the terminal, where the live broadcast service data may specifically be data such as whether a video frame includes a background element, and a shade-related position of the video frame. The terminal may be configured to obtain live broadcast service data from a live broadcast media resource file from the live broadcast server and use the live broadcast service data according to the method for processing service data in a media resource performed by the receiving end 110 as described above.
According to the scheme of the embodiment, the method for processing the service data in the media resource can be applied to the live broadcast system, so that each terminal added into the live broadcast system can quickly and accurately extract and apply the live broadcast service data from the live broadcast media resource file sent by the live broadcast server based on a data matching mode, dependence of each terminal on an ffmpeg frame can be removed, increase of a volume package is effectively avoided, developers do not need to master the packaging format of the live broadcast media resource file skillfully, the use complexity is reduced, and the use cost is greatly reduced.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a device for processing service data in a media resource, which is used for implementing the above-mentioned method for processing service data in a media resource. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the method, so specific limitations in one or more apparatus embodiments for processing service data in a media resource provided below may refer to the limitations on the method for processing service data in a media resource described above, and are not described herein again.
In one embodiment, as shown in fig. 6, an apparatus for processing service data in a media resource is provided, where the apparatus 600 may include:
a file obtaining module 601, configured to obtain a media resource file; the media resource file comprises service data;
a data determining module 602, configured to determine preset data for performing data matching in the media resource file;
the data matching module 603 is configured to perform data matching in file data of the media resource file according to the preset data, and determine target data defined by a position where the preset data is located in the file data;
a data obtaining module 604, configured to obtain the service data according to the target data.
In one embodiment, the preset data includes preset header data and preset trailer data; a data matching module 603, configured to perform data matching in the file data of the media resource file according to the preset header data, and obtain a later file data, starting from a position of the preset header data, in the file data of the media resource file; and performing data matching in the back-end file data according to the preset tail data to obtain target data of the back-end file data which is stopped before the position of the preset tail data.
In one embodiment, the preset data includes preset header data and preset trailer data; a data matching module 603, configured to perform data matching in the file data of the media resource file according to the preset tail data, and obtain a previous-segment file data of the media resource file, where the file data of the media resource file is suspended before a position of the preset tail data; and performing data matching in the front-segment file data according to the preset head data to obtain target data starting from the position of the preset head data in the front-segment file data.
In one embodiment, as shown in fig. 7, an apparatus for processing service data in a media resource is provided, and the apparatus 700 may include:
a data obtaining module 701, configured to obtain service data and determine preset data;
a combination obtaining module 702, configured to obtain a data combination to be written according to the service data and preset data; wherein the data combination comprises the service data and preset data; the preset data is used for limiting the position of the business data in the data combination;
a data writing module 703, configured to write the data combination into a media resource file, so as to obtain a media resource file containing the service data;
the file sending module 704 is configured to send the media resource file including the service data to a receiving end, so that the receiving end performs data matching in the file data of the media resource file according to the preset data, and determines target data defined by a position where the preset data is located in the file data, to obtain the service data.
In one embodiment, the preset data includes preset header data and preset trailer data; a combination obtaining module 702, configured to add the preset header data to the head of the service data and add the preset trailer data to the tail of the service data, so as to obtain the data combination to be written.
The modules in the device for processing service data in media resources can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the electronic device, or can be stored in a memory in the electronic device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, an electronic device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 8. The electronic device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic 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 an operating system and computer programs in the non-volatile storage medium. The database of the electronic device may be used to store business data, preset data, media resource files, and the like. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a method of processing traffic data in a media asset.
In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The electronic device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device is used for communicating with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of processing traffic data in a media asset. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configurations shown in fig. 8 and 9 are merely block diagrams of some configurations relevant to the present disclosure, and do not constitute a limitation on the electronic devices to which the present disclosure may be applied, and a particular electronic device may include more or less components than those shown in the figures, or may combine certain components, or have a different arrangement of components.
In one embodiment, an electronic device is further provided, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method for processing service data in a media resource, the method comprising:
acquiring a media resource file; the media resource file comprises service data;
determining preset data for performing data matching in the media resource file;
performing data matching in file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data;
and obtaining the service data according to the target data.
2. The method of claim 1, wherein the preset data comprises preset header data and preset trailer data; the data matching in the file data of the media resource file according to the preset data to determine the target data limited by the position of the preset data in the file data comprises:
performing data matching in the file data of the media resource file according to the preset head data to obtain the back-stage file data of the media resource file, which starts from the position behind the preset head data;
and performing data matching in the back-end file data according to the preset tail data to obtain target data of the back-end file data which is stopped before the position of the preset tail data.
3. The method of claim 1, wherein the preset data comprises preset header data and preset trailer data; performing data matching in file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data, including:
performing data matching in the file data of the media resource file according to the preset tail data to acquire front-segment file data of the media resource file, wherein the file data of the media resource file is stopped before the position of the preset tail data;
and performing data matching in the front-segment file data according to the preset head data to obtain target data starting from the position of the preset head data in the front-segment file data.
4. A method for processing traffic data in a media resource, the method comprising:
acquiring service data and determining preset data;
obtaining a data combination to be written according to the service data and preset data; the data combination comprises the service data and preset data; the preset data is used for limiting the position of the business data in the data combination;
writing the data combination into a media resource file to obtain the media resource file containing the service data;
and sending the media resource file containing the service data to a receiving end so that the receiving end can perform data matching in the file data of the media resource file according to the preset data, and determining target data limited by the position of the preset data in the file data to obtain the service data.
5. The method of claim 4, wherein the preset data comprises preset header data and preset trailer data; the obtaining a data combination to be written according to the service data and preset data includes:
and adding the preset head data at the head of the service data and adding the preset tail data at the tail of the service data to obtain the data combination to be written.
6. An apparatus for processing traffic data in a media resource, the apparatus comprising:
the file acquisition module is used for acquiring a media resource file; the media resource file comprises service data;
the data determining module is used for determining preset data for performing data matching in the media resource file;
the data matching module is used for performing data matching in file data of the media resource file according to the preset data and determining target data limited by the position of the preset data in the file data;
and the data obtaining module is used for obtaining the service data according to the target data.
7. An apparatus for processing traffic data in a media resource, the apparatus comprising:
the data acquisition module is used for acquiring service data and determining preset data;
the combination obtaining module is used for obtaining a data combination to be written according to the service data and preset data; wherein the data combination comprises the service data and preset data; the preset data is used for limiting the position of the business data in the data combination;
the data writing module is used for writing the data combination into a media resource file to obtain the media resource file containing the service data;
and the file sending module is used for sending the media resource file containing the service data to a receiving end so that the receiving end can perform data matching in the file data of the media resource file according to the preset data, and determine target data limited by the position of the preset data in the file data to obtain the service data.
8. A live broadcast system, the system comprising: a live broadcast server and a terminal; wherein, the first and the second end of the pipe are connected with each other,
the live broadcast server is used for writing live broadcast service data into a live broadcast media resource file and sending the live broadcast media resource file to the terminal according to the method of any one of claims 4 to 5;
the terminal, configured to obtain the live service data from a live media resource file from the live server according to the method of any one of claims 1 to 3.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 3 or of any of claims 4 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3 or of any one of claims 4 to 5.
CN202211028360.3A 2022-08-25 Method, device, live broadcast system, equipment and medium for processing business data in media resource Active CN115396687B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211028360.3A CN115396687B (en) 2022-08-25 Method, device, live broadcast system, equipment and medium for processing business data in media resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211028360.3A CN115396687B (en) 2022-08-25 Method, device, live broadcast system, equipment and medium for processing business data in media resource

Publications (2)

Publication Number Publication Date
CN115396687A true CN115396687A (en) 2022-11-25
CN115396687B CN115396687B (en) 2024-06-21

Family

ID=

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102509A (en) * 2007-08-03 2008-01-09 中兴通讯股份有限公司 A data synchronization method for mobile multimedia broadcast system
CN101222290A (en) * 2007-11-09 2008-07-16 北京创毅视讯科技有限公司 Data transmission method, emission system and terminal in broadcasting system
CN101442521A (en) * 2007-11-20 2009-05-27 中兴通讯股份有限公司 Method for encapsulating, sending and receiving mobile multimedia broadcast data
CN101540915A (en) * 2009-04-30 2009-09-23 中兴通讯股份有限公司 Method for transmitting mobile multimedia broadcasting data, front-end system and terminal
CN101729519A (en) * 2008-10-22 2010-06-09 中卫星空移动多媒体网络有限公司 Method for transmitting IP/UDP mapping data on mobile multimedia broadcasting channel
WO2010102425A1 (en) * 2009-03-13 2010-09-16 上海贝尔股份有限公司 Evolved-multimedia broadcast multicast service packet transmission method, gateway and base station
CN108848060A (en) * 2018-05-17 2018-11-20 上海哔哩哔哩科技有限公司 A kind of multimedia file processing method, processing system and computer readable storage medium
CN109981607A (en) * 2019-03-07 2019-07-05 深圳市商汤科技有限公司 Media stream processing method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102509A (en) * 2007-08-03 2008-01-09 中兴通讯股份有限公司 A data synchronization method for mobile multimedia broadcast system
CN101222290A (en) * 2007-11-09 2008-07-16 北京创毅视讯科技有限公司 Data transmission method, emission system and terminal in broadcasting system
CN101442521A (en) * 2007-11-20 2009-05-27 中兴通讯股份有限公司 Method for encapsulating, sending and receiving mobile multimedia broadcast data
CN101729519A (en) * 2008-10-22 2010-06-09 中卫星空移动多媒体网络有限公司 Method for transmitting IP/UDP mapping data on mobile multimedia broadcasting channel
WO2010102425A1 (en) * 2009-03-13 2010-09-16 上海贝尔股份有限公司 Evolved-multimedia broadcast multicast service packet transmission method, gateway and base station
CN101540915A (en) * 2009-04-30 2009-09-23 中兴通讯股份有限公司 Method for transmitting mobile multimedia broadcasting data, front-end system and terminal
CN108848060A (en) * 2018-05-17 2018-11-20 上海哔哩哔哩科技有限公司 A kind of multimedia file processing method, processing system and computer readable storage medium
CN109981607A (en) * 2019-03-07 2019-07-05 深圳市商汤科技有限公司 Media stream processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20240020421A1 (en) Distributed application architectures using blockchain and distributed file systems
CN109582473A (en) Across chain data access method and device based on block chain
CN104995895A (en) Compatibly extending offload token size
CN113721862B (en) Data processing method and device
CN114756627B (en) Alliance-chain-based digital asset processing method, system and storage medium
CN115470156A (en) RDMA-based memory use method, system, electronic device and storage medium
CN115396687B (en) Method, device, live broadcast system, equipment and medium for processing business data in media resource
CN115396687A (en) Method, device, live broadcast system and equipment for processing service data in media resource
CN114924911B (en) Method, device, equipment and storage medium for backing up effective data of Windows operating system
US20120239713A1 (en) Variants of files in a file system
CN113360095B (en) Hard disk data management method, device, equipment and medium
CN114329152A (en) Application program generation method, device, equipment and medium based on browser engine
CN115730016B (en) Data synchronization method, system, device, computer equipment and storage medium
CN114036171B (en) Application data management method, device, computer equipment and storage medium
CN104424238B (en) A kind of method, apparatus that mass file generates
CN115118616B (en) Display result testing method, device, computer equipment and storage medium
CN115587074A (en) Method, device, live broadcast system, equipment and medium for generating special-effect resource file
CN115834953A (en) Special effect resource rendering method and device, live broadcast system, equipment and storage medium
CN116662143A (en) Test method, apparatus, device, storage medium and computer program product
CN117201335A (en) Resource access processing method, device, computer equipment and storage medium
CN118193396A (en) Test method, test apparatus, computer device, storage medium, and program product
CN118200314A (en) File interaction method, device, computer equipment and storage medium
CN116258597A (en) Document processing method, device, computer equipment and storage medium
CN118245699A (en) Page acquisition method, device, equipment, storage medium and computer program product
CN118193083A (en) Software resource loading method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant