Data processing method and device, equipment and storage medium

By adding the special effects source file within the scope of the external function and disabling the API, the security issues after the special effects script was made public were resolved, and the security of special effects creation and application was improved.

CN121706078APending Publication Date: 2026-03-20BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411311904.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, once special effects scripts are made public, there are security risks, resulting in insufficient security for the creation and application of special effects.

Method used

By obtaining the source file used to generate the special effects, the source file is added to the scope of the outer function, enabling it to call the local variables of the outer function, and disabling the application programming interface (API) settings in the local variables of the outer function, thus forming the target data.

Benefits of technology

It improves the security of special effects creation and application, reduces the security risks caused by open scripts, and ensures the security of the function runtime environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121706078A_ABST
    Figure CN121706078A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a data processing method and apparatus, a device and a storage medium. The method comprises the steps of obtaining a source file for generating a special effect; adding the source file in an action range of an external function, wherein the source file can call a local variable of the external function in a process of quoting the source file in an external environment of the external function; and stopping a set application programming interface API in the local variable of the external function to obtain target data. According to the technical scheme, the security of special effect creation and application after the special effect script is opened is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to data processing technology, and more particularly to a data processing method, apparatus, device, and storage medium. Background Technology

[0002] Making scripts available to users allows them to maximize their personalized creative output. Summary of the Invention

[0003] This disclosure provides a data processing method, apparatus, device, and storage medium to improve the security of special effects creation and application after the special effects script is made public.

[0004] In a first aspect, embodiments of this disclosure provide a data processing method, including:

[0005] Obtain the source files used to generate the special effects;

[0006] Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function.

[0007] The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it.

[0008] Secondly, embodiments of this disclosure provide a data processing method, including:

[0009] Obtain the source file and the data to be verified, wherein the source file is determined by the data processing method described in the first aspect;

[0010] Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function.

[0011] The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it.

[0012] The data to be verified is compared with the target data to obtain the verification result.

[0013] Thirdly, embodiments of this disclosure also provide a data processing apparatus, including:

[0014] The source file acquisition module is used to acquire the source files used to generate special effects;

[0015] The first file adding module is used to add the source file within the scope of the external function. The source file can call the local variables of the external function when it is referenced in the external environment of the external function.

[0016] The first data determination module is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data.

[0017] Fourthly, embodiments of this disclosure also provide a data processing apparatus, including:

[0018] The data acquisition module is used to acquire source files and data to be verified, wherein the source files are determined by the method described in the first aspect;

[0019] The second file adding module is used to add the source file within the scope of the external function. The source file can call the local variables of the external function during the process of being referenced by the external environment of the external function.

[0020] The second data determination module is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data;

[0021] The verification module is used to compare the data to be verified with the target data to obtain the verification result.

[0022] Fifthly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0023] One or more processing devices;

[0024] Storage device for storing one or more programs.

[0025] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method as described in the first or second aspect.

[0026] In a sixth aspect, 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 as described in the first or second aspect.

[0027] This embodiment of the disclosure obtains a source file for generating special effects; adds the source file to the scope of an outer function, whereby the source file can call local variables of the outer function during its reference in the outer environment; and disables the application programming interface (API) settings in the local variables of the outer function to obtain target data. This technical solution, by using the source file as an inner function, allows the inner function to call local variables of the outer function and disables the API settings in the local variables, thereby achieving the purpose of disabling the inner function, ensuring the security of the function's runtime environment, and improving the security of special effects creation and application. Attached Figure Description

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

[0029] Figure 1 This is a schematic flowchart of a data processing method provided in an embodiment of this disclosure;

[0030] Figure 2 This is a flowchart illustrating another data processing method provided in an embodiment of this disclosure;

[0031] Figure 3 This is a schematic flowchart of another data processing method provided in an embodiment of this disclosure;

[0032] Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this disclosure;

[0033] Figure 5 This is a schematic diagram of another data processing device structure provided in an embodiment of this disclosure;

[0034] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

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

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

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

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

[0039] 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".

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

[0041] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0042] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0043] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0044] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0045] It is understood 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 related provisions.

[0046] Special effects creation tools enable users to independently create multimedia and special effects. These tools incorporate numerous capabilities, such as template functions for three-dimensional (3D) point tracking and rendering. Open-source scripts within these tools help users maximize their creative potential, enhancing the personalization and diversity of special effects creation. This disclosure proposes a data processing method to improve the security of open-source scripts and increase creative efficiency.

[0047] Figure 1 This is a schematic diagram of a data processing flow provided by an embodiment of the present disclosure. The embodiments of the present disclosure are applicable to situations where data processing is performed to ensure data security in the case of open special effects scripts. The method can be executed by a client-oriented 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, which is a device capable of developing special effects products.

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

[0049] S110. Obtain the source file used to generate the special effects.

[0050] In this embodiment, the source file can be understood as the source code created by the special effects creation tool, such as the code that the special effects creator edits and uploads based on the open script after the special effects script is released. The source file contains the code used to implement the special effects function, and may also contain the identification code of the creator.

[0051] Specifically, when creating special effects, the creator edits and generates source files to implement the effects. The client-side JavaScript (JS) engine retrieves the source files uploaded by the special effects creator to generate the effects. The JS engine mentioned here is merely an example and does not limit the execution engine disclosed herein.

[0052] S120. Add the source file to the scope of the external function. The source file can call the local variables of the external function when referenced in the external environment of the external function.

[0053] In this embodiment, an external function can be a function that includes a source file, and the source file can be an internal function relative to the external function. The external function can restrict the source file, such as limiting how the source file is used or the modules it can be used in. The scope of an external function can be understood as the accessible area provided by the external function, that is, the editable part of the external function, such as the visibility and accessibility of variables and data created when the external function is defined. The external environment of an external function can be understood as the environment outside the external function when it is defined and called, such as the context and related information created when the external function is executed. Local variables can be understood as variables corresponding to the built-in functional modules of the JS engine. Local variables can be variables provided by the external function that can be called by the source file. By calling various local variables through the source file, the various functional modules of the JS engine can be called. The scope of a local variable is usually limited to the function in which it is defined, that is, the interior of the external function. Local variables called by the source file can be considered as internal functions within the external function, that is, free variables of the source file. The internal function can still access this variable in the external environment of the external function (such as being referenced by other external code). For the internal function, the local variable is a free variable.

[0054] In this embodiment, the source file is added to the scope of the outer function. When the source file is referenced in the external environment of the outer function, it can call the local variables of the outer function. The source file that calls the local variables of the outer function is equivalent to the inner function of the outer function. At this time, the inner function can be a closure. By implementing the method of calling the local variables of the outer function through the closure, the security of the runtime environment and the security of the JS engine when the client is making special effects programs (target data) is guaranteed, thereby ensuring the security of the target data.

[0055] In one embodiment, the credibility of the functional modules included in the first engine's built-in module to which the source file belongs is greater than a set threshold.

[0056] The first engine can be the engine of the client-side source code editor, such as a JavaScript engine. Built-in modules can be the basic functional modules built into the JavaScript engine itself. Functional modules can be modules used to implement specific functions, including at least a first module for logging, a second module for loading source files (scripts), a third module for delaying, a fourth module for associating events with source files, a fifth module for file reading, and a sixth module for accessing the network. Trustworthiness can be the reliability and security score corresponding to each functional module. The threshold setting can be understood as a pre-defined minimum threshold for determining whether a functional module is safe and trustworthy.

[0057] Specifically, the first engine to which the source file belongs has multiple built-in functional modules, and the source file is formed based on each functional module. During the formation of the source file, the credibility of each functional module built into the first engine should be greater than a set threshold to ensure the security of the source file during its formation. In this embodiment, the built-in modules included in the first engine can be trimmed, and the credibility of the trimmed built-in modules of the first engine is greater than the set threshold, thus ensuring the security of each built-in module.

[0058] In one embodiment, the functional modules include: a first module, a log printing module, including a module for implementing log printing functionality; a second module, a script loading module, including a module for implementing source file loading functionality; a third module, a delay time module, including a module for implementing a delay setting duration method; a fourth module, an event module, wherein the events corresponding to the event module are associated with the source file; a fifth module, a file reading module, including a module for reading files functionality; and a sixth module, a network access module, including a module for accessing the network functionality.

[0059] The first module, Console, includes a module that implements the logging function, which provides a method to record messages in the console. Specifically, it can be used to print log messages to the console.

[0060] The second module, Require, includes modules that implement the function of loading source files. It can load source files and also call functions from other modules.

[0061] The third module, setTimeout, includes a module that implements a method for setting a delay duration. This method can be used to delay the execution of a source file or to periodically perform certain operations. The set duration can be a predefined delay length, and the specific value is determined based on actual needs.

[0062] The fourth module, Event, corresponds to events associated with source files and can include functions for processing source files.

[0063] The fifth module, File System (FS), includes modules for reading files and can be used to interact with the file system in a Node.js environment. It provides a set of APIs for reading, writing, and modifying files and directories.

[0064] The sixth module, Net, includes a module for accessing network functions. By accessing the secure private network corresponding to the network module, source files can be created and uploaded, which can effectively improve the security of special effects programs.

[0065] The above functional modules are the necessary built-in modules that are ultimately retained after trimming down the modules in the first engine. They can provide strong support for the application of the first engine, reduce unnecessary resource consumption, and improve resource utilization while ensuring the smooth application of the first engine.

[0066] In one embodiment, the fifth module includes a list of read / write paths, the read / write paths in the list of read / write paths can be accessed, and the second module includes a list of load paths, the load paths in the list of load paths can be accessed.

[0067] The read / write path list can be understood as a list of allowed paths, containing paths that can be read and written. The load path list can be understood as a list of allowed load paths.

[0068] Specifically, the fifth module contains a predefined list of read and write paths. By calling the file read / write module, access to each path in this list can be performed to read and write files through the corresponding paths, thus improving file read / write security. The file read / write module can also restrict file read / write paths when using effects packages. For example, when using target data, restricting file read / write to paths within the read / write path list (such as the path corresponding to the effects package) improves data security.

[0069] The second module contains a predefined list of load paths. Users can access each path in this list to load files via the corresponding path. The load path list can contain only the paths to the source files, enhancing the security of the second module. This module also allows for restrictions on script load paths during development.

[0070] S130. Disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data.

[0071] In this embodiment, the Application Programming Interface (API) can be a predefined type of API interface. In a JavaScript engine, an API is typically a set of functions and services provided by the JavaScript runtime environment that are available to developers. The target data can be understood as the data generated from the source file to achieve the special effects, under the constraints of local variables and nullable API values ​​in the client-side JavaScript engine.

[0072] In one embodiment, when the API is set as a functional module within the first engine, the API can be set to empty.

[0073] In one embodiment, if the API is set to a method provided by the first engine, the API can be set to undefined.

[0074] This step sets the API to empty or undefined, which provides a secure operating environment.

[0075] In one embodiment, the application programming interface (API) is configured to include an API that supports executing commands via strings, an API built into the first engine to access global objects, and legacy APIs, wherein the legacy APIs include APIs retained by previous versions of the first engine to provide a secure engine environment.

[0076] Among them, APIs that support executing commands via strings can be understood as APIs that accept strings as input. The input string can run commands. Executing commands via strings poses security risks. APIs that support executing commands via strings include at least APIs for setting delays (settimeout), canceling delays (cleartimeout), setting time intervals (setinterval), clearing time intervals (clearinterval), function definitions (function), exporting (export), and requiring.

[0077] The SetInterval method is used to repeatedly call a function or execute a piece of data at specified time intervals (in milliseconds).

[0078] ClearInterval can be used to stop a timer set by the setInterval method.

[0079] The `export` keyword is used to export variables, functions, or classes from one module so that other modules can import and use them.

[0080] The `require` keyword can be used to implement imports, such as importing source files.

[0081] The API for accessing the global object built into the first engine to which the source file belongs can be understood as the API of the global scope object globalThis built into the JS engine to which the source file belongs.

[0082] Legacy APIs can be understood as one or more APIs retained from previous versions of the first engine, also known as application programming interfaces left over from the first engine, i.e., Legacy APIs. Access to legacy APIs is achieved through effects.

[0083] Specifically, set the APIs that support executing commands via strings in the local variables of external functions to undefined or custom, set the APIs built into the first engine of the source file to empty, and set legacy APIs, including those retained by previous versions of the first engine, to empty or custom values, so that the corresponding APIs cannot be called, or return elevation information indicating call failure when a call request is received.

[0084] At this point, the source file within the scope of the external function cannot invoke the above three APIs based on callable local variables, thus identifying the external function as the target data. By disabling the API, the security of the API itself is ensured.

[0085] The outer function creates a closed scope to run the source file, ensuring that the source file runs in a safe environment and avoiding unexpected effects on global objects and some important global functions.

[0086] The technical solution of this disclosure involves obtaining a source file for generating special effects; adding the source file to the scope of an external function, whereby the source file can call local variables of the external function during its reference in the external environment; and disabling the application programming interface (API) settings in the local variables of the external function to obtain target data. This technical solution, by using the source file as an internal function, allows the internal function to call local variables of the external function and disables the API settings in these local variables, thereby ensuring the security of the function's runtime environment, reducing the security risks caused by open scripts, and improving the security of special effects creation and application after the special effects script is made public.

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

[0088] In one embodiment, the method further includes:

[0089] In the driver file of the source file, determine whether to execute the source file; if so, disable the source file from calling the API of the second engine that integrates the first engine to prevent arbitrary modification of API attributes and ensure the security of the source file itself and the security during execution.

[0090] Here, the driver file can be understood as the file that drives the source file to run. The second engine can be understood as a higher-level engine than the first engine, such as a game engine that integrates a JS engine. The API of the second engine (i.e., the engine API) can be exposed to the first engine.

[0091] The execution of the source file is implemented by the second engine. Since the second engine integrates the first engine, when the first engine is running, the API of the second engine is disabled through a proxy during the execution of the source file to prevent arbitrary modification of API properties. At the same time, the proxy can also block access to unopened APIs and provide security for open APIs.

[0092] Disable source file calls to the First Engine's built-in APIs, such as APIs that support executing commands via strings and APIs built into the First Engine that the source file belongs to for accessing global objects.

[0093] In this embodiment, proxies are set for all APIs provided by the second engine to the first engine to avoid calling the source files.

[0094] Specifically, the execution function of the source file is executed by the driver within the source file to determine whether to execute the source file. At this time, in order to ensure the security of the source file itself and the security during execution, the API of the second engine that integrates the JS engine is disabled from being called by the source file.

[0095] Figure 2 This is a flowchart illustrating another data processing method provided in an embodiment of this disclosure, such as... Figure 2 As shown, the method includes:

[0096] S210. Obtain the source file used to generate the special effects.

[0097] S220. Add the source file to the scope of the external function. The source file can call the local variables of the external function when referenced in the external environment of the external function.

[0098] S230. Disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data.

[0099] S240. During the process of publishing the target data, the first module in the source file is disabled.

[0100] In this embodiment, the first module Console, also known as the log printing module, has a built-in log printing method for implementing log printing. Disabling the first module means disabling the log printing method.

[0101] Specifically, in addition to ensuring the security of the target data formation process, it is also necessary to ensure the security of the target data upload to the server, i.e., the publishing process. Due to the characteristics of the first module, insecure content can be written into the target data through the first module. Therefore, by identifying the logging methods in the first module using the syntax corresponding to the logging, when such logging methods are identified, the logging methods and the first module to which they belong are disabled. Alternatively, by identifying whether the logging methods are called using the syntax corresponding to the logging, if the logging methods are called, then the logging methods are disabled.

[0102] This embodiment further includes disabling the first module and its corresponding log printing method to ensure the security of the target data after it is published.

[0103] Figure 3This is a flowchart illustrating another data processing method provided in this disclosure. This disclosure is applicable to situations where data processing is performed to ensure data security in the context of open special effects scripts. This method can be executed by a server-side data processing device, which can be implemented in the form of software and / or hardware, or optionally, through an electronic device, such as a mobile terminal, a PC, or a server.

[0104] The target data generated by the client constitutes the completed special effects program. The client uploads the target data (special effects program) to the server so that the server can issue the program upon receiving a request to call it. However, there is a security risk that the target data may be modified during the upload process. Therefore, to ensure the security of the special effects program during application, corresponding security measures also need to be implemented on the server side. This disclosure provides a dual security approach involving both the client and server sides.

[0105] It is understandable that the target data uploaded by the client is, from the server's perspective, data to be verified. For details not covered in this embodiment, please refer to the above embodiments. The method used to process the source file in this embodiment can be the same as the method used by the client to process the source file.

[0106] like Figure 3 As shown, the method includes:

[0107] S310. Obtain the source file and the data to be verified.

[0108] In this embodiment, the data to be verified can be understood as the target data generated and published by the client. When the server receives the target data, the data is the data to be verified relative to the server.

[0109] S320. Add the source file to the scope of the external function. The source file can call the local variables of the external function when referenced in the external environment of the external function.

[0110] In this embodiment, the source file is added to the scope of the outer function. When the source file is referenced in the external environment of the outer function, it can call the local variables of the outer function. The source file that calls the local variables of the outer function is equivalent to the inner function of the outer function. At this time, the inner function is a closure. By using the closure to enable the local variables of the outer function to be called by the original function, the security of the runtime environment and the security of the JS engine when the server is making special effects programs (target data) are ensured, thereby ensuring the security of the target data.

[0111] In one embodiment, the credibility of the functional modules included in the first engine's built-in module to which the source file belongs is greater than a set threshold.

[0112] In one embodiment, the functional modules include: a first module, namely a log printing module, which includes a module for implementing log printing functionality; a second module, namely a script loading module, which includes a module for implementing source file loading functionality; a third module, namely a delay time module, which includes a module for implementing a delay setting duration method; a fourth module, namely an event module, where the events corresponding to the event module are associated with the source file; a fifth module, namely a file reading module, which includes a module for implementing file reading functionality; and a sixth module, namely a network access module, which includes a module for implementing network access functionality.

[0113] In one embodiment, the fifth module includes a list of read / write paths, the read / write paths in the list of read / write paths can be accessed, and the second module includes a list of load paths, the load paths in the list of load paths can be accessed.

[0114] In one embodiment, the driver file of the source file determines whether to execute the source file; if so, the API of the second engine that integrates the first engine is disabled from being called by the source file.

[0115] S330. Disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data.

[0116] In one embodiment, the application programming interface (API) is configured to include an API that supports executing commands via strings, an API built into the first engine to access global objects, and legacy APIs, wherein the legacy APIs include APIs retained by previous versions of the first engine.

[0117] S340. Compare the data to be verified with the target data to obtain the verification result.

[0118] In this embodiment, the verification result can be understood as the result of whether the data to be verified is consistent with the target data.

[0119] Specifically, the data to be verified created and uploaded by the client based on the source file is compared with the target data obtained by the server reprocessing the source file. If the comparison results are consistent, the verification result is determined to be passed, indicating that the data to be verified is secure; if the comparison results are inconsistent, the verification result is determined to be failed, indicating that the data to be verified is insecure.

[0120] The technical solution of this disclosure involves obtaining a source file and data to be verified; adding the source file to the scope of an external function, wherein the source file can call local variables of the external function during the process referenced by the external function's external environment; disabling the setting of the application programming interface (API) in the local variables of the external function to obtain target data; and comparing the data to be verified and the target data to obtain a verification result. This technical solution regenerates the target data on the server side and compares the server-generated target data with the client-generated target data to achieve verification of the special effects program. This server-side security verification of the special effects program improves the security of special effects creation and application after the special effects script is released.

[0121] Figure 4 This is a schematic diagram of a data processing device structure provided in an embodiment of the present disclosure, as shown below. Figure 4 As shown, the device includes:

[0122] Source file acquisition module 41 is used to acquire the source files used to generate special effects;

[0123] The first file adding module 42 is used to add the source file within the scope of the external function, wherein the source file can call the local variables of the external function during the process of being referenced by the external environment of the external function;

[0124] The first data determination module 43 is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data.

[0125] The technical solutions provided in this disclosure improve the security of special effects creation and application after the special effects script is made public.

[0126] In one embodiment, the API is configured to include an API that supports executing commands via strings, an API built into the first engine to which the source file belongs for accessing global objects, and a legacy API, the legacy API including APIs retained from previous versions of the first engine.

[0127] In one embodiment, the apparatus further includes an API deactivation module, specifically used for:

[0128] The driver file of the source file determines whether to execute the source file.

[0129] If so, disable the API of the second engine that integrates the first engine from the source file.

[0130] In one embodiment, the credibility of the functional modules included in the first engine's built-in module to which the source file belongs is greater than a set threshold.

[0131] In one embodiment, the functional module includes:

[0132] The first module includes a module that implements the log printing function;

[0133] The second module includes a module that implements the function of loading the source file;

[0134] The third module includes a module that implements the method for setting the delay duration;

[0135] The fourth module, wherein the events corresponding to the fourth module are associated with the source file;

[0136] The fifth module includes a module for reading files;

[0137] The sixth module includes a module for accessing network functions.

[0138] In one embodiment, the fifth module includes a read / write path list, wherein the read / write paths in the read / write path list can be accessed, and the second module includes a load path list, wherein the load paths in the load path list can be accessed.

[0139] In one embodiment, the apparatus further includes:

[0140] The log printing deactivation module is used to deactivate the first module in the source file during the publication of the target data.

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

[0142] Figure 5 This is a schematic diagram of another data processing apparatus structure provided in an embodiment of the present disclosure, as shown below. Figure 5 As shown, the device includes:

[0143] Data acquisition module 51 is used to acquire source files and data to be verified;

[0144] The second file adding module 52 is used to add the source file within the scope of the external function, wherein the source file can call the local variables of the external function during the process of being referenced by the external environment of the external function;

[0145] The second data determination module 53 is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data;

[0146] The verification module 54 is used to compare the data to be verified with the target data to obtain the verification result.

[0147] The technical solutions provided in this disclosure improve the security of special effects creation and application after the special effects script is made public.

[0148] In one embodiment, the API is configured to include an API that supports executing commands via strings, an API built into the first engine to which the source file belongs for accessing global objects, and a legacy API, the legacy API including APIs retained from previous versions of the first engine.

[0149] In one embodiment, the apparatus further includes an API deactivation module, specifically used for:

[0150] The driver file of the source file determines whether to execute the source file.

[0151] If so, disable the API of the second engine that integrates the first engine from the source file.

[0152] In one embodiment, the credibility of the functional modules included in the first engine's built-in module to which the source file belongs is greater than a set threshold.

[0153] In one embodiment, the functional module includes:

[0154] The first module includes a module that implements the log printing function;

[0155] The second module includes a module that implements the function of loading the source file;

[0156] The third module includes a module that implements the method for setting the delay duration;

[0157] The fourth module, wherein the events corresponding to the fourth module are associated with the source file;

[0158] The fifth module includes a module for reading files;

[0159] The sixth module includes a module for accessing network functions.

[0160] In one embodiment, the fifth module includes a read / write path list, wherein the read / write paths in the read / write path list can be accessed, and the second module includes a load path list, wherein the load paths in the load path list can be accessed.

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

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

[0163] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 6 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 6 A structural diagram of the terminal device or server in the 600.

[0164] Electronic devices include one or more processing devices;

[0165] Storage device for storing one or more programs.

[0166] 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 any embodiment of the present disclosure.

[0167] The electronic 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), vehicle terminals (e.g., vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0168] like Figure 6 As shown, electronic device 600 may include a processing unit (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 read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of electronic device 600. The processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. An edit / output (I / O) interface 605 is also connected to bus 604.

[0169] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 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.

[0170] 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 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, it performs the functions defined in the methods of embodiments of this disclosure.

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

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

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

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

[0175] The computer storage medium may be a storage medium for computer-executable instructions, which, when executed by a computer processor, are used to perform data processing methods as provided in this disclosure.

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

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

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

[0179] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0180] Obtain the source files used to generate the special effects;

[0181] Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function.

[0182] The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it.

[0183] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0184] Obtain the source file and the data to be verified;

[0185] Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function.

[0186] The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it.

[0187] The data to be verified is compared with the target data to obtain the verification result.

[0188] 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).

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

[0190] 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 unit itself; for example, a data acquisition unit can also be described as a "unit that acquires source files and data to be verified".

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

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

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

[0194] Obtain the source files used to generate the special effects;

[0195] Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function.

[0196] The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it.

[0197] According to one or more embodiments of this disclosure, Example 2, based on the method of Example 1, sets the API to include an API that supports executing commands via strings, an API built into the first engine to which the source file belongs for accessing global objects, and a legacy API, the legacy API including APIs retained by historical versions of the first engine.

[0198] According to one or more embodiments of this disclosure, Example 3, based on the method of Example 1, further includes:

[0199] The driver file of the source file determines whether to execute the source file.

[0200] If so, disable the API of the second engine that integrates the first engine from the source file.

[0201] According to one or more embodiments of this disclosure, Example 4, based on the method of Example 1, has a confidence level greater than a set threshold for the functional modules included in the first engine built-in module to which the source file belongs.

[0202] According to one or more embodiments of this disclosure, Example 5, based on the method of Example 4, includes the following functional module:

[0203] The first module includes a module that implements the log printing function;

[0204] The second module includes a module that implements the function of loading the source file;

[0205] The third module includes a module that implements the method for setting the delay duration;

[0206] The fourth module, wherein the events corresponding to the fourth module are associated with the source file;

[0207] The fifth module includes a module for reading files;

[0208] The sixth module includes a module for accessing network functions.

[0209] According to one or more embodiments of this disclosure, Example 6, based on the method of Example 5, includes a fifth module comprising a read / write path list, wherein the read / write paths in the read / write path list are accessible, and the second module comprising a load path list, wherein the load paths in the load path list are accessible.

[0210] According to one or more embodiments of this disclosure, Example 7, based on the method of Example 5, further includes:

[0211] During the publication of the target data, the first module in the source file is disabled.

[0212] According to one or more embodiments of this disclosure, Example 8 provides a data processing method, including:

[0213] Obtain the source file and the data to be verified, wherein the source file is determined by any of the methods described in Examples 1-7;

[0214] Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function.

[0215] The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it.

[0216] The data to be verified is compared with the target data to obtain the verification result.

[0217] According to one or more embodiments of this disclosure, Example 9 provides a data processing apparatus, including:

[0218] The source file acquisition module is used to acquire the source files used to generate special effects;

[0219] The first file adding module is used to add the source file within the scope of the external function. The source file can call the local variables of the external function when it is referenced in the external environment of the external function.

[0220] The first data determination module is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data.

[0221] According to one or more embodiments of this disclosure, Example 10 provides a data processing apparatus, including:

[0222] The data acquisition module is used to acquire source files and data to be verified, wherein the source files are determined by any of the methods described in Examples 1-7;

[0223] The second file adding module is used to add the source file within the scope of the external function. The source file can call the local variables of the external function during the process of being referenced by the external environment of the external function.

[0224] The second data determination module is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data;

[0225] The verification module is used to compare the data to be verified with the target data to obtain the verification result.

[0226] According to one or more embodiments of this disclosure, Example 11 provides an electronic device, including:

[0227] One or more processing devices;

[0228] Storage device for storing one or more programs.

[0229] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method as described in any of Examples 1-8.

[0230] According to one or more embodiments of the present disclosure, Example 12 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the method described in any of Examples 1-8.

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

[0232] Furthermore, while 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, while 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.

[0233] 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: Obtain the source files used to generate the special effects; Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function. The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it.

2. The method according to claim 1, characterized in that, The API settings include APIs that support executing commands via strings, APIs built into the first engine to which the source file belongs for accessing global objects, and legacy APIs, including APIs retained from previous versions of the first engine.

3. The method according to claim 1, characterized in that, Also includes: The driver file of the source file determines whether to execute the source file. If so, disable the API of the second engine that integrates the first engine from the source file.

4. The method according to claim 1, characterized in that, The credibility of the functional modules included in the first engine's built-in module to which the source file belongs is greater than a set threshold.

5. The method according to claim 4, characterized in that, The functional modules include: The first module includes a module that implements the log printing function; The second module includes a module that implements the function of loading the source file; The third module includes a module that implements the method for setting the delay duration; The fourth module, wherein the events corresponding to the fourth module are associated with the source file; The fifth module includes a module for reading files; The sixth module includes a module for accessing network functions.

6. The method according to claim 5, characterized in that, The fifth module includes a read / write path list, in which the read / write paths can be accessed; the second module includes a load path list, in which the load paths can be accessed.

7. The method according to claim 5, characterized in that, Also includes: During the publication of the target data, the first module in the source file is disabled.

8. A data processing method, characterized in that, include: Obtain the source file and the data to be verified, wherein the source file is determined by the method described in any one of claims 1-7; Add the source file within the scope of the outer function. The source file can call the local variables of the outer function when it is referenced in the outer environment of the outer function. The target data is obtained by setting the application programming interface (API) in the local variables of the external function and disabling it. The data to be verified is compared with the target data to obtain the verification result.

9. A data processing apparatus, characterized in that, include: The source file acquisition module is used to acquire the source files used to generate special effects; The first file adding module is used to add the source file within the scope of the external function. The source file can call the local variables of the external function when it is referenced in the external environment of the external function. The first data determination module is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data.

10. A data processing apparatus, characterized in that, include: The data acquisition module is used to acquire source files and data to be verified, wherein the source files are determined by the method described in any one of claims 1-7; The second file adding module is used to add the source file within the scope of the external function. The source file can call the local variables of the external function during the process of being referenced by the external environment of the external function. The second data determination module is used to disable the setting of the application programming interface (API) in the local variables of the external function to obtain the target data; The verification module is used to compare the data to be verified with the target data to obtain the verification result.

11. 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 implement the data processing method as described in any one of claims 1-8.

12. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the data processing method as described in any one of claims 1-8.