Data processing method and device, readable medium and electronic equipment

By using hot update technology to generate and execute instruction sequences at the virtual machine level, the problem of the console being unable to modify the application instruction sequence under certain operating systems or platforms is solved, thereby improving the efficiency of application development and debugging.

CN113934639BActive Publication Date: 2025-10-10BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111285051.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2025-10-10
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

Under certain operating systems or platforms, the console cannot modify the instruction sequence of an application, resulting in inefficient application development and debugging.

Method used

The hot update technology is used to modify the instruction sequence at the virtual machine level. By obtaining the first code, historical data and preset function template of the application, the first instruction sequence is generated and executed to realize application development and debugging across operating systems or platforms.

Benefits of technology

Improves the development and debugging efficiency of applications under different operating systems or platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113934639B_ABST
    Figure CN113934639B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing method, device, readable medium and electronic equipment, and relates to the technical field of data processing. The method comprises: obtaining a first code of a target application program input during running of the target application program; generating a first instruction sequence through a hot update operation according to the first code, historical data and a preset function template, and executing the first instruction sequence, wherein the historical data comprises a second code input in a historical time period and a generated second instruction sequence. The present disclosure uses the hot update mode to modify the instruction sequence of the target application program under different operating systems or platforms, and executes the first instruction sequence determined by the first code and the historical data to realize the development and debugging of the application program under different operating systems or platforms, thereby improving the development and debugging efficiency of the application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular, to a data processing method, device, readable medium, and electronic device. Background Art

[0002] With the continuous development of terminal devices, more and more applications are becoming part of people's daily lives. During application development and debugging, it's often necessary to check or modify the application's status while it's running to achieve certain debugging objectives. Related technologies primarily use a console to receive program code entered through an interactive interface, execute the code, and observe the results to check or modify the application's status. However, on some operating systems or platforms, the console cannot be used for application development and debugging, which reduces application development and debugging efficiency. Summary of the Invention

[0003] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a data processing method, the method comprising:

[0005] During the running of the target application, obtaining a first code of the target application input;

[0006] According to the first code, historical data and preset function template, a first instruction sequence is generated through a hot update operation and the first instruction sequence is executed; the historical data includes a second code input within a historical time period and a generated second instruction sequence.

[0007] In a second aspect, the present disclosure provides a data processing device, the device comprising:

[0008] An acquisition module, configured to acquire a first code of a target application input during the running of the target application;

[0009] A processing module is used to generate a first instruction sequence and execute the first instruction sequence through a hot update operation based on the first code, historical data and a preset function template; the historical data includes the second code input within a historical time period and the generated second instruction sequence.

[0010] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect of the present disclosure.

[0011] In a fourth aspect, the present disclosure provides an electronic device, comprising:

[0012] a storage device having a computer program stored thereon;

[0013] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.

[0014] Through the above technical solution, the present disclosure first obtains the first code of the input target application during the operation of the target application, and generates a first instruction sequence through a hot update operation based on the first code, historical data, and a preset function template, and executes the first instruction sequence, wherein the historical data includes the second code input and the generated second instruction sequence within a historical time period. The present disclosure utilizes a hot update method to modify the instruction sequence of the target application under different operating systems or platforms, and by executing the first instruction sequence determined by the first code and historical data, it realizes the development and debugging of the application under different operating systems or platforms, thereby improving the development and debugging efficiency of the application.

[0015] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:

[0017] Figure 1 is a flow chart showing a data processing method according to an exemplary embodiment;

[0018] Figure 2 yes Figure 1 The illustrated embodiment shows a flow chart of step 102;

[0019] Figure 3 is a block diagram of a data processing device according to an exemplary embodiment;

[0020] Figure 4 yes Figure 3 A block diagram of a processing module shown in the illustrated embodiment;

[0021] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0022] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0024] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0025] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0026] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0028] Figure 1 FIG. 1 is a flow chart showing a data processing method according to an exemplary embodiment. Figure 1 As shown, the method may include the following steps:

[0029] Step 101: During the running of the target application, a first code of the input target application is obtained.

[0030] For example, the console needs to modify the instruction sequence of the physical machine during the operation of the application to realize its function. However, under certain operating systems or platforms (such as the iOS operating system), it is prohibited to modify the instruction sequence of the physical machine during the operation of the application. This makes it impossible to use the console for application development and debugging under these operating systems or platforms, reducing the development efficiency and debugging efficiency of the application. In order to improve the compatibility of the console, it is possible to use hot update technology as a basis and utilize its ability to modify the instruction sequence at the virtual machine level so that the actual program logic of the console runs at the virtual machine level, which is independent of the specific device platform and operating system, so that the console can run under the above-mentioned restricted operating system or platform, thereby improving the development efficiency and debugging efficiency of the application. Among them, the console can be a C# console or other types of consoles, and this disclosure does not make specific restrictions on this.

[0031] Specifically, the console can essentially be understood as an input-execution-output cycle. Therefore, when using hot update technology to implement the console, it is also necessary to fully implement the console's input, execution, output and cycle. First, the console can be divided into a console execution part and a console interaction part, wherein the console execution part needs to be integrated into the target application, and the console interaction part can be an independent program and connect and communicate with the console execution part through a network or other means, or it can be embedded in the target application for use. This disclosure does not make specific restrictions on this. During the operation of the target application, the console interaction part can obtain the first code of the target application entered by the user through the interactive interface (that is, the console input is implemented through the interactive interface), and the first code is used to modify the original instruction sequence. In addition, the target application needs to be integrated with a code hot update solution (such as the InjectFix solution) so that the target application can modify the original program logic through the virtual machine at runtime (that is, modify an original method or process). The interactive interface can be implemented using any suitable UI (English: User Interface, Chinese: User Interface) framework, and this disclosure does not make specific restrictions on this.

[0032] Step 102: Generate a first instruction sequence through a hot update operation based on the first code, historical data, and a preset function template, and execute the first instruction sequence, wherein the historical data includes the second code input within a historical time period and the generated second instruction sequence.

[0033] For example, users often need to enter code multiple times through the console's interactive interface to check or modify the application status. However, in the process of entering code multiple times, there will be logically related code, which requires the console to record the historical instruction sequence and some information in the code in order to correctly execute the next instruction, that is, to implement a console loop. For example, when the code entered by the user for the first time includes "using System.IO;", the code entered by the user for the second time may access members or functions under the "System.IO" namespace. For another example, if the code entered by the user for the fifth time includes "var a=1;", the code entered by the user for the sixth time may use variable a, and it is necessary to know that the type of variable a is int.

[0034] Therefore, in order to ensure the loop of the console, the console interaction part can be pre-set with a preset function template, and analyze the first code and historical data to obtain an analysis result. Afterwards, the console interaction part can update the preset function template according to the analysis result to obtain the target function. The target function can then be hot-updated and compiled using tools such as a compiler to obtain a first instruction sequence. Among them, the historical data may include the second code input by the user through the interactive interface during the historical time period and the second instruction sequence generated during the historical time period. The first instruction sequence can be understood as an instruction sequence generated by the second instruction sequence, the first code, and the second code. Finally, the console execution part can execute the first instruction sequence through the virtual machine (i.e., realize the execution of the console), and return the execution result to the console interaction part, which is returned to the user through the interactive interface by the console interaction part (i.e., realize the output of the console).

[0035] In summary, the present disclosure first obtains the first code of the input target application during the operation of the target application, and generates a first instruction sequence through a hot update operation based on the first code, historical data, and a preset function template, and executes the first instruction sequence, wherein the historical data includes the second code input and the generated second instruction sequence within a historical time period. The present disclosure utilizes a hot update method to modify the instruction sequence of the target application under different operating systems or platforms, and by executing the first instruction sequence determined by the first code and historical data, it realizes the development and debugging of the application under different operating systems or platforms, thereby improving the development and debugging efficiency of the application.

[0036] Figure 2 yes Figure 1 The embodiment shown is a flow chart of step 102. Figure 2 As shown, step 102 may include the following steps:

[0037] Step 1021 : extract a first statement of a first specified type from the first code, and extract a second statement of a second specified type from the second instruction sequence and the second code.

[0038] For example, the console interaction part can use a source code analysis tool (such as Roslyn) to disassemble and analyze several elements of the first code and historical data, and perform certain packaging and conversion to meet the needs of the console. Specifically, after obtaining the second instruction sequence, the first code, and the second code, the console interaction part can use the source code analysis tool to extract the first statement of the first specified type from the first code, and extract the second statement of the second specified type from the second instruction sequence and the second code. For example, the first statement can be a using declaration statement in the first code, and the second statement can be a using declaration statement in the second code and the second instruction sequence.

[0039] Step 1022: Determine the target variable according to the first code.

[0040] For example, the console interaction part can first record the variable types (which can be represented by type) and variable names (which can be represented by varname) of all variables defined in the second instruction sequence and the second code. Afterwards, the console interaction part can parse the first code to obtain the first variable that needs to be read in the first code, and the second variable that has been assigned in the first code. For example, the console interaction part can analyze the variable name of the first variable that needs to be read in the first code, and according to the variable name of the first variable, reversely check the variable type corresponding to the first variable through the pre-recorded variable type and variable name. At the same time, the console interaction part can analyze the variable name and variable type of the second variable assigned in the first code. Finally, the console interaction part can use the first variable and the second variable as target variables. Among them, the first variable can be understood as the local variable to be used by the console recovery, and the second variable can be understood as the written local variable saved by the console.

[0041] Step 1023: Generate a first instruction sequence through a hot update operation according to the first statement, the second statement, the target variable and the preset function template.

[0042] In this step, the console interaction portion may first generate a third statement corresponding to the first variable based on the first variable, and generate a fourth statement corresponding to the second variable based on the second variable. For example, the console interaction portion may generate a line of statement in the form of "type varname = (type)__Locals["varname"];" as the third statement for each first variable, and generate a line of statement in the form of "__Locals["varname"] = varname;" as the fourth statement for each second variable. The console interaction portion may then fill the first, second, third, and fourth statements into a preset function template, respectively, to obtain a target function, and generate a first instruction sequence based on the target function through a hot update operation.

[0043] Among them, the target function can be a target function, in which case the preset function template is a target function template. It should be noted that the target function itself does not accept parameters and does not return values. In the program logic of the target function for the first code input by the user, in addition to the program logic contained in the first code itself, it also includes the second instruction sequence and the program logic necessary for contextual inheritance in the second code. For example, an achievable target function template can be expressed as:

[0044]

[0045]

[0046] __Evaluate is the target function, and the ConsoleRuntime object is its runtime environment. The target function can directly access any member variables or member functions of the ConsoleRuntime object. The runtime environment of the target function is the external environment that the target function can directly access. The runtime environment also needs to contain a data dictionary (__Locals) ranging from string to object types. This data dictionary is used to store temporary data and result data during console use.

[0047] Furthermore, the target function template can be expressed as:

[0048]

[0049] If the first statement is a non-using declaration statement in the first code, and the second statement is a using declaration statement in the second code and the second instruction sequence, then the first statement is actually a statement entered by the user that does not contain a using statement, and the second statement is a using declaration that the user has previously entered. In this case, the first statement can be filled into position {2} in the target function template, and the second statement can be filled into position {0} in the target function template. At the same time, the third statement can be filled into position {1} in the target function template, and the fourth statement can be filled into position {3} in the target function template.

[0050] For example, when the user first enters the code "int i = 0;", the target function template is filled with a statement to save the variable i in addition to the original instruction. At this time, the target function template can be expressed as:

[0051]

[0052] When the second code input by the user is "int j = i;", in addition to the original variables, the target function template is also filled with a statement to restore the variable i and a statement to save the variable j. At this time, the target function template can be expressed as:

[0053]

[0054] In one scenario, step 1022 may be implemented as follows:

[0055] When the variable type of the first variable is var type, semantic analysis is performed on the target function to obtain the real variable type of the first variable, and the variable type of the first variable is updated to the real variable type.

[0056] Specifically, when the console is a C# console, when writing code in the C# language, the var type may be used to define variables. At this time, the compiler will deduce the actual variable type corresponding to the var type based on the value assigned to the variable. For the first variable x declared with the var type, when restoring the first variable x, its corresponding third statement is var x = (var)__Locals["x"]. However, since the var type itself is not a real variable type, __Locals["x"] cannot be directly forced to perform a type conversion, which will cause the third statement to fail to compile. Therefore, the console needs to analyze and deduce the var type in advance, obtain its actual variable type, and save it. For example, the console can use a C# source code analysis tool to perform semantic analysis on the target function filled in step 1023, obtain the actual variable type of the first variable, and update the variable type of the first variable to the actual variable type so that the first variable can be restored later.

[0057] Optionally, step 103 may be implemented in the following manner:

[0058] Execute the first instruction sequence and obtain the execution result from the running environment of the target function.

[0059] For example, the console execution component can load the first instruction sequence through the virtual machine to validate the program logic of the target function. If the execution result needs to be returned, the result data of the execution result can be retrieved from the data dictionary and returned to the console interaction component, which then returns it to the user through the interactive interface.

[0060] In summary, the present disclosure first obtains the first code of the input target application during the operation of the target application, and generates a first instruction sequence through a hot update operation based on the first code, historical data, and a preset function template, and executes the first instruction sequence, wherein the historical data includes the second code input and the generated second instruction sequence within a historical time period. The present disclosure utilizes a hot update method to modify the instruction sequence of the target application under different operating systems or platforms, and by executing the first instruction sequence determined by the first code and historical data, it realizes the development and debugging of the application under different operating systems or platforms, thereby improving the development and debugging efficiency of the application.

[0061] Figure 3 FIG. 1 is a block diagram of a data processing device according to an exemplary embodiment. Figure 3 As shown, the device 200 includes:

[0062] The acquisition module 201 acquires the first code of the target application program that is input during the running of the target application program.

[0063] The processing module 202 is configured to generate a first instruction sequence and execute the first instruction sequence through a hot update operation based on the first code, historical data, and a preset function template, wherein the historical data includes the second code input within a historical time period and the generated second instruction sequence.

[0064] Figure 4 yes Figure 3 The embodiment shown is a block diagram of a generation module. Figure 4 As shown, the processing module 202 includes:

[0065] The extraction submodule 2021 is configured to extract a first statement of a first specified type from the first code, and to extract a second statement of a second specified type from the second instruction sequence and the second code.

[0066] The determination submodule 2022 is configured to determine a target variable according to the first code.

[0067] The generation submodule 2023 is used to generate a first instruction sequence through a hot update operation according to the first statement, the second statement, the target variable and the preset function template.

[0068] Optionally, the determination submodule 2022 is configured to:

[0069] The first code is parsed to obtain a first variable to be read in the first code and a second variable assigned in the first code, and the first variable and the second variable are used as target variables.

[0070] Optionally, the generating submodule 2023 is used to:

[0071] A third statement corresponding to the first variable is generated according to the first variable, and a fourth statement corresponding to the second variable is generated according to the second variable.

[0072] Fill the first statement, the second statement, the third statement and the fourth statement into the preset function template respectively to obtain the target function.

[0073] According to the target function, a first instruction sequence is generated through a hot update operation.

[0074] Optionally, the determination submodule 2022 is configured to:

[0075] When the variable type of the first variable is var type, semantic analysis is performed on the target function to obtain the real variable type of the first variable, and the variable type of the first variable is updated to the real variable type.

[0076] Optionally, the execution module 203 is configured to:

[0077] Execute the first instruction sequence and obtain the execution result from the running environment of the target function.

[0078] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0079] In summary, the present disclosure first obtains the first code of the input target application during the operation of the target application, and generates a first instruction sequence through a hot update operation based on the first code, historical data, and a preset function template, and executes the first instruction sequence, wherein the historical data includes the second code input and the generated second instruction sequence within a historical time period. The present disclosure utilizes a hot update method to modify the instruction sequence of the target application under different operating systems or platforms, and by executing the first instruction sequence determined by the first code and historical data, it realizes the development and debugging of the application under different operating systems or platforms, thereby improving the development and debugging efficiency of the application.

[0080] Reference below Figure 5 , which shows an electronic device (eg Figure 1 The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0081] like Figure 5 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0082] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5The electronic device 600 is shown with various devices, but 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 instead.

[0083] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0084] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0085] In some embodiments, the client can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can interconnect with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0086] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0087] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the first code of the target application input during the operation of the target application; generates a first instruction sequence through a hot update operation based on the first code, historical data and a preset function template, and executes the first instruction sequence; the historical data includes the second code input within the historical time period and the generated second instruction sequence.

[0088] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] The modules described in the embodiments of the present disclosure may be implemented in software or hardware. In some cases, the name of a module does not necessarily define the module itself. For example, an acquisition module may also be described as a "module for acquiring current hot update data."

[0091] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0092] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0093] According to one or more embodiments of the present disclosure, example 1 provides a data processing method, the method comprising: obtaining a first code of a target application program input during running of the target application program; generating a first instruction sequence through a hot update operation according to the first code, historical data and a preset function template, and executing the first instruction sequence; the historical data comprising a second code input in a historical time period and a generated second instruction sequence.

[0094] According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, and the generating a first instruction sequence through a hot update operation according to the first code, historical data and a preset function template comprises: extracting a first statement of a first specified type from the first code, and extracting a second statement of a second specified type from the second instruction sequence and the second code; determining a target variable according to the first code; and generating the first instruction sequence through the hot update operation according to the first statement, the second statement, the target variable and the preset function template.

[0095] According to one or more embodiments of the present disclosure, example 3 provides the method of example 2, and the determining a target variable according to the first code comprises: parsing the first code to obtain a first variable that needs to be read in the first code and a second variable that is assigned in the first code, and taking the first variable and the second variable as the target variable.

[0096] According to one or more embodiments of the present disclosure, example 4 provides the method of example 3, and the generating the first instruction sequence through the hot update operation according to the first statement, the second statement, the target variable and the preset function template comprises: generating a third statement corresponding to the first variable according to the first variable, and generating a fourth statement corresponding to the second variable according to the second variable; filling the first statement, the second statement, the third statement and the fourth statement into the preset function template respectively to obtain a target function; and generating the first instruction sequence through the hot update operation according to the target function.

[0097] According to one or more embodiments of the present disclosure, example 5 provides the method of example 4, and the determining a target variable according to the first code comprises: in a case where a variable type of the first variable is a var type, performing semantic analysis on the target function to obtain an actual variable type of the first variable, and updating the variable type of the first variable to the actual variable type.

[0098] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 4, wherein executing the first instruction sequence includes: executing the first instruction sequence and obtaining an execution result from the running environment of the target function.

[0099] According to one or more embodiments of the present disclosure, Example 7 provides a data processing device, which includes: an acquisition module for acquiring a first code of a target application input during the operation of the target application; a processing module for generating a first instruction sequence and executing the first instruction sequence through a hot update operation based on the first code, historical data and a preset function template; the historical data includes a second code input within a historical time period and a second instruction sequence generated.

[0100] According to one or more embodiments of the present disclosure, Example 8 provides the device described in Example 7, wherein the processing module includes: an extraction submodule for extracting a first statement of a first specified type from the first code, and extracting a second statement of a second specified type from the second instruction sequence and the second code; a determination submodule for determining a target variable based on the first code; and a generation submodule for generating the first instruction sequence through the hot update operation based on the first statement, the second statement, the target variable and the preset function template.

[0101] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the methods described in Examples 1 to 6 when executed by a processing device.

[0102] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method described in Examples 1 to 6.

[0103] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0104] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0105] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.

Claims

1. A data processing method, characterized in that: The method comprises: During the running of the target application, obtaining a first code of the target application input; generating a first instruction sequence through a hot update operation based on the first code, input historical data, and a preset function template, executing the first instruction sequence through a virtual machine, and returning the execution result to a user through an interactive interface; the historical data includes second codes that are logically associated with the first code and that were input multiple times within a historical time period, and the generated second instruction sequence, and the first code and the second code are used to check or modify an application state; The step of generating a first instruction sequence through a hot update operation based on the first code, input historical data, and a preset function template includes: extracting a first statement of a first specified type from the first code, and extracting a second statement of a second specified type from the second instruction sequence and the second code; determining a target variable according to the first code; The first instruction sequence is generated according to the first statement, the second statement, the target variable and the preset function template through the hot update operation.

2. The method according to claim 1, characterized in that Determining the target variable according to the first code includes: The first code is parsed to obtain a first variable to be read in the first code and a second variable assigned in the first code, and the first variable and the second variable are used as the target variables.

3. The method according to claim 2, characterized in that Generating the first instruction sequence according to the first statement, the second statement, the target variable, and the preset function template through the hot update operation includes: generating a third statement corresponding to the first variable according to the first variable, and generating a fourth statement corresponding to the second variable according to the second variable; Fill the first statement, the second statement, the third statement, and the fourth statement into the preset function template respectively to obtain a target function; The first instruction sequence is generated according to the target function through the hot update operation.

4. The method according to claim 3, characterized in that Determining the target variable according to the first code includes: In a case where the variable type of the first variable is var type, semantic analysis is performed on the objective function to obtain the real variable type of the first variable, and the variable type of the first variable is updated to the real variable type.

5. The method according to claim 3, characterized in that The executing the first instruction sequence includes: Execute the first instruction sequence and obtain an execution result from the running environment of the target function.

6. A data processing device, characterized in that: The device comprises: An acquisition module, configured to acquire a first code of a target application input during the running of the target application; a processing module configured to generate a first instruction sequence through a hot update operation based on the first code, input historical data, and a preset function template, execute the first instruction sequence through a virtual machine, and return the execution result to a user through an interactive interface; the historical data includes second codes that are logically associated with the first code and that were input multiple times within a historical time period, and the generated second instruction sequence, and the first code and the second code are used to check or modify an application state; Wherein, the processing module includes: an extraction submodule, configured to extract a first statement of a first specified type from the first code, and to extract a second statement of a second specified type from the second instruction sequence and the second code; a determination submodule, configured to determine a target variable according to the first code; A generation submodule is used to generate the first instruction sequence through the hot update operation according to the first statement, the second statement, the target variable and the preset function template.

7. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method according to any one of claims 1 to 5 are implemented.

8. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 5.