Data processing method and apparatus, and electronic device and storage medium
Through the pipelined data processing process, pipeline management and pipeline classes are used to solve the problem of poor maintainability of existing data processing codes, and the high maintainability and scalability of data processing methods are achieved.
Patent Information
- Application Number
- PCT/CN2024/116352
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-01
- Filing Date
- 2024-09-02
- Publication Date
- 2025-03-06
AI Technical Summary
The poor maintainability of existing data processing codes makes it difficult to effectively manage and expand when maintaining data processing methods.
By introducing the concepts of pipeline management and pipeline classes, the data processing process is pipelined. Each pipeline is independently responsible for specific processing functions. It determines the current pipeline class through the pipeline management class and transmits data. It decides whether to continue processing based on the next pipeline indication information.
It improves the maintainability of data processing methods, only needs to maintain pipeline classes that need to be maintained, simplifies the data processing process, and improves the reusability and scalability of code.
Smart Images

Figure CN2024116352_06032025_PF_FP_ABST
Abstract
Description
Data processing method, device, electronic device and storage medium
[0001] This application claims priority to the Chinese invention patent application entitled “A data processing method, device, electronic device and storage medium” and application number 2023111263334, filed on September 1, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field
[0002] The present disclosure relates to data processing technology, and more particularly to a data processing method, device, electronic device, and storage medium. Background Art
[0003] With the continuous development of computer technology, the amount of data that needs to be processed is increasing day by day. At present, when processing data, software development is always carried out for the purpose of data processing, and the maintainability of the developed code is poor.
[0004] Summary of the Invention
[0005] The present disclosure provides a data processing method, device, electronic device, and storage medium to improve the maintainability of data processing.
[0006] In a first aspect, an embodiment of the present disclosure provides a data processing method, comprising: determining a current pipeline class of media data to be processed through a pipeline management class; transmitting the media data to be processed to the current pipeline class through the pipeline management class; processing the media data to be processed through the current pipeline class and next pipeline indication information corresponding to the current pipeline class to obtain processed media data, wherein the next pipeline indication information is used to indicate whether there is a next pipeline class that processes the media data to be processed.
[0007] In a second aspect, an embodiment of the present disclosure further provides a data processing device, including: a determination module, configured to determine a current pipeline class of media data to be processed through a pipeline management class; a transmission module, configured to transmit the media data to be processed to the current pipeline class through the pipeline management class; and a processing module, configured to process the media data to be processed through the current pipeline class and next pipeline indication information corresponding to the current pipeline class to obtain processed media data, wherein the next pipeline indication information is used to indicate whether there is a next pipeline class for processing the media data to be processed.
[0008] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processing devices; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method provided in the present disclosure.
[0009] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the data processing method provided by the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0011] FIG1 is a flow chart of a data processing method provided by an embodiment of the present disclosure;
[0012] FIG2 is a flow chart of a data processing method provided by an embodiment of the present disclosure;
[0013] FIG3 is a class diagram of a data processing method provided by an embodiment of the present disclosure;
[0014] FIG4 is a schematic diagram of a scenario of a data processing method provided by an embodiment of the present disclosure;
[0015] FIG5 is a schematic structural diagram of a data processing device provided by an embodiment of the present disclosure;
[0016] FIG6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0018] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0019] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0024] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0025] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0026] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0027] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0028] Figure 1 is a flow chart of a data processing method provided by an embodiment of the present disclosure. This embodiment of the present disclosure is applicable to data processing. The method can be executed by a data processing device, which can be implemented in the form of software and / or hardware. Alternatively, the method can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.
[0029] As shown in FIG1 , the method includes:
[0030] S110: Determine the current pipeline class of the media data to be processed through the pipeline management class.
[0031] The pipeline management class can be considered a class that implements pipeline management. In this embodiment, media data processing is abstracted into multimedia data processing via pipelines. The code for each pipeline in this disclosure is independent and does not affect each other. Each pipeline can have an independent function. The function of a pipeline can be determined based on the media data to be processed. Media data can be data in any media format, such as text, sound, image, or video. The media data to be processed can be considered the media data to be processed.
[0032] In one embodiment, when the media data is audio data, the functions of the pipeline include but are not limited to: echo cancellation, pitch determination, adding environmental sound effects, saving, implementing headphone reverse listening, and dumping.
[0033] In one embodiment, when the media data is image data, the functions of the pipeline include but are not limited to: adding filters, adjusting resolution, adding special effects, and saving.
[0034] In the present disclosure, the pipeline is implemented through a pipeline class, which includes a current pipeline class and a next pipeline class. The current pipeline class can be the currently executed pipeline class, and the next pipeline class can be the next executed pipeline class.
[0035] The function of the pipeline management class can be to implement pipeline class management, such as determining the head pipeline of the media data to be processed. The head pipeline can be the first pipeline to process the data to be processed. The head pipeline class can be considered as the class that implements the head pipeline function.
[0036] In this embodiment, the pipeline class indicated in the pipeline management class may be determined as the current pipeline class for processing the media data to be processed.
[0037] S120: Transfer the pending media data to the current pipeline class via the pipeline management class. After the pipeline management class determines the current pipeline class, the pending media data can be transferred to the current pipeline class via a transmission method in the pipeline management class. The transmission method may be a method for implementing data transmission, or a transmission method for implementing an interface.
[0038] S130: Process the media data to be processed using the current pipeline class and next pipeline indication information corresponding to the current pipeline class to obtain processed media data, where the next pipeline indication information indicates whether there is a next pipeline class that processes the media data to be processed.
[0039] The next pipeline indication information can be considered as information indicating the next pipeline class. The next pipeline class is used to process the pending media data. If the next pipeline indication information indicates the next pipeline class, it can be considered that the next pipeline class exists and the pending media data needs to continue to be processed by the next pipeline class. If the next pipeline indication information does not indicate the next pipeline class, it can be considered that the next pipeline class does not exist, and the current pipeline class is also called the last pipeline class, and processing of the pending media data can be terminated. The last pipeline class can be considered the last pipeline class to process the pending media data.
[0040] This embodiment does not limit the means for determining that the next pipe indication information does not indicate the next pipe type. For example, if the next pipe indication information is empty or is set information, it can be determined that the next pipe indication information does not indicate the next pipe type.
[0041] In this step, when processing the media data to be processed through the current pipeline class and the next pipeline indication information corresponding to the current pipeline class, the media data to be processed can be processed through the current pipeline class, and whether to end the processing can be determined through the next pipeline indication information.
[0042] When the next pipeline indication information does not indicate the next pipeline class, the processing result of the current pipeline class is used as the processed media data.
[0043] When the next pipeline indication information indicates a next pipeline class, the processing result of the current pipeline class is continued to be processed by the next pipeline class. During the processing, the next pipeline class is used as the new current pipeline class, and the processing of the media data to be processed by the current pipeline class and the next pipeline indication information corresponding to the current pipeline class is continued until the next pipeline indication information indicates the end of processing.
[0044] The technical solution of the disclosed embodiment determines the current pipeline class of the media data to be processed through a pipeline management class; transmits the media data to be processed to the current pipeline class through the pipeline management class; processes the media data to be processed through the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data. In the process of processing the media data to be processed to obtain the processed media data, the processing steps are pipelined, and the processing of the media data to be processed is implemented through the pipeline class, solving the problem of poor maintainability of existing data processing code. When the data processing method needs to be maintained, only the pipeline class that needs to be maintained needs to be maintained, thereby improving the maintainability of the data processing method.
[0045] Based on the above embodiment, a modified embodiment of the above embodiment is proposed. It should be noted that, in order to simplify the description, only the differences from the above embodiment are described in the modified embodiment.
[0046] In one embodiment, determining the current pipeline class of the to-be-processed media data through the pipeline management class includes: determining head pipeline indication information of the current pipeline class through the pipeline management class, and determining the pipeline class indicated by the head pipeline indication information as the current pipeline class.
[0047] The head pipeline indication information can be considered as indication information of the pipeline class determined in the pipeline management class. The head pipeline indication information indicates the head pipeline class for processing the media data to be processed.
[0048] The pipeline management class may store head pipeline indication information, and the pipeline class indicated by the head pipeline indication information may be used as the current pipeline class.
[0049] In one embodiment, the pipe management class may store head pipe indication information indicating the echo cancellation pipe class. In this embodiment, the echo cancellation pipe class may be used as the current pipe class.
[0050] The pipeline management class can indicate multiple head pipeline indication information, each head pipeline indication information can correspond to its own pipeline class, each pipeline class can be used as a head pipeline class, each head pipeline class is a different branch for processing media data, and the processing means of each branch can be independent.
[0051] The multiple head pipe indication information indicated in the pipe management class may be stored in the form of a list, and the specific storage method is not limited here.
[0052] FIG2 is a flow chart of a data processing method provided by an embodiment of the present disclosure. This embodiment refines the specific operations of processing the media data to be processed. The data processing method includes the following steps.
[0053] S210: Determine the current pipeline class of the media data to be processed through the pipeline management class.
[0054] S220: Transfer the to-be-processed media data to the current pipeline class through the pipeline management class.
[0055] S230: Process the to-be-processed media data through the current pipeline class to obtain intermediate media data.
[0056] Intermediate media data can be considered the result of processing the pending data by the current pipeline class. Intermediate media data can be determined based on the pipeline function of the current pipeline class. For example, if the current pipeline class implements echo cancellation, the intermediate media data can be the data after echo cancellation has been performed on the pending media data. For another example, if the current pipeline class determines pitch, the intermediate media data can be the media data after pitch determination. For another example, if the current pipeline class adds ambient sound, the intermediate media data can be the media data after ambient sound has been added.
[0057] S240: Determine whether to determine the intermediate media data as processed media data based on the next pipeline indication information corresponding to the current pipeline class.
[0058] After obtaining the intermediate media data, this embodiment can determine the content indicated by the next pipeline indication information based on the current pipeline class. Based on the determined content, it is determined whether to designate the intermediate media data as processed media data. If processing is complete, the intermediate media data can be used as processed media data. If processing is not complete, the intermediate media data can continue to be processed based on the next pipeline class indicated by the next pipeline indication information until the next pipeline indication information indicates that processing is complete.
[0059] In one embodiment, if the next pipeline indication information indicates the end of processing (also known as if the next pipeline indication information does not indicate a next pipeline class), the intermediate media data is determined as processed media data. If the next pipeline indication information indicates a next pipeline class, the next pipeline class is used as the new current pipeline class, and processing of the pending media data continues based on the current pipeline class and the corresponding next pipeline class.
[0060] The data processing method provided in this embodiment determines whether to use intermediate media data as processed media data when the current pipeline class processes the pending media data using the corresponding next pipeline indication information. This method determines whether the next pipeline class is required to process the pending media data and uses the next pipeline indication information to determine the execution order of the various pipeline classes.
[0061] Based on the above embodiment, a modified embodiment of the above embodiment is proposed. It should be noted that, in order to simplify the description, only the differences from the above embodiment are described in the modified embodiment.
[0062] In one embodiment, determining whether to determine the intermediate media data as processed media data based on the next pipeline indication information corresponding to the current pipeline class includes:
[0063] When it is determined through the current pipeline class that the next pipeline indication information corresponding to the current pipeline class indicates that the current pipeline class is a tail pipeline class, the intermediate media data is determined as processed media data.
[0064] The tail pipeline class may be the last pipeline class executed among the pipeline classes processing the media data to be processed, for example, the last pipeline class used when achieving the purpose of processing the media data to be processed.
[0065] In one embodiment, the purpose of processing the to-be-processed media data is to add an ambient sound effect and save it. The head pipeline class may be a pipeline class for adding the sound effect, and the tail pipeline class may be a pipeline class for saving the media data.
[0066] When the next pipeline indication information indicates that the current pipeline class is the tail pipeline class, it can be considered that the processing of the to-be-processed media data can be completed after the current pipeline class is executed, so the intermediate media data can be determined as the processed media data.
[0067] In one embodiment, determining whether to determine the intermediate media data as processed media data according to the next pipeline indication information corresponding to the current pipeline class includes: determining the next pipeline indication information corresponding to the current pipeline class according to the current pipeline class.
[0068] If the next pipeline indication information indicates that a next pipeline class exists, the next pipeline class is used as the current pipeline class, and the intermediate media data is used as the media data to be processed. The media data to be processed is processed using the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data.
[0069] When the next pipeline indication information indicates the existence of a next pipeline class, the intermediate media data needs to be further processed through the next pipeline class. Therefore, this embodiment determines the next pipeline class as the current pipeline class, determines the intermediate media data as the media data to be processed, and continues to process the media data to be processed using the current pipeline class and the next pipeline indication information corresponding to the current pipeline class, thereby obtaining processed media data.
[0070] In one embodiment, each current pipeline class inherits from the same base class, and each current pipeline class executes a corresponding processing method based on the base class to process the media data to be processed. The pipeline interface of the base class is used for media data transmission.
[0071] All current pipeline classes implementing data processing in this disclosure inherit from the same base class. This base class implements the pipeline interface and abstracts processing methods. Current pipeline classes with different functions can abstract different processing methods for processing the media data being processed, such as methods for echo cancellation, pitch determination, and / or background sound addition.
[0072] The base class implements the pipeline interface, which is used to transmit media data. The media data transmitted is not limited here; different pipeline classes can transmit different media data. The media data transmitted by the pipeline class can include both media data obtained by the pipeline class and media data sent by the pipeline class.
[0073] In one embodiment, when the media data to be processed is audio and the audio processing includes echo cancellation and storage, the head pipeline class can be an echo cancellation pipeline class, and the next pipeline class can be a storage pipeline class. When the next pipeline class is executed, the next pipeline class is used as the current pipeline class. When the echo cancellation pipeline class is used as the current pipeline class, the transmitted media data includes the media data to be processed and the media data after echo cancellation. The media data after echo cancellation can be used as the media data to be processed by the storage pipeline class, and the media data obtained by the storage pipeline class is the media data after echo cancellation.
[0074] Figure 3 is a class diagram of a data processing method provided by an embodiment of the present disclosure. The Pitch class can be a pipeline class for determining pitch. The Sound Effect class can be a pipeline class for adding sound effects. The Save File class can be a pipeline class for saving. The Pitch class, Sound Effect class, and Save class inherit (also known as extend) a base class. The Pitch class uses (also known as use) the Sound Effect class. The Sound Effect class uses the Save File class.
[0075] The next channel indicator in the base class can indicate the next channel. Processing methods can implement transmission and data processing. For example, a transmission method, processAudio, can be included. This method can then call the actual processing method, realProcess, to implement the functions of each channel. The base class implements the channel interface, which can declare processing methods.
[0076] The pipeline management class may include a head pipeline indication, indicating the head pipeline. The processing method in the pipeline management class transfers the media data to be processed to the head pipeline class corresponding to the head pipeline for processing. After the head pipeline is processed, the subsequent processing strategy can be determined based on the next pipeline indication information in the head pipeline class.
[0077] In one embodiment, the media data to be processed is audio data, and the processing method corresponding to the current association class is an audio processing method.
[0078] When the media data to be processed is audio data, the processing method executed by the pipeline class is an audio processing method. The specific processing means of the audio processing method is not limited here, as long as it can achieve the required function.
[0079] Figure 4 is a schematic diagram of a data processing method provided by an embodiment of the present disclosure. Figure 4 illustrates three methods for processing media data to be processed, each of which can be independent of one another. The media data to be processed can be raw audio data, which is input to a pipeline management class, which determines the head pipeline for processing the raw audio data.
[0080] One approach is to first perform echo cancellation, then obtain real-time pitch, add ambient sound effects, and finally save the audio data. Another approach is to add ambient sound effects and then perform headphone feedback. Still another approach is to dump the raw data—that is, the original audio data.
[0081] In the above three-axis processing mode, each processing mode is executed separately, and the pipeline management class may store the identifiers of the pipeline class for echo cancellation, the pipeline class for adding ambient sound effects, and the pipeline class for dumping in the form of a list.
[0082] In the first processing method, the head pipeline class is the pipeline class for echo cancellation. After this pipeline class processes the original audio data as the current pipeline class, the next pipeline class is determined to be the pipeline class for obtaining real-time pitch through the next pipeline indication information corresponding to the current pipeline class. The pipeline class for obtaining real-time pitch is determined as the new current pipeline class, and the process of obtaining real-time pitch is executed. The next pipeline class is determined to be the pipeline class for adding environmental sound effects through the next pipeline indication information corresponding to the pipeline class for obtaining real-time pitch. The pipeline class for adding environmental sound effects is used as the current pipeline class, and the process of adding environmental sound effects is executed. The next pipeline class indicated by the next pipeline indication information in the management class for adding environmental sound effects is determined to be the pipeline class for storing audio data. The pipeline class for storing audio data is used as the current pipeline class, and the process of storing audio data is executed. If the next pipeline indication information in the pipeline class for storing audio data indicates that the processing is completed, the processing is terminated, such as stopping the operation.
[0083] In the second processing method, after adding the pipeline class of the ambient sound effect as the current pipeline class, the pipeline class of the headphone reverse listening is used as the next pipeline class to realize the headphone reverse listening.
[0084] In the third processing method, the head pipeline is the tail pipeline, and the operation is ended after the dump is implemented through the dump pipeline class.
[0085] This embodiment does not limit the purpose of determining the pitch, and the audio can be scored based on the comparison between the pitch obtained in real time and the theoretical pitch.
[0086] The data processing method provided by the present invention can be considered as an audio data link management method, and the operating system of the application is not limited, such as application to the Android operating system. Specifically, the scenario of realizing audio data recording in the Android scenario. The recorded audio data (such as the recorded singing audio) can be processed in multiple steps, and the data processed in one step is the data input of the next step. For example, it is necessary to balance the volume of the audio data, adjust the tone, obtain audio-related data (such as pitch, etc.) and / or save the audio data. When there are more processing steps, these steps need to be abstracted for easy maintenance (such as management and / or expansion).
[0087] The present disclosure abstracts the concept of a pipe for the steps of processing audio data. The audio data stream passing through the pipe can be processed or read, and then handed over to the next pipe after processing. Each pipe code is independent and does not affect each other. There is a unified PipeManager (i.e., pipeline management class) to manage the pipe. Managing audio data in the above manner can improve the code reusability of the audio link (for example, the node for adding the ambient sound effect pipe in Figure 4 can be reused), maintainability, and scalability.
[0088] In this embodiment, each audio processing function is encapsulated into a pipeline, which realizes the reusability of the code. In the scenario where environmental sound effects need to be added, the pipeline class for adding environmental sound effects can be directly used.
[0089] Each function is encapsulated into a pipeline. During maintenance, only the functions that need to be maintained need to be repaired. For example, if the processing method for adding environmental sound effects needs to be adjusted, only the pipeline class for adding environmental sound effects needs to be adjusted.
[0090] Each function is encapsulated as a pipeline. To achieve different processing of audio data, you only need to combine the various pipelines. For example, based on the first implementation in Figure 4, if you want to adjust the processing method. For example, after obtaining the real-time pitch, you can indicate the pipeline class for dumping in the next pipeline indication information in the pipeline class that obtains the real-time pitch. Indicating the pipeline class for adding environmental sound effects in the next pipeline indication information of the dumped pipeline class can achieve the adjustment of the first processing method, which mentions the scalability of data processing.
[0091] This disclosure abstracts a pipeline interface that abstracts methods for processing audio data, such as the processAudio method. Base classes, such as the BasePipe class, implement the pipeline interface. BasePipe uses a linked list to describe the order of pipelines, indicating the next pipeline, such as nextPipe, which represents the pipeline immediately following the current one. processAudio uses template methods, such as the realProcess method, to process audio data. After processing, the data is passed to the next pipeline, nextPipe. Pipeline management classes, such as PipeLineManager, manage individual pipelines.
[0092] After the processAudio method obtains the media data to be processed, it calls the realProcess method to implement the processing, and then continues processing based on the next pipeline class indicated by the next pipeline indication information. For example, the processed data, such as intermediate media data, is transferred to the next pipeline class for further processing through the processAudio method. After the processAudio method of the next pipeline class obtains the intermediate media data, it continues to call the realProcess method of the next pipeline class, and so on, until the next pipeline indication information indicates that the processing is completed.
[0093] FIG5 is a schematic diagram of the structure of a data processing device provided by an embodiment of the present disclosure. As shown in FIG5 , the device includes: a determination module 510, configured to determine the current pipeline class of media data to be processed through a pipeline management class; a transmission module 520, configured to transmit the media data to be processed to the current pipeline class through the pipeline management class; and a processing module 530, configured to process the media data to be processed through the current pipeline class and next pipeline indication information corresponding to the current pipeline class to obtain processed media data, wherein the next pipeline indication information is configured to indicate whether there is a next pipeline class for processing the media data to be processed.
[0094] The technical solution provided by the disclosed embodiments pipelines the processing steps of unprocessed media data to obtain processed media data, implementing the processing of the unprocessed media data through a pipeline class, thereby addressing the poor maintainability of existing data processing code. By implementing the processing of the unprocessed media data through the current pipeline class, when maintenance of the data processing method is required, only the pipeline class that requires maintenance needs to be maintained, thereby improving the maintainability of the data processing method.
[0095] In one embodiment, the determination module 510 is specifically configured to determine head pipe indication information of the current pipe class through the pipe management class, and determine the pipe class indicated by the head pipe indication information as the current pipe class.
[0096] In one embodiment, the processing module 530 includes: a processing unit, configured to process the to-be-processed media data through the current pipeline class to obtain intermediate media data; and a determination unit, configured to determine whether to determine the intermediate media data as processed media data based on next pipeline indication information corresponding to the current pipeline class.
[0097] In one embodiment, the determining unit is specifically configured to: determine the intermediate media data as processed media data when determining, through the current pipeline class, that the next pipeline indication information corresponding to the current pipeline class indicates that the current pipeline class is a tail pipeline class.
[0098] In one embodiment, the determining unit is specifically configured to: when determining, through the current pipeline class, that the next pipeline indication information corresponding to the current pipeline class indicates a next pipeline class, use the next pipeline class as the current pipeline class, use the intermediate media data as the media data to be processed, and continue to process the media data to be processed using the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data.
[0099] In one embodiment, each current pipeline class inherits from the same base class, and each current pipeline class executes a corresponding processing method based on the base class to process the media data to be processed. The pipeline interface of the base class is used for media data transmission.
[0100] In one embodiment, the media data to be processed is audio data, and the processing method corresponding to the current association class is an audio processing method.
[0101] The data processing device provided by the embodiments of the present disclosure can execute the data processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0102] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0103] FIG6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG6 , it shows a schematic diagram of the structure of an electronic device (eg, a terminal device or server in FIG6 ) 500 suitable for implementing an embodiment of the present disclosure.
[0104] The electronic device 500 includes: one or more processing devices 501; a storage device 508 for storing one or more programs, when the one or more programs are executed by the one or more processing devices 501, the one or more processing devices 501 implement the data processing method provided in the present disclosure.
[0105] The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device 500 shown in FIG6 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0106] As shown in FIG6 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0107] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 illustrates the electronic device 500 with various devices, it should be understood that not all of the illustrated devices are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0109] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0110] The electronic device 500 provided in the embodiment of the present disclosure and the data processing method provided in the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0111] An embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the data processing method provided by the above embodiment is implemented.
[0112] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
[0113] The computer storage medium may be a storage medium of computer-executable instructions, which, when executed by a computer processor, are used to perform the methods provided in the present disclosure.
[0114] Computer-readable storage media may include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, device, or component. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wire, optical cable, RF (radio frequency), etc., or any suitable combination thereof.
[0115] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0116] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0117] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines the current pipeline class of the media data to be processed through the pipeline management class; transmits the media data to be processed to the current pipeline class through the pipeline management class; processes the media data to be processed through the current pipeline class and next pipeline indication information corresponding to the current pipeline class to obtain processed media data, where the next pipeline indication information is used to indicate whether there is a next pipeline class for processing the media data to be processed.
[0118] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0120] The modules or units described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module or unit does not necessarily limit the unit itself. For example, a determination module may also be described as a "current pipeline class determination module."
[0121] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0122] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0123] According to one or more embodiments of the present disclosure, [Example 1] provides a data processing method, including: determining a current pipeline class of media data to be processed through a pipeline management class; transmitting the media data to be processed to the current pipeline class through the pipeline management class; processing the media data to be processed through the current pipeline class and next pipeline indication information corresponding to the current pipeline class to obtain processed media data, wherein the next pipeline indication information is used to indicate whether there is a next pipeline class for processing the media data to be processed.
[0124] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, wherein determining the current pipeline class of the media data to be processed through the pipeline management class includes: determining the head pipeline indication information of the current pipeline class through the pipeline management class, and determining the pipeline class indicated by the head pipeline indication information as the current pipeline class.
[0125] According to one or more embodiments of the present disclosure, [Example 3] provides the method described in Example 1, wherein the processing of the media data to be processed using the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data includes: processing the media data to be processed using the current pipeline class to obtain intermediate media data; and determining whether to determine the intermediate media data as processed media data using the next pipeline indication information corresponding to the current pipeline class.
[0126] According to one or more embodiments of the present disclosure, [Example 4] provides the method described in Example 3, wherein determining whether to determine the intermediate media data as processed media data through the next pipeline indication information corresponding to the current pipeline class includes: determining through the current pipeline class that the next pipeline indication information corresponding to the current pipeline class indicates that the current pipeline class is a tail pipeline class, determining the intermediate media data as processed media data.
[0127] According to one or more embodiments of the present disclosure, [Example 5] provides the method described in Example 3, wherein determining whether to determine the intermediate media data as processed media data through the next pipeline indication information corresponding to the current pipeline class includes: when it is determined through the current pipeline class that the next pipeline indication information corresponding to the current pipeline class indicates the next pipeline class, using the next pipeline class as the current pipeline class, using the intermediate media data as the media data to be processed, and continuing to process the media data to be processed through the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data.
[0128] According to one or more embodiments of the present disclosure, [Example 6] provides the method described in Example 5, wherein each current pipeline class inherits from the same base class, and each current pipeline class executes the corresponding processing method based on the base class to process the media data to be processed, and the pipeline interface of the base class is used for media data transmission.
[0129] According to one or more embodiments of the present disclosure, [Example 7] provides the method described in Example 1, wherein the media data to be processed is audio data, and the processing method corresponding to the current association class is an audio processing method.
[0130] According to one or more embodiments of the present disclosure, [Example 8] provides a data processing device, including: a determination module, configured to determine a current pipeline class of media data to be processed through a pipeline management class; a transmission module, configured to transmit the media data to be processed to the current pipeline class through the pipeline management class; and a processing module, configured to process the media data to be processed through the current pipeline class and next pipeline indication information corresponding to the current pipeline class to obtain processed media data, wherein the next pipeline indication information is used to indicate whether there is a next pipeline class for processing the media data to be processed.
[0131] According to one or more embodiments of the present disclosure, [Example 9] provides an electronic device, characterized in that the electronic device includes: one or more processing devices; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method as described in any one of Examples 1-7.
[0132] According to one or more embodiments of the present disclosure, [Example 10] provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the data processing method described in any one of Examples 1-7.
[0133] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0134] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0135] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A data processing method, comprising: Determine the current pipeline class of the media data to be processed through the pipeline management class; Transmitting the to-be-processed media data to the current pipeline class through the pipeline management class; The media data to be processed is processed by using the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data, wherein the next pipeline indication information is used to indicate whether there is a next pipeline class for processing the media data to be processed.
2. The method according to claim 1, wherein determining the current pipeline class of the media data to be processed by the pipeline management class comprises: The head pipe indication information of the current pipe class is determined through the pipe management class, and the pipe class indicated by the head pipe indication information is determined as the current pipe class.
3. The method according to claim 1, wherein the processing of the media data to be processed by the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain the processed media data comprises: Processing the to-be-processed media data through the current pipeline class to obtain intermediate media data; Whether to determine the intermediate media data as processed media data is determined according to the next pipeline indication information corresponding to the current pipeline class.
4. The method according to claim 3, wherein the determining whether to determine the intermediate media data as processed media data according to the next pipeline indication information corresponding to the current pipeline class comprises: When it is determined through the current pipeline class that the next pipeline indication information corresponding to the current pipeline class indicates that the current pipeline class is a tail pipeline class, the intermediate media data is determined as processed media data.
5. The method according to claim 3, wherein the determining whether to determine the intermediate media data as processed media data according to the next pipeline indication information corresponding to the current pipeline class comprises: Determine the next pipeline indication information corresponding to the current pipeline class through the current pipeline class; When the next pipeline indication information indicates that there is a next pipeline class, the next pipeline class is used as the current pipeline class, the intermediate media data is used as the media data to be processed, and the media data to be processed is continuously processed through the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data.
6. The method according to claim 5, wherein each current pipeline class inherits from the same base class, and each current pipeline class executes a corresponding processing method based on the base class to process the media data to be processed, and the pipeline interface of the base class is used for media data transmission.
7. The method according to claim 1, wherein the media data to be processed is audio data, and the processing method corresponding to the current association class is an audio processing method.
8. A data processing device, comprising: A determination module, used to determine the current pipeline class of the media data to be processed through the pipeline management class; A transmission module, used for transmitting the to-be-processed media data to the current pipeline class through the pipeline management class; The processing module is used to process the media data to be processed by using the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain processed media data, wherein the next pipeline indication information is used to indicate whether there is a next pipeline class for processing the media data to be processed.
9. An electronic device, comprising: one or more processing devices; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method according to any one of claims 1 to 7.
10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the data processing method according to any one of claims 1 to 7 when executed by a computer processor.
Citation Information
Patent Citations
Multimedia data transmission method and device, electronic equipment and storage medium
CN115297359A
Data processing method and device, computer equipment and readable storage medium
CN115934304A
Apparatus, Method and Computer-Readable Storage Medium for Media Processing and Delivery
US20130230292A1
Methods and apparatus for multiplexing data flows via a single data structure
US20200065161A1
Multimedia data sharing method, media sharing server, terminal, electronic device, and computer-readable storage medium
WO2023029689A1