CN117768715A - Data processing system, method, equipment and storage medium - Google Patents

Data processing system, method, equipment and storage medium Download PDF

Info

Publication number
CN117768715A
CN117768715A CN202410197475.8A CN202410197475A CN117768715A CN 117768715 A CN117768715 A CN 117768715A CN 202410197475 A CN202410197475 A CN 202410197475A CN 117768715 A CN117768715 A CN 117768715A
Authority
CN
China
Prior art keywords
audio
data
processed
fragments
data packets
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
CN202410197475.8A
Other languages
Chinese (zh)
Other versions
CN117768715B (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.)
Beijing Sohu New Media Information Technology Co Ltd
Original Assignee
Beijing Sohu New Media 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 Beijing Sohu New Media Information Technology Co Ltd filed Critical Beijing Sohu New Media Information Technology Co Ltd
Priority to CN202410197475.8A priority Critical patent/CN117768715B/en
Publication of CN117768715A publication Critical patent/CN117768715A/en
Application granted granted Critical
Publication of CN117768715B publication Critical patent/CN117768715B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data processing system, a data processing method, data processing equipment and a storage medium. The system comprises an input module, an output module and a scheduling module; the input module is used for processing the data to be processed corresponding to the audio task to be processed, obtaining a plurality of data packets corresponding to the data to be processed and sending the data packets to the scheduling module; the scheduling module is used for sending the plurality of data packets and the coding task information corresponding to the audio task to be processed to the output module; the output module is used for encoding the first audio fragments respectively included in the data packets based on the encoding task information to obtain a plurality of second audio fragments in an M3U8 format, and sending third identifiers respectively associated with the second audio fragments and the second audio fragments to the scheduling module; the scheduling module is used for assembling the plurality of second audio fragments based on third identifiers respectively associated with the plurality of second audio fragments to obtain the target audio file. Thus, the live broadcast requirement of the client on the audio data can be realized.

Description

Data processing system, method, equipment and storage medium
Technical Field
the present application relates to the field of computer technologies, and in particular, to a data processing system, a data processing method, a data processing device, and a storage medium.
Background
With the rapid development of technology, audio and video playing applications are becoming more and more widespread. For example, the video media can meet the playing requirement of the client by live broadcast or on demand.
However, in practical applications, for audio data, a feasible scheme is not perfect, which can realize the live broadcasting requirement of audio, resulting in poor development of live broadcasting application of audio media such as audio radio stations and car audio.
Disclosure of Invention
The embodiment of the application provides a data processing system, a method, equipment and a storage medium, which are used for realizing the live broadcast requirement of a client on audio data and are beneficial to the development of live broadcast application of an audio medium.
In a first aspect, an embodiment of the present application provides a data processing system, including an input module, an output module, and a scheduling module;
The input module is used for processing to-be-processed data corresponding to an to-be-processed audio task, obtaining a plurality of data packets corresponding to the to-be-processed data and sending the data packets to the scheduling module, wherein each data packet in the plurality of data packets comprises a first audio slice of the to-be-processed data, a first identifier of the first audio slice and a second identifier of the to-be-processed audio task, and the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice;
the scheduling module is used for sending the plurality of data packets and the coding task information corresponding to the audio task to be processed to the output module;
The output module is configured to encode the first audio slices respectively included in the plurality of data packets based on the encoding task information to obtain a plurality of second audio slices in M3U8 format, and send third identifiers respectively associated with the plurality of second audio slices to the scheduling module, where the third identifiers respectively associated with the plurality of second audio slices are in one-to-one correspondence with the first identifiers respectively associated with the first audio slices included in the plurality of data packets;
The scheduling module is configured to assemble the plurality of second audio fragments based on third identifiers respectively associated with the plurality of second audio fragments, so as to obtain a target audio file corresponding to the audio task to be processed, where the target audio file is in an M3U8 format.
Optionally, the output module is further configured to:
Sending the access address information corresponding to the second identifier and the plurality of second audio fragments to the scheduling module;
The scheduling module is further configured to:
Inserting access address information and a third identifier corresponding to the plurality of second audio fragments into a jump table associated with the second identifier in a database; the skip list comprises a plurality of nodes, the plurality of nodes are arranged according to the sequence from small to large of third identifiers corresponding to the plurality of second audio fragments respectively, and one node in the plurality of nodes is used for storing one second audio fragment in the plurality of second audio fragments.
optionally, the scheduling module is further configured to:
Acquiring the jump table from the database based on the second identification;
And based on the playing mode of the target audio file, acquiring the plurality of second audio fragments in the target audio file from the skip list.
optionally, the scheduling module is specifically configured to:
When the playing mode is on demand, traversing the plurality of nodes according to the sequence from small to large of the third identifiers respectively corresponding to the plurality of second audio fragments to obtain the plurality of second audio fragments;
when the playing mode is live broadcast, traversing the nodes arranged after the starting point by taking the node arranged at the nth last in the jump table as the starting point to obtain a second audio fragment corresponding to the nodes arranged after the starting point, wherein n is more than or equal to 1 and less than or equal to m, and m is the total amount of the nodes in the jump table.
optionally, the input module is specifically configured to:
Acquiring a byte stream based on the data to be processed, and determining the type of the byte stream;
and processing the byte stream based on a processing mode corresponding to the type of the byte stream to obtain first audio fragments respectively included by the data packets.
optionally, the input module is specifically configured to:
When the type of the byte stream is a text type, processing sensitive words in the byte stream of the text type to obtain a processing result, performing word segmentation processing on the processing result to obtain a plurality of segmented words, and performing voice synthesis on the plurality of segmented words to obtain first audio fragments respectively included in the plurality of data packets;
when the type of the byte stream is a video type, slicing the byte stream of the video type to obtain a plurality of slicing results, and respectively extracting audio data in the plurality of slicing results to obtain first audio slicing respectively included in the plurality of data packets;
and when the type of the byte stream is an audio type, slicing the byte stream of the audio type to obtain first audio slices respectively included in the data packets.
Optionally, the output module is further configured to:
when any one of the plurality of first audio fragments fails to encode, sending a failure reminding message to the scheduling module;
The scheduling module is further configured to:
and in response to the failure reminding message, the plurality of data packets and the coding task information corresponding to the audio task to be processed are sent to the output module again.
In a second aspect, an embodiment of the present application provides a data processing method, applied to a data processing system, where the data processing system includes an input module, an output module, and a scheduling module; the data processing method comprises the following steps:
The input module processes to-be-processed data corresponding to an to-be-processed audio task, a plurality of data packets corresponding to the to-be-processed data are obtained and sent to the scheduling module, each data packet in the plurality of data packets comprises a first audio slice of the to-be-processed data, a first identifier of the first audio slice, and a second identifier of the to-be-processed audio task, wherein the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice;
the scheduling module sends the data packets and the coding task information corresponding to the audio task to be processed to the output module;
the output module encodes the first audio fragments respectively included in the plurality of data packets based on the encoding task information to obtain a plurality of second audio fragments in an M3U8 format, and sends third identifiers respectively associated with the plurality of second audio fragments to the scheduling module, wherein the third identifiers respectively associated with the plurality of second audio fragments are in one-to-one correspondence with the first identifiers respectively included in the plurality of data packets;
And the scheduling module assembles the plurality of second audio fragments based on third identifiers respectively associated with the plurality of second audio fragments to obtain a target audio file corresponding to the audio task to be processed, wherein the target audio file is in an M3U8 format.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, memory, system bus;
The processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform any of the implementations of the data processing methods described above.
in a fourth aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored therein that, when executed on an electronic device, cause the electronic device to perform any implementation of the above-described data processing method.
From the above technical solutions, the embodiment of the present application has the following advantages:
In the embodiment of the application, the data processing system can comprise an input module, an output module and a scheduling module, wherein the input module can process the data to be processed corresponding to the audio task to be processed, obtain a plurality of data packets corresponding to the data to be processed and send the data packets to the scheduling module. Each data packet comprises a first audio slice of data to be processed, a first identifier of the first audio slice, and a second identifier of an audio task to be processed, wherein the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice. And then, the scheduling module can send the data packets and the coding task information corresponding to the audio task to be processed to the output module. Then, the output module may encode the first audio fragments respectively included in the plurality of data packets based on the encoding task information to obtain a plurality of second audio fragments in M3U8 format, and send third identifiers respectively associated with the plurality of second audio fragments and the plurality of second audio fragments to the scheduling module. The third identifiers respectively associated with the second audio fragments are in one-to-one correspondence with the first identifiers respectively included in the data packets. Finally, the scheduling module can assemble the plurality of second audio fragments based on the third identifiers respectively associated with the plurality of second audio fragments to obtain a target audio file corresponding to the audio task to be processed, wherein the target audio file is in an M3U8 format. Therefore, through the cooperation of the input module, the scheduling module and the output module, a plurality of first audio fragments corresponding to the data to be processed can be converted into the target audio file in the M3U8 format according to the respective generation sequence, and the M3U8 format is used as a text file format for defining the multimedia play list, so that a series of audio and video files played in sequence can be described, after the target audio file in the M3U8 format is obtained, the client can acquire and sequentially play the audio files which are divided into small fragments in the target audio file, namely, the second audio fragments, thereby providing smooth live broadcast pictures for the client, realizing the live broadcast requirements of the client on the audio data, and being beneficial to the development of live broadcast application of audio media.
Drawings
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of another data processing system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data packet according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a scheduling process performed by a scheduling module according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating an implementation process of a scheduling module for inserting data into a skip list according to an embodiment of the present application;
fig. 6 is a flowchart of a data processing method according to an embodiment of the present application.
Detailed Description
As described above, in practical applications, there is no perfect and feasible scheme for audio data to realize the live broadcasting of audio, which results in poor development of live broadcasting applications of audio media such as audio radio stations and car audio. In particular, video live broadcast may currently be implemented through a streaming media transmission protocol based on the M3U8 format, but there is no mature, viable solution for audio data that can implement audio live broadcast based on the M3U8 format.
In order to solve the above problems, an embodiment of the present application provides a data processing system, which may include an input module, an output module, and a scheduling module, where the input module may process to-be-processed data corresponding to an to-be-processed audio task, obtain a plurality of data packets corresponding to the to-be-processed data, and send the data packets to the scheduling module. Each data packet comprises a first audio slice of data to be processed, a first identifier of the first audio slice, and a second identifier of an audio task to be processed, wherein the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice. And then, the scheduling module can send the data packets and the coding task information corresponding to the audio task to be processed to the output module. Then, the output module may encode the first audio fragments respectively included in the plurality of data packets based on the encoding task information to obtain a plurality of second audio fragments in M3U8 format, and send third identifiers respectively associated with the plurality of second audio fragments and the plurality of second audio fragments to the scheduling module. The third identifiers respectively associated with the second audio fragments are in one-to-one correspondence with the first identifiers respectively included in the data packets. Finally, the scheduling module can assemble the plurality of second audio fragments based on the third identifiers respectively associated with the plurality of second audio fragments to obtain a target audio file corresponding to the audio task to be processed, wherein the target audio file is in an M3U8 format.
Therefore, through the cooperation of the input module, the scheduling module and the output module, a plurality of first audio fragments corresponding to the data to be processed can be converted into the target audio file in the M3U8 format according to the respective generation sequence, and the M3U8 format is used as a text file format for defining the multimedia play list, so that a series of audio and video files played in sequence can be described, after the target audio file in the M3U8 format is obtained, the client can acquire and sequentially play the audio files which are divided into small fragments in the target audio file, namely, the second audio fragments, thereby providing smooth live broadcast pictures for the client, realizing the live broadcast requirements of the client on the audio data, and being beneficial to the development of live broadcast application of audio media.
in order to make the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present application. With reference to fig. 1, a data processing system provided in an embodiment of the present application may include an input module, an output module, and a scheduling module.
Specifically, the input module is configured to process to-be-processed data corresponding to the to-be-processed audio task, obtain a plurality of data packets corresponding to the to-be-processed data, and send the data packets to the scheduling module. Each data packet in the plurality of data packets comprises a first audio slice of data to be processed, a first identifier of the first audio slice, and a second identifier of an audio task to be processed, wherein the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice.
And the scheduling module is used for sending the plurality of data packets and the coding task information corresponding to the audio task to be processed to the output module.
The output module is used for encoding the first audio fragments respectively included in the data packets based on the encoding task information to obtain a plurality of second audio fragments in an M3U8 format, and sending third identifiers respectively associated with the second audio fragments and the second audio fragments to the scheduling module.
The third identifiers respectively associated with the second audio fragments are in one-to-one correspondence with the first identifiers respectively included in the data packets.
And the scheduling module is used for assembling the plurality of second audio fragments based on the third identifiers respectively associated with the plurality of second audio fragments to obtain a target audio file corresponding to the audio task to be processed. The target audio file is in M3U8 format.
in the embodiment of the application, the input module is used as a starting point of triggering the audio task to be processed and is a stateless service. Where stateless services may refer to the input module not being dependent on local state and being able to handle in the same way for each request. This means that any one instance of the input module can handle requests from clients without an association between the requests. As an input module for stateless services, horizontal expansion may be supported, i.e., by adding more copies to handle more request traffic.
In practical application, for the acquisition process of the plurality of first audio slices, the input module may be specifically configured to: acquiring a byte stream based on data to be processed, and determining the type of the byte stream; and processing the byte stream based on a processing mode corresponding to the type of the byte stream to obtain first audio fragments respectively included by the plurality of data packets. In this way, the input module can be suitable for processing various byte streams, so that a plurality of first audio fragments can be accurately obtained, the data processing system can conveniently obtain the target audio file in the M3U8 format according to the plurality of first audio fragments, a smooth live broadcast picture is provided for a client, and the live broadcast requirement of the client on audio data is met.
The data to be processed may be different types of data, such as file type data, network resource data, and real-time byte stream. Based on this, in the embodiment of the present application, the input module may acquire the byte stream corresponding to the data to be processed based on the processing mode corresponding to the type of the data to be processed. Specifically, for file type data, the Input module may obtain specific content of the file type data through a file Input/Output (I/O) mechanism provided by an operating system, and convert the specific content into a byte stream; for network resource data, the input module may send a request to the network server via the socket, and the network server may generate response data in the form of byte streams in response to the request, and return the byte streams to the input module via the socket; for real-time byte streams, the input module may connect with the remote device through a socket, receiving the byte stream from the remote device in real-time.
Further, the byte stream may also be embodied in different types, such as text type, video type, or audio type. Based on this, in the embodiment of the present application, the input module may be specifically configured to: when the type of the byte stream is a text type, processing sensitive words in the byte stream of the text type to obtain a processing result, performing word segmentation processing on the processing result to obtain a plurality of segmented words, and performing voice synthesis on the plurality of segmented words to obtain first audio fragments respectively included in a plurality of data packets; when the byte stream is of a video type, slicing the byte stream of the video type to obtain a plurality of slicing results, and respectively extracting audio data in the plurality of slicing results to obtain first audio slicing respectively included in a plurality of data packets; when the byte stream is of an audio type, slicing the byte stream of the audio type to obtain first audio slices respectively included in the plurality of data packets. In this way, the input module can be suitable for processing various types of byte streams, so as to accurately acquire a plurality of first audio clips.
In practice, the input module may include a data upload unit and a plurality of pipeline units. Wherein each pipeline unit may include at least one data processing subunit, and different byte streams may be processed by different pipeline units, so as to obtain a first audio slice respectively included in the plurality of data packets; the data uploading unit is used for sending the obtained plurality of first audio fragments to the scheduling module. For ease of understanding, the following description is directed to the processing of different types of byte streams, respectively.
FIG. 2 is a schematic diagram of another data processing system according to an embodiment of the present application. As shown in connection with fig. 2, for a byte stream of a literal type, the data processing sub-units comprised by the pipeline unit may be embodied as a sensitive word processing unit, a word segmentation processing unit and a speech synthesis unit. The sensitive word processing unit is used for processing the sensitive words in the word stream of the word type to obtain a processing result; the word segmentation processing unit is used for carrying out word segmentation processing on the processing result to obtain a plurality of segmented words; and the voice synthesis unit is used for carrying out voice synthesis on the plurality of word fragments to obtain first audio fragments respectively included in the plurality of data packets. Therefore, the text content, namely the text stream of the text type, can be converted into the audio content through the pipeline unit in the input module, so that the target audio file in the M3U8 format can be generated later, a smooth live broadcast picture is provided for the client, and the live broadcast requirement of the client on the audio data is realized.
For a byte stream of video type, the data processing subunit comprised by the pipeline unit may be embodied as a first slice processing unit and an audio extraction unit. The first slicing processing unit is used for slicing the byte stream of the video type to obtain a plurality of slicing results; and the audio extraction is used for respectively extracting the audio data in the plurality of segmentation results to obtain first audio segmentation respectively included in the plurality of data packets. In this way, the video content, namely, the byte stream of the video type can be converted into the audio content through the pipeline unit in the input module, so that the target audio file in the M3U8 format can be generated later, a smooth live broadcast picture is provided for the client, and the live broadcast requirement of the client on the audio data is realized.
For byte streams of audio type, the data processing subunit comprised by the pipeline unit may be embodied as a second slice processing unit and an audio extraction unit. The second slicing processing unit is configured to slice the byte stream of the audio type to obtain first audio slices respectively included in the plurality of data packets.
In addition, in practical applications, the number of audio tasks to be processed is large, and one system may need to process hundreds of audio tasks to be processed at the same time, so that slices of data to be processed corresponding to the audio tasks to be processed, that is, a plurality of first audio slices, are also needed, and the data to be processed can be efficiently and accurately assembled into corresponding target audio files. Based on this, in the embodiment of the present application, a data packet corresponding to the data to be processed may also be provided. For ease of understanding, an exemplary description is provided below in connection with FIG. 3.
Fig. 3 is a schematic structural diagram of a data packet according to an embodiment of the present application. Referring to fig. 3, each of the plurality of data packets corresponding to the data to be processed may include a first audio slice corresponding to the data to be processed, a first identifier of the first audio slice, and a second identifier of the audio task to be processed, where the first identifier of the first audio slice is used to represent a generation sequence of the first audio slice. The second identifier of the audio task to be processed may be used to determine a unique audio task to be processed, for example, the number is used as the second identifier, and the number of the audio task to be processed 1 may be 00A and be recorded as the audio task to be processed 00A. And the first identification of the first audio slice is used to represent the order of generation of the first audio slice, the first identification may be incrementally represented based on the order of generation of the first audio slice. For example, taking the number as the first identifier of the first audio slice, in the same audio task 1 to be processed, the number of the first audio slice generated first based on the data to be processed is 01, and the number of the second generated first audio slice is 02, and sequentially increasing until the numbers of the first audio slices are acquired. For ease of understanding, fig. 3 illustrates an example of 3 data packets. The number of the data packets is not specifically limited in the embodiment of the present application, and the specific number of the data packets may correspond to the number of the first audio slices.
In the embodiment of the application, the scheduling module is used as a transfer station of the input module and the output module, can configure coding task information corresponding to the task to be processed, and schedules a plurality of data packets to the output module for coding processing according to the coding task information. For ease of understanding, the scheduling process performed by the scheduling module is described by way of example below in connection with fig. 4.
Fig. 4 is a schematic diagram of a scheduling process performed by a scheduling module according to an embodiment of the present application. In practical applications, as shown in fig. 4, the output module may include a plurality of output actuators, each of which may encode the first audio slice. Based on this, in the embodiment of the present application, the scheduling module may perform intelligent distribution for multiple output executors, that is, reasonably distribute multiple first audio slices to different output executors, so as to achieve the purposes of optimizing resource usage, maximizing throughput, minimizing response time, and avoiding overload. Specifically, the scheduling module may send the plurality of first audio slices and the encoding task information to the plurality of output executors, where the number of the first audio slices received by each output executor may be the same or different, which may not be specifically limited in the embodiment of the present application. The coding task information corresponding to the audio task to be processed may include a target code rate, a container format, a coding mode, and the like. The plurality of output executors can encode the received first audio fragments based on the encoding task information, so that a plurality of second audio fragments in an M3U8 format are obtained, third identifiers respectively associated with the second audio fragments and the second audio fragments are sent to the scheduling module, and the scheduling module further assembles the second audio fragments to obtain the target audio file. Here, the output module performs the encoding process of the plurality of first audio slices, and the scheduling module performs the assembling process of the second audio slices, that is, splits the two processes into different modules for processing, so as to help to maximize the utilization of system resources as much as possible. Fig. 4 is an illustration of only 3 output actuators, and does not limit the number of output actuators.
Further, as shown in connection with fig. 2, in practical applications, the output module may comprise a pipeline unit. The pipeline unit may include an parsing unit, an encoding unit, and a data uploading unit. The analysis unit can be used for analyzing the coding task information corresponding to the audio task to be processed, which is sent by the modulation module, so as to obtain an analysis result; the coding unit can be used for coding the first audio fragments in the first data packets based on the analysis result to obtain a plurality of second audio fragments in an M3U8 format; and the data uploading unit can be used for uploading the plurality of second audio fragments to the database for storage and feeding back the coding result to the scheduling unit. Wherein the coding unit may be implemented by using FFMPEG (a multimedia processing tool) or JavaCV (a packaging library composed of a plurality of open computer vision libraries).
In addition, in the embodiment of the present application, when the encoding of the output module is successful, the encoding result may include access address information corresponding to each of the plurality of second audio slices, third identifiers associated with each of the plurality of second audio slices, and second identifiers of the audio tasks to be processed. That is, in addition to the aforementioned plurality of second audio tiles, and the third identifications to which the plurality of second audio tiles are respectively associated, the output module may be further configured to: and sending the second identification and access address information corresponding to the plurality of second audio fragments to a scheduling module.
Corresponding to this, the scheduling module may be further configured to: and inserting the access address information and the third identifier corresponding to the second audio fragments into a skip list associated with the second identifier in the database. The basic idea of the jump table is to lift up part of nodes in the linked list to different levels to form a multi-layer linked list structure. The skip list includes a plurality of index layers, which refer to subsets of the original data ordered in some way, each index layer containing pointers to the next index layer or original data, so that the skip list can implement efficient data queries by maintaining the index layers. In this way, in the embodiment of the present application, the scheduling module can efficiently and orderly acquire and play the plurality of second audio clips in the target audio file in the M3U8 format through the data structure of the skip list.
For ease of understanding, the implementation of the insertion of relevant data into the jump table by the scheduling module is described below in connection with a binary tree form. Fig. 5 is a schematic diagram of an implementation process of inserting data into a skip list by a scheduling module according to an embodiment of the present application. As shown in fig. 5, the skip list includes a plurality of nodes, the plurality of nodes are arranged in order from small to large according to third identifiers corresponding to the plurality of second audio slices, respectively, and one node of the plurality of nodes is used for storing one second audio slice of the plurality of second audio slices. It should be noted that, fig. 5 only illustrates the third identifiers respectively associated with 3 output actuators and 8 second audio slices as an example, and the number of output actuators and the number of second audio slices are not limited.
In addition, the scheduling module may associate a third identifier with the hit key of the database. The database may be implemented by Redis, since the remote dictionary service (Remote Dictionary Server, redis) may support rich data structures, may also enable access rates based on memory queries, and Redis is more matched to the M3U8 format of the sharding sequence, i.e., the second audio shard. It should be noted that, in the embodiment of the present application, when the playing mode of the target audio file is live, the dis may temporarily store the second audio fragment in M3U8 format, and transfer the second audio fragment to the static memory after the live is finished.
Further, when the target audio file needs to be played, the skip list in the database can be read through the scheduling module, so that the target audio file in the M3U8 format is issued. Based on this, in the embodiment of the present application, the scheduling module may be further configured to: acquiring a jump table from the database based on the second identification; and based on the playing mode of the target audio file, acquiring a plurality of second audio fragments in the target audio file from the skip list. The M3U8 format is used as a text file format for defining a multimedia play list, and may describe a series of audio/video files that are played sequentially, so that the playing mode of the target audio file may be live broadcast or on-demand. For easy understanding, the implementation process of the scheduling module is described below in connection with different playing modes, respectively.
As an example, the scheduling module may be specifically configured to: and traversing the plurality of nodes according to the sequence from small to large of the third identifiers respectively corresponding to the plurality of second audio fragments when the playing mode is on demand, so as to obtain the plurality of second audio fragments. In the foregoing, the third identifiers respectively associated with the plurality of second audio fragments are in one-to-one correspondence with the first identifiers respectively associated with the first audio fragments included in the plurality of data packets, and the first identifiers of the first audio fragments are used for indicating the generation sequence of the first audio fragments, so that the target audio file can be accurately and effectively played according to the normal play sequence by traversing the third identifiers from small to large. And when the playing mode is live broadcast, traversing the nodes arranged after the starting point by taking the node arranged at the nth last in the skip list as the starting point to obtain a second audio fragment corresponding to the nodes arranged after the starting point, wherein n is more than or equal to 1 and less than or equal to m, and m is the total amount of the nodes in the skip list. The overall delay condition of the live broadcast can be adjusted by adjusting the value of n.
Furthermore, as mentioned above, the output module may encode a plurality of first audio slices. Thus, when the output module fails to encode, the encoding result may include a failure alert message. Further, in order to improve the fault tolerance of the data processing system, in the embodiment of the present application, the output module may be further configured to: and when any one of the plurality of first audio fragments fails to encode, sending a failure reminding message to the scheduling module. Correspondingly, the scheduling module may be further configured to: and in response to the failure reminding message, the plurality of data packets and the coding task information corresponding to the audio task to be processed are sent to the output module again. Therefore, retry scheduling is performed through the scheduling module, so that the fault tolerance of the data processing system is improved, the coding success rate of the first audio fragment is improved, and the target file in the M3U8 format is accurately obtained.
Based on the above related content of the data processing system, in the embodiment of the present application, the data processing system may include an input module, an output module and a scheduling module, where the input module may process to-be-processed data corresponding to an audio task to be processed, obtain a plurality of data packets corresponding to the to-be-processed data, and send the data packets to the scheduling module. Each data packet comprises a first audio slice of data to be processed, a first identifier of the first audio slice, and a second identifier of an audio task to be processed, wherein the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice. And then, the scheduling module can send the data packets and the coding task information corresponding to the audio task to be processed to the output module. Then, the output module may encode the first audio fragments respectively included in the plurality of data packets based on the encoding task information to obtain a plurality of second audio fragments in M3U8 format, and send third identifiers respectively associated with the plurality of second audio fragments and the plurality of second audio fragments to the scheduling module. The third identifiers respectively associated with the second audio fragments are in one-to-one correspondence with the first identifiers respectively included in the data packets. Finally, the scheduling module can assemble the plurality of second audio fragments based on the third identifiers respectively associated with the plurality of second audio fragments to obtain a target audio file corresponding to the audio task to be processed, wherein the target audio file is in an M3U8 format. Therefore, through the cooperation of the input module, the scheduling module and the output module, a plurality of first audio fragments corresponding to the data to be processed can be converted into the target audio file in the M3U8 format according to the respective generation sequence, and the M3U8 format is used as a text file format for defining the multimedia play list, so that a series of audio and video files played in sequence can be described, after the target audio file in the M3U8 format is obtained, the client can acquire and sequentially play the audio files which are divided into small fragments in the target audio file, namely, the second audio fragments, thereby providing smooth live broadcast pictures for the client, realizing the live broadcast requirements of the client on the audio data, and being beneficial to the development of live broadcast application of audio media.
further, based on the data processing system provided in the above embodiment, the embodiment of the present application may also provide a data processing method. The data processing method is described below with reference to the embodiments and drawings, respectively.
Fig. 6 is a flowchart of a data processing method according to an embodiment of the present application. Referring to fig. 6, a data processing method provided by an embodiment of the present application may include:
S601: and the input module processes the data to be processed corresponding to the audio task to be processed, obtains a plurality of data packets corresponding to the data to be processed and sends the data packets to the scheduling module.
Each data packet in the plurality of data packets comprises a first audio fragment of the data to be processed, a first identifier of the first audio fragment, and a second identifier of the audio task to be processed, wherein the first identifier of the first audio fragment is used for representing the generation sequence of the first audio fragment.
S602: and the scheduling module sends the data packets and the coding task information corresponding to the audio task to be processed to the output module.
S603: the output module encodes the first audio fragments respectively included in the data packets based on the encoding task information to obtain a plurality of second audio fragments in an M3U8 format, and sends third identifiers respectively associated with the second audio fragments and the second audio fragments to the scheduling module.
The third identifiers respectively associated with the second audio fragments are in one-to-one correspondence with the first identifiers respectively included in the data packets.
S604: and the scheduling module assembles the plurality of second audio fragments based on third identifiers respectively associated with the plurality of second audio fragments to obtain a target audio file corresponding to the audio task to be processed.
wherein the target audio file is in an M3U8 format.
As an embodiment, the data processing method further includes:
The output module sends the second identification and access address information corresponding to the plurality of second audio fragments to the scheduling module;
The scheduling module inserts the access address information and the third identifier corresponding to the second audio fragments into a jump table associated with the second identifier in a database; the skip list comprises a plurality of nodes, the plurality of nodes are arranged according to the sequence from small to large of third identifiers corresponding to the plurality of second audio fragments respectively, and one node in the plurality of nodes is used for storing one second audio fragment in the plurality of second audio fragments.
As an embodiment, the data processing method further includes:
the scheduling module acquires the jump table from the database based on the second identification;
the scheduling module obtains the plurality of second audio fragments in the target audio file from the skip list based on the playing mode of the target audio file.
As one embodiment, the scheduling module obtains the plurality of second audio clips in the target audio file from the skip list based on the playing mode of the target audio file, including:
When the playing mode is on demand, the scheduling module traverses the plurality of nodes according to the sequence from small to large of the third identifiers respectively corresponding to the plurality of second audio fragments to obtain the plurality of second audio fragments;
When the playing mode is live broadcast, the scheduling module uses the node arranged at the nth node in the skip list as a starting point, traverses the node arranged behind the starting point to obtain a second audio fragment corresponding to the node arranged behind the starting point, n is more than or equal to 1 and less than or equal to m, and m is the total amount of the nodes in the skip list.
As an implementation manner, the processing, by the input module, to-be-processed data corresponding to an audio task to be processed, to obtain a plurality of data packets corresponding to the to-be-processed data, includes:
the input module acquires a byte stream based on the data to be processed and determines the type of the byte stream;
and the input module processes the byte stream based on a processing mode corresponding to the type of the byte stream to obtain first audio fragments respectively included by the data packets.
As an implementation manner, the input module processes the byte stream based on a processing manner corresponding to the type of the byte stream, to obtain first audio slices respectively included in the plurality of data packets, where the processing manner includes:
When the type of the byte stream is a text type, the input module processes sensitive words in the byte stream of the text type to obtain a processing result, performs word segmentation processing on the processing result to obtain a plurality of segmented words, and performs voice synthesis on the plurality of segmented words to obtain first audio fragments respectively included in the plurality of data packets;
when the byte stream is of a video type, the input module segments the byte stream of the video type to obtain a plurality of segmentation results, and respectively extracts audio data in the segmentation results to obtain first audio segmentation which is respectively included in the data packets;
And when the byte stream is of an audio type, the input module segments the byte stream of the audio type to obtain first audio segments respectively included in the data packets.
As an embodiment, the data processing method further includes:
When any one of the plurality of first audio fragments fails to encode, the output module sends a failure reminding message to the scheduling module;
and the scheduling module responds to the failure reminding message and sends the data packets and the coding task information corresponding to the audio task to be processed to the output module again.
It should be noted that, the embodiment of the present application may not limit the execution subject of the data processing method, for example, the data processing method of the embodiment of the present application may be applied to a data processing device such as a terminal device or a server. The terminal device may be an electronic device such as a smart phone, a computer, a personal digital assistant (Personal Digital Assistant, PDA), a tablet computer, etc. The servers may be stand alone servers, clustered servers, or cloud servers.
further, an embodiment of the present application further provides an electronic device, including: a processor, memory, system bus;
The processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform any of the implementations of the data processing methods described above.
Further, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, which when run on an electronic device, cause the terminal device to execute any implementation manner of the data processing method.
From the above description of embodiments, it will be apparent to those skilled in the art that all or part of the steps of the above described example methods may be implemented in software plus necessary general purpose hardware platforms. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application. It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data processing system, comprising an input module, an output module and a scheduling module;
The input module is used for processing to-be-processed data corresponding to an to-be-processed audio task, obtaining a plurality of data packets corresponding to the to-be-processed data and sending the data packets to the scheduling module, wherein each data packet in the plurality of data packets comprises a first audio slice of the to-be-processed data, a first identifier of the first audio slice and a second identifier of the to-be-processed audio task, and the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice;
the scheduling module is used for sending the plurality of data packets and the coding task information corresponding to the audio task to be processed to the output module;
The output module is configured to encode the first audio slices respectively included in the plurality of data packets based on the encoding task information to obtain a plurality of second audio slices in M3U8 format, and send third identifiers respectively associated with the plurality of second audio slices to the scheduling module, where the third identifiers respectively associated with the plurality of second audio slices are in one-to-one correspondence with the first identifiers respectively associated with the first audio slices included in the plurality of data packets;
The scheduling module is configured to assemble the plurality of second audio fragments based on third identifiers respectively associated with the plurality of second audio fragments, so as to obtain a target audio file corresponding to the audio task to be processed, where the target audio file is in an M3U8 format.
2. The data processing system of claim 1, wherein the output module is further configured to:
Sending the access address information corresponding to the second identifier and the plurality of second audio fragments to the scheduling module;
The scheduling module is further configured to:
Inserting access address information and a third identifier corresponding to the plurality of second audio fragments into a jump table associated with the second identifier in a database; the skip list comprises a plurality of nodes, the plurality of nodes are arranged according to the sequence from small to large of third identifiers corresponding to the plurality of second audio fragments respectively, and one node in the plurality of nodes is used for storing one second audio fragment in the plurality of second audio fragments.
3. The data processing system of claim 2, wherein the scheduling module is further configured to:
Acquiring the jump table from the database based on the second identification;
And based on the playing mode of the target audio file, acquiring the plurality of second audio fragments in the target audio file from the skip list.
4. A data processing system according to claim 3, characterized in that the scheduling module is specifically configured to:
When the playing mode is on demand, traversing the plurality of nodes according to the sequence from small to large of the third identifiers respectively corresponding to the plurality of second audio fragments to obtain the plurality of second audio fragments;
when the playing mode is live broadcast, traversing the nodes arranged after the starting point by taking the node arranged at the nth last in the jump table as the starting point to obtain a second audio fragment corresponding to the nodes arranged after the starting point, wherein n is more than or equal to 1 and less than or equal to m, and m is the total amount of the nodes in the jump table.
5. the data processing system according to claim 1, wherein the input module is specifically configured to:
Acquiring a byte stream based on the data to be processed, and determining the type of the byte stream;
and processing the byte stream based on a processing mode corresponding to the type of the byte stream to obtain first audio fragments respectively included by the data packets.
6. The data processing system of claim 5, wherein the input module is specifically configured to:
When the type of the byte stream is a text type, processing sensitive words in the byte stream of the text type to obtain a processing result, performing word segmentation processing on the processing result to obtain a plurality of segmented words, and performing voice synthesis on the plurality of segmented words to obtain first audio fragments respectively included in the plurality of data packets;
when the type of the byte stream is a video type, slicing the byte stream of the video type to obtain a plurality of slicing results, and respectively extracting audio data in the plurality of slicing results to obtain first audio slicing respectively included in the plurality of data packets;
and when the type of the byte stream is an audio type, slicing the byte stream of the audio type to obtain first audio slices respectively included in the data packets.
7. The data processing system of any of claims 1 to 6, wherein the output module is further configured to:
when any one of the plurality of first audio fragments fails to encode, sending a failure reminding message to the scheduling module;
The scheduling module is further configured to:
and in response to the failure reminding message, the plurality of data packets and the coding task information corresponding to the audio task to be processed are sent to the output module again.
8. The data processing method is characterized by being applied to a data processing system, wherein the data processing system comprises an input module, an output module and a scheduling module; the data processing method comprises the following steps:
The input module processes to-be-processed data corresponding to an to-be-processed audio task, a plurality of data packets corresponding to the to-be-processed data are obtained and sent to the scheduling module, each data packet in the plurality of data packets comprises a first audio slice of the to-be-processed data, a first identifier of the first audio slice, and a second identifier of the to-be-processed audio task, wherein the first identifier of the first audio slice is used for representing the generation sequence of the first audio slice;
the scheduling module sends the data packets and the coding task information corresponding to the audio task to be processed to the output module;
the output module encodes the first audio fragments respectively included in the plurality of data packets based on the encoding task information to obtain a plurality of second audio fragments in an M3U8 format, and sends third identifiers respectively associated with the plurality of second audio fragments to the scheduling module, wherein the third identifiers respectively associated with the plurality of second audio fragments are in one-to-one correspondence with the first identifiers respectively included in the plurality of data packets;
And the scheduling module assembles the plurality of second audio fragments based on third identifiers respectively associated with the plurality of second audio fragments to obtain a target audio file corresponding to the audio task to be processed, wherein the target audio file is in an M3U8 format.
9. An electronic device, the device comprising: a processor, memory, system bus;
The processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the data processing method of claim 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein instructions, which when run on an electronic device, cause the electronic device to perform the data processing method of claim 8.
CN202410197475.8A 2024-02-22 2024-02-22 Data processing system, method, equipment and storage medium Active CN117768715B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410197475.8A CN117768715B (en) 2024-02-22 2024-02-22 Data processing system, method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410197475.8A CN117768715B (en) 2024-02-22 2024-02-22 Data processing system, method, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117768715A true CN117768715A (en) 2024-03-26
CN117768715B CN117768715B (en) 2024-05-28

Family

ID=90326116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410197475.8A Active CN117768715B (en) 2024-02-22 2024-02-22 Data processing system, method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117768715B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303754A (en) * 2016-08-04 2017-01-04 天脉聚源(北京)传媒科技有限公司 A kind of audio data play method and device
CN110149518A (en) * 2018-02-12 2019-08-20 腾讯科技(深圳)有限公司 Processing method, system, device, equipment and the storage medium of media data
US20220256226A1 (en) * 2019-09-04 2022-08-11 Beijing Bytedance Network Technology Co., Ltd. Video data processing method, electronic device and computer-readable medium
CN115065669A (en) * 2022-05-16 2022-09-16 深圳追一科技有限公司 Audio transmission method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303754A (en) * 2016-08-04 2017-01-04 天脉聚源(北京)传媒科技有限公司 A kind of audio data play method and device
CN110149518A (en) * 2018-02-12 2019-08-20 腾讯科技(深圳)有限公司 Processing method, system, device, equipment and the storage medium of media data
US20220256226A1 (en) * 2019-09-04 2022-08-11 Beijing Bytedance Network Technology Co., Ltd. Video data processing method, electronic device and computer-readable medium
CN115065669A (en) * 2022-05-16 2022-09-16 深圳追一科技有限公司 Audio transmission method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117768715B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN102123303B (en) Audio/video file playing method and system as well as transmission control device
CN101889425B (en) Apparatus and method for simulcast over variable bandwidth channel
RU2527210C1 (en) Method and system for transmitting data from web server to client terminal devices via wireless local area communication network
CN105451031B (en) Video transcoding method and system
CN1941899A (en) System and method for downloading contents
WO2013159703A1 (en) Offline download method, multimedia file download method and system thereof
US20070011699A1 (en) Providing identification of broadcast transmission pieces
EP1880520A2 (en) Scheduling client feedback during streaming sessions
CN101646076A (en) Video transmission method in wireless network
CN104902343A (en) Methods for transmitting and playing audio/video and message, server and terminal
CN104737518A (en) Systems and methods for data representation and transportation
CN109634988B (en) Monitoring polling method and device
CN111629283B (en) Multi-stream media gateway service system and method
CN103813185A (en) Method, server and client for quickly distributing segmented programs
CN109802992B (en) Method and device for reading and writing resource change log
CN103716681A (en) Code stream switching method and electronic equipment
WO2023061060A1 (en) Audio and video code stream scheduling method, system, medium and electronic apparatus
CN101048965A (en) Method of distributing multimedia content
CN117768715B (en) Data processing system, method, equipment and storage medium
CN109600635B (en) System and method for pushing information according to intelligent television video on demand
CN102387121A (en) Management server, image dissemination control system and image dissemination control method
CN109302384B (en) Data processing method and system
CN101227245A (en) Metadata information providing server, client apparatus, method of providing metadata information
CN1468002A (en) Flow media compression, transmission and storage system based on internet
CN1695135A (en) System and method for the packaging and distribution of data

Legal Events

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