Processor deployment file streaming loading method and device, equipment and storage medium

By employing a processor deployment file loading method that combines block processing and encapsulation, the problem of low loading efficiency in remote inference systems is solved, resulting in more stable and reliable data transmission and loading, and enhancing the system's versatility and compatibility.

CN120909497APending Publication Date: 2025-11-07SOPHGO TECH LTD

Patent Information

Application Number
CN202510802140.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In remote inference systems, the processor's deployment file loading efficiency is low. Especially when security requirements are high, the process of downloading to the local hard drive increases security risks, while transferring to memory consumes a lot of memory, resulting in high hardware costs.

Method used

The system uses preset packaging rules to divide and encapsulate the target processor deployment file into blocks, generating encapsulated data packets. The data is then parsed and loaded at the data receiving end, supporting the transmission and loading of multiple data formats and enhancing the system's versatility and compatibility.

Benefits of technology

It improves the loading efficiency of processor deployment files, reduces security risks, saves storage and computing resources, and adapts to data needs in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909497A_ABST
    Figure CN120909497A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a processor deployment file streaming loading method and device, equipment and a storage medium, and the method comprises the steps: partitioning a target processor deployment file into at least one encapsulation data packet based on a preset packaging rule; sending the packaged data packet to a data receiving end, performing data analysis on the packaged data packet, and determining the data type of the sub-data; and loading the encapsulated data packet based on the loading rule and the data type. Through the above mode, the processor deployment file is subjected to block processing, the large file is divided into a plurality of small blocks, and the packaging information is added to each data block, so that the data block is more stable and reliable in the transmission process. And when the receiving end analyzes the packaged data packet, clearly distinguishing the data type of each piece of sub-data. The receiving end can flexibly analyze different types of data according to the packaging information through clear type distinguishing, loading of multiple data formats is supported, and then the loading efficiency of file deployment of the processor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a processor deployment file streaming loading method and device, equipment and a storage medium. BACKGROUND

[0002] In a remote inference system, a remote machine needs to control a local machine to load a processor deployment file onto a heterogeneous device and call the local heterogeneous device for inference calculation. Model files are usually stored on the remote machine, and the local machine does not need to retain the model files. When the heterogeneous device infers, the processor deployment file used is usually loaded atomically, that is, the model file is read from the local hard disk into the memory at one time, and then the initialization of the running environment is performed, including reading meta information, reading and uploading instructions, reading and uploading weight data, and running space application processes. If the processor deployment file is saved on the remote machine in a network environment, it needs to be downloaded to the local machine first and then loaded. In the case of high security requirements, the process of downloading to the local hard disk increases the opportunity for security exposure. If it is only transmitted to the memory, the complete model also needs to be saved in the memory for further loading, which will also occupy a lot of memory, especially in the current large language model loading situation, which puts high requirements on the memory capacity and increases the hardware cost. Therefore, how to improve the loading efficiency of the processor deployment file has become a technical problem to be solved at present. SUMMARY

[0003] The present application provides a processor deployment file streaming loading method, device, equipment and storage medium to improve the loading efficiency of the processor deployment file.

[0004] In a first aspect, the present application provides a processor deployment file streaming loading method, which comprises:

[0005] Based on a preset packaging rule, the target processor deployment file is processed by block and encapsulated at the data sending end to generate at least one encapsulated data packet;

[0006] Each encapsulated data packet is sent to a data receiving end, and each encapsulated data packet is data-analyzed to determine the data type of the sub-data in each encapsulated data packet;

[0007] Based on a preset loading rule and each data type, each encapsulated data packet is loaded by the data receiving end.

[0008] In a second aspect, the present application also provides a processor deployment file streaming loading device, which comprises:

[0009] The encapsulation data packet generation module is configured to perform block processing and encapsulation processing on the target processor deployment file at the data sending end based on a preset packaging rule to generate at least one encapsulation data packet.

[0010] The data type analysis module is configured to send each encapsulation data packet to the data receiving end and perform data analysis on each encapsulation data packet to determine the data type of the sub-data in each encapsulation data packet.

[0011] The data loading module is configured to load each encapsulation data packet through the data receiving end based on a preset loading rule and the data types.

[0012] In a third aspect, the present application further provides a computer device, which comprises a memory and a processor; the memory is configured to store a computer program; the processor is configured to execute the computer program and implement the processor deployment file streaming loading method as described above when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program; the computer program is executed by a processor to make the processor implement the processor deployment file streaming loading method as described above.

[0014] The present application discloses a processor deployment file streaming loading method, device, equipment and storage medium. The processor deployment file streaming loading method comprises the following steps: performing block processing and encapsulation processing on a target processor deployment file at a data sending end based on a preset packaging rule to generate at least one encapsulation data packet; sending each encapsulation data packet to a data receiving end and performing data analysis on each encapsulation data packet to determine the data type of the sub-data in each encapsulation data packet; and loading each encapsulation data packet through the data receiving end based on a preset loading rule and the data types. In this way, the target processor deployment file is processed in blocks, so that a large file can be split into multiple small blocks, necessary encapsulation information is added to each data block to make the transmission process more stable and reliable. When the data receiving end analyzes the encapsulation data packet, the data types of the sub-data can be clearly distinguished. The clear type distinction enables the receiving end to flexibly analyze different types of data according to the encapsulation information, supports the transmission and loading of multiple data formats, enhances the universality and compatibility of the system, and thus improves the loading efficiency of the processor deployment file. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.

[0016] Figure 1 is a schematic flow chart of a processor deployment file streaming loading method provided by the first embodiment of the present application;

[0017] Figure 2 is a schematic flow chart of a processor deployment file streaming loading method provided by the second embodiment of the present application;

[0018] Figure 3 is a schematic flow chart of a processor deployment file streaming loading method provided by the third embodiment of the present application;

[0019] Figure 4 is a loading flow schematic diagram of a processor deployment file streaming loading method provided by the third embodiment of the present application;

[0020] Figure 5 is a schematic block diagram of a processor deployment file streaming loading apparatus provided by the embodiments of the present application;

[0021] Figure 6 is a structural schematic block diagram of a computer device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the protection scope of the present application.

[0023] The flow charts shown in the drawings are only exemplary and do not necessarily include all the contents and operations / steps, and do not necessarily be executed in the described order. For example, some operations / steps can be decomposed, combined or partially merged, so that the actual execution order can be changed according to the actual situation.

[0024] It should be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0025] It should also be understood that the term "and / or" as used herein refers to a combination of one or more of the associated listed items, and all possible combinations, and includes these combinations.

[0026] Embodiments of the present application provide a processor deployment file streaming loading method, device, equipment and storage medium. Wherein, the processor deployment file streaming loading method can be applied to a server, by chunking the target processor deployment file, the large file can be split into multiple small blocks, and necessary packaging information is added to each data block, so that it is more stable and reliable in the transmission process. When the data receiving end parses the packaged data packet, it can clearly distinguish the data types of each sub-data. The clear type distinction enables the receiving end to flexibly parse different types of data according to the packaging information, supports the transmission and loading of multiple data formats, enhances the versatility and compatibility of the system, and thus improves the loading efficiency of the processor deployment file. Wherein, the server can be an independent server, or a server cluster.

[0027] Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.

[0028] Please refer to Figure 1 , Figure 1 is a schematic flow chart of a processor deployment file streaming loading method provided by the first embodiment of the present application. The processor deployment file streaming loading method can be applied to a server, which is used to chunk the target processor deployment file, so that the large file can be split into multiple small blocks, and necessary packaging information is added to each data block, so that it is more stable and reliable in the transmission process. When the data receiving end parses the packaged data packet, it can clearly distinguish the data types of each sub-data. The clear type distinction enables the receiving end to flexibly parse different types of data according to the packaging information, supports the transmission and loading of multiple data formats, enhances the versatility and compatibility of the system, and thus improves the loading efficiency of the processor deployment file.

[0029] As shown in Figure 1 , the processor deployment file streaming loading method specifically includes steps S10 to S30.

[0030] Step S10, based on a preset packaging rule, the target processor deployment file is chunked and packaged at the data sending end to generate at least one packaged data packet;

[0031] Step S20, sending each of the packaged data packets to a data receiving end and performing data analysis on each of the packaged data packets to determine the data type of the sub-data in each of the packaged data packets;

[0032] Step S30, based on the preset loading rules and each data type, loading each encapsulated data packet by the data receiving end.

[0033] In one embodiment, according to the size and transmission requirements of the target processor deployment file, the size of the partition (for example, 1MB per partition or dynamically divided according to the characteristics of the file) is determined, the format of the encapsulated data packet is determined, including the organization of metadata (such as data block number, data type, and check information) and data content. Assign a unique identifier to each data type for subsequent parsing and loading.

[0034] Load the target processor deployment file from the storage, according to the preset partitioning strategy, divide the file into multiple sub-data blocks, add metadata to each partitioned data, including data block number, data type identifier, and check information, combine the partitioned data and metadata into an encapsulated data packet, encapsulate all partitioned data to generate an encapsulated data packet list. Establish a communication connection with the data receiving end (for example, through network sockets, HTTP protocol, etc.), and send all encapsulated data packets to the data receiving end one by one.

[0035] Establish a communication connection with the data sending end, prepare to receive data, receive each encapsulated data packet sent by the sending end one by one, and temporarily store it in the buffer, parse the metadata of each encapsulated data packet, and extract the data block number, data type identifier, and check information.

[0036] According to the data type and application scenario, define the loading strategy, such as on-demand loading, sequential loading or parallel loading, determine the loading order of different data types to meet the running requirements of the preset model, and finally recombine the loaded sub-data into a complete target processor deployment file. Verify whether the loaded data meets the expectations, for example, through file size, checksum, etc.

[0037] The embodiment discloses a processor deployment file streaming loading method, device, equipment and storage medium, the processor deployment file streaming loading method comprises the following steps: based on a preset packing rule, performing block processing and packaging processing on a target processor deployment file at a data sending end to generate at least one packaged data packet; sending each packaged data packet to a data receiving end, performing data analysis on each packaged data packet, and determining the data type of the sub-data in each packaged data packet; and based on a preset loading rule and the data types, loading each packaged data packet through the data receiving end. In the foregoing manner, the target processor deployment file is subjected to block processing, so that a large file can be split into multiple small blocks, necessary packaging information is added to each data block, and the data block is more stable and reliable in the transmission process. When the data receiving end analyzes the packaged data packet, the data types of the sub-data can be clearly distinguished. Clear type distinction enables the receiving end to flexibly analyze different types of data according to the packaging information, supports transmission and loading of multiple data formats, enhances the universality and compatibility of the system, and further improves the loading efficiency of the processor deployment file.

[0038] Referring to Figure 2 , Figure 2 is a schematic flowchart of a processor deployment file streaming loading method provided by the second embodiment of the application. The processor deployment file streaming loading method can be applied to a server, and is used to clearly distinguish the data types of sub-data when the data receiving end analyzes the packaged data packet, so that the data receiving end can adopt a targeted processing strategy according to different types of data, and avoids analysis errors caused by data type confusion. The data is subjected to packaging processing at the sending end, and the receiving end can flexibly analyze different types of data according to the packaging information, supports transmission and loading of multiple data formats. This enables the system to better adapt to data requirements in different scenarios, enhances the universality and compatibility of the system, and further improves the loading efficiency of the processor deployment file.

[0039] Based on Figure 1 the embodiment, step S10 comprises steps S101 to S102.

[0040] Step S101: According to the preset packing rule, the data parameters of the target processor deployment file are determined.

[0041] Specifically, the size of the block is determined, for example, a fixed size such as 1MB, or dynamically adjusted according to the file characteristics. According to the size of the file and the size of the block, the number of blocks is determined, and it is determined whether special processing is required for a specific part, for example, the header information or key parameters of the model file.

[0042] determine the structure of the encapsulated data packet, including metadata (such as data block number, data type, block size, check information, etc.) and data content, and determine the encoding method of the metadata (for example, JSON, binary format, etc.).

[0043] determine the data parameters of the target processor deployment file that need to be extracted, such as file size, file type, model version, key field, etc., and determine the storage location of the data parameters (for example, file header, specific field, etc.).

[0044] In step S102, at least one sub-data is generated according to the data parameters and the target processor deployment file, and each sub-data is encapsulated to generate at least one encapsulated data packet.

[0045] In one embodiment, the content of the target processor deployment file is opened and read, the required data parameters are extracted from the model file according to the preset packaging rule, the size of each sub-data block is determined according to the data parameters (such as file size) and the preset packaging rule, and the target processor deployment file is segmented into multiple sub-data blocks according to the block size.

[0046] The structure of the encapsulated data packet is parsed, the metadata and data content are determined, the metadata is added to each sub-data block, and the encapsulated data packet is generated. The encapsulated sub-data blocks are organized into one or more encapsulated data packets, and if necessary, multiple sub-data blocks can be merged into one larger encapsulated data packet. The encapsulated data packet is saved to a file, sent to a network, or stored in a memory.

[0047] The processor deployment file streaming loading method, device, equipment and storage medium disclosed in the embodiment include determining the data parameters of the target processor deployment file according to the preset packaging rule; generating at least one sub-data according to the data parameters and the target processor deployment file, and encapsulating each sub-data to generate at least one encapsulated data packet; sending each encapsulated data packet to a data receiving end and performing data analysis on each encapsulated data packet to determine the data type of each sub-data in the encapsulated data packet; and loading each encapsulated data packet through the data receiving end based on a preset loading rule and each data type. In this way, the data types of each sub-data are clearly distinguished when the encapsulated data packet is analyzed at the data receiving end, so that the data receiving end can adopt a targeted processing strategy according to different types of data, avoiding analysis errors caused by data type confusion. The data is encapsulated at the sending end, and the receiving end can flexibly analyze different types of data according to the encapsulation information, supporting the transmission and loading of multiple data formats. This makes the system better adapt to data needs in different scenarios, enhances the universality and compatibility of the system, and thus improves the loading efficiency of the processor deployment file.

[0048] Based on Figure 2 In the embodiment shown in the figure, step S102 includes:

[0049] According to the data size parameter, the target processor deployment file is split into at least one sub-data;

[0050] According to the data position parameter, each sub-data is sorted to generate a sub-data list;

[0051] According to the sub-data list, each sub-data is encapsulated to generate each encapsulated data packet.

[0052] Specifically, the target processor deployment file is opened and loaded to obtain its complete content, the data size parameter is extracted to obtain the total size of the target processor deployment file, which is used for subsequent block processing, the starting position and the ending position of the block to be divided are determined, or the rules of the block division are defined, for example, the block division according to a fixed size or the block division according to a specific field.

[0053] According to the data size parameter (such as the block size), the target processor deployment file is split into multiple sub-data blocks, and the number, size and data content of each sub-data block are recorded. According to the data position parameter (such as the number of the sub-data block or a specific field), the sorting rule is defined, it is assumed that the sub-data blocks are sorted according to the numbers of the sub-data blocks (usually, the block order is the data position order), the sub-data blocks are sorted to generate a sub-data list, the structure of the encapsulated data packet is determined, including the metadata (such as the number, size and check information of the sub-data block) and the data content, the sub-data list is traversed, and each sub-data block is encapsulated into an encapsulated data packet according to the encapsulation structure.

[0054] Further, after each sub-data is encapsulated into an encapsulated data packet according to the sub-data list, the following steps are included:

[0055] Detecting whether there is unblocked sub-data in the target processor deployment file;

[0056] In the case where it is detected that there is no unblocked sub-data in the target processor deployment file, the encapsulation result is sent to the data sending end.

[0057] Specifically, the complete content of the target processor deployment file is opened and read, a flag variable is defined to record whether all data has been chunked. The file is split into multiple sub-data blocks according to the chunking rule, and it is checked whether there is unchunked part. It should be noted that if the file size cannot be divided by the chunk size, it is checked whether the last chunk is complete. According to the return value of the flag variable, it is determined whether all data has been chunked. If the return value is 1, it means that all data has been chunked; if the return value is 0, there is unchunked data, and the unchunked data needs to be chunked again.

[0058] Based on Figure 2 In the embodiment shown, after step 102, the embodiment further includes:

[0059] According to the target processor deployment file, a preset encryption algorithm and a preset encryption protocol are determined.

[0060] Each of the encapsulated data packets is encrypted by the preset encryption algorithm, and the preset encryption protocol is sent to the data receiving end for the data receiving end to decrypt the encapsulated data packets.

[0061] Specifically, the target processor deployment file is loaded, and its related information is obtained. The file container stores information such as the encryption algorithm, the encryption protocol, and the encryption factor corresponding to the target processor deployment file. According to the encryption factor and the master key, a key for encryption is generated. Assuming that the encapsulated data packets have been generated, these data packets are loaded. The encapsulated data packets are encrypted according to the encryption algorithm specified by the target processor deployment file, and the encapsulated data packets are iterated and encrypted using the preset encryption algorithm.

[0062] A communication connection is established with the data receiving end, and the preset encryption protocol is sent to the data receiving end, so that the receiving end uses the same protocol to decrypt the data. The encrypted encapsulated data packets are sent one by one to the data receiving end.

[0063] In a more preferred embodiment, step S20 includes:

[0064] According to the preset encryption protocol and the preset encryption algorithm, each of the encapsulated data packets is decrypted by the data receiving end;

[0065] Each of the encapsulated data packets is parsed by the data receiving end to determine the data header, the data block, and the check code of each of the encapsulated data packets;

[0066] According to the data header, the data block, and the check code, each of the data types in each of the encapsulated data packets is determined.

[0067] Specifically, a communication connection between the data receiving end and the data sending end is established, and encrypted data packets and encrypted protocol information are received. In addition, the encrypted protocol information sent by the data sending end is received, including the encryption algorithm and protocol details, the encrypted data packets (i.e., encrypted encapsulated data packets) are received, and temporarily stored in a buffer.

[0068] According to the preset encryption protocol, the key required for decryption is loaded or generated, each encrypted data packet is decrypted using the preset encryption algorithm, and the data header, data block, and check code of each encapsulated data packet are obtained. The data header usually contains data type information, such as the purpose or format of the data block, and the parsed data is stored in a file, database, or memory.

[0069] Referring to Figure 3 , Figure 3 is a schematic flowchart of a processor deployment file streaming loading method provided by a third embodiment of the present application. The processor deployment file streaming loading method can be applied to a server, and is used to allocate memory and load instruction data and weight data on demand according to information in model description data through a data receiving end, and gradually load data according to actual needs, rather than load the entire file at once, thereby saving storage resources and computing resources. The preset rules are dynamically adjusted according to different application scenarios and needs, and for different target processor deployment files or different network environments, the block size and encapsulation method can be flexibly adjusted to achieve optimal performance, thereby improving the loading efficiency of the processor deployment file.

[0070] Based on the embodiment shown in Figure 1 , in this embodiment, step S30 includes steps S301 to S304.

[0071] Step S301, receiving all the metadata and parsing the all metadata to generate model description data;

[0072] Step S302, according to the model description data, respectively allocating the receiving end memory of the instruction data and the weight data;

[0073] Step S303, calculating the instruction data offset of the instruction data according to the receiving end memory of the instruction data, and loading the instruction data to the instruction data offset;

[0074] Step S304, calculating the weight data offset of the weight data according to the receiving end memory of the weight data, and loading the weight data to the weight data offset.

[0075] In one embodiment, the data receiving end establishes a communication connection, receives the metadata sent from the sending end, and the metadata generally includes the structural information of the model, the size and type of the instruction data and the weight data, etc. According to the size of the instruction data and the weight data, the corresponding memory space is allocated. According to the allocated memory, the offset is calculated, and the instruction data is loaded to the specified position. Similarly, the weight data is loaded to the allocated memory. It is checked whether the loaded data is consistent with the expectation, for example, by checking the checksum or the data size verification.

[0076] As shown in Figure 4 , Figure 4 is a loading flow diagram of a processor deployment file streaming loading method provided by the third embodiment of the present application. The model file is sequentially stored in the following data content order: metadata, instruction data, and weight data. The metadata has a small data volume and can be contained in one or two data packets, and needs to be received completely before being parsed completely. The instruction data and the weight data are large, but the position where the received data should be loaded can be calculated according to the already allocated space and the received data volume. The “waiting for the data from the sending end to arrive” state enters the “metadata parsing” state after receiving the first data packet. In the “metadata parsing” state, more initialization work needs to be done, including applying for and initializing the memory required by the weight data, the instruction data, the running space, the input and output information record, etc. on the heterogeneous device. When the metadata parsing is completed, the “instruction data uploading” and “weight data uploading” states are sequentially reached. Finally, the model loading is completed, and the state of loading success is returned to the sending end. The error conditions include data packet verification or decryption error, metadata parsing error, data receiving exception, receiving timeout, etc. The received data needs to be cleaned up, the allocated space needs to be released, and the sending end needs to be informed of the error so as to stop sending, etc.

[0077] After the metadata is parsed, the model description data is generated, and the device memory is allocated, including the weight data, the instruction data, and the calculation data space. If the metadata is not complete and the data packet is received, an error is prompted and an error state is returned. According to the uploaded data volume, the offset is calculated, and the instruction data is uploaded to the corresponding offset. If the instruction is not uploaded completely and the data packet is received, an error is prompted and an error state is returned. After the instruction is uploaded completely, the weight data uploading stage is entered.

[0078] When the weight data volume is large, the offset is calculated according to the uploaded data volume, and the weight data is uploaded to the corresponding offset. If the weight is not uploaded completely and the data packet is received, an error is prompted and an error state is returned. In the case that the weight data uploading is completed, the successful loading stage is entered.

[0079] The embodiment discloses a processor deployment file streaming loading method, device, equipment and storage medium. The processor deployment file streaming loading method comprises the following steps: based on a preset packaging rule, performing block processing and packaging processing on a target processor deployment file at a data sending end to generate at least one packaging data packet; sending each packaging data packet to a data receiving end, performing data analysis on each packaging data packet, and determining the data type of the sub-data in each packaging data packet; receiving all metadata, and analyzing the metadata to generate model description data; respectively allocating the receiving end memory of the instruction data and the weight data according to the model description data; calculating the instruction data offset of the instruction data according to the receiving end memory of the instruction data, and loading the instruction data to the instruction data offset; calculating the weight data offset of the weight data according to the receiving end memory of the weight data, and loading the weight data to the weight data offset. In the foregoing manner, the data receiving end allocates memory and loads instruction data and weight data on demand according to the information in the model description data, and gradually loads data according to actual needs instead of loading the entire file at one time, thereby saving storage resources and computing resources. The preset rule is dynamically adjusted according to different application scenarios and needs, and the block size and packaging mode can be flexibly adjusted for different target processor deployment files or different network environments to achieve optimal performance, thereby improving the loading efficiency of the processor deployment file.

[0080] Please refer to Figure 5 , Figure 5 An embodiment of the present application provides a schematic block diagram of a processor deployment file streaming loading device, which is used for executing the processor deployment file streaming loading method described above. The processor deployment file streaming loading device can be configured in a server.

[0081] As Figure 5 shown, the processor deployment file streaming loading device 400 comprises:

[0082] The packaging data packet generation module 410 is configured to perform block processing and packaging processing on a target processor deployment file at a data sending end based on a preset packaging rule to generate at least one packaging data packet.

[0083] The data type analysis module 420 is configured to send each packaging data packet to a data receiving end, perform data analysis on each packaging data packet, and determine the data type of the sub-data in each packaging data packet.

[0084] The data loading module 430 is configured to load each packaging data packet through the data receiving end based on a preset loading rule and each data type.

[0085] Further, the encapsulation data packet generation module 410 comprises:

[0086] The data parameter determination sub-module is configured to determine data parameters of the target processor deployment file according to the preset packaging rule.

[0087] The encapsulation data packet generation sub-module is configured to generate at least one sub-data according to the data parameters and the target processor deployment file, and perform encapsulation processing on each sub-data to generate at least one encapsulation data packet.

[0088] Further, the encapsulation data packet generation sub-module comprises:

[0089] The data splitting unit is configured to split the target processor deployment file into at least one sub-data according to the data size parameter.

[0090] The sub-data list generation unit is configured to sort each sub-data according to the data position parameter to generate a sub-data list.

[0091] The encapsulation data packet generation unit is configured to encapsulate each sub-data according to the sub-data list to generate each encapsulation data packet.

[0092] Further, the encapsulation data packet generation sub-module comprises:

[0093] The unblocked sub-data detection unit is configured to detect whether there is unblocked sub-data in the target processor deployment file.

[0094] The encapsulation result sending unit is configured to send an encapsulation result to the data sending end in a case where it is detected that there is no unblocked sub-data in the target processor deployment file.

[0095] Further, the encapsulation data packet generation module 410 comprises:

[0096] The encryption algorithm and protocol sub-module is configured to determine a preset encryption algorithm and a preset encryption protocol according to the target processor deployment file.

[0097] The encryption protocol sending sub-module is configured to perform encryption processing on each encapsulation data packet through a preset encryption algorithm, and send the preset encryption protocol to the data receiving end to decrypt the encapsulation data packet.

[0098] Further, the data type analysis module 420 comprises:

[0099] The decryption sub-module is configured to perform decryption processing on each encapsulation data packet through the data receiving end according to the preset encryption protocol and the preset encryption algorithm.

[0100] The encapsulated data packet parsing submodule is configured to parse each encapsulated data packet by the data receiving end, determine the data header, the data block, and the check code of each encapsulated data packet.

[0101] The data type determination submodule is configured to determine each data type in each encapsulated data packet according to the data header, the data block, and the check code.

[0102] Further, the data loading module 430 comprises:

[0103] The model description data generation submodule is configured to receive all the metadata and parse the all metadata to generate model description data.

[0104] The receiving end memory allocation submodule is configured to allocate the receiving end memory of the instruction data and the weight data respectively according to the model description data.

[0105] The instruction data loading submodule is configured to calculate the instruction data offset of the instruction data according to the receiving end memory of the instruction data, and load the instruction data to the instruction data offset.

[0106] The weight data loading submodule is configured to calculate the weight data offset of the weight data according to the receiving end memory of the weight data, and load the weight data to the weight data offset.

[0107] It should be noted that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0108] The above-described device can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 6 .

[0109] Please refer to Figure 6 , Figure 6 is a structural schematic block diagram of a computer device provided by an embodiment of the present application. The computer device can be a server.

[0110] Referring to Figure 6 , the computer device comprises a processor, a memory, and a network interface connected through a system bus, wherein the memory can comprise a non-volatile storage medium and an internal memory.

[0111] The non-volatile storage medium can store an operating system and a computer program. The computer program comprises program instructions, which, when executed, can cause the processor to execute any one of the processor deployment file streaming loading methods.

[0112] The processor is configured to provide computing and control capabilities to support the operation of the entire computer device.

[0113] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium, which, when executed by the processor, causes the processor to perform any one of the processor deployment file streaming loading methods.

[0114] The network interface is configured to perform network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that, Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0115] It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0116] In one embodiment, the processor is configured to run a computer program stored in the memory to implement the following steps:

[0117] Based on a preset packaging rule, the target processor deployment file is processed by block and packaged at the data sending end to generate at least one packaged data packet;

[0118] Each of the packaged data packets is sent to the data receiving end, and each of the packaged data packets is data parsed to determine the data type of the sub-data in each of the packaged data packets;

[0119] Based on the preset loading rule and the data types, each of the packaged data packets is loaded by the data receiving end.

[0120] In one embodiment, based on a preset packaging rule, the target processor deployment file is processed by block and packaged at the data sending end to generate at least one packaged data packet, which is used to implement:

[0121] determining a data parameter of the target processor deployment file according to the preset packaging rule;

[0122] generating at least one sub-data according to the data parameter and the target processor deployment file, and performing encapsulation processing on each of the sub-data to generate at least one encapsulated data packet.

[0123] In one embodiment, generating at least one sub-data according to the data parameter and the target processor deployment file, and performing encapsulation processing on each of the sub-data to generate at least one encapsulated data packet, is configured to:

[0124] splitting the target processor deployment file into at least one sub-data according to the data size parameter;

[0125] sorting each of the sub-data according to the data location parameter to generate a sub-data sorting list;

[0126] performing encapsulation on each of the sub-data according to the sub-data sorting list to generate each of the encapsulated data packets.

[0127] In one embodiment, after performing encapsulation on each of the sub-data according to the sub-data sorting list to generate each of the encapsulated data packets, it is configured to:

[0128] detecting whether there is unchunked sub-data in the target processor deployment file;

[0129] in a case where it is detected that there is no unchunked sub-data in the target processor deployment file, sending an encapsulation result to the data sending end.

[0130] In one embodiment, after generating at least one sub-data according to the data parameter and the target processor deployment file, and performing encapsulation processing on each of the sub-data to generate at least one encapsulated data packet, it is configured to:

[0131] determining a preset encryption algorithm and a preset encryption protocol according to the target processor deployment file;

[0132] performing encryption processing on each of the encapsulated data packets by using the preset encryption algorithm, and sending the preset encryption protocol to the data receiving end so that the data receiving end decrypts the encapsulated data packets.

[0133] In one embodiment, sending each of the encapsulated data packets to the data receiving end, and performing data analysis on each of the encapsulated data packets to determine the data type of the sub-data in each of the encapsulated data packets, is configured to:

[0134] According to the preset encryption protocol and the preset encryption algorithm, each of the encapsulated data packets is decrypted by the data receiving end;

[0135] Each of the encapsulated data packets is parsed by the data receiving end to determine a data header, a data block and a check code of each of the encapsulated data packets;

[0136] According to the data header, the data block and the check code, each of the data types in each of the encapsulated data packets is determined.

[0137] In one embodiment, based on preset loading rules and each of the data types, each of the encapsulated data packets is loaded by the data receiving end, for realizing:

[0138] Receiving all the metadata and parsing the all metadata to generate model description data;

[0139] According to the model description data, the receiving end memory of the instruction data and the weight data is respectively allocated;

[0140] According to the receiving end memory of the instruction data, the instruction data offset of the instruction data is calculated, and the instruction data is loaded to the instruction data offset;

[0141] According to the receiving end memory of the weight data, the weight data offset of the weight data is calculated, and the weight data is loaded to the weight data offset.

[0142] In an embodiment of the present application, a computer readable storage medium is also provided, which stores a computer program including program instructions. The processor executes the program instructions to implement any of the processor deployment file streaming loading methods provided in the embodiments of the present application.

[0143] The computer readable storage medium can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.

[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A processor deployment file streaming loading method, characterized by, The method comprises the following steps: Based on the preset packaging rule, the target processor deployment file is processed by the data sending end to generate at least one encapsulated data packet; Each encapsulated data packet is sent to the data receiving end, and each encapsulated data packet is analyzed to determine the data type of each encapsulated data packet; Based on the preset loading rule and each data type, each encapsulated data packet is loaded by the data receiving end.

2. The processor deployment file streaming loading method of claim 1, wherein, Based on the preset packaging rule, the target processor deployment file is processed by the data sending end to generate at least one encapsulated data packet, which comprises: According to the data parameters and the target processor deployment file, at least one sub-data is generated, and each sub-data is encapsulated to generate at least one encapsulated data packet. The data parameters include data size parameters and data position parameters, and the data parameters and the target processor deployment file are used to generate at least one sub-data, and each sub-data is encapsulated to generate at least one encapsulated data packet, which comprises:

3. The processor deployment file streaming loading method of claim 2, wherein, According to the data size parameters, the target processor deployment file is split into at least one sub-data; According to the data position parameters, each sub-data is sorted to generate a sub-data list; According to the sub-data list, each sub-data is encapsulated to generate each encapsulated data packet. After generating each encapsulated data packet according to the sub-data list, the following steps are included:

4. The processor deployment file streaming loading method of claim 3, wherein, Detecting whether there is unblocked sub-data in the target processor deployment file; In the case that no unblocked sub-data is detected in the target processor deployment file, the encapsulation result is sent to the data sending end. After generating at least one sub-data according to the data parameters and the target processor deployment file, and encapsulating each sub-data, the following steps are included:

5. The processor deployment file streaming loading method of claim 2, wherein, According to the target processor deployment file, a preset encryption algorithm and a preset encryption protocol are determined; Each encapsulated data packet is encrypted by the preset encryption algorithm, and the preset encryption protocol is sent to the data receiving end for decryption of the encapsulated data packet by the data receiving end. The encapsulated data packet is sent to the data receiving end, and each encapsulated data packet is analyzed to determine the data type of each encapsulated data packet, which comprises:

6. The processor deployment file streaming loading method of claim 5, wherein, According to the preset encryption protocol and the preset encryption algorithm, each encapsulated data packet is decrypted by the data receiving end; Each encapsulated data packet is analyzed by the data receiving end to determine the data header, data block and check code of each encapsulated data packet; According to the data header, the data block and the check code, each data type in each encapsulated data packet is determined. The data type includes metadata, instruction data and weight data, and the data receiving end loads each encapsulated data packet based on the preset loading rule and each data type, which comprises:

7. The processor deployment file streaming loading method according to any of claims 1 to 6, wherein, ​ Receiving all the metadata and parsing the all metadata to generate model description data; According to the model description data, respectively allocate the receiving end memory of the instruction data and the weight data; According to the receiving end memory of the instruction data, calculate the instruction data offset of the instruction data, and load the instruction data to the instruction data offset; According to the receiving end memory of the weight data, calculate the weight data offset of the weight data, and load the weight data to the weight data offset.

8. A processor deployment file streaming apparatus, comprising: Comprise: The encapsulation data packet generation module is used for carrying out blocking processing and encapsulation processing on the target processor deployment file in the data sending end based on a preset packaging rule, and at least one encapsulation data packet is generated; The data type analysis module is used for sending each encapsulation data packet to the data receiving end, and performing data analysis on each encapsulation data packet to determine the data type of the sub data in each encapsulation data packet; The data loading module is used for loading each encapsulation data packet through the data receiving end based on a preset loading rule and each data type.

9. A computer device, comprising: The computer device comprises a memory and a processor; The memory is used for storing a computer program; The processor is used for executing the computer program and realizing the processor deployment file streaming loading method in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the processor deployment file streaming loading method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic deployment method and system based on YAML, electronic equipment and storage medium

    CN115811475A

  • Method and system for distributing and deploying metadata to various databases

    CN117873494A

  • AI model deployment method and device, computing equipment and computer storage medium

    CN117874782A

Cited By

  • File data complete encryption storage method and system and medium

    CN121502805A