Model use method, data processing method and device

By requesting and applying resource scheduling parameters matching terminal hardware, the method optimizes deep learning model execution speed and performance by addressing the inefficiencies of universal resource allocation.

CN111752716BActive Publication Date: 2024-12-24BEIJING XIAOMI PINECONE ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010611614.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-29
Publication Date
2024-12-24
Estimated Expiration
2040-06-29

AI Technical Summary

Technical Problem

Existing deep learning models face issues with slow execution speed and poor performance due to universal hardware resource allocation that does not account for the specific hardware capabilities of individual terminals.

Method used

A method and device that allow terminals to request and receive resource scheduling parameters tailored to their hardware information from a server, enabling optimized allocation of hardware resources for deep learning model operators.

Benefits of technology

This approach optimizes the execution speed and performance of deep learning models by ensuring that hardware resources are allocated based on the specific capabilities of each terminal, improving overall model efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111752716B_ABST
    Figure CN111752716B_ABST
Patent Text Reader

Abstract

The present disclosure provides a model use method, a data processing method and a device. The model use method is applied to a terminal, and the terminal has a built-in deep learning model. The method includes: the terminal sends a parameter acquisition request to a server, and the parameter acquisition request is used to request to obtain resource scheduling parameters set for operators in the deep learning model, and then receives target resource scheduling parameters sent by the server that match the hardware information of the terminal. In the process of using the deep learning model, the hardware resources are scheduled for the operator according to the target resource scheduling parameters. In the embodiment of the present disclosure, the terminal can schedule appropriate hardware resources that match the terminal hardware resource situation for the operator in the deep learning model, thereby optimizing the execution speed and execution effect of the deep learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer communication technology, and in particular to a model using method, a data processing method and a device. Background Art

[0002] Currently, before deploying a deep learning model, the deep learning model parameters are adjusted, including setting a general hardware resource allocation for the operators in the deep learning model. After the deep learning model is deployed to the terminal, the terminal allocates hardware resources to the operators based on the general hardware resource allocation.

[0003] However, the universal hardware resource allocation is not applicable to all terminals. Using the hardware resources allocated based on the above method to execute the deep learning model will result in problems such as slow execution speed and poor execution effect of the deep learning model. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a model using method, a data processing method and a device.

[0005] According to a first aspect of an embodiment of the present disclosure, a model use method is provided, which is applied to a terminal, wherein the terminal has a built-in deep learning model, and the method includes:

[0006] Sending a parameter acquisition request to the server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters serve as a basis for the terminal to schedule hardware resources for the operator;

[0007] receiving a target resource scheduling parameter sent by the server, wherein the target resource scheduling parameter matches the hardware information of the terminal;

[0008] In the process of using the deep learning model, hardware resources are scheduled to the operator according to the target resource scheduling parameters.

[0009] Optionally, sending a parameter acquisition request to the server includes:

[0010] In response to the deep learning model being used for the first time, determining whether the terminal is currently connected to a network;

[0011] If the terminal is currently connected to the network, the parameter acquisition request is sent to the server.

[0012] Optionally, the method further comprises:

[0013] If the terminal is not currently connected to the network, scheduling hardware resources for the operator according to default resource scheduling parameters;

[0014] In response to the terminal being connected to the network, the parameter acquisition request is sent to the server.

[0015] Optionally, the terminal includes a graphics processor;

[0016] The deep learning model includes a model for running on the graphics processor;

[0017] The hardware resources include hardware resources of the graphics processor.

[0018] Optionally, the resource scheduling parameter includes a parameter indicating the number of threads used to process the operator.

[0019] Optionally, the parameter includes a local worksize parameter used in an open computing language OpenCL.

[0020] Optionally, sending a parameter acquisition request to the server includes:

[0021] Acquiring hardware information of the terminal;

[0022] Send a parameter acquisition request carrying the hardware information to the server.

[0023] Optionally, the hardware information includes a model of the terminal.

[0024] According to a second aspect of an embodiment of the present disclosure, a data processing method is provided, which is applied to a server, and the method includes:

[0025] Receiving a parameter acquisition request sent by a terminal, the terminal having a built-in deep learning model, the parameter acquisition request being used to request acquisition of resource scheduling parameters set for an operator in the deep learning model, the resource scheduling parameters being used as a basis for the terminal to schedule hardware resources for the operator;

[0026] Determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal;

[0027] The target resource scheduling parameters are sent to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0028] Optionally, determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal includes:

[0029] Determining whether the server is provided with resource scheduling parameters matching the hardware information;

[0030] If not, controlling different terminals to schedule hardware resources to the operator according to different resource scheduling parameters, and obtaining the execution time of the operator when using each resource scheduling parameter;

[0031] The resource scheduling parameters used when the execution time is the shortest are determined as the target resource scheduling parameters.

[0032] Optionally, determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal includes:

[0033] In a case where the parameter acquisition request carries the hardware information, acquiring the hardware information carried by the parameter acquisition request;

[0034] The target resource scheduling parameters matching the hardware information are determined.

[0035] According to a third aspect of an embodiment of the present disclosure, a model using device is provided, which is applied to a terminal, wherein the terminal has a built-in deep learning model, and the device includes:

[0036] A first sending module is configured to send a parameter acquisition request to a server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters are used as a basis for the terminal to schedule hardware resources for the operator;

[0037] A receiving module, configured to receive a target resource scheduling parameter sent by the server, wherein the target resource scheduling parameter matches the hardware information of the terminal;

[0038] The first scheduling module is configured to schedule hardware resources to the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0039] Optionally, the first sending module includes:

[0040] a determination submodule, configured to determine whether the terminal is currently connected to a network in response to the deep learning model being used for the first time;

[0041] The first sending submodule is configured to send the parameter acquisition request to the server if the terminal is currently connected to the network.

[0042] Optionally, the device further comprises:

[0043] A second scheduling module is configured to schedule hardware resources for the operator according to default resource scheduling parameters if the terminal is not currently connected to the network;

[0044] The second sending module is configured to send the parameter acquisition request to the server in response to the terminal being connected to the network.

[0045] Optionally, the terminal includes a graphics processor;

[0046] The deep learning model includes a model for running on the graphics processor;

[0047] The hardware resources include hardware resources of the graphics processor.

[0048] Optionally, the resource scheduling parameter includes a parameter indicating the number of threads used to process the operator.

[0049] Optionally, the parameter includes a local worksize parameter used in an open computing language OpenCL.

[0050] Optionally, the first sending module includes:

[0051] An acquisition submodule, configured to acquire hardware information of the terminal;

[0052] The second sending submodule is configured to send a parameter acquisition request carrying the hardware information to the server.

[0053] Optionally, the hardware information includes a model of the terminal.

[0054] According to a fourth aspect of an embodiment of the present disclosure, there is provided a data processing device, which is applied to a server, and the device includes:

[0055] A receiving module, configured to receive a parameter acquisition request sent by a terminal, wherein the terminal has a built-in deep learning model, and the parameter acquisition request is used to request to obtain resource scheduling parameters set for an operator in the deep learning model, and the resource scheduling parameters are used as a basis for the terminal to schedule hardware resources for the operator;

[0056] a determination module, configured to determine, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal;

[0057] The sending module is configured to send the target resource scheduling parameters to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0058] Optionally, the determining module includes:

[0059] A first determination submodule is configured to determine whether the server is provided with resource scheduling parameters matching the hardware information;

[0060] an obtaining submodule, configured to, if not, control different terminals to schedule hardware resources to the operator according to different resource scheduling parameters, and obtain the execution time of the operator when using each resource scheduling parameter;

[0061] The second determining submodule is configured to determine the resource scheduling parameter used when the execution time is the shortest as the target resource scheduling parameter.

[0062] Optionally, the determining module includes:

[0063] an acquisition submodule, configured to acquire the hardware information carried by the parameter acquisition request when the parameter acquisition request carries the hardware information;

[0064] The determination submodule is configured to determine the target resource scheduling parameters that match the hardware information.

[0065] According to a fifth aspect of an embodiment of the present disclosure, there is provided a non-temporary computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0066] According to a sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in any one of the second aspects above are implemented.

[0067] According to a seventh aspect of the embodiments of the present disclosure, a terminal is provided, comprising: an internal bus, and a memory, a processor, and an external interface connected via the internal bus; wherein:

[0068] The external interface is used to obtain data;

[0069] The memory is used to store machine-readable instructions corresponding to model usage;

[0070] The processor is configured to read the machine-readable instructions on the memory and execute the machine-executable instructions to implement the following operations:

[0071] Sending a parameter acquisition request to the server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters serve as a basis for the terminal to schedule hardware resources for the operator;

[0072] receiving a target resource scheduling parameter sent by the server, wherein the target resource scheduling parameter matches the hardware information of the terminal;

[0073] In the process of using the deep learning model, hardware resources are scheduled to the operator according to the target resource scheduling parameters.

[0074] According to an eighth aspect of an embodiment of the present disclosure, a server is provided, comprising: an internal bus, and a memory, a processor, and an external interface connected via the internal bus; wherein:

[0075] The external interface is used to obtain data;

[0076] The memory is used to store machine-readable instructions corresponding to data processing;

[0077] The processor is configured to read the machine-readable instructions on the memory and execute the machine-executable instructions to implement the following operations:

[0078] Receiving a parameter acquisition request sent by a terminal, the terminal having a built-in deep learning model, the parameter acquisition request being used to request acquisition of resource scheduling parameters set for an operator in the deep learning model, the resource scheduling parameters being used as a basis for the terminal to schedule hardware resources for the operator;

[0079] Determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal;

[0080] The target resource scheduling parameters are sent to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0081] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0082] In the disclosed embodiment, the terminal sends a parameter acquisition request to the server, the parameter acquisition request is used to request to obtain the resource scheduling parameters set for the operator in the deep learning model, and then receives the target resource scheduling parameters sent by the server that match the hardware information of the terminal. In the process of using the deep learning model, the hardware resources are scheduled to the operator according to the target resource scheduling parameters. In the disclosed embodiment, the terminal can schedule the appropriate hardware resources that match the terminal hardware resource situation to the operator in the deep learning model, thereby optimizing the execution speed and execution effect of the deep learning model.

[0083] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 is a flow chart of a model using method according to an exemplary embodiment;

[0085] Figure 2 is a flow chart of a data processing method according to an exemplary embodiment;

[0086] Figure 3 is a block diagram of a model using device according to an exemplary embodiment;

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

[0088] Figure 5 is a schematic diagram of the structure of a terminal according to an exemplary embodiment;

[0089] Figure 6 The figure is a schematic diagram showing the structure of a server according to an exemplary embodiment. DETAILED DESCRIPTION

[0090] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0091] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0092] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0093] Figure 1 is a flow chart of a model using method according to an exemplary embodiment. Figure 1 The method shown is applied to a terminal, wherein the terminal has a built-in deep learning model, and the method includes:

[0094] In step 101, a parameter acquisition request is sent to a server. The parameter acquisition request is used to request resource scheduling parameters set for operators in a deep learning model. The resource scheduling parameters serve as a basis for scheduling hardware resources for operators.

[0095] The terminal may be installed with an application program, and the application program may have a built-in deep learning model. The terminal may send a parameter acquisition request to the server during the running of the application program, for example, when the application program uses the deep learning model for the first time.

[0096] Alternatively, the deep learning model can be directly built into the terminal, for example, the deep learning model is built into the system software of the terminal, and a parameter acquisition request can be sent to the server when the terminal uses the deep learning model for the first time.

[0097] In one embodiment, the terminal includes a graphics processor, the deep learning model includes a model for running on the graphics processor, and the hardware resources include hardware resources of the graphics processor.

[0098] Based on this, the resource scheduling parameters may include a parameter indicating the number of threads used by the processing operator.

[0099] In the open computing language OpenCL, the local work size parameter is used to describe the number of concurrent threads in the GPU computing process.

[0100] The local work size parameter is a one-dimensional, two-dimensional, or three-dimensional array parameter. The product can be understood as the number of concurrent threads. Since the shared memory, registers and other resources used by each thread at runtime are fixed, the more concurrent threads there are, the more resources the threads occupy at runtime and the faster the execution speed.

[0101] It should be noted that the larger the number of concurrent threads is, the better. There is an upper limit to the number of concurrent threads. This is because due to the limitation of total hardware resources, too many concurrent threads may lead to excessive competition for resources such as shared memory and registers, which will slow down the execution speed.

[0102] Therefore, the parameter indicating the number of threads used by the processing operator may include: a local work size parameter used in the open computing language OpenCL.

[0103] In one embodiment, the terminal can determine whether the terminal is currently connected to the network when the deep learning model is used for the first time. If the terminal is currently connected to the network, a parameter acquisition request is sent to the server, so that the terminal completes the debugging of resource scheduling parameters when the deep learning model is used for the first time; if the terminal is not currently connected to the network, the hardware resources are scheduled for the operator according to the default resource scheduling parameters, and when the terminal is connected to the network, a parameter acquisition request is sent to the server.

[0104] The default resource scheduling parameters may not be suitable for the current terminal, so after the terminal is connected to the network, it sends a parameter acquisition request to the server, hoping to obtain the resource scheduling parameters suitable for the current terminal from the server.

[0105] In one embodiment, the terminal may obtain the hardware information of its own device and send a parameter acquisition request carrying the hardware information to the server, so as to obtain the target resource scheduling parameters matching the hardware information of the terminal from the server.

[0106] There are many target resource scheduling parameters. For example, hardware information may include the model of the terminal. Hardware information may also include information such as the brand and the name of the manufacturer.

[0107] In step 102, a target resource scheduling parameter sent by a server is received, and the target resource scheduling parameter matches the hardware information of the terminal.

[0108] After receiving the parameter acquisition request sent by the terminal, the server acquires the target resource scheduling parameters that match the hardware information of the terminal, and sends the target resource scheduling parameters to the terminal.

[0109] Typically, a deep learning model includes a set of operators. The parameter acquisition request may be used to request the acquisition of resource scheduling parameters set for each operator in the deep learning model. Accordingly, the target resource scheduling parameters received by the terminal may include target resource scheduling parameters set for each operator in the deep learning model.

[0110] Alternatively, the parameter acquisition request can be used to request resource scheduling parameters set for some operators in the deep learning model. Accordingly, the target resource scheduling parameters received by the terminal may include target resource scheduling parameters set for some operators in the deep learning model.

[0111] In step 103, in the process of using the deep learning model, hardware resources are scheduled to the operator according to the target resource scheduling parameters.

[0112] The terminal dispatches appropriate hardware resources to the operator according to the target resource scheduling parameters that match the terminal's hardware resources. For example, when the terminal has more hardware resources, the terminal dispatches more hardware resources to the operator according to the target resource scheduling parameters, and when the terminal has fewer hardware resources, the terminal dispatches fewer hardware resources to the operator according to the target resource scheduling parameters.

[0113] In the disclosed embodiment, the terminal sends a parameter acquisition request to the server, the parameter acquisition request is used to request to obtain the resource scheduling parameters set for the operator in the deep learning model, and then receives the target resource scheduling parameters sent by the server that match the hardware information of the terminal. In the process of using the deep learning model, the hardware resources are scheduled to the operator according to the target resource scheduling parameters. In the disclosed embodiment, the terminal can schedule the appropriate hardware resources that match the terminal hardware resource situation to the operator in the deep learning model, thereby optimizing the execution speed and execution effect of the deep learning model.

[0114] Figure 2 is a flow chart of a data processing method according to an exemplary embodiment. Figure 2 The method shown is applied to a server, and the method comprises:

[0115] In step 201, a parameter acquisition request sent by a terminal is received. The terminal has a built-in deep learning model. The parameter acquisition request is used to request resource scheduling parameters set for operators in the deep learning model. The resource scheduling parameters serve as the basis for the terminal to schedule hardware resources for the operator.

[0116] When a network connection is established between the server and the terminal, the server receives a parameter acquisition request sent by the terminal.

[0117] In step 202, according to the parameter acquisition request, a target resource scheduling parameter matching the hardware information of the terminal is determined.

[0118] After obtaining the parameter acquisition request sent by the terminal, the server determines the hardware information of the terminal.

[0119] In the case where the parameter acquisition request carries the hardware information of the terminal, the server acquires the hardware information carried in the parameter acquisition request and determines the target resource scheduling parameters matching the hardware information.

[0120] In one embodiment, after obtaining the parameter acquisition request sent by the terminal, the server can determine whether its own device is equipped with resource scheduling parameters that match the hardware information of the terminal. If not, it controls different terminals to schedule hardware resources for operators in the deep learning model according to different resource scheduling parameters, obtains the execution time of the operator according to each resource scheduling parameter, and determines the resource scheduling parameters used when the execution time is the shortest as the target resource scheduling parameters.

[0121] For example, a deep learning model includes ten operators. The server sets three resource scheduling parameters for each operator. The server sends a total of thirty resource scheduling parameters set for the ten operators to different terminals, controls different terminals to schedule hardware resources for the operators according to the received resource scheduling parameters, obtains the execution time of the operators when each resource scheduling parameter is used, and for each operator, determines the resource scheduling parameter used when the execution time is the shortest as the target resource scheduling parameter corresponding to the operator.

[0122] In this embodiment, when the server is not provided with resource scheduling parameters matching the hardware information of the terminal, the server dynamically acquires the resource scheduling parameters matching the hardware information of the terminal by executing the above method.

[0123] In step 203, the target resource scheduling parameters are sent to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0124] The server sends the acquired target resource scheduling parameters to the terminal.

[0125] In the disclosed embodiment, the server obtains target resource scheduling parameters that match the hardware information of the terminal based on the request of the terminal, and sends the target resource scheduling parameters to the terminal, so that the terminal schedules appropriate hardware resources that match the hardware resource situation of the terminal to the operators in the deep learning model according to the target resource scheduling parameters, thereby optimizing the execution speed and execution effect of the deep learning model.

[0126] For the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the described order of actions, because according to the present disclosure, certain steps can be performed in other orders or simultaneously.

[0127] Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0128] Corresponding to the aforementioned application function implementation method embodiment, the present disclosure also provides an application function implementation device and a corresponding terminal embodiment.

[0129] Figure 3 is a block diagram of a model using device according to an exemplary embodiment. Figure 3 The model using device shown is applied to a terminal, the terminal has a built-in deep learning model, and the device includes: a first sending module 31, a receiving module 32 and a first scheduling module 33; wherein,

[0130] The first sending module 31 is configured to send a parameter acquisition request to the server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters serve as a basis for the terminal to schedule hardware resources for the operator;

[0131] The receiving module 32 is configured to receive the target resource scheduling parameters sent by the server, where the target resource scheduling parameters match the hardware information of the terminal;

[0132] The first scheduling module 33 is configured to schedule hardware resources to the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0133] In an optional embodiment, Figure 3 Based on the control device shown in the figure, the first sending module 31 may include: a determining submodule and a first sending submodule; wherein,

[0134] The determination submodule is configured to determine whether the terminal is currently connected to a network in response to the deep learning model being used for the first time;

[0135] The first sending submodule is configured to send the parameter acquisition request to the server if the terminal is currently connected to the network.

[0136] In an optional embodiment, the device may further include: a second scheduling module and a second sending module; wherein,

[0137] The second scheduling module is configured to schedule hardware resources for the operator according to default resource scheduling parameters if the terminal is not currently connected to the network;

[0138] The second sending module is configured to send the parameter acquisition request to the server in response to the terminal being connected to the network.

[0139] In an optional embodiment, Figure 3 Based on the control device shown, the terminal may include a graphics processor;

[0140] The deep learning model may include a model for running on the graphics processor;

[0141] The hardware resources may include hardware resources of the graphics processor.

[0142] In an optional embodiment, the resource scheduling parameter may include a parameter indicating the number of threads used to process the operator.

[0143] In an optional embodiment, the parameter may include a local work size parameter used in the open computing language OpenCL.

[0144] In an optional embodiment, Figure 3 Based on the control device shown, the first sending module 31 may include: an acquisition submodule and a second sending submodule; wherein,

[0145] The acquisition submodule is configured to acquire the hardware information of the terminal;

[0146] The second sending submodule is configured to send a parameter acquisition request carrying the hardware information to the server.

[0147] In an optional embodiment, Figure 3 Based on the control device shown, the hardware information may include the model of the terminal.

[0148] Figure 4 is a block diagram of a data processing device according to an exemplary embodiment. Figure 4 The data processing device shown is applied to a server, and the device comprises: a receiving module 41, a determining module 42 and a sending module 43; wherein,

[0149] The receiving module 41 is configured to receive a parameter acquisition request sent by a terminal, the terminal having a built-in deep learning model, the parameter acquisition request is used to request to obtain resource scheduling parameters set for an operator in the deep learning model, and the resource scheduling parameters are used as a basis for the terminal to schedule hardware resources for the operator;

[0150] The determination module 42 is configured to determine, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal;

[0151] The sending module 43 is configured to send the target resource scheduling parameters to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0152] In an optional embodiment, Figure 4 Based on the control device shown, the determination module 42 may include: a first determination submodule, an acquisition submodule, and a second determination submodule; wherein the first determination submodule is configured to determine whether the server is provided with resource scheduling parameters matching the hardware information;

[0153] The obtaining submodule is configured to, if not, control different terminals to schedule hardware resources to the operator according to different resource scheduling parameters, and obtain the execution time of the operator when using each resource scheduling parameter;

[0154] The second determining submodule is configured to determine the resource scheduling parameter used when the execution time is the shortest as the target resource scheduling parameter.

[0155] In an optional embodiment, Figure 4 Based on the control device shown, the determination module 42 may include: an acquisition submodule and a determination submodule; wherein,

[0156] The acquisition submodule is configured to acquire the hardware information carried by the parameter acquisition request when the parameter acquisition request carries the hardware information;

[0157] The determination submodule is configured to determine the target resource scheduling parameters that match the hardware information.

[0158] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.

[0159] Figure 5 is a schematic diagram of a terminal structure according to an exemplary embodiment, the terminal may include: an internal bus 510, and a memory 520, a processor 530 and an external interface 540 connected through the internal bus 510; wherein,

[0160] External interface 540, used to obtain data;

[0161] Memory 520, for storing machine-readable instructions corresponding to model usage;

[0162] The processor 530 is configured to read the machine-readable instructions on the memory 520 and execute the machine-executable instructions to implement the following operations:

[0163] Sending a parameter acquisition request to the server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters serve as a basis for the terminal to schedule hardware resources for the operator;

[0164] receiving a target resource scheduling parameter sent by the server, wherein the target resource scheduling parameter matches the hardware information of the terminal;

[0165] In the process of using the deep learning model, hardware resources are scheduled to the operator according to the target resource scheduling parameters.

[0166] Figure 6 is a schematic diagram of a server structure according to an exemplary embodiment, the server may include: an internal bus 610, and a memory 620, a processor 630 and an external interface 640 connected through the internal bus 610; wherein,

[0167] External interface 640, used to obtain data;

[0168] Memory 620, used to store machine-readable instructions corresponding to data processing;

[0169] The processor 630 is configured to read the machine-readable instructions on the memory 620 and execute the machine-executable instructions to implement the following operations:

[0170] Receiving a parameter acquisition request sent by a terminal, the terminal having a built-in deep learning model, the parameter acquisition request being used to request acquisition of resource scheduling parameters set for an operator in the deep learning model, the resource scheduling parameters being used as a basis for the terminal to schedule hardware resources for the operator;

[0171] Determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal;

[0172] The target resource scheduling parameters are sent to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

[0173] The embodiment of the present disclosure also provides a non-temporary computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above-mentioned model use method are implemented.

[0174] The embodiment of the present disclosure also provides a non-temporary computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the above-mentioned data processing method are implemented.

[0175] In the disclosed embodiments, the computer-readable storage medium may be in various forms. For example, in different examples, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or similar storage medium, or a combination thereof. In particular, the computer-readable medium may also be paper or other suitable medium capable of printing programs. Using these media, these programs may be acquired electrically (e.g., optically scanned), compiled, interpreted, and processed in a suitable manner, and then stored in a computer medium.

[0176] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0177] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for using a model, characterized in that: Applied to a terminal, the terminal having a built-in deep learning model, the method comprising: Sending a parameter acquisition request to the server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters serve as a basis for the terminal to schedule hardware resources for the operator; receiving a target resource scheduling parameter sent by the server, wherein the target resource scheduling parameter matches the hardware information of the terminal; In the process of using the deep learning model, hardware resources are scheduled to the operator according to the target resource scheduling parameters.

2. The method according to claim 1, characterized in that The step of sending a parameter acquisition request to the server includes: In response to the deep learning model being used for the first time, determining whether the terminal is currently connected to a network; If the terminal is currently connected to the network, the parameter acquisition request is sent to the server.

3. The method according to claim 2, characterized in that The method further comprises: If the terminal is not currently connected to the network, scheduling hardware resources for the operator according to default resource scheduling parameters; In response to the terminal being connected to the network, the parameter acquisition request is sent to the server.

4. The method according to claim 1, characterized in that: The terminal includes a graphics processor; The deep learning model includes a model for running on the graphics processor; The hardware resources include hardware resources of the graphics processor.

5. The method according to claim 4, characterized in that The resource scheduling parameters include parameters indicating the number of threads used to process the operator.

6. The method according to claim 5, characterized in that The parameters include a local work size parameter used in the open computing language OpenCL.

7. The method according to claim 1, characterized in that The step of sending a parameter acquisition request to the server includes: Acquiring hardware information of the terminal; Send a parameter acquisition request carrying the hardware information to the server.

8. The method according to claim 1, characterized in that The hardware information includes the model of the terminal.

9. A data processing method, characterized in that: Applied to a server, the method comprises: Receiving a parameter acquisition request sent by a terminal, the terminal having a built-in deep learning model, the parameter acquisition request being used to request acquisition of resource scheduling parameters set for an operator in the deep learning model, the resource scheduling parameters being used as a basis for the terminal to schedule hardware resources for the operator; Determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal; The target resource scheduling parameters are sent to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

10. The method according to claim 9, characterized in that The determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal includes: Determining whether the server is provided with resource scheduling parameters matching the hardware information; If not, controlling different terminals to schedule hardware resources to the operator according to different resource scheduling parameters, and obtaining the execution time of the operator when using each resource scheduling parameter; The resource scheduling parameters used when the execution time is the shortest are determined as the target resource scheduling parameters.

11. The method according to claim 9, characterized in that The determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal includes: In a case where the parameter acquisition request carries the hardware information, acquiring the hardware information carried by the parameter acquisition request; The target resource scheduling parameters matching the hardware information are determined.

12. A model using device, characterized in that: Applied to a terminal, the terminal has a built-in deep learning model, and the device includes: A first sending module is configured to send a parameter acquisition request to a server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters are used as a basis for the terminal to schedule hardware resources for the operator; A receiving module, configured to receive a target resource scheduling parameter sent by the server, wherein the target resource scheduling parameter matches the hardware information of the terminal; The first scheduling module is configured to schedule hardware resources to the operator according to the target resource scheduling parameters during the use of the deep learning model.

13. The device according to claim 12, characterized in that The first sending module includes: a determination submodule, configured to determine whether the terminal is currently connected to a network in response to the deep learning model being used for the first time; The first sending submodule is configured to send the parameter acquisition request to the server if the terminal is currently connected to the network.

14. The device according to claim 13, characterized in that The device also includes: A second scheduling module is configured to schedule hardware resources for the operator according to default resource scheduling parameters if the terminal is not currently connected to the network; The second sending module is configured to send the parameter acquisition request to the server in response to the terminal being connected to the network.

15. The device according to claim 12, characterized in that The terminal includes a graphics processor; The deep learning model includes a model for running on the graphics processor; The hardware resources include hardware resources of the graphics processor.

16. The device according to claim 15, characterized in that The resource scheduling parameters include parameters indicating the number of threads used to process the operator.

17. The device according to claim 16, characterized in that The parameters include a local work size parameter used in the open computing language OpenCL.

18. The device according to claim 12, characterized in that The first sending module includes: An acquisition submodule, configured to acquire hardware information of the terminal; The second sending submodule is configured to send a parameter acquisition request carrying the hardware information to the server.

19. The device according to claim 12, characterized in that The hardware information includes the model of the terminal.

20. A data processing device, characterized in that: Applied to a server, the device comprises: A receiving module is configured to receive a parameter acquisition request sent by a terminal, wherein the terminal has a built-in deep learning model, and the parameter acquisition request is used to request to obtain resource scheduling parameters set for an operator in the deep learning model, and the resource scheduling parameters are used as a basis for the terminal to schedule hardware resources for the operator; a determination module, configured to determine, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal; The sending module is configured to send the target resource scheduling parameters to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.

21. The device according to claim 20, characterized in that The determining module comprises: A first determination submodule is configured to determine whether the server is provided with resource scheduling parameters matching the hardware information; The obtaining submodule is configured to, if not, control different terminals to schedule hardware resources to the operator according to different resource scheduling parameters, and obtain the execution time of the operator when using each resource scheduling parameter; The second determining submodule is configured to determine the resource scheduling parameter used when the execution time is the shortest as the target resource scheduling parameter.

22. The device according to claim 20, characterized in that The determining module comprises: an acquisition submodule, configured to acquire the hardware information carried by the parameter acquisition request when the parameter acquisition request carries the hardware information; The determination submodule is configured to determine the target resource scheduling parameters that match the hardware information.

23. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

24. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 9 to 11 are implemented.

25. A terminal, characterized in that: The terminal comprises: an internal bus, and a memory, a processor and an external interface connected through the internal bus; the terminal has a built-in deep learning model; wherein, The external interface is used to obtain data; The memory is used to store machine-readable instructions corresponding to model usage; The processor is configured to read the machine-readable instructions on the memory and execute the machine-executable instructions to implement the following operations: Sending a parameter acquisition request to the server, wherein the parameter acquisition request is used to request to obtain resource scheduling parameters set for the operator in the deep learning model, and the resource scheduling parameters serve as a basis for the terminal to schedule hardware resources for the operator; receiving a target resource scheduling parameter sent by the server, wherein the target resource scheduling parameter matches the hardware information of the terminal; In the process of using the deep learning model, hardware resources are scheduled to the operator according to the target resource scheduling parameters.

26. A server, characterized in that: It includes: an internal bus, and a memory, a processor and an external interface connected through the internal bus; wherein, The external interface is used to obtain data; The memory is used to store machine-readable instructions corresponding to data processing; The processor is configured to read the machine-readable instructions on the memory and execute the machine-executable instructions to implement the following operations: Receiving a parameter acquisition request sent by a terminal, the terminal having a built-in deep learning model, the parameter acquisition request being used to request acquisition of resource scheduling parameters set for an operator in the deep learning model, the resource scheduling parameters being used as a basis for the terminal to schedule hardware resources for the operator; Determining, according to the parameter acquisition request, a target resource scheduling parameter that matches the hardware information of the terminal; The target resource scheduling parameters are sent to the terminal, so that the terminal schedules hardware resources for the operator according to the target resource scheduling parameters during the use of the deep learning model.