Data processing method and device, electronic equipment and storage medium

Data processing is pipelined through pipeline management and pipeline classes, which solves the problem of poor maintainability of existing data processing codes and realizes more efficient data processing methods maintenance.

CN119556896APending Publication Date: 2025-03-04BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311126333.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing data processing code is poorly maintained, which makes it difficult to effectively manage and maintain when it is necessary to maintain data processing methods.

Method used

The current pipeline class of the pending media data is determined through the pipeline management class, and the data is transmitted to the current pipeline class through the pipeline management class, and the data is processed using the current pipeline class and the next pipeline indication information, thereby piped the processing steps.

Benefits of technology

Through the pipeline processing steps, the maintainability of the data processing method is improved, and only the pipeline class that needs to be maintained is required, simplifying the maintenance process of the data processing method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556896A_ABST
    Figure CN119556896A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a data processing method and apparatus, an electronic device and a storage medium. The data processing method comprises the steps of determining a current pipeline class of to-be-processed media data through a pipeline management class; transmitting the media data to be processed to the current pipeline class through the pipeline management class; the to-be-processed media data are processed through the current pipeline class and next pipeline indication information corresponding to the current pipeline class, processed media data are obtained, and the next pipeline indication information is used for indicating whether a next pipeline class for processing the to-be-processed media data exists or not. The processing steps are pipelined, the to-be-processed media data are processed through the pipeline class, the problem that an existing data processing code is poor in maintainability is solved, the to-be-processed media data are processed through the current pipeline class, under the condition that the data processing method needs to be maintained, only the pipeline class needing to be maintained needs to be maintained, and the maintenance efficiency is improved. And the maintainability of the data processing method is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to data processing technology, and more particularly to a data processing method, device, electronic device, and storage medium. Background Art

[0002] With the continuous development of computer technology, the data that needs to be processed is increasing day by day. At present, when processing data, software development is carried out for the purpose of data processing, and the maintainability of the developed code is poor. Summary of the invention

[0003] The present disclosure provides a data processing method, device, electronic device and storage medium to improve the maintainability of data processing.

[0004] In a first aspect, an embodiment of the present disclosure provides a data processing method, including:

[0005] Determine the current pipeline class of the media data to be processed through the pipeline management class;

[0006] Transmitting the to-be-processed media data to the current pipeline class through the pipeline management class;

[0007] 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.

[0008] In a second aspect, an embodiment of the present disclosure further provides a data processing device, including:

[0009] A determination module, used to determine the current pipeline class of the media data to be processed through the pipeline management class;

[0010] A transmission module, used for transmitting the to-be-processed media data to the current pipeline class through the pipeline management class;

[0011] 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.

[0012] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0013] one or more processing devices;

[0014] a storage device for storing one or more programs,

[0015] 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 by the present disclosure.

[0016] 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.

[0017] In the disclosed embodiment, the current pipeline class of the media data to be processed is determined through the pipeline management class; the media data to be processed is transferred to the current pipeline class through the pipeline management class; the media data to be processed is processed through the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain the 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 realized through the pipeline class, which solves the problem of poor maintainability of the existing data processing code. The processing of the media data to be processed is realized through the current pipeline class. When the data processing method needs to be maintained, only the pipeline class that needs to be maintained needs to be maintained, which improves the maintainability of the data processing method. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0019] Figure 1 It is a flowchart of a data processing method provided by an embodiment of the present disclosure;

[0020] Figure 2 It is a flowchart of a data processing method provided by an embodiment of the present disclosure;

[0021] Figure 3 is a class diagram of a data processing method provided by an embodiment of the present disclosure;

[0022] Figure 4 is a scenario schematic diagram of a data processing method provided by an embodiment of the present disclosure;

[0023] Figure 5 is a structural schematic diagram of a data processing device provided by an embodiment of the present disclosure;

[0024] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] Embodiments of the present disclosure will be described in more detail below 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 being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0026] 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.

[0027] The term "including" and its variations used herein are open inclusions, 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"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0028] It should be noted that the concepts such as "first" and "second" mentioned in the present 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.

[0029] 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, it should be understood as "one or more".

[0030] 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.

[0031] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present 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.

[0032] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0033] As an optional but non-limiting implementation, in response to receiving an active request from the user, 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. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0035] 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) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0036] Figure 1 It is a flow chart of a data processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where data is processed. The method can be executed by a data processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0037] like Figure 1 As shown, the method includes:

[0038] S110. Determine the current pipeline class of the media data to be processed through the pipeline management class.

[0039] The pipeline management class can be considered as a class that implements pipeline management. In this embodiment, the processing of media data is abstracted into processing multimedia data through pipelines. The code of each pipeline in the present disclosure is independent and does not affect each other. Each pipeline can have an independent function. The function of the pipeline can be determined based on the media data to be processed. The media data can be data in the form of media, such as one or more of text, sound, image and video. The media data to be processed can be considered as the media data to be processed.

[0040] 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, realizing headphone reverse listening and dumping.

[0041] 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.

[0042] The implementation of the pipeline in the present disclosure is implemented by a pipeline class, which includes a current pipeline class and a next pipeline class. The current pipeline class may be a currently executed pipeline class, and the next pipeline class may be a next executed pipeline class.

[0043] The function of the pipeline management class can be to implement the management of the pipeline class, 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 a class that implements the head pipeline function.

[0044] 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.

[0045] S120: Transmit the to-be-processed media data to the current pipeline class through the pipeline management class.

[0046] After the pipeline management class determines the current pipeline class, the to-be-processed media data may be transmitted to the current pipeline class through the transmission method in the pipeline management class.

[0047] The transmission method may be a method for realizing data transmission, or a transmission method for realizing an interface.

[0048] S130: Process the media data to be processed by using 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.

[0049] The next pipeline indication information can be considered as the indication information of the next pipeline class. The next pipeline class is used to process the media data to be processed. When the next pipeline indication information indicates the next pipeline class, it can be considered that the next pipeline class exists, and the media data to be processed needs to continue to be processed through the next pipeline class. When 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 tail pipeline class, and the processing of the media data to be processed can be ended. The tail pipeline class can be considered as the last pipeline class that processes the media data to be processed.

[0050] This embodiment does not limit the means for determining that the next pipe indication information does not indicate the next pipe class. If the next pipe indication information is empty or is setting information, it can be determined that the next pipe indication information does not indicate the next pipe class.

[0051] 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.

[0052] 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.

[0053] When the next pipeline indication information indicates the 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 the processing.

[0054] The technical solution of the disclosed embodiment is to determine the current pipeline class of the media data to be processed through the pipeline management class; transfer the media data to be processed to the current pipeline class through the pipeline management class; 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 the 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 realized through the pipeline class, which solves the problem of poor maintainability of the existing data processing code. The processing of the media data to be processed is realized through the current pipeline class. When the data processing method needs to be maintained, only the pipeline class that needs to be maintained needs to be maintained, which improves the maintainability of the data processing method.

[0055] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.

[0056] In one embodiment, determining the current pipeline class of the media data to be processed by the pipeline management class includes:

[0057] 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.

[0058] The head pipeline indication information may be considered as indication information of a pipeline class determined in the pipeline management class. The head pipeline indication information indicates a head pipeline class for processing the media data to be processed.

[0059] 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.

[0060] In one embodiment, the pipe management class may store head pipe indication information indicating the pipe class for echo cancellation. In this embodiment, the pipe class for echo cancellation may be used as the current pipe class.

[0061] A plurality of head pipeline indication information may be indicated in the pipeline management class, each head pipeline indication information may correspond to its own pipeline class, each pipeline class may 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 may be independent.

[0062] 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.

[0063] Figure 2 : is a flow chart of a data processing method provided by an embodiment of the present disclosure. This embodiment refines the specific operation of processing the media data to be processed. The data processing method includes the following steps:

[0064] S210: Determine the current pipeline class of the media data to be processed through the pipeline management class.

[0065] S220: Transmit the to-be-processed media data to the current pipeline class through the pipeline management class.

[0066] S230: Process the to-be-processed media data through the current pipeline class to obtain intermediate media data.

[0067] The intermediate media data can be considered as the processing result after the current pipeline class processes the data to be processed. The intermediate media data can be determined based on the pipeline function of the current pipeline class. For example, if the current pipeline class is a pipeline that implements echo cancellation, the intermediate media data can be the data after echo cancellation of the media data to be processed. For another example, if the current pipeline class is a pipeline that determines the pitch, the intermediate media data can be the media data after the pitch is determined. For another example, if the current pipeline class is a pipeline that adds ambient sound, the intermediate media data can be the media data after the ambient sound is added.

[0068] S240: Determine whether to determine the intermediate media data as processed media data according to the next pipeline indication information corresponding to the current pipeline class.

[0069] After obtaining the intermediate media data, this embodiment can determine the content indicated by the next pipeline indication information through the current pipeline class. Based on the determined content, it is determined whether to determine the intermediate media data as the processed media data. In the case where the processing is completed, the intermediate media data can be used as the processed media data. In the case where the processing is not completed, 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 the processing is completed.

[0070] In one embodiment, when the next pipeline indication information indicates the end of processing (also known as the next pipeline indication information does not indicate the next pipeline class), the intermediate media data is determined as processed media data. When the next pipeline indication information indicates the next pipeline class, the next pipeline class is used as the new current pipeline class, and the to-be-processed media data is continuously processed based on the current pipeline class and the corresponding next pipeline class.

[0071] The data processing method provided in this embodiment determines whether to use the intermediate media data as processed media data through the corresponding next pipeline indication information when processing the media data to be processed through the current pipeline class. It realizes determining whether the next pipeline class is required to process the media data to be processed, and determines the execution order of each pipeline class through the next pipeline indication information.

[0072] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.

[0073] In one embodiment, 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 includes:

[0074] 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.

[0075] The tail pipeline class may be the last pipeline class executed among the pipeline classes for 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.

[0076] In one embodiment, the purpose of processing the to-be-processed media data is to add environmental sound effects and save them. Then the head pipeline class may be a pipeline class for adding sound effects, and the tail pipeline class may be a pipeline class for implementing saving.

[0077] 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.

[0078] In one embodiment, 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 includes:

[0079] Determine the next pipeline indication information corresponding to the current pipeline class through the current pipeline class;

[0080] 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.

[0081] When the next pipeline indication information indicates that there is a next pipeline class, the intermediate media data still needs to be processed through the next pipeline class. Therefore, in this embodiment, the next pipeline class is determined as the current pipeline class, the intermediate media data is determined as the media data to be processed, and the operation of processing the media data to be processed through the current pipeline class and the next pipeline indication information corresponding to the current pipeline class is continued to be executed to obtain the processed media data.

[0082] 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, and the pipeline interface of the base class is used for media data transmission.

[0083] All current pipeline classes implementing data processing in the present disclosure inherit from the same base class. The base class can implement the pipeline interface and abstract the processing method. Current pipeline classes with different functions can abstract different processing methods to process the media data to be processed, such as echo cancellation method, pitch determination method and / or background sound addition method.

[0084] The base class implements the pipeline interface, which is used to transmit media data. The transmitted media data is not limited here, and different pipeline classes can transmit different media data. The media data transmitted by the pipeline class can include the media data obtained by the pipeline class and the media data sent by the pipeline class.

[0085] In one embodiment, when the media data to be processed is audio, and the processing of the audio includes echo cancellation and storage, the head pipeline class can be an echo cancellation pipeline class, the next pipeline class can be a storage pipeline class, and 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.

[0086] Figure 3is 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 save pipeline class. The pitch class, the sound effect class, and the save class inherit (also known as extends) a base class. The pitch class uses (also known as uses) the sound effect class. The sound effect class uses the save file class.

[0087] The next pipe indication information in the base class can indicate the next pipe. The processing method can realize transmission and data processing. For example, the transmission method, that is, the processAudio method, can call the actual processing method, that is, the realProcess method, on the basis of realizing transmission to realize the functions of each pipe. The base class realizes the pipe interface, and the processing method can be declared in the pipe interface.

[0088] The pipeline management class may include head pipeline indication information, indicating the head pipeline, and the media data to be processed is transmitted to the head pipeline class corresponding to the head pipeline for processing through the processing method in the pipeline management class. 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.

[0089] 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.

[0090] 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 the required function can be achieved.

[0091] Figure 4 It is a scenario diagram of a data processing method provided by an embodiment of the present disclosure. Figure 4 Three processing methods for the media data to be processed are shown, and each processing method can be independent of each other. The media data to be processed can be original audio data, which is input to the pipeline management class, and the pipeline management class determines the head pipeline for processing the original audio data.

[0092] One processing method is to first perform echo cancellation, then obtain real-time pitch, then add environmental sound effects, and finally save the audio data.

[0093] Another way to deal with it is to add ambient sound effects and then listen back through headphones.

[0094] Another processing method is to dump (ie, dump) the original data, ie, the original audio data.

[0095] In the above three-axis processing method, each processing method is executed separately, and the pipeline management class can store the identifiers of the echo-cancelled pipeline class, the identifiers of the ambient sound-added pipeline class, and the identifiers of the dumped pipeline class in the form of a list.

[0096] In the first processing method, the head pipeline class is the pipeline class for echo cancellation. After the 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, and the pipeline class for obtaining real-time pitch is determined as the new current pipeline class to perform the process of obtaining real-time pitch. 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 performed, and the next pipeline class indicated by the next pipeline indication information in the management class for adding environmental sound effects is determined, that is, 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 performed. If the next pipeline indication information in the pipeline class for storing audio data indicates that the process is finished, the process is finished, such as stopping the operation.

[0097] 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.

[0098] In the third processing method, the head pipeline is the tail pipeline, and the operation ends after the dump is implemented through the dump pipeline class.

[0099] 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.

[0100] The data processing method provided by the present disclosure 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).

[0101] The present disclosure abstracts the concept of a pipe from the steps of processing audio data. The audio data stream passing through a 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. A unified PipeManager (i.e., pipe management class) is used to manage the pipes. Managing audio data in the above manner can improve the code reusability of the audio link (such as Figure 4 The nodes for adding ambient sound pipelines in the can be reused), maintainable, and scalable.

[0102] 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.

[0103] 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 ambient sound effects needs to be adjusted, only the pipeline class for adding ambient sound effects needs to be adjusted.

[0104] Each function is encapsulated as a pipeline. If you want to achieve different processing of audio data, you only need to combine the pipelines. Figure 4 On the basis of the first implementation method, if you want to adjust the processing method, such as dumping after obtaining the real-time pitch, you can indicate the pipeline class for dumping in the next pipeline indication information in the pipeline class for obtaining the real-time pitch, and indicate the pipeline class for adding ambient sound effects in the next pipeline indication information of the dumped pipeline class to achieve the adjustment of the first processing method, which mentions the scalability of data processing.

[0105] The present invention discloses an abstract pipeline interface, which abstracts the method of processing audio data, such as the processAudio method. A base class, such as the BasePipe class, implements the pipeline interface. BasePipe uses a linked list to describe the order of pipelines, that is, through the next pipeline indication information, such as nextPipe indicating the next pipeline of the current pipeline. processAudio uses a template method, such as the realProcess method, to process audio data, and after processing, the data is handed over to the next pipeline, namely, nextPipe for processing. Pipeline management classes, such as PipeLineManager, are used to manage each pipeline.

[0106] After the processAudio method obtains the media data to be processed, it calls the realProcess method to implement the processing, and then continues the 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.

[0107] Figure 5 is a schematic diagram of the structure of a data processing device provided by an embodiment of the present disclosure, such as Figure 5 As shown, the device comprises:

[0108] A determination module 510, configured to determine the current pipeline class of the media data to be processed through the pipeline management class;

[0109] A transmission module 520, configured to transmit the to-be-processed media data to the current pipeline class through a pipeline management class;

[0110] The processing module 530 is used 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, 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.

[0111] The technical solution provided by the embodiment of the present disclosure pipelines the processing steps in the process of processing the processed media data to obtain the processed media data, and implements the processing of the processed media data through a pipeline class, thereby solving the problem of poor maintainability of the existing data processing code. The processing of the processed media data is implemented through the current pipeline class. When it is necessary to maintain the data processing method, only the pipeline class that needs to be maintained needs to be maintained, thereby improving the maintainability of the data processing method.

[0112] In one embodiment, the determination module 510 is specifically configured to:

[0113] 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.

[0114] In one embodiment, the processing module 530 includes:

[0115] A processing unit, configured to process the to-be-processed media data through the current pipeline class to obtain intermediate media data;

[0116] A determining unit is used to determine whether to determine the intermediate media data as processed media data according to the next pipeline indication information corresponding to the current pipeline class.

[0117] In one embodiment, the determining unit is specifically configured to:

[0118] 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.

[0119] In one embodiment, the determining unit is specifically configured to:

[0120] 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, 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.

[0121] 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, and the pipeline interface of the base class is used for media data transmission.

[0122] 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.

[0123] The data processing device provided in the embodiments of the present disclosure can execute the data processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0124] 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.

[0125] Figure 6 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 , which shows an electronic device (eg, Figure 6 A schematic diagram of the structure of a terminal device or server) 500.

[0126] The electronic device 500 includes:

[0127] One or more processing devices 501;

[0128] The storage device 508 is used to store one or more programs.

[0129] 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 by the present disclosure.

[0130] 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 (such as vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0131] like Figure 6 As shown, 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. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. 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.

[0132] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, 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 Figure 6 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0133] 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 contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a 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 executed.

[0134] 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.

[0135] 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. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0136] The embodiments of the present disclosure provide 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 embodiments is implemented.

[0137] 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.

[0138] 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 by the present disclosure.

[0139] Computer readable storage media may be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 thereof. In the present disclosure, a computer readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer readable program code is carried. Such propagated data signals 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, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device, or device. The program code embodied on the 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 of the foregoing.

[0140] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may 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 future developed network.

[0141] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0142] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0143] 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 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.

[0144] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or combinations 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 separate 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).

[0145] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0146] The modules or units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module or unit does not limit the unit itself in some cases. For example, a determination module may also be described as a "current pipeline class determination module".

[0147] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0148] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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.

[0149] According to one or more embodiments of the present disclosure, [Example 1] provides a data processing method, including:

[0150] Determine the current pipeline class of the media data to be processed through the pipeline management class;

[0151] Transmitting the to-be-processed media data to the current pipeline class through the pipeline management class;

[0152] 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.

[0153] 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 by the pipeline management class includes:

[0154] 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.

[0155] 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 by the current pipeline class and the next pipeline indication information corresponding to the current pipeline class to obtain the processed media data includes:

[0156] Processing the to-be-processed media data through the current pipeline class to obtain intermediate media data;

[0157] 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.

[0158] According to one or more embodiments of the present disclosure, [Example 4] provides the method of 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:

[0159] 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.

[0160] According to one or more embodiments of the present disclosure, [Example 5] provides the method of 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:

[0161] 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, 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.

[0162] 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 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.

[0163] 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.

[0164] According to one or more embodiments of the present disclosure, [Example 8] provides a data processing device, including:

[0165] A determination module, used to determine the current pipeline class of the media data to be processed through the pipeline management class;

[0166] A transmission module, used for transmitting the to-be-processed media data to the current pipeline class through the pipeline management class;

[0167] 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.

[0168] According to one or more embodiments of the present disclosure, [Example 9] provides an electronic device, characterized in that the electronic device includes:

[0169] one or more processing devices;

[0170] a storage device for storing one or more programs,

[0171] 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.

[0172] According to one or more embodiments of the present disclosure, [Example 10] provides a storage medium containing computer executable instructions, which are used to execute the data processing method described in any one of Examples 1-7 when executed by a computer processor.

[0173] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. 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 a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0174] 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 are 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.

[0175] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A data processing method, characterized in that: include: 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, characterized in that The determining the current pipeline class of the media data to be processed through the pipeline management class includes: 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, characterized in that The processing of 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 the processed media data includes: 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, characterized in that 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 includes: 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, characterized in that: 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 includes: 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, characterized in that Each current pipeline class inherits from the same base class. 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.

7. The method according to claim 1, characterized in that 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, characterized in that: include: 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, characterized in that: The electronic device comprises: 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.