Model improvement method and device based on pre-training model
By splitting large-scale pre-trained models into main model and split model, and deploying them in a distributed manner, the storage and computing bottleneck problems when deploying large-scale pre-trained models are solved, and the practicality of the model is improved.
Patent Information
- Application Number
- CN202010597363.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2040-06-28
AI Technical Summary
As the computational complexity of the algorithm model increases, higher storage and computing requirements are put forward for the terminal devices deploying the algorithm model, and it is difficult to effectively solve the storage and computing bottlenecks of large-scale pre-trained models in deployment.
By splitting large-scale pre-trained models into smaller-scale principal models and at least one split model, and deploying them distributedly on different preset devices, the split configuration information is used to establish a connection between the principal model and the split model to achieve data interaction.
The deployment requirements of the main model and split model for equipment are reduced, the practicality of large-scale pre-trained models is improved, and the storage and computing bottleneck problems are solved.
Smart Images

Figure CN112308205B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and specifically to a model improvement method and device based on a pre-trained model. Background Art
[0002] In the field of computer technology, data mining and utilization have always been the most important driving force, giving rise to a series of algorithm models, including the traditional machine learning model LR (Logistic Regression), and various models based on deep learning in recent years, such as DCN (Deep Cross Network). In order to achieve more accurate model estimation, the complexity and number of parameters of the model will increase significantly. However, as the computational complexity of the algorithm model increases, higher storage and computing requirements are placed on the terminal devices that deploy the algorithm model. Summary of the invention
[0003] The embodiments of the present application propose a model improvement method and device based on a pre-trained model.
[0004] In the first aspect, an embodiment of the present application provides a model improvement method based on a pre-trained model, including: obtaining splitting configuration information of a matching main model and at least one split model, wherein the main model and at least one split model are obtained by splitting the pre-trained model and are distributedly deployed on different preset devices, and the splitting configuration information represents the attribute information of the main model and at least one split model; according to the splitting configuration information, establishing a connection between the main model and at least one split model so that the main model can interact with the at least one split model for data during operation.
[0005] In some embodiments, the main model and / or each split model in the at least one split model is cluster-deployed in a preset device cluster.
[0006] In some embodiments, the above method also includes: during the operation of each split model in at least one split model, based on the load data of the split model in each preset device in the preset device cluster, determining the target preset device corresponding to the split model, and determining the split model in the target preset device as the target split model of the split model deployed in the preset device cluster.
[0007] In some embodiments, at least one split model is a split model obtained by splitting based on model computing requirements and / or model storage requirements.
[0008] In some embodiments, the above-mentioned establishing a connection between the main model and at least one split model based on the split configuration information includes: for each split model in the at least one split model, performing the following operations: obtaining the network address and connection port corresponding to the split model based on the split configuration information; establishing a connection between the main model and the split model through the network address and the connection port.
[0009] In some embodiments, the above-mentioned establishing a connection between the main model and at least one split model based on the split configuration information includes: for each split model in the at least one split model, performing the following operations: according to the split configuration information, obtaining the network address and connection port of the target split model deployed on the target preset device in the split model; establishing a connection between the main model and the target split model in the target split model through the network address and the connection port.
[0010] In some embodiments, the above method further includes: inputting the input data into the main model, and obtaining output data corresponding to the input data based on the coordinated operation of the main model and at least one split model.
[0011] In the second aspect, an embodiment of the present application provides a model improvement device based on a pre-trained model, including: an acquisition unit, configured to acquire splitting configuration information of a matching main model and at least one split model, wherein the main model and at least one split model are obtained by splitting based on the pre-trained model and are distributedly deployed on different preset devices, and the splitting configuration information represents the attribute information of the main model and at least one split model; a contact unit, configured to establish a connection between the main model and at least one split model according to the splitting configuration information, so that the main model can interact with the at least one split model for data during operation.
[0012] In some embodiments, the main model and / or each split model in the at least one split model is cluster-deployed in a preset device cluster.
[0013] In some embodiments, the above-mentioned device also includes: a determination unit, which is configured to determine the target preset device corresponding to the split model based on the load data of the split model in each preset device in the preset device cluster during the operation of each split model in at least one split model, and determine the split model in the target preset device as the target split model of the split model deployed in the preset device cluster.
[0014] In some embodiments, at least one split model is a split model obtained by splitting based on model computing requirements and / or model storage requirements.
[0015] In some embodiments, the above-mentioned contact unit is further configured to: perform the following operations for each split model in at least one split model: obtain the network address and connection port corresponding to the split model according to the split configuration information; establish a connection between the main model and the split model through the network address and the connection port.
[0016] In some embodiments, the above-mentioned contact unit is further configured to: for each split model in at least one split model, perform the following operations: according to the split configuration information, obtain the network address and connection port of the target split model deployed on the target preset device in the split model; through the network address and connection port, establish a connection between the main model and the target split model in the target split model.
[0017] In some embodiments, the above-mentioned device also includes: an operation unit, which is configured to input the input data into the main model, and obtain output data corresponding to the input data based on the coordinated operation of the main model and at least one split model.
[0018] In a third aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.
[0019] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner of the first aspect.
[0020] The model improvement method and device based on the pre-trained model provided in the embodiment of the present application obtain the splitting configuration information of the matching main model and at least one split model, wherein the main model and the at least one split model are obtained based on the splitting of the pre-trained model and are distributedly deployed on different preset devices, and the splitting configuration information represents the attribute information of the main model and the at least one split model; according to the splitting configuration information, a connection is established between the main model and the at least one split model so that the main model can interact with the at least one split model for data during operation, so that the original large-scale pre-trained model can be split into a smaller-scale main model and at least one split model, thereby reducing the deployment requirements of the main model and the at least one split model on the equipment, and improving the practicality of the large-scale pre-trained model. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0022] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;
[0023] Figure 2 is a flowchart of an embodiment of a model improvement method based on a pre-trained model according to the present application;
[0024] Figure 3 is a schematic diagram of an application scenario of the model improvement method based on a pre-trained model according to this embodiment;
[0025] Figure 4 is a flowchart of another embodiment of a model improvement method based on a pre-trained model according to the present application;
[0026] Figure 5 is a structural diagram of an embodiment of a model improvement device based on a pre-trained model according to the present application;
[0027] Figure 6 It is a structural diagram of a computer system suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0028] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0029] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0030] Figure 1 An exemplary architecture 100 is shown to which the model improvement method and apparatus based on a pre-trained model of the present application can be applied.
[0031] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0032] Terminal devices 101, 102, 103 may be hardware devices or software that support network connection for data interaction and data processing. When terminal devices 101, 102, 103 are hardware, they may be various electronic devices that support functions such as information interaction, network connection, image capture, information processing, etc., including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, and desktop computers, etc. When terminal devices 101, 102, 103 are software, they may be installed in the electronic devices listed above. They may be implemented as multiple software or software modules, for example, for providing distributed services, or they may be implemented as a single software or software module. No specific limitation is made here.
[0033] The server 105 may be a server that provides various services, such as a background processing server that performs corresponding processing on the input data based on the input data sent by the terminal devices 101, 102, and 103. The background processing server may extract features, analyze and process the input data and other data, thereby obtaining output data corresponding to the input data. Optionally, the background processing server may also feed back the output data to the terminal device for display or use by the terminal device. As an example, the server 105 may be a cloud server.
[0034] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0035] It should also be noted that the model improvement method based on the pre-trained model provided in the embodiments of the present disclosure can be executed by a server, or by a terminal device, or by a server and a terminal device in cooperation with each other. Accordingly, the various parts (such as various units, sub-units, modules, and sub-modules) included in the model improvement device based on the pre-trained model can be all set in the server, or all set in the terminal device, or can be set in the server and the terminal device respectively.
[0036] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the system is only illustrative. Depending on the implementation requirements, there may be any number of terminal devices, networks, and servers. When the electronic device on which the model improvement method based on the pre-trained model runs does not need to transmit data with other electronic devices, the system architecture may only include the electronic device (e.g., server or terminal device) on which the model improvement method based on the pre-trained model runs.
[0037] Continue to refer Figure 2 , a process 200 of an embodiment of a model improvement method based on a pre-trained model is shown, comprising the following steps:
[0038] Step 201: Obtain split configuration information of a matching main model and at least one split model.
[0039] In this embodiment, the execution subject of the model improvement method based on the pre-trained model (for example Figure 1 The terminal device or server in the system can obtain the split configuration information of the main model and at least one split model remotely or locally through a wired connection or a wireless connection.
[0040] In this embodiment, the main model and at least one split model are obtained by splitting based on the pre-trained model. The pre-trained model can be a pre-trained model based on any algorithm and realizing any function. As an example, the pre-trained model is a pre-trained model obtained after training with large-scale training data, including a large number of model parameters and having a high information processing complexity, including but not limited to a logistic regression model, a deep learning model, a decision tree model, a support vector machine model, and the like.
[0041] The pre-trained model is split to obtain a main model and at least one split model. As an example, the pre-trained model can be split according to the distribution of each module in the pre-trained model and the independence between each module to obtain a main model and at least one split model. Specifically, an independent module that has less connection with other modules can be split out from the pre-trained model to obtain a split model, and the pre-trained model after the split model is split out is used as the main model.
[0042] In some optional implementations of this embodiment, at least one split model is a split model obtained by splitting based on model calculation requirements and / or model storage requirements. Among them, the split model obtained by splitting based on model calculation requirements represents that the information processing requirements and complexity are high, and the deployed preset terminal needs to have high information processing performance. The split model obtained by splitting based on model storage requirements represents that the data storage requirements are high and the storage space is large, and the deployed preset terminal needs to have high data storage performance.
[0043] The split main model and at least one split model are distributedly deployed in different preset terminals. As an example, the pre-trained model is split to obtain the main model, the first split model and the second split model. Among them, the main model, the first split model and the second split model are respectively deployed in the first preset terminal, the second preset terminal and the third preset terminal. The distributed deployment of the main model and at least one split model not only reduces the deployment requirements for the preset terminal, but also improves the performance of each split model when the preset terminal configuration is high.
[0044] Specifically, the split model obtained by splitting based on model computing requirements can be deployed in terminal devices with higher information processing performance, and the split model obtained by splitting based on model storage requirements can be deployed in terminal devices with higher data storage performance. This can significantly improve the information processing speed and information storage performance of the overall model, and can effectively solve the speed and storage bottleneck problems of deploying the overall pre-trained model based on a single terminal.
[0045] In some optional implementations of this embodiment, the main model and / or each of the split models in at least one split model are clustered and deployed in a preset device cluster. This implementation can be applied to the case of parallel processing of model information.
[0046] After the pre-trained model is split to obtain a main model and at least one split model, the split configuration information can be determined according to the deployment configuration information of the main model and at least one split model. The split configuration information represents the attribute information of the main model and at least one split model, for example, the deployment information of the main model and at least one split model, the input data, output data and other information of the model.
[0047] Specifically, the split configuration information may be a split configuration file generated by a technician in a preset format according to the attribute information of the main model and at least one split model.
[0048] In some optional implementations of this embodiment, the split configuration information includes a network address and a connection port of a target split model deployed on a target preset device in the split model.
[0049] Step 202: Establish a connection between the main model and at least one split model according to the split configuration information.
[0050] In this embodiment, the execution subject may establish a connection between the subject model and at least one split model according to the split configuration information obtained in step 201, so that the subject model can perform data interaction with the at least one split model during operation.
[0051] As an example, the split configuration information may include input data and output data of the split model. When the execution subject determines that the main model runs to the node corresponding to the split model, the intermediate data obtained is used as the input data of the split model to obtain the corresponding output data of the split model, and the output data of the split model is used as the data basis of the information processing process after the node corresponding to the split model in the main model, and subsequent information processing is performed.
[0052] It should be noted that the main model can also combine the output data obtained from multiple split models and perform subsequent information processing based on the combined data.
[0053] In some optional implementations of this embodiment, the execution subject may perform step 202 in the following manner:
[0054] For each split model in at least one split model, perform the following operations: first, obtain the network address and connection port corresponding to the split model according to the split configuration information; then, establish a connection between the main model and the split model through the network address and connection port.
[0055] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the model improvement method based on a pre-trained model according to this embodiment. Figure 3 In the application scenario, the main model, the first split model and the second split model are obtained by splitting based on the pre-trained model that provides the image recognition function, and are distributedly deployed in the preset device 301, the preset device 302, and the preset device 303. The server 304 first obtains the split configuration information of the matching main model, the first split model and the second split model from the preset terminal 305. Then, according to the split configuration information, the connection between the main model, the first split model and the second split model is established so that the main model can interact with the first split model and the second split model for data. During the operation process, first, the image to be recognized is input into the main model. Then, when the above-mentioned execution subject determines that the main model runs to the node corresponding to the split model, the first intermediate data obtained at this time is input into the first split model for information processing, and the main model continues to process information according to the first output data obtained by the first split model. Then, when the above-mentioned execution subject determines that the main model runs to the node corresponding to the second split model, the second intermediate data obtained at this time is input into the second split model for information processing, and the main model continues to process information according to the second output data obtained by the second split model; finally, the main model obtains the recognition result corresponding to the image to be recognized.
[0056] The method provided by the above-mentioned embodiment of the present disclosure obtains splitting configuration information of a matching main model and at least one split model, wherein the main model and the at least one split model are obtained by splitting based on a pre-trained model and are distributedly deployed on different preset devices, and the splitting configuration information represents the attribute information of the main model and the at least one split model; according to the splitting configuration information, a connection is established between the main model and the at least one split model so that the main model can interact with the at least one split model for data during operation, thereby splitting the original large-scale pre-trained model into a smaller-scale main model and at least one split model, reducing the deployment requirements of the main model and the at least one split model on the equipment, and improving the practicality of the large-scale pre-trained model.
[0057] In some optional implementations of this embodiment, the above-mentioned execution entity may also perform the following steps: inputting input data into the main model, and obtaining output data corresponding to the input data based on the coordinated operation of the main model and at least one split model.
[0058] In this implementation, the execution subject can obtain output data corresponding to the input data based on the split main model and at least one split model. The execution subject performs information processing according to the split models, enriching the information processing method.
[0059] Continue to refer Figure 4 , shows a schematic process 400 of another embodiment of a model improvement method based on a pre-trained model according to the present application, comprising the following steps:
[0060] Step 401, obtaining split configuration information of a matching main model and at least one split model.
[0061] In this embodiment, step 401 and Figure 2 Step 201 in the corresponding embodiment is basically the same and will not be described again here.
[0062] Step 402, during the operation of each split model in at least one split model, based on the load data of the split model in each preset device in the preset device cluster, determine the target preset device corresponding to the split model, and determine the split model in the target preset device as the target split model of the split model deployed in the preset device cluster.
[0063] In this embodiment, each split model in at least one split model can be cluster-deployed in a preset device cluster. A target preset terminal with a smaller load is determined through load data of the split model in each preset device in the preset device cluster, and the split model in the target preset device is determined as the target split model of the split model deployed in the preset device cluster.
[0064] Step 403: for each split model in the at least one split model, perform the following operations:
[0065] Step 4031, according to the split configuration information, obtain the network address and connection port of the target split model deployed on the target preset device in the split model.
[0066] In this embodiment, the attribute information of each split model deployed by the cluster is stored in the split configuration file. The above-mentioned execution subject can obtain the network address and connection port of the target split model deployed on the target preset device in the split model according to the split configuration information for each split model in at least one split model.
[0067] Step 4032: Establish a connection between the subject model and the target split model in the target split model through the network address and the connection port.
[0068] In this embodiment, the execution subject processes information through the target split model in each split model with a smaller load, thereby achieving load balancing for each split model.
[0069] It can be seen from this embodiment that Figure 2 Compared with the corresponding embodiment, the process 400 of the model improvement method based on the pre-trained model in this embodiment specifically describes the split model for cluster deployment to achieve load balancing within the split model. In this way, the operating efficiency and intelligence of the improved model are further improved.
[0070] Continue to refer Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a model improvement device based on a pre-trained model. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0071] like Figure 5 As shown, a model improvement device based on a pre-trained model includes: an acquisition unit 501, configured to acquire splitting configuration information of a matching main model and at least one splitting model, wherein the main model and the at least one splitting model are obtained by splitting based on the pre-trained model and are distributedly deployed on different preset devices, and the splitting configuration information represents the attribute information of the main model and the at least one splitting model; a contact unit 502, configured to establish a connection between the main model and the at least one splitting model according to the splitting configuration information, so that the main model can interact with the at least one splitting model for data during operation.
[0072] In some embodiments, the main model and / or each split model in the at least one split model is cluster-deployed in a preset device cluster.
[0073] In some embodiments, the above-mentioned device also includes: a determination unit (shown in the figure), which is configured to determine the target preset device corresponding to the split model based on the load data of the split model in each preset device in the preset device cluster during the operation of each split model in at least one split model, and determine the split model in the target preset device as the target split model of the split model deployed in the preset device cluster.
[0074] In some embodiments, at least one split model is a split model obtained by splitting based on model computing requirements and / or model storage requirements.
[0075] In some embodiments, the contact unit 502 is further configured to: for each split model in at least one split model, perform the following operations: obtain the network address and connection port corresponding to the split model according to the split configuration information; establish a connection between the main model and the split model through the network address and the connection port.
[0076] In some embodiments, the contact unit 502 is further configured to: for each split model in at least one split model, perform the following operations: according to the split configuration information, obtain the network address and connection port of the target split model deployed on the target preset device in the split model; through the network address and connection port, establish a connection between the main model and the target split model in the target split model.
[0077] In some embodiments, the above-mentioned device also includes: an operation unit (not shown in the figure), which is configured to input input data into the main model, and obtain output data corresponding to the input data based on the coordinated operation of the main model and at least one split model.
[0078] In this embodiment, an acquisition unit in a model improvement device based on a pre-trained model acquires splitting configuration information of a matching main model and at least one split model, wherein the main model and at least one split model are obtained by splitting the pre-trained model and are distributedly deployed on different preset devices, and the splitting configuration information represents the attribute information of the main model and the at least one split model; a contact unit establishes a connection between the main model and the at least one split model according to the splitting configuration information, so that the main model can interact with the at least one split model for data during operation, thereby splitting the original large-scale pre-trained model into a smaller-scale main model and at least one split model, reducing the deployment requirements of the main model and the at least one split model on the equipment, and improving the practicality of the large-scale pre-trained model.
[0079] Reference below Figure 6 , which shows a device suitable for implementing the embodiments of the present application (eg Figure 1 Schematic diagram of the structure of a computer system 600 of the devices 101, 102, 103, 105 shown. Figure 6 The device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0080] like Figure 6As shown, the computer system 600 includes a processor (e.g., CPU, central processing unit) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the system 600 are also stored in the RAM 603. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0081] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0082] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from a removable medium 611. When the computer program is executed by the processor 601, the above-mentioned functions defined in the method of the present application are executed.
[0083] It should be noted that the computer-readable medium of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0084] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the client computer, partially on the client computer, as a separate software package, partially on the client computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the client computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0085] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0086] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor comprising an acquisition unit and a contact unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances. For example, the contact unit may also be described as "a unit that establishes a connection between a main model and at least one split model according to the split configuration information, so that the main model can interact with at least one split model for data during operation".
[0087] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the computer device: obtains the split configuration information of the matching main model and at least one split model, wherein the main model and at least one split model are obtained by splitting based on the pre-trained model and are distributedly deployed on different preset devices, and the split configuration information represents the attribute information of the main model and at least one split model; according to the split configuration information, establishes a connection between the main model and at least one split model, so that the main model can interact with at least one split model for data during operation.
[0088] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A model improvement method based on a pre-trained model, comprising: Obtaining split configuration information of a matching main model and at least one split model, wherein the main model and the at least one split model are obtained by splitting based on a pre-trained model and are distributedly deployed on different preset devices; the at least one split model is obtained by splitting based on model calculation requirements and / or model storage requirements; the split model obtained by splitting based on the model calculation requirements is deployed on a preset device that meets the model calculation requirements; the split model obtained by splitting based on the model storage requirements is deployed on a preset device that meets the model storage requirements; the split configuration information represents attribute information of the main model and the at least one split model, including a network address and a connection port of the split model; and each split model in the at least one split model is cluster-deployed in a preset device cluster; According to the split configuration information, a connection is established between the main model and a target split model corresponding to each of the at least one split model, so that the main model can perform data interaction with the at least one split model during operation; Among them, the target split model is determined in the following manner: during the operation of each split model in the at least one split model, based on the load data of the split model in each preset device in the preset device cluster, the target preset device corresponding to the split model is determined, and the split model in the target preset device is determined as the target split model of the split model deployed in the preset device cluster.
2. The method according to claim 1, wherein: The subject model is cluster-deployed in a preset device cluster.
3. The method according to claim 1, wherein: Establishing a connection between the main model and the at least one split model according to the split configuration information includes: For each split model in the at least one split model, perform the following operations: According to the split configuration information, obtain the network address and connection port corresponding to the split model; The connection between the main model and the split model is established through the network address and the connection port.
4. The method according to claim 1, wherein: The establishing, according to the split configuration information, a connection between the subject model and a target split model corresponding to each of the at least one split model comprises: For each split model in the at least one split model, perform the following operations: According to the split configuration information, obtain the network address and connection port of the target split model deployed on the target preset device in the split model; A connection is established between the subject model and the target split model in the target split model through the network address and the connection port.
5. The method according to any one of claims 1 to 4, wherein: The method further comprises: Input data is input into the main model, and output data corresponding to the input data is obtained based on the coordinated operation of the main model and the at least one split model.
6. A model improvement device based on a pre-trained model, comprising: An acquisition unit is configured to acquire split configuration information of a matching main model and at least one split model, wherein the main model and the at least one split model are obtained by splitting based on a pre-trained model and are distributedly deployed on different preset devices, the at least one split model is obtained by splitting based on model calculation requirements and / or model storage requirements, the split model obtained by splitting based on the model calculation requirements is deployed on a preset device that meets the model calculation requirements, and the split model obtained by splitting based on the model storage requirements is deployed on a preset device that meets the model storage requirements, the split configuration information represents attribute information of the main model and the at least one split model, including a network address and a connection port of the split model, and each split model in the at least one split model is cluster-deployed in a preset device cluster; a contact unit configured to establish a connection between the subject model and a target split model corresponding to each of the at least one split model according to the split configuration information, so that the subject model can perform data interaction with the at least one split model during operation; Among them, the target split model is determined in the following manner: during the operation of each split model in the at least one split model, based on the load data of the split model in each preset device in the preset device cluster, the target preset device corresponding to the split model is determined, and the split model in the target preset device is determined as the target split model of the split model deployed in the preset device cluster.
7. The device according to claim 6, wherein: The subject model is cluster-deployed in a preset device cluster.
8. The device according to claim 6, wherein: The contact unit is further configured to: For each split model in the at least one split model, perform the following operations: obtain the network address and connection port corresponding to the split model according to the split configuration information; establish a connection between the main model and the split model through the network address and the connection port.
9. The device according to claim 6, wherein: The contact unit is further configured to: For each split model in the at least one split model, perform the following operations: according to the split configuration information, obtain the network address and connection port of the target split model deployed on the target preset device in the split model; through the network address and the connection port, establish a connection between the main model and the target split model in the target split model.
10. The device according to any one of claims 6 to 9, wherein: The device also includes: The operation unit is configured to input input data into the main model, and obtain output data corresponding to the input data based on the coordinated operation of the main model and the at least one split model.
11. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
12. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for achieving deep neural network model based on heterogeneous model graph
CN110503188A