CN117827179A - Data processing method, device, electronic equipment and storage medium - Google Patents

Data processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117827179A
CN117827179A CN202211194193.XA CN202211194193A CN117827179A CN 117827179 A CN117827179 A CN 117827179A CN 202211194193 A CN202211194193 A CN 202211194193A CN 117827179 A CN117827179 A CN 117827179A
Authority
CN
China
Prior art keywords
target
page
source
editor
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211194193.XA
Other languages
Chinese (zh)
Inventor
张节垒
吴智明
林顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yaji Software Co Ltd
Original Assignee
Xiamen Yaji Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yaji Software Co Ltd filed Critical Xiamen Yaji Software Co Ltd
Priority to CN202211194193.XA priority Critical patent/CN117827179A/en
Publication of CN117827179A publication Critical patent/CN117827179A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application provides a data processing method, a data processing device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: acquiring a multimedia file to be converted; analyzing the multimedia file to obtain at least one source page and source elements corresponding to each source page; converting original element information of a source element into target element information suitable for a target editor; for each source page, creating a target page corresponding to the source page in a target editor, and acquiring a target component corresponding to a source element; and configuring a target component based on target element information of the source element, and loading the target component into a target page to generate target multimedia data. According to the embodiment of the application, the multimedia file is effectively compatible with the target editor, the multimedia file can be restored in the target editor without being manufactured again, a large amount of labor cost and time cost are saved, and the reusability of resources is improved.

Description

Data processing method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, a data processing device, an electronic device, and a storage medium.
Background
With the rapid development of online education, education editors have been developed. The education editor provides powerful assistance for online education, overcomes the defects of long development period of interactive courseware, high communication cost and the like, and meets the personalized requirements of education institutions for various function expansion.
In addition to educational editors, various multimedia files are widely used in the educational industry to enrich teaching modes, such as PPT (PowerPoint) courseware. However, commonly used multimedia files often require specific software to open and are not compatible with educational editors. If an existing multimedia file is to be restored in the educational editor, it is necessary to make a new production in the educational editor, resulting in a great deal of repetitive work, wasting labor costs and time costs.
Disclosure of Invention
The embodiment of the application provides a data processing method, a data processing device, electronic equipment and a storage medium, which can solve the problem that a multimedia file and an education editor cannot be compatible in the prior art.
The technical scheme is as follows:
according to an aspect of the embodiments of the present application, there is provided a method of data processing, the method being applied to a target editor, the method comprising:
Acquiring a multimedia file to be converted;
analyzing the multimedia file to obtain at least one source page and source elements corresponding to each source page;
converting the original element information of the source element into target element information applicable to the target editor;
for each source page, creating a target page corresponding to the source page in the target editor, and acquiring a target component corresponding to the source element;
and configuring the target component based on the target element information of the source element, loading the target component into the target page, and generating target multimedia data.
Optionally, the original element information includes at least one of original element attribute information and an original animation effect, the original element attribute information including at least one of an element type, an element position, an element size, and an element color.
Optionally, the obtaining the target component corresponding to the source element includes:
determining a component type corresponding to the element type according to the element type of the source element and a preset first corresponding relation;
and according to the component type, inquiring to obtain a target component corresponding to the source element from a component library of the target editor.
Optionally, the determining, according to the element type of the source element and the preset first correspondence, the component type corresponding to the element type includes:
determining an actual element type of the source element through the attribute description of the source element, mapping the actual element type of the source element to an element type supported by the target editor, and determining a component type corresponding to the element type.
Optionally, the method further comprises:
determining a corresponding target animation effect according to the original animation effect of the source element and a preset second corresponding relation; the target animation effect is an animation effect applicable to the target editor;
and configuring the target animation effect to a target component corresponding to the source element.
Optionally, the original animation effect is a combination of a first original animation effect and a second original animation effect; the target animation effect is a combination of a first target animation effect and a preset target animation effect, or a combination of the first target animation effect and a second target animation effect.
Optionally, when the original element information is an element size, the converting the original element information of the source element into target element information applicable to the target editor includes:
And converting the original element size of the source element into a target element size suitable for the target editor according to a preset size conversion method, wherein the size conversion method comprises at least one of angle conversion, width conversion and font size conversion.
Optionally, the creating a target page corresponding to the source page in the target editor includes:
determining a corresponding target page attribute according to the original page attribute of the source page and a preset third corresponding relation;
creating the target page in the target editor according to the target page attribute;
wherein the original page attributes include at least one of page name, page size, and page context.
Optionally, the method further comprises:
determining a target switching mode of the target page according to the original switching mode of the source page and a preset fourth corresponding relation; the target switching mode is a switching mode suitable for the target editor;
and configuring the target switching mode to a target page corresponding to the source page.
Optionally, the method further comprises:
reading resource data in the multimedia file, and determining source reference position information of the resource data in the multimedia file;
Generating corresponding target reference position information based on the source reference position information, and storing the resource data in the target editor based on the target reference position information for calling by a target component referencing the resource data.
According to another aspect of an embodiment of the present application, there is provided a data processing apparatus, the apparatus including:
the acquisition module is used for acquiring the multimedia file to be converted;
the analysis module is used for analyzing the multimedia file to obtain at least one source page and source elements corresponding to each source page;
the conversion module is used for converting the original element information of the source element into target element information suitable for the target editor;
the target component determining module is used for creating a target page corresponding to the source page in the target editor and acquiring a target component corresponding to the source element for each source page;
and the target multimedia data generation module is used for configuring the target component based on the target element information of the source element, loading the target component into the target page and generating target multimedia data.
According to another aspect of the embodiments of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any one of the data processing methods described above when executing the program.
According to a further aspect of embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the data processing methods described above.
The beneficial effects that technical scheme that this application embodiment provided brought are:
the method comprises the steps of analyzing and converting the multimedia file, determining target element information of a source element, configuring a target component according to a target component corresponding to the source element and the target element information of the source element, loading the target component into a target page, and generating target multimedia data, so that the effective compatibility of the multimedia file and a target editor is realized, the multimedia file can be restored in the target editor without being manufactured again, a great deal of labor cost and time cost are saved, the existing multimedia file resources are fully utilized, and the reusability of the resources is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic view of an application environment of a data processing method according to an embodiment of the present application;
Fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a source element reduction process according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this application, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present application. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
With the rapid development of online education, an education editor has the advantages of convenient resource acquisition, capability of building various courseware templates according to requirements, and the like. In addition to educational editors, various multimedia files are widely employed in the educational industry to enrich teaching patterns, such as PPT courseware. However, commonly used multimedia files often require specific software to open and are not compatible with educational editors. If an existing multimedia file is to be restored in the educational editor, it is necessary to make a new production in the educational editor, resulting in a great deal of repetitive work, wasting labor costs and time costs.
The data processing method, device, electronic equipment and storage medium provided by the application aim to solve the technical problems in the prior art.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
Fig. 1 is a schematic view of an application environment of a data processing method provided in an embodiment of the present application, where the application environment includes a terminal device 101, a target editor is installed in the terminal device, the target editor may obtain a multimedia file to be converted, parse the multimedia file to obtain each source page and a source element corresponding to the source page, then convert original element information of the source element into target element information applicable to the target editor, for each source page, create a target page corresponding to the source page in the target editor, obtain a target component corresponding to the source element, configure the target component based on the target element information of the source element, and load the target component into the target page to generate target multimedia data.
In the above application scenario, the conversion for the multimedia file is performed by the user terminal installed with the target editor, and in other application scenarios, the above conversion operation may be performed by the server. Those skilled in the art will appreciate that the above examples do not limit the application scenario of the data processing method of the present application.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing service. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
Fig. 2 is a flow chart of a data processing method according to an embodiment of the present application, and as shown in fig. 2, the method is applied to a target editor, and includes:
in step 201, a multimedia file to be converted is obtained.
Specifically, the multimedia file to be converted may be a multimedia file to be imported into the target editor, and the multimedia file may be a file combining multiple media such as images, sounds, images, texts, animations, etc., and optionally, the multimedia file may be a PPT file.
Step 202, parsing the multimedia file to obtain at least one source page and source elements corresponding to each source page.
Specifically, after the multimedia file is obtained, the multimedia file is parsed to obtain at least one source page included in the multimedia file and a source element corresponding to each source page. The source page may be a page included in the multimedia file, and the PPT file is taken as an example, where one slide in the PPT file is a source page. The source elements may include various types of pictures, text, shapes, formulas, audio, video, and tables.
The parsing mode may be complete parsing, that is, the original content of the multimedia file is completely reserved during parsing; the visual part of the file, i.e. the rendered presentation form, may also be directly parsed for selective parsing, i.e. parsing the original data composition of the multimedia file is not parsed during parsing, which is not particularly limited in the embodiment of the present application.
Here, the parsed data may include a source page included in the multimedia and original page information of the source page, where the original page information may include attribute information such as width and height, background, name, etc. of the page, and animation information such as a page appearance or a departure mode; the source page can also comprise source elements and original element information of the source elements, wherein the original element information can comprise attribute information such as types, positions, colors and the like of the elements, and animation information such as dynamic effects of element display and the like.
Step 203 converts the original element information of the source element into target element information suitable for the target editor.
Specifically, since the original multimedia file can be opened only by specific software, for example, the PPT file can be opened only by WPS (office software) or Microsoft Office PowerPoint (presentation software of microsoft corporation), the data format representing the multimedia file can support only specific software. In order to restore the multimedia file in the target editor, the multimedia file needs to be converted into a data format suitable for the target editor.
After the parsing of the multimedia data is completed, at least one source page and at least one source element included in each source page can be parsed from a complete multimedia file. Converting original element information of a source element according to a preset corresponding relation to obtain corresponding target element information, wherein the target element information is information describing a target element applicable to a target editor, and the target element information can comprise attribute information such as type, position and color of the target element, animation information such as dynamic effect of target element display.
For example, when the source element is color-expressed based on HSL (Hue, saturation, and brightness), and color-expressed based on RGB (Red, green, blue) in the target editor, the color attribute HSL of the original element of the source element needs to be converted into the color attribute RGB of the target element.
Step 204, for each source page, creating a target page corresponding to the source page in the target editor, and obtaining a target component corresponding to the source element.
Specifically, after the conversion of the element is completed, the converted element needs to be further imported into the target editor. For each source page, a target page corresponding to the source page is created in the target editor, wherein the target page is a scene page built in the target editor, and page attributes of the target page, such as length, width, background and the like, can be adaptively adjusted according to the corresponding source page, or default settings of the target editor can be directly adopted, and the embodiment of the application is not limited to the foregoing.
After the creation of the target page is completed for each source page, that is, the source page is imported into the target editor, the element corresponding to the source page needs to be further imported into the target editor, and the source element can be restored through the target component corresponding to the source element. The target component may be a software entity encapsulated for a specific object and built in the target editor, and for different kinds of objects, the target component may include multiple types of pictures, texts, shapes, formulas, audio, video, tables, and the like.
Step 205, configuring a target component based on the target element information of the source element, and loading the target component into the target page to generate target multimedia data.
Specifically, the target component may include a component attribute, and by setting the component attribute of the component, an object corresponding to the component may be presented in a specific form in the target page. After the source element is converted, the obtained target element information is suitable for a target editor, so that a corresponding target component can be configured according to the target element information of the source element, and the configured target component is loaded into a target page, namely the source element can be restored through the target component.
Fig. 3 is a schematic diagram of a source element restoring process provided in this embodiment of the present application, as shown in fig. 3, where a source element in a PPT file presentation 1 is a circle, target element information of the source element includes coordinates, a circle center, a radius, a contour color, a filling pattern, and the like mapped to the circle in a target editor, a target component corresponding to the source element is a shape component, and component attributes of the target component are set according to the coordinates, the circle center, the radius, the contour color, the filling pattern, and the like in the target element information, and by loading the target component into a target page, a circle with the same size, the same contour color, the same filling pattern as the source element and the same relative position in the page can be generated in the target page, that is, restoration of the source element in the target editor is completed.
For each source page, the source elements included in each source page can be imported into the target editor based on the steps above, and then the entire multimedia file can be imported into the target editor. After the multimedia file is imported, the data correspondingly generated in the target editor is used as target multimedia data. The target multimedia data is multimedia data which is applicable to the target editor and has the same content and form as the original multimedia file.
According to the method provided by the embodiment of the application, the target element information of the source element is determined by analyzing and converting the multimedia file, the target component is configured according to the target component corresponding to the source element and the target element information of the source element, and the target component is loaded into the target page to generate the target multimedia data, so that the effective compatibility of the multimedia file and the target editor is realized, the multimedia file can be restored in the target editor without remanufacturing, a great amount of labor cost and time cost are saved, the existing multimedia file resources are fully utilized, and the reusability of the resources is improved.
As an alternative embodiment, the original element information includes at least one of original element attribute information and an original animation effect, and the original element attribute information includes at least one of an element type, an element position, an element size, and an element color.
In particular, the raw element information may include static raw element attribute information and/or dynamic raw animation effects, and the raw element attribute information may include at least one of an element type, an element position, an element size, and an element color.
The element position may be a relative position of the element in the corresponding page, the element position may be represented as coordinates, the element size may be a size of the element, such as a length and a width, and the element color may be a data format represented by the element color. Accordingly, the target element attribute information may also include at least one of an element type, an element position, an element size, and an element color.
As an alternative embodiment, when the original element information includes an element position, converting the original element information of the source element into target element information suitable for the target editor, includes:
according to a preset position conversion method, converting an original element position of a source element into a target element position suitable for a target editor, wherein the position conversion method is used for converting the original element position into the target element position suitable for the target editor.
As an alternative embodiment, when the original element information is an element size, converting the original element information of the source element into target element information suitable for the target editor includes:
And converting the original element size of the source element into a target element size suitable for a target editor according to a preset size conversion method, wherein the size conversion method comprises at least one of angle conversion, width conversion and font size conversion.
The following description will take a multimedia file as a PPT file as an example.
Since the measurement unit of the PPT file is specific, for example, the default unit is dxa units, that is, 20 times of the pixel point; EMUs (English Metric Unit, english metric units) are used to represent the width of pictures and other elements; half-points are Half-dots of font size, one dot being equal to two Half-dots. While the target editor may use different units of measure to represent the element size and coordinate location, e.g., pixels (px), importing the PPT file into the target editor requires unit scaling.
The manner of angle conversion can be as follows: target element angle = original element angle/60000; the width conversion mode can be as follows: target element width = PPT element width (editor scene width/PPT scene width); the font size scaling may be: target font size= (PPT element font size/100/72) × 914400 (editor scene width/PPT scene width).
Assuming a slide (i.e., source page) is 12192000EMUs wide by 6858000EMUs high by 1920px wide by 1080px high for the scene of the target editor, e.g., source element width 2579370EMUs, then the source element width is 2579370 x (1920/12192000) for the target editor.
Furthermore, in the case of a PPT file with a percentage of thousands of times, that is, a value representing one percent per 1000 units, that is, a corresponding ratio of 1 to 100000, a value of thousands of times is required when clipping the picture size, and the original value is divided by 1000, so as to obtain the value of the percentage.
As an alternative embodiment, when the original element information includes an element color, converting the original element information of the source element into target element information suitable for the target editor, includes:
according to a preset color conversion method, converting an original element color of a source element into a target element color suitable for a target editor, wherein the color conversion method is used for converting the original element color into the target element color suitable for the target editor.
Since the transformation of colors in the PPT file is through modification of the relevant properties of the underlying colors. For example, transparency is a color-related attribute. By changing the relevant properties, such as hsl, tint, shade, etc., the manner in which the color is presented can be changed. The color representation modes in the target editor are different, for example, color representation can be performed through formats such as Hex (hexadecimal color mode), RGBA (color space composed of RGB three channels and Alpha channels), and the like, so that the original color representation of the element in the PPT can be converted into the format supported by the target editor through a preset color conversion method. The preset color conversion method can be any conversion method conforming to the microsoft specification.
As an optional embodiment, step 204 of obtaining the target component corresponding to the source element may include:
determining a component type corresponding to the element type according to the element type of the source element and a preset first corresponding relation;
and according to the component types, inquiring to obtain the target components corresponding to the source elements from the component library of the target editor.
Specifically, the target editor is configured with a component library including a plurality of components, each component corresponding to one component type, for example, a shape component that processes shapes, a picture component that processes pictures, a text component that processes texts, a formula component that processes formulas, a form component that processes forms, an audio component that processes audio, a video component that processes video, and the like.
Mapping the element types of the source elements according to a preset first corresponding relation, so that the component types corresponding to the element types can be obtained, wherein the first corresponding relation is the corresponding relation between the element types and the component types.
For example, when the element type is a shape, the component type corresponding to the element type is a shape component; when the element type is a picture, the component type corresponding to the element is a picture component. And then according to the component type, inquiring from a component library of the target editor to obtain the target component corresponding to the source element.
Here, the source element and the target component are in a one-to-one correspondence, that is, there is a target component corresponding to one source element. For example, the source page includes two source elements, the first source element is rectangular, the corresponding element type is shape, and there is a first shape component corresponding to the first source element; the second source element is circular and the corresponding element type is shape, there is a second shape component corresponding to the second source element.
It should be noted that if there is no component matching the source element in the component library of the target editor, the restoration of the source element in the target editor may be omitted.
As an optional embodiment, the determining, according to the element type of the source element and the preset first correspondence, the component type corresponding to the element type includes:
the method comprises the steps of determining the actual element type of a source element through attribute description of the source element, mapping the actual element type of the source element to the element type supported by a target editor, and determining the component type corresponding to the element type.
Specifically, the actual element type of the source element may be determined by analyzing and identifying the attribute description of the source element. Wherein, the attribute description of the source element may be information describing the attribute of the source element, and the actual element type of the source element may be different from the actual type of storage or representation of the source element in the computer.
Alternatively, the representation of the elements in the PPT file is not the same as the actual type, e.g., text in the PPT is also represented as a shape, so the actual type of the elements in the PPT file needs to be identified first, where it can be determined by analyzing the attribute description of the elements. For example, when "txBox (an attribute name)" in the shape attribute description of the shape element is 1, this element is represented in the form of a text box, and thus it can be determined that the actual type of the element is text. For another example, most multimedia elements are stored in the Picture in the PPT, the actual type of the element can be determined through specific attribute information of the Picture element, if the Picture element describes a file with video file and audio file, and related resources are referenced, the actual type of the Picture element can be determined to be video and audio, and on the basis, the Picture of the Picture element can be used as a cover of audio and video.
After determining the actual type of the element in the PPT file, the actual type of the element may be mapped to the element type supported by the target editor. For example, the target editor supports element types such as text, shape, audio, video, formulas, tables, etc., and the actual type of the element can be directly used as the element type to determine the corresponding component type.
As an alternative embodiment, the method further comprises:
determining a corresponding target animation effect according to the original animation effect of the source element and a preset second corresponding relation; the target animation effect is an animation effect suitable for a target editor;
configuring a target animation effect to a target component corresponding to a source element;
the original animation effect is a combination of the first original animation effect and the second original animation effect; the target animation effect is a combination of a first target animation effect and a preset target animation effect, or a combination of the first target animation effect and a second target animation effect.
Specifically, the source elements in the multimedia file include not only static attributes of color, position, size, etc., but also animation effects of appearance and/or exit. The second corresponding relation is a corresponding relation between the original animation effect and the target animation effect, and in order to restore the animation effect of the source element in the multimedia file, the original element effect of the source element can be mapped according to the preset second corresponding relation, so that the corresponding target animation effect is obtained.
Wherein the original animation effect and/or the target animation effect may be a combination of a first animation effect and a second animation effect, the first animation effect may include entering, emphasizing, exiting, emphasizing, and the like, and the second animation effect may include fading, shaping, erasing, splitting, and the like. The first animation effect is a primary effect, and the second animation effect is a secondary effect.
The first animation effect of the animation effect may include a corresponding number of second animation effects, for example, the first animation effect is an entry, and the corresponding second animation effect may be a multiple animation form of a fade entry, a shutter entry, a wipe entry, a fly-in, and the like. The first animation effect is typically a common effect that can be presented in both the multimedia file and the target editor; the second animation effect is a further refinement, which may not be rendered in the multimedia file and/or in the target editor.
Optionally, the original animation effects may include a first original animation effect and a second original animation effect, first determining a first target animation effect corresponding to the first original animation effect of the source element, then determining a second target animation effect corresponding to the second original animation effect of the source element, and finally determining a final target animation effect by combining the first target animation effect and the second target animation effect, where the final target animation effect is a combination of the first target animation effect and the preset target animation effect, or a combination of the first target animation effect and the second target animation effect.
For example, the original animation effect of the source element is entering in a desalination manner, that is, the first original animation effect is entering, the second original animation effect is fading, according to a preset corresponding relationship, the first original animation effect is mapped to obtain the first target animation effect as entering, and then the second original animation effect is mapped to obtain the second target animation effect as fading, and the final target animation effect enters in a desalination manner, that is, the combination of the first target animation effect and the second target animation effect.
After the target animation effect is confirmed, the target animation effect is configured to the target component, where the target animation effect may be given to the target component as an attribute, or a component identifier corresponding to the target component may be added to the target animation effect.
It should be noted that if there is no second target animation effect corresponding to the second original animation effect of the source element in the target editor, the processing may be performed by using a preset target animation effect, and the final target animation effect is a combination of the first target animation effect and the preset target animation effect.
For example, the original animation effects include a first original animation effect being an entry, a second original animation effect being a wipe-type entry, the first original animation effect being mapped to a first target animation effect being an entry, the second original animation effect not being a corresponding second target animation effect, and a preset target animation effect, such as a fade-type entry, being adopted at this time, the wipe-type entry of the original animation effect being unified to a target animation effect fade-type entry.
Similarly, when the original animation effect is a stepwise exit, the target animation effect can uniformly adopt a desalination type exit; when the original animation effect is changed font type emphasis, the target animation effect can uniformly adopt impulse type emphasis. The processing mode can meet the requirement that the target editor can convert the animation effect of the main stream, and reduce the cost of developing individual and numerous special animation effects.
As an alternative embodiment, the original animation effect of the source element needs to be predetermined, and then the target animation effect corresponding to the original animation effect is determined according to the original animation effect of the source element; the original animation effect can be obtained by analyzing animation parameters of the source element.
For some original animation effects, it is difficult to confirm their animation classification, which can be obtained by analyzing the animation parameters of the source element. Taking a PPT file as an example, the animation effect of a source element can be identified by analyzing the animation parameters of the source element, for example, the animation parameters of the source element include the element height ppt_h= [0, '#ppt_h' ] and the element width ppt_w= [0, '#ppt_w' ] fields, the width and height of the element when the element appears can be analyzed to be 0, and then the element becomes the normal width and height of the element, so that the process is known to be a scaling action, and the scaling animation of the animation appears is obtained. If angular rotation is also included, then the animation is flipped from far to near. After the original animation effect of the source element is obtained through analysis, determining a target animation effect corresponding to the original animation effect according to the original animation effect of the source element by the method.
According to the method and the device, the corresponding target animation effect is determined according to the original animation effect of the source element and the preset second corresponding relation, and the target animation effect is configured to the target component corresponding to the source element, so that the restoration of the animation effect of the source element in the multimedia file is realized, and the restoration effect of the multimedia file is improved.
As an optional embodiment, creating a target page corresponding to the source page in the target editor in step 204 includes:
determining a corresponding target page attribute according to the original page attribute of the source page and a preset third corresponding relation;
creating a target page in a target editor according to the target page attribute;
wherein the original page attributes include at least one of page name, page size, and page context.
Specifically, in importing the source page into the target editor, the target page corresponding to the source page can be adaptively created according to the original page attribute of the source page, so as to restore the multimedia file as much as possible. The third corresponding relation is a corresponding relation between the original page attribute and the target page attribute, and the original page attribute of the source page is mapped according to the preset third corresponding relation to obtain the corresponding target page attribute. And setting pages in the target editor according to the target page attributes, and creating a target page.
The original page attribute includes at least one of a page name, a page size and a page background, where the page name is used to identify a page, and the page name may include a level of the page and/or a serial number of the page, for example, in a PPT file, the page name may be a page theme under a synopsis view or may be a page number, which is not limited in this embodiment of the present application. The page size may be the length and width of the page, and the page background may be the color, pattern or picture of the filled page.
As an alternative embodiment, the method further comprises:
determining a target switching mode of a target page according to an original switching mode of a source page and a preset fourth corresponding relation; the target switching mode is a switching mode suitable for a target editor;
and configuring the target switching mode to a target page corresponding to the source page.
Specifically, the source page in the multimedia file not only includes static attributes such as name, size, etc., but also includes a switching manner of appearance and/or exit. The preset fourth corresponding relation is a corresponding relation between an original switching mode and a target switching mode, and in order to restore the switching mode of the source page in the multimedia file, the original switching mode of the source page can be mapped according to the preset fourth corresponding relation to obtain a corresponding target switching mode, wherein the original switching mode and/or the target switching mode can comprise smoothing, desalting, pushing, erasing, dividing and the like.
After the target switching manner is confirmed, the target switching manner is configured to the target page, where the target switching manner may be given to the target page as an attribute, or a page identifier corresponding to the target page may be added to the target switching manner, which is not limited in the embodiment of the present application.
In the embodiment of the application, the target switching mode of the target page is determined according to the original switching mode of the source page and the preset fourth corresponding relation, and the target switching mode is configured to the target page corresponding to the source page, so that the switching mode of the source page in the multimedia file is restored, and the restoring effect of the multimedia file is improved.
As an alternative embodiment, the method further comprises:
reading resource data in the multimedia file, and determining source reference position information of the resource data in the multimedia file;
corresponding target reference position information is generated based on the source reference position information, and the resource data is stored in a target editor based on the target reference position information for invocation by a target component referencing the resource data.
Specifically, for the resource data in the multimedia file, such as pictures, audio, video and the like, in order to import the resource data into the target editor, the resource data in the multimedia file is first read, and meanwhile source reference position information of the resource data in the multimedia file is obtained, where the source reference position information may include an element identifier of a source element referencing the resource data and a page identifier of a source page where the source element is located.
And obtaining target reference position information corresponding to the source reference position information in the target editor according to the source reference position information, wherein the target reference position information can comprise a component identifier of a target component corresponding to a source element of the reference resource data and a page identifier of a target page corresponding to a source page where the source element is located. And correspondingly storing the resource data in a target editor according to the target reference position information so as to be called by a target component referencing the resource data, thereby realizing the restoration of the resource data of the multimedia file in the target editor.
In addition, in the process of importing the resource data in the multimedia file, the resource data in the multimedia file is already stored in the target editor, so that the resources contained in the target editor are expanded, and if the resource data can be reused in the subsequent editing production in the target editor, the resource reusability of the multimedia file is improved, and the resource reusability of the resource data contained in the multimedia file is also improved.
As an alternative embodiment, the method provided in the embodiment of the present application will be described below by taking a multimedia file as a PPT file and taking a target editor as an educational editor as an example.
Step one, analyzing the PPT;
the method specifically comprises the following steps: reading each page and elements in the page in the PPT; analyzing page information of the page to obtain a page analysis result; element information of the element is analyzed to obtain an element analysis result.
The PPT can comprise information, pages and elements in the pages of the file; the page parsing result may include attribute information and content source information of page information, for example, page scene page, width and height, background, page appearance, and stop-motion animation; the element analysis result can comprise all the elements such as characters, shapes, pictures, charts, audios and videos, tables, formulas and the like in the page, and the information such as coordinates, sizes, rotation, turning, shadows and the like displayed in the page by the elements; the animation of the elements can be included, and the animation mainly comprises a first animation effect such as appearance, disappearance, emphasis, path and the like and a second animation effect such as desalination, shape, erasure, splitting and the like. In addition, the resource files such as audio, video and pictures in the PPT need to be read out and imported into the material library of the education editor, so that subsequent quotation is facilitated.
The parsed data may include: page attributes (including page name, page size, page background, etc.), element types, element attributes (including coordinates of the element, size of the element, transparency of the element, borders of the element, color of the element, etc.), references to resources, links to the element, data for animation, etc.
Step two, converting the analyzed data;
the method specifically comprises the following steps: converting the element types into target types supported by the education editor; converting the size, coordinates, color and the like of the element attribute into a format supported by education editing; and converting the animation analysis and recognition of the elements into animations corresponding to the education editors.
Step three, importing the converted data into a teaching editor;
the method specifically comprises the following steps: according to the converted data, creating a courseware with the same name as the PPT, traversing the elements of all pages, creating a node for each element because each element of the education editor is a node, and then carrying out corresponding processing according to different classifications. For example: the method comprises the steps of firstly creating an empty node, then mounting the empty node on a page, and endowing the empty node with element attributes, wherein main attributes comprise basic attributes such as name, x coordinate, y coordinate, width and height, scaling, overturning, rotating angle and the like; thereupon, an ICEShape component is added to the node, which is the shape component of the educational editor, and the main function is to draw the corresponding shape in the scene, and then read the elements of the shape. For example, if the element is a straight line, the ICEShape component needs to be assigned a start coordinate and an end coordinate, and line color, line thickness, shadow effect and the like, and the element is processed and then enters the next element import creation. The educational editor has some other components such as an iceext component that handles text rendering, an edmu sic component that handles audio, an edmu ave component that handles video.
After the element of each page is imported, the animation data of the current page needs to be processed again, the animation data is traversed, each animation binding element is bound according to the id of the binding element, the animation is mounted on a node of the page, and the converted animation attribute is assigned to the animation, wherein the animation attribute can comprise a triggering mode, delay, duration, direction and the like.
When the elements are imported, the content of the PPT can be restored in the education editor, so that the effect can be previewed in the education editor, and the content can be edited secondarily in the education editor.
According to the method provided by the embodiment of the application, the page information of the page is analyzed to obtain the page analysis result by reading each page and the elements in the page in the PPT, the element information of the elements is analyzed to obtain the element analysis result, and the page analysis result and the element analysis result are correspondingly matched with components in the education editor, so that the effects of displaying and animation of the PPT page and the like can be restored, the effective compatibility of the existing PPT file and the target editor is realized, the imported file can be edited for the second time in the education editor, the utilization of the existing PPT courseware resources is improved, and the labor cost and the time cost are reduced; after the PPT is converted into a format supported by the education editor, the PPT can be accessed and demonstrated by a mobile terminal or PC terminal browser at any time and any place by constructing and uploading, so that the limitation of the use of the PPT is reduced.
Fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, as shown in fig. 4, where the apparatus according to this embodiment may include:
an obtaining module 301, configured to obtain a multimedia file to be converted;
the parsing module 302 is configured to parse the multimedia file to obtain at least one source page and source elements corresponding to each source page;
a conversion module 303, configured to convert original element information of the source element into target element information applicable to the target editor;
a target component determining module 304, configured to create, for each source page, a target page corresponding to the source page in the target editor, and obtain a target component corresponding to the source element;
and the target multimedia data generating module 305 is configured to configure the target component based on the target element information of the source element, and load the target component into the target page to generate target multimedia data.
According to the device provided by the embodiment of the application, the multimedia file is analyzed and converted, the target element information of the source element is determined, the target component is configured according to the target component corresponding to the source element and the target element information of the source element, and the target component is loaded into the target page to generate the target multimedia data, so that the effective compatibility of the multimedia file and the target editor is realized, the multimedia file can be restored in the target editor without being manufactured again, a large amount of labor cost and time cost are saved, the existing multimedia file resources are fully utilized, and the reusability of the resources is improved.
As an alternative embodiment, in the apparatus, the original element information includes at least one of original element attribute information and an original animation effect, and the original element attribute information includes at least one of an element type, an element position, an element size, and an element color.
As an alternative embodiment, the target component determining module includes a target component type determining sub-module and a target component querying sub-module;
the target component type determining submodule is used for determining the component type corresponding to the element type according to the element type of the source element and a preset first corresponding relation;
and the target component query sub-module is used for querying and obtaining the target component corresponding to the source element from the component library of the target editor according to the component type.
As an alternative embodiment, the target component type determination submodule is configured to:
determining an actual element type of the source element through the attribute description of the source element, mapping the actual element type of the source element to an element type supported by the target editor, and determining a component type corresponding to the element type.
As an alternative embodiment, the apparatus further comprises:
The animation effect conversion module is used for determining a corresponding target animation effect according to the original animation effect of the source element and a preset second corresponding relation; the target animation effect is an animation effect applicable to the target editor;
and configuring the target animation effect to a target component corresponding to the source element.
As an alternative embodiment, in the apparatus, the original animation effect is a combination of a first original animation effect and a second original animation effect; the target animation effect is a combination of a first target animation effect and a preset target animation effect, or a combination of the first target animation effect and a second target animation effect.
As an alternative embodiment, when the original element information is an element size, the conversion module is configured to:
and converting the original element size of the source element into a target element size suitable for the target editor according to a preset size conversion method, wherein the size conversion method comprises at least one of angle conversion, width conversion and font size conversion.
As an alternative embodiment, the target component determining module comprises a target page creating unit for:
Determining a corresponding target page attribute according to the original page attribute of the source page and a preset third corresponding relation;
creating the target page in the target editor according to the target page attribute;
wherein the original page attributes include at least one of page name, page size, and page context.
As an alternative embodiment, the apparatus further comprises:
the switching mode conversion module is used for determining a target switching mode of the target page according to the original switching mode of the source page and a preset fourth corresponding relation; the target switching mode is a switching mode suitable for the target editor;
and configuring the target switching mode to a target page corresponding to the source page.
As an alternative embodiment, the apparatus further comprises:
a resource importing unit, configured to read resource data in the multimedia file, and determine source reference position information of the resource data in the multimedia file;
generating corresponding target reference position information based on the source reference position information, and storing the resource data in the target editor based on the target reference position information for calling by a target component referencing the resource data.
The apparatus of the embodiments of the present application may perform the method provided by the embodiments of the present application, and implementation principles of the method are similar, and actions performed by each module in the apparatus of each embodiment of the present application correspond to steps in the method of each embodiment of the present application, and detailed functional descriptions of each module of the apparatus may be referred to in the corresponding method shown in the foregoing, which is not repeated herein.
An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement steps of the data processing method, and compared with the related art, the steps of the data processing method may be implemented: the method realizes the effective compatibility of the multimedia file and the target editor, can restore the multimedia file in the target editor without remanufacturing, saves a great deal of labor cost and time cost, fully utilizes the prior multimedia file resources and improves the reusability of the resources.
In an alternative embodiment, there is provided an electronic device, as shown in fig. 5, the electronic device 4000 shown in fig. 5 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004, the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 5, but not only one bus or one type of bus.
Memory 4003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically Erasable Programmable Read Only Memory ), CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer.
The memory 4003 is used for storing a computer program that executes an embodiment of the present application, and is controlled to be executed by the processor 4001. The processor 4001 is configured to execute a computer program stored in the memory 4003 to realize the steps shown in the foregoing method embodiment.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, may implement the steps and corresponding content of the foregoing method embodiments.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the present application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although the flowcharts of the embodiments of the present application indicate the respective operation steps by arrows, the order of implementation of these steps is not limited to the order indicated by the arrows. In some implementations of embodiments of the present application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages may be flexibly configured according to the requirement, which is not limited in the embodiment of the present application.
The foregoing is merely an optional implementation manner of the implementation scenario of the application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the application are adopted without departing from the technical ideas of the application, and also belong to the protection scope of the embodiments of the application.

Claims (13)

1. A data processing method applied to a target editor, comprising:
acquiring a multimedia file to be converted;
analyzing the multimedia file to obtain at least one source page and source elements corresponding to each source page;
converting the original element information of the source element into target element information applicable to the target editor;
for each source page, creating a target page corresponding to the source page in the target editor, and acquiring a target component corresponding to the source element;
and configuring the target component based on the target element information of the source element, loading the target component into the target page, and generating target multimedia data.
2. The data processing method of claim 1, wherein the original element information includes at least one of original element attribute information including at least one of an element type, an element position, an element size, and an element color, and an original animation effect.
3. The method according to claim 2, wherein the obtaining the target component corresponding to the source element includes:
determining a component type corresponding to the element type according to the element type of the source element and a preset first corresponding relation;
and according to the component type, inquiring to obtain a target component corresponding to the source element from a component library of the target editor.
4. A data processing method according to claim 3, wherein the determining, according to the element type of the source element and a preset first correspondence, a component type corresponding to the element type includes:
determining an actual element type of the source element through the attribute description of the source element, mapping the actual element type of the source element to an element type supported by the target editor, and determining a component type corresponding to the element type.
5. The data processing method according to claim 2, characterized by further comprising:
determining a corresponding target animation effect according to the original animation effect of the source element and a preset second corresponding relation; the target animation effect is an animation effect applicable to the target editor;
And configuring the target animation effect to a target component corresponding to the source element.
6. The data processing method of claim 5, wherein the original animation effect is a combination of a first original animation effect and a second original animation effect; the target animation effect is a combination of a first target animation effect and a preset target animation effect, or a combination of the first target animation effect and a second target animation effect.
7. The data processing method according to claim 2, wherein when the original element information is an element size, the converting the original element information of the source element into target element information suitable for the target editor includes:
and converting the original element size of the source element into a target element size suitable for the target editor according to a preset size conversion method, wherein the size conversion method comprises at least one of angle conversion, width conversion and font size conversion.
8. The data processing method according to claim 1, wherein creating a target page corresponding to the source page in the target editor includes:
Determining a corresponding target page attribute according to the original page attribute of the source page and a preset third corresponding relation;
creating the target page in the target editor according to the target page attribute;
wherein the original page attributes include at least one of page name, page size, and page context.
9. The data processing method according to claim 1, characterized by further comprising:
determining a target switching mode of the target page according to the original switching mode of the source page and a preset fourth corresponding relation; the target switching mode is a switching mode suitable for the target editor;
and configuring the target switching mode to a target page corresponding to the source page.
10. The data processing method according to claim 1, characterized by further comprising:
reading resource data in the multimedia file, and determining source reference position information of the resource data in the multimedia file;
generating corresponding target reference position information based on the source reference position information, and storing the resource data in the target editor based on the target reference position information for calling by a target component referencing the resource data.
11. A data processing apparatus, comprising:
the acquisition module is used for acquiring the multimedia file to be converted;
the analysis module is used for analyzing the multimedia file to obtain at least one source page and source elements corresponding to each source page;
the conversion module is used for converting the original element information of the source element into target element information suitable for the target editor;
the target component determining module is used for creating a target page corresponding to the source page in the target editor and acquiring a target component corresponding to the source element for each source page;
and the target multimedia data generation module is used for configuring the target component based on the target element information of the source element, loading the target component into the target page and generating target multimedia data.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to implement the steps of the method of any one of claims 1 to 10.
13. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 10.
CN202211194193.XA 2022-09-28 2022-09-28 Data processing method, device, electronic equipment and storage medium Pending CN117827179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211194193.XA CN117827179A (en) 2022-09-28 2022-09-28 Data processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211194193.XA CN117827179A (en) 2022-09-28 2022-09-28 Data processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117827179A true CN117827179A (en) 2024-04-05

Family

ID=90519684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211194193.XA Pending CN117827179A (en) 2022-09-28 2022-09-28 Data processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117827179A (en)

Similar Documents

Publication Publication Date Title
CN106611435B (en) Animation processing method and device
CN111899155B (en) Video processing method, device, computer equipment and storage medium
CN111899322B (en) Video processing method, animation rendering SDK, equipment and computer storage medium
US20150039996A1 (en) System and method for dynamically converting webpage, and computer-readable recording medium
US8669998B1 (en) Selection of colors
CN106156306A (en) A kind of template rendering intent and device
CN110782387B (en) Image processing method and device, image processor and electronic equipment
CN110853121B (en) Cross-platform data processing method and device based on AE
CN113938750A (en) Video processing method and device, electronic equipment and storage medium
CN110784739A (en) Video synthesis method and device based on AE
CN110363837A (en) The processing method and processing device of texture image, electronic equipment, storage medium in game
CN111068314B (en) NGUI resource rendering processing method and device based on Unity
CN110769241B (en) Video frame processing method and device, user side and storage medium
CN112070866B (en) Animation data encoding and decoding method and device, storage medium and computer equipment
CN111242836B (en) Target image generation method, device and equipment for generating advertisement image
CN117827179A (en) Data processing method, device, electronic equipment and storage medium
CN111242688A (en) Animation resource manufacturing method and device, mobile terminal and storage medium
CN115904372A (en) Data processing method and device
CN114307143A (en) Image processing method and device, storage medium and computer equipment
CN110975284A (en) Unity-based NGUI resource rendering processing method and device
CN112348928A (en) Animation synthesis method, animation synthesis device, electronic device, and medium
US8842130B1 (en) Automated color authoring
WO2024051394A1 (en) Video processing method and apparatus, electronic device, computer-readable storage medium, and computer program product
CN115640044B (en) Unity-based three-dimensional software development method, device, equipment and medium
CN109003225A (en) A kind of more palace trrellis diagram piece treating method and apparatus and a kind of electronic equipment

Legal Events

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