Data processing system, data processing method and electronic equipment
By moving the data compilation process to the server, dynamically compiling and generating compiled files using the client's configuration information, it solves the problem of long and low efficiency of customized compilation and tuning cycles in the existing technology, and realizes lightweight data version updates and Efficient user experience.
Patent Information
- Application Number
- CN202210220408.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-03-08
AI Technical Summary
When cloud manufacturers provide software services to customers, program personnel need to perform customized compilation and tuning, resulting in long cycles and low efficiency. With the increase of heterogeneous models, excessive manpower investment and excessive release packages. , affect long-term development.
Move the data compilation process to the server. The client only needs to send the local configuration information to the server when the version of local data is updated on the server side. The server dynamically compiles and generates the compiled file based on the configuration information and feeds it back to the client. Save to the local cache library.
It realizes lightweight data version updates, and the compiled files are tailor-made for client devices, without redundant information, and the file size is small, which reduces manpower investment and publishing package size, improving efficiency and user experience.
Smart Images

Figure CN114661321B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing system, a data processing method and an electronic device. Background Art
[0002] At present, when cloud vendors provide software services to customers, the common practice is that cloud vendor programmers manually compile and tune the delivered software based on the customer's unique device software and hardware environment, and finally deliver the compiled files to the customer. Because the software is closely related to the customer's actual device software and hardware environment, programmers are required to compile and tune the software for the customer in a targeted and customized manner.
[0003] With iterative development and the increase in various heterogeneous models of customers, this customized development method has a long cycle, low efficiency, and is not conducive to long-term development. Summary of the invention
[0004] In view of the above problems, the present application provides a data processing system, a data processing method and an electronic device.
[0005] In one embodiment of the present application, a data processing system is provided. The data processing system includes:
[0006] The first client is used to obtain local configuration information when it is determined that the local data has a version update on the server side; and send a version update request to the server based on the configuration information;
[0007] The server is configured to determine the target version data after receiving the version update request; determine the compiled file corresponding to the target version data according to the configuration information included in the version update request; and feed back the address information of the compiled file to the first client;
[0008] The first client is used to obtain the compiled file from the server based on the address information after receiving the address information; and store the compiled file in a local cache library to complete the version update of local data.
[0009] In another embodiment of the present application, a data processing method is provided, which is suitable for a server. The method includes:
[0010] Receiving a version update request sent by a first client; wherein the version update request includes configuration information of the client;
[0011] Determining target version data according to the version update request;
[0012] Determine, according to the configuration information, a compiled file corresponding to the target version data;
[0013] The address information of the compiled file is fed back to the first client so that the first client obtains the compiled file based on the address information.
[0014] In another embodiment of the present application, a data processing method is provided, which is suitable for a first client. The method includes:
[0015] When it is determined that the local data has a version update on the server side, obtain the local configuration information;
[0016] Sending a version update request to the server based on the configuration information;
[0017] Receiving address information fed back by the server;
[0018] According to the address information, obtaining a compiled file corresponding to the target version data from the server;
[0019] The compiled file is stored in a local cache library to complete the version update of the local data.
[0020] In another embodiment of the present application, an electronic device is provided. The electronic device includes a processor and a memory, wherein the memory is used to store one or more computer instructions; the processor is coupled to the memory and is used to execute the one or more computer instructions to implement the steps in the above method embodiments.
[0021] In one embodiment of the present application, a computer program product is provided, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the processor is enabled to implement the steps in the above-mentioned method embodiments.
[0022] An embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the method steps or functions provided in the above embodiments can be implemented.
[0023] The technical solution provided by the embodiment of the present application moves the data compilation process to the server. The first client only needs to send the local configuration information to the server when there is a version update of the local data on the server side; so that the server can determine the compiled file corresponding to the target version data according to the configuration information; after the first client receives the compiled file fed back by the server, it stores the compiled file in the local cache library to complete the data version update. Because in this embodiment, when the data version is upgraded, the compiled file (such as an executable file) generated by the server according to the configuration information of the client is dynamically compiled, which is tailored for the client device, has no redundant information, and has a small file size; and in this solution, the data update is updated in the form of a compiled file (i.e., an executable file), realizing a lightweight data version update. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A schematic diagram of the structure of a data processing system provided in one embodiment of the present application;
[0026] Figure 2 A schematic diagram of a compiling module provided on a first client in a data processing system provided in an embodiment of the present application;
[0027] Figure 3 A flowchart of a data processing method provided in one embodiment of the present application;
[0028] Figure 4 A flowchart of a compilation method in a data processing method provided in an embodiment of the present application;
[0029] Figure 5 A flowchart of a data processing method provided by another embodiment of the present application;
[0030] Figure 6 A flowchart of a data processing method provided in yet another embodiment of the present application;
[0031] Figure 7 for Figure 6 A schematic diagram of a specific implementation process of step 6 in the flowchart shown;
[0032] Figure 8 A schematic diagram of the structure of a data processing device provided in one embodiment of the present application;
[0033] Fig. 9A schematic diagram of the structure of a data processing device provided in another embodiment of the present application;
[0034] Fig.10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0035] After the emergence of cloud vendors (also known as cloud computing vendors), they integrated resources (such as storage, servers, and operating systems) and packaged them into a service for sale. Enterprises / developers only need to rent these services. Cloud computing vendors have launched services such as IaaS (Infrastructure as a Service), CaaS (Container as a Service), PaaS (Platform as a Service), and SaaS (Software as a Service).
[0036] As mentioned in the background technology, when cloud vendors provide software services to customers, the existing methods have great disadvantages. The applicant of this application has the following main points through analysis:
[0037] 1. Core code protection issues: Some core codes cannot be directly exposed to customers. A strong protection strategy needs to be designed during implementation, which undoubtedly increases the workload.
[0038] 2. Inefficient publishing method: When encountering new customers, customized development may be required, which takes a long time. In addition, once code updates are involved, customers will need to operate frequently. In the long run, this will reduce the user experience and affect user stickiness.
[0039] 3. Excessive manpower investment: Core codes are often related to hardware, drivers, and software. With the increase in heterogeneous models, driver updates, and the increase in open source versions, there is an explosion of combinations, which increases manpower investment costs and is not conducive to long-term development.
[0040] 4. The release package is too large: In order to cover as many scenarios as possible, a large dependency library needs to be maintained for different software and hardware environments, which reduces the convenience of the product.
[0041] For example, in the field of artificial intelligence, the implementation of operators such as the kernel at the bottom of the deep learning model algorithm needs to rely on different hardware environments (such as GPU specifications) for tuning and customization. Different software versions (CUDA driver, model parameters) will lead to widely varying tuning results.
[0042] In order to help those skilled in the art better understand the present invention, the following embodiments are provided to describe the technical solutions in the present invention in detail in conjunction with the accompanying drawings.
[0043] In some processes described in the specification, claims and the above-mentioned figures of the present application, multiple operations appearing in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit "first" and "second" to different types. In addition, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0044] Figure 1 FIG. 1 shows a schematic diagram of the structure of a data processing system provided by an embodiment of the present application. Figure 1 As shown, the data processing system includes a first client 101 and a server 102.
[0045] The first client 101 is used to obtain local configuration information when it is determined that the local data has a version update on the server side; and send a version update request to the server 102 based on the configuration information;
[0046] The server 102 is configured to determine the target version data after receiving the version update request; determine the compiled file corresponding to the target version data according to the configuration information included in the version update request; and feed back the address information of the compiled file to the first client 101;
[0047] The first client 101 is used to obtain the compiled file from the server 102 based on the address information after receiving the address information; and store the compiled file in a local cache library to complete the version update of local data.
[0048] Further, when the server 102 determines the compiled file corresponding to the target version data according to the configuration information included in the version update request, it can be specifically used to:
[0049] According to the configuration information, query whether the existing compiled files contain a compiled file that is adapted to the configuration information and corresponds to the target version data;
[0050] If yes, obtain the compiled file;
[0051] If not, construct a device environment that is the same as the first client environment according to the configuration information; compile the target version data in the device environment to obtain the compiled file.
[0052] Further, if Figure 1 As shown, the data processing system further includes a second client 103. Accordingly,
[0053] The server 102 is further configured to obtain data information generated after the first client 101 loads and executes the compiled file; based on the data information, analyze the running effect of the target version data; if the running effect does not meet the preset requirements, send a notification message to the second client;
[0054] The second client 103 is used to receive and output the notification message, so that the user can adjust the target version data based on the notification message.
[0055] Further, when the first client 101 determines that the local data has a version update on the server side and obtains the local configuration information, it is specifically used to:
[0056] Determine whether to postpone the update;
[0057] If not, perform certificate verification by interacting with the server, and obtain local hardware information when verifying that the certificate is valid;
[0058] Sending the hardware information to the server, so that the server performs identity authentication on the client based on the hardware information;
[0059] After the identity authentication is passed, obtaining the configuration information;
[0060] The configuration information includes software configuration information and hardware configuration information.
[0061] In an achievable technical solution, the first client 101 in this embodiment is configured with a compiling module; Figure 2 As shown, the compilation module is implemented using a future mode wrapper. The compilation module includes: a program interface and a dynamic link library; the program interface is data stored in a local cache library; the dynamic link library is loaded to detect whether the program interface has a version update on the server side, and if so, sends a version update request to the server based on the configuration information.
[0062] During specific implementation, the service end may be a cloud, a server, a server cluster or a virtual server, etc., which is not specifically limited in this embodiment. Figure 1The example in which the server described in this embodiment is a cloud-based instance is shown. For example, a compilation server and a storage server may be deployed in the cloud-based. Among them, the compilation server is used to compile the target version data to generate a compilation file. The storage server may be used to store the target version file and the compilation file corresponding to the target version file. Among them, for different client configurations, the compilation file corresponding to the target version file is different. Therefore, when storing, the configuration information of the client may be associated with the compilation file and stored. More specifically, a corresponding key value may be generated based on the configuration information of the client for indexing, so that the compilation file of the target version file associated with the corresponding configuration information can be queried according to the key during subsequent inquiries. Furthermore, a server dedicated to providing cloud computing for users, a server for testing, a server for analysis, and the like may also be deployed in the cloud-based. These servers may be virtual servers built on a server cluster. Users may upload the configuration information of the client through the network, wherein the configuration information may include hardware configuration information and software configuration information of the client device, and the like.
[0063] In addition to being a server or a server cluster, the server end in this embodiment may also be a GPU (Graphic Processing Unit) or a CPU stand-alone device, or a GPU cluster. A GPU cluster is a computer cluster in which each node is equipped with a graphics processing unit (GPU). From the perspective of hardware architecture, a GPU cluster is simply a peripheral connected to a node through a high-speed PCI bus, and the GPU is connected to the node through a PCI bus, and is interconnected through a high-speed Ethernet or a high-speed switching network. A single node in a GPU cluster may include not only single-core CPU, multi-core CPU, or even multi-CPU computing resources, but also a single GPU or multiple GPUs.
[0064] In a specific application scenario, the server in this embodiment is a GPU cluster, which can be implemented using CUDA (Compute Unified Device Architecture). CUDA is a general-purpose parallel computing architecture that enables GPUs to solve complex computing problems. It includes the CUDA instruction set architecture (ISA) and the parallel computing engine inside the GPU. For example, the calculation in CUDA is divided into two parts. The serial part is executed on the Host, that is, the CPU; and the parallel part is executed on the Device, that is, the GPU. The device code part is handed over to a component called the Just in Time compiler, which is compiled before running the code into a bytecode file similar to Java, called PTX, and then generates an ISA to run on the GPU.
[0065] Developers can perform cloud programming and remote source code level debugging through the second client 103. For example, the server 102 in this embodiment is also used to obtain the data information generated after the first client loads and executes the compiled file; based on the data information, analyze the operating effect of the target version data; if the operating effect does not meet the preset requirements, send a notification message to the second client. The second client 103 used by the developer can be a virtual terminal. Among them, the virtual terminal is a virtual terminal on a personal computer and software written for this purpose. The purpose of the virtual terminal is to enable the personal computer and its users to connect to the cloud. Through the virtual terminal, not only can the data on the personal computer be transferred to the remote end, but also the data in the cloud can be transferred to the personal computer, and continue to be processed on the personal computer (such as modification, debugging, etc.).
[0066] The first client and the second client can interact with the cloud through wireless methods such as NB-IOT, GSM, 4G or 5G, and the compiled file generated by the cloud for the target version data can be an executable file. The data in this embodiment can be called: software, code, functional modules written in computer language, program interface (API), software package, etc.
[0067] The first client and the second client may be user devices such as smart phones, tablet computers, and personal computers; the server may be, for example, a single server, a server cluster, a cloud processing center, etc. The server may provide services for multiple clients, and the client may also communicate with multiple servers.
[0068] The technical solution provided by the embodiment of the present application moves the data compilation process to the server. The first client only needs to send the local configuration information to the server when there is a version update of the local data on the server side; so that the server can determine the compiled file corresponding to the target version data according to the configuration information; after the first client receives the compiled file fed back by the server, it stores the compiled file in the local cache library to complete the data version update. Because in this embodiment, when the data version is upgraded, the compiled file (such as an executable file) generated by the server according to the configuration information of the client is dynamically compiled, which is tailored for the client device, has no redundant information, and has a small file size; and in this solution, the data update is updated in the form of a compiled file (i.e., an executable file), realizing a lightweight data version update.
[0069] The following will further explain the functions corresponding to the first client and the server in the embodiment of the present application from the perspective of the method. That is to say, in addition to the functions mentioned above, the first client and the server in the embodiment of the present application can also realize the functions corresponding to the method steps in the corresponding method embodiment.
[0070] Figure 3The flowchart of the data processing method provided by an embodiment of the present application is shown. The execution subject of the method provided by this embodiment can be the server in the above embodiment. Specifically, Figure 3 As shown, the method includes:
[0071] 201. Receive a version update request sent by a first client; wherein the version update request includes configuration information of the client;
[0072] 202. Determine target version data according to the version update request;
[0073] 203. Determine the compiled file corresponding to the target version data according to the configuration information;
[0074] 204. Feedback the address information of the compiled file to the first client, so that the first client obtains the compiled file based on the address information.
[0075] In the above 201, the first client can periodically detect whether there is a version update of the local data on the server side, and send a version update request to the server when a version update is detected. Alternatively, the server side stores the data version identifier of the first client, and if it is detected that the data of the first client has a version update based on the data version identifier, an update message is sent to the first client; after receiving the update message, the first client sends a version update request to the server. The first two methods can complete the data version update without the user's perception. Alternatively, when the user learns of a version update through other channels (such as email, text messages, etc.), the user triggers the sending of a version update request to the server through the interactive device of the first client (such as a keyboard, touch screen, etc.). This method is user-perceivable, and the data update is initiated by the user.
[0076] The configuration information may include the client's software configuration information and hardware configuration information, such as version information of C++, python, cuda, GPU driver, etc. If the data requested to be updated by the first client is machine learning related code, the configuration information shall also include: neural network framework version information, some parameter information of the specific model. Some parameter information of the model may include but is not limited to: batch_size, input shape, kernel_size and other parameters.
[0077] Before the above 202, it may also include: receiving the certificate information sent by the first client, and verifying the certificate information. Further, it may also include: receiving the hardware information sent by the first client, and using the hardware information to authenticate the first client. Among them, the hardware information may include but is not limited to: CPU instance ID, GPU instance ID, Mac address, etc., and the legality of the client identity is verified by judging the hardware information (information that uniquely identifies the client device). For example, the server stores the hardware information of the first client, and the server verifies whether the identity of the first client is legal by comparing the locally stored hardware information and the hardware information sent by the client.
[0078] In an achievable embodiment, the above 202 "determining the target version data according to the version update request" may include: searching for the update version number corresponding to the data version number according to the data identifier and version number carried in the version update request; and obtaining the target version data with the update version number.
[0079] In specific implementation, the above step 203 "determining the compiled file corresponding to the target version data according to the configuration information" can be implemented by the following steps:
[0080] 2031. According to the configuration information, query whether the existing compiled files contain a compiled file that is adapted to the configuration information and corresponds to the target version data;
[0081] 2032. If yes, obtain the compiled file;
[0082] 2033. If not, construct a device environment that is the same as the first client environment according to the configuration information; compile the target version data in the device environment to obtain the compiled file.
[0083] In the above 2031, in the specific implementation, if there is a client request to update the target version data on the network side in the past, the server will save the compiled file obtained by compiling the target version data based on the configuration information of the client under the historical request of the client. The server will also generate a corresponding key value for indexing based on the configuration information of the client (or the configuration information and the identifier of the target version data), and use the compiled file corresponding to the target version data as the value associated with the key value, or use the address information (such as URL, Uniform Resource Locator) of the compiled file corresponding to the target version data as the value associated with the key value, so as to facilitate subsequent queries.
[0084] In the actual implementation of the above 2033, the target version data can be compiled by using the Just in Time Compiler (JIT) technology. Among them, JIT is a method to improve the efficiency of program operation. Java programs are originally interpreted and executed by an interpreter. When the virtual machine finds that a method or code block is running particularly frequently, it will identify these codes as "hot code". In order to improve the execution efficiency of hot code, at runtime, the virtual machine will compile these codes into machine code and perform various levels of optimization. The compiler that completes the entire task is called a Just-in-Time Compiler (JIT). Figure 4 The hot code may be: a method (or functional module) that is called multiple times, a loop body that is executed multiple times, etc.
[0085] JIT compilation is mainly for runtime compilation of Java programs, and adaptive optimization is performed based on the profile information collected by profiling. Since the main goal of using JIT compilation technology is to improve the quality of the target code to improve the execution performance of Java applications on the one hand, and to reduce the compilation and runtime overhead on the other hand, how to perform profiling and how to achieve adaptive optimization are one of the key technologies of JIT compilation. Profiling information is the basis of dynamic compilation, which is used to guide the compilation system to perform adaptive compilation optimization measurements so that the system can self-adjust to adapt to new target environments and new application requirements. Profiling technology is a technology that collects specific information when the program is running, such as determining "hot code" with the collected information. In dynamic compilation, an important way to reduce compilation time overhead is to optimize only those parts that affect the overall performance of the program, but profiling is required to discover these key parts. In the Profile-guided compilation process, before performing Profile-guided compilation optimization, it is necessary to run instrumental programs on one or more typical inputs to collect Profile data, and then use these Profile data to guide the optimizing compiler to recompile the source program to generate optimized code.
[0086] Programs using JIT technology can dynamically detect the target hardware architecture at runtime, and have the opportunity to generate executable code with higher execution efficiency.
[0087] Furthermore, the method provided in this embodiment may also include:
[0088] 205. Acquire data information generated after the first client loads and executes the compiled file;
[0089] 206. Analyze the operation effect of the target version data based on the data information;
[0090] 207. If the running result does not meet the preset requirement, a notification message is sent to the second client so that the user can adjust the target version data based on the notification message.
[0091] Furthermore, the method provided in the embodiment of the present application may also include the following steps:
[0092] 208. If the operation result meets the rollback condition, start the rollback mechanism to make the first client roll back to the original version data.
[0093] For example, through the above analysis, it is found that the first client generates a large performance loss when executing the compiled file corresponding to the target version data. For example, if the performance loss is analyzed to be greater than a set threshold, the previous version of the customer will be automatically rolled back. The entire rollback process is consistent with the update process of the target version data, that is, requesting the compiled file of the original version data from the server, and then storing the compiled file of the original version data fed back by the server into the cache library, so as to update the compiled file corresponding to the target version data to the compiled file of the original version data, and the rollback is completed. The whole process is automatic and the user is unaware of it.
[0094] Figure 5 A flow chart of a data processing method provided by another embodiment of the present application is shown. The execution subject of the method provided by this embodiment may be the first client in the above embodiment. Specifically, the method includes:
[0095] 301. When it is determined that the local data has a version update on the server side, obtain local configuration information;
[0096] 302. Send a version update request to the server based on the configuration information;
[0097] 303. Receive address information fed back by the server;
[0098] 304. Obtain a compiled file corresponding to the target version data from the server according to the address information;
[0099] 305. Store the compiled file into a local cache library to complete the version update of local data.
[0100] In the above 301, the first client can periodically detect whether there is a version update of the local data on the server side, and send a version update request to the server when a version update is detected. Alternatively, the server side stores the data version identifier of the first client, and if it is detected that the data of the first client has a version update based on the data version identifier, an update message is sent to the first client; after receiving the update message, the first client sends a version update request to the server. The first two methods can complete the data version update without the user's perception. Alternatively, when the user learns of a version update through other channels (such as email, text messages, etc.), the user triggers the sending of a version update request to the server through the interactive device of the first client (such as a keyboard, touch screen, etc.). This method is user-perceivable, and the data update is initiated by the user.
[0101] In the above 302, the version update request may include: configuration information, a key value generated based on the configuration information, a target version number and a data identifier corresponding to the target version data, and the like.
[0102] In the above 303, the server can directly feedback the compiled file, or return the address information (such as URL) corresponding to the compiled file. The user can obtain the compiled file corresponding to the target version data by clicking the link corresponding to the address information.
[0103] In an achievable technical solution, step 301 of this embodiment, “obtaining local configuration information when determining that the local data has a version update on the server side”, may specifically include:
[0104] 3011. Determine whether to postpone the update;
[0105] 3012. If not, perform certificate verification by interacting with the server, and obtain local hardware information when verifying that the certificate is valid;
[0106] 3013. Send the hardware information to the server, so that the server performs identity authentication on the client based on the hardware information;
[0107] 3014. After the identity authentication is passed, obtain the configuration information;
[0108] The configuration information includes software configuration information and hardware configuration information, such as version information of C++, python, cuda, GPU driver, etc. If the data requested to be updated by the first client is machine learning related code, the configuration information also needs to include: neural network framework version information, some parameter information of the specific model. Among them, some parameter information of the model may include but is not limited to: batch_size, input shape, kernel_size and other parameters.
[0109] The present embodiment does not specifically limit the certificate verification process and the identity authentication process based on hardware information, and any verification process may be used to complete the above-mentioned certificate and identity authentication.
[0110] Furthermore, the local data in this embodiment is a program interface stored in a local cache library, and the local cache library also stores a dynamic link library. Accordingly, the method provided in this embodiment may also include the following steps:
[0111] 306. Detecting, through the dynamic link library, whether the program interface has a version update on the server side;
[0112] 307. If there is a version update, trigger the step of sending a version update request to the server based on the configuration information.
[0113] The above step 307 is: if there is a version update, then execute the above steps 301 and 302.
[0114] Among them, the dynamic link library (DLL Dynamic-Link Library) is also an executable file, but it cannot be directly run like an ordinary exe file, but is used to provide a shared function library for other executable files (including exe files and other DLLs). The application using DLL can call the export functions in the DLL, but the execution code of these functions is not included in the execution code of the application itself. After being compiled and linked, they are independently stored in the DLL. Corresponding to the dynamic link library, there is also a function library called a static link library. The form of the program interface in this embodiment can also be a link library, such as a .so dynamic link library, a .a static link library, etc., which is not specifically limited in this embodiment.
[0115] The main purpose of a programming interface (such as an application programming interface, Application Programming Interface, or API for short) is to provide applications and developers with the ability to access a set of routines without having to access the source code or understand the details of the internal working mechanism. The software that provides the functions defined by the API is called the implementation of this API, which can be a set of functions that can be used to operate a component, application, or operating system. Typically, an API consists of one or more DLLs that provide a particular function.
[0116] In addition, the first client of the execution subject of the method provided in this embodiment is configured with a compilation module. The compilation module is implemented by a future mode wrapper. The compilation module includes: a program interface and a dynamic link library.
[0117] The core idea of the Future mode is asynchronous calling. The Future mode can meet the data-driven concurrency requirements in the continuous process, which not only improves the performance of concurrent execution but also maintains the simplicity of the continuous process. For the content of the Future mode, please refer to the relevant literature, which is not specifically limited in this embodiment.
[0118] The original definition of wrapper comes from a component of an information integration system that provides a unified query interface through which data can be obtained from multiple heterogeneous information sources. In an information integration system, a wrapper is usually a program that wraps an information source (such as a database server or a web server) so that the information integration system can access the information source without changing its core query response mechanism.
[0119] In this embodiment, the first client uses a compilation module implemented by a future mode wrapper, and the compilation module can be understood as: JIT compilation—client. In addition to the compilation module, some necessary interface codes are also set on the first client; these interface codes can be exposed to the client and do not belong to the core code. This embodiment does not specifically limit these interface codes that can be exposed to the client, and can be selectively set according to actual conditions.
[0120] If the program interface is possible, it needs to be implemented as a unified coverage as much as possible. For example, the core code may only support certain specific conditional scenarios, but the program interface needs to be compatible with all situations, waiting for the update support of subsequent scenarios, and the program interface does not need to be changed. For example, the cloud vendor implements a matrix multiplication operator interface that is compatible with the commonly used cudnn / cublas library, so there is no need to modify it in the short term. Among them, the program interface can also be in the form of a .so dynamic link library or a .a static link library.
[0121] In order to prevent the program interface from being outdated, or the client's third-party call version has a major update, the established program interface cannot meet the implementation, so a more unified implementation is needed. This is not limited to the interception of underlying libraries such as libc.so under Linux, and the dynamic link library is inserted into it to ensure the universality of the underlying layer. When the above program interface is outdated, the program interface can be modified through the dynamic link library. This process compares the hash value of the program interface and downloads the URL to update the cache library.
[0122] Furthermore, the method provided in this embodiment may also include the following steps:
[0123] 308. Obtain a first hash value corresponding to the local data;
[0124] 309. Send the first hash value to the server;
[0125] 310. Receive response information fed back by the server through hash value comparison;
[0126] Among them, when the first hash value is consistent with the second hash value, the response information reflects that there is no version update of the local data; when the first hash value is inconsistent with the second hash value, the response information reflects that there is a version update of the local data; the second hash value is the target version data related to the local data stored by the server.
[0127] Alternatively, the server periodically feeds back the second hash value to the first client (the executor of this embodiment), and the first client determines whether there is a version update of the local data on the server side by comparing the first hash value with the second hash value.
[0128] Figure 6 and Figure 7 The flowchart of the data processing method provided by another embodiment of the present application is shown. In this embodiment, each step brings in the corresponding execution subject. Figure 6 The overall flow chart of the method of this embodiment is shown. Figure 7 Shows Figure 6 A specific implementation flow chart of a specific step in the process. Figure 6 The specific workflow is as follows:
[0129] S1. The first client obtains a local code.
[0130] Among them, the local code can be obtained from the local cache library, which can be the published code on the interface side. The published code on the interface side is from the perspective of the cloud vendor. In essence, it is the program interface (API) released by the cloud vendor and downloaded to the client. The program interface is used to communicate with the server (such as the cloud) and obtain the client-side code.
[0131] S2. The first client determines whether the local code needs to be updated; if so, proceed to step S3; if not, proceed to step S4.
[0132] As mentioned above, the local code can be periodically compared with the hash value of the latest version of the local code stored on the server to determine whether it needs to be updated. If the hash is inconsistent, it needs to be updated; if the hash is consistent, it does not need to be updated.
[0133] S3. The first client determines whether to postpone the update. If so, execute step S4; otherwise, execute step S6.
[0134] Among them, deferred update means waiting for the cache library to be loaded to continue executing the original code without blocking the process; the update is started after the original code in the cache library is executed. That is, the update process is executed asynchronously in the backend, and the cache library is automatically updated after the execution is completed, and the latest version can be used when it is called next time.
[0135] No delay means blocking the current process and starting the update. This is suitable for scenarios with a short compilation process and will not cause too much delay.
[0136] Whether to postpone the update can be triggered by the user of the first client. Alternatively, the compilation time is predicted, and when the predicted compilation time is less than the preset time, it is determined not to postpone the update. If the predicted compilation time is greater than or equal to the preset time, it is determined that the update needs to be postponed.
[0137] S4: The first client loads the cache library, wherein the library may be in the form of a .so dynamic link library, a .a static link library, or the like.
[0138] S5. The first client executes the code in the loaded cache library.
[0139] S6. The first client obtains the compiled file corresponding to the latest version of the code.
[0140] S7. The first client updates and loads the cache library based on the compiled file, and executes the code in the loaded cache library.
[0141] S8. The cloud obtains data information generated after execution, and analyzes the running effect of the latest version of the code based on the data information.
[0142] For example, the specific kernel time consumption within the deep model.
[0143] S9. The cloud tests whether the compiled file meets preset requirements based on the running result; if it does not meet the preset requirements, a notification message is sent to the second client so that the user can adjust the latest version of the code based on the notification message.
[0144] For example, based on the running effect, the test result of the compiled file on the cloud is compared. If there is a deviation between the running effect and the test result, it is determined that the preset requirement is not met.
[0145] S10: If the operation result meets the rollback condition, the cloud starts a rollback mechanism to make the first client roll back to the original version data.
[0146] Specifically, if the operating result indicates a significant performance loss, it is determined that the rollback condition is met.
[0147] In actual implementation, the deviation comparison strategy in S9 and the rollback condition in S10 can be manually set, and this embodiment does not specifically limit this.
[0148] Figure 7 Shown above Figure 6 The specific implementation process of step S6 is as follows:
[0149] S61. The cloud performs client certificate verification to verify the validity of the certificate of the first client.
[0150] S62: The cloud obtains hardware information of the first client, such as CPU instance ID, GPU instance ID, Mac address, etc., and authenticates the first client by comparing the hardware information.
[0151] S63: Check whether the certificate and identity are both verified. If not, the cloud prompts the first client to register.
[0152] S64: The cloud obtains configuration information of the first client.
[0153] S65: The cloud queries whether the existing compiled files contain a compiled file that is adapted to the configuration information and corresponds to the target version data. If the query finds that there is a compiled file, execute S66; otherwise, execute S67.
[0154] S66: Acquire address information of the compiled file obtained by query; and send the address information to the first client, so that the first client acquires the compiled file according to the address information.
[0155] Among them, the compiled file corresponding to the latest version of the code downloaded according to the URL will eventually be stored on the local disk of the first client, updating the cache library on the first client side, thereby realizing a dynamic update of the version. The entire process does not require user intervention or support from cloud vendor developers, and is completed automatically and seamlessly.
[0156] S67: Determine whether there is a configured hardware cluster. If not, create the hardware cluster by dynamically creating an ECS instance.
[0157] In the specific implementation, the server will have a JIT compilation-server corresponding to the client's JIT compilation-Client; cloud vendors need to maintain the JIT compilation server of their own products to receive information transmitted by the JIT-client and adaptively complete the subsequent compilation process based on the configuration information of the first client obtained above.
[0158] S68. Build a virtual environment.
[0159] The software environment is implemented in the form of containerization. A Docker container is quickly created based on the cluster environment to build a remote environment with the same environment as the first client.
[0160] S69. Compile and optimize the latest version of the code to obtain a compiled file.
[0161] Obtain the core code of the cloud vendor (i.e. the latest version of the code) and compile it based on the above remote environment. Since this process is located in the remote cluster environment of the cloud vendor, the code information will not be exposed.
[0162] S610: Store the compiled file, determine address information, and send the address information to the first client.
[0163] Alternatively, the compiled file after JIT compilation is synchronized on the cloud, and then waits for the first client to make a URL request to update the cache library of the first client.
[0164] The embodiment of the present application is based on the combination of application layer + kernel layer, which can realize the remoteness of JIT compiler in a lightweight manner (i.e. transfer JIT compilation to the cloud). The compilation time and resource occupation are completed in the cloud. The client only needs to maintain the compiled optimization results, and through the specific software and hardware architecture, there is no need to support other versions additionally. The generated compilation results are also minimized. In addition, physical isolation of the core code can be achieved.
[0165] In addition, the embodiments of the present application also have the following beneficial effects:
[0166] 1. Compiler remoteness: Through the implementation of JIT real-time compilation technology on the client and server, the ability of compilation optimization can be utilized to complete JIT compiler optimization remoteness, ensuring that the cloud vendor's code can be output to customers without any sense of loss, while ensuring better performance in the customer's specific hardware environment.
[0167] 2. Delayed compilation: By using the cloud + client backend process method, the problem of long remote compilation time causing significant performance loss on the client side can be avoided.
[0168] 3. Double cache: Through the server cache + client cache method, it can make full use of repeated requests from many users, reduce compilation time, and reduce the overhead of remote communication during repeated calls.
[0169] 4. Dual interface: The FutureWrapper method of the client program interface + dynamic link library is adopted to greatly improve the seamless update capability of the code. On the one hand, the program interface is located at the application layer, which is upward compatible and can support more interfaces to ensure the remote update of more algorithms in the future; on the other hand, the dynamic link library is located at the kernel layer and is the interception implementation of the underlying library. When the program interface has a major update, the code corresponding to the program interface can still be dynamically updated through remote update, thereby ensuring seamless update.
[0170] 5. Ease of use: For actual user calls, there is no need to consider the update issues of multiple versions, the calls can be completed seamlessly, and the size of the product package is greatly reduced; for cloud vendor developers, there is no need to maintain numerous version libraries, and the core code inside the product will not be leaked.
[0171] This solution uses JIT compiler optimization and remote technology to release cloud vendor codes, reduce the size of software packages, adaptively optimize the version environment with explosive customer combinations, reduce the release investment of code version updates, fundamentally protect code security, and ensure the competitiveness, sustainability and user stickiness of cloud vendor products with efficient output.
[0172] Figure 8 A schematic diagram of the structure of a data processing device provided by an embodiment of the present application is shown. As shown in the figure, the data processing device includes: a receiving module 11, a determining module 12 and a sending module 13. The receiving module 11 is used to receive a version update request sent by a first client; wherein the version update request includes the configuration information of the client. The determining module 12 is used to determine the target version data according to the version update request; and to determine the compiled file corresponding to the target version data according to the configuration information. The sending module 13 is used to feed back the address information of the compiled file to the first client, so that the first client obtains the compiled file based on the address information.
[0173] Furthermore, when the determination module 12 determines the compiled file corresponding to the target version data according to the configuration information, it is specifically used to:
[0174] According to the configuration information, query whether the existing compiled files contain a compiled file that is adapted to the configuration information and corresponds to the target version data;
[0175] If yes, obtain the compiled file;
[0176] If not, construct a device environment that is the same as the first client environment according to the configuration information; compile the target version data in the device environment to obtain the compiled file.
[0177] Furthermore, the data processing device provided in this embodiment may also include: an acquisition module and an analysis module. The acquisition module is used to acquire data information generated after the first client loads and executes the compiled file. The analysis module is used to analyze the operating effect of the target version data based on the data information. The sending module is also used to send a notification message to the second client when the operating effect does not meet the preset requirements, so that the user can adjust the target version data based on the notification message.
[0178] Furthermore, the data processing device provided in this embodiment may further include: a rollback module. The rollback module is used to start a rollback mechanism when the operation result meets the rollback condition, so as to roll back the first client to the original version data.
[0179] It should be noted here that the data processing device provided in the above embodiment can implement the technical solution described in the above data processing method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above data processing method embodiment, which will not be repeated here.
[0180] Fig. 9 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present application. Fig. 9 As shown, the data processing device includes: an acquisition module 21, a sending module 22, a receiving module 23 and an updating module 24. Among them, the acquisition module 21 is used to obtain local configuration information when it is determined that the local data has a version update on the server side. The sending module 22 is used to send a version update request to the server based on the configuration information. The receiving module 23 is used to receive the address information fed back by the server. The acquisition module 21 is also used to obtain the compiled file corresponding to the target version data from the server according to the address information. The updating module 24 is used to store the compiled file in the local cache library to complete the version update of the local data.
[0181] Furthermore, when determining that the local data has a version update on the server side and obtaining the local configuration information, the acquisition module 21 is specifically used to:
[0182] Determine whether to postpone the update;
[0183] If not, perform certificate verification by interacting with the server, and obtain local hardware information when verifying that the certificate is valid;
[0184] Sending the hardware information to the server, so that the server performs identity authentication on the client based on the hardware information;
[0185] After the identity authentication is passed, obtaining the configuration information;
[0186] The configuration information includes software configuration information and hardware configuration information.
[0187] Furthermore, the local data is a program interface stored in a local cache library, and the local cache library also stores a dynamic link library. Accordingly, the data processing device provided in this embodiment may also include: an update module. The update module detects whether the program interface has a version update on the server side through the dynamic link library; if there is a version update, it triggers the step of sending a version update request to the server based on the configuration information.
[0188] Furthermore, the update module in the data processing device provided in this embodiment is also used for:
[0189] Obtain a first hash value corresponding to the local data;
[0190] Sending the first hash value to the server;
[0191] Receive the response information from the server through hash value comparison;
[0192] Among them, when the first hash value is consistent with the second hash value, the response information reflects that there is no version update of the local data; when the first hash value is inconsistent with the second hash value, the response information reflects that there is a version update of the local data; the second hash value is the target version data related to the local data stored by the server.
[0193] It should be noted here that the data processing device provided in the above embodiment can implement the technical solution described in the above data processing method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above data processing method embodiment, which will not be repeated here.
[0194] Fig.10 The schematic diagram of the principle structure of an electronic device provided by an embodiment of the present application is shown. The electronic device includes a processor 32 and a memory 31. The memory 31 is used to store one or more computer instructions; the processor 32 is coupled to the memory 31, and is used for one or more computer instructions (such as computer instructions for implementing data storage logic) to implement the steps in the above data processing method embodiment, or the steps in the above screenshot method embodiment.
[0195] The memory 31 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0196] Further, if Fig.10 As shown, the electronic device also includes other components such as a communication component 33, a power component 35, a display 34 and an audio component 36. Fig.10 Only some components are shown schematically, which does not mean that the electronic device only includes Fig.10 Components shown.
[0197] The electronic device in this embodiment can be a GPU / GPU stand-alone, a server or a cluster. The cluster can be a server cluster, a GPU cluster, or a CPU cluster.
[0198] In a specific application scenario, the server in this embodiment is a GPU cluster, which can be implemented using CUDA (Compute Unified Device Architecture). CUDA is a general-purpose parallel computing architecture that enables GPUs to solve complex computing problems. It includes the CUDA instruction set architecture (ISA) and the parallel computing engine inside the GPU. For example, the calculation in CUDA is divided into two parts. The serial part is executed on the Host, that is, the CPU; and the parallel part is executed on the Device, that is, the GPU. The device code part is handed over to a component called the Just in Time compiler, which is compiled before running the code into a bytecode file similar to Java, called PTX, and then generates an ISA to run on the GPU.
[0199] Another embodiment of the present application provides a computer program product (not shown in the accompanying drawings of the specification). The computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the processor is enabled to implement the steps in the above-mentioned method embodiments.
[0200] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the method steps or functions provided in the above embodiments can be implemented.
[0201] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing system, characterized in that: The first client is used to detect whether the program interface has a version update on the server side through a dynamic link library; when it is determined that the local data has a version update on the server side, obtain local configuration information; send a version update request to the server based on the configuration information; wherein, a compilation module is configured on the first client; the compilation module is implemented using a future mode wrapper; the compilation module includes: a program interface and a dynamic link library; the program interface is local data stored in a local cache library, the program interface is in the form of a link library, and the configuration information includes software configuration information and hardware configuration information; The server is configured to determine the target version data after receiving the version update request; construct a device environment identical to the first client environment according to the configuration information contained in the version update request; compile the target version data using the just-in-time compilation (JIT) technology in the device environment to obtain a compiled file; and feed back the address information of the compiled file to the first client; The first client is used to obtain the compiled file from the server based on the address information after receiving the address information; and store the compiled file in a local cache library to complete the version update of local data.
2. The data processing system according to claim 1, characterized in that: The server is also used for: According to the configuration information, query whether the existing compiled files contain a compiled file that is adapted to the configuration information and corresponds to the target version data; If yes, obtain the compiled file; If not, executing the steps of building a device environment identical to the first client environment according to the configuration information included in the version update request; and compiling the target version data in the device environment to obtain the compiled file.
3. The data processing system according to claim 1 or 2, characterized in that: Also includes a second client; and The server is further configured to obtain data information generated after the first client loads and executes the compiled file; based on the data information, analyze the running effect of the target version data; if the running effect does not meet the preset requirements, send a notification message to the second client; The second client is used to receive and output the notification message, so that the user can adjust the target version data based on the notification message.
4. The data processing system according to claim 1 or 2, characterized in that: When the first client determines that the local data has a version update on the server side and obtains the local configuration information, it is specifically used to: Determine whether to postpone the update; If not, perform certificate verification by interacting with the server, and obtain local hardware information when verifying that the certificate is valid; Sending the hardware information to the server, so that the server performs identity authentication on the client based on the hardware information; After the identity authentication is passed, the configuration information is obtained.
5. A data processing method, characterized in that: Suitable for the server, the method includes: Receive a version update request sent by a first client; wherein the version update request includes configuration information of the first client, and the first client is used to detect whether the program interface has a version update on the server side through a dynamic link library; when it is determined that the local data has a version update on the server side, obtain local configuration information; send a version update request to the server based on the configuration information; wherein a compilation module is configured on the first client; the compilation module is implemented using a future mode wrapper; the compilation module includes: a program interface and a dynamic link library; the program interface is local data stored in a local cache library, the program interface is in the form of a link library, and the configuration information includes software configuration information and hardware configuration information; Determining target version data according to the version update request; According to the configuration information, a device environment identical to the first client environment is constructed; in the device environment, the target version data is compiled using a just-in-time compilation (JIT) technology to obtain a compiled file; The address information of the compiled file is fed back to the first client so that the first client obtains the compiled file based on the address information.
6. The method according to claim 5, characterized in that According to the configuration information, a device environment identical to the first client environment is constructed, and before the target version data is compiled in the device environment to obtain the compiled file, the method further includes: According to the configuration information, query whether the existing compiled files contain a compiled file that is adapted to the configuration information and corresponds to the target version data; If yes, obtain the compiled file; If not, executing the steps of constructing a device environment identical to the first client environment according to the configuration information; and compiling the target version data in the device environment to obtain the compiled file.
7. The method according to claim 5 or 6, characterized in that: Also includes: Acquire data information generated after the first client loads and executes the compiled file; Based on the data information, analyzing the operation effect of the target version data; If the running result does not meet the preset requirement, a notification message is sent to the second client so that the user can adjust the target version data based on the notification message.
8. The method according to claim 7, characterized in that Also includes: If the operation result meets the rollback condition, the rollback mechanism is started to make the first client roll back to the original version data.
9. A data processing method, characterized in that: Suitable for the first client, the method includes: Detect whether the program interface has a version update on the server side through the dynamic link library, and when it is determined that the local data has a version update on the server side, obtain local configuration information, wherein the first client is configured with a compilation module; the compilation module is implemented by a future mode wrapper; the compilation module includes: a program interface and a dynamic link library; the program interface is local data stored in a local cache library, the program interface is in the form of a link library, and the configuration information includes software configuration information and hardware configuration information; Sending a version update request to the server based on the configuration information; Receiving address information fed back by the server; According to the address information, a compiled file is obtained from the server by compiling the target version data using a just-in-time compilation (JIT) technology; The compiled file is stored in a local cache library to complete the version update of the local data.
10. The method according to claim 9, characterized in that When it is determined that the local data has a version update on the server side, obtain the local configuration information, including: Determine whether to postpone the update; If not, perform certificate verification by interacting with the server, and obtain local hardware information when verifying that the certificate is valid; Sending the hardware information to the server, so that the server performs identity authentication on the client based on the hardware information; After the identity authentication is passed, the configuration information is obtained.
11. The method according to claim 9, characterized in that Also includes: Obtain a first hash value corresponding to the local data; Sending the first hash value to the server; Receive the response information from the server through hash value comparison; Among them, when the first hash value is consistent with the second hash value, the response information reflects that there is no version update of the local data; when the first hash value is inconsistent with the second hash value, the response information reflects that there is a version update of the local data; the second hash value is the target version data related to the local data stored by the server.
12. An electronic device, characterized in that: comprising a memory and a processor; wherein, The memory stores one or more computer instructions; The processor, coupled to the memory, is configured to execute the one or more computer instructions to implement the steps of the method described in any one of claims 5 to 8, or to implement the steps of the method described in any one of claims 9 to 11.
Citation Information
Patent Citations
Method and device for acquiring service quality information, client and server
CN106452916A
Method for generating static link library file with configurable parameters
CN111045680A
