Media data conversion method and device, equipment and storage medium
By defining media data fields and using middleware functions for conversion and validation, the problems of inflexible media data conversion methods, inaccurate results, and low efficiency in existing technologies are solved, thereby improving flexibility and accuracy.
Patent Information
- Application Number
- CN202510818342.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-11-04
AI Technical Summary
Existing technologies for media data conversion are not flexible enough, the conversion results are not accurate enough and the efficiency is low. They also cannot flexibly configure the conversion logic and perform verification according to changes in media data.
By identifying the media data fields associated with the media task to be processed, the first preset middleware function is used to perform data transformation, and the second preset middleware function is used to verify the rationality of the data, and the data transformation result is output.
It enables flexible reading and conversion of media data, improving conversion efficiency and accuracy, and ensuring the rationality of conversion results.
Smart Images

Figure CN120897074A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and specifically relates to a media data conversion method, apparatus, device and storage medium. Background Technology
[0002] With the rapid development of short videos and live streaming, media platforms, as important channels for content distribution and interactive behavior, acquire a large amount of media data, such as video content, text descriptions, comments, likes, and reposting records. To unify the integration and analysis of media data, efficiently transforming media data from different platforms into standard data structures and formats for data analysis systems has become a hot topic in the industry.
[0003] In existing technologies, media data conversion typically involves pre-writing hard-coded information to determine the data to be converted and the conversion code for each media platform. This is done by receiving data from each platform via a media interface, acquiring the data to be converted, and then performing the conversion based on the code. However, the data conversion process in these existing technologies is hard-coded, making it impossible to flexibly configure the conversion logic according to changes in media data. Furthermore, it's impossible to verify whether the conversion results conform to the system's standard data format. Moreover, the data required for acquisition and conversion varies across different system tasks. Therefore, the existing approach of determining the data to be converted based on hard-coded information suffers from the problem of large data volumes leading to low conversion efficiency. Summary of the Invention
[0004] The purpose of this application is to provide a media data conversion method, apparatus, device, and storage medium, which solves the problems of inflexible conversion methods, inaccurate conversion results, and low conversion efficiency in the prior art. By determining the media data fields associated with the media task to be processed, the media data to be converted is determined. Data conversion is performed based on a first preset middleware function, and the data conversion result is validated for reasonableness based on a second preset middleware function. The data conversion result is then output, which can achieve the purpose of flexibly reading and converting media data, improving the flexibility and efficiency of media data reading and conversion. At the same time, it can validate the reasonableness of the conversion result to ensure the accuracy of the conversion result.
[0005] In a first aspect, embodiments of this application provide a media data conversion method, the method comprising: Receive media tasks to be processed and determine the media data fields associated with the media tasks to be processed; Determine the first preset middleware function corresponding to the media data field, and perform data transformation on the media data corresponding to the media data field based on the first preset middleware function; Determine the second preset middleware function corresponding to the data transformation result, and perform data rationality verification on the data transformation result based on the second preset middleware function; If the data conversion result passes the data validity check, the data conversion result will be output.
[0006] Furthermore, the first preset middleware function corresponding to the media data field is determined, including: Identify the field identifier of the media data field and the function identifier of multiple preset middleware functions, compare the field identifier and the function identifier, and determine the multiple target preset middleware functions that are the same as the field identifier in the function identifier; Determine the field structure corresponding to the field identifier, and combine multiple target preset middleware functions according to the field structure to obtain the first preset middleware function.
[0007] Furthermore, multiple target preset middleware functions are combined based on the field structure, including: Based on the field structure, determine the data arrangement order among multiple media data corresponding to the media data field, and determine the dependencies between multiple media data; The combination position of the target preset middleware function corresponding to each media data is determined based on the data arrangement order and dependency relationship, and multiple target preset middleware functions are combined according to the combination structure.
[0008] Furthermore, based on the second preset middleware function, the data transformation result is validated for data reasonableness, including: Read the original data from the data transformation result and input the original data into the second preset middleware function to perform standard data lookup and data comparison based on the second preset middleware function to determine whether the original data is the same as the standard data; If the original data and the standard data are the same, the data rationality verification of the data transformation result is passed. When the original data differs from the standard data, the data rationality verification of the data transformation result fails.
[0009] Furthermore, after determining that the data reasonableness verification of the data transformation result fails, the method also includes: The original data and standard data are normalized, and the similarity between the first normalization result of the original data and the second normalization result of the standard data is calculated. Compare the similarity of the processing results to see if it meets the preset similarity threshold for the same data. If the similarity of the processing results meets the preset similarity threshold for the same data, correct the original data according to the standard data until the data rationality verification is passed.
[0010] Furthermore, before determining the second preset middleware function corresponding to the data transformation result, the method also includes: Identify the data type of the data transformation result and determine whether the data type is a middleware validation type based on the preset middleware validation type library; If the data type is not the middleware validation type, terminate the data validity validation process and output the data transformation result.
[0011] Furthermore, before outputting the data transformation results, the method also includes: The data conversion results are formatted based on preset format validation rules, and missing data are checked based on missing data validation rules. If the data conversion result format verification passes and the missing data verification passes, the media data conversion is considered complete.
[0012] Secondly, embodiments of this application provide a media data conversion apparatus, the apparatus comprising: The media data determination module is used to receive media tasks to be processed and determine the media data fields associated with the media tasks to be processed. The data conversion module is used to determine the first preset middleware function corresponding to the media data field, and to perform data conversion on the media data corresponding to the media data field based on the first preset middleware function; The data verification module is used to determine the second preset middleware function corresponding to the data transformation result, and to perform data rationality verification on the data transformation result based on the second preset middleware function. The conversion result output module is used to output the data conversion result if the data conversion result passes the data rationality verification.
[0013] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0015] Fifthly, embodiments of this application also provide a computer program product comprising a computer program stored in a computer-readable storage medium, wherein at least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the method described in the first aspect.
[0016] In this embodiment, a media task to be processed is received, and media data fields associated with the media task are determined. A first preset middleware function corresponding to the media data field is determined, and data conversion is performed on the media data corresponding to the media data field based on the first preset middleware function. A second preset middleware function corresponding to the data conversion result is determined, and data rationality verification is performed on the data conversion result based on the second preset middleware function. If the data rationality verification of the data conversion result passes, the data conversion result is output. This media data conversion method solves the problems of inflexible conversion methods, inaccurate conversion results, and low conversion efficiency in the prior art. By determining the media data fields associated with the media task to be processed, determining the media data to be converted, performing data conversion based on the first preset middleware function, and performing data rationality verification on the data conversion result based on the second preset middleware function, the data conversion result is output. This achieves the goal of flexibly reading and converting media data, improving the flexibility and efficiency of media data reading and conversion, while also ensuring the accuracy of the conversion result through rationality verification. Attached Figure Description
[0017] Figure 1 This is a flowchart of a media data conversion method provided in an embodiment of this application; Figure 2 Please provide a schematic diagram of the data transformation process. Figure 3 This is a flowchart of determining the first preset middleware function provided in an embodiment of this application; Figure 4 This is a flowchart of the verification data conversion result provided in the embodiments of this application; Figure 5 This is a structural block diagram of a media data conversion device provided in an embodiment of this application; Figure 6 This is a structural block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application are described in detail below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0019] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0020] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0021] Firstly, this solution can be used in scenarios involving unified data analysis and processing of media data from media platforms, particularly in scenarios requiring data conversion of media data with different structures and formats from multiple media platforms for accurate data analysis. By identifying the media data fields associated with the media task to be processed, the media data to be converted is determined. Data conversion is performed based on a first preset middleware function, and the data conversion result is validated for reasonableness using a second preset middleware function. The converted result is then output, achieving flexible reading and conversion of media data, improving the flexibility and efficiency of media data reading and conversion, while simultaneously ensuring the accuracy of the conversion result through reasonableness validation. Based on the above usage scenario, it is understood that the execution entity for each step in this solution can be a computer device. This computer device refers to any electronic device with data computing, processing, and storage capabilities, such as mobile phones, PCs (Personal Computers), tablets, and other terminal devices, or servers, etc. This application embodiment does not limit this.
[0022] The following description, in conjunction with the accompanying drawings, details a media data conversion method, apparatus, device, and storage medium provided in this application through specific embodiments and application scenarios.
[0023] Figure 1 This is a flowchart of a media data conversion method provided in an embodiment of this application. For example... Figure 1 As shown, the specific steps include the following: S101, Receive the media task to be processed and determine the media data fields associated with the media task to be processed.
[0024] The media task to be processed can be an operational objective that involves statistically analyzing and processing media data from one or more media platforms. For example, it could be calculating the total number of likes for a video across all platforms. Media data fields can be the data attribute names of media data within a media platform. These fields may include a media platform identifier field, a media platform name field, and a data name field within the media platform associated with the media task to be processed.
[0025] In one embodiment, a media task to be processed can be received, and the association between the media task and the media data fields determines the media data fields associated with the media task to be processed. For example, if the media task to be processed is to count the number of likes for video A across all media platforms from May 1st to August 31st, then the media data fields associated with the media task to be processed include the video identifier field of video A, the video title field, the name of the media platform on which the video was published, the number of likes on each media platform, the start time field of the statistics, and the end time field of the statistics, etc.
[0026] S102, determine the first preset middleware function corresponding to the media data field, and perform data transformation on the media data corresponding to the media data field based on the first preset middleware function.
[0027] The first preset middleware function can be a processing function that converts media data from its original data structure and format into the system's target data structure and format.
[0028] In one embodiment, the media middleware function corresponding to the media data field can be determined based on the media platform identifier field in the media data field and the correspondence between the media platform and preset middleware functions. The data function of the media data to be converted can be determined based on the data name field in the media data field. The functional middleware function corresponding to the media data field can be determined based on the correspondence between the data function and preset middleware processing functions. The functional middleware function identical to the media middleware function is selected as the first preset middleware function corresponding to the media data field. The media data corresponding to the media data field is input to the first preset middleware function corresponding to the media data field, and the media data is processed by the first preset middleware function.
[0029] S103, determine the second preset middleware function corresponding to the data transformation result, and perform data rationality verification on the data transformation result based on the second preset middleware function.
[0030] The second preset middleware function can be a comparison function that verifies whether the data transformation result conforms to the characteristics of standard data. Standard data characteristics can be the system's preset data format and structure characteristics, or the standard value range or standard proportion of data in an existing database. Reasonableness verification can be the process of comparing whether the data transformation result conforms to the characteristics of standard data.
[0031] In one embodiment, the business semantics corresponding to the transformed media data in the data transformation result can be identified, and the target database storing the business semantic data in the existing database can be determined. The function with a query path to the target database in the preset comparison function is then used as the second middleware function corresponding to the transformation result. For example, if the business semantics corresponding to the transformed media data is the brand avatar size parameter of brand M, then the data coverage area or scope of the existing database can be determined to identify the target database storing the brand avatar size parameter of brand M. If the target database is the Baidu database, then the BaiduBrandCheck function in the preset comparison function can be used as the second middleware function corresponding to the transformation result. The second preset middleware function is used to query standard data, and the data transformation result is compared with the standard data query result. If the data transformation result is the same as the standard data query result, the data in the data transformation result is determined to be reasonable; otherwise, the data in the data transformation result is determined to be unreasonable.
[0032] In one embodiment, before determining the second preset middleware function corresponding to the data transformation result, the method further includes: identifying the data type of the data transformation result, determining whether the data type is a middleware verification type according to a preset middleware verification type library; if the data type is not a middleware verification type, terminating the data validity verification process and outputting the data transformation result.
[0033] Data types can include static data types and dynamic data types. Static data types can be categories of data that are independent of context, such as system default data. Dynamic data types can be categories of data that are related to context. For example, brand avatar data is dynamic data if it is related to brand name data, brand type data, and brand advertising image data. The preset middleware validation type library can be a pre-defined database storing data types that need to be validated by the second middleware function. Middleware validation types can also be databases containing data types that need to be validated by the second middleware function.
[0034] In one embodiment, the data type of the data transformation result can be determined based on the relationship between the data and the context in the data transformation result. It can also be identified whether the data type of the data transformation result exists in the preset middleware verification type library. If it exists, the data type of the data transformation result is determined to be a middleware verification type. If it does not exist, the data type of the data transformation result is determined to be a middleware verification type. If the data type does not exist, it means that the data type does not require middleware verification. At this time, the data rationality verification process can be terminated, and the data transformation result can be directly output.
[0035] This solution identifies whether the data type of the data transformation result is a middleware validation type. If the data type is not a middleware validation type, the data validity validation process is terminated and the data transformation result is output. This avoids performing middleware validation on all data transformation results, reduces system overhead, and improves the output efficiency of data transformation results.
[0036] S104: If the data conversion result passes the data rationality verification, output the data conversion result.
[0037] In one embodiment, if the data rationality verification of the data transformation result passes, the data transformation result can be output.
[0038] In one embodiment, before outputting the data conversion result, the method further includes: performing format verification on the data conversion result based on preset format verification rules, and performing missing verification on the data conversion result based on missing verification rules; if the format verification and missing verification of the data conversion result pass, the media data conversion is determined to be complete.
[0039] The preset format validation rules are pre-defined methods for determining whether the format of the converted data in the data conversion result conforms to the system's preset standard data format. Format validation can be an operation that compares whether the format of the converted data is the same as the standard data format. The missing data validation rules are methods for determining whether the number of data fields in the converted data in the data conversion result is less than the system's preset basic data fields. Missing data validation can be an operation that compares whether the number of data fields in the converted data is less than the system's preset basic data fields.
[0040] In one embodiment, the system can obtain the preset standard data format and basic data fields, perform format verification on the data conversion result according to the preset format verification rules and the preset standard data format, and perform missing verification on the data conversion result according to the missing verification rules and the preset basic data fields. If the format verification and missing verification of the data conversion result pass, the media data conversion is determined to be complete.
[0041] This solution performs format and missing data validation on the data conversion results based on preset format validation rules and missing data validation rules. If both format and missing data validation pass, the media data conversion is considered complete. This avoids the problem of outputting unqualified media data conversion results and improves the accuracy of media data conversion results.
[0042] Figure 2 This is a diagram illustrating the data transformation process you requested.
[0043] like Figure 2As shown, when the system receives a media task, it determines the media data field associated with the media task and the first preset middleware function corresponding to that media data field. The media field and the first preset middleware function can be pre-stored in the system through a rule mapping. Different media data fields correspond to different conversion relationships between the media data and the system's standard data, resulting in different first preset middleware functions. After processing the media data using the first preset middleware function, a second preset middleware function corresponding to the processing result is determined based on the business semantics of the conversion result. The second preset middleware function is used to perform a validity check on the processing result, and the conversion result is output if the validity check passes.
[0044] The technical solution provided in this application embodiment receives a media task to be processed, determines the media data field associated with the media task, determines a first preset middleware function corresponding to the media data field, performs data conversion on the media data corresponding to the media data field based on the first preset middleware function, determines a second preset middleware function corresponding to the data conversion result, performs data rationality verification on the data conversion result based on the second preset middleware function, and outputs the data conversion result if the data rationality verification of the data conversion result passes. This media data conversion method solves the problems of inflexible conversion methods, inaccurate conversion results, and low conversion efficiency in the prior art. By determining the media data field associated with the media task to be processed, determining the media data to be converted, performing data conversion based on the first preset middleware function, and performing data rationality verification on the data conversion result based on the second preset middleware function, and outputting the data conversion result, it achieves the purpose of flexibly reading and converting media data, improving the flexibility and efficiency of media data reading and conversion, while also ensuring the accuracy of the conversion result through rationality verification.
[0045] Figure 3 This is a flowchart illustrating the determination of a first preset middleware function provided in an embodiment of this application. For example... Figure 3 As shown, the specific steps include the following: S301, identify the field identifier of the media data field and the function identifier of multiple preset middleware functions, compare the field identifier and the function identifier, and determine the multiple target preset middleware functions that are the same as the field identifier among the function identifiers.
[0046] In this context, a field identifier can be a pre-defined marker that distinguishes a particular media data function from others. A function identifier can be a pre-defined marker that indicates the original media data function that a preset middleware function can transform. A media data function can consist of multiple media data fields; that is, one field identifier can correspond to multiple media data fields. For example, if a field identifier represents a media data function that is an audit function, then this function can consist of an audit ID field, an audit time field, and an audit result field. If a field identifier corresponds to multiple media data fields, then this field identifier can correspond to multiple function identifiers of preset middleware functions used to transform each media data field under that identifier, and this field identifier is the same as its multiple corresponding function identifiers. The field identifiers for the same media data function on different media platforms are different, and the function identifiers of the preset middleware functions that process data from different media platforms are also different.
[0047] In one embodiment, the media data field may include a field identifier, which can identify the field identifier of the media data field and the function identifier of multiple preset middleware functions. The field identifier and the function identifier are compared to see if they are the same, and the multiple preset middleware functions that are the same as the field identifier in the function identifier are selected as the target preset middleware functions.
[0048] S302, determine the field structure corresponding to the field identifier, combine multiple target preset middleware functions according to the field structure, and obtain the first preset middleware function.
[0049] The field structure can be a field that identifies the order of multiple media data fields.
[0050] In one embodiment, the field positions of multiple media data fields corresponding to the field identifier can be identified, and the field structure corresponding to the field identifier can be determined based on the field position of each media data field. The target preset middleware functions corresponding to each media data field can be combined in the order of function execution according to the field order of the media data fields in the field structure to obtain the first preset middleware function.
[0051] In one embodiment, combining multiple target preset middleware functions according to the field structure includes: determining the data arrangement order among multiple media data corresponding to the media data field according to the field structure, and determining the dependency relationship among the multiple media data; determining the combination position of the target preset middleware function corresponding to each media data according to the data arrangement order and dependency relationship, and combining multiple target preset middleware functions according to the combination structure.
[0052] The dependencies between multiple media data can include execution order dependencies and execution logic dependencies.
[0053] In one embodiment, the data arrangement order of multiple media data corresponding to a media data field can be determined according to the field structure, and the dependency relationship between multiple media data can be determined according to the association relationship between media data fields in the field structure.
[0054] For example: the field structure is as follows (code) { "id": "video_b", "source_id": "video_a", "processing_type": "add_subtitle" } Based on the relationships between fields in the code, it can be determined that video_b is generated on the basis of video_a, that is, the media data field "source_id" and the field "id" have an input-output dependency relationship.
[0055] The combination position of the target preset middleware function corresponding to each media data can be determined according to the data arrangement order and dependency relationship, and multiple target preset middleware functions can be combined according to the combination structure.
[0056] This solution determines the data arrangement order among multiple media data corresponding to a media data field and the dependencies between multiple media data based on the field structure. It then determines the combination position of the target preset middleware function corresponding to each media data and combines multiple target preset middleware functions according to the combination structure. This can improve the logical accuracy of combining multiple target preset middleware functions and the flexibility and efficiency of media data transformation with complex structures.
[0057] The technical solution provided in this application identifies the field identifier of the media data field and the function identifiers of multiple preset middleware functions, compares the field identifier and the function identifier, determines multiple target preset middleware functions that are the same as the field identifier in the function identifier, determines the field structure corresponding to the field identifier, and combines multiple target preset middleware functions according to the field structure to obtain the first preset middleware function. This can achieve the purpose of determining the middleware function by combining the media data field identifier and the field structure, improves the accuracy of the determination result of the first preset middleware function, and is conducive to improving the accuracy of data conversion.
[0058] Figure 4 This is a flowchart illustrating the verification data conversion result provided in an embodiment of this application. For example... Figure 4 As shown, the specific steps include the following: S401, Read the original data from the data conversion result, input the original data into the second preset middleware function, and perform standard data lookup and data comparison based on the second preset middleware function to determine whether the original data is the same as the standard data.
[0059] The original data can be the original values of the data in the data conversion result. Since the first preset middleware function only processes the data format and structure of the media data, the converted media data has the same values as the original media data. Standard data lookup can be an operation that searches for the standard value corresponding to the original value of the media data in the conversion result. The standard value can be a value stored in an existing database, or a preset value stored in the system.
[0060] In one embodiment, the original data in the data transformation result can be read and input into a second preset middleware function. The standard data can be searched through the numerical search path in the second preset middleware function. The searched standard data is compared with the original data to determine whether the original data is the same as the standard data.
[0061] S4021, under the condition that the original data and the standard data are the same, the data rationality verification of the data transformation result is passed.
[0062] In one embodiment, if the original data and the standard data are the same, it can be determined that the data transformation result conforms to the characteristics of the standard data, and the rationality verification passes.
[0063] S4022, When the original data differs from the standard data, the data rationality verification of the data transformation result fails.
[0064] In one embodiment, if the original data differs from the standard data, the data transformation result is determined to be inconsistent with the characteristics of the standard data, and the rationality check fails.
[0065] In one embodiment, after determining that the data rationality verification of the data transformation result fails, the method further includes: normalizing the original data and standard data, and calculating the similarity between the first normalization result of the original data and the second normalization result of the standard data; comparing whether the similarity of the processing results meets the preset similarity threshold of the same data, and if the similarity of the processing results meets the preset similarity threshold of the same data, correcting the original data according to the standard data until the data rationality verification passes.
[0066] Normalization can be a process that unifies the representation of the original data and the standard data. For example, it can convert both the original and standard data representations into proportional forms. The similarity of the processing results can be the degree of closeness between the first normalization result and the second normalization result of the standard data. The preset similarity threshold for identical data can be a pre-set minimum similarity value for the processing results when the original and standard data are identical.
[0067] In one embodiment, the original data and standard data can be normalized, and the similarity between the first normalized result of the original data and the second normalized result of the standard data can be calculated using a similarity algorithm. Since the original data and standard data may have inconsistent representations, leading to data validity checks failing, data normalization can be performed first. Then, the similarity of the processing results can be compared to see if it is greater than or equal to a preset threshold for similarity between identical data. If the similarity is greater than or equal to the preset threshold, it indicates that the original data and standard data are identical. In this case, the original data can be corrected according to the standard data until the data validity check passes.
[0068] This solution normalizes the original data and standard data, and then corrects the original data according to the standard data when the similarity of the processing results meets the preset similarity threshold, until the data rationality verification passes. This avoids the problem of data transformation structure rationality verification failing due to different data presentation formats, and improves the accuracy of data transformation result rationality verification.
[0069] The technical solution provided in this application reads the original data from the data conversion result and inputs the original data into a second preset middleware function. Based on the second preset middleware function, standard data is searched and compared to determine whether the original data is the same as the standard data. If the original data is the same as the standard data, the data rationality verification of the data conversion result is determined to be passed. If the original data is different from the standard data, the data rationality verification of the data conversion result is determined to be failed. This achieves the purpose of rationality verification of the data conversion result and ensures the accuracy of the data conversion result.
[0070] Figure 5 This is a structural block diagram of a media data conversion device provided in an embodiment of this application. Figure 5 As shown, it specifically includes the following: The media data determination module 501 is used to receive the media task to be processed and determine the media data fields associated with the media task to be processed. The data conversion module 502 is used to determine the first preset middleware function corresponding to the media data field, and to perform data conversion on the media data corresponding to the media data field based on the first preset middleware function; The data verification module 503 is used to determine the second preset middleware function corresponding to the data transformation result, and to perform data rationality verification on the data transformation result based on the second preset middleware function; The conversion result output module 504 is used to output the data conversion result if the data rationality verification of the data conversion result passes.
[0071] Furthermore, the data transformation module 502 is specifically used for: Identify the field identifier of the media data field and the function identifier of multiple preset middleware functions, compare the field identifier and the function identifier, and determine the multiple target preset middleware functions that are the same as the field identifier in the function identifier; Determine the field structure corresponding to the field identifier, and combine multiple target preset middleware functions according to the field structure to obtain the first preset middleware function.
[0072] Furthermore, the data transformation module 502 is specifically used for: Based on the field structure, determine the data arrangement order among multiple media data corresponding to the media data field, and determine the dependencies between multiple media data; The combination position of the target preset middleware function corresponding to each media data is determined based on the data arrangement order and dependency relationship, and multiple target preset middleware functions are combined according to the combination structure.
[0073] Furthermore, the data verification module 503 is specifically used for: Read the original data from the data transformation result and input the original data into the second preset middleware function to perform standard data lookup and data comparison based on the second preset middleware function to determine whether the original data is the same as the standard data; If the original data and the standard data are the same, the data rationality verification of the data transformation result is passed. When the original data differs from the standard data, the data rationality verification of the data transformation result fails.
[0074] Furthermore, the data verification module 503 is also used for: The original data and standard data are normalized, and the similarity between the first normalization result of the original data and the second normalization result of the standard data is calculated. Compare the similarity of the processing results to see if it meets the preset similarity threshold for the same data. If the similarity of the processing results meets the preset similarity threshold for the same data, correct the original data according to the standard data until the data rationality verification is passed.
[0075] Furthermore, the data verification module 503 is also used for: Identify the data type of the data transformation result and determine whether the data type is a middleware validation type based on the preset middleware validation type library; If the data type is not the middleware validation type, terminate the data validity validation process and output the data transformation result.
[0076] Furthermore, the conversion result output module 504 is also used for: The data conversion results are formatted based on preset format validation rules, and missing data are checked based on missing data validation rules. If the data conversion result format verification passes and the missing data verification passes, the media data conversion is considered complete.
[0077] The technical solution provided in this application includes a media data determination module for receiving a media task to be processed and determining the media data field associated with the media task; a data conversion module for determining a first preset middleware function corresponding to the media data field and performing data conversion on the media data corresponding to the media data field based on the first preset middleware function; a data verification module for determining a second preset middleware function corresponding to the data conversion result and performing data rationality verification on the data conversion result based on the second preset middleware function; and a conversion result output module for outputting the data conversion result if the data rationality verification of the data conversion result passes. This media data conversion device solves the problems of inflexible conversion methods, inaccurate conversion results, and low conversion efficiency in the prior art. By determining the media data field associated with the media task to be processed to determine the media data to be converted, performing data conversion based on the first preset middleware function, and performing data rationality verification on the data conversion result based on the second preset middleware function, the device outputs the data conversion result. This achieves the goal of flexibly reading and converting media data, improving the flexibility and efficiency of media data reading and conversion, while also ensuring the accuracy of the conversion result through rationality verification.
[0078] The media data conversion device in this application embodiment can be configured in a device, or it can be configured in a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not specifically limit the scope.
[0079] The media data conversion device in this application embodiment can be an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0080] The media data conversion device provided in this application embodiment can realize the various processes implemented in the above method embodiments, and will not be described again here to avoid repetition.
[0081] like Figure 6 As shown, this application embodiment also provides an electronic device 600, including a processor 601, a memory 602, and a program or instructions stored in the memory 602 and executable on the processor 601. When the program or instructions are executed by the processor 601, they implement the various processes of the above-described media data conversion method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0082] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0083] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described media data conversion method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0084] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0085] This application also provides a program product including program code. When the program product is run on a computer device, the program code causes the computer device to perform the steps of the methods described above according to various exemplary embodiments of this application. For example, the computer device can execute a media data conversion method described in the embodiments of this application. The program product can be implemented using any combination of one or more readable media.
[0086] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0088] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0089] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A media data conversion method, characterized in that, The method includes: Receive a media task to be processed and determine the media data fields associated with the media task to be processed; Determine a first preset middleware function corresponding to the media data field, and perform data transformation on the media data corresponding to the media data field based on the first preset middleware function; Determine a second preset middleware function corresponding to the data transformation result, and perform data rationality verification on the data transformation result based on the second preset middleware function; If the data conversion result passes the data rationality verification, the data conversion result is output.
2. The media data conversion method according to claim 1, characterized in that, The step of determining the first preset middleware function corresponding to the media data field includes: Identify the field identifier of the media data field and the function identifier of multiple preset middleware functions, compare the field identifier and the function identifier, and determine multiple target preset middleware functions that are the same as the field identifier among the function identifiers; Determine the field structure corresponding to the field identifier, and combine the multiple target preset middleware functions according to the field structure to obtain the first preset middleware function.
3. The media data conversion method according to claim 2, characterized in that, The step of combining the multiple target preset middleware functions according to the field structure includes: Based on the field structure, determine the data arrangement order among multiple media data corresponding to the media data field, and determine the dependency relationship among the multiple media data; The combination position of the target preset middleware function corresponding to each media data is determined according to the data arrangement order and the dependency relationship, and the multiple target preset middleware functions are combined according to the combination structure.
4. The media data conversion method according to claim 1, characterized in that, The step of performing data validity verification on the data transformation result based on the second preset middleware function includes: Read the original data from the data transformation result, input the original data into the second preset middleware function, and perform standard data lookup and data comparison based on the second preset middleware function to determine whether the original data is the same as the standard data; If the original data is the same as the standard data, the data rationality verification of the data transformation result is deemed to have passed. If the original data differs from the standard data, the data rationality verification of the data transformation result fails.
5. The media data conversion method according to claim 4, characterized in that, After determining that the data reasonableness verification of the data transformation result fails, the method further includes: The original data and the standard data are normalized, and the similarity between the first normalization result of the original data and the second normalization result of the standard data is calculated. The similarity of the processing results is compared to see if it meets the preset similarity threshold for the same data. If the similarity of the processing results meets the preset similarity threshold for the same data, the original data is corrected according to the standard data until the data rationality verification is passed.
6. The media data conversion method according to claim 1, characterized in that, Before determining the second preset middleware function corresponding to the data transformation result, the method further includes: Identify the data type of the data transformation result, and determine whether the data type is a middleware verification type according to the preset middleware verification type library; If the data type is not a middleware validation type, terminate the data validity validation process and output the data conversion result.
7. The media data conversion method according to claim 1, characterized in that, Before outputting the data transformation result, the method further includes: The data conversion result is format-validated based on preset format validation rules, and the data conversion result is also checked for missing data based on missing data validation rules. If the data conversion result format verification passes and the missing data verification passes, the media data conversion is determined to be complete.
8. A media data conversion device, characterized in that, The device includes: The media data determination module is used to receive a media task to be processed and determine the media data fields associated with the media task to be processed. The data conversion module is used to determine a first preset middleware function corresponding to the media data field, and to perform data conversion on the media data corresponding to the media data field based on the first preset middleware function; The data verification module is used to determine the second preset middleware function corresponding to the data transformation result, and to perform data rationality verification on the data transformation result based on the second preset middleware function; The conversion result output module is used to output the data conversion result if the data rationality verification of the data conversion result passes.
9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and running on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the media data conversion method as described in any one of claims 1-7.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the media data conversion method as described in any one of claims 1-7.
Citation Information
Patent Citations
Data conversion method and device, computer equipment and storage medium
CN110377650A
Customs declaration data matching method and device
CN112395866A
Data import method, storage medium and electronic device
CN115357652A
Data verification method and device
CN115543980A