Script execution method and device and computing equipment
Through dynamic compilation and caching optimization, the client script execution process is simplified, and the problems of script execution complexity and limited application scenarios in the existing technology are solved, and an efficient and streamlined script execution framework is realized, which is suitable for lightweight systems and Improved execution efficiency and accuracy.
Patent Information
- Application Number
- CN202411239182.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-20
AI Technical Summary
The existing client script execution process is complex and has huge structure, and its application scenarios are limited, so it cannot meet the user needs of quickly responding to changes.
By determining the current execution script, obtaining the code block to be executed, and determining whether there is a corresponding bytecode instruction in the cache. If it exists, it is provided to the virtual machine for execution. Otherwise, dynamic compilation is performed to generate bytecode instructions and stored in the cache. Priority is given to searching from memory cache, if not, look up file cache, and finally, before execution, the script language checksum compilation model matching is performed to improve compilation accuracy.
It simplifies script execution logic, improves script execution efficiency, adapts to lightweight systems, saves system resources, improves the dynamic analysis and execution accuracy of scripts, and reduces the execution failure rate.
Smart Images

Figure CN119166286A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a script execution method, apparatus, computing device, computer storage medium, and computer program product. Background Art
[0002] With the development of the Internet, user needs are becoming increasingly complex and diversified, and the traditional development method based on server-side programming languages can no longer meet the needs of rapid response to changes. Therefore, more and more platforms use client-side scripting to achieve flexible business logic adjustments, thereby improving user experience.
[0003] However, the existing client script execution process is complex, the structure is bulky, and the application scenarios are limited. Summary of the invention
[0004] In view of the above problems, the present application is proposed to provide a script execution method, apparatus, computing device, computer storage medium and computer program product that overcome the above problems or at least partially solve the above problems.
[0005] According to a first aspect of the present application, a script execution method is provided, comprising:
[0006] Determine the currently executed script, and obtain the code block to be executed of the currently executed script;
[0007] Determine whether there is a bytecode instruction corresponding to the code block to be executed in the cache;
[0008] If yes, providing the bytecode instruction to the virtual machine so that the virtual machine executes the bytecode instruction;
[0009] If not, dynamically compile the code block to be executed to generate bytecode instructions corresponding to the code block to be executed, store the code block information to be executed and the bytecode instructions in a cache in association with each other, and provide the bytecode instructions to the virtual machine for the virtual machine to execute the bytecode instructions.
[0010] In an optional implementation, the determining whether there is a bytecode instruction corresponding to the code block to be executed in the cache includes: determining whether there is a bytecode instruction corresponding to the code block to be executed in the memory cache; if not, determining whether there is a bytecode instruction corresponding to the code block to be executed in the file cache;
[0011] If so, providing the bytecode instruction to the virtual machine includes: if the bytecode instruction corresponding to the code block to be executed exists in the memory cache, providing the bytecode instruction in the content cache to the virtual machine; if the bytecode instruction corresponding to the code block to be executed does not exist in the memory cache, and the bytecode instruction corresponding to the code block to be executed exists in the file cache, providing the bytecode instruction in the file cache to the virtual machine;
[0012] If not, dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed includes: if the bytecode instructions corresponding to the code block to be executed do not exist in the memory cache and the file cache, dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed.
[0013] In an optional implementation, the associating and storing the to-be-executed code block information and the bytecode instruction in the cache includes: generating a code block fingerprint of the to-be-executed code block, and associating and storing the code block fingerprint and the bytecode instruction in the cache;
[0014] The determining whether there is a bytecode instruction corresponding to the code block to be executed in the cache includes: generating a code block fingerprint of the code block to be executed, and determining whether there is a bytecode instruction stored in association with the code block fingerprint in the cache.
[0015] In an optional implementation, after determining the currently executed script, the method further includes:
[0016] Determine whether the script execution count of the currently executed script exceeds the single script execution count threshold, and if not, execute the step of obtaining the to-be-executed code block of the currently executed script;
[0017] And / or, determining whether the total number of executions of the current script exceeds the global execution number threshold, if not, executing the step of obtaining the to-be-executed code block of the currently executed script.
[0018] In an optional implementation, after determining the currently executed script, the method further includes:
[0019] Determine the target scripting language of the currently executing script;
[0020] Determine whether the script language hits the script language blacklist; if not, execute the step of obtaining the to-be-executed code block of the currently executed script;
[0021] Alternatively, it is determined whether the scripting language matches a scripting language whitelist; if so, the step of obtaining the to-be-executed code block of the currently executed script is performed.
[0022] In an optional implementation, the scripting language blacklist is generated in the following manner:
[0023] Get the client's historical script execution data;
[0024] Counting the script execution failure rates corresponding to different script languages according to the historical script execution data;
[0025] Generate a script language blacklist based on the script execution failure rate.
[0026] In an optional implementation, compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed includes:
[0027] Determine the target scripting language of the currently executing script;
[0028] Determining whether there is a compilation model matching the target scripting language;
[0029] If yes, compile the code block to be executed using the compilation model to generate bytecode instructions corresponding to the code block to be executed;
[0030] If not, an associated scripting language having a similarity with the target scripting language higher than a preset similarity threshold is determined, and the to-be-executed code block is compiled using a compilation model matching the associated scripting language to generate bytecode instructions corresponding to the to-be-executed code block.
[0031] According to a second aspect of the present application, a script execution device is provided, including:
[0032] Determine module, used to determine the currently executed script;
[0033] An acquisition module, used to acquire the code block to be executed of the currently executed script;
[0034] A cache determination module, used to determine whether there is a bytecode instruction corresponding to the code block to be executed in the cache;
[0035] Provide a module for caching the judgment module, if yes, provide the bytecode instruction to the virtual machine for the virtual machine to execute the bytecode instruction; and provide the bytecode instruction generated by the compiler to the virtual machine for the virtual machine to execute the bytecode instruction;
[0036] A compiler, for dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed if the cache judgment module is not satisfied;
[0037] The cache module is used to store the to-be-executed code block information and the bytecode instruction in a cache in an associated manner.
[0038] In an optional implementation, the cache determination module is used to: determine whether there is a bytecode instruction corresponding to the code block to be executed in the memory cache; if not, determine whether there is a bytecode instruction corresponding to the code block to be executed in the file cache;
[0039] The providing module is used for: if the bytecode instruction corresponding to the code block to be executed exists in the memory cache, providing the bytecode instruction in the content cache to the virtual machine; if the bytecode instruction corresponding to the code block to be executed does not exist in the memory cache, and the bytecode instruction corresponding to the code block to be executed exists in the file cache, providing the bytecode instruction in the file cache to the virtual machine;
[0040] The compiler is used for: if the bytecode instructions corresponding to the code block to be executed do not exist in the memory cache and the file cache, dynamically compiling the code block to be executed to generate the bytecode instructions corresponding to the code block to be executed.
[0041] In an optional implementation, a cache module is used to generate a code block fingerprint of the code block to be executed, and store the code block fingerprint in the cache in association with the bytecode instruction;
[0042] The cache determination module is used to: generate a code block fingerprint of the code block to be executed, and determine whether there is a bytecode instruction stored in association with the code block fingerprint in the cache.
[0043] In an optional implementation, the device further includes: a verification module, configured to determine whether the script execution count of the currently executed script exceeds a single script execution count threshold, and if not, to execute the step of obtaining the to-be-executed code block of the currently executed script;
[0044] And / or, determining whether the total number of executions of the current script exceeds the global execution number threshold, if not, executing the step of obtaining the to-be-executed code block of the currently executed script.
[0045] In an optional implementation, the device further includes: a verification module, configured to determine a target script language of the currently executed script;
[0046] Determine whether the script language hits the script language blacklist; if not, execute the step of obtaining the to-be-executed code block of the currently executed script;
[0047] Alternatively, it is determined whether the scripting language matches a scripting language whitelist; if so, the step of obtaining the to-be-executed code block of the currently executed script is performed.
[0048] In an optional implementation, the scripting language blacklist is generated in the following manner:
[0049] Get the client's historical script execution data;
[0050] Counting the script execution failure rates corresponding to different script languages according to the historical script execution data;
[0051] Generate a script language blacklist based on the script execution failure rate.
[0052] In an optional implementation, the compiler is used to: determine a target script language of the currently executing script;
[0053] Determining whether there is a compilation model matching the target scripting language;
[0054] If yes, compile the code block to be executed using the compilation model to generate bytecode instructions corresponding to the code block to be executed;
[0055] If not, an associated scripting language having a similarity with the target scripting language higher than a preset similarity threshold is determined, and the to-be-executed code block is compiled using a compilation model matching the associated scripting language to generate bytecode instructions corresponding to the to-be-executed code block.
[0056] According to a third aspect of the present application, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0057] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned script execution method.
[0058] According to a fourth aspect of the present application, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned script execution method.
[0059] According to a fifth aspect of the present application, a computer program product is provided, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the above-mentioned script execution method.
[0060] The embodiments of the present application can dynamically parse the to-be-executed code blocks of any currently executed script to obtain bytecode instructions that can be executed by the virtual machine, thereby realizing dynamic parsing and dynamic execution of the script, simplifying the script execution logic and streamlining the script execution framework, and can be particularly adapted to lightweight systems, broaden the scope of application of the present method, and improve the execution efficiency of the script; and give priority to obtaining the bytecode instructions corresponding to the to-be-executed code in the cache for execution, thereby improving the script execution efficiency and saving system resources.
[0061] The embodiment of the present application can accurately obtain the corresponding bytecode instructions through lexical analysis and grammatical analysis of the code block to be executed, thereby improving the parsing accuracy of the code block and facilitating the accurate running of the script.
[0062] The embodiment of the present application adopts a multiple cache method of memory cache and file cache to ensure the cache accuracy of bytecode instructions; and preferentially searches for bytecode instructions from the memory cache, and then searches for bytecode instructions from the file cache, thereby improving the search efficiency of bytecode instructions.
[0063] The embodiment of the present application associates the code block fingerprint with the corresponding bytecode instruction for storage, which can ensure the cache search efficiency and search accuracy of the bytecode instruction.
[0064] The embodiment of the present application verifies the number of executions before executing the script, and subsequent operations can be performed only after the verification is passed, thereby preventing users or automated tools from frequently requesting or executing scripts and protecting system resources from excessive consumption.
[0065] The embodiment of the present application performs script language verification before the script is executed, thereby avoiding errors in subsequent script compilation, ensuring script execution accuracy, and avoiding waste of resources; furthermore, the embodiment of the present application.
[0066] The embodiment of the present application generates a script language blacklist based on historical script execution data, so that script languages with high execution failure rates can be added to the script language blacklist, thereby reducing subsequent script execution failure rates and ensuring script execution accuracy.
[0067] The embodiment of the present application uses a compilation model that matches the script language to compile the script, thereby improving the accuracy of the compilation result and further improving the script execution accuracy.
[0068] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0070] Figure 1 A schematic diagram of an operating environment provided for implementing at least one embodiment of the present application is shown;
[0071] Figure 2A schematic diagram of a script execution method according to the first embodiment of the present application is shown;
[0072] Figure 3 A script execution sequence diagram provided in Embodiment 2 of the present application is shown;
[0073] Figure 4 A schematic diagram of a script execution method according to a third embodiment of the present invention is shown;
[0074] Figure 5 A script execution timing diagram provided in Embodiment 4 of the present application is shown;
[0075] Figure 6 A schematic diagram of the structure of a script execution device provided in Embodiment 5 of the present application is shown;
[0076] Figure 7 A structural schematic diagram of a computing device provided in Example 6 of the present application is shown. DETAILED DESCRIPTION
[0077] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0078] Figure 1 The present invention is applicable to an application environment including, but not limited to, a client 2 , a server 4 , and a network 6 .
[0079] in:
[0080] The server 4 may be composed of a single or multiple computing devices. The multiple computing devices may include virtualized computing instances. Virtualized computing instances may include virtual machines, such as simulations of computer systems, operating systems, servers, etc. The computing device may load a virtual machine based on a virtual image and / or other data defining specific software (e.g., operating system, dedicated application, server) for simulation. As the demand for different types of processing services changes, different virtual machines may be loaded and / or terminated on one or more computing devices. A hypervisor may be implemented to manage the use of different virtual machines on the same computing device.
[0081] The server 4 may be configured to communicate with the client 2, etc., via a network 6. The network 6 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network 6 may include physical links, such as coaxial cable links, twisted pair cable links, optical fiber links, combinations thereof, etc., or wireless links, such as cellular links, satellite links, Wi-Fi links, etc.
[0082] The server 4 can provide storage, reading, downloading, writing, querying, deleting and other services, such as providing static resource download services to clients through multiple domain names.
[0083] Client 2 can be running Windows, Android TM ) or IOS and other operating systems, such as smart phones, tablet devices, laptop computers, virtual reality devices, gaming devices, set-top boxes, car terminals, smart TVs. Based on the above operating systems, various applications, such as browsers, can be run.
[0084] Embodiment 1
[0085] Figure 2 A flowchart of a script execution method provided in the first embodiment of the present application is shown. The script execution method provided in the embodiment of the present application can be executed on the client.
[0086] Specifically, Figure 2 As shown, the method comprises the following steps:
[0087] Step S201, determine the currently executed script, and obtain the code block to be executed of the currently executed script.
[0088] In the embodiment of the present application, the client determines the script file to be executed according to the current business situation, that is, the client determines the currently executed script, which can be the currently executed script or the script to be executed. For example, when a command line parameter or user input is detected to execute an operation or command of a script, or when the current client state meets the execution condition of a script, the script is determined to be the currently executed script.
[0089] Further obtain the code block to be executed of the currently executed script, which is one or more code snippets that are about to be executed in the code file of the currently executed script and can independently complete specific functions. Therefore, the present application can compile the code block to be executed during the script execution process, realize dynamic compilation and dynamic execution of the script, and improve the flexibility of script execution.
[0090] When the client has stored the code block to be executed, the subsequent compilation operation is directly performed on the code block to be executed; if the client does not store the code block to be executed, a corresponding acquisition request is sent to the server to obtain the code block to be executed. When sending, the server can send the entire script code file of the currently executed script, or send the script code of the currently executed script in batches, which is not limited in the embodiment of the present application.
[0091] Among them, the embodiment of the present application does not limit the script language of the currently executed script. The embodiment of the present application can compile and execute different general script languages or custom languages.
[0092] Step S202, determine whether there is a bytecode instruction corresponding to the code block to be executed in the cache; if so, execute step S203; if not, execute step S204.
[0093] Bytecode instructions are a set of binary codes, which are the basic units executed by a virtual machine (VM for short), and they form the basis for programs to run on the virtual machine. The embodiment of the present application stores some bytecode instructions corresponding to the code blocks to be executed that have been successfully compiled in the cache, so that the compiled bytecode instructions can be reused to save system resources.
[0094] After obtaining the code block to be executed, the embodiment of the present application does not directly compile the code block to be executed, but first searches the cache for bytecode instructions that match the code block to be executed; if the bytecode instructions that match the code block to be executed can be found in the cache, step S203 is directly executed to reuse the bytecode instructions, thereby eliminating the need to compile the code block to be executed, thereby improving the script execution efficiency; if the bytecode instructions that match the code block to be executed cannot be found in the cache, step S204 is executed to compile the code block to be executed.
[0095] In an optional embodiment, the bytecode instructions in the cache are stored in association with the code block information of the code block to be executed, and the code block information includes a code block identifier and / or a code block fingerprint, etc. Specifically, the code block fingerprint of the code block to be executed is unique, and the code block fingerprints of different code blocks to be executed are different. This embodiment does not limit the specific fingerprint generation method. For example, a hash operation can be performed on the code block to be executed to obtain a string of fixed length, and the string is used to uniquely identify a section of the code block to be executed, that is, the string is used as the code block fingerprint of the code block to be executed. Therefore, in the specific execution process of this step, the code block fingerprint of the code block to be executed of the currently executed script is generated, and it is determined whether there is a bytecode instruction stored in association with the code block fingerprint in the cache; if so, step S203 is executed; if not, step S204 is executed.
[0096] Step S203: providing the bytecode instruction to the virtual machine so that the virtual machine executes the bytecode instruction.
[0097] If there are bytecode instructions corresponding to the code block to be executed in the cache, it means that the code block to be executed has been correctly compiled before. Then the bytecode instructions corresponding to the code block to be executed in the cache are provided to the virtual machine. After the virtual machine loads the bytecode instructions, it executes the bytecode instructions, thereby realizing the running of the code block to be executed, that is, realizing the dynamic execution of the currently executed script, such as displaying pop-up windows and notifications on the client.
[0098] Step S204, dynamically compile the code block to be executed to generate bytecode instructions corresponding to the code block to be executed, store the code block information to be executed and the bytecode instructions in a cache in association, and provide the bytecode instructions to the virtual machine for the virtual machine to execute the bytecode instructions.
[0099] The constructed compiler is used to dynamically compile the code block to be executed, and the compilation result is the bytecode instruction corresponding to the code block to be executed. The bytecode instruction is provided to the virtual machine for the virtual machine to execute the bytecode instruction. Among them, dynamic compilation means that the script can be compiled while it is being executed. After dynamic compilation, it is executed by the virtual machine in a timely manner, so that the script can be dynamically executed.
[0100] Furthermore, the information of the code block to be executed and the bytecode instruction are stored in association in the cache. The information of the code block to be executed includes: a code block identifier and / or a code block fingerprint. In a specific implementation process, a code block fingerprint of the code block to be executed is generated, and the code block fingerprint is stored in association with the bytecode instruction in the cache so that the bytecode instruction can be reused later.
[0101] It can be seen that the script execution method provided in the embodiment of the present application can dynamically parse the code block to be executed of any currently executed script to obtain the bytecode instructions that can be executed by the virtual machine, realize dynamic parsing and dynamic execution of the script, simplify the script execution logic and streamline the script execution framework, and can especially adapt to lightweight systems, expand the application scope of the method, and improve the execution efficiency of the script; and give priority to obtaining the bytecode instructions corresponding to the code to be executed in the cache for execution, thereby improving the script execution efficiency and saving system resources.
[0102] Embodiment 2
[0103] Figure 3 A script execution sequence diagram provided by the second embodiment of the present application is shown. The embodiment of the present application records in detail the dynamic compilation process of the code to be executed.
[0104] like Figure 3As shown, the method specifically comprises the following steps:
[0105] Step S301, issuing code blocks.
[0106] The server sends the code block to the processing module in the compiler. Among them, the compiler in the embodiment of the present application is mainly responsible for the dynamic compilation of the code block to be executed. Optionally, the compiler can be built based on the Dart language. Dart is an object-oriented programming language, which has the characteristics of being simple and easy to learn, efficient and stable, and can well support the application development of mobile devices. The compiler built based on the Dart language has a concise and lightweight structure, high scalability, and a wide range of applications.
[0107] Step S302, requesting lexical analysis.
[0108] The processing module in the compiler requests lexical parsing from the lexical parsing module in the compiler. In the specific implementation process, the processing module calls the Token function to request lexical parsing, and the Token function further calls the tokenConstructors method of the lexical parsing module to perform lexical parsing.
[0109] Step S303: lexical analysis to generate a flag array.
[0110] The lexical analysis module performs lexical analysis. Lexical analysis is to segment the code block into tokens. A token constitutes a token array, that is, a token array is generated. In the specific lexical analysis process, the original text can be split into meaningful parts, such as keywords, variable names, numbers, strings, operators, etc., through regular expressions and other methods, and then form a token array. For example, the code block is "var a = 3", and the token array of "keyword var, variable a, operator = literal value 3" is obtained through lexical analysis.
[0111] Step S304, return the identification array.
[0112] The lexical parsing module returns the lexical parsing result (identification array, i.e. token array) to the processing module.
[0113] Step S305, request syntax analysis.
[0114] The processing module in the compiler requests lexical analysis from the grammar analysis module in the compiler. In the specific implementation process, the grammar analysis is requested by calling the MultiNode method, and MultiNode further calls the NodeConstructors method for grammar analysis.
[0115] Step S306: Syntax analysis to generate bytecode instructions.
[0116] The syntax parsing module performs syntax parsing. Syntax parsing parses the token array, determines the relationship between tokens through defined syntax rules, combines the tokens into an abstract syntax tree (AST), and extracts valid code blocks from it. Finally, the AST is converted into bytecode instructions.
[0117] Step S307, return bytecode instructions.
[0118] Step S308, cache bytecode instructions.
[0119] The generated bytecode instructions can be cached in a cache space such as a key-value database for subsequent reuse. In the specific implementation process, the code block information to be executed can be used as the key and the bytecode instructions can be cached as the value.
[0120] Step S309: providing bytecode instructions to the virtual machine for execution.
[0121] The bytecode instruction can be provided to a virtual machine for execution, and the virtual machine can execute an external dart function, etc.
[0122] It can be seen that the script execution method provided in the embodiment of the present application can accurately obtain the corresponding bytecode instructions through lexical analysis and grammatical analysis of the code block to be executed, thereby improving the parsing accuracy of the code block and facilitating the accurate running of the script.
[0123] Embodiment 3
[0124] Figure 4 A flowchart of a script execution method provided in Embodiment 3 of the present application is shown. The script execution method provided in the embodiment of the present application can be executed on the client.
[0125] Specifically, Figure 4 As shown, the method comprises the following steps:
[0126] Step S401, determining the currently executed script.
[0127] After determining the currently executed script, this embodiment further verifies the currently executed script, and after the verification is successful, executes the step of obtaining the code block to be executed of the currently executed script, thereby avoiding waste of system resources and ensuring client security. The verification method includes but is not limited to subsequent execution count verification and / or script language verification. In addition, the embodiment of the present application does not limit the execution order of the execution count verification and the script language verification.
[0128] Step S402, verify the execution times of the currently executed script; if the verification succeeds, execute step S403; if the verification fails, execute step S409.
[0129] In order to prevent users or automated tools from frequently requesting or executing scripts and to protect system resources from being over-consumed, the client obtains the global script execution count threshold and / or single script execution count threshold issued by the server. The global script execution count threshold is used to limit the total execution count of all scripts in the client, which indicates the maximum total execution count of all the client code blocks to be executed within a period of time; the single script execution count threshold is used to limit the execution count of a single script, which indicates the maximum number of times a specific code block to be executed is allowed to be executed within the same time period.
[0130] In an embodiment of the present application, after determining a new currently executed script, it is determined whether the script execution count of the currently executed script exceeds a single script execution count threshold, if not, the verification is determined to be successful, if yes, the verification fails; and / or, it is determined whether the total number of executions of the current script exceeds a global execution count threshold, if otherwise, the verification is determined to be successful, if yes, the verification fails.
[0131] Only after verification succeeds can the code block to be executed and subsequent steps including obtaining the currently executed script be executed; if verification fails, the script will not be executed.
[0132] Step S403, perform script language verification on the currently executed script; if the verification succeeds, execute step S404; if the verification fails, execute step S409.
[0133] Although the present application can compile scripts written in different computer languages to obtain bytecode instructions that can be executed by a virtual machine, in order to avoid errors in subsequent script compilation and to avoid waste of resources, the present verification method verifies the script language of the currently executed script.
[0134] In an optional implementation, a script language blacklist is pre-built, and the script language blacklist records the script language information (such as script language identifier or script language name) that cannot be accurately parsed by this method, then the target script language of the currently executed script is determined, that is, the script language of the currently executed script is the target script language. It is further determined whether the script language hits the script language blacklist, if so, it indicates that the method cannot accurately parse the currently executed script, and it is determined that the verification fails; if not, it indicates that the method can accurately parse the currently executed script, and it is determined that the verification succeeds.
[0135] Further optionally, the script language blacklist may be sent to the client after being configured on the server side. For example, relevant personnel may configure the script language blacklist through a configuration portal. Alternatively, the script language blacklist may be generated or updated based on script execution data in a large number of clients.
[0136] Specifically, the server can obtain the historical script execution data of multiple clients. The historical script execution data contains the execution results of each script in the client, and the execution includes successful execution or failed execution. Among them, if a certain code block to be executed in the script cannot be successfully parsed into the corresponding bytecode instruction, or can be parsed into the corresponding bytecode instruction but the virtual machine fails to execute the bytecode instruction, the execution result of the script is determined to be an execution failure. In short, the script execution structure that causes the script to be unable to execute normally is determined to be a failure. Further, according to the historical script execution data, the script execution failure rate corresponding to different script languages is counted, and the script language of each script can be specifically determined, and the multiple different script languages involved in the historical script execution data are determined, and the script execution results under each script language are respectively obtained, and the script execution failure rate under each script language is counted (the execution result is the ratio of the number of failed scripts to the total number of scripts). Afterwards, a script language blacklist is generated according to the script execution failure rate, for example, the script language whose script execution failure rate exceeds the preset threshold can be added to the script language blacklist.
[0137] In an optional implementation, a script language whitelist is pre-built, and the script language whitelist records the script language information (such as script language identifier or script language name) that can be accurately parsed by the method, then the target script language of the currently executed script is determined, and it is further determined whether the script language hits the script language whitelist. If so, it indicates that the method can accurately parse the currently executed script, and the verification is determined to be successful; if not, it indicates that the method cannot accurately parse the currently executed script, and the verification is determined to be failed. The script language whitelist can be generated by configuration operations, which is not limited in this application.
[0138] Only after verification succeeds can the code block to be executed and subsequent steps including obtaining the currently executed script be executed; if verification fails, the script will not be executed.
[0139] Step S404, obtaining the code block to be executed of the currently executed script.
[0140] Step S405, determining whether there is a bytecode instruction corresponding to the code block to be executed in the memory cache; if so, executing step S407; if not, executing step S406;
[0141] In the embodiments of the present application, the compiled code block information to be executed and the corresponding bytecode instructions can be cached in two ways, namely, the file cache method and the content cache method. The file cache method refers to a cache method in which the code block information to be executed and the corresponding bytecode instructions are stored in association on the disk; the content cache method refers to a cache method in which the code block information to be executed and the corresponding bytecode instructions are stored in association in the memory. Therefore, the code block information and the corresponding bytecode instructions that have been successfully compiled in the embodiments of the present application can be cached in the content cache or the file cache.
[0142] Since the data reading speed in the memory is high, the present application preferentially searches the memory cache for the bytecode instructions corresponding to the code block to be executed; if the corresponding bytecode instructions can be found in the memory cache, step S407 is executed; if the corresponding bytecode instructions cannot be found in the memory cache, step S406 is executed.
[0143] Step S406, determining whether there is a bytecode instruction corresponding to the code block to be executed in the file cache; if so, executing step S407; if not, executing step S408.
[0144] If the bytecode instruction corresponding to the code block to be executed does not exist in the memory cache, the bytecode instruction corresponding to the code block to be executed is further searched from the file cache; if the bytecode instruction corresponding to the code block to be executed can be found in the file cache, step S407 is executed; if the bytecode instruction corresponding to the code block to be executed cannot be found in the file cache, step S408 is executed.
[0145] Step S407: providing the bytecode instruction to the virtual machine so that the virtual machine executes the bytecode instruction.
[0146] If there is a bytecode instruction corresponding to the code block to be executed in the memory cache, the bytecode instruction in the content cache is provided to the virtual machine; if there is no bytecode instruction corresponding to the code block to be executed in the memory cache, and there is a bytecode instruction corresponding to the code block to be executed in the file cache, the bytecode instruction in the file cache is provided to the virtual machine for the virtual machine to execute the bytecode instruction.
[0147] Step S408, dynamically compile the code block to be executed to generate bytecode instructions corresponding to the code block to be executed, store the code block information to be executed and the bytecode instructions in a cache in association, and provide the bytecode instructions to the virtual machine for the virtual machine to execute the bytecode instructions.
[0148] If the bytecode instructions corresponding to the code block to be executed do not exist in the memory cache and the file cache, the code block to be executed is dynamically compiled to generate the bytecode instructions corresponding to the code block to be executed. The compilation process may include lexical compilation and grammatical compilation. It should be noted that if an error occurs during the compilation process (such as a syntax error, a type error, a lexical compilation error, etc.), an exception needs to be thrown and the compilation process is stopped. And the execution result of the script is determined to be execution failure.
[0149] In an optional implementation, in order to improve compilation accuracy, matching compilation models are generated for different script languages in this implementation. For example, a matching compilation model is generated for script language A, and the compilation model includes a lexical parsing algorithm generated according to the lexical characteristics of script language A and a grammatical parsing algorithm generated according to the grammatical characteristics of script language A. In the actual implementation process, the target script language of the currently executing script is determined. For example, some script languages usually have their own unique keywords or formats, so the target script language of the currently executing script can be determined by keyword matching and / or format matching.
[0150] It is further determined whether there is a compilation model that matches the target scripting language; if so, the code block to be executed is compiled using the matching compilation model to generate bytecode instructions corresponding to the code block to be executed.
[0151] If not, it indicates that there is currently no compilation model specifically set for this type of script language. However, since different script languages usually have certain similarities, their compilation models can be universal under certain circumstances. Therefore, in this case, this embodiment determines an associated script language whose similarity to the target script language is higher than a preset similarity threshold, and compiles the code block to be executed using the compilation model matching the associated script language to generate bytecode instructions corresponding to the code block to be executed. In the process of determining the associated script language whose similarity to the target script language is higher than the preset similarity threshold, similarity calculation can be performed based on the target script language and any script language with a corresponding compilation model. The similarity calculation process includes character similarity calculation and / or format similarity calculation, and the script language with similarity higher than the preset similarity threshold is selected as the associated script language. In addition, if the associated script language of the target script language cannot be found, a compilation failure message is generated.
[0152] The code block information to be executed and the bytecode instructions are stored in association in the memory cache or file cache, and the bytecode instructions are provided to the virtual machine for the virtual machine to execute the bytecode instructions. In the specific implementation process, the cache method of the code block information to be executed and the bytecode instructions can be determined according to the script importance level and / or execution frequency. If the script importance level is higher than the preset level and the execution frequency is higher than the preset frequency, the memory cache method is adopted; if the script importance level is lower than or equal to the preset level and the execution frequency is lower than or equal to the preset frequency, the file cache method is adopted. In this way, the bytecode instructions of important and frequently executed scripts can be stored in the content cache with a high reading speed, and the bytecode instructions of unimportant and low-execution scripts can be stored in the file cache with a low reading speed. In addition, the cache method can also be determined according to the memory capacity of the client, for example, if the content capacity is greater than the preset capacity, the content cache method is preferred; otherwise, the file cache method is adopted.
[0153] Step S409: Generate a prompt message indicating verification failure.
[0154] It can be seen that the script execution method provided in the embodiment of the present application first verifies the number of executions before the script is executed, and subsequent operations can be performed only after the verification is passed, thereby preventing users or automated tools from frequently requesting or executing scripts and protecting system resources from excessive consumption; the embodiment of the present application can also perform script language verification, thereby avoiding errors in subsequent script compilation, ensuring script execution accuracy, and avoiding waste of resources; furthermore, the embodiment of the present application preferentially searches for bytecode instructions from the memory cache, and then searches for bytecode instructions from the file cache, thereby improving the search efficiency of bytecode instructions, and adopting this multiple cache method can ensure the cache accuracy of bytecode instructions.
[0155] Embodiment 4
[0156] Figure 5 A script execution sequence diagram provided in Example 4 of the present application is shown. Figure 5 As shown, the method specifically comprises the following steps:
[0157] S501, obtaining a code block, a single script execution count threshold, and a global execution count threshold.
[0158] The script engine obtains data such as the code block to be executed, the single script execution count threshold, and the global execution count threshold from the server. For example, you can use the getTargetStrategyModel method to obtain the corresponding script from the server; use ClobalLimitShow to obtain the global execution count threshold; and use PaddingLimitShow to obtain the single script execution count threshold.
[0159] S502, verification.
[0160] The script engine performs execution count verification and / or script language verification on the code block to be executed.
[0161] S503, run.
[0162] After the verification passes, the virtual machine is triggered to run the script.
[0163] S504, load bytecode instructions.
[0164] The virtual machine loads the bytecode instructions.
[0165] S505, obtaining instructions from the memory cache.
[0166] Prioritize fetching instructions from the memory cache.
[0167] S506, return the result.
[0168] If the corresponding bytecode instruction exists in the memory cache, it is returned to the virtual machine; if the corresponding bytecode instruction does not exist in the memory cache, the result indicating that the bytecode instruction does not exist is returned.
[0169] S507, obtaining instructions for file cache.
[0170] If the corresponding bytecode instruction does not exist in the memory cache, obtain the instruction from the file cache.
[0171] S508, return the result.
[0172] If the corresponding bytecode instruction exists in the file cache, it is returned to the virtual machine; if the corresponding bytecode instruction does not exist in the file cache, a result indicating that the bytecode instruction does not exist is returned.
[0173] S509, obtaining parsed instructions.
[0174] If the corresponding bytecode instruction does not exist in the memory cache and the file cache, it is parsed by the compiler.
[0175] S510, return the result.
[0176] The compiler returns the bytecode instructions generated after compilation to the virtual machine.
[0177] S511, return instruction.
[0178] The virtual machine receives the returned bytecode instructions.
[0179] S512, execute instructions.
[0180] The virtual machine executes bytecode instructions.
[0181] It can be seen that the script execution method provided in the embodiment of the present application can ensure the correct operation of the script through the verification process, and can improve the instruction acquisition accuracy through the acquisition method of multiple instructions.
[0182] Embodiment 5
[0183] Figure 6 FIG. 5 shows a schematic diagram of the structure of a script execution device provided in Embodiment 5 of the present application. Figure 6 As shown, the script execution device 600 includes: a determination module 610, an acquisition module 620, a cache determination module 630, a providing module 640, a compiler 650, and a cache module 660. Among them, the determination module 610, the acquisition module 620, the cache determination module 630, and the providing module 640 can be located in the script engine.
[0184] A determination module 610 is used to determine the currently executed script;
[0185] The acquisition module 620 is used to acquire the code block to be executed of the currently executed script;
[0186] A cache determination module 630 is used to determine whether there is a bytecode instruction corresponding to the code block to be executed in the cache;
[0187] A module 640 is provided for providing the bytecode instruction to the virtual machine if the cache determination module is yes, so that the virtual machine executes the bytecode instruction; and providing the bytecode instruction generated by the compiler to the virtual machine so that the virtual machine executes the bytecode instruction;
[0188] Compiler 650, for dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed if the cache judgment module fails;
[0189] The cache module 660 is used to store the to-be-executed code block information and the bytecode instruction in a cache in association with each other.
[0190] In an optional implementation, the cache determination module 630 is used to: determine whether there is a bytecode instruction corresponding to the code block to be executed in the memory cache; if not, determine whether there is a bytecode instruction corresponding to the code block to be executed in the file cache;
[0191] The providing module 640 is used to: if the bytecode instruction corresponding to the code block to be executed exists in the memory cache, provide the bytecode instruction in the content cache to the virtual machine; if the bytecode instruction corresponding to the code block to be executed does not exist in the memory cache, and the bytecode instruction corresponding to the code block to be executed exists in the file cache, provide the bytecode instruction in the file cache to the virtual machine;
[0192] The compiler 650 is used for: if the bytecode instructions corresponding to the code block to be executed do not exist in the memory cache and the file cache, dynamically compile the code block to be executed to generate the bytecode instructions corresponding to the code block to be executed.
[0193] In an optional implementation, the cache module 660 is used to generate a code block fingerprint of the code block to be executed, and store the code block fingerprint in the cache in association with the bytecode instruction;
[0194] The cache determination module 630 is used to generate a code block fingerprint of the code block to be executed, and determine whether there is a bytecode instruction stored in association with the code block fingerprint in the cache.
[0195] In an optional implementation, the device further includes: a verification module (not shown in the figure), configured to determine whether the script execution count of the currently executed script exceeds a single script execution count threshold, and if not, to execute the step of obtaining the to-be-executed code block of the currently executed script;
[0196] And / or, determining whether the total number of executions of the current script exceeds the global execution number threshold, if not, executing the step of obtaining the to-be-executed code block of the currently executed script.
[0197] In an optional implementation, the device further includes: a verification module (not shown in the figure), configured to determine a target script language of the currently executed script;
[0198] Determine whether the script language hits the script language blacklist; if not, execute the step of obtaining the to-be-executed code block of the currently executed script;
[0199] Alternatively, it is determined whether the scripting language matches a scripting language whitelist; if so, the step of obtaining the to-be-executed code block of the currently executed script is performed.
[0200] In an optional implementation, the scripting language blacklist is generated in the following manner:
[0201] Get the client's historical script execution data;
[0202] Counting the script execution failure rates corresponding to different script languages according to the historical script execution data;
[0203] Generate a script language blacklist based on the script execution failure rate.
[0204] In an optional implementation, the compiler 650 is used to: determine the target script language of the currently executed script;
[0205] Determining whether there is a compilation model matching the target scripting language;
[0206] If yes, compile the code block to be executed using the compilation model to generate bytecode instructions corresponding to the code block to be executed;
[0207] If not, an associated scripting language having a similarity with the target scripting language higher than a preset similarity threshold is determined, and a compilation model matching the associated scripting language is used to generate a scripting language.
[0208] It can be seen that the script execution device provided in the embodiment of the present application can dynamically parse the code block to be executed of any currently executed script to obtain the bytecode instructions that can be executed by the virtual machine, thereby realizing dynamic parsing and dynamic execution of the script, simplifying the script execution logic and streamlining the script execution framework, and can especially adapt to lightweight systems, expand the application scope of the present method, and improve the execution efficiency of the script; and it gives priority to obtaining the bytecode instructions corresponding to the code to be executed in the cache for execution, thereby improving the script execution efficiency and saving system resources.
[0209] Embodiment 6
[0210] Figure 7 A schematic diagram of the structure of a computing device provided in Example 6 of the present application is shown. The specific embodiments of the present application do not limit the specific implementation of the computing device.
[0211] like Figure 7 As shown, the computing device may include: a processor (processor) 702 , a communications interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .
[0212] The processor 702, the communication interface 704, and the memory 706 communicate with each other via a communication bus 708. The communication interface 704 is used to communicate with other devices such as a client or other server network elements. The processor 702 is used to execute a program 710, which can specifically execute the relevant steps in the above-mentioned script execution method embodiment for a computing device.
[0213] Specifically, the program 710 may include program codes, which include computer operation instructions.
[0214] The processor 702 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0215] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The program 710 may be specifically used to enable the processor 702 to perform the operations in the above method embodiment.
[0216] Embodiment 7
[0217] Embodiment 7 of the present application provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction or computer program, which enables a processor to execute operations corresponding to the script execution method in any of the above method embodiments.
[0218] Embodiment 8
[0219] Embodiment 8 of the present application provides a computer program product, which includes at least one executable instruction or computer program, and the executable instruction or computer program can enable a processor to execute operations corresponding to the script execution method in any of the above method embodiments.
[0220] In summary, according to the computing device, computer storage medium and computer program product provided in this embodiment, it is possible to realize dynamic parsing and dynamic execution of scripts, simplify the script execution logic and streamline the script execution framework, and improve the execution efficiency of the script; and give priority to obtaining the bytecode instructions corresponding to the code to be executed in the cache for execution, thereby improving the script execution efficiency and saving system resources.
[0221] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present application described here, and the above description of specific languages is to disclose the best mode of implementation of the present application.
[0222] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0223] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0224] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0225] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0226] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components according to the embodiments of the present application. The application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0227] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A script execution method, It is characterized in that include: Determine the currently executed script, and obtain the code block to be executed of the currently executed script; Determine whether there is a bytecode instruction corresponding to the code block to be executed in the cache; If yes, providing the bytecode instruction to the virtual machine so that the virtual machine executes the bytecode instruction; If not, dynamically compile the code block to be executed to generate bytecode instructions corresponding to the code block to be executed, store the code block information to be executed and the bytecode instructions in a cache in association with each other, and provide the bytecode instructions to the virtual machine for the virtual machine to execute the bytecode instructions.
2. The method according to claim 1, It is characterized in that The determining whether there is a bytecode instruction corresponding to the code block to be executed in the cache comprises: determining whether there is a bytecode instruction corresponding to the code block to be executed in the memory cache; if not, determining whether there is a bytecode instruction corresponding to the code block to be executed in the file cache; If so, providing the bytecode instruction to the virtual machine includes: if the bytecode instruction corresponding to the code block to be executed exists in the memory cache, providing the bytecode instruction in the content cache to the virtual machine; if the bytecode instruction corresponding to the code block to be executed does not exist in the memory cache, and the bytecode instruction corresponding to the code block to be executed exists in the file cache, providing the bytecode instruction in the file cache to the virtual machine; If not, dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed includes: if the bytecode instructions corresponding to the code block to be executed do not exist in the memory cache and the file cache, dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed.
3. The method according to claim 1 or 2, It is characterized in that The storing the to-be-executed code block information and the bytecode instruction in association with each other in the cache comprises: generating a code block fingerprint of the to-be-executed code block, and storing the code block fingerprint and the bytecode instruction in association with each other in the cache; The determining whether there is a bytecode instruction corresponding to the code block to be executed in the cache includes: generating a code block fingerprint of the code block to be executed, and determining whether there is a bytecode instruction stored in association with the code block fingerprint in the cache.
4. The method according to any one of claims 1 to 3, It is characterized in that After determining the currently executed script, the method further includes: Determine whether the script execution count of the currently executed script exceeds the single script execution count threshold, and if not, execute the step of obtaining the to-be-executed code block of the currently executed script; And / or, determining whether the total number of executions of the current script exceeds the global execution number threshold, if not, executing the step of obtaining the to-be-executed code block of the currently executed script.
5. The method according to any one of claims 1 to 4, It is characterized in that After determining the currently executed script, the method further includes: Determine the target scripting language of the currently executing script; Determine whether the script language hits the script language blacklist; if not, execute the step of obtaining the to-be-executed code block of the currently executed script; Alternatively, it is determined whether the scripting language matches a scripting language whitelist; if so, the step of obtaining the to-be-executed code block of the currently executed script is performed.
6. The method according to claim 5, It is characterized in that The scripting language blacklist is generated in the following way: Get the client's historical script execution data; Counting the script execution failure rates corresponding to different script languages according to the historical script execution data; Generate a script language blacklist based on the script execution failure rate.
7. The method according to any one of claims 1 to 6, It is characterized in that The dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed includes: Determine the target scripting language of the currently executing script; Determining whether there is a compilation model matching the target scripting language; If yes, compile the code block to be executed using the compilation model to generate bytecode instructions corresponding to the code block to be executed; If not, an associated scripting language having a similarity with the target scripting language higher than a preset similarity threshold is determined, and the to-be-executed code block is compiled using a compilation model matching the associated scripting language to generate bytecode instructions corresponding to the to-be-executed code block.
8. A script execution device, It is characterized in that include: Determine module, used to determine the currently executed script; An acquisition module, used to acquire the code block to be executed of the currently executed script; A cache determination module, used to determine whether there is a bytecode instruction corresponding to the code block to be executed in the cache; Provide a module for caching the judgment module, if yes, provide the bytecode instruction to the virtual machine for the virtual machine to execute the bytecode instruction; and provide the bytecode instruction generated by the compiler to the virtual machine for the virtual machine to execute the bytecode instruction; A compiler, for dynamically compiling the code block to be executed to generate bytecode instructions corresponding to the code block to be executed if the cache judgment module is not satisfied; The cache module is used to store the to-be-executed code block information and the bytecode instruction in a cache in an associated manner.
9. A computing device, It is characterized in that include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the script execution method according to any one of claims 1 to 7.
10. A computer storage medium, It is characterized in that The storage medium stores at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the script execution method according to any one of claims 1 to 7.
11. A computer program product, It is characterized in that The method comprises at least one executable instruction, wherein the executable instruction enables a processor to execute an operation corresponding to the script execution method according to any one of claims 1 to 7.
