A data processing method and device, electronic equipment, storage medium and product
Patent Information
- Application Number
- CN202510192211.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2026-08-21
AI Technical Summary
[0004]本公开提供一种数据处理方法、装置、电子设备、存储介质及产品,以解决在引擎的预热阶段,由于环境限制,某些格式的引擎文件无法被执行的问题
[0018]第五方面,本公开实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据本公开实施例提供的数据处理方法。
Smart Images

Figure CN122614433A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to data processing technology, and more particularly to a data processing method, apparatus, electronic device, storage medium, and product. Background Technology
[0002] In the software field, an engine is a core component for developing programs or systems on a platform. It provides a powerful set of tools and interfaces for building and managing specific software applications.
[0003] Currently, there are multiple versions of the engine with different execution formats. During the engine warm-up phase, due to environmental limitations, some engine file formats cannot be executed. Summary of the Invention
[0004] This disclosure provides a data processing method, apparatus, electronic device, storage medium, and product to solve the problem that certain engine file formats cannot be executed during the engine warm-up phase due to environmental limitations.
[0005] In a first aspect, embodiments of this disclosure provide a data processing method, including:
[0006] During the engine warm-up phase, the engine is instantiated using strings in the engine file to obtain an engine instance. The engine file includes a front-end interface file in a first format, and the front-end interface file includes strings encoded from the engine logic file in a second format.
[0007] During the stage of loading multimedia data on the front end, obtain the engine instance;
[0008] The multimedia data is run based on the engine instance.
[0009] Secondly, embodiments of this disclosure also provide a data processing apparatus, including:
[0010] An instantiation module is used to instantiate the engine through a string in the engine file during the engine warm-up phase, thereby obtaining an engine instance. The engine file includes a front-end interface file in a first format and a string encoded from an engine logic file in a second format.
[0011] The acquisition module is used to acquire the engine instance during the stage of loading multimedia data on the front end;
[0012] The runtime module is used to run the multimedia data based on the engine instance.
[0013] Thirdly, embodiments of this disclosure also provide an electronic device, characterized in that the electronic device comprises:
[0014] One or more processing devices;
[0015] Storage device for storing one or more programs.
[0016] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method provided in the embodiments of this disclosure.
[0017] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the data processing method provided in embodiments of this disclosure.
[0018] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the data processing method provided according to embodiments of this disclosure.
[0019] In this embodiment, during the engine warm-up phase, the engine is instantiated using strings from the engine file. During the multimedia data loading phase on the front end, the pre-instantiated engine instance is obtained. Multimedia data is then executed based on the engine instance. This solution addresses the problem that certain engine file formats cannot be executed during the engine warm-up phase due to environmental limitations. For second-format engine logic files that cannot be executed during the warm-up phase, the encoded string of the engine logic file is included in the front-end interface file. During the warm-up phase, the engine is directly instantiated based on the strings in the front-end interface file, enabling the execution of the second-format engine logic file. This allows for the direct execution of multimedia data based on the pre-warmed engine instance during the multimedia data loading phase. Attached Figure Description
[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote 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.
[0021] Figure 1 This is a schematic flowchart of a data processing method provided in an embodiment of this disclosure;
[0022] Figure 2 This is a flowchart illustrating yet another data processing method provided in an embodiment of this disclosure;
[0023] Figure 3 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this disclosure;
[0024] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0025] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0026] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0027] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based 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". Definitions of other terms will be given in the description below.
[0028] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0029] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0030] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0031] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this disclosure. This embodiment is applicable to the case of preheating an engine. The method can be executed by a data processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.
[0032] like Figure 1 As shown, the method includes:
[0033] S110. During the engine warm-up phase, the engine is instantiated using a string in the engine file to obtain an engine instance.
[0034] An engine can be considered a software framework for creating and running multimedia applications. An engine can integrate tools and technologies for processing and managing various media types, such as graphics, audio, video, and animation. An engine can provide a range of functions and interfaces that enable developers to create, present, and interact with complex multimedia applications. This disclosure uses a game engine as an example, but does not limit the definition of an engine. A game engine can be considered an integrated system for developing games, providing various tools and functions needed to create games. In a game scene, the creation and operation of the game scene depend on the loading and initialization of the game engine.
[0035] The warm-up phase can be considered as a stage where the engine is warmed up before multimedia data is loaded. For example, the engine is warmed up before loading game resources. The warm-up phase can involve pre-loading engine resources or instantiating the engine.
[0036] In a game scenario, the engine can refer to the game engine. Engine preheating is an optimization technique used in interactive game scenarios to improve the loading speed of the interactive game scenario by preloading game engine resources and instantiating the engine instance in advance.
[0037] Engine preheating is a technology that provides capabilities related to game engine optimization. Its principle is to preheat the game engine during game startup so that the game engine package loads faster during game logic execution, thereby improving game loading speed. By preparing the game engine in advance, players can enter the game world more quickly at startup, reducing waiting time. Engine files can be considered engine-related files, such as files the engine depends on during runtime. Engine files may include engine resources, etc.
[0038] The engine file includes a front-end interface file in a first format, which contains a string encoded from the engine logic file in a second format. In cross-platform communication, the front-end can be the user interface portion of the application. The front-end is responsible for providing the interface and displaying the results of the interaction to the user.
[0039] The first format can be considered the format supported during the warm-up phase, while the second format can be considered the format not supported during the warm-up phase. The front-end interface file can be considered the interface file provided to the front-end, and it may contain the definition of the interfaces provided by the engine to the front-end. The engine logic file can be considered the file containing the engine's logic, and it may contain the core logic of the engine.
[0040] The strings contained in the front-end interface file can be strings obtained by encoding the engine logic file in the second format. In this embodiment, the front-end interface file contains the content of the engine logic file in the form of strings. Therefore, engine warm-up can be achieved based on the front-end interface file.
[0041] Using the game engine as an example, when the front-end interface file does not contain encoded strings, the front-end calls the front-end interface file without encoded strings when invoking the engine. This front-end interface file without encoded strings depends on the engine logic file in a second format. The front-end interface file without encoded strings can be considered a bridge between the front-end code and the engine logic file, providing a set of application programming interfaces that allow the front-end code to call the engine logic file and instantiate the engine, etc.
[0042] In a preheating environment, such as a JS environment, the cross-platform container has not yet completed its environment initialization and cannot fulfill dependency requests for engine logic files, nor can it call those files, thus preventing the preheating of a particular version of the game engine. A cross-platform container refers to a software container that runs on different operating systems. It operates on different platforms to achieve cross-platform functionality. It is responsible for transferring data between the front-end and client, providing front-end capabilities for front-end business logic.
[0043] In this embodiment, the engine logic file is encoded into a string, and then the string is packaged into the front-end interface file, so that the front-end interface file contains the engine logic in string form. Therefore, during the warm-up phase, this operation can instantiate the engine using the string in the front-end interface file to obtain an engine instance. An engine instance can be considered a specific instance of the engine running. The instance can contain the engine's state and allow operations to be performed on the instance. Instantiation can be considered the process of creating a specific running instance of the engine.
[0044] Taking a game engine as an example, an engine instance can be an entity created in memory by the game engine at runtime, and it is the runtime carrier of the game.
[0045] In one embodiment, the engine logic file of the second format includes files that cannot be executed during the warm-up phase, and the engine logic file includes the engine logic of the engine.
[0046] Files that cannot be executed during the warm-up phase may be associated with the version of the engine logic file. This is because the warm-up JS environment has not yet completed environment initialization, and therefore cannot provide the ability to execute dependency functions. Dependency functions can be functions called when depending on external files, such as functions called when a front-end interface file (without encoded strings) depends on the engine logic file. Since the warm-up JS environment cannot provide dependency functions, it cannot establish a dependency on the engine logic file, and consequently, the engine logic file cannot be executed. Engine logic can be considered the core code and rules in a game engine used to manage and control game execution.
[0047] In one embodiment, the engine warm-up phase includes: after the front-end thread is initialized.
[0048] A front-end thread can be considered the execution environment for front-end code, such as a JavaScript thread. Front-end threads can handle various dynamic functions and interactive logic within an application.
[0049] Front-end thread initialization refers to a series of processes that prepare the necessary environment and resources for the execution of front-end code when the page is loaded, so that it can start running normally.
[0050] This embodiment defines the engine warm-up phase as the period between the initialization of the front-end thread and the execution of business logic. During this warm-up phase, the engine is preheated, and the preheated engine instance is loaded into the global object.
[0051] Engine warm-up can rely on the front-end thread. In this embodiment, engine warm-up can be performed after the front-end thread is initialized.
[0052] S120. During the stage of loading multimedia data at the front end, obtain the engine instance.
[0053] S130. Run the multimedia data based on the engine instance.
[0054] When multimedia data is used as game resources, the stage of loading multimedia data on the front end can be considered the stage of loading game resources on the front end. The front end loads game resources to execute game interaction logic.
[0055] During the execution of the game's logic, the game engine is relied upon. This operation directly obtains the engine instance that was instantiated during the preheating phase, and runs multimedia data based on the engine instance.
[0056] In one embodiment, after obtaining the engine instance, it can be mounted to the global object of the currently loaded page. During the stage of loading multimedia data on the front end, the engine instance can be obtained from the global object by calling the engine's preparation function to complete the engine initialization and enable the running of multimedia data. The engine preparation function can be a function called before the engine completes initialization and is ready to accept input and start the game. The engine instance is obtained from the global object through the engine preparation function.
[0057] The technical solution of this disclosure instantiates the engine using strings in the engine file during the engine warm-up phase. During the multimedia data loading phase on the front end, the pre-instantiated engine instance is obtained. Multimedia data is then executed based on the engine instance. This solution solves the problem that certain engine file formats cannot be executed during the engine warm-up phase due to environmental limitations. For second-format engine logic files that cannot be executed during the engine warm-up phase, the encoded string of the engine logic file is included in the front-end interface file. During the warm-up phase, the engine is directly instantiated based on the strings in the front-end interface file, enabling the execution of the second-format engine logic file. This allows for the direct execution of multimedia data based on the pre-warmed engine instance during the multimedia data loading phase.
[0058] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0059] In one embodiment, the instantiation of the engine using a string in the engine file during the engine warm-up phase to obtain an engine instance includes:
[0060] During the engine warm-up phase, page links are obtained, where the page links are links to the pages to which the multimedia data belongs;
[0061] Determine whether the page link contains preheating configuration information;
[0062] If so, determine whether the engine supports preheating based on the preheating configuration information;
[0063] If so, instantiate the engine using the string in the engine file to obtain an engine instance.
[0064] The page containing multimedia data can be considered the page that carries and displays the multimedia data. Page links can be a structured description of the page, defining its organizational structure, content layout, and interaction logic. Page links can uniquely identify a page. Page links can contain page configurations, such as preheating configuration information.
[0065] Warm-up configuration information can be considered as information about whether a page is configured to use a warm-up engine. Warm-up configuration information can indicate whether the page linked to by the page uses a warm-up engine.
[0066] When a page needs to enable or disable preheating capabilities, preheating configuration information can be included in the page link to indicate whether the engine's preheating capability is enabled.
[0067] If the page link does not contain preheating configuration information, the engine preheating capability can be enabled by default, meaning that the engine instance can be obtained during the preheating phase.
[0068] When a page link contains preheating configuration information, that information can be further analyzed.
[0069] Page links can contain the engine identification information required by the page to which the link is located. This identification information can uniquely identify the corresponding engine.
[0070] When parsing the preheating configuration information, it can be determined whether the engine represented by the identifier information included in the page link supports preheating. The methods for determining whether preheating is supported are not limited here. They can be limited based on the specific content of the preheating configuration information. If the preheating configuration information includes engine identifiers indicating whether preheating is required or not, the engine identifiers included in the preheating configuration information can be directly compared with the engine identifier information in the page link. If the preheating configuration information only includes list identifiers, the list corresponding to the list identifiers can be obtained, and the engine identifiers included in the list (used to identify engines that require or do not require preheating) can be compared with the engine identifier information.
[0071] If it is determined that the engine needs to be warmed up based on the warm-up configuration information, then the engine is instantiated during the warm-up phase.
[0072] In one embodiment, the page link includes the engine's identification information, and determining whether the engine supports preheating based on the preheating configuration information includes:
[0073] Determine whether the identification information is contained in the engine corresponding to the preheating configuration information to obtain the matching result;
[0074] Based on the matching results, it is determined whether the engine supports preheating.
[0075] The identification information included in the page link represents the engine associated with the page corresponding to the link. In determining whether the engine identified by the identification information supports preheating, this embodiment can determine the engine identifier corresponding to the preheating configuration information. The preheating configuration information can be a list identifier, which uniquely identifies the corresponding table. The table can include engine identifiers for multiple engines, i.e., the engine identifier corresponding to the preheating configuration information, which may be the identifier corresponding to an engine that does not support preheating.
[0076] This embodiment can determine whether the engine identifier corresponding to the preheating configuration information contains the engine identified by the identifier information, in order to obtain a matching result. The matching result can indicate whether the engine identifier information in the page link is included in the engine identifier configured in the preheating configuration information.
[0077] After determining the matching result, this embodiment can determine whether the engine supports preheating based on the matching result.
[0078] The methods for determining whether preheating is supported based on the matching results vary depending on the content configured in the preheating configuration information. For example, if the preheating configuration information is configured with an engine identifier that does not support preheating, and the matching results indicate that a matching engine identifier exists in the preheating configuration information, then it is determined that the engine indicated by the page link does not support preheating.
[0079] In this embodiment, engine preheating is flexibly enabled by adding preheating configuration information to the page link.
[0080] Figure 2 This is a flowchart illustrating another data processing method provided in this disclosure embodiment. This embodiment details the operation of obtaining the engine instance; see [link to relevant documentation]. Figure 2 This embodiment includes the following operations:
[0081] S210. During the engine warm-up phase, the string is converted into bytecode through the warm-up entry function in the engine file.
[0082] The warm-up entry function can be considered the entry function for executing engine warm-up. During the engine warm-up phase, the warm-up entry function can be executed to trigger engine warm-up.
[0083] The preheating entry function converts the string into bytecode to complete the engine instantiation. In this embodiment, there is no need to use dependency functions; the string in the preheating entry function is directly restored to the bytecode of the engine logic file. This facilitates engine instantiation based on bytecode.
[0084] S220. Instantiate the engine based on the bytecode to obtain an engine instance.
[0085] This operation, based on bytecode, creates a runtime object instance in memory, possessing all the functions of the engine—the engine instance. The engine instance will serve as the entity for subsequent operations on multimedia data and for driving multimedia-related business logic.
[0086] This operation uses an application programming interface (API) to compile bytecode into an executable module, retrieves the game engine's constructor from the compiled model, and then creates an instance of the game engine based on the parameters passed to the constructor.
[0087] S230. During the stage of loading multimedia data at the front end, obtain the engine instance.
[0088] S240. Run the multimedia data based on the engine instance.
[0089] In this embodiment, the string is converted into bytecode through a preheating entry function in the engine file, and the engine is instantiated using bytecode. Instantiating the engine using bytecode improves the instantiation speed, thereby increasing the loading speed of pages carrying multimedia data.
[0090] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0091] In one embodiment, converting the string into bytecode via the warm-up entry function in the engine file includes:
[0092] The interface is instantiated by calling the warm-up entry function in the engine file;
[0093] The string is converted into bytecode through the instantiation interface.
[0094] The instantiation interface can be considered the interface that implements engine instantiation. The instantiation interface can obtain strings and convert them into bytecode.
[0095] In this embodiment, when converting a string to bytecode through a preheating entry function, the preheating entry function can call the instantiation interface in the front-end interface file to convert the string to bytecode through the instantiation interface.
[0096] In this embodiment, the instantiation interface has decoding capabilities, that is, decoding the string into bytecode to complete the instantiation.
[0097] In one example, the game engine includes a certain version, which includes a JS file serving as the front-end interface (e.g., a front-end interface file without encoded strings) and a second-format engine logic file. The cross-platform container does not support preloading a certain version of the engine file. In the warm-up environment, the cross-platform container has not yet completed environment initialization and cannot fulfill the dependency request for the engine logic file. Therefore, this disclosure packages the bytecode related to the second-format engine logic file into the front-end interface file using base64 encoding. The front-end interface file implements an interface for instantiating a certain version of the engine. If the instantiation interface supports receiving base64 strings, the game engine is instantiated through the string during the warm-up phase, i.e., instantiation is completed by decoding the string.
[0098] The specific operations for instantiating the game engine via a string during the warm-up phase can include: warming up the front-end interface file, executing the warm-up entry function of the front-end interface file (i.e., the warm-up logic added to the front-end interface file to instantiate the engine), calling the instantiation interface through the warm-up entry function to complete the instantiation of the engine, and then mounting the engine instance to the global object.
[0099] During front-end runtime, the engine instance is obtained from the global object by calling a function to complete engine initialization.
[0100] Figure 3 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this disclosure, as shown below. Figure 3 As shown, the device includes:
[0101] The instantiation module 310 is used to instantiate the engine through a string in the engine file during the engine warm-up phase to obtain an engine instance. The engine file includes a front-end interface file in a first format and a string encoded from an engine logic file in a second format.
[0102] The acquisition module 320 is used to acquire the engine instance during the stage of loading multimedia data at the front end;
[0103] The running module 330 is used to run the multimedia data based on the engine instance.
[0104] The technical solution provided in this disclosure involves an instantiation module that instantiates the engine during the engine warm-up phase using strings from the engine file. An acquisition module acquires the pre-instantiated engine instance during the multimedia data loading phase on the front end. The execution module runs the multimedia data based on the engine instance. This solution solves the problem that certain engine file formats cannot be executed during the engine warm-up phase due to environmental limitations. For second-format engine logic files that cannot be executed during the engine warm-up phase, the encoded string of the engine logic file is included in the front-end interface file. During the warm-up phase, the engine is directly instantiated based on the strings in the front-end interface file, enabling the execution of the second-format engine logic file. This facilitates the direct execution of multimedia data based on the pre-warmed engine instance during the multimedia data loading phase.
[0105] In one embodiment, the instantiation module 310 includes:
[0106] The conversion unit is used to convert the string into bytecode through the warm-up entry function in the engine file during the engine warm-up phase.
[0107] An instantiation unit is used to instantiate the engine based on the bytecode to obtain an engine instance.
[0108] In one embodiment, the conversion unit is specifically used for:
[0109] The interface is instantiated by calling the warm-up entry function in the engine file;
[0110] The string is converted into bytecode through the instantiation interface.
[0111] In one embodiment, the instantiation module 310 includes:
[0112] The acquisition unit is used to acquire page links during the engine's warm-up phase, wherein the page links are links to the pages to which the multimedia data belongs;
[0113] The first determining unit is used to determine whether the page link contains preheating configuration information;
[0114] The second determining unit is used to determine, if yes, whether the engine supports preheating based on the preheating configuration information;
[0115] The processing unit is used to instantiate the engine using a string in the engine file if the condition is met, thereby obtaining an engine instance.
[0116] In one embodiment, the page link includes the engine's identification information, and the second determining unit is specifically used for:
[0117] Determine whether the engine identifier corresponding to the preheating configuration information contains the identifier information, and obtain the matching result;
[0118] Based on the matching results, it is determined whether the engine supports preheating.
[0119] In one embodiment, the engine warm-up phase includes: after the front-end thread is initialized.
[0120] In one embodiment, the engine logic file of the second format includes files that cannot be executed during the warm-up phase, and the engine logic file includes the engine logic of the engine.
[0121] The data processing apparatus provided in this disclosure can execute the data processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.
[0122] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0123] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Refer to the following... Figure 4 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 4 A structural diagram of the terminal device or server in the 500.
[0124] Electronic equipment 500, including:
[0125] One or more processing devices 501;
[0126] Storage device 508, for storing one or more programs,
[0127] When the one or more programs are executed by the one or more processing devices 501, the one or more processing devices 501 implement any of the methods provided in this disclosure.
[0128] The terminal devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0129] like Figure 4 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.
[0130] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0131] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0132] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0133] The electronic device provided in this embodiment and the data processing method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0134] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the data processing method provided in the above embodiments.
[0135] It should be noted that the computer-readable medium described above in this disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof.
[0136] The computer storage medium may be a storage medium for computer-executable instructions, which, when executed by a computer processor, are used to perform the methods provided in this disclosure.
[0137] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0138] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0139] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0140] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:
[0141] During the engine warm-up phase, the engine is instantiated using strings in the engine file to obtain an engine instance. The engine file includes a front-end interface file in a first format, and the front-end interface file includes strings encoded from the engine logic file in a second format.
[0142] During the stage of loading multimedia data on the front end, obtain the engine instance;
[0143] The multimedia data is run based on the engine instance.
[0144] Computer program code for performing the operations of this disclosure can 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, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0146] The modules or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of modules or units do not necessarily limit the specific unit; for example, an instantiation module can also be described as an "engine instance acquisition module".
[0147] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0148] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0149] A computer program product includes a computer program that, when executed by a processor, implements the data processing method provided according to embodiments of this disclosure. It possesses the corresponding functional modules and beneficial effects for implementing the method.
[0150] According to one or more embodiments of this disclosure, [Example 1] provides a data processing method, including:
[0151] During the engine warm-up phase, the engine is instantiated using strings in the engine file to obtain an engine instance. The engine file includes a front-end interface file in a first format, and the front-end interface file includes strings encoded from the engine logic file in a second format.
[0152] During the stage of loading multimedia data on the front end, obtain the engine instance;
[0153] The multimedia data is run based on the engine instance.
[0154] According to one or more embodiments of this disclosure, [Example 2] provides the method described in Example 1, wherein during the engine warm-up phase, the engine is instantiated using a string in the engine file to obtain an engine instance, including:
[0155] During the engine warm-up phase, the string is converted into bytecode through the warm-up entry function in the engine file;
[0156] The engine is instantiated based on the bytecode to obtain an engine instance.
[0157] According to one or more embodiments of this disclosure, [Example 3] provides the method described in Example 2, wherein converting the string into bytecode through a preheating entry function in the engine file includes:
[0158] The interface is instantiated by calling the warm-up entry function in the engine file;
[0159] The string is converted into bytecode through the instantiation interface.
[0160] According to one or more embodiments of this disclosure, [Example 4] provides the method described in Example 1, wherein during the engine warm-up phase, the engine is instantiated using a string in the engine file to obtain an engine instance, including:
[0161] During the engine warm-up phase, page links are obtained, where the page links are links to the pages to which the multimedia data belongs;
[0162] Determine whether the page link contains preheating configuration information;
[0163] If so, determine whether the engine supports preheating based on the preheating configuration information;
[0164] If so, instantiate the engine using the string in the engine file to obtain an engine instance.
[0165] According to one or more embodiments of this disclosure, [Example 5] provides the method described in Example 4, wherein the page link includes the engine's identification information, and the step of determining whether the engine supports preheating based on the preheating configuration information includes:
[0166] Determine whether the engine identifier corresponding to the preheating configuration information contains the identifier information, and obtain the matching result;
[0167] Based on the matching results, it is determined whether the engine supports preheating.
[0168] According to one or more embodiments of this disclosure, [Example 6] provides the method of Example 1, wherein the warm-up phase of the engine includes: after the front-end thread is initialized.
[0169] According to one or more embodiments of this disclosure, [Example 7] provides the method of Example 1, wherein the engine logic file of the second format includes files that cannot be executed during the warm-up phase, and the engine logic file includes the engine logic of the engine.
[0170] According to one or more embodiments of this disclosure, [Example 8] provides a data processing apparatus, including:
[0171] An instantiation module is used to instantiate the engine through a string in the engine file during the engine warm-up phase, thereby obtaining an engine instance. The engine file includes a front-end interface file in a first format and a string encoded from an engine logic file in a second format.
[0172] The acquisition module is used to acquire the engine instance during the stage of loading multimedia data on the front end;
[0173] The runtime module is used to run the multimedia data based on the engine instance.
[0174] According to one or more embodiments of this disclosure, [Example 9] an electronic device is provided, the electronic device comprising:
[0175] One or more processing devices;
[0176] Storage device for storing one or more programs.
[0177] When the one or more programs are executed by the one or more processing devices, the one or more processing devices perform the method as described in any of Examples 1-7.
[0178] According to one or more embodiments of this disclosure, [Example 10] provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform the method described in any of Examples 1-7.
[0179] According to one or more embodiments of this disclosure, [Example 11] provides a computer program product including a computer program that, when executed by a processor, implements the method described in any one of Examples 1-7.
[0180] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0181] Furthermore, although the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0182] Although the subject matter has been described using language specific to structural features and / or methodological logic, 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. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A data processing method, characterized in that, include: During the engine warm-up phase, the engine is instantiated using strings in the engine file to obtain an engine instance. The engine file includes a front-end interface file in a first format, and the front-end interface file includes strings encoded from the engine logic file in a second format. During the stage of loading multimedia data on the front end, obtain the engine instance; The multimedia data is run based on the engine instance.
2. The method according to claim 1, characterized in that, During the engine warm-up phase, the engine is instantiated using strings in the engine file to obtain an engine instance, including: During the engine warm-up phase, the string is converted into bytecode through the warm-up entry function in the engine file; The engine is instantiated based on the bytecode to obtain an engine instance.
3. The method according to claim 2, characterized in that, The process of converting the string into bytecode through the preheating entry function in the engine file includes: The interface is instantiated by calling the warm-up entry function in the engine file; The string is converted into bytecode through the instantiation interface.
4. The method according to claim 1, characterized in that, During the engine warm-up phase, the engine is instantiated using strings in the engine file to obtain an engine instance, including: During the engine warm-up phase, page links are obtained, where the page links are links to the pages to which the multimedia data belongs; Determine whether the page link contains preheating configuration information; If so, determine whether the engine supports preheating based on the preheating configuration information; If so, instantiate the engine using the string in the engine file to obtain an engine instance.
5. The method according to claim 4, characterized in that, The page link includes the engine's identification information, and determining whether the engine supports preheating based on the preheating configuration information includes: Determine whether the engine identifier corresponding to the preheating configuration information contains the identifier information, and obtain the matching result; Based on the matching results, it is determined whether the engine supports preheating.
6. The method according to claim 1, characterized in that, The engine's warm-up phase includes: after the front-end thread is initialized.
7. The method according to claim 1, characterized in that, The second format engine logic file includes files that cannot be executed during the warm-up phase, and the engine logic file includes the engine logic of the engine.
8. A data processing apparatus, characterized in that, include: An instantiation module is used to instantiate the engine through a string in the engine file during the engine warm-up phase, thereby obtaining an engine instance. The engine file includes a front-end interface file in a first format and a string encoded from an engine logic file in a second format. The acquisition module is used to acquire the engine instance during the stage of loading multimedia data on the front end; The runtime module is used to run the multimedia data based on the engine instance.
9. An electronic device, characterized in that, The electronic device includes: One or more processing devices; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processing devices, the one or more processing devices perform the method as described in any one of claims 1-7.
10. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the method as described in any one of claims 1-7.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.
