Media file display method, device, medium and electronic device
By providing configuration forms and predefined interfaces in the media file display method, users can personalize the display effects and interaction capabilities of nodes in the media file, solving the problems of professional capabilities and complex interface definitions in the prior art developers in the need to have professional capabilities and achieve efficient development and script reuse.
Patent Information
- Application Number
- CN202310183956.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2043-02-17
AI Technical Summary
In the prior art, when realizing the personalized configuration of media file visualization files, developers need to have professional capabilities, and the interface definition and visualization process are complex, resulting in low development efficiency.
Provides a media file display method, which displays the configuration form corresponding to the script by responding to script configuration operations for the target node in the media file, and provides an interface for configuration script parameter values. The interface is defined by predefined functions. When rendering the target node, it obtains the parameter values set on the configuration form, initializes the script and executes it to update the display effect and interaction capabilities.
It reduces the dependence of personalized configuration on professional capabilities, simplifies interface definition and visualization processes, improves development efficiency, and realizes script reuse.
Smart Images

Figure CN116166251B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic information technology, and in particular to a media file display method, device, medium and electronic device. Background Art
[0002] In business scenarios that support users to personalize the display effects of visualization files, scripts need to be developed and embedded to support users' personalized configuration. However, since script development is highly dependent on professional capabilities, it is difficult for users who have no professional capabilities or low professional capabilities to realize personalized configuration of the display effects of visualization files.
[0003] Among them, developers develop scripts and visually define the interface of the script. Users can realize personalized configuration of the display effect or interaction ability of nodes in the visualization file based on the visual interface without accessing the underlying script, thereby reducing the degree of dependence of personalized configuration of the display effect of the visualization file on professional ability. However, the current method of realizing the visualization interface is complicated, resulting in low development efficiency. Summary of the invention
[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a method for displaying a media file, comprising:
[0006] In response to a configuration operation for a script of a target node in a media file, a configuration form corresponding to the script is displayed, wherein the configuration form provides an interface for configuring parameter values of various parameters in the script, the interface is defined by a predefined function, and the definition and use of functions corresponding to different interfaces are standardized;
[0007] When rendering the target node corresponding to the media file, obtaining the parameter value set based on the interface on the configuration form, and initializing the script based on the parameter value to obtain a target script instance;
[0008] The target script instance corresponding to the target node is executed to update the display effect of the target node in the media file and / or enhance the interaction capability.
[0009] In a second aspect, the present disclosure provides a media file display device, comprising:
[0010] A first display module is used to respond to a configuration operation of a script of a target node in a media file and display a configuration form corresponding to the script, wherein the configuration form provides an interface for configuring parameter values of various parameters in the script, the interface is defined by a predefined function, and the definition and use of functions corresponding to different interfaces are standardized;
[0011] An initialization module, used for obtaining parameter values set based on the interface on the configuration form when rendering a target node corresponding to the media file, and initializing the script based on the parameter values to obtain a target script instance;
[0012] The second display module is used to execute the target script instance corresponding to the target node to update the display effect of the target node in the media file and / or enhance the interactive capability.
[0013] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.
[0014] In a fourth aspect, the present disclosure provides an electronic device, including:
[0015] a storage device having a computer program stored thereon;
[0016] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect above.
[0017] Through the above technical scheme, in response to the configuration operation of the script for the target node in the media file, a configuration form corresponding to the script is displayed, wherein the configuration form provides an interface for the parameter values of each parameter in the configuration script, and the interface is defined by a predefined function; when rendering the target node corresponding to the media file, the parameter value set based on the interface on the configuration form is obtained, and the script is initialized based on the parameter value to obtain a target script instance; the target script instance corresponding to the target node is executed to update the display effect and / or enhance the interactive capability of the target node in the media file, thereby achieving the purpose of user personalized configuration of the display effect and / or interactive capability of different nodes in the media file; and because the definition and use of functions corresponding to different interfaces are standardized, for developers, when defining or visualizing the interface, the development difficulty is simplified; in addition, because the logic in the script can be controlled by custom parameters, the parameter setting can be configured through the visual interface, thereby achieving script reuse, thereby improving development efficiency.
[0018] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0020] Figure 1 The figure is a flow chart of a method for displaying a media file according to an exemplary embodiment.
[0021] Figure 2 The figure is a schematic diagram of a media file according to an exemplary embodiment.
[0022] Figure 3 According to an exemplary embodiment Figure 2 Schematic diagram of the configuration form corresponding to node 3.
[0023] Figure 4 is a flowchart of step S11 according to an exemplary embodiment.
[0024] Figure 5 The invention is a block diagram showing a device for displaying media files according to an exemplary embodiment.
[0025] Figure 6 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0033] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0034] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0035] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0036] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0037] As mentioned in the background technology, developers develop scripts to visually define the interface of the script. Based on the visual interface, users can realize personalized configuration of the display effect or interactive ability of the nodes in the visualization file without accessing the underlying script, thereby reducing the degree of dependence of the display effect of the personalized configuration visualization file on professional ability. However, decorators are currently used to define and visualize interfaces, but decorators do not have a unified syntax standard, and the usage rules are relatively complicated. In addition, decorators cannot realize the inference of parameter types, which leads to a more complicated way of defining and visualizing interfaces, affecting the efficiency of interface development.
[0038] In addition, after the interface is defined, the interface definition needs to be parsed before form-based parameter configuration can be performed. Regular expressions or AST (abstract syntax code) are usually used to parse the interface, but regular expressions and AST have low flexibility and large limitations, which are not conducive to interface development.
[0039] In view of this, the present disclosure provides a media file display method, device, medium and electronic device, so as to achieve the purpose of user personalized configuration of display effects and / or interactive capabilities of different nodes in a media file; and because the definition and use of functions corresponding to different interfaces are standardized, for developers, when defining or visualizing interfaces, the development difficulty is simplified, and the logic in the script can be controlled by custom parameters, and the setting of parameters can be configured through a visual interface, thereby realizing the reuse of scripts and improving development efficiency.
[0040] The present disclosure is further explained below in conjunction with the accompanying drawings.
[0041] Figure 1 The flowchart of a method for displaying a media file according to an exemplary embodiment is shown. The method for displaying a media file can be applied to an electronic device, such as a mobile terminal, such as a mobile phone, a tablet, etc., or a fixed terminal, such as a server, a desktop computer, etc. Figure 1 , the method may include the following steps:
[0042] Step S11, in response to the configuration operation of the script for the target node in the media file, a configuration form corresponding to the script is displayed, wherein the configuration form provides an interface for configuring the parameter values of each parameter in the script, the interface is defined by a predefined function, and the definition and use of functions corresponding to different interfaces are standardized. Among them, the media file can be a file with animation effects, for example, a file used for making interactive advertisements. When making an interactive advertisement file, the user triggers the operation of making the interactive advertisement file based on the visual interface of the electronic device, and the operation is, for example, the above-mentioned configuration operation. The media file may include multiple nodes with a hierarchical relationship, and each node may include a picture, a sound or video, a text, or a container, etc., and the container may include at least one picture, a sound or video, or a text, etc. The hierarchical relationship between nodes can be used to characterize the relative position of the nodes on the screen. For example, referring to Figure 2 A schematic diagram of a media file is shown. Figure 2 The media file shown includes at least Node 1, Node 2 and Node 3, wherein Node 1 and Node 2 are both pictures, Node 3 is text, and the hierarchical relationship between Node 3 and Node 2 is used to represent that Node 3 is located above Node 2 or Node 2 is located below Node 3.
[0043] The target node may be any node constituting the media file. For example, the user may select any node in the media file as the target node based on the visual interface of the electronic device, and click a control for the target node provided by the visual interface to trigger a configuration operation of the script of the target node, and the script is used to update the display effect of the target node and / or enhance the interactive capability when executed.
[0044] The parameters of the target node may be the vertical coordinate of the node, the horizontal coordinate of the node, the size of the node, the source of the node, the name of the node, and the like.
[0045] Reference Figure 3 shown Figure 2 Schematic diagram of the configuration form corresponding to node 3, taking the vertical coordinate of the node as an example. Figure 3 The X in the figure indicates the vertical coordinate of the node. The parameter value of X is 157. The value of the vertical coordinate of the node can be configured through the interface corresponding to X.
[0046] The function includes semantic information for describing the interface corresponding to the function. Figure 3 , Figure 3The width, height, rotation angle, etc. are all used to describe the semantic information of the interface corresponding to the function, so that the user can determine how to configure the parameter value, thereby improving the usability of the script. The usability is reflected in the ability to define the appropriate form input component for each parameter, semantic prompt description information, and clear form grouping and layout information. For an explanation of the script, please refer to the following related embodiments.
[0047] Among them, the parameter type includes at least one of boolean type, number type, string type, Array type, enum type and Object type. Being able to define multiple types of parameters can improve the applicability of the script. For the explanation of the script, please refer to the following related embodiments.
[0048] Step S12, when rendering the target node corresponding to the media file, obtain the parameter values set based on the interface on the configuration form, and initialize the script based on the parameter values to obtain the target script instance.
[0049] From the above, it can be seen that when displaying the configuration form corresponding to the script, the user can configure the parameter values of the parameters based on the interface of the parameter values of each parameter in the configuration script provided by the configuration form. After the configuration is completed, the electronic device can save the configured parameter values so that when rendering the target node corresponding to the media file, the electronic device can obtain the corresponding parameter values from the saved data.
[0050] Among them, a script is an executable file written in a certain format using a specific descriptive language. By running the executable file, the display effect and / or interactive ability of the nodes in the media file can be enhanced.
[0051] It is worth noting that the difference in display effect and / or interaction ability of the target node configured by the user is achieved by setting different parameter values of the parameters of the target node. For example, if the parameter value of the vertical coordinate of the target node is different, the position of the node will be different, so the display effect is different; the interaction ability is used to characterize that the electronic device can support the user's interactive operation on the electronic device. The more interactive operations supported, the stronger the interaction ability. Electronic devices can perform different actions based on interactive operations. Interactive operations can be implemented by adding different events, and each event corresponds to an interactive operation, so that the electronic device performs the corresponding action when executing the corresponding event. The event can be, for example, a single-click event and a double-click event, etc. The action can also be playing a video, playing audio, etc.
[0052] Step S13: executing the target script instance corresponding to the target node to update the display effect of the target node in the media file and / or enhance the interactive capability.
[0053] The target node corresponding to the rendered media file may be implemented by a built-in rendering browser of the electronic device. The specific implementation process of the rendering browser may refer to related technologies, which will not be described in detail in this embodiment.
[0054] Through the above method, the purpose of user personalized configuration of the display effects and / or interactive capabilities of different nodes in the media file is achieved; and because the definition and use of functions corresponding to different interfaces are standardized, for developers, the development difficulty is simplified when defining or visualizing the interface, and the logic in the script can be controlled by custom parameters, and the parameter settings can be configured through the visual interface, thereby realizing the reuse of scripts and improving development efficiency.
[0055] Figure 4 is a flowchart of step S11 according to an exemplary embodiment. Figure 4 , step S11 comprises the following steps:
[0056] Step S41, in response to the configuration operation of the script of the target node in the media file, a target compiled file capable of supporting the native JavaScript engine is obtained, wherein the target compiled file is obtained by compiling the script, and the script includes a function corresponding to a defined interface.
[0057] It is worth noting that the developer develops the script and visually defines the interface of the script to generate an executable file of the configuration form. The user implements the reuse of the script through the configuration form.
[0058] Step S42, parsing the target compiled file through the native JavaScript engine to obtain a parsing result.
[0059] Among them, the purpose of the native JavaScript engine parsing the target compiled file is to support the form rendering engine.
[0060] Step S43: Rendering the parsing result through a form rendering engine to display a configuration form corresponding to the script.
[0061] Through the above method, the native JavaScript engine can use the characteristics of the eval function and the Proxy function when dynamically parsing the target compiled file. The overall implementation is simple, and it can support various native expressions to define the grammar to the maximum extent. It has low limitations. In addition, since this parsing method only triggers the constructor method of the class, there is no need to trigger other methods of the class, thereby ensuring higher security.
[0062] In addition, defining various parameters through functions can improve the reusability of scripts.
[0063] In some embodiments, the method may further include: obtaining at least one sub-script based on a preset editor input; packaging and compiling at least one sub-script in real time to obtain a target compiled file that supports a native JavaScript engine; and saving at least one sub-script and the target compiled file.
[0064] Among them, at least one sub-script constitutes a script.
[0065] Among them, the preset editor includes a TypeScript editor, which can realize self-deduction of function types, and developers do not need to define the function type.
[0066] Among them, packaging and compilation can be achieved using webpack, which is a static module packaging and compilation tool for JavaScript applications.
[0067] By saving the compilation results in the above manner, it is possible to promptly respond to the user's need to use the target compilation file for personalized configuration, thereby improving the efficiency of personalized configuration; and by saving the script, it is possible to facilitate the maintenance of the script by the developer.
[0068] Figure 5 is a block diagram of a media file display device according to an exemplary embodiment. Figure 5 , the media file display device 500 comprises:
[0069] A first display module 501 is used to respond to a configuration operation of a script of a target node in a media file and display a configuration form corresponding to the script, wherein the configuration form provides an interface for configuring parameter values of various parameters in the script, the interface is defined by a predefined function, and the definition and use of functions corresponding to different interfaces are standardized;
[0070] Initialization module 502, used for obtaining parameter values set based on the interface on the configuration form when rendering the target node corresponding to the media file, and initializing the script based on the parameter values to obtain a target script instance;
[0071] The second display module 503 is used to execute the target script instance corresponding to the target node to update the display effect of the target node in the media file and / or enhance the interaction capability.
[0072] In some embodiments, the first display module 501 includes:
[0073] An acquisition submodule is used to respond to a configuration operation on a script of a target node in a media file, and acquire a target compiled file that can support a native JavaScript engine, wherein the target compiled file is obtained by compiling the script, and the script includes a function corresponding to a definition of the interface;
[0074] A parsing submodule, used for parsing the target compiled file through the native JavaScript engine to obtain a parsing result;
[0075] The display submodule is used to render the parsing result through a form rendering engine to display a configuration form corresponding to the script.
[0076] In some embodiments, the media file display device 500 further includes:
[0077] An acquisition module, used for acquiring at least one sub-script based on a preset editor input;
[0078] A compilation module, used for packaging and compiling the at least one sub-script in real time to obtain a target compiled file that supports a native JavaScript engine;
[0079] A storage module is used to store the at least one sub-script and the target compiled file.
[0080] In some embodiments, the preset editor includes a TypeScript editor.
[0081] In some embodiments, the function includes semantic information describing an interface corresponding to the function.
[0082] In some embodiments, the type of the parameter includes at least one of a boolean type, a number type, a string type, an Array type, an enum type, and an Object type.
[0083] The embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processing device, the steps of the above-mentioned method are implemented.
[0084] The present disclosure also provides an electronic device, including:
[0085] a storage device having a computer program stored thereon;
[0086] A processing device is used to execute the computer program in the storage device to implement the steps of the above method.
[0087] Reference below Figure 6, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0088] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0089] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0090] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0091] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0092] In some embodiments, the electronic device can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0094] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: responds to a configuration operation of a script for a target node in a media file, and displays a configuration form corresponding to the script, wherein the configuration form provides an interface for configuring parameter values of various parameters in the script, and the interface is defined by a predefined function, and the definition and use of functions corresponding to different interfaces are standardized; when rendering the target node corresponding to the media file, obtains the parameter value set based on the interface on the configuration form, and initializes the script based on the parameter value to obtain a target script instance; and executes the target script corresponding to the target node to update the display effect of the target node in the media file and / or enhance the interactive capability.
[0095] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.
[0098] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0099] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0100] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0101] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0102] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A method for displaying a media file, characterized in that: include: In response to a configuration operation for a script of a target node in a media file, a configuration form corresponding to the script is displayed, wherein the configuration form provides an interface for configuring parameter values of various parameters in the script, the interface is defined by a predefined function, and the definition and use of functions corresponding to different interfaces are standardized; When rendering the target node corresponding to the media file, obtaining the parameter value set based on the interface on the configuration form, and initializing the script based on the parameter value to obtain a target script instance; Executing a target script instance corresponding to the target node to update a display effect of the target node in the media file and / or enhance interactive capability; The method of responding to a configuration operation on a script of a target node in a media file and displaying a configuration form corresponding to the script includes: responding to a configuration operation on a script of a target node in a media file and acquiring a target compiled file capable of supporting a native JavaScript engine, wherein the target compiled file is obtained by compiling the script, and the script includes defining a function corresponding to the interface; parsing the target compiled file by the native JavaScript engine to obtain a parsing result; and rendering the parsing result by a form rendering engine to display a configuration form corresponding to the script.
2. The method according to claim 1, characterized in that: The method further comprises: Obtaining at least one child script based on a preset editor input; Packaging and real-time compiling the at least one sub-script to obtain a target compiled file that supports a native JavaScript engine; The at least one sub-script and the target compiled file are saved.
3. The method according to claim 2, characterized in that The preset editor includes a TypeScript editor.
4. The method according to any one of claims 1 to 3, characterized in that: The function includes semantic information for describing an interface corresponding to the function.
5. The method according to claim 1, characterized in that The type of the parameter includes at least one of a boolean type, a number type, a string type, an Array type, an enum type, and an Object type.
6. A media file display device, characterized in that: include: A first display module is used to respond to a configuration operation of a script of a target node in a media file and display a configuration form corresponding to the script, wherein the configuration form provides an interface for configuring parameter values of various parameters in the script, the interface is defined by a predefined function, and the definition and use of functions corresponding to different interfaces are standardized; An initialization module, used for obtaining parameter values set based on the interface on the configuration form when rendering a target node corresponding to the media file, and initializing the script based on the parameter values to obtain a target script instance; A second display module, used for executing a target script instance corresponding to the target node to update a display effect of the target node in the media file and / or enhance an interactive capability; The first display module comprises: An acquisition submodule is used to respond to a configuration operation on a script of a target node in a media file, and acquire a target compiled file that can support a native JavaScript engine, wherein the target compiled file is obtained by compiling the script, and the script includes a function corresponding to a definition of the interface; A parsing submodule, used for parsing the target compiled file through the native JavaScript engine to obtain a parsing result; The display submodule is used to render the parsing result through a form rendering engine to display a configuration form corresponding to the script.
7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 5 are implemented.
8. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Dynamic collocation method and device for interface and action of set-top box multimedia interface
CN101419550A
Page layout file generation method and device, electronic equipment and readable storage medium
CN114444000A