Data processing methods, devices, equipment and media

By receiving and decoding the hash value of the compiled data during the hot reloading process of the mini program, and restoring the configuration file, the performance degradation and loading failure caused by the large amount of data during the hot reloading of the mini program are solved, and fast display is achieved.

CN122086483APending Publication Date: 2026-05-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-11-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

During the hot reloading process of a mini-program, loading large amounts of data can lead to a decrease in computing performance or even loading failure due to the large data volume, making it impossible to display the content after hot reloading in a timely manner.

Method used

By receiving the compiled data hash value of the first data block, its target storage address in the storage space is determined, the encoding sequence is obtained and binary exponentiation decoding is performed to recover the compiled data hash value of each data block, and the complete configuration file is obtained by splicing them together to complete hot loading.

Benefits of technology

This reduces the amount of data transferred during hot reloading, improves loading efficiency, ensures timely display of content after hot reloading, and avoids loading failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086483A_ABST
    Figure CN122086483A_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, apparatus, device, and medium. The method includes: when the compilation data of an application program changes, receiving only the first compilation data hash value of the first first data block in the first configuration file where the changed compilation data is located; using the first compilation data hash value to find the encoding sequence based on binary power encoding stored in the storage space for restoring each second data block; restoring the second compilation data hash value corresponding to each second data block; and finally concatenating the first compilation data corresponding to the first compilation data hash value and the second compilation data corresponding to each second compilation data hash value to restore the first configuration file. This achieves fast hot loading, reduces the amount of data transmission during hot loading, improves the loading efficiency of hot loading, and ensures the timeliness of displaying the content after hot loading, avoiding loading failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a data processing method, apparatus, device, and medium. Background Technology

[0002] In recent years, with the rapid development of Internet technology, mini-programs have become increasingly widely used in various scenarios due to their ability to be used without installation.

[0003] In related technologies, in order for mini-programs to be displayed normally on electronic devices, display tests are usually required. To avoid modifying the program data of the mini-program during the running phase, which would require restarting the mini-program, hot reloading has emerged. Hot reloading means that modules can be dynamically loaded and unloaded during the running of the mini-program, so that the program can update modules without restarting.

[0004] However, when related technologies perform hot reloading of the interface content, they can usually only load display styles and layouts that contain a small amount of data. When loading modules containing a large amount of data, the large amount of data to be transmitted can lead to a decrease in computing performance or even loading failure. For example, when loading a chat interface containing a large amount of communication content, the large amount of data can cause the hot reloading process to take a long time, making it impossible to display the hot-reloaded content in a timely manner, or even causing loading failure. Therefore, there is an urgent need to provide a data processing method to solve the above problems. Summary of the Invention

[0005] This application provides a data processing method, apparatus, device, and medium that can transmit only the hash value of the first compiled data corresponding to the first data block in the first configuration file when the first configuration file corresponding to the compiled data changes during hot loading of an application. This avoids transmitting all the compiled data in the first configuration file, reduces the amount of data transmitted, improves the loading efficiency of hot loading, and ensures the timeliness of displaying the content after hot loading, thus avoiding loading failure.

[0006] To address the aforementioned technical problems, the embodiments of this application provide the following technical solutions:

[0007] A data processing method, comprising:

[0008] Receive the first compilation data hash value corresponding to the first data block, where the first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur.

[0009] Determine the target storage address in the storage space corresponding to the hash value of the first compiled data;

[0010] Obtain the encoding sequence from the target storage address. The encoding sequence is obtained by performing binary exponentiation encoding on the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in the multiple data blocks divided from the first configuration file.

[0011] The encoded sequence is subjected to binary exponentiation decoding to obtain the hash difference sequence;

[0012] Based on the first compiled data hash value and the hash difference sequence, the second compiled data hash value corresponding to each second data block is restored, where the second data block is any other data block besides the first data block among the multiple data blocks;

[0013] The first compilation data corresponding to the hash value of the first compilation data and the second compilation data of each hash value of the second compilation data are concatenated to obtain the first configuration file, so as to complete hot loading.

[0014] A data processing method, comprising:

[0015] When a change in the compilation data of the compiled application is detected, the first configuration file containing the changed compilation data is determined from multiple configuration files corresponding to the compiled application.

[0016] The first configuration file is divided into multiple data blocks;

[0017] Obtain the compiled data hash value of the compiled data in each data block;

[0018] Determine the hash difference sequence between the compiled data hash values ​​of adjacent data blocks in multiple data blocks, and perform binary exponentiation encoding on each hash difference sequence to obtain an encoding sequence;

[0019] Determine the target storage address in the storage space where the first compiled data hash value of the first data block is mapped to the first data block among multiple data blocks;

[0020] The encoding sequence is stored in the target storage address, and the first compilation data hash value is sent to at least one simulator, so that the simulator that receives the first compilation data hash value can restore the first configuration file for hot reloading based on the first compilation data hash value and the stored encoding sequence.

[0021] A data processing apparatus, comprising:

[0022] The first receiving unit is used to receive the first compilation data hash value corresponding to the first data block, wherein the first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur.

[0023] The first determining unit is used to determine the target storage address corresponding to the hash value of the first compiled data in the storage space;

[0024] The first acquisition unit is used to acquire an encoding sequence from the target storage address. The encoding sequence is an encoding sequence obtained by performing binary exponentiation encoding on the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in the multiple data blocks divided from the first configuration file.

[0025] The decoding unit is used to perform binary exponentiation decoding on the encoded sequence to decode the hash difference sequence;

[0026] The restoration unit is used to restore the second compilation data hash value corresponding to each second data block based on the first compilation data hash value and the hash difference sequence, wherein the second data block is the other data block among the multiple data blocks besides the first data block;

[0027] The splicing unit is used to splice the first compilation data corresponding to the first compilation data hash value and the second compilation data of each second compilation data hash value to obtain the first configuration file, so as to complete hot loading.

[0028] In some embodiments, the restoration unit includes:

[0029] The first acquisition subunit is used to acquire the sorting number of each hash difference in the hash difference sequence;

[0030] The first determining subunit is used to determine the hash difference with the smallest sorting number in the uncalculated hash difference sequence as the target hash difference, according to the sorting number in ascending order;

[0031] The first calculation subunit is used to calculate the sum of the difference between the first compiled data hash value and the target hash value, and to determine the sum as the compiled data hash value of the next second data block of the current data block;

[0032] The second determining subunit is used to determine the compiled data hash value of the second data block as the first compiled data hash value when there are uncalculated hash differences in the hash difference sequence, and return to execute the step of determining the hash difference with the smallest sorting number in the uncalculated hash difference sequence as the target hash difference value in ascending order of sorting number, until each hash difference is calculated and the second compiled data hash value corresponding to each second data block is obtained.

[0033] In some embodiments, the decoding unit includes:

[0034] The second acquisition subunit is used to acquire the number of bits for each binary exponentiation code in the encoding sequence;

[0035] A subunit is constructed to construct a number of binary power polynomials to be added, with the same number of terms as the number of encoding bits for each binary power encoding.

[0036] Adding subunits is used to sequentially add the power in each of the binary power codes to the corresponding power term in the corresponding binary power polynomial to be added, thereby obtaining the binary power polynomial corresponding to each of the binary power codes;

[0037] The second calculation subunit is used to calculate the operation result of the binary power polynomial corresponding to each binary power code, determine the operation result as the hash difference, and obtain the hash difference sequence.

[0038] In some embodiments, the first receiving unit is configured to:

[0039] The first receiving subunit is used to receive the binary data to be verified from the first data block;

[0040] The first operation subunit is used to perform a modulo-2 division operation on the binary data to be verified and the binary representation of a preset polynomial to obtain the binary operation remainder;

[0041] The third acquisition subunit is used to acquire the binary representation of the first compiled data hash value corresponding to the first data block from the binary data to be verified when the operation remainder is zero.

[0042] The first conversion subunit is used to convert the binary representation of the first compiled data hash value to obtain the first compiled data hash value corresponding to the first data block.

[0043] In some embodiments, the data processing method is applied to a simulator, which runs a compiled application and displays the application's interface. The splicing unit includes:

[0044] The first sending subunit is configured to send the first configuration file to a virtual machine running on the server, so that the virtual machine performs calculations based on the first configuration file and returns the calculation results;

[0045] The first receiving subunit is used to receive the calculation result and obtain the simulation device configuration of the current simulator;

[0046] The display subunit is used to display and render the simulation device configuration and the calculation results on the application interface.

[0047] In some embodiments, the splicing unit further includes:

[0048] The third determining subunit is used to determine the target event corresponding to the control operation in response to the control operation of the application interface;

[0049] The fourth determining subunit is used to determine the second configuration file corresponding to the target event based on a preset mapping relationship between events and configuration files;

[0050] The second sending subunit is used to send a second configuration file retrieval request to the virtual machine, so that the virtual machine can search for the second configuration file from all the configuration files of the application stored in virtual memory and return the second configuration file;

[0051] A loading subunit is used to receive and load the second configuration file in response to the target event.

[0052] A data processing apparatus, comprising:

[0053] The second determining unit is used to determine the first configuration file where the data change of the compilation data is located from multiple configuration files corresponding to the compilation application when a data change of the compilation data of the compilation application is detected.

[0054] A partitioning unit is used to partition the first configuration file into multiple data blocks;

[0055] The second acquisition unit is used to acquire the compilation data hash value of the compilation data in each data block;

[0056] An encoding unit is used to determine the hash difference sequence between the compiled data hash values ​​of adjacent data blocks in multiple data blocks, and to perform binary exponentiation encoding on each hash difference in the hash difference sequence to obtain an encoding sequence;

[0057] The third determining unit is used to determine the target storage address in the storage space where the first compiled data hash value of the first data block is mapped to the storage space, and the first data block is the first data block among multiple data blocks;

[0058] The sending unit is configured to store the encoding sequence in the target storage address and send the first compilation data hash value to at least one simulator, so that the simulator receiving the first compilation data hash value can restore the first configuration file for hot loading based on the first compilation data hash value and the stored encoding sequence.

[0059] In some embodiments, the encoding unit includes:

[0060] A recording subunit is used to convert each hash difference in the hash difference sequence into a binary power polynomial, and record the power of each power term in descending order to obtain the binary power code of each hash difference;

[0061] The replacement subunit is used to replace each hash difference in the hash difference sequence with the corresponding binary exponentiation code to obtain the encoding sequence.

[0062] In some embodiments, the third determining unit includes:

[0063] The fourth acquisition subunit is used to acquire the preset number of storage addresses in the storage space;

[0064] The fifth determining subunit is used to obtain the difference between the preset number of storage addresses and one, and to determine the binary representation of the difference;

[0065] The second conversion subunit is used to convert the first compiled data hash value of the first data block into a binary representation;

[0066] The second operation subunit is used to perform a bitwise AND operation on the binary representation of the first compiled data hash value and the binary representation of the difference to obtain the binary representation of the target storage address corresponding to the encoded sequence;

[0067] The third conversion subunit is used to convert the binary representation of the target storage address into the target storage address.

[0068] In some embodiments, the transmitting unit includes:

[0069] The fourth conversion subunit is used to obtain a preset polynomial and convert the preset polynomial into a binary representation;

[0070] The sixth determining subunit is used to determine the difference between the number of bits in the binary representation of the preset polynomial and one, and to obtain the number of padded bits;

[0071] The padding subunit is used to pad the binary representation of the first compiled data hash value with zeros according to the padding amount, so as to obtain the padded binary representation;

[0072] The third operation subunit is used to perform a modulo-2 division operation on the padded binary representation and the binary representation of the preset polynomial to obtain the binary operation remainder;

[0073] The splicing subunit is used to splice the binary representation of the hash value of the first compiled data with the remainder of the operation to obtain the binary data to be verified of the first data block;

[0074] The third sending subunit is used to send the binary data to be verified to a simulator running at least one simulator.

[0075] In some embodiments, the second determining unit includes:

[0076] The seventh determining subunit is used to determine the first target hash value of each configuration file corresponding to the compiled application when a data change is detected in the compilation data of the compiled application;

[0077] The fifth acquisition subunit is used to acquire the second target hash value of each configuration file before the data change;

[0078] A comparison subunit is used to compare the first target hash value of each configuration file with the corresponding second target hash value;

[0079] The eighth determining subunit is used to determine the configuration file in each configuration file whose first target hash value is different from the corresponding second target hash value as the first configuration file where the compiled data that has undergone data change is located.

[0080] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data processing method described above.

[0081] A computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to perform the data processing method described above.

[0082] A computer program product or computer program includes computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium and executes the computer instructions to implement the data processing method described above.

[0083] This application embodiment receives a first compiled data hash value corresponding to a first data block, where the first data block is the first data block among multiple data blocks divided according to a first configuration file, and the first configuration file is the configuration file where the compiled data of the compiled application is located when data changes occur; determines the target storage address in the storage space corresponding to the first compiled data hash value; obtains an encoding sequence from the target storage address, where the encoding sequence is an encoding sequence obtained by binary exponentiation encoding the hash difference sequence between the compiled data hash values ​​corresponding to adjacent data blocks among the multiple data blocks divided from the first configuration file; performs binary exponentiation decoding on the encoding sequence to decode the hash difference sequence; restores the second compiled data hash value corresponding to each second data block based on the first compiled data hash value and the hash difference sequence, where the second data block is the other data block among the multiple data blocks besides the first data block; and concatenates the first compiled data corresponding to the first compiled data hash value and the second compiled data of each second compiled data hash value to obtain the first configuration file, thereby completing hot loading.

[0084] Therefore, when the compilation data of the application changes, only the hash value of the first data block in the first configuration file where the changed compilation data is located is received. The first compilation data hash value is used to find the encoding sequence based on binary power encoding stored in the storage space to restore each second data block. Based on the restored second compilation data hash value corresponding to each second data block, the first compilation data corresponding to the first compilation data hash value and the second compilation data corresponding to each second compilation data hash value are finally concatenated to restore the first configuration file, thereby achieving fast hot loading. Compared with the related technology, which requires loading the configuration file of the entire module of compilation data for hot loading, the embodiments of this application can reduce the amount of data transmission during hot loading, improve the loading efficiency of hot loading, and achieve timely display of the displayed content after hot loading, avoiding loading failure.

[0085] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objectives and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0086] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0087] Figure 1 A system architecture diagram of the data processing method provided in the embodiments of this application.

[0088] Figure 2 This is a schematic diagram of signaling between computer devices, proxy servers, and virtual machines provided in an embodiment of this application.

[0089] Figure 3 This is a flowchart illustrating the data processing method provided in an embodiment of this application.

[0090] Figure 4 This is a schematic diagram of signaling between computer devices, simulators, and virtual machines provided in the embodiments of this application.

[0091] Figure 5 This is a schematic diagram illustrating the signaling between the compiled application, the server, and the simulator provided in an embodiment of this application.

[0092] Figure 6 This is another schematic diagram of the data processing method provided in the embodiments of this application.

[0093] Figure 7 This is a schematic diagram of the signaling between the simulator and the computer device provided in the embodiments of this application.

[0094] Figure 8 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application.

[0095] Figure 9 Another schematic diagram of the data processing apparatus provided in the embodiments of this application.

[0096] Figure 10 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0097] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0098] It should be noted that while some processes described in the specification, claims, and accompanying drawings contain multiple steps that appear in a specific order, it should be clearly understood that these steps may not be performed in the order they appear herein, or may be performed in parallel. The step numbers are merely used to distinguish different steps and do not represent any particular order of execution. Furthermore, descriptions such as "first," "second," or "objective" in this document are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0099] In specific embodiments of this application, data concerning object privacy, such as compilation data, is involved. When the above embodiments of this application are applied to specific products or technologies, permission or consent from the object is required, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, when an embodiment of this application needs to obtain compilation data, separate permission or consent for the compilation data and related data can be obtained through pop-up windows or redirection to a confirmation page. After obtaining separate permission or consent, the necessary related data for enabling the embodiment of this application to function properly can then be obtained.

[0100] Before providing a further detailed description of the embodiments of this disclosure, the terms and concepts used in these embodiments are explained, and they are subject to the following interpretations:

[0101] An emulator is a software tool that can simulate the functions and behaviors of another computing device (such as a game console or mobile phone) or software environment (such as a specific operating system or application runtime environment) on a computer device (such as a laptop or desktop computer). Its purpose is to allow users to run specific software or experience the operation of a specific device on otherwise incompatible devices.

[0102] The working principle of the simulator includes:

[0103] 1. Instruction set emulation: For hardware device emulators, it emulates the instruction set of the target device's Central Processing Unit (CPU).

[0104] For example, an emulator that simulates an old game console analyzes and simulates the CPU instructions of that console. When the game software is run, the emulator translates and executes the machine language instructions in the game software according to the instruction set rules of the target game console, enabling these instructions to run in the simulated environment.

[0105] 2. System Environment Simulation: Taking operating system simulation as an example, the emulator builds a virtual operating system environment, including modules such as virtual memory management, file systems, and device drivers. It handles system calls and resource requests according to the design specifications of the simulated operating system.

[0106] For example, an emulator that simulates the Android operating system will simulate Android's process management mechanism. When running an Android application, it will allocate memory and schedule processes for the application in the manner of the Android system.

[0107] A virtual machine (VM) is a software-implemented computer system that simulates the hardware and software environment of a physical computer, allowing users to run multiple independent operating systems and applications on the same physical hardware device. Simply put, a virtual machine is like one or more "virtual computers" built inside a real computer device.

[0108] The working principle of virtual machines includes:

[0109] 1. Hardware Abstraction Layer Simulation: Virtual machine software creates an abstraction layer on top of the physical computer's hardware. This abstraction layer simulates the functions of hardware devices such as the CPU, memory, hard drive, and network interface. For example, when the operating system in the virtual machine requests the CPU to execute an instruction, the virtual machine software intercepts this request and translates it into an appropriate call to the physical CPU, allowing the physical CPU to execute the instruction as if it were issued by the physical computer's native operating system. Regarding memory, the virtual machine software allocates a portion of physical memory for the virtual machine and manages the mapping between virtual machine memory and physical memory.

[0110] 2. Operating system and application isolation: Each virtual machine can install and run an independent operating system and applications. These operating systems and applications run in the virtual machine environment just like running on a real physical computer, and they are isolated from each other.

[0111] For example, a virus program running in a virtual machine usually does not affect the systems and applications on other virtual machines or physical hosts because the virtual machine provides an independent operating environment, which limits the scope of the program's impact.

[0112] A hash value is a fixed-length numerical value obtained by calculating a hash value from data of arbitrary length (such as file content or strings) using a hash function. A hash function acts like a data mixer, performing complex operations on the input data and outputting a hash value of fixed length. This value can be considered a digital fingerprint of the input data.

[0113] The characteristics of hash values ​​include:

[0114] 1. Fixed-length output: Regardless of the length of the input data, the hash function will generate a hash value of fixed length. For example, the SHA-256 algorithm always generates a hash value of 256 bits. This makes hash values ​​more convenient to store and compare because their length is predictable.

[0115] 2. Uniqueness: For different data, the hash function should generate different hash values ​​as much as possible. Although it is theoretically possible for different data to produce the same hash value (called a hash collision), a good hash function will minimize the probability of this happening.

[0116] For example, in file integrity checks, different file contents should have different hash values, so that by comparing the hash values, it can be quickly determined whether the file has been modified.

[0117] Modulo-2 division is a division operation unique to binary arithmetic. It is mainly used in data communication and encoding fields, such as in algorithms like Cyclic Redundancy Check (CRC), to generate checksums or perform data verification.

[0118] The operation rules include: 1. Carrying and borrowing are not considered. Modulo-2 division does not involve the concepts of carry and borrowing in conventional arithmetic operations. The operation only focuses on whether the digits in corresponding positions are the same.

[0119] 2. Bit-by-bit comparison and operation: When performing division, align the divisor and dividend bit by bit. Starting from the highest bit of the dividend, if a bit in the dividend is the same as the corresponding bit in the divisor, the corresponding bit in the quotient is 0; otherwise, it is 1.

[0120] For example, suppose the divisor is 101 and the dividend is 110. Starting from the highest bit, the highest bit of the dividend is the same as the highest bit of the divisor, so the highest bit of the quotient is 0.

[0121] In related technologies, before an application (such as a mini-program) is released, a display test is performed. When the application displays abnormally, the problem is resolved by modifying the compilation data of the locally compiled application. After modifying the compilation data, it is usually necessary to transfer the corresponding module and perform hot reloading. Due to limited transmission resources, when transferring a large amount of data, the hot reloading process can take a long time, making it impossible to display the hot-reloaded content in a timely manner, or even causing loading to fail.

[0122] To address the aforementioned problems, this application proposes a data processing method. The method involves receiving a first compiled data hash value corresponding to a first data block, where the first data block is the first data block among multiple data blocks divided according to a first configuration file, and the first configuration file is the configuration file where the compiled data of the compiled application is located; determining the target storage address in the storage space corresponding to the first compiled data hash value; obtaining an encoding sequence from the target storage address, where the encoding sequence is a binary exponentiation encoding obtained by performing binary exponentiation decoding on the hash difference sequence between the compiled data hash values ​​corresponding to adjacent data blocks among the multiple data blocks divided from the first configuration file; decoding the hash difference sequence by performing binary exponentiation decoding on the encoding sequence; restoring a second compiled data hash value corresponding to each second data block based on the first compiled data hash value and the hash difference sequence, where the second data block is any data block other than the first data block among the multiple data blocks; and concatenating the first compiled data corresponding to the first compiled data hash value and the second compiled data of each second compiled data hash value to obtain the first configuration file, thereby completing hot loading.

[0123] Thus, during hot loading, the entire configuration file can be reconstructed by transmitting the hash value of the first data block in the configuration file containing the modified data. This reduces the amount of data transmitted, improves the loading efficiency of hot loading, and enables timely display of the content after hot loading, avoiding loading failures. Please refer to the following specific embodiments for the detailed implementation process.

[0124] Please see Figure 1 , Figure 1 This is a system architecture diagram of the data processing method provided in the embodiments of this application. It includes a computer device 110, an emulator 120 running on the computer device 110, a virtual machine 130 running on a server, and the Internet 140, etc.

[0125] Computer device 110 includes, but is not limited to, tablet computers, desktop computers, laptop computers, all-in-one computers, etc. Furthermore, it can be a single device or a collection of multiple devices.

[0126] Emulator 120 runs on computer device 110 to simulate the hardware and software environment of devices such as Android or iOS. Various emulators can be selected for compatibility. QuickEmulator (QEMU) can be used as the underlying virtualization technology to simulate ARM or x86 architecture CPUs, GPUs, memory, storage, and other hardware devices. A disk image file with pre-installed applications and other system files is included. A virtual device configuration file describing the simulated device configuration, including screen size, resolution, memory size, storage space, and system version, is provided on the local integrated development environment (IDE).

[0127] For the display testing phase of the application, multiple simulators 120 with different simulation device configurations can be run on the computer device 110. When the compilation data is changed, the display effect of the corresponding simulation device configuration can be displayed on different simulators 120 through hot reloading.

[0128] Virtual machine 130 runs on the server. Its virtual memory stores all application configuration files to provide runtime resources for the application, allowing it to utilize the server's resources to run. When developers need real-time previews for display testing, they interact with each locally running emulator using the virtual machine, handling tasks such as page rendering, file transfer, network connectivity, and audio / video output. Throughout the architecture, there is interaction between the virtual machine and the emulator. The hardware environment simulated by QEMU can be viewed as an extension of the resources provided by the virtual machine within the emulator.

[0129] For example, the virtual machine provides the emulator with certain computing resources (such as CPU time and memory space), and QEMU utilizes these resources effectively by simulating hardware within the emulator. When an application in the emulator requires more CPU resources to run, QEMU requests more resource allocation through interaction mechanisms with the virtual machine (such as shared memory and inter-process communication) to ensure that the application in the emulator can run smoothly.

[0130] Specifically, such as Figure 2 As shown, Figure 2This illustration illustrates the signaling between a computer device, a proxy server, and a virtual machine in an embodiment of this application. The virtual machine can be run as follows: A proxy server (e.g., Ubuntu) is provided. The proxy server downloads or creates a virtual device image file suitable for QEMU. The image file contains a pre-installed operating system (e.g., Android or iOS) and other system files. The image file can be downloaded from the internet or a custom image file can be created using an IDE tool. The hardware and software characteristics of the virtual device are configured using QEMU command-line parameters or configuration files. Different development teams have different environmental and feature requirements; therefore, a command-line configuration method is provided, including the simulated device model, CPU model, number of CPU cores, memory size, network connection, output type, etc. During the virtual device's operation, the QEMU monitor or other IDE management tools are used to operate the virtual device, such as changing device configuration or restarting the device. A simulated device configuration file is provided on the computer device to facilitate developers in selecting and switching the device environment to be adapted.

[0131] Internet 140 serves as a communication bridge between emulator 120 and virtual machine 130. Internet 140 is used to forward communication data between emulator 120 and virtual machine 130 in order to achieve the purpose of exchanging data between emulator 120 and virtual machine 130.

[0132] In this embodiment, the description will be from the perspective of a data processing device, which can be integrated into a computer device that has a storage unit and is equipped with a microprocessor and has computing capabilities.

[0133] Please see Figure 3 , Figure 3 A flowchart illustrating the data processing method provided in this application embodiment. This data processing method is applied to an emulator running on a computer device and includes:

[0134] In step 201, the first compilation data hash value corresponding to the first data block is received. The first data block is the first data block among multiple data blocks divided according to the first configuration file. The first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur.

[0135] The first data block is the first of several data blocks divided according to the first configuration file. A complete compiled application's configuration file that has undergone data changes is divided into multiple relatively independent data blocks, and the first data block to be divided is the first data block. The first compiled data hash value is a fixed-length value calculated using a hash function (such as an MD5 hash function) on the compiled data in the first data block. This first compiled data hash value can represent the characteristics of the compiled data within the first data block to a certain extent. The first configuration file is the configuration file containing the compiled data that has undergone data changes in the compiled application. The configuration file contains various settings, parameters, and other information required for the compiled application to run. When the compiled data of the application changes, the configuration file containing the changed compiled data is used for processing.

[0136] Specifically, a detection plugin is installed locally on the computer device (e.g., the Live Server plugin is installed in the code compiler Visual Studio Code). Hot reloading uses this installed detection plugin to detect whether the compilation data of the application has changed. When a change in compilation data is detected, the hash value of the first data block in the first configuration file containing the changed compilation data is sent to the simulator, so that the simulator receives the hash value of the first compilation data corresponding to the first data block from the local computer device.

[0137] In some implementations, receiving the first compiled data hash value corresponding to the first data block includes:

[0138] (1) Receive the binary data to be verified in the first data block;

[0139] (2) Perform a modulo-2 division operation on the binary data to be verified and the binary representation of the preset polynomial to obtain the binary remainder;

[0140] (3) When the remainder of the operation is zero, obtain the binary representation of the first compiled data hash value corresponding to the first data block from the binary data to be verified;

[0141] (4) Convert the binary representation of the first compiled data hash value to obtain the first compiled data hash value corresponding to the first data block.

[0142] To prevent the simulator from receiving an incorrect hash value of the first compiled data of the first data block due to transmission errors, the binary data to be verified of the first data block can be transmitted during transmission. The binary data to be verified includes the binary representation of the hash value of the first compiled data of the first data block, and a binary checksum.

[0143] For example, the binary data to be verified is "10110011010", and the binary representation of the compiled data hash value is "1011001" among them, and the remaining part is the binary check code "1010".

[0144] Specifically, the preset polynomial is the polynomial corresponding to the preset verification method selected in the embodiments of the present application. For example, when the preset verification method is crc-4, the corresponding polynomial is "x 4 +x+1", and when the preset verification method is crc-8, the corresponding polynomial is "x 8 +x 2 +x+1". The binary representation corresponding to the polynomial is the coefficient of each power term. The crc verification method is to perform modulo-two division operation on the binary data carrying the binary check code and the binary representation corresponding to the polynomial. If the obtained operation remainder is 0, it means that the data transmission is correct, and the binary representation of the first compiled data hash value is obtained from the binary data to be verified and converted to obtain the first compiled data hash value; if the obtained operation remainder is not 0, it means that there is an abnormality in the data transmission, and the data received by the simulator is not the data transmitted by the computer device, so the simulator can send a resend request to the computer device to request the computer device to resend.

[0145] To better illustrate the embodiments of the present application, a verification process is taken as an example for illustration. The binary data to be verified is "10110011010", and the preset polynomial is "x 4 +x 3 +1", then the binary representation corresponding to the preset polynomial is "11001", and the modulo-two division operation of the binary data to be verified and the binary representation corresponding to the preset polynomial is "10110011010丨11001", and the final obtained binary operation remainder is "000000", that is, the obtained operation remainder is "0", which proves that the binary data to be verified has not been interfered during the transmission process to cause data errors, so "1011001" is obtained from "10110011010", that is, the binary representation of the first compiled data hash value, and finally this binary representation is converted to decimal, and the first compiled data hash value corresponding to the first data block is "89".

[0146] In this way, when transmitting the data related to the first data block, not only the binary representation of the first compiled data hash value is transmitted, but also the binary check code is attached, and the verification method is adopted to use the preset polynomial and the binary data to be verified to perform modulo-two division operation to verify the accuracy of the data transmission. This verification mechanism can effectively detect whether the data has errors due to various abnormal situations (such as network interference, hardware failures, etc.) during the transmission process, so as to discover problems in time.

[0147] In step 202, the target storage address in the storage space corresponding to the hash value of the first compiled data is determined.

[0148] The computer device simulator encodes the difference between the compiled data hash values ​​of adjacent data blocks divided by the first configuration file using binary exponentiation, and stores the encoded sequence in the storage space. Since the simulator needs to retrieve the encoded sequence from the storage space later, it needs to determine the target storage address of the encoded sequence in the storage space based on the first compiled data hash value that both the computer device and the simulator can know.

[0149] Specifically, before the computer device transmits the first compiled data hash value, the computer device stores the encoded sequence in the target storage address corresponding to the first compiled data hash value in the storage space. This is so that when the simulator receives the first compiled data hash value later, it can determine the target storage address in the same way, and then obtain the encoded sequence from the target storage address.

[0150] In step 203, an encoding sequence is obtained from the target storage address. The encoding sequence is obtained by binary exponentiation encoding the hash difference sequence between the hash values ​​of the compiled data corresponding to the adjacent data blocks in the multiple data blocks divided from the first configuration file.

[0151] In step 202, after the target storage address is determined, the encoded sequence stored in advance by the computer device is retrieved from the target storage address.

[0152] For example, if the storage space includes 16 storage addresses and the target storage address is 10, then the encoded sequence is retrieved from the storage address numbered 10 in the storage space.

[0153] Specifically, for the multiple data blocks divided in the first configuration file, each data block has its corresponding compiled data hash value. The hash value is a fixed-length numerical value obtained by calculating the data using a hash function. These data blocks are numbered 1, 2, 3, etc., so the difference between the compiled data hash values ​​of adjacent data blocks (such as data block 1 and data block 2, data block 2 and data block 3, etc.) constitutes the hash difference sequence.

[0154] For example, if the hash value of data block 1 is "H1" and the hash value of data block 2 is "H2", then the hash difference between data block 1 and data block 2 is "H2-H1". By calculating this difference between all adjacent data blocks, a hash difference sequence is formed.

[0155] Hash difference sequences can represent the relationships between data blocks in a relatively compact way. Compared to directly storing or processing the complete compiled hash value of each data block, hash difference sequences can reduce the amount of data and, in some cases, are more convenient for operations such as data recovery or comparison.

[0156] For example, knowing the hash value of the first compiled data of the first data block and this hash difference sequence, the hash value of subsequent data blocks can be deduced by gradually accumulating the differences.

[0157] After obtaining the hash difference sequence, the computer device encodes each hash difference in the hash difference sequence by binary exponentiation, thus obtaining the binary exponentiation encoding sequence, which is then stored in the target storage address of the storage space.

[0158] In step 204, the encoded sequence is subjected to binary exponentiation decoding to decode the hash difference sequence.

[0159] Since the encoded sequence is a sequence obtained by computer equipment encoding the hash difference sequence by binary exponentiation, after the simulator obtains the encoded sequence, it needs to decode the encoded sequence according to the corresponding binary exponentiation decoding method in order to decode the original hash difference sequence.

[0160] In some implementations, performing binary exponentiation decoding on the encoded sequence to decode the hash difference sequence includes:

[0161] (1) Obtain the number of bits for each binary exponentiation code in the encoded sequence;

[0162] (2) Construct a binary power polynomial to be added with the same number of terms as the number of encoding bits for each binary power code;

[0163] (3) Add the power in each binary power code to the corresponding power term in the corresponding binary power polynomial to be added in order to obtain the binary power polynomial corresponding to each binary power code;

[0164] (4) Calculate the operation result of the binary power polynomial corresponding to each binary power code, determine the operation result as the hash difference, and obtain the hash difference sequence.

[0165] In each encoded sequence, each binary exponentiation code consists of at least one digit.

[0166] For example, a specific encoding sequence in the form of "[321,432,43,52,xxx]" is used, where different codes are separated by "," and the binary power code "321" has 3 bits, the binary power code "432" has 3 bits, the binary power code "43" has 2 bits, the binary power code "52" has 2 bits, and so on.

[0167] Specifically, for each binary power code with a specified number of bits, a corresponding binary power polynomial to be added is constructed. Assuming the number of bits in a binary power code is n, a binary power polynomial with n terms to be added is constructed, in the form "2 a +2 b +…+2 c +2 d ", thus constructing a system composed of 2 a Up to 2 d There are a total of n power terms. Following the above method, based on the number of bits in the binary power encoding, construct the corresponding binary power polynomial to be added, and record it to prepare for the next step.

[0168] Based on the power in each binary code, different powers are added to the corresponding power terms in the corresponding binary power polynomial to be added, thereby obtaining the binary power polynomial corresponding to each binary power code.

[0169] For example, the binary exponentiation code "4310" corresponds to a binary exponentiation polynomial with 4 terms, "2". a +2 b +2 c +2 d The term corresponding to 4 is 2. a The term corresponding to 3 is "2". b The term corresponding to 1 is "2". c The term corresponding to the power of 0 is 2. d "Then, 4 is taken as the power term as "2 a The power of "" is 2. 4 Then, 3 is taken as the power term as "2". b The power of "" is 2. 3 Then, taking 1 as the power term becomes "2". c The power of "" is 2. 1 ", then 0 is the power term "2" d The power of "" is 2. 0 Thus, the binary exponentiation polynomial "2" corresponding to the binary exponentiation code "4310" is obtained. 4 +2 3 +2 1 +2 0, and so on, to obtain the binary power polynomial corresponding to each binary power code.

[0170] Specifically, the binary power polynomial corresponding to each binary power code is obtained. The result of the operation of each binary power polynomial is calculated and determined as the hash difference, thus obtaining the hash difference sequence.

[0171] For example, the encoded sequence is "[321,432,43,52]", and the binary exponentiation code "321" corresponds to the binary exponentiation polynomial "2". 3 +2 2 +2 1 The result of the operation is "11", and the binary exponentiation code "432" corresponds to the binary exponentiation polynomial "2". 4 +2 3 +2 2 The result of the operation is "28", and the binary exponentiation code "43" corresponds to the binary exponentiation polynomial "2". 4 +2 3 The result of the operation is "24", and the binary exponentiation code "52" corresponds to the binary exponentiation polynomial "2". 5 +2 2 The result of the operation is "36", thus obtaining each hash difference, and then obtaining the hash difference sequence "[11,28,24,36]".

[0172] In this way, the differences between data blocks are encoded into a shorter and more compact form through binary exponentiation, effectively reducing the amount of data during data storage and transmission. This allows the decoding stage to quickly and accurately restore this compact encoding to the original hash difference sequence, enabling efficient processing with a smaller data volume throughout the encoding-transmission-decoding process, and rapid restoration when the hash difference sequence is needed, thus improving the efficiency of the entire data processing chain.

[0173] In step 205, based on the first compiled data hash value and the hash difference sequence, the second compiled data hash value corresponding to each second data block is restored. The second data block is the other data block among the multiple data blocks besides the first data block.

[0174] In this process, after obtaining the hash difference sequence formed by the hash difference between the compiled data of adjacent data blocks, the second compiled data hash value corresponding to each second data block other than the first data block can be restored by combining the first compiled data hash value of the first data block.

[0175] In some implementations, the step of reconstructing the second compiled data hash value corresponding to each second data block based on the first compiled data hash value and the hash difference sequence includes:

[0176] (1) Obtain the sorting number of each hash difference in the hash difference sequence;

[0177] (2) According to the sorting number from small to large, the hash difference with the smallest sorting number in the uncalculated hash difference sequence is determined as the target hash difference;

[0178] (3) Calculate the sum of the difference between the first compiled data hash value and the target hash value, and determine the sum as the compiled data hash value of the next second data block of the current data block;

[0179] (4) When there are uncalculated hash differences in the hash difference sequence, the compiled data hash value of the second data block is determined as the first compiled data hash value, and the step of determining the hash difference with the smallest sorting number in the uncalculated hash difference sequence as the target hash difference value is returned to be executed in ascending order of sorting number, until each hash difference is calculated and the second compiled data hash value corresponding to each second data block is obtained.

[0180] The process begins by reading each hash difference element from the beginning of the hash difference sequence. For each read hash difference, a sorting number is assigned. This sorting number can be determined simply by the element's position in the sequence; for example, the first hash difference has a sorting number of 1, the second hash difference has a sorting number of 2, and so on. Each hash difference and its corresponding sorting number are recorded. This correspondence can be stored using a dictionary or a similar data structure, allowing subsequent steps to easily retrieve the corresponding hash difference based on the sorting number.

[0181] Specifically, a marker array or set can be initialized to mark which hash differences have been calculated; initially, all hash differences are marked as uncalculated. The hash difference sequence is traversed, checking the marker status for each hash difference. Those hash differences marked as uncalculated are found. From these uncalculated hash differences, the hash difference with the smallest sorting number is found based on the previously assigned sorting number. This uncalculated hash difference with the smallest sorting number is designated as the target hash difference. Simultaneously, the marker status of this target hash difference in the marker array or set is updated to "calculated," so that subsequent steps can accurately determine which hash differences have not yet been calculated.

[0182] Perform an addition operation on the difference between the first compiled data hash value and the currently determined target hash value. The sum of the addition is used as the compiled data hash value for the next second data block of the current data block. This newly determined hash value will be used in subsequent steps to further reconstruct the compiled data hash values ​​of other second data blocks and can be stored for later querying and use. The current data block is the data block corresponding to the first compiled data hash value used in the current loop for addition with the target hash value.

[0183] For example, given the hash difference sequence "[3,5,3,2]", each hash difference is assigned a sorting number from left to right. The first hash difference "3" has a sorting number of 1, the hash difference "5" has a sorting number of 2, the second hash difference "3" has a sorting number of 3, and the hash difference "2" has a sorting number of 4. The first compiled data hash value is 10. When the hash difference 3 with sorting number 1 is selected as the target hash difference, 10 + 3 = 13 is calculated, and 13 is determined as the compiled data hash value for the next second data block. If the repeated hash difference 3 with sorting number 3 is selected as the target hash difference again, and the compiled data hash value of the second data block obtained in the previous round (i.e., the new first compiled data hash value) is 13, then 13 + 3 = 16 is calculated again, and 16 becomes the compiled data hash value for the next second data block. Through iterative processing, the second compiled data hash value corresponding to each second data block is calculated completely.

[0184] Thus, by starting from the beginning of the hash difference sequence and processing each hash difference in ascending order of its sorting index, a clear and fixed processing flow is established. This sequential processing method ensures that each hash difference is accurately used to calculate the compiled data hash value of the corresponding second data block at the appropriate time, avoiding erroneous calculations that may be caused by disordered processing order, thereby guaranteeing the accuracy of data restoration.

[0185] In step 206, the first compilation data corresponding to the first compilation data hash value and the second compilation data of each second compilation data hash value are concatenated to obtain the first configuration file, thereby completing hot loading.

[0186] In this process, when the computer device calculates the hash value of the compiled data in each data block, it establishes a mapping relationship between the compiled data of each data block and the corresponding compiled data hash value. Therefore, after the simulator knows the compiled data hash value corresponding to each data block, it can determine the compiled data corresponding to each compiled data hash value through the preset mapping relationship between the compiled data and the compiled data hash value established in advance by the computer device. In this way, the compiled data of each data block can be obtained. By concatenating the compiled data of each data block, the original first configuration file can be restored to complete the hot reloading.

[0187] In some implementations, such as Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the signaling between a computer device, an emulator, and a virtual machine provided in an embodiment of this application. The data processing method is applied to the emulator, which runs a compiled application and displays the application interface of the compiled application. The hot-loading process is as follows:

[0188] (1) Send the first configuration file to the virtual machine running on the server so that the virtual machine performs calculations according to the first configuration file and returns the calculation results;

[0189] (2) Receive the calculation results and obtain the simulation device configuration of the current simulator;

[0190] (3) The simulation device configuration and the calculation results are displayed and rendered on the application interface.

[0191] The emulator is pre-configured with the server's IP address and port number to establish a connection between the emulator and the virtual machine running on the server. After the emulator recreates the first configuration file that needs to be hot-loaded, it forwards the first configuration file to the virtual machine on the server. Upon receiving the first configuration file from the emulator, the virtual machine processes the configuration file according to its own computing capabilities and predefined computational logic. This may include parsing the contents of the configuration file, extracting relevant parameters and settings, and then performing various computational operations based on this information. After completing the relevant calculations, the virtual machine packages the calculation results according to the format agreed upon when establishing communication with the emulator, and then returns the calculation results to the emulator via a network connection.

[0192] Specifically, when the emulator receives the calculation results returned by the virtual machine, it performs a comprehensive analysis of the received results and the acquired simulation device configuration. Based on the analysis, the emulator initiates the display rendering process. It utilizes its built-in graphics rendering engine (such as OpenGL, DirectX, and related technologies) to transform the application interface information in the calculation results into images that can be displayed on the screen according to the requirements of the simulation device configuration. For the appearance of interface elements (such as colors and styles), it draws them according to the relevant settings in the calculation results. Simultaneously, for dynamic effects involved in the application (such as animations and interactive effects), it renders and displays them in real time based on the corresponding instructions in the calculation results and the performance support provided by the simulation device configuration, thus presenting the expected effects on the application interface.

[0193] For example, if a computer device changes the shape of a control in a compiled application, the first configuration file contains the relevant compilation data for that control's shape. The virtual machine calculates the display vertex coordinates of the control based on the shape, returns the coordinates to the simulator, and each simulator determines the display position of the control at different resolutions by combining the coordinates with its own different resolution.

[0194] Therefore, by sending the first configuration file to a virtual machine running on the server for computation, the server's computing power can be effectively utilized. Servers typically possess advantages in resources such as higher processing performance and larger memory, enabling them to complete complex computational tasks more quickly and efficiently compared to the emulator's own computing power. For example, when processing complex configuration file calculations for large applications, the server can complete the relevant calculations in a short time, reducing the computational burden on the emulator and allowing it to focus more on local operations such as display rendering. This ensures that when compiled data changes, the corresponding changes are displayed in the emulator in a timely manner, thereby improving the overall system efficiency.

[0195] In some implementations, please refer to Figure 5 , Figure 5 This is a schematic diagram illustrating the signaling between the compiled application, the server, and the emulator provided in an embodiment of this application. The method further includes:

[0196] (1) In response to a control operation on the application interface, determine the target event corresponding to the control operation;

[0197] (2) Based on the preset mapping relationship between events and configuration files, determine the second configuration file corresponding to the target event;

[0198] (3) Send a second configuration file retrieval request to the virtual machine so that the virtual machine can search for the second configuration file from all the configuration files of the application stored in virtual memory and return the second configuration file;

[0199] (4) Receive and load the second configuration file in response to the target event.

[0200] Each configuration file for the compiled application is sent to the server beforehand, allowing the server to distribute each configuration file to the virtual memory within the virtual machine. Each configuration file can be a file with a bin structure. When the emulator implements a certain event, it retrieves the corresponding configuration file from the virtual memory of the virtual machine to load the configuration file and render the specific display effect.

[0201] During the compilation and execution of the application within the emulator, a corresponding input detection mechanism is needed to continuously detect various control operations performed by the user on the application interface. These control operations can be implemented through various input devices, such as mouse clicks and movements, keyboard key presses and releases, or touch gestures on a touchscreen (such as clicks, swipes, and zooms). The application has a dedicated input processing module to capture these operation events and pass them to subsequent processing flows. Once a control operation is captured, it needs to be parsed to determine its specific meaning or intent. This typically involves judging according to the application's predefined operation semantic rules. For example, in a graphics editing application, left-clicking a graphic element might be defined as selecting that element, while right-clicking and dragging might be defined as resizing that element. By matching the captured actual operations with these predefined rules, the intent behind each control operation can be clarified, thus revealing the target event that the developer intended to achieve with this control operation.

[0202] Specifically, each event involves loading at least one configuration file. Therefore, to achieve the target event, a dedicated request message for retrieving the second configuration file needs to be constructed. This request message needs to contain necessary information, such as the name of the requested configuration file (i.e., the name of the second configuration file), application identification information (used to allow the virtual machine to determine which application's configuration file it is), etc., so that the virtual machine can accurately identify and process the request. After receiving the second configuration file retrieval request from the emulator, the virtual machine will search for all configuration files of the application stored in its virtual memory based on the information provided in the request. It will traverse the storage area, finding the second configuration file that matches the request by comparing filenames, etc. Once found, it will package the second configuration file according to the format agreed upon when establishing communication with the emulator, and then return it to the emulator via a network connection.

[0203] Once the emulator successfully receives and verifies the integrity of the second configuration file, it begins the loading process. The specific loading method depends on the application's configuration file processing mechanism. Generally, the configuration file's contents are first parsed to extract various parameters, settings, and other information. Then, relevant parts of the application are adjusted or updated based on this information. For example, if the second configuration file concerns the application's UI layout, the position and size of UI elements will be readjusted according to the parameters in the file during the loading process. If it's a configuration file concerning enabling or disabling functional modules, the corresponding functional modules will be enabled or disabled according to the settings in the file, thus responding to target events by loading the second configuration file.

[0204] In this way, the virtual machine stores and retrieves all application configuration files and handles configuration file retrieval requests, making full use of the virtual machine's storage and computing resources to efficiently complete operations such as storing, retrieving, and packaging configuration files. This not only reduces the emulator's own resource management burden but also ensures that the entire system maintains stable performance when handling a large number of configuration files and frequent configuration file retrieval requests, improving resource utilization efficiency and the smoothness of system collaboration.

[0205] As described above, this embodiment of the application receives a first compiled data hash value corresponding to a first data block, where the first data block is the first data block among multiple data blocks divided according to a first configuration file, and the first configuration file is the configuration file where the compiled data of the compiled application is located; determines the target storage address in the storage space corresponding to the first compiled data hash value; obtains an encoding sequence from the target storage address, where the encoding sequence is an encoding sequence obtained by binary exponentiation encoding the hash difference sequence between the compiled data hash values ​​corresponding to adjacent data blocks among the multiple data blocks divided by the first configuration file; performs binary exponentiation decoding on the encoding sequence to decode the hash difference sequence; restores the second compiled data hash value corresponding to each second data block based on the first compiled data hash value and the hash difference sequence, where the second data block is the other data block among the multiple data blocks besides the first data block; and concatenates the first compiled data corresponding to the first compiled data hash value and the second compiled data of each second compiled data hash value to obtain the first configuration file, thereby completing hot loading.

[0206] Therefore, when the compilation data of the application changes, only the hash value of the first data block in the first configuration file where the changed compilation data is located is received. The first compilation data hash value is used to find the encoding sequence based on binary power encoding stored in the storage space to restore each second data block. Based on the restored second compilation data hash value corresponding to each second data block, the first compilation data corresponding to the first compilation data hash value and the second compilation data corresponding to each second compilation data hash value are finally concatenated to restore the first configuration file, thereby achieving fast hot loading. Compared with the related technology, which requires loading the configuration file of the entire module of compilation data for hot loading, the embodiments of this application can reduce the amount of data transmission during hot loading, improve the loading efficiency of hot loading, and achieve timely display of the displayed content after hot loading, avoiding loading failure.

[0207] Please see Figure 6 , Figure 6 Another flowchart illustrating the data processing method provided in this application embodiment. This data processing method is applied to a computer device running an emulator to implement the corresponding processing logic of the computer device, including:

[0208] In step 301, when a change in the compilation data of the compiled application is detected, the first configuration file containing the changed compilation data is determined from among the multiple configuration files corresponding to the compiled application.

[0209] Among them, a detection plugin is deployed in the development environment of the computer device's compilation application to detect in real time whether the compilation data corresponding to the compilation application has changed. When a change in the compilation data is detected, the first configuration file containing the compilation data with the data change is determined from multiple configuration files.

[0210] In some implementations, when a change in the compilation data of the compiled application is detected, the first configuration file containing the changed compilation data is determined from multiple configuration files corresponding to the compiled application, including:

[0211] (1) When a change in the compilation data of the compiled application is detected, the first target hash value of each configuration file corresponding to the compiled application is determined;

[0212] (2) Obtain the second target hash value of each of the configuration files before the data change;

[0213] (3) Compare the first target hash value of each configuration file with the corresponding second target hash value;

[0214] (4) The configuration file in each configuration file whose first target hash value is different from the corresponding second target hash value is determined as the first configuration file where the compiled data that has undergone data change is located.

[0215] Specifically, when the detection plugin detects a change in the compilation data of the compiled application, it determines the overall data hash value of the compilation data included in each configuration file, which is the target hash value. This hash value is used to characterize the entire configuration file. The first target hash value of each configuration file after the compilation data change can be determined by a preset hash function (such as the crc32 function).

[0216] Specifically, to obtain the second target hash value of each configuration file before the data change, a storage mechanism needs to be established beforehand to save the hash value records of each configuration file at different points in time. These hash value records can be stored in a database, a specific file in the file system, or an internal application cache structure, ensuring that the records can be accurately associated with the corresponding configuration file and timestamps. When a change in compiled data is detected, the system queries the storage location of historical hash value records based on the configuration file's identification information (such as filename, file path, etc.). The system finds the hash value of the last record before the data change corresponding to the current configuration file; this hash value is the second target hash value of that configuration file before the data change.

[0217] The process involves comparing the first target hash value and its corresponding second target hash value for each configuration file. If every bit of the two hash values ​​is identical, the comparison result is equal; otherwise, they are unequal. The comparison result for each configuration file is recorded, and this process is repeated for all configuration files. Configuration files whose first target hash value and corresponding second target hash value are not equal are then filtered out. These filtered configuration files are the ones whose data has been changed, and they are identified as the first configuration file containing the compiled data that underwent the change.

[0218] Therefore, by calculating the target hash values ​​(first target hash value and second target hash value) of each configuration file before and after the compilation data change, and comparing them bit by bit, it is possible to determine with high precision whether the configuration file has undergone data changes. Even if there are only very minor changes to the compilation data in the configuration file, its hash value will change. Therefore, this hash value comparison method can accurately capture any changes that may affect the content of the configuration file, effectively avoiding subtle data changes that may be missed by manual inspection or simple file attribute comparison (such as comparing only file size, modification time, etc.), and ensuring the accuracy of data change detection.

[0219] In step 302, the first configuration file is divided into multiple data blocks.

[0220] Based on the application's requirements and data processing characteristics, a suitable partitioning strategy can be selected to divide the first configuration file to be transmitted. Common partitioning strategies can be based on factors such as data volume, data type, and functional modules.

[0221] For example, the first configuration file can be divided into multiple data blocks according to a fixed size (e.g., each data block is 1024 bytes), or it can be divided into different data blocks according to different functional sections in the configuration file (e.g., interface layout related parts, function parameter setting parts, etc.).

[0222] Specifically, after determining the partitioning strategy, the first configuration file is partitioned according to the strategy. If the partitioning is based on data volume, data segments are extracted sequentially from the beginning of the file according to the set size as data blocks; if the partitioning is based on functional modules, the structure and content of the configuration file are parsed to identify the parts related to different functions and extract them as independent data blocks.

[0223] In step 303, the compilation data hash value of the compilation data in each data block is obtained.

[0224] The hash value of the compiled data in each data block is a fixed-length value obtained by calculating the compiled data in the data block using a hash function (such as the MD5 hash function).

[0225] In step 304, a hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in multiple data blocks is determined, and each hash difference in the hash difference sequence is encoded using binary exponentiation to obtain an encoding sequence.

[0226] The process involves sequentially retrieving the compiled data hash values ​​of adjacent data blocks in order. Then, the hash value of the preceding data block is subtracted from the hash value of the following data block to obtain the hash difference between them. By performing this operation on all adjacent data blocks, a sequence of hash differences is obtained, known as the hash difference sequence.

[0227] For example, if the hash value of the compiled data of data block 1 is "120", the hash value of the compiled data of data block 2 is "135", the hash value of the compiled data of data block 3 is "150", the hash value of the compiled data of data block 4 is "170", and the hash value of the compiled data of data block 5 is "200", then the hash difference between data block 1 and data block 2 is "135-120=15", the hash difference between data block 2 and data block 3 is "150-135=15", the hash difference between data block 3 and data block 4 is "170-150=20", and the hash difference between data block 4 and data block 5 is "200-170=30", thus obtaining the hash difference sequence "[15,15,20,30]".

[0228] Specifically, after obtaining the hash difference sequence, it is encoded by binary exponentiation to encode each hash difference in the hash difference sequence into its corresponding binary exponentiation code, thus obtaining the encoded sequence.

[0229] In some implementations, performing binary exponentiation encoding on each hash difference in the hash difference sequence to obtain an encoded sequence includes:

[0230] (1) Convert each hash difference in the hash difference sequence into a binary power polynomial, and record the power of each power term in descending order to obtain the binary power code of each hash difference;

[0231] (2) Replace each hash difference in the hash difference sequence with the corresponding binary exponentiation code to obtain the encoding sequence.

[0232] Specifically, the encoding method for each hash difference in the hash difference sequence using binary power encoding is as follows: each hash difference is converted into a binary power polynomial. For example, if the hash difference is 15, its corresponding binary power polynomial is "2". 3 +2 2 +2 1 +2 0 After converting each hash difference into its corresponding binary power polynomial, the powers of each term are recorded in descending order. Here, descending order refers to the magnitude of each power. For example, the binary power polynomial is "2...". 3 +2 2 +2 1 +2 0 If the powers are "3, 2, 1, 0", then the binary power codes of "3210" are recorded sequentially in descending order. "3210" is the binary power code corresponding to the hash difference "15". Subsequently, each hash difference in the hash difference sequence is replaced with its corresponding binary power code to obtain the encoded sequence.

[0233] Therefore, by converting hash differences into binary power polynomials and recording the powers according to specific rules to obtain binary power encoding, the representation of the data can be significantly compressed. This encoding method can convert the data into a more compact binary power encoding form. This can significantly reduce the space required for data storage when processing large amounts of hash difference data.

[0234] In step 305, the target storage address in the storage space is determined to be mapped to the first compiled data hash value of the first data block, where the first data block is the first data block among multiple data blocks.

[0235] The first data block is the first of multiple data blocks divided according to the first configuration file. This first compiled data hash value can represent the characteristics of the compiled data within the first data block to a certain extent. Since the simulator needs to retrieve the encoded sequence from the storage space, it needs to determine the target storage address of the encoded sequence in the storage space based on the first compiled data hash value, which is known to both the computer device and the simulator. This allows the simulator to determine the target storage address based on the first compiled data and retrieve the encoded sequence for restoring the first configuration file.

[0236] In some implementations, determining the target storage address in the storage space where the first compiled data hash value of the first data block maps includes:

[0237] (1) Obtain the preset number of storage addresses in the storage space;

[0238] (2) Obtain the difference between the preset number of storage addresses and one, and determine the binary representation of the difference;

[0239] (3) Convert the first compiled data hash value of the first data block into a binary representation;

[0240] (4) Perform a bitwise AND operation on the binary representation of the first compiled data hash value and the binary representation of the difference to obtain the binary representation of the target storage address corresponding to the encoded sequence;

[0241] (5) Convert the binary representation of the target storage address into the target storage address.

[0242] To better illustrate the implementation of this application, a hash table is used as an example to describe the storage space. A hash table with a size of "16" is provided, meaning the preset number of storage addresses in the storage space is "16". The difference between the preset number of storage addresses and one is calculated to determine the binary representation of the difference. The difference is "16-1=15", and its corresponding binary representation is "00001111". The hash value of the first compiled data of the first data block is converted into a binary representation, and a bitwise AND operation is performed with the binary representation of the difference to obtain the binary representation of the target storage address corresponding to the encoded sequence. For example, if the hash value of the first compiled data is "42", its corresponding binary representation is "00101010". A bitwise AND operation is performed with the binary representation of the difference "00001111" to obtain the binary representation of the target storage address as "00001010", which is "10" in decimal. Therefore, "10" is the target storage address.

[0243] Specifically, bitwise AND is a bitwise operation that performs a logical AND operation on each bit of two binary numbers. The result bit is 1 only when both corresponding bits of the two binary numbers are 1; if even one corresponding bit is 0, the result bit is 0.

[0244] For example, consider two binary numbers: 1010 (decimal 10) and 1100 (decimal 12). When performing a bitwise AND operation: starting from the leftmost most significant bit, the first bit (from the left): 1 (first number) and 1 (second number). Since both bits are 1, the first bit of the result is 1. The second bit: 0 (first number) and 1 (second number). Since one bit is 0, the second bit of the result is 0. The third bit: 1 (first number) and 0 (second number), so the third bit of the result is 0. The fourth bit: 0 (first number) and 0 (second number), so the fourth bit of the result is 0. The final result is 1010 & 1100 = 1000 (decimal 8).

[0245] Therefore, by using bitwise AND operations, the binary representation of the target storage address can be quickly determined based on the binary representation of the hash value of the first compiled data and the binary representation of the difference. Compared to other potentially more complex address mapping methods, the bitwise AND operation is relatively simple and can be completed in a short time, thus quickly determining the target storage address. This can significantly improve system efficiency and reduce performance bottlenecks caused by slow address determination processes in scenarios that require frequent processing of large blocks of data and allocation of storage addresses, such as in large-scale data storage systems or high-efficiency data processing applications.

[0246] In step 306, the encoding sequence is stored in the target storage address, and the first compilation data hash value is sent to at least one simulator, so that the simulator receiving the first compilation data hash value can restore the first configuration file for hot loading based on the first compilation data hash value and the stored encoding sequence.

[0247] After determining the target storage address, the encoded sequence is stored in the target storage address, and a first compilation data hash value is sent to at least one emulator running on the computer device to trigger the emulator that receives the first compilation data hash value to restore the first configuration file for hot loading based on the first compilation data hash value and the stored encoded sequence.

[0248] In some implementations, please refer to Figure 7 , Figure 7 This is a schematic diagram of signaling between an emulator and a computer device provided in an embodiment of this application. Sending the first compiled data hash value to at least one emulator includes:

[0249] (1) Obtain a preset polynomial and convert the preset polynomial into a binary representation;

[0250] (2) Determine the difference between the number of bits in the binary representation of the preset polynomial and one, and obtain the number of bits to be padded;

[0251] (3) After the binary representation of the first compiled data hash value, zeros are padded according to the padded number to obtain the padded binary representation;

[0252] (4) Perform a modulo-2 division operation on the padded binary representation and the binary representation of the preset polynomial to obtain the binary remainder;

[0253] (5) Concatenate the binary representation of the hash value of the first compiled data with the remainder of the operation to obtain the binary data to be verified of the first data block;

[0254] (6) Send the binary data to be verified to at least one simulator.

[0255] Wherein, the preset polynomial is the polynomial corresponding to the preset verification method selected in the embodiments of this application. Let the preset polynomial be "x 4 +x 3Taking "+1" as an example, the corresponding binary representation is "11001", the number of bits of the binary representation of the preset polynomial is "5 - 1 = 4", and the binary representation of the first compiled data hash value is "1011001". Then, "4" zeros are appended after "1011001" to obtain the padded binary representation "10110010000". Perform modulo-two division operation on the padded binary representation "10110010000" and the binary representation "11001" of the preset polynomial, that is, "10110010000丨11001", to obtain the binary operation remainder "1010". This binary operation remainder is the check value of the first compiled data hash value. Concatenate the binary representation "1011001" of the first compiled data hash value and the operation remainder "1010" to obtain the binary data to be checked for the first data block "10110011010", and send this binary data to run at least one simulator.

[0256] In this way, when an error occurs during data transmission, by recalculating the check value of the received binary data to be checked at the receiving end and comparing it with the received check value, if a mismatch is found, it can be known that an error has occurred in the data. Improve the security of data during transmission and avoid mistransmission of data.

[0257] As can be seen from the above, in the embodiment of the present application, when it is detected that a data change occurs in the compiled data of the compiled application program, the first configuration file where the compiled data with the data change is located is determined from the multiple configuration files corresponding to the compiled application program; the first configuration file is divided to obtain multiple data blocks; the compiled data hash value of the compiled data in each data block is obtained; the hash difference sequence between the compiled data hash values corresponding to adjacent data blocks in the multiple data blocks is determined, and each hash difference in the hash difference sequence is binary power encoded to obtain an encoded sequence; the target storage address in the storage space where the first compiled data hash value of the first data block is mapped is determined, and the first data block is the first data block among the multiple data blocks; the encoded sequence is stored in the target storage address, and the first compiled data hash value is sent to at least one simulator, so that the simulator that receives the first compiled data hash value restores the first configuration file for hot loading according to the first compiled data hash value and the stored encoded sequence.

[0258] Therefore, when the compilation data of the application changes, only the hash value of the first compilation data of the first data block in the first configuration file containing the changed compilation data is transmitted. The hash difference sequence between the corresponding compilation data hash values ​​of adjacent data blocks is determined, and the hash difference is encoded using binary exponentiation to obtain an encoding sequence. This encoding sequence presents this information in a more compact and standardized form to save storage space. Compared to related technologies where hot loading requires loading the entire module of data, this application provides a data processing technique that reduces the amount of data transmitted during hot loading, improves the loading efficiency of hot loading, and enables timely display of the content after hot loading, avoiding loading failures.

[0259] For details on the implementation of each of the above steps, please refer to the previous examples, which will not be repeated here.

[0260] To facilitate better implementation of the data processing method provided in the embodiments of this application, the embodiments of this application also provide an apparatus based on the above-described data processing method. The meanings of the terms used are the same as in the data processing method described above, and specific implementation details can be found in the descriptions within the method embodiments.

[0261] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. The data processing device is applied to a computer device. The data processing device may include a first receiving unit 401, a first determining unit 402, a first acquiring unit 403, a decoding unit 404, a restoration unit 405, and a splicing unit 406, etc.

[0262] The first receiving unit 401 is used to receive the first compilation data hash value corresponding to the first data block, wherein the first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur.

[0263] The first determining unit 402 is used to determine the target storage address corresponding to the hash value of the first compiled data in the storage space;

[0264] The first acquisition unit 403 is used to acquire an encoding sequence from the target storage address. The encoding sequence is an encoding sequence obtained by performing binary exponentiation encoding on the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in the multiple data blocks divided from the first configuration file.

[0265] Decoding unit 404 is used to perform binary exponentiation decoding on the encoded sequence to decode the hash difference sequence;

[0266] The restoration unit 405 is used to restore the second compilation data hash value corresponding to each second data block based on the first compilation data hash value and the hash difference sequence, wherein the second data block is the other data block among the multiple data blocks besides the first data block;

[0267] The splicing unit 406 is used to splice the first compilation data corresponding to the first compilation data hash value and the second compilation data of each second compilation data hash value to obtain the first configuration file, so as to complete hot loading.

[0268] In some embodiments, the restoration unit 405 includes:

[0269] The first acquisition subunit is used to acquire the sorting number of each hash difference in the hash difference sequence;

[0270] The first determining subunit is used to determine the hash difference with the smallest sorting number in the uncalculated hash difference sequence as the target hash difference, according to the sorting number in ascending order;

[0271] The first calculation subunit is used to calculate the sum of the difference between the first compiled data hash value and the target hash value, and to determine the sum as the compiled data hash value of the next second data block of the current data block;

[0272] The second determining subunit is used to determine the compiled data hash value of the second data block as the first compiled data hash value when there are uncalculated hash differences in the hash difference sequence, and return to execute the step of determining the hash difference with the smallest sorting number in the uncalculated hash difference sequence as the target hash difference value in ascending order of sorting number, until each hash difference is calculated and the second compiled data hash value corresponding to each second data block is obtained.

[0273] In some embodiments, the decoding unit 404 includes:

[0274] The second acquisition subunit is used to acquire the number of bits for each binary exponentiation code in the encoding sequence;

[0275] A subunit is constructed to construct a number of binary power polynomials to be added, with the same number of terms as the number of encoding bits for each binary power encoding.

[0276] Adding subunits is used to sequentially add the power in each of the binary power codes to the corresponding power term in the corresponding binary power polynomial to be added, thereby obtaining the binary power polynomial corresponding to each of the binary power codes;

[0277] The second calculation subunit is used to calculate the operation result of the binary power polynomial corresponding to each binary power code, determine the operation result as the hash difference, and obtain the hash difference sequence.

[0278] In some embodiments, the first receiving unit 401 is configured to:

[0279] The first receiving subunit is used to receive the binary data to be verified from the first data block;

[0280] The first operation subunit is used to perform a modulo-2 division operation on the binary data to be verified and the binary representation of a preset polynomial to obtain the binary operation remainder;

[0281] The third acquisition subunit is used to acquire the binary representation of the first compiled data hash value corresponding to the first data block from the binary data to be verified when the operation remainder is zero.

[0282] The first conversion subunit is used to convert the binary representation of the first compiled data hash value to obtain the first compiled data hash value corresponding to the first data block.

[0283] In some embodiments, the data processing method is applied to a simulator, which runs a compiled application and displays the application's interface. The splicing unit 406 includes:

[0284] The first sending subunit is configured to send the first configuration file to a virtual machine running on the server, so that the virtual machine performs calculations based on the first configuration file and returns the calculation results;

[0285] The first receiving subunit is used to receive the calculation result and obtain the simulation device configuration of the current simulator;

[0286] The display subunit is used to display and render the simulation device configuration and the calculation results on the application interface.

[0287] In some embodiments, the splicing unit 406 further includes:

[0288] The third determining subunit is used to determine the target event corresponding to the control operation in response to the control operation of the application interface;

[0289] The fourth determining subunit is used to determine the second configuration file corresponding to the target event based on a preset mapping relationship between events and configuration files;

[0290] The second sending subunit is used to send a second configuration file retrieval request to the virtual machine, so that the virtual machine can search for the second configuration file from all the configuration files of the application stored in virtual memory and return the second configuration file;

[0291] A loading subunit is used to receive and load the second configuration file in response to the target event.

[0292] As described above, in this embodiment, the first receiving unit 401 receives the first compiled data hash value corresponding to the first data block. The first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compiled data of the compiled application is located. The first determining unit 402 determines the target storage address in the storage space corresponding to the first compiled data hash value. The first obtaining unit 403 obtains the encoding sequence from the target storage address. The encoding sequence is the encoding sequence obtained by binary exponentiation encoding the hash difference sequence between the compiled data hash values ​​corresponding to adjacent data blocks in the multiple data blocks divided by the first configuration file. The decoding unit 404 performs binary exponentiation decoding on the encoding sequence to decode the hash difference sequence. The restoration unit 405 restores the second compiled data hash value corresponding to each second data block based on the first compiled data hash value and the hash difference sequence. The second data block is the other data block among the multiple data blocks besides the first data block. The splicing unit 406 splices the first compiled data corresponding to the first compiled data hash value and the second compiled data of each second compiled data hash value to obtain the first configuration file to complete hot loading.

[0293] Therefore, when the compilation data of the application changes, only the hash value of the first data block in the first configuration file where the changed compilation data is located is received. The first compilation data hash value is used to find the encoding sequence based on binary power encoding stored in the storage space to restore each second data block. Based on the restored second compilation data hash value corresponding to each second data block, the first compilation data corresponding to the first compilation data hash value and the second compilation data corresponding to each second compilation data hash value are finally concatenated to restore the first configuration file, thereby achieving fast hot loading. Compared with the related technology, which requires loading the configuration file of the entire module of compilation data for hot loading, the embodiments of this application can reduce the amount of data transmission during hot loading, improve the loading efficiency of hot loading, and achieve timely display of the displayed content after hot loading, avoiding loading failure.

[0294] Please see Figure 9 , Figure 9This is another schematic diagram of the data processing apparatus provided in an embodiment of this application, which is applied to a computer device. The data processing apparatus may include a second determining unit 501, a dividing unit 502, a second acquiring unit 503, an encoding unit 504, a third determining unit 505, and a sending unit 506, etc.

[0295] The second determining unit 501 is used to determine the first configuration file where the data change of the compilation data is located from multiple configuration files corresponding to the compilation application when a data change of the compilation data of the compilation application is detected.

[0296] The partitioning unit 502 is used to partition the first configuration file to obtain multiple data blocks;

[0297] The second acquisition unit 503 is used to acquire the compilation data hash value of the compilation data in each data block;

[0298] The encoding unit 504 is used to determine the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in multiple data blocks, and to perform binary exponentiation encoding on each hash difference in the hash difference sequence to obtain an encoding sequence;

[0299] The third determining unit 505 is used to determine the target storage address in the storage space where the first compiled data hash value of the first data block is mapped to the first data block among multiple data blocks;

[0300] The sending unit 506 is configured to store the encoding sequence in the target storage address and send the first compilation data hash value to at least one simulator, so that the simulator receiving the first compilation data hash value can restore the first configuration file for hot loading based on the first compilation data hash value and the stored encoding sequence.

[0301] In some embodiments, the encoding unit 504 includes:

[0302] A recording subunit is used to convert each hash difference in the hash difference sequence into a binary power polynomial, and record the power of each power term in descending order to obtain the binary power code of each hash difference;

[0303] The replacement subunit is used to replace each hash difference in the hash difference sequence with the corresponding binary exponentiation code to obtain the encoding sequence.

[0304] In some embodiments, the third determining unit 505 includes:

[0305] The fourth acquisition subunit is used to acquire the preset number of storage addresses in the storage space;

[0306] The fifth determining subunit is used to obtain the difference between the preset number of storage addresses and one, and to determine the binary representation of the difference;

[0307] The second conversion subunit is used to convert the first compiled data hash value of the first data block into a binary representation;

[0308] The second operation subunit is used to perform a bitwise AND operation on the binary representation of the first compiled data hash value and the binary representation of the difference to obtain the binary representation of the target storage address corresponding to the encoded sequence;

[0309] The third conversion subunit is used to convert the binary representation of the target storage address into the target storage address.

[0310] In some embodiments, the transmitting unit 506 includes:

[0311] The fourth conversion subunit is used to obtain a preset polynomial and convert the preset polynomial into a binary representation;

[0312] The sixth determining subunit is used to determine the difference between the number of bits in the binary representation of the preset polynomial and one, and to obtain the number of padded bits;

[0313] The padding subunit is used to pad the binary representation of the first compiled data hash value with zeros according to the padding amount, so as to obtain the padded binary representation;

[0314] The third operation subunit is used to perform a modulo-2 division operation on the padded binary representation and the binary representation of the preset polynomial to obtain the binary operation remainder;

[0315] The splicing subunit is used to splice the binary representation of the hash value of the first compiled data with the remainder of the operation to obtain the binary data to be verified of the first data block;

[0316] The third sending subunit is used to send the binary data to be verified to a simulator running at least one simulator.

[0317] In some embodiments, the second determining unit 501 includes:

[0318] The seventh determining subunit is used to determine the first target hash value of each configuration file corresponding to the compiled application when a data change is detected in the compilation data of the compiled application;

[0319] The fifth acquisition subunit is used to acquire the second target hash value of each configuration file before the data change;

[0320] A comparison subunit is used to compare the first target hash value of each configuration file with the corresponding second target hash value;

[0321] The eighth determining subunit is used to determine the configuration file in each configuration file whose first target hash value is different from the corresponding second target hash value as the first configuration file where the compiled data that has undergone data change is located.

[0322] The specific implementation of each of the above units can be found in the previous embodiments, and will not be repeated here.

[0323] As described above, in this embodiment, when the compilation data of the compiled application is detected to have changed, the second determining unit 501 determines the first configuration file containing the changed compilation data from among the multiple configuration files corresponding to the compiled application; the partitioning unit 502 partitions the first configuration file to obtain multiple data blocks; the second obtaining unit 503 obtains the compilation data hash value of the compilation data in each data block; the encoding unit 504 determines the hash difference sequence between the corresponding compilation data hash values ​​of adjacent data blocks in the multiple data blocks, and performs binary exponentiation encoding on each hash difference in the hash difference sequence to obtain an encoding sequence; the third determining unit 505 determines the target storage address in the storage space where the first compilation data hash value of the first data block is mapped, and the first data block is the first data block among the multiple data blocks; the sending unit 506 stores the encoding sequence in the target storage address and sends the first compilation data hash value to at least one simulator, so that the simulator receiving the first compilation data hash value can restore the first configuration file for hot loading based on the first compilation data hash value and the stored encoding sequence.

[0324] Therefore, when the compilation data of the application changes, only the hash value of the first compilation data of the first data block in the first configuration file containing the changed compilation data is transmitted. The hash difference sequence between the corresponding compilation data hash values ​​of adjacent data blocks is determined, and the hash difference is encoded using binary exponentiation to obtain an encoding sequence. This encoding sequence presents this information in a more compact and standardized form to save storage space. Compared to related technologies where hot loading requires loading the entire module of data, this application provides a data processing technique that reduces the amount of data transmitted during hot loading, improves the loading efficiency of hot loading, and enables timely display of the content after hot loading, avoiding loading failures.

[0325] The specific implementation of each of the above units can be found in the previous embodiments, and will not be repeated here.

[0326] Reference Figure 10 , Figure 10This is a partial structural block diagram of a computer device 110 implementing an embodiment of the present disclosure. The computer device 110 can vary significantly due to different configurations or performance characteristics, and may include one or more central processing units (CPUs) 622 (e.g., one or more processors) and a memory 632, and one or more storage media 630 (e.g., one or more mass storage devices) storing application programs 642 or data 644. The memory 632 and storage media 630 may be temporary or persistent storage. The program stored in the storage media 630 may include one or more modules (not shown in the figure), each module including a series of instruction operations on the computer device 600. Furthermore, the central processing unit 622 may be configured to communicate with the storage media 630 and execute the series of instruction operations in the storage media 630 on the computer device 600.

[0327] Computer device 110 may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input / output interfaces 658, and / or one or more operating systems 641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0328] When the computer device 110 is used as an emulator, the central processing unit 622 in the computer device 110 can be used to execute the data processing methods of the embodiments of this disclosure, for example:

[0329] Receive the first compilation data hash value corresponding to the first data block, where the first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur.

[0330] Determine the target storage address in the storage space corresponding to the hash value of the first compiled data;

[0331] Obtain the encoding sequence from the target storage address. The encoding sequence is obtained by performing binary exponentiation encoding on the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in the multiple data blocks divided from the first configuration file.

[0332] The encoded sequence is subjected to binary exponentiation decoding to obtain the hash difference sequence;

[0333] Based on the first compiled data hash value and the hash difference sequence, the second compiled data hash value corresponding to each second data block is restored, where the second data block is any other data block besides the first data block among the multiple data blocks;

[0334] The first compilation data corresponding to the hash value of the first compilation data and the second compilation data of each hash value of the second compilation data are concatenated to obtain the first configuration file, so as to complete hot loading.

[0335] When computer device 110 acts as a host machine for running an emulator, the central processing unit 622 in computer device 110 can be used to execute the data processing methods of embodiments of this disclosure, for example:

[0336] When a change in the compilation data of the compiled application is detected, the first configuration file containing the changed compilation data is determined from multiple configuration files corresponding to the compiled application.

[0337] The first configuration file is divided into multiple data blocks;

[0338] Obtain the compiled data hash value of the compiled data in each data block;

[0339] Determine the hash difference sequence between the compiled data hash values ​​of adjacent data blocks in multiple data blocks, and perform binary exponentiation encoding on each hash difference sequence to obtain an encoding sequence;

[0340] Determine the target storage address in the storage space where the first compiled data hash value of the first data block is mapped to the first data block among multiple data blocks;

[0341] The encoding sequence is stored in the target storage address, and the first compilation data hash value is sent to at least one simulator, so that the simulator that receives the first compilation data hash value can restore the first configuration file for hot reloading based on the first compilation data hash value and the stored encoding sequence.

[0342] This disclosure also provides a computer-readable storage medium for storing program data, which is used to execute the data processing methods of the foregoing embodiments.

[0343] This disclosure also provides a computer program product comprising a computer program. A processor of a computer device reads and executes the computer program, causing the computer device to perform the data processing method described above. For example:

[0344] Receive the first compilation data hash value corresponding to the first data block, where the first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur.

[0345] Determine the target storage address in the storage space corresponding to the hash value of the first compiled data;

[0346] Obtain the encoding sequence from the target storage address. The encoding sequence is obtained by performing binary exponentiation encoding on the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in the multiple data blocks divided from the first configuration file.

[0347] The encoded sequence is subjected to binary exponentiation decoding to obtain the hash difference sequence;

[0348] Based on the first compiled data hash value and the hash difference sequence, the second compiled data hash value corresponding to each second data block is restored, where the second data block is any other data block besides the first data block among the multiple data blocks;

[0349] The first compilation data corresponding to the hash value of the first compilation data and the second compilation data of each hash value of the second compilation data are concatenated to obtain the first configuration file, so as to complete hot loading.

[0350] For example, when a change in the compilation data of the compiled application is detected, the first configuration file containing the changed compilation data is determined from multiple configuration files corresponding to the compiled application.

[0351] The first configuration file is divided into multiple data blocks;

[0352] Obtain the compiled data hash value of the compiled data in each data block;

[0353] Determine the hash difference sequence between the compiled data hash values ​​of adjacent data blocks in multiple data blocks, and perform binary exponentiation encoding on each hash difference sequence to obtain an encoding sequence;

[0354] Determine the target storage address in the storage space where the first compiled data hash value of the first data block is mapped to the first data block among multiple data blocks;

[0355] The encoding sequence is stored in the target storage address, and the first compilation data hash value is sent to at least one simulator, so that the simulator that receives the first compilation data hash value can restore the first configuration file for hot reloading based on the first compilation data hash value and the stored encoding sequence.

[0356] Furthermore, the terms “comprising” and “including”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.

[0357] It should be understood that in this disclosure, "at least one item" means one or more, and "more than one" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0358] It should be understood that in the description of the embodiments disclosed herein, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0359] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0360] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0361] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0362] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program data, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0363] It should also be understood that the various implementation methods provided in this disclosure can be combined arbitrarily to achieve different technical effects.

[0364] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0365] The above is a detailed description of the embodiments of this disclosure. However, this disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this disclosure. All such equivalent modifications or substitutions are included within the scope defined by the claims of this disclosure.

Claims

1. A data processing method, characterized in that, include: Receive the first compilation data hash value corresponding to the first data block, where the first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur. Determine the target storage address in the storage space corresponding to the hash value of the first compiled data; Obtain the encoding sequence from the target storage address. The encoding sequence is obtained by performing binary exponentiation encoding on the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in the multiple data blocks divided from the first configuration file. The encoded sequence is subjected to binary exponentiation decoding to obtain the hash difference sequence; Based on the first compiled data hash value and the hash difference sequence, the second compiled data hash value corresponding to each second data block is restored, where the second data block is any other data block besides the first data block among the multiple data blocks; The first compilation data corresponding to the hash value of the first compilation data and the second compilation data of each hash value of the second compilation data are concatenated to obtain the first configuration file, so as to complete hot loading.

2. The data processing method according to claim 1, characterized in that, The step of restoring the second compiled data hash value corresponding to each second data block based on the first compiled data hash value and the hash difference sequence includes: Obtain the sorting index of each hash difference in the hash difference sequence; The hash difference with the smallest sorting number in the uncalculated hash difference sequence is determined as the target hash difference, in ascending order of sorting number. Calculate the sum of the difference between the first compiled data hash value and the target hash value, and determine the sum as the compiled data hash value of the next second data block of the current data block; When there are uncalculated hash differences in the hash difference sequence, the compiled data hash value of the second data block is determined as the first compiled data hash value, and the process of determining the hash difference with the smallest sorting number in the uncalculated hash difference sequence as the target hash difference is repeated in ascending order of sorting number until each hash difference is calculated to obtain the second compiled data hash value corresponding to each second data block.

3. The data processing method according to claim 2, characterized in that, The step of performing binary exponentiation decoding on the encoded sequence to decode the hash difference sequence includes: Obtain the number of bits for each binary exponentiation code in the encoded sequence; Construct a binary power polynomial to be added with the same number of terms as the number of encoding bits for each binary power code; Add the power in each binary power code to the corresponding power term in the corresponding binary power polynomial to be added in sequence to obtain the binary power polynomial corresponding to each binary power code; Calculate the result of the operation of the binary power polynomial corresponding to each binary power code, determine the operation result as the hash difference, and obtain the hash difference sequence.

4. The data processing method according to claim 1, characterized in that, The receipt of the first compiled data hash value corresponding to the first data block includes: Receive the binary data to be verified for the first data block; Perform a modulo-2 division operation on the binary data to be verified and the binary representation of a preset polynomial to obtain the binary remainder; When the remainder of the operation is zero, the binary representation of the first compiled data hash value corresponding to the first data block is obtained from the binary data to be verified. The binary representation of the first compiled data hash value is converted to obtain the first compiled data hash value corresponding to the first data block.

5. The data processing method according to any one of claims 1 to 4, characterized in that, The data processing method is applied to a simulator, which runs a compiled application and displays the application interface of the compiled application. The hot-loading process is as follows: The first configuration file is sent to a virtual machine running on the server, so that the virtual machine performs calculations based on the first configuration file and returns the calculation results; Receive the calculation results and obtain the current simulator's simulation device configuration; The simulation device configuration and the calculation results are displayed and rendered on the application interface.

6. The data processing method according to claim 5, characterized in that, The method further includes: In response to a control operation on the application interface, determine the target event corresponding to the control operation; Based on the preset mapping relationship between events and configuration files, the second configuration file corresponding to the target event is determined; Send a second configuration file retrieval request to the virtual machine so that the virtual machine can search for the second configuration file from all configuration files of the application stored in virtual memory and return the second configuration file; Receive and load the second configuration file in response to the target event.

7. A data processing method, characterized in that, include: When a change in the compilation data of the compiled application is detected, the first configuration file containing the changed compilation data is determined from multiple configuration files corresponding to the compiled application. The first configuration file is divided into multiple data blocks; Obtain the compiled data hash value of the compiled data in each data block; Determine the hash difference sequence between the compiled data hash values ​​of adjacent data blocks in multiple data blocks, and perform binary exponentiation encoding on each hash difference sequence to obtain the encoding sequence; Determine the target storage address in the storage space where the first compiled data hash value of the first data block is mapped to the first data block among multiple data blocks; The encoded sequence is stored in the target storage address, and the first compiled data hash value is sent to at least one simulator, so that the simulator that receives the first compiled data hash value can restore the first configuration file for hot reloading based on the first compiled data hash value and the stored encoded sequence.

8. The data processing method according to claim 7, characterized in that, The step of performing binary exponentiation encoding on each hash difference in the hash difference sequence to obtain an encoded sequence includes: Each hash difference in the hash difference sequence is converted into a binary power polynomial, and the power of each term is recorded in descending order to obtain the binary power code of each hash difference. Each hash difference in the hash difference sequence is replaced with its corresponding binary exponentiation code to obtain the encoding sequence.

9. The data processing method according to claim 8, characterized in that, The step of determining the target storage address in the storage space mapped to the first compiled data hash value of the first data block includes: Get the preset number of storage addresses in the storage space; Obtain the difference between the preset number of storage addresses and one, and determine the binary representation of the difference; Convert the first compiled data hash value of the first data block into a binary representation; Perform a bitwise AND operation between the binary representation of the first compiled data hash value and the binary representation of the difference to obtain the binary representation of the target storage address corresponding to the encoded sequence; Convert the binary representation of the target storage address into the target storage address.

10. The data processing method according to claim 7, characterized in that, Sending the first compiled data hash value to at least one simulator includes: Obtain a preset polynomial and convert the preset polynomial into a binary representation; The difference between the number of bits in the binary representation of the preset polynomial and one is determined to obtain the number of padded bits; After the binary representation of the first compiled data hash value, zeros are padded according to the padded number to obtain the padded binary representation; Perform a modulo-2 division operation between the padded binary representation and the binary representation of the preset polynomial to obtain the binary remainder. By concatenating the binary representation of the hash value of the first compiled data with the remainder of the operation, the binary data to be verified of the first data block is obtained; The binary data to be verified is sent to a simulator that is running at least one simulator.

11. The data processing method according to any one of claims 7 to 10, characterized in that, When a change in the compilation data of the compiled application is detected, the first configuration file containing the changed compilation data is determined from multiple configuration files corresponding to the compiled application, including: When a change in the compilation data of the compiled application is detected, the first target hash value of each configuration file corresponding to the compiled application is determined; Obtain the second target hash value of each configuration file before the data change; Compare the first target hash value of each configuration file with the corresponding second target hash value; The configuration file in which the first target hash value and the corresponding second target hash value are different is identified as the first configuration file where the compiled data that has undergone data change is located.

12. A data processing apparatus, characterized in that, include: The first receiving unit is used to receive the first compilation data hash value corresponding to the first data block, wherein the first data block is the first data block among multiple data blocks divided according to the first configuration file, and the first configuration file is the configuration file where the compilation data of the compiled application is located when data changes occur. The first determining unit is used to determine the target storage address corresponding to the hash value of the first compiled data in the storage space; The first acquisition unit is used to acquire an encoding sequence from the target storage address. The encoding sequence is an encoding sequence obtained by performing binary exponentiation encoding on the hash difference sequence between the hash values ​​of the compiled data corresponding to adjacent data blocks in the multiple data blocks divided from the first configuration file. The decoding unit is used to perform binary exponentiation decoding on the encoded sequence to decode the hash difference sequence; The restoration unit is used to restore the second compilation data hash value corresponding to each second data block based on the first compilation data hash value and the hash difference sequence, wherein the second data block is the other data block among the multiple data blocks besides the first data block; The splicing unit is used to splice the first compilation data corresponding to the first compilation data hash value and the second compilation data of each second compilation data hash value to obtain the first configuration file, so as to complete hot loading.

13. A data processing apparatus, characterized in that, include: The second determining unit is used to determine the first configuration file where the data change of the compilation data is located from multiple configuration files corresponding to the compilation application when a data change of the compilation data of the compilation application is detected. A partitioning unit is used to partition the first configuration file into multiple data blocks; The second acquisition unit is used to acquire the compilation data hash value of the compilation data in each data block; An encoding unit is used to determine the hash difference sequence between the compiled data hash values ​​of adjacent data blocks in multiple data blocks, and to perform binary exponentiation encoding on each hash difference in the hash difference sequence to obtain an encoding sequence; The third determining unit is used to determine the target storage address in the storage space where the first compiled data hash value of the first data block is mapped to the first data block among multiple data blocks; The sending unit is configured to store the encoding sequence in the target storage address and send the first compilation data hash value to at least one simulator, so that the simulator receiving the first compilation data hash value can restore the first configuration file for hot loading based on the first compilation data hash value and the stored encoding sequence.

14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the data processing method according to any one of claims 1 to 6, or the data processing method according to any one of claims 7 to 11.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to implement the data processing method according to any one of claims 1 to 6, or the data processing method according to any one of claims 7 to 11.