WO2022160155A1 - Method and apparatus for model management - Google Patents

Method and apparatus for model management Download PDF

Info

Publication number
WO2022160155A1
WO2022160155A1 PCT/CN2021/074081 CN2021074081W WO2022160155A1 WO 2022160155 A1 WO2022160155 A1 WO 2022160155A1 CN 2021074081 W CN2021074081 W CN 2021074081W WO 2022160155 A1 WO2022160155 A1 WO 2022160155A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
server
terminal device
container
processed
Prior art date
Application number
PCT/CN2021/074081
Other languages
French (fr)
Chinese (zh)
Inventor
许斌
梁琪
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2021/074081 priority Critical patent/WO2022160155A1/en
Publication of WO2022160155A1 publication Critical patent/WO2022160155A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present application relates to the field of communications, and more particularly, to a method and apparatus for managing models.
  • AI Artificial intelligence
  • Deep learning is an important technology in artificial intelligence. Deep learning aims to build a neural network that simulates the human brain for analysis and learning, and processes data by imitating the working mechanism of the human brain. Deep learning has been widely used in many fields such as image processing and speech recognition.
  • end devices are also increasingly applying deep learning to support complex applications.
  • increasingly complex computing tasks and increasingly large amounts of data make the computing resources required for deep learning larger and larger. This puts forward higher requirements on the hardware resources of the terminal device.
  • terminal devices cannot integrate computing resources with high computing power, thus limiting the application of deep learning in terminal devices.
  • a mobile edge computing method which deploys the hardware resources required for deep learning on the mobile edge computing device.
  • Mobile edge computing devices need to be oriented to different types of terminal devices, so it is necessary to provide or deploy a variety of virtualized containers to handle requests from different types of terminal devices, and the development cost is high.
  • the present application provides a method and apparatus for managing models, which can reduce development costs and management complexity.
  • a method of managing a model may, for example, be performed by a server, or may also be performed by a component (eg, a circuit or a chip) in the server.
  • a component eg, a circuit or a chip
  • the server may be an edge computing device, such as a mobile edge computing (mobile edge computing, MEC) device.
  • MEC mobile edge computing
  • the method includes: first, the server obtains a model file of a first model of a terminal device and information (eg, application data) of a task to be processed of the terminal device, where the first model is a model related to the task to be processed , the first model can run in the running environment of the terminal device; then, the first model is converted into a second model, and the second model can run in the running environment of the server; finally, scheduling the first model A virtualized container, and the second model and the to-be-processed task are loaded into the first virtualized container.
  • information eg, application data
  • the server converts or adapts the model uploaded by the terminal device, and the converted model can be run on the server side, that is, adapted to the running environment of the server.
  • the server can use the model adaptation technology to convert the model on the terminal device side into a model that can run on the server side.
  • application developers do not need to develop models adapted to the server side according to the hardware resources of the server, nor do they need to deploy different types of virtualized containers on the server side according to the model type, which reduces development costs and reduces the management complexity of the server side. .
  • the first model is a model related to a task to be processed by the terminal device, which can be understood as: the first model is a training model for processing the task to be processed by the terminal device. For example, if the task to be processed is a certain image task of the terminal device, then the first model is a training model for processing the image task (such as image data).
  • the server obtains the model file of the first model of the terminal device and the information of the tasks to be processed of the terminal device through a network device (such as an access network device or a core network device).
  • a network device such as an access network device or a core network device.
  • the server scheduling the first virtualized container includes: the server inquires about an idle container; in the case of an idle container, the server uses the idle container as the first virtual container or, if there is no idle container, the server obtains the first virtualized container through an instantiation operation.
  • the server can use the idle container directly. In this way, the server can use the existing idle containers, and there is no need to re-pull the image from the image repository and instantiate it into a container, thus saving the overhead of image pulling and instantiation. If there is no idle container, the server needs to re-pull the image from the image repository and instantiate it into a container to obtain the first virtualized container.
  • the method further includes: returning, by the server, a processing result for the to-be-processed task, where the processing result is that the first virtualization container processes the second model and the to-be-processed task owned.
  • the server returns the processing result to the terminal device so that the terminal device can perform further processing. In this way, the processing of the to-be-processed task is completed on the server side, thereby saving power consumption on the terminal device side.
  • the server can return the processing result to the terminal device through the network device.
  • a method of managing a model is provided.
  • the method may be performed by, for example, a terminal device, or may also be performed by a component (eg, a circuit or a chip) in the terminal device. This application does not limit this.
  • the method includes: when it is determined that the computing power of the task to be processed is unloaded, the terminal device triggers a model moving mechanism, and the model moving mechanism is used to upload the first model of the terminal device to the server, the first model
  • the model is a model related to the task to be processed, and the first model can run in the operating environment of the terminal device; the terminal device sends the first message, and the first message includes the first model the model file and the information about the pending task.
  • the terminal device when the computing power offloading mechanism is triggered, can also trigger (or drive) the model up-moving mechanism at the same time, and upload the model file on the terminal device side to the server. That is, the terminal device transmits the model file on the terminal device side to the server when the computing power is unloaded.
  • the terminal device uploads the model file to the server, so that the server converts or adapts the model uploaded by the terminal device, and the converted model can run on the server side, that is, adapt to the running environment of the server. In this way, the tasks to be processed by the terminal device are moved to the processor side for processing, which helps to save the power consumption of the terminal device.
  • the server can use the model adaptation technology to convert the model on the terminal device side into a model that can run on the server side.
  • application developers do not need to develop models adapted to the server side according to the hardware resources of the server, nor do they need to deploy different types of virtualized containers on the server side according to the model type, which reduces development costs and reduces the management complexity of the server side. .
  • the first model is a model related to a task to be processed by the terminal device, which can be understood as: the first model is a training model for processing the task to be processed by the terminal device.
  • the first model is a training model for processing the image task (eg, image data).
  • the terminal device may send the first message to the server through a network device (such as an access network device or a core network device).
  • a network device such as an access network device or a core network device.
  • the first message may be an inference request message.
  • the method further includes: receiving, by the terminal device, a processing result for the to-be-processed task, where the processing result is obtained by processing the second model and the to-be-processed task by the first virtualization container,
  • the second model is capable of running in the operating environment of the server. In this way, the processing of the to-be-processed task is completed on the server side, thereby saving power consumption on the terminal device side.
  • the terminal device can obtain the processing result through the network device.
  • a third aspect provides an apparatus for managing models, where the apparatus is configured to execute the method provided in the first aspect.
  • the apparatus may include a unit for performing the method provided by the first aspect.
  • an apparatus for managing models is provided, where the apparatus is configured to execute the method provided in the second aspect.
  • the apparatus may include a unit for performing the method provided by the second aspect.
  • an apparatus for managing a model including a processor.
  • the processor is coupled to the memory and can be used to execute instructions in the memory to implement the method in any one of the possible implementations of the first aspect above.
  • the apparatus for managing the model further includes a memory.
  • the apparatus for managing the model further includes a communication interface, and the processor is coupled to the communication interface.
  • the device is a server.
  • the communication interface may be a transceiver, or an input/output interface.
  • the device is a chip configured in a server.
  • the communication interface may be an input/output interface.
  • the transceiver may be a transceiver circuit.
  • the input/output interface may be an input/output circuit.
  • an apparatus for managing a model including a processor.
  • the processor is coupled to the memory and can be used to execute instructions in the memory to implement the method in any of the possible implementations of the second aspect above.
  • the apparatus further includes a memory.
  • the apparatus further includes a communication interface to which the processor is coupled.
  • the apparatus is a terminal device.
  • the communication interface may be a transceiver, or an input/output interface.
  • the apparatus is a chip configured in a terminal device.
  • the communication interface may be an input/output interface.
  • the transceiver may be a transceiver circuit.
  • the input/output interface may be an input/output circuit.
  • a processor including: an input circuit, an output circuit, and a processing circuit.
  • the processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any one of the possible implementations of the first aspect and the second aspect.
  • the above-mentioned processor may be a chip
  • the input circuit may be an input pin
  • the output circuit may be an output pin
  • the processing circuit may be a transistor, a gate circuit, a flip-flop, and various logic circuits.
  • the input signal received by the input circuit may be received and input by, for example, but not limited to, a receiver
  • the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter
  • the circuit can be the same circuit that acts as an input circuit and an output circuit at different times.
  • the embodiments of the present application do not limit the specific implementation manners of the processor and various circuits.
  • an apparatus including a processor and a memory.
  • the processor is used for reading the instructions stored in the memory, and can receive signals through the receiver and transmit signals through the transmitter, so as to execute the method in any possible implementation manner of the first aspect and the second aspect.
  • processors there are one or more processors and one or more memories.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • the memory can be a non-transitory memory, such as a read only memory (ROM), which can be integrated with the processor on the same chip, or can be separately set in different On the chip, the embodiment of the present application does not limit the type of the memory and the setting manner of the memory and the processor.
  • ROM read only memory
  • sending information may be a process of outputting information from the processor
  • receiving information may be a process of receiving information by the processor.
  • the data output by the processing can be output to the transmitter, and the input data received by the processor can be from the receiver.
  • the transmitter and the receiver may be collectively referred to as a transceiver.
  • the device in the above-mentioned eighth aspect may be a chip, and the processor may be implemented by hardware or by software.
  • the processor When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software , the processor may be a general-purpose processor, and is implemented by reading software codes stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by an apparatus for managing a model, the apparatus enables the apparatus to implement the method in any possible implementation manner of the first aspect .
  • a tenth aspect provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by an apparatus for managing a model, the apparatus enables the apparatus to implement the method in any possible implementation manner of the second aspect .
  • a computer program product comprising instructions that, when executed by a computer, cause an apparatus for managing models to implement the method provided in the first aspect.
  • a twelfth aspect provides a computer program product comprising instructions that, when executed by a computer, cause an apparatus for managing models to implement the method provided by the second aspect.
  • a communication system including the aforementioned server and terminal device.
  • the communication system further includes access network equipment and/or core network equipment.
  • FIG. 1 is a schematic structural diagram of a mobile communication system to which an embodiment of the present application is applied;
  • Figure 2 is an example diagram of an architecture based on mobile edge computing
  • Figure 3 is an example diagram of an architecture based on cloud computing
  • FIG. 4 is a schematic diagram of a method for managing a model according to an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of an apparatus for managing a model provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another apparatus for managing a model provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • LTE long term evolution
  • FDD frequency division duplex
  • TDD time division duplex
  • UMTS universal mobile telecommunication system
  • WiMAX worldwide interoperability for microwave access
  • 5G future 5th generation
  • NR new wireless
  • D2D device-to-device
  • machine communication systems vehicle networking communication systems
  • IoT systems IoT systems
  • NTN non-terrestrial network
  • FIG. 1 is a schematic structural diagram of a mobile communication system to which an embodiment of the present application is applied.
  • the mobile communication system includes a core network device 110 , an access network device 120 and at least one terminal device (such as the terminal device 130 and the terminal device 140 in FIG. 1 ).
  • the terminal equipment is wirelessly connected to the access network equipment, and the access network equipment is wirelessly or wiredly connected to the core network equipment.
  • the core network device and the access network device can be independent and different physical devices, or the functions of the core network device and the logical function of the access network device can be integrated on the same physical device, or they can be integrated on one physical device.
  • Terminal equipment can be fixed or movable.
  • FIG. 1 is just a schematic diagram, and the communication system may also include other network devices, such as wireless relay devices and wireless backhaul devices, which are not shown in FIG. 1 .
  • the embodiments of the present application do not limit the number of core network devices, access network devices, and terminal devices included in the mobile communication system.
  • the terminal device in this application can communicate with the access network device.
  • terminal equipment may also be referred to as user equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device.
  • the terminal device in the embodiment of the present application may be a mobile phone, a satellite phone, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a tablet computer (pad), or a computer with a wireless transceiver function.
  • SIP session initiation protocol
  • the embodiments of the present application do not limit application scenarios.
  • the terminal device may also refer to a chip with a communication function, etc., which is not limited in this embodiment of the present application.
  • the technical solutions of the present application are described in detail by taking a terminal device as an example.
  • the access network device in this application may be a radio access network (radio access network, RAN) device.
  • RAN equipment includes but is not limited to: evolved node B (evolved nodeB, eNB or eNodeB), radio network controller (radio network controller, RNC), node B (node B, NB), base station controller (base station controller, BSC) ), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved node B, or home node B, HNB), base band unit (base band unit, BBU), wireless fidelity (wireless fidelity, WIFI)
  • the access point (AP), wireless relay node, wireless backhaul node, transmission point (TP) or transmission and reception point (TRP) in the system can also be 5G,
  • NR, gNB in system, or transmission point (TRP or TP) base station in future mobile communication system or access node in wireless fidelity (Wi-Fi) system, base station in 5G system
  • a gNB may include a centralized unit (CU) and a DU.
  • the gNB may also include an active antenna unit (AAU).
  • the CU implements some functions of the gNB, and the DU implements some functions of the gNB.
  • the CU is responsible for processing non-real-time protocols and services, and implementing functions of radio resource control (RRC) and packet data convergence protocol (PDCP) layers.
  • RRC radio resource control
  • PDCP packet data convergence protocol
  • the DU is responsible for processing physical layer protocols and real-time services, and implementing the functions of the radio link control (RLC) layer, the media access control (MAC) layer and the physical (PHY) layer.
  • RLC radio link control
  • MAC media access control
  • PHY physical
  • AAU implements some physical layer processing functions, radio frequency processing and related functions of active antennas. Since the information of the RRC layer will eventually become the information of the PHY layer, or be transformed from the information of the PHY layer, therefore, in this architecture, the higher-layer signaling, such as the RRC layer signaling, can also be considered to be sent by the DU. , or, sent by DU+AAU.
  • the network device may be a device including one or more of a CU node, a DU node, and an AAU node.
  • the CU can be divided into network devices in the access network, and the CU can also be divided into network devices in a core network (core network, CN), which is not limited in this application.
  • the access network device may also refer to a chip with communication functions, etc., or may also be a satellite, a device-to-device (D2D), a vehicle-to-everything (V2X), a machine A device that assumes a base station function in machine-to-machine (M2M) communication, and so on.
  • D2D device-to-device
  • V2X vehicle-to-everything
  • M2M machine A device that assumes a base station function in machine-to-machine (M2M) communication, and so on.
  • the solutions of the embodiments of the present application may be applicable to edge computing scenarios or cloud computing scenarios.
  • a remote server referred to as a server for short.
  • the server in this application has the computing resources required for deep learning, and can handle complex computing tasks (eg, large computing power, huge data, etc.).
  • the server can be mobile edge computing (MEC) or the cloud.
  • MEC mobile edge computing
  • the hardware resources required for deep learning are deployed on the MEC device, so that the terminal device can move tasks with high power consumption and high computing power to the MEC side, while the terminal device is locally responsible for tasks with lower complexity (such as , result rendering and display), reducing the computing load of the terminal device.
  • the remote server will be referred to as a server for short in the following.
  • FIG. 2 is an example diagram of an architecture based on mobile edge computing.
  • the architecture includes a base station, an MEC server and n UEs (UE1, UE2, ... UEn), where n is a positive integer.
  • the MEC server can be deployed in core network equipment.
  • the MEC server has resources for processing tasks, such as communication resources, computing resources, and storage resources shown in FIG. 2 .
  • the task processing of the UE requires certain communication resources, computing resources and storage resources (for example, FIG. 2 shows the resources required by task 1 in UE1, task 2 in UE2, ... task n in UEn).
  • the task processing process of the UE can be offloaded to the MEC server side. As shown in FIG.
  • the processing process of task 1 in UE1, task 2 of UE2, ... task n of UEn can be implemented on the MEC server side.
  • the interaction between the UE and the MEC server may be forwarded by the base station or the core network device, which is not specifically limited.
  • FIG 3 is an example diagram of an architecture based on cloud computing.
  • the architecture includes cloud server, server, central processing unit, different types of access devices (such as access point AP, base station, satellite device), and different types of UE (such as tablet, mobile phone, laptop).
  • the cloud server is connected to the server through a network.
  • the uplink and downlink communication is implemented between the access network device and the UE through a communication link. Communication between the access network equipment and the central processor is also possible.
  • part or all of the data processing and storage functions of the UE can be moved to the cloud server.
  • FIG. 1 to FIG. 3 are only exemplary descriptions, and do not limit the protection scope of the embodiments of the present application.
  • the technical solutions of the embodiments of the present application can also be applied to other communication systems.
  • the present application does not limit the devices or network elements included in the communication systems of FIGS. 1 to 3 .
  • the communication system may also include other devices, which are not limited.
  • the present application does not specifically limit the number of devices or network elements included in FIG. 1 to FIG. 3 .
  • the terminal device or server includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • This hardware layer includes hardware such as central processing unit (CPU), memory management unit (MMU), and memory (also called main memory).
  • the operating system may be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system.
  • the application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
  • the embodiments of the present application do not specifically limit the specific structure of the execution body of the methods provided by the embodiments of the present application, as long as the program that records the codes of the methods provided by the embodiments of the present application can be executed to provide the methods provided by the embodiments of the present application.
  • the execution subject of the method provided by the embodiment of the present application may be a terminal device or a server, or a functional module in the terminal device or server that can call and execute a program.
  • various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques.
  • article of manufacture encompasses a computer program accessible from any computer readable device, carrier or medium.
  • computer readable media may include, but are not limited to: magnetic storage devices (eg, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (eg, compact discs (CDs), digital versatile discs (DVDs) etc.), smart cards and flash memory devices (eg, erasable programmable read-only memory (EPROM), card, stick or key drives, etc.).
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing, and/or carrying instructions and/or data.
  • the following describes a method for managing a model according to an embodiment of the present application with reference to FIG. 4 .
  • FIG. 4 is a schematic diagram of a method 300 for managing a model according to an embodiment of the present application.
  • the server in method 300 may be the MEC server in FIG. 2 or the cloud server in FIG. 3 , which is not limited.
  • the method 300 includes:
  • the terminal device triggers a model moving mechanism, and the model moving mechanism is used to upload the first model of the terminal device to the server, where the first model is A model related to the task to be processed (eg, application data).
  • the task to be processed refers to a reasoning task of a certain application of the terminal device.
  • the first model is a model related to the task to be processed by the terminal device, which can be understood as: the first model is a training model or a machine learning model for processing the task to be processed by the terminal device.
  • the first model is a training model for processing the image task (eg, image data).
  • the first model in this application is a machine learning model (also referred to as a target model), and can run in the environment of a terminal device.
  • the application data is input into the target model, and the processing result, operation result, or inference result of the application data can be obtained.
  • the first model may be a mathematical model such as a neural network model, a support vector machine model, or the like.
  • HashRate offloading which can also be referred to as computing power upward, refers to offloading or moving up part or all of the computing functions or storage functions of the tasks to be processed on the terminal device to the server side for processing.
  • Determining to unload computing power can be understood as triggering the unloading mechanism of computing power.
  • the terminal device when the computing power offloading mechanism is triggered, the terminal device can also trigger (or drive) the model up-moving mechanism at the same time, and upload the model file on the terminal device side to the server. That is, the terminal device transmits the model file on the terminal device side to the server when the computing power is unloaded.
  • this application does not specifically limit the triggering method of the computing power offloading mechanism, which may be triggered by a user or by a terminal device.
  • the model moving mechanism is used to upload the first model of the terminal device to the server, which specifically includes: uploading the model file (eg, model structure and model parameters, etc.) of the first model of the terminal device to the server.
  • the model parameters refer to parameters related to the model, such as weights, biases and other parameters.
  • the present application does not specifically limit the manner of triggering the model move-up mechanism.
  • the terminal device determines that the application (APP) has high computing power requirements or high computing requirements, it can automatically trigger the model moving mechanism, and upload the local model file and application data to the server, so that the The server processes computing tasks to save the computing overhead of the terminal.
  • APP application
  • the server processes computing tasks to save the computing overhead of the terminal.
  • the terminal device sends a first message, where the first message includes a model file of the first model of the terminal device and information of a task to be processed.
  • the server obtains the model file of the first model of the terminal device and the information of the task to be processed.
  • the purpose of the terminal device sending the first message is to upload or transmit the local model file of the terminal device (such as the model file of the first model) and the information of the task to be processed to the server side, so that the server side can process the application data.
  • the information of the task to be processed includes application data. It can be understood that, in addition to the application data, the information of the to-be-processed task may also include other information related to the to-be-processed task, which is not specifically limited.
  • the first message may be in the form of an existing message, or may be a newly defined message.
  • the first message may be an inference request message sent by the terminal device.
  • the terminal device may send the first message to the server through the network device.
  • the network device is an access network device or a core network device.
  • the terminal device sends a first message to the access network device, where the first message includes the model file of the first model and the application data of the terminal device; the access network device sends the model file of the first model and the application data of the terminal device to Core network device; after receiving the model file of the first model and the application data, the core network device sends the model file of the first model and the application data of the terminal device to the server.
  • the terminal device sends a first message to the access network device, where the first message includes the model file of the first model and the application data of the terminal device; the access network device sends the model file of the first model and the application data of the terminal device to the server.
  • this application does not specifically limit how the server obtains the model file uploaded by the terminal device and the information of the task to be processed.
  • the server may obtain the information of the first model of the terminal device and the pending tasks of the terminal device from the access network device, or obtain the information of the first model of the terminal device and the pending tasks of the terminal device from the core network device .
  • This application does not limit the form or name of the message (the message includes the model file uploaded by the terminal device and the information of the task to be processed) exchanged between the server and the network device (access network device or core network device), and the existing
  • the message form can also be a newly defined message.
  • the access network device or the core network device may transparently transmit the first message to the server.
  • the access network device or the core network device can process the first message to obtain the second message (the second message includes the model file uploaded by the terminal device and the information of the task to be processed), and then send the second message to server.
  • the server may perform conversion processing on the first model of the terminal device, so that the converted model can be adapted to the operating environment of the server.
  • the server converts the first model into a second model, where the second model can run in the running environment of the server.
  • first model and the second model have different requirements on the physical environment.
  • the first model can run in the running environment of the terminal device.
  • the second model can run on the server's runtime environment.
  • the server After obtaining the model file of the first model uploaded by the terminal device, the server uses the model conversion technology (or model adaptation technology) to convert the first model uploaded by the terminal device according to the model file of the first model and in combination with its own operating environment. Converting or adapting to the second model enables the second model to be adapted to the operating environment of the server.
  • the model conversion technology refers to the technical means adopted by those skilled in the art in order to convert the model uploaded by the terminal device into a model suitable for the operating environment of the server, and the specific method is not limited.
  • the server uses the model conversion technology to convert the TensorFlow model to the Caffe model, That is, the second model is the Caffe model, and the Caffe model is adapted to the Caffe environment of the server.
  • the server can also convert or adapt the model to a model that can run in the server's operating environment. That is to say, the server can convert models of different types of terminal devices based on its own platform operating environment, and the converted models can run in the environment of the server.
  • the server side can obtain the model of the terminal device, and there is no need to deploy additional models on the server side. There is also no need to build an additional model repository on the server side to store models.
  • a unified virtualized environment is deployed on the server side, that is, models uploaded by different terminal devices can run in the unified virtualized environment after being adapted. That is, for models of different types of terminal devices, the server can process requests from the terminal device side in a unified virtualization environment, which reduces the management complexity on the server side.
  • the server can upload different types of target models uploaded by multiple terminal devices (for example, Caffe model, Davinci model, etc.) are uniformly converted into TensorFlow model models, so that different types of target models can be run on the server side.
  • the virtual environment deployed on the server side includes the TensorFlow framework (also referred to as the TF environment), then after the server obtains the model files of different types of terminal devices, it only needs to convert the model of the terminal device to a model that matches the TensorFlow framework. , without having to customize the environment for each model. Since the server can process different model types in a unified virtualization environment, the server does not need to load or deploy corresponding virtualized environments according to different model types. Application developers also do not need to deploy or customize different types of virtual environments on the server according to the type of target model, thereby reducing development costs.
  • the TensorFlow framework also referred to as the TF environment
  • the virtualization environment in this application may include virtualization technologies such as containers (docker) and virtual machines, which are not specifically limited.
  • the server caches the application data uploaded by the terminal device locally, and notifies the container manager to schedule the work container.
  • S340 The server schedules a first virtualized container, and loads the second model and the to-be-processed task of the terminal device into the first virtualized container.
  • the first virtualized container refers to a working container. After the server converts the first model to the second model, the work container can be scheduled so that the work container can process tasks to be processed on the terminal device.
  • scheduling the first virtualized container by the server includes: the server inquires about an idle container; if there is an idle container, the server uses the idle container as the first virtualized container; or, if there is no idle container In the case of a container, the server obtains the first virtualized container through an instantiation operation.
  • Free containers are containers that are not occupied or used.
  • the server can use the idle container directly. In this way, the server can use the existing idle containers, and there is no need to re-pull the image from the image repository and instantiate it into a container, thus saving the overhead of image pulling and instantiation. If there is no idle container, the server needs to re-pull the image from the image repository and instantiate it into a container to obtain the first virtualized container.
  • the terminal device may upload the local model file to the server.
  • the server converts or adapts the model uploaded by the terminal device, and the converted model can be run on the server side, that is, adapted to the running environment of the server.
  • the server can use the model adaptation technology to convert the model on the terminal device side into a model that can run on the server side. In this way, application developers do not need to develop models adapted to the server side according to the hardware resources of the server, nor do they need to deploy different types of virtualized containers on the server side according to the model type, which reduces development costs and reduces the management complexity of the server side. .
  • the terminal device side is referred to as "end side” for short
  • the server side is called “side side” for description.
  • Perceived coordination and model move up enables intelligent loading of the side, and can adapt to different types of models without additional deployment on the side.
  • the server side may return the processing result after processing the task on the terminal device side.
  • the method 300 further includes: the server returning a processing result for the to-be-processed task, where the processing result is obtained by processing the second model and the to-be-processed task by the first virtualization container of.
  • the terminal device receives the processing result.
  • the server starts the first virtualized container, and uses the second model to process to-be-processed tasks of the terminal device, so as to respond to the inference request on the terminal side.
  • the server After the processing of the first virtualized container is completed, the server returns the processing result of the to-be-processed task to the terminal device, so that the terminal device can perform further processing. In this way, the processing of the to-be-processed task is completed on the server side, thereby saving power consumption on the terminal device side.
  • the server can return the processing result to the terminal device through the network device.
  • the server sends the processing result to the core network device, and then the core network device sends the processing result to the access network device, and finally the access network device sends the processing result to the terminal device.
  • the server may include a data processing module, a container manager, and a working container instance, and then the server-side method in the present application is implemented through the data processing module, the container manager, and the working container instance.
  • the data processing module in the server can store the application data transmitted from the terminal device side and cache the application data locally.
  • the data processing module in the server can convert the model uploaded by the terminal device into a model suitable for the container environment of the server.
  • the data processing module in the server notifies the container steward to schedule the container.
  • the container manager determines whether there is an idle container by querying the idle container. If there is no free container, pull the image and instantiate it into a container, and finally start the container as a working container. If there is a free container, use that free container as the work container.
  • the data processing module in the server loads the application data and the transformed model into the worker container.
  • the work container starts the inference process and responds to the inference request from the terminal device. After the work container is processed, the processing result or inference result is returned to the terminal device side for further processing by the terminal device side.
  • the server includes a data processing module, a container manager, and an instance of a work container as an example for description here, and does not constitute a limitation to the embodiments of the present application.
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and inherent logic.
  • the various numerical numbers or serial numbers involved in the above processes are only for the convenience of description, and should not constitute any limitation on the implementation process of the embodiments of the present application.
  • the embodiments of the present application further provide corresponding apparatuses, and the apparatuses include corresponding modules for executing the foregoing embodiments.
  • the modules may be software, hardware, or a combination of software and hardware. It can be understood that the technical features described in the method embodiments are also applicable to the following apparatus embodiments.
  • FIG. 5 is a schematic block diagram of an apparatus for managing a model provided by an embodiment of the present application.
  • the apparatus 1000 of the management model may include a transceiver unit 1100 and a processing unit 1200 .
  • the apparatus 1000 of the management model may correspond to the server in the above method embodiment, for example, may be a server or a chip configured in the server.
  • the apparatus 1000 for managing the model may correspond to the server in the method 300 according to the embodiment of the present application, and the apparatus 1000 for managing the model may include a unit for executing the method executed by the server in the method 300 in FIG. 4 .
  • each unit in the apparatus 1000 for managing the model and the above-mentioned other operations or functions are respectively for realizing the corresponding flow of the server in the method 300 in FIG. 4 .
  • the transceiver unit 1100 and the processing unit 1200 may be respectively used for:
  • a transceiver unit 1100 configured to acquire a model file of a first model of a terminal device and information about tasks to be processed of the terminal device, where the first model is a model related to the task to be processed, and the first model can run in the operating environment of the terminal device.
  • the processing unit 1200 is configured to convert the first model into a second model, where the second model can run in the operating environment of the server; and is further configured to schedule a first virtualized container, and convert the second model and the to-be-processed task is loaded into the first virtualized container.
  • the processing unit 1200 is configured to schedule the first virtualized container, including: querying an idle container; if there is an idle container, using the idle container as the first virtualized container; or, when not When there is an idle container, the first virtualized container is obtained through an instantiation operation.
  • the transceiver unit 1100 is further configured to: return a processing result for the to-be-processed task, where the processing result is that the first virtualization container processes the second model and the to-be-processed task owned.
  • the transceiver unit 1100 in the device 1000 may correspond to the transceiver 830 in the device 800 shown in FIG. 6
  • the processing unit 1200 in the device 1000 may correspond to The processor 810 in the apparatus 800 shown in FIG. 6 .
  • the transceiver unit 1200 in the apparatus 1000 may be an input/output interface circuit.
  • the apparatus 1000 for managing a model further includes a storage unit, which can be used to store instructions or data, and the processing unit can call the instructions or data stored in the storage unit to implement corresponding operations.
  • the storage unit may be implemented by at least one memory, for example, may correspond to the memory 820 in the device 800 in FIG. 6 .
  • the apparatus 1000 for the management model may correspond to the terminal device in the above method embodiments, for example, it may be a terminal device or a chip configured in the terminal device.
  • the apparatus 1000 of the management model may correspond to the terminal device in the method 300 according to the embodiment of the present application, and the apparatus 1000 of the management model may include a unit for executing the method performed by the terminal device in the method 300 in FIG. 4 . . Moreover, each unit in the apparatus 1000 of the management model and the above-mentioned other operations or functions are respectively for realizing the corresponding process of the terminal device in the method 300 in FIG. 4 .
  • the transceiver unit 1100 and the processing unit 1200 may be respectively used for:
  • the processing unit 1200 is configured to trigger a model moving mechanism when it is determined to unload the computing power of the task to be processed, where the model moving mechanism is used to upload the first model of the terminal device to the server, the first model
  • the model is a model related to the to-be-processed task, and the first model can run in the running environment of the terminal device.
  • the transceiver unit 1100 is configured to send the first message, where the first message includes the model file of the first model and the information of the to-be-processed task.
  • the transceiver unit 1100 is further configured to receive a processing result for the to-be-processed task, where the processing result is obtained by the first virtualization container processing the second model and the to-be-processed task, so The second model can run in the operating environment of the server.
  • the transceiver unit 1100 in the apparatus 1000 of the management model may correspond to the transceiver 2020 of the terminal device 2000 shown in FIG. 7
  • the processing unit 1200 in may correspond to the processor 2010 in the terminal device 2000 shown in FIG. 7 .
  • the transceiver unit 1200 in the apparatus 1000 of the management model may be an input/output interface circuit.
  • the apparatus 1000 for managing a model further includes a storage unit, which can be used to store instructions or data, and the processing unit can call the instructions or data stored in the storage unit to implement corresponding operations.
  • the storage unit may be implemented by at least one memory, for example, may correspond to the memory 2030 in the terminal device 2000 in FIG. 7 .
  • an embodiment of the present application further provides an apparatus 800 for managing models.
  • the apparatus 800 includes a processor 810 coupled to a memory 820 for storing computer programs or instructions and/or data, and the processor 810 for executing the computer programs or instructions and/or data stored in the memory 820 such that The methods in the above method embodiments are performed.
  • the apparatus 800 includes one or more processors 810 .
  • the apparatus 800 may further include a memory 820 .
  • the device 800 may include one or more memories 820 .
  • the memory 820 may be integrated with the processor 810, or provided separately.
  • the apparatus 800 may further include a transceiver 830, and the transceiver 830 is used for signal reception and/or transmission.
  • the processor 810 is used to control the transceiver 830 to receive and/or transmit signals.
  • the apparatus 800 is used to implement the operations performed by the server in the above method embodiments.
  • the processor 810 is configured to implement the processing-related operations performed by the server in the above method embodiments
  • the transceiver 830 is configured to implement the above-mentioned method embodiments performed by the server.
  • FIG. 6 only shows a schematic simplified block diagram.
  • the apparatus 800 may also include other elements, including but not limited to any number of transceivers, processors, controllers, memories, etc., which are not specifically limited.
  • the apparatus 800 may be a chip, such as a chip that can be used in a server, for implementing the relevant functions of the processor 810 .
  • the chip can be a field programmable gate array, an application-specific integrated chip, a system chip, a central processing unit, a network processor, a digital signal processing circuit, a microcontroller, and a programmable controller or other integrated chips for realizing related functions.
  • the chip may optionally include one or more memories for storing program codes, and when the codes are executed, make the processor implement corresponding functions.
  • FIG. 7 is a schematic structural diagram of a terminal device 2000 provided by an embodiment of the present application.
  • the terminal device 2000 can be applied to the system shown in FIG. 1 to perform the functions of the terminal device in the foregoing method embodiments.
  • the terminal device 2000 includes a processor 2010 and a transceiver 2020 .
  • the terminal device 2000 further includes a memory 2030 .
  • the processor 2010, the transceiver 2002 and the memory 2030 can communicate with each other through an internal connection path to transmit control or data signals
  • the memory 2030 is used to store computer programs
  • the processor 2010 is used to call and store computer programs from the memory 2030.
  • the computer program is run to control the transceiver 2020 to send and receive signals.
  • the terminal device 2000 may further include an antenna 2040 for sending the uplink data or uplink control signaling output by the transceiver 2020 through wireless signals.
  • the above-mentioned processor 2010 and the memory 2030 can be combined into a processing device, and the processor 2010 is configured to execute the program codes stored in the memory 2030 to realize the above-mentioned functions.
  • the memory 2030 may also be integrated in the processor 2010 or independent of the processor 2010 .
  • the processor 2010 may correspond to the processing unit in FIG. 5 .
  • the foregoing transceiver 2020 may correspond to the communication unit in FIG. 5 , and may also be referred to as a transceiver unit.
  • the transceiver 2020 may include a receiver (or receiver, receiving circuit) and a transmitter (or transmitter, transmitting circuit). Among them, the receiver is used for receiving signals, and the transmitter is used for transmitting signals.
  • the terminal device 2000 shown in FIG. 7 can implement various processes involving the terminal device in the method embodiment shown in FIG. 4 .
  • the operations or functions of each module in the terminal device 2000 are respectively to implement the corresponding processes in the foregoing method embodiments.
  • the above-mentioned processor 2010 may be used to perform the actions described in the foregoing method embodiments that are implemented inside the terminal device, and the transceiver 2020 may be used to perform the actions described in the foregoing method embodiments that the terminal device sends to or receives from the network device. action.
  • the transceiver 2020 may be used to perform the actions described in the foregoing method embodiments that the terminal device sends to or receives from the network device. action.
  • the above terminal device 2000 may further include a power supply 2050 for providing power to various devices or circuits in the terminal device.
  • the terminal device 2000 may further include one or more of an input unit 2060, a display unit 2070, an audio circuit 2080, a camera 2090, a sensor 2100, etc., the audio circuit Speakers 2082, microphones 2084, etc. may also be included.
  • terminal device shown in FIG. 7 is only an example, and does not limit the protection scope of the present application.
  • the terminal equipment can also have other forms.
  • the present application also provides a computer program product, the computer program product includes: computer program code, when the computer program code runs on a computer, the computer is made to execute any of the above method embodiments The method on the server side in the above method, or make the computer execute the method on the terminal device side in the embodiment shown in any of the above methods.
  • the present application further provides a computer-readable storage medium, where program codes are stored in the computer-readable medium, and when the program codes are run on a computer, the computer is made to execute any of the above-mentioned methods.
  • the method on the server side in the example embodiment, or the computer is caused to execute the method on the terminal device side in the embodiment shown by any of the above methods.
  • An embodiment of the present application further provides a processing apparatus, including a processor and an interface; the processor is configured to execute the method for managing a model in any of the foregoing method embodiments.
  • An embodiment of the present application further provides a chip, including a processor and an interface; the processor reads the instructions stored in the memory through the interface, and is used to execute the method for managing the model in any of the above method embodiments.
  • An embodiment of the present application further provides a communication system, where the communication system includes the server and the terminal device in the above embodiment.
  • the apparatus and method for managing the model in the above-mentioned various apparatus embodiments completely correspond to the server and the terminal device, and corresponding steps are performed by the corresponding module or unit, for example, the communication unit (transceiver) performs the receiving or sending in the method embodiment.
  • the steps other than sending and receiving can be performed by the processing unit (processor).
  • processor For functions of specific units, reference may be made to corresponding method embodiments.
  • the number of processors may be one or more.
  • the processor in this embodiment of the present application may be an integrated circuit chip, which has a signal processing capability.
  • each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable circuits.
  • Programming logic devices, discrete gate or transistor logic devices, discrete hardware components may also be a system on chip (SoC), a central processor unit (CPU), or a network processor (network processor).
  • SoC system on chip
  • CPU central processor unit
  • network processor network processor
  • processor can also be a digital signal processing circuit (digital signal processor, DSP), can also be a microcontroller (micro controller unit, MCU), can also be a programmable logic device (programmable logic device, PLD) or other Integrated chip.
  • DSP digital signal processor
  • MCU microcontroller
  • PLD programmable logic device
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • a processing unit for performing the techniques at an apparatus may be implemented in one or more general purpose processors, DSPs, digital signal processing devices, ASICs , programmable logic device, FPGA, or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of the foregoing.
  • a general-purpose processor may be a microprocessor, or alternatively, the general-purpose processor may be any conventional processor, controller, microcontroller, or state machine.
  • a processor may also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors in combination with a digital signal processor core, or any other similar configuration. accomplish.
  • the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • direct rambus RAM direct rambus RAM
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, high-density digital video discs (DVDs)), or semiconductor media (eg, solid state disks, SSD)) etc.
  • system and “network” are often used interchangeably herein.
  • the term “and/or” in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently The three cases of B, where A can be singular or plural, and B can be singular or plural.
  • the character "/" generally indicates that the associated objects are an "or” relationship.
  • a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer.
  • an application running on a computing device and the computing device may be components.
  • One or more components may reside within a process and/or thread of execution, and a component may be localized on one computer and/or distributed between 2 or more computers.
  • these components can execute from various computer readable media having various data structures stored thereon.
  • a component may, for example, be based on a signal having one or more data packets (eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals) Communicate through local and/or remote processes.
  • data packets eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: a U disk, a removable hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk and other media that can store program codes.

Abstract

The present application provides a method and apparatus for model management. By acquiring a model uploaded by a terminal device and converting the model uploaded by the terminal device into a model that can run in a running environment on a server side, the management complexity of the server side is helped to be reduced, so that a server does not need to customize a running environment for models of different types of terminal devices, thus reducing development costs.

Description

管理模型的方法及装置Method and apparatus for managing models 技术领域technical field
本申请涉及通信领域,并且更具体地,涉及一种管理模型的方法及装置。The present application relates to the field of communications, and more particularly, to a method and apparatus for managing models.
背景技术Background technique
人工智能(artificial intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。深度学习是人工智能中的一项重要技术。深度学习旨在建立一个模拟人脑进行分析学习的神经网络,通过模仿人脑的工作机制进行数据处理。深度学习在图像处理、语音识别等众多领域中取得广泛应用。目前,终端设备也愈加广泛地应用深度学习来支持复杂应用。但是日益复杂的计算任务,以及日趋庞大的数据,使得深度学习所需的计算资源越来越大。这就对终端设备的硬件资源提出了更高要求。而终端设备由于体积小、功耗低等因素,无法集成高算力的计算资源,从而限制了深度学习在终端设备上的应用。Artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Deep learning is an important technology in artificial intelligence. Deep learning aims to build a neural network that simulates the human brain for analysis and learning, and processes data by imitating the working mechanism of the human brain. Deep learning has been widely used in many fields such as image processing and speech recognition. Currently, end devices are also increasingly applying deep learning to support complex applications. However, increasingly complex computing tasks and increasingly large amounts of data make the computing resources required for deep learning larger and larger. This puts forward higher requirements on the hardware resources of the terminal device. However, due to factors such as small size and low power consumption, terminal devices cannot integrate computing resources with high computing power, thus limiting the application of deep learning in terminal devices.
为了降低终端设备的计算负荷,目前引入一种移动边缘计算的方法,将深度学习所需的硬件资源部署在移动边缘计算设备。移动边缘计算设备要面向不同类型的终端设备,因此需提供或部署多样化的虚拟化容器,以处理不同类型终端设备的请求,开发成本较高。In order to reduce the computing load of the terminal device, a mobile edge computing method is currently introduced, which deploys the hardware resources required for deep learning on the mobile edge computing device. Mobile edge computing devices need to be oriented to different types of terminal devices, so it is necessary to provide or deploy a variety of virtualized containers to handle requests from different types of terminal devices, and the development cost is high.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请提供一种管理模型的方法及装置,能够减少开发成本,降低管理复杂度。In view of this, the present application provides a method and apparatus for managing models, which can reduce development costs and management complexity.
第一方面,提供了一种管理模型的方法。该方法例如可以由服务器执行,或者,也可以由服务器中的部件(如电路或芯片)执行。本申请对此不作限定。可选地,服务器可以是边缘计算设备,比如,移动边缘计算(mobile edge computing,MEC)设备。In a first aspect, a method of managing a model is provided. The method may, for example, be performed by a server, or may also be performed by a component (eg, a circuit or a chip) in the server. This application does not limit this. Optionally, the server may be an edge computing device, such as a mobile edge computing (mobile edge computing, MEC) device.
该方法包括:首先,服务器获取终端设备的第一模型的模型文件和所述终端设备的待处理任务的信息(比如,应用数据),所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境;然后,将所述第一模型转换成第二模型,所述第二模型能够运行于所述服务器的运行环境;最后,调度第一虚拟化容器,并将所述第二模型和所述待处理任务加载到所述第一虚拟化容器中。The method includes: first, the server obtains a model file of a first model of a terminal device and information (eg, application data) of a task to be processed of the terminal device, where the first model is a model related to the task to be processed , the first model can run in the running environment of the terminal device; then, the first model is converted into a second model, and the second model can run in the running environment of the server; finally, scheduling the first model A virtualized container, and the second model and the to-be-processed task are loaded into the first virtualized container.
服务器通过将终端设备上传的模型进行转换或适配,转换后的模型能够运行于服务器侧,即适配于服务器的运行环境。面向不同类型的终端设备,服务器均可以利用模型适配技术,将终端设备侧的模型转换成能够运行于服务器侧的模型。这样,应用开发商无需根据服务器的硬件资源开发适配于服务侧的模型,也无需根据模型类型在服务器侧部署不同类型的虚拟化容器,减少了开发成本,同时降低了服务器侧的管理复杂度。The server converts or adapts the model uploaded by the terminal device, and the converted model can be run on the server side, that is, adapted to the running environment of the server. For different types of terminal devices, the server can use the model adaptation technology to convert the model on the terminal device side into a model that can run on the server side. In this way, application developers do not need to develop models adapted to the server side according to the hardware resources of the server, nor do they need to deploy different types of virtualized containers on the server side according to the model type, which reduces development costs and reduces the management complexity of the server side. .
第一模型是与终端设备的待处理任务相关的模型,可以理解为:第一模型为用于处理终端设备的待处理任务的训练模型。比如,待处理任务是终端设备的某个图像任务,那么 第一模型为处理该图像任务(比如图像数据)的训练模型。The first model is a model related to a task to be processed by the terminal device, which can be understood as: the first model is a training model for processing the task to be processed by the terminal device. For example, if the task to be processed is a certain image task of the terminal device, then the first model is a training model for processing the image task (such as image data).
可选地,服务器通过网络设备(比如接入网设备或核心网设备)获取终端设备的第一模型的模型文件和所述终端设备的待处理任务的信息。Optionally, the server obtains the model file of the first model of the terminal device and the information of the tasks to be processed of the terminal device through a network device (such as an access network device or a core network device).
在一种可能的实现方式中,所述服务器调度第一虚拟化容器,包括:所述服务器查询空闲容器;在存在空闲容器的情况下,所述服务器将所述空闲容器作为所述第一虚拟化容器;或者,在不存在空闲容器的情况下,所述服务器通过实例化操作,得到所述第一虚拟化容器。In a possible implementation manner, the server scheduling the first virtualized container includes: the server inquires about an idle container; in the case of an idle container, the server uses the idle container as the first virtual container or, if there is no idle container, the server obtains the first virtualized container through an instantiation operation.
也就是说,如果存在空闲容器或未被使用的容器,那么服务器可以直接使用该空闲容器。这样,服务器可以使用已有的空闲容器,不需要从镜像仓库中重新拉取镜像并实例化成容器,从而节省了镜像拉取和实例化的开销。如果不存在空闲容器,那么服务器需要从镜像仓库中重新拉取镜像并实例化成容器,得到第一虚拟化容器。That is, if there is an idle container or an unused container, the server can use the idle container directly. In this way, the server can use the existing idle containers, and there is no need to re-pull the image from the image repository and instantiate it into a container, thus saving the overhead of image pulling and instantiation. If there is no idle container, the server needs to re-pull the image from the image repository and instantiate it into a container to obtain the first virtualized container.
可选地,所述方法还包括:所述服务器返回针对所述待处理任务的处理结果,所述处理结果是所述第一虚拟化容器对所述第二模型和所述待处理任务进行处理得到的。在第一虚拟化容器处理完成后,服务器将处理结果返回给终端设备,以便终端设备作进一步处理。这样,待处理任务的处理过程是在服务器侧完成的,从而节省了终端设备侧的功耗。Optionally, the method further includes: returning, by the server, a processing result for the to-be-processed task, where the processing result is that the first virtualization container processes the second model and the to-be-processed task owned. After the processing of the first virtualized container is completed, the server returns the processing result to the terminal device so that the terminal device can perform further processing. In this way, the processing of the to-be-processed task is completed on the server side, thereby saving power consumption on the terminal device side.
可以理解,本申请对服务器返回处理结果的具体方式不作限定。服务器可以通过网络设备向终端设备返回处理结果。It can be understood that the present application does not limit the specific manner in which the server returns the processing result. The server can return the processing result to the terminal device through the network device.
第二方面,提供了一种管理模型的方法。该方法例如可以由终端设备执行,或者,也可以由终端设备中的部件(如电路或芯片)执行。本申请对此不作限定。In a second aspect, a method of managing a model is provided. The method may be performed by, for example, a terminal device, or may also be performed by a component (eg, a circuit or a chip) in the terminal device. This application does not limit this.
该方法包括:在确定对待处理任务进行算力卸载的情况下,终端设备触发模型上移机制,所述模型上移机制用于将所述终端设备的第一模型上传到服务器,所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境;所述终端设备发送所述第一消息,所述第一消息包括所述第一模型的模型文件和所述待处理任务的信息。The method includes: when it is determined that the computing power of the task to be processed is unloaded, the terminal device triggers a model moving mechanism, and the model moving mechanism is used to upload the first model of the terminal device to the server, the first model The model is a model related to the task to be processed, and the first model can run in the operating environment of the terminal device; the terminal device sends the first message, and the first message includes the first model the model file and the information about the pending task.
本申请中,在触发算力卸载机制的情况下,终端设备也可以同时触发(或驱动)模型上移机制,将终端设备侧的模型文件上传到服务器。即,终端设备在算力卸载时将终端设备侧的模型文件传输到服务器。终端设备通过将模型文件上传至服务器,使得服务器将终端设备上传的模型进行转换或适配,转换后的模型能够运行于服务器侧,即适配于服务器的运行环境。这样,终端设备的待处理任务移至处理器侧处理,有助于节省终端设备的功耗。In this application, when the computing power offloading mechanism is triggered, the terminal device can also trigger (or drive) the model up-moving mechanism at the same time, and upload the model file on the terminal device side to the server. That is, the terminal device transmits the model file on the terminal device side to the server when the computing power is unloaded. The terminal device uploads the model file to the server, so that the server converts or adapts the model uploaded by the terminal device, and the converted model can run on the server side, that is, adapt to the running environment of the server. In this way, the tasks to be processed by the terminal device are moved to the processor side for processing, which helps to save the power consumption of the terminal device.
面向不同类型的终端设备,服务器均可以利用模型适配技术,将终端设备侧的模型转换成能够运行于服务器侧的模型。这样,应用开发商无需根据服务器的硬件资源开发适配于服务侧的模型,也无需根据模型类型在服务器侧部署不同类型的虚拟化容器,减少了开发成本,同时降低了服务器侧的管理复杂度。For different types of terminal devices, the server can use the model adaptation technology to convert the model on the terminal device side into a model that can run on the server side. In this way, application developers do not need to develop models adapted to the server side according to the hardware resources of the server, nor do they need to deploy different types of virtualized containers on the server side according to the model type, which reduces development costs and reduces the management complexity of the server side. .
第一模型是与终端设备的待处理任务相关的模型,可以理解为:第一模型为用于处理终端设备的待处理任务的训练模型。比如,待处理任务是终端设备的某个图像任务,那么第一模型为处理该图像任务(比如图像数据)的训练模型。The first model is a model related to a task to be processed by the terminal device, which can be understood as: the first model is a training model for processing the task to be processed by the terminal device. For example, if the task to be processed is an image task of the terminal device, the first model is a training model for processing the image task (eg, image data).
可选地,终端设备可以通过网络设备(比如接入网设备或核心网设备)向服务器发送所述第一消息。Optionally, the terminal device may send the first message to the server through a network device (such as an access network device or a core network device).
在一种可能的实现方式中,第一消息可以为推理请求消息。In a possible implementation manner, the first message may be an inference request message.
可选地,所述方法还包括:所述终端设备接收针对所述待处理任务的处理结果,所述处理结果是第一虚拟化容器对第二模型和所述待处理任务进行处理得到的,所述第二模型能够运行于所述服务器的运行环境。这样,待处理任务的处理过程是在服务器侧完成的,从而节省了终端设备侧的功耗。Optionally, the method further includes: receiving, by the terminal device, a processing result for the to-be-processed task, where the processing result is obtained by processing the second model and the to-be-processed task by the first virtualization container, The second model is capable of running in the operating environment of the server. In this way, the processing of the to-be-processed task is completed on the server side, thereby saving power consumption on the terminal device side.
可以理解,本申请对终端设备接收处理结果的具体方式不作限定。终端设备可以通过网络设备获取处理结果。It can be understood that the present application does not limit the specific manner in which the terminal device receives the processing result. The terminal device can obtain the processing result through the network device.
第三方面,提供一种管理模型的装置,所述装置用于执行上述第一方面提供的方法。具体地,所述装置可以包括用于执行第一方面提供的方法的单元。A third aspect provides an apparatus for managing models, where the apparatus is configured to execute the method provided in the first aspect. Specifically, the apparatus may include a unit for performing the method provided by the first aspect.
第四方面,提供一种管理模型的装置,所述装置用于执行上述第二方面提供的方法。具体地,所述装置可以包括用于执行第二方面提供的方法的单元。In a fourth aspect, an apparatus for managing models is provided, where the apparatus is configured to execute the method provided in the second aspect. Specifically, the apparatus may include a unit for performing the method provided by the second aspect.
第五方面,提供了一种管理模型的装置,包括处理器。该处理器与存储器耦合,可用于执行存储器中的指令,以实现上述第一方面中任一种可能实现方式中的方法。可选地,该管理模型的装置还包括存储器。可选地,该管理模型的装置还包括通信接口,处理器与通信接口耦合。In a fifth aspect, an apparatus for managing a model is provided, including a processor. The processor is coupled to the memory and can be used to execute instructions in the memory to implement the method in any one of the possible implementations of the first aspect above. Optionally, the apparatus for managing the model further includes a memory. Optionally, the apparatus for managing the model further includes a communication interface, and the processor is coupled to the communication interface.
在一种实现方式中,该装置为服务器。当该装置为服务器时,所述通信接口可以是收发器,或,输入/输出接口。In one implementation, the device is a server. When the apparatus is a server, the communication interface may be a transceiver, or an input/output interface.
在另一种实现方式中,该装置为配置于服务器中的芯片。当该装置为配置于服务器中的芯片时,所述通信接口可以是输入/输出接口。In another implementation manner, the device is a chip configured in a server. When the device is a chip configured in a server, the communication interface may be an input/output interface.
可选地,所述收发器可以为收发电路。可选地,所述输入/输出接口可以为输入/输出电路。Optionally, the transceiver may be a transceiver circuit. Optionally, the input/output interface may be an input/output circuit.
第六方面,提供了一种管理模型的装置,包括处理器。该处理器与存储器耦合,可用于执行存储器中的指令,以实现上述第二方面中任一种可能实现方式中的方法。可选地,该装置还包括存储器。可选地,该装置还包括通信接口,处理器与通信接口耦合。In a sixth aspect, an apparatus for managing a model is provided, including a processor. The processor is coupled to the memory and can be used to execute instructions in the memory to implement the method in any of the possible implementations of the second aspect above. Optionally, the apparatus further includes a memory. Optionally, the apparatus further includes a communication interface to which the processor is coupled.
在一种实现方式中,该装置为终端设备。当该装置为终端设备时,所述通信接口可以是收发器,或,输入/输出接口。In an implementation manner, the apparatus is a terminal device. When the apparatus is a terminal device, the communication interface may be a transceiver, or an input/output interface.
在另一种实现方式中,该装置为配置于终端设备中的芯片。当该装置为配置于终端设备中的芯片时,所述通信接口可以是输入/输出接口。In another implementation manner, the apparatus is a chip configured in a terminal device. When the device is a chip configured in a terminal device, the communication interface may be an input/output interface.
可选地,所述收发器可以为收发电路。可选地,所述输入/输出接口可以为输入/输出电路。Optionally, the transceiver may be a transceiver circuit. Optionally, the input/output interface may be an input/output circuit.
第七方面,提供了一种处理器,包括:输入电路、输出电路和处理电路。所述处理电路用于通过所述输入电路接收信号,并通过所述输出电路发射信号,使得所述处理器执行上述第一方面和第二方面中任一种可能实现方式中的方法。In a seventh aspect, a processor is provided, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any one of the possible implementations of the first aspect and the second aspect.
在具体实现过程中,上述处理器可以为芯片,输入电路可以为输入管脚,输出电路可以为输出管脚,处理电路可以为晶体管、门电路、触发器和各种逻辑电路等。输入电路所接收的输入的信号可以是由例如但不限于接收器接收并输入的,输出电路所输出的信号可以是例如但不限于输出给发射器并由发射器发射的,且输入电路和输出电路可以是同一电路,该电路在不同的时刻分别用作输入电路和输出电路。本申请实施例对处理器及各种电路的具体实现方式不做限定。In a specific implementation process, the above-mentioned processor may be a chip, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a flip-flop, and various logic circuits. The input signal received by the input circuit may be received and input by, for example, but not limited to, a receiver, the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter, and the input circuit and output The circuit can be the same circuit that acts as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation manners of the processor and various circuits.
第八方面,提供了一种装置,包括处理器和存储器。该处理器用于读取存储器中存储的指令,并可通过接收器接收信号,通过发射器发射信号,以执行第一方面和第二方面中任一种可能实现方式中的方法。In an eighth aspect, an apparatus is provided, including a processor and a memory. The processor is used for reading the instructions stored in the memory, and can receive signals through the receiver and transmit signals through the transmitter, so as to execute the method in any possible implementation manner of the first aspect and the second aspect.
可选地,所述处理器为一个或多个,所述存储器为一个或多个。Optionally, there are one or more processors and one or more memories.
可选地,所述存储器可以与所述处理器集成在一起,或者所述存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型以及存储器与处理器的设置方式不做限定。In the specific implementation process, the memory can be a non-transitory memory, such as a read only memory (ROM), which can be integrated with the processor on the same chip, or can be separately set in different On the chip, the embodiment of the present application does not limit the type of the memory and the setting manner of the memory and the processor.
应理解,相关的数据交互过程例如发送信息可以为从处理器输出信息的过程,接收信息可以为处理器接收信息的过程。具体地,处理输出的数据可以输出给发射器,处理器接收的输入数据可以来自接收器。其中,发射器和接收器可以统称为收发器。It should be understood that the relevant data interaction process, for example, sending information may be a process of outputting information from the processor, and receiving information may be a process of receiving information by the processor. Specifically, the data output by the processing can be output to the transmitter, and the input data received by the processor can be from the receiver. Among them, the transmitter and the receiver may be collectively referred to as a transceiver.
上述第八方面中的装置可以是芯片,该处理器可以通过硬件来实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。The device in the above-mentioned eighth aspect may be a chip, and the processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software , the processor may be a general-purpose processor, and is implemented by reading software codes stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.
第九方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被管理模型的装置执行时,使得所述装置实现第一方面的任一可能的实现方式中的方法。In a ninth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by an apparatus for managing a model, the apparatus enables the apparatus to implement the method in any possible implementation manner of the first aspect .
第十方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被管理模型的装置执行时,使得所述装置实现第二方面的任一可能的实现方式中的方法。A tenth aspect provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by an apparatus for managing a model, the apparatus enables the apparatus to implement the method in any possible implementation manner of the second aspect .
第十一方面,提供一种包含指令的计算机程序产品,所述指令被计算机执行时使得管理模型的装置实现第一方面提供的方法。In an eleventh aspect, there is provided a computer program product comprising instructions that, when executed by a computer, cause an apparatus for managing models to implement the method provided in the first aspect.
第十二方面,提供一种包含指令的计算机程序产品,所述指令被计算机执行时使得管理模型的装置实现第二方面提供的方法。A twelfth aspect provides a computer program product comprising instructions that, when executed by a computer, cause an apparatus for managing models to implement the method provided by the second aspect.
第十三方面,提供了一种通信系统,包括前述的服务器和终端设备。可选地,通信系统还包括接入网设备和/或核心网设备。In a thirteenth aspect, a communication system is provided, including the aforementioned server and terminal device. Optionally, the communication system further includes access network equipment and/or core network equipment.
附图说明Description of drawings
图1是本申请的实施例应用的移动通信系统的架构示意图;FIG. 1 is a schematic structural diagram of a mobile communication system to which an embodiment of the present application is applied;
图2是基于移动边缘计算的架构示例图;Figure 2 is an example diagram of an architecture based on mobile edge computing;
图3是基于云计算的架构示例图;Figure 3 is an example diagram of an architecture based on cloud computing;
图4是根据本申请实施例的管理模型的方法的示意图;4 is a schematic diagram of a method for managing a model according to an embodiment of the present application;
图5是本申请实施例提供的管理模型的装置的示意性框图;5 is a schematic block diagram of an apparatus for managing a model provided by an embodiment of the present application;
图6是本申请实施例提供的管理模型的另一装置的示意性结构图;6 is a schematic structural diagram of another apparatus for managing a model provided by an embodiment of the present application;
图7是本申请实施例提供的终端设备的结构示意图。FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
本申请实施例的技术方案可以应用于各种通信系统,例如长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)、通用移动通信系统(universal mobile telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、未来的第五代(5th generation,5G)系统或新无线(new radio,NR)、设备对设备(device-to-device,D2D)通信系统、机器通信系统、车联网通信系统、物联网系统、非地面通信网络(non-terrestrial network,NTN)卫星通信系统或者未来的通信系统等,本申请实施例并不限定。The technical solutions of the embodiments of the present application can be applied to various communication systems, such as long term evolution (long term evolution, LTE) system, LTE frequency division duplex (frequency division duplex, FDD) system, LTE time division duplex (time division duplex, TDD), universal mobile telecommunication system (UMTS), worldwide interoperability for microwave access (WiMAX) communication system, future 5th generation (5G) system or new wireless (new radio, NR), device-to-device (D2D) communication systems, machine communication systems, vehicle networking communication systems, IoT systems, non-terrestrial network (NTN) satellite communication systems or future The communication system and the like are not limited in the embodiments of the present application.
图1是本申请的实施例应用的移动通信系统的架构示意图。如图1所示,该移动通信系统包括核心网设备110、接入网设备120和至少一个终端设备(如图1中的终端设备130和终端设备140)。终端设备通过无线的方式与接入网设备相连,接入网设备通过无线或有线方式与核心网设备连接。核心网设备与接入网设备可以是独立的不同的物理设备,也可以是将核心网设备的功能与接入网设备的逻辑功能集成在同一个物理设备上,还可以是一个物理设备上集成了部分核心网设备的功能和部分的接入网设备的功能。终端设备可以是固定位置的,也可以是可移动的。图1只是示意图,该通信系统中还可以包括其它网络设备,如还可以包括无线中继设备和无线回传设备,在图1中未画出。本申请的实施例对该移动通信系统中包括的核心网设备、接入网设备和终端设备的数量不做限定。FIG. 1 is a schematic structural diagram of a mobile communication system to which an embodiment of the present application is applied. As shown in FIG. 1 , the mobile communication system includes a core network device 110 , an access network device 120 and at least one terminal device (such as the terminal device 130 and the terminal device 140 in FIG. 1 ). The terminal equipment is wirelessly connected to the access network equipment, and the access network equipment is wirelessly or wiredly connected to the core network equipment. The core network device and the access network device can be independent and different physical devices, or the functions of the core network device and the logical function of the access network device can be integrated on the same physical device, or they can be integrated on one physical device. The functions of part of the core network equipment and part of the access network equipment are described. Terminal equipment can be fixed or movable. FIG. 1 is just a schematic diagram, and the communication system may also include other network devices, such as wireless relay devices and wireless backhaul devices, which are not shown in FIG. 1 . The embodiments of the present application do not limit the number of core network devices, access network devices, and terminal devices included in the mobile communication system.
本申请中的终端设备可以与接入网设备进行通信。应理解,终端设备也可以称为用户设备(user equipment,UE)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。本申请的实施例中的终端设备可以是手机(mobile phone)、卫星电话、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、平板电脑(pad)、带无线收发功能的电脑、无线本地环路(wireless local loop,WLL)站、个人数字处理(personal digital assistant,PDA)、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等等。本申请的实施例对应用场景不做限定。终端设备还可以指具备通信功能的芯片等,本申请实施例对此并不限定。为了便于描述,以终端设备为例详细介绍本申请的技术方案。The terminal device in this application can communicate with the access network device. It should be understood that terminal equipment may also be referred to as user equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device. The terminal device in the embodiment of the present application may be a mobile phone, a satellite phone, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a tablet computer (pad), or a computer with a wireless transceiver function. , wireless local loop (wireless local loop, WLL) station, personal digital assistant (PDA), virtual reality (virtual reality, VR) terminal equipment, augmented reality (augmented reality, AR) terminal equipment, industrial control ( Wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety Wireless terminal, wireless terminal in smart city (smart city), wireless terminal in smart home (smart home), terminal equipment in 5G network or future evolution of public land mobile network (PLMN) terminal equipment, etc. The embodiments of the present application do not limit application scenarios. The terminal device may also refer to a chip with a communication function, etc., which is not limited in this embodiment of the present application. For the convenience of description, the technical solutions of the present application are described in detail by taking a terminal device as an example.
本申请中的接入网设备可以是无线接入网(radio access network,RAN)设备。RAN设备包括但不限于:演进型节点B(evolved nodeB,eNB或eNodeB)、无线网络控制器(radio network controller,RNC)、节点B(node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved node B,或home node B,HNB)、基带单元(base band unit,BBU),无线保真(wireless fidelity,WIFI)系统中的接入点(access point,AP)、无线中继节点、无线回传节点、传输点(transmission point,TP)或者发送接收点(transmission and reception point,TRP)等,还可以为5G,如,NR,系统中的gNB,或,传输点(TRP或TP),未来移动通信系统 中的基站或无线保真(wireless fidelity,Wi-Fi)系统中的接入节点,5G系统中的基站的一个或一组(包括多个天线面板)天线面板,或者,还可以为构成gNB或传输点的网络节点,如基带单元(baseband unit,BBU),或,分布式单元(distributed unit,DU)等。本申请的实施例对无线接入网设备所采用的具体技术和具体设备形态不做限定。在一些部署中,gNB可以包括集中式单元(centralized unit,CU)和DU。gNB还可以包括有源天线单元(active antenna unit,AAU)。CU实现gNB的部分功能,DU实现gNB的部分功能。比如,CU负责处理非实时协议和服务,实现无线资源控制(radio resource control,RRC),分组数据汇聚层协议(packet data convergence protocol,PDCP)层的功能。DU负责处理物理层协议和实时服务,实现无线链路控制(radio link control,RLC)层、媒体接入控制(media access control,MAC)层和物理(physical,PHY)层的功能。AAU实现部分物理层处理功能、射频处理及有源天线的相关功能。由于RRC层的信息最终会变成PHY层的信息,或者,由PHY层的信息转变而来,因而,在这种架构下,高层信令,如RRC层信令,也可以认为是由DU发送的,或者,由DU+AAU发送的。可以理解的是,网络设备可以为包括CU节点、DU节点、AAU节点中一项或多项的设备。此外,可以将CU划分为接入网中的网络设备,也可以将CU划分为核心网(core network,CN)中的网络设备,本申请对此不做限定。或者,接入网设备还可以指具备通信功能的芯片等,或者,还可以为卫星以及设备到设备(Device-to-Device,D2D)、车辆外联(vehicle-to-everything,V2X)、机器到机器(machine-to-machine,M2M)通信中承担基站功能的设备等等。The access network device in this application may be a radio access network (radio access network, RAN) device. RAN equipment includes but is not limited to: evolved node B (evolved nodeB, eNB or eNodeB), radio network controller (radio network controller, RNC), node B (node B, NB), base station controller (base station controller, BSC) ), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved node B, or home node B, HNB), base band unit (base band unit, BBU), wireless fidelity (wireless fidelity, WIFI) The access point (AP), wireless relay node, wireless backhaul node, transmission point (TP) or transmission and reception point (TRP) in the system can also be 5G, For example, NR, gNB in system, or transmission point (TRP or TP), base station in future mobile communication system or access node in wireless fidelity (Wi-Fi) system, base station in 5G system One or a group of (including multiple antenna panels) antenna panels, or, it can also be a network node that constitutes a gNB or a transmission point, such as a baseband unit (baseband unit, BBU), or, distributed unit (distributed unit, DU) Wait. The embodiments of the present application do not limit the specific technology and specific device form adopted by the wireless access network device. In some deployments, a gNB may include a centralized unit (CU) and a DU. The gNB may also include an active antenna unit (AAU). The CU implements some functions of the gNB, and the DU implements some functions of the gNB. For example, the CU is responsible for processing non-real-time protocols and services, and implementing functions of radio resource control (RRC) and packet data convergence protocol (PDCP) layers. The DU is responsible for processing physical layer protocols and real-time services, and implementing the functions of the radio link control (RLC) layer, the media access control (MAC) layer and the physical (PHY) layer. AAU implements some physical layer processing functions, radio frequency processing and related functions of active antennas. Since the information of the RRC layer will eventually become the information of the PHY layer, or be transformed from the information of the PHY layer, therefore, in this architecture, the higher-layer signaling, such as the RRC layer signaling, can also be considered to be sent by the DU. , or, sent by DU+AAU. It can be understood that the network device may be a device including one or more of a CU node, a DU node, and an AAU node. In addition, the CU can be divided into network devices in the access network, and the CU can also be divided into network devices in a core network (core network, CN), which is not limited in this application. Alternatively, the access network device may also refer to a chip with communication functions, etc., or may also be a satellite, a device-to-device (D2D), a vehicle-to-everything (V2X), a machine A device that assumes a base station function in machine-to-machine (M2M) communication, and so on.
本申请实施例的方案可以适用于边缘计算场景或云计算场景。在边缘计算场景或云计算场景中,终端设备的数据处理与存储功能的部分或全部移至远端服务器(简称为服务器)。本申请中的服务器具备深度学习所需的计算资源,能够处理复杂的计算任务(比如,算力大、数据庞大等)。比如,服务器可以是移动边缘计算(mobile edge computing,MEC)或云端。举例来说,将深度学习所需的硬件资源部署在MEC设备,使得终端设备可以将功耗大、算力高的任务移至MEC侧,而终端设备的本地负责复杂度较低的任务(比如,结果渲染与显示),降低了终端设备的计算负荷。为了便于描述,后续将远端服务器简称为服务器。The solutions of the embodiments of the present application may be applicable to edge computing scenarios or cloud computing scenarios. In an edge computing scenario or a cloud computing scenario, part or all of the data processing and storage functions of the terminal device are moved to a remote server (referred to as a server for short). The server in this application has the computing resources required for deep learning, and can handle complex computing tasks (eg, large computing power, huge data, etc.). For example, the server can be mobile edge computing (MEC) or the cloud. For example, the hardware resources required for deep learning are deployed on the MEC device, so that the terminal device can move tasks with high power consumption and high computing power to the MEC side, while the terminal device is locally responsible for tasks with lower complexity (such as , result rendering and display), reducing the computing load of the terminal device. For convenience of description, the remote server will be referred to as a server for short in the following.
以下结合图2与图3介绍应用本申请实施例的系统架构。The following describes a system architecture to which the embodiments of the present application are applied with reference to FIG. 2 and FIG. 3 .
图2是基于移动边缘计算的架构示例图。如图2所示,该架构包括基站,MEC服务器和n个UE(UE1,UE2,…UEn),n为正整数。MEC服务器可以部署在核心网设备中。MEC服务器具备处理任务的资源,比如,图2中所示的通信资源、计算资源以及存储资源。UE的任务处理需要一定的通信资源,计算资源以及存储资源(比如,图2中示出了UE1中的任务1,UE2的任务2,…UEn的任务n所需的资源)。在移动边缘计算架构中,UE的任务处理过程可以卸载至MEC服务器侧。如图2所示,UE1中的任务1,UE2的任务2,…UEn的任务n的处理过程可以在MEC服务器侧实现。其中,UE与MEC服务器间的交互可以通过基站或核心网设备转发,对此不作具体限定。Figure 2 is an example diagram of an architecture based on mobile edge computing. As shown in Figure 2, the architecture includes a base station, an MEC server and n UEs (UE1, UE2, ... UEn), where n is a positive integer. The MEC server can be deployed in core network equipment. The MEC server has resources for processing tasks, such as communication resources, computing resources, and storage resources shown in FIG. 2 . The task processing of the UE requires certain communication resources, computing resources and storage resources (for example, FIG. 2 shows the resources required by task 1 in UE1, task 2 in UE2, ... task n in UEn). In the mobile edge computing architecture, the task processing process of the UE can be offloaded to the MEC server side. As shown in FIG. 2 , the processing process of task 1 in UE1, task 2 of UE2, ... task n of UEn can be implemented on the MEC server side. The interaction between the UE and the MEC server may be forwarded by the base station or the core network device, which is not specifically limited.
图3是基于云计算的架构示例图。如图3所示,该架构包括云服务器,服务器,中央处理器,不同类型的接入设备(比如,接入点AP,基站,卫星设备),以及不同类型的UE(比如,平板,手机,笔记本,电脑)。其中,云服务器通过网络与服务器相连。接入网设备与UE之间通过通信链路实现上下行通信。接入网设备与中央处理器之间也可以 进行通信。在云计算架构中,UE的数据处理与存储功能的部分或全部可以移至云服务器。Figure 3 is an example diagram of an architecture based on cloud computing. As shown in Figure 3, the architecture includes cloud server, server, central processing unit, different types of access devices (such as access point AP, base station, satellite device), and different types of UE (such as tablet, mobile phone, laptop). The cloud server is connected to the server through a network. The uplink and downlink communication is implemented between the access network device and the UE through a communication link. Communication between the access network equipment and the central processor is also possible. In the cloud computing architecture, part or all of the data processing and storage functions of the UE can be moved to the cloud server.
应理解,图1至图3中的通信系统只是示例性地描述,并不对本申请实施例的保护范围构成限定。本申请实施例的技术方案也可以用于其他通信系统。It should be understood that the communication systems in FIG. 1 to FIG. 3 are only exemplary descriptions, and do not limit the protection scope of the embodiments of the present application. The technical solutions of the embodiments of the present application can also be applied to other communication systems.
还应理解,本申请对图1至图3的通信系统包括的设备或网元不作限定。比如,通信系统也可以包括其他设备,对此不作限定。另外,本申请对图1至图3中包括的设备或网元的数目也不作具体限定。It should also be understood that the present application does not limit the devices or network elements included in the communication systems of FIGS. 1 to 3 . For example, the communication system may also include other devices, which are not limited. In addition, the present application does not specifically limit the number of devices or network elements included in FIG. 1 to FIG. 3 .
在本申请实施例中,终端设备或服务器包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。并且,本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构特别限定,只要能够通过运行记录有本申请实施例的提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可,例如,本申请实施例提供的方法的执行主体可以是终端设备或服务器,或者,是终端设备或服务器中能够调用程序并执行程序的功能模块。In this embodiment of the present application, the terminal device or server includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. This hardware layer includes hardware such as central processing unit (CPU), memory management unit (MMU), and memory (also called main memory). The operating system may be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software. In addition, the embodiments of the present application do not specifically limit the specific structure of the execution body of the methods provided by the embodiments of the present application, as long as the program that records the codes of the methods provided by the embodiments of the present application can be executed to provide the methods provided by the embodiments of the present application. For example, the execution subject of the method provided by the embodiment of the present application may be a terminal device or a server, or a functional module in the terminal device or server that can call and execute a program.
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。Additionally, various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques. The term "article of manufacture" as used in this application encompasses a computer program accessible from any computer readable device, carrier or medium. For example, computer readable media may include, but are not limited to: magnetic storage devices (eg, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (eg, compact discs (CDs), digital versatile discs (DVDs) etc.), smart cards and flash memory devices (eg, erasable programmable read-only memory (EPROM), card, stick or key drives, etc.). Additionally, various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and/or carrying instructions and/or data.
下面将结合图4描述本申请实施例的管理模型的方法。The following describes a method for managing a model according to an embodiment of the present application with reference to FIG. 4 .
图4是根据本申请实施例的管理模型的方法300的示意图。示例性地,方法300中的服务器可以为图2中的MEC服务器,或图3中的云服务器,对此不作限定。FIG. 4 is a schematic diagram of a method 300 for managing a model according to an embodiment of the present application. Exemplarily, the server in method 300 may be the MEC server in FIG. 2 or the cloud server in FIG. 3 , which is not limited.
如图4所示,所述方法300包括:As shown in FIG. 4, the method 300 includes:
S310,在确定对待处理任务进行算力卸载的情况下,终端设备触发模型上移机制,所述模型上移机制用于将所述终端设备的第一模型上传到服务器,所述第一模型是与所述待处理任务(比如,应用数据)相关的模型。S310, in the case of determining that the computing power of the task to be processed is unloaded, the terminal device triggers a model moving mechanism, and the model moving mechanism is used to upload the first model of the terminal device to the server, where the first model is A model related to the task to be processed (eg, application data).
其中,待处理任务指终端设备的某一应用的推理任务。比如,终端设备的应用的图像任务。第一模型是与终端设备的待处理任务相关的模型,可以理解为:第一模型为用于处理终端设备的待处理任务的训练模型或机器学习模型。比如,待处理任务是终端设备的某个图像任务,那么第一模型为处理该图像任务(比如图像数据)的训练模型。本申请中的第一模型是机器学习模型(也可以称作目标模型),且能够运行于终端设备的环境中。比如,在终端设备中,将应用数据输入目标模型,可得到应用数据的处理结果,运算结果,或推理结果。本申请对第一模型不作具体限定,比如,第一模型可以是神经网络模型、支持向量机模型等数学模型。The task to be processed refers to a reasoning task of a certain application of the terminal device. For example, the image task of the application of the terminal device. The first model is a model related to the task to be processed by the terminal device, which can be understood as: the first model is a training model or a machine learning model for processing the task to be processed by the terminal device. For example, if the task to be processed is an image task of the terminal device, the first model is a training model for processing the image task (eg, image data). The first model in this application is a machine learning model (also referred to as a target model), and can run in the environment of a terminal device. For example, in the terminal device, the application data is input into the target model, and the processing result, operation result, or inference result of the application data can be obtained. This application does not specifically limit the first model, for example, the first model may be a mathematical model such as a neural network model, a support vector machine model, or the like.
算力(HashRate)卸载,也可以称作算力上移,是指将终端设备的待处理任务的部分或全部运算功能或存储功能卸载或上移到服务器侧处理。“确定进行算力卸载”可以理解为触发算力卸载机制。本申请中,在触发算力卸载机制的情况下,终端设备也可以同时触发(或驱动)模型上移机制,将终端设备侧的模型文件上传到服务器。即,终端设备在算力卸载时将终端设备侧的模型文件传输到服务器。HashRate offloading, which can also be referred to as computing power upward, refers to offloading or moving up part or all of the computing functions or storage functions of the tasks to be processed on the terminal device to the server side for processing. "Determining to unload computing power" can be understood as triggering the unloading mechanism of computing power. In this application, when the computing power offloading mechanism is triggered, the terminal device can also trigger (or drive) the model up-moving mechanism at the same time, and upload the model file on the terminal device side to the server. That is, the terminal device transmits the model file on the terminal device side to the server when the computing power is unloaded.
可以理解,本申请对算力卸载机制的触发方式不作具体限定,可以是由用户触发的,也可以是终端设备触发的。It can be understood that this application does not specifically limit the triggering method of the computing power offloading mechanism, which may be triggered by a user or by a terminal device.
模型上移机制用于将终端设备的第一模型上传到服务器,具体包括:将终端设备的第一模型的模型文件(比如,模型结构和模型参数等内容)上传到服务器。其中,模型参数是指与模型有关的参数,比如,权值,偏置等参数。The model moving mechanism is used to upload the first model of the terminal device to the server, which specifically includes: uploading the model file (eg, model structure and model parameters, etc.) of the first model of the terminal device to the server. Among them, the model parameters refer to parameters related to the model, such as weights, biases and other parameters.
本申请对触发模型上移机制的方式不作具体限定。举例来说,终端设备在判断应用(application,APP)对算力要求较高或有较高的计算需求时,可以自动触发模型上移机制,将本地模型文件与应用数据上传给服务器,以便由服务器处理运算任务,以节省终端的运算开销。The present application does not specifically limit the manner of triggering the model move-up mechanism. For example, when the terminal device determines that the application (APP) has high computing power requirements or high computing requirements, it can automatically trigger the model moving mechanism, and upload the local model file and application data to the server, so that the The server processes computing tasks to save the computing overhead of the terminal.
S320,终端设备发送第一消息,所述第一消息包括终端设备的第一模型的模型文件和待处理任务的信息。对应的,服务器获取终端设备的第一模型的模型文件和所述待处理任务的信息。S320: The terminal device sends a first message, where the first message includes a model file of the first model of the terminal device and information of a task to be processed. Correspondingly, the server obtains the model file of the first model of the terminal device and the information of the task to be processed.
终端设备发送第一消息的目的在于,将终端设备的本地模型文件(比如第一模型的模型文件)以及待处理任务的信息上传或传输到服务器侧,以便服务器侧处理该应用数据。The purpose of the terminal device sending the first message is to upload or transmit the local model file of the terminal device (such as the model file of the first model) and the information of the task to be processed to the server side, so that the server side can process the application data.
可选地,待处理任务的信息包括应用数据。可以理解,待处理任务的信息除了包括应用数据以外,还可以包括其他与待处理任务有关的信息,对此不作具体限定。Optionally, the information of the task to be processed includes application data. It can be understood that, in addition to the application data, the information of the to-be-processed task may also include other information related to the to-be-processed task, which is not specifically limited.
本申请对第一消息的形式或名称不作限定。第一消息可以沿用现有消息形式,也可以是新定义的消息。可选地,第一消息可以是终端设备发送的推理请求消息。This application does not limit the form or name of the first message. The first message may be in the form of an existing message, or may be a newly defined message. Optionally, the first message may be an inference request message sent by the terminal device.
可选地,终端设备可以通过网络设备向服务器发送第一消息。比如,网络设备是接入网设备或核心网设备。比如,终端设备向接入网设备发送第一消息,第一消息包括第一模型的模型文件以及终端设备的应用数据;接入网设备将第一模型的模型文件以及终端设备的应用数据发送给核心网设备;核心网设备收到第一模型的模型文件以及应用数据后,将第一模型的模型文件以及终端设备的应用数据发送给服务器。又比如,终端设备向接入网设备发送第一消息,第一消息包括第一模型的模型文件以及终端设备的应用数据;接入网设备将第一模型的模型文件以及终端设备的应用数据发送给服务器。Optionally, the terminal device may send the first message to the server through the network device. For example, the network device is an access network device or a core network device. For example, the terminal device sends a first message to the access network device, where the first message includes the model file of the first model and the application data of the terminal device; the access network device sends the model file of the first model and the application data of the terminal device to Core network device; after receiving the model file of the first model and the application data, the core network device sends the model file of the first model and the application data of the terminal device to the server. For another example, the terminal device sends a first message to the access network device, where the first message includes the model file of the first model and the application data of the terminal device; the access network device sends the model file of the first model and the application data of the terminal device to the server.
相应的,本申请对服务器如何得到终端设备上传的模型文件以及待处理任务的信息不作具体限定。服务器可以是从接入网设备处获取终端设备的第一模型和终端设备的待处理任务的信息,也可以是从核心网设备处获取终端设备的第一模型和终端设备的待处理任务的信息。Correspondingly, this application does not specifically limit how the server obtains the model file uploaded by the terminal device and the information of the task to be processed. The server may obtain the information of the first model of the terminal device and the pending tasks of the terminal device from the access network device, or obtain the information of the first model of the terminal device and the pending tasks of the terminal device from the core network device .
本申请对服务器与网络设备(接入网设备或核心网设备)之间交互的消息(该消息包括终端设备上传的模型文件以及待处理任务的信息)的形式或名称不作限定,可以沿用现有消息形式,也可以是新定义的消息。比如,接入网设备或核心网设备可将第一消息透传给服务器。又比如,接入网设备或核心网设备可以对第一消息进行处理,得到第二消息(该第二消息包括终端设备上传的模型文件以及待处理任务的信息),然后将第二消息发送给 服务器。This application does not limit the form or name of the message (the message includes the model file uploaded by the terminal device and the information of the task to be processed) exchanged between the server and the network device (access network device or core network device), and the existing The message form can also be a newly defined message. For example, the access network device or the core network device may transparently transmit the first message to the server. For another example, the access network device or the core network device can process the first message to obtain the second message (the second message includes the model file uploaded by the terminal device and the information of the task to be processed), and then send the second message to server.
服务器在得到终端设备上传的第一模型的模型文件后,可对终端设备的第一模型进行转换处理,以使得转换后的模型能够适配于服务器的运行环境。After obtaining the model file of the first model uploaded by the terminal device, the server may perform conversion processing on the first model of the terminal device, so that the converted model can be adapted to the operating environment of the server.
S330,服务器将第一模型转换成第二模型,所述第二模型能够运行于所述服务器的运行环境。S330, the server converts the first model into a second model, where the second model can run in the running environment of the server.
其中,第一模型与第二模型对物理环境的要求不同。第一模型能够运行于终端设备的运行环境。第二模型能够运行于服务器的运行环境。Wherein, the first model and the second model have different requirements on the physical environment. The first model can run in the running environment of the terminal device. The second model can run on the server's runtime environment.
服务器在获得终端设备上传的第一模型的模型文件后,根据第一模型的模型文件,并结合自身的运行环境,利用模型转换技术(或模型适配技术),将终端设备上传的第一模型转换或适配成第二模型,使得第二模型能够适配于服务器的运行环境。其中,模型转换技术是指:本领域技术人员为了使得终端设备上传的模型转换为适配于服务器运行环境的模型,所采取的技术手段,具体方法不作限定。After obtaining the model file of the first model uploaded by the terminal device, the server uses the model conversion technology (or model adaptation technology) to convert the first model uploaded by the terminal device according to the model file of the first model and in combination with its own operating environment. Converting or adapting to the second model enables the second model to be adapted to the operating environment of the server. The model conversion technology refers to the technical means adopted by those skilled in the art in order to convert the model uploaded by the terminal device into a model suitable for the operating environment of the server, and the specific method is not limited.
举例来说,假设终端设备上传的第一模型是TensorFlow model,其中,终端设备的运行环境是TensorFlow环境,而服务器的运行环境是Caffe环境,那么服务器利用模型转换技术将TensorFlow model转换成Caffe model,即第二模型是Caffe model,Caffe model适配于服务器的Caffe环境。For example, assuming that the first model uploaded by the terminal device is the TensorFlow model, the operating environment of the terminal device is the TensorFlow environment, and the operating environment of the server is the Caffe environment, then the server uses the model conversion technology to convert the TensorFlow model to the Caffe model, That is, the second model is the Caffe model, and the Caffe model is adapted to the Caffe environment of the server.
可以理解,这里以终端设备的第一模型为例进行说明,但并不限于此。事实上,对于不同类型的终端设备的模型(比如,TensorFlow model,Caffe model,Davinci model等类型),服务器也可以将模型转换或适配成能够运行于服务器的运行环境的模型。也就是说,服务器可以基于自己的平台运行环境,对不同类型的终端设备的模型进行转换,转换后的模型可以在服务器的环境下运行。服务器侧可获取终端设备的模型,不需要在服务器侧部署额外的模型。服务器侧也无需建立额外的模型仓库来存储模型。It can be understood that the first model of the terminal device is used as an example for description here, but it is not limited to this. In fact, for models of different types of terminal devices (for example, TensorFlow model, Caffe model, Davinci model, etc.), the server can also convert or adapt the model to a model that can run in the server's operating environment. That is to say, the server can convert models of different types of terminal devices based on its own platform operating environment, and the converted models can run in the environment of the server. The server side can obtain the model of the terminal device, and there is no need to deploy additional models on the server side. There is also no need to build an additional model repository on the server side to store models.
在本申请中,服务器侧部署了统一的虚拟化环境,即不同的终端设备上传的模型经过适配后,都可以在该统一的虚拟化环境下运行。也就是说,对于不同类型的终端设备的模型,服务器可以在统一的虚拟化环境下处理终端设备侧的请求,降低了服务器侧的管理复杂度。以服务器中部署了TensorFlow model相应的运行环境(比如,运行TensorFlow model模型必要的依赖库,支持的算子等文件)为例,服务器可以将多个终端设备上传的不同类型的目标模型(比如,Caffe model,Davinci model等类型)统一转换成TensorFlow model模型,使得不同类型的目标模型均可在服务器侧运行。换个角度表述,如果服务器侧部署的虚拟环境包括TensorFlow框架(也可以简称TF环境),那么服务器在得到不同类型的终端设备的模型文件后,只需要将终端设备的模型转换为匹配TensorFlow框架的模型,而无需为各个模型定制环境。由于服务器可以在统一的虚拟化环境下处理不同的模型类型,服务器也就不需要按照不同的模型类型来加载或部署对应的虚拟化环境。应用开发商也不需要根据目标模型的类型,在服务器部署或定制不同类型的虚拟环境,从而降低了开发成本。In this application, a unified virtualized environment is deployed on the server side, that is, models uploaded by different terminal devices can run in the unified virtualized environment after being adapted. That is, for models of different types of terminal devices, the server can process requests from the terminal device side in a unified virtualization environment, which reduces the management complexity on the server side. Taking the corresponding running environment of TensorFlow model deployed in the server (for example, the necessary dependent libraries for running the TensorFlow model model, supported operators and other files) as an example, the server can upload different types of target models uploaded by multiple terminal devices (for example, Caffe model, Davinci model, etc.) are uniformly converted into TensorFlow model models, so that different types of target models can be run on the server side. To put it another way, if the virtual environment deployed on the server side includes the TensorFlow framework (also referred to as the TF environment), then after the server obtains the model files of different types of terminal devices, it only needs to convert the model of the terminal device to a model that matches the TensorFlow framework. , without having to customize the environment for each model. Since the server can process different model types in a unified virtualization environment, the server does not need to load or deploy corresponding virtualized environments according to different model types. Application developers also do not need to deploy or customize different types of virtual environments on the server according to the type of target model, thereby reducing development costs.
本申请中的虚拟化环境可以包括容器(docker)、虚拟机等虚拟化技术,对此不作具体限定。The virtualization environment in this application may include virtualization technologies such as containers (docker) and virtual machines, which are not specifically limited.
对于终端设备上传的应用数据,服务器将终端设备上传的应用数据缓存到本地,并通知容器管家调度工作容器。For the application data uploaded by the terminal device, the server caches the application data uploaded by the terminal device locally, and notifies the container manager to schedule the work container.
S340,服务器调度第一虚拟化容器,并将所述第二模型和所述终端设备的待处理任务加载到所述第一虚拟化容器中。S340: The server schedules a first virtualized container, and loads the second model and the to-be-processed task of the terminal device into the first virtualized container.
第一虚拟化容器指工作容器。服务器将第一模型转换为第二模型后,可以调度工作容器,以便工作容器处理终端设备的待处理任务。The first virtualized container refers to a working container. After the server converts the first model to the second model, the work container can be scheduled so that the work container can process tasks to be processed on the terminal device.
可选地,服务器调度第一虚拟化容器,包括:服务器查询空闲容器;在存在空闲容器的情况下,所述服务器将所述空闲容器作为所述第一虚拟化容器;或者,在不存在空闲容器的情况下,所述服务器通过实例化操作,得到所述第一虚拟化容器。空闲容器是指未被占用或使用的容器。Optionally, scheduling the first virtualized container by the server includes: the server inquires about an idle container; if there is an idle container, the server uses the idle container as the first virtualized container; or, if there is no idle container In the case of a container, the server obtains the first virtualized container through an instantiation operation. Free containers are containers that are not occupied or used.
也就是说,如果存在空闲容器或未被使用的容器,那么服务器可以直接使用该空闲容器。这样,服务器可以使用已有的空闲容器,不需要从镜像仓库中重新拉取镜像并实例化成容器,从而节省了镜像拉取和实例化的开销。如果不存在空闲容器,那么服务器需要从镜像仓库中重新拉取镜像并实例化成容器,得到第一虚拟化容器。That is, if there is an idle container or an unused container, the server can use the idle container directly. In this way, the server can use the existing idle containers, and there is no need to re-pull the image from the image repository and instantiate it into a container, thus saving the overhead of image pulling and instantiation. If there is no idle container, the server needs to re-pull the image from the image repository and instantiate it into a container to obtain the first virtualized container.
在本申请实施例中,终端设备可以将本地模型文件上传到服务器。服务器通过将终端设备上传的模型进行转换或适配,转换后的模型能够运行于服务器侧,即适配于服务器的运行环境。面向不同类型的终端设备,服务器均可以利用模型适配技术,将终端设备侧的模型转换成能够运行于服务器侧的模型。这样,应用开发商无需根据服务器的硬件资源开发适配于服务侧的模型,也无需根据模型类型在服务器侧部署不同类型的虚拟化容器,减少了开发成本,同时降低了服务器侧的管理复杂度。也可以换种表述,将终端设备侧简称为“端侧”、服务器侧称为“边侧”进行描述,本申请不需要边侧基于不同的模型类型来加载不同的镜像,而是通过端侧感知配合、模型上移,使边侧智能加载,不需要在边侧作额外的部署即可适配不同类型的模型。In this embodiment of the present application, the terminal device may upload the local model file to the server. The server converts or adapts the model uploaded by the terminal device, and the converted model can be run on the server side, that is, adapted to the running environment of the server. For different types of terminal devices, the server can use the model adaptation technology to convert the model on the terminal device side into a model that can run on the server side. In this way, application developers do not need to develop models adapted to the server side according to the hardware resources of the server, nor do they need to deploy different types of virtualized containers on the server side according to the model type, which reduces development costs and reduces the management complexity of the server side. . It can also be expressed in another way, and the terminal device side is referred to as "end side" for short, and the server side is called "side side" for description. Perceived coordination and model move up enables intelligent loading of the side, and can adapt to different types of models without additional deployment on the side.
响应于终端设备侧的第一消息(比如推理请求消息),服务器侧在处理完终端设备侧的任务后,可以将处理结果返回。In response to the first message (such as an inference request message) on the terminal device side, the server side may return the processing result after processing the task on the terminal device side.
可选地,所述方法300还包括:服务器返回针对所述待处理任务的处理结果,所述处理结果是所述第一虚拟化容器对所述第二模型和所述待处理任务进行处理得到的。对应的,所述终端设备接收所述处理结果。Optionally, the method 300 further includes: the server returning a processing result for the to-be-processed task, where the processing result is obtained by processing the second model and the to-be-processed task by the first virtualization container of. Correspondingly, the terminal device receives the processing result.
具体地,服务器启动第一虚拟化容器,使用第二模型对终端设备的待处理任务进行处理,以便响应端侧的推理请求。在第一虚拟化容器处理完成后,服务器将待处理任务的处理结果返回给终端设备,以便终端设备作进一步处理。这样,待处理任务的处理过程是在服务器侧完成的,从而节省了终端设备侧的功耗。Specifically, the server starts the first virtualized container, and uses the second model to process to-be-processed tasks of the terminal device, so as to respond to the inference request on the terminal side. After the processing of the first virtualized container is completed, the server returns the processing result of the to-be-processed task to the terminal device, so that the terminal device can perform further processing. In this way, the processing of the to-be-processed task is completed on the server side, thereby saving power consumption on the terminal device side.
可以理解,本申请对服务器返回处理结果的具体方式不作限定。服务器可以通过网络设备向终端设备返回处理结果。比如,服务器将处理结果发送给核心网设备,然后核心网设备将处理结果发送给接入网设备,最后由接入网设备发送给终端设备。It can be understood that the present application does not limit the specific manner in which the server returns the processing result. The server can return the processing result to the terminal device through the network device. For example, the server sends the processing result to the core network device, and then the core network device sends the processing result to the access network device, and finally the access network device sends the processing result to the terminal device.
本申请对服务器的内部实现或结构不作具体限定。可选地,服务器中可以包括数据处理模块、容器管家以及工作容器实例,然后通过数据处理模块,容器管家以及工作容器实例实现本申请中服务器侧的方法。This application does not specifically limit the internal implementation or structure of the server. Optionally, the server may include a data processing module, a container manager, and a working container instance, and then the server-side method in the present application is implemented through the data processing module, the container manager, and the working container instance.
以下结合数据处理模块、容器管家以及工作容器实例描述具体过程。The specific process is described below in conjunction with the data processing module, the container housekeeper, and the example of the work container.
举例来说,服务器中的数据处理模块可以将终端设备侧传输的应用数据,并将应用数据缓存至本地。服务器中的数据处理模块可以将终端设备上传的模型转换成适配于服务器 的容器环境的模型。另外,服务器中的数据处理模块通知容器管家调度容器。容器管家通过查询空闲容器,确定是否存在空闲容器。如果不存在空闲容器,则拉取镜像并实例化成容器,最后启动该容器作为工作容器。如果存在空闲容器,则将该空闲容器作为工作容器。服务器中的数据处理模块将应用数据以及转换后的模型加载到工作容器中。工作容器启动推理过程,响应终端设备侧的推理请求。工作容器处理完成后,将处理结果或推理结果返回至终端设备侧,以供终端设备侧作进一步处理。For example, the data processing module in the server can store the application data transmitted from the terminal device side and cache the application data locally. The data processing module in the server can convert the model uploaded by the terminal device into a model suitable for the container environment of the server. In addition, the data processing module in the server notifies the container steward to schedule the container. The container manager determines whether there is an idle container by querying the idle container. If there is no free container, pull the image and instantiate it into a container, and finally start the container as a working container. If there is a free container, use that free container as the work container. The data processing module in the server loads the application data and the transformed model into the worker container. The work container starts the inference process and responds to the inference request from the terminal device. After the work container is processed, the processing result or inference result is returned to the terminal device side for further processing by the terminal device side.
可以理解,这里只是以服务器包括数据处理模块、容器管家以及工作容器实例为例进行描述,并不对本申请实施例构成限定。It can be understood that, the server includes a data processing module, a container manager, and an instance of a work container as an example for description here, and does not constitute a limitation to the embodiments of the present application.
可以理解的是,本申请实施例中的一些可选的特征,在某些场景下,可以不依赖于其他特征,比如其当前所基于的方案,而独立实施,解决相应的技术问题,达到相应的效果,也可以在某些场景下,依据需求与其他特征进行结合。相应的,本申请实施例中给出的装置也可以相应的实现这些特征或功能,在此不予赘述。It can be understood that, in some scenarios, some optional features in the embodiments of the present application can be implemented independently of other features, such as the solution currently based on them, to solve corresponding technical problems and achieve corresponding The effect can also be combined with other features according to requirements in some scenarios. Correspondingly, the apparatuses provided in the embodiments of the present application may also implement these features or functions correspondingly, which will not be repeated here.
应理解,说明书通篇中提到的“实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各个实施例未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。It is to be understood that reference throughout the specification to an "embodiment" means that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Thus, various embodiments throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.
应理解,本申请实施例的各个方案可以进行合理的组合使用,并且实施例中出现的各个术语的解释或说明可以在各个实施例中互相参考或解释,对此不作限定。It should be understood that various solutions in the embodiments of the present application may be used in a reasonable combination, and the explanations or descriptions of various terms appearing in the embodiments may be referred to or explained in each embodiment, which is not limited.
还应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定。上述各个过程涉及的各种数字编号或序号仅为描述方便进行的区分,而不应对本申请实施例的实施过程构成任何限定。It should also be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and inherent logic. The various numerical numbers or serial numbers involved in the above processes are only for the convenience of description, and should not constitute any limitation on the implementation process of the embodiments of the present application.
相应于上述方法实施例给出的方法,本申请实施例还提供了相应的装置,所述装置包括用于执行上述实施例相应的模块。所述模块可以是软件,也可以是硬件,或者是软件和硬件结合。可以理解的是,方法实施例所描述的技术特征同样适用于以下装置实施例。Corresponding to the methods given in the foregoing method embodiments, the embodiments of the present application further provide corresponding apparatuses, and the apparatuses include corresponding modules for executing the foregoing embodiments. The modules may be software, hardware, or a combination of software and hardware. It can be understood that the technical features described in the method embodiments are also applicable to the following apparatus embodiments.
图5是本申请实施例提供的管理模型的装置的示意性框图。如图5所示,该管理模型的装置1000可以包括收发单元1100和处理单元1200。FIG. 5 is a schematic block diagram of an apparatus for managing a model provided by an embodiment of the present application. As shown in FIG. 5 , the apparatus 1000 of the management model may include a transceiver unit 1100 and a processing unit 1200 .
在一种可能的设计中,该管理模型的装置1000可对应于上文方法实施例中的服务器,例如,可以为服务器,或者配置于服务器中的芯片。In a possible design, the apparatus 1000 of the management model may correspond to the server in the above method embodiment, for example, may be a server or a chip configured in the server.
具体地,该管理模型的装置1000可对应于根据本申请实施例的方法300中的服务器,该管理模型的装置1000可以包括用于执行图4中方法300中的服务器执行的方法的单元。并且,该管理模型的装置1000中的各单元和上述其他操作或功能分别为了实现图4中的方法300中的服务器相应流程。Specifically, the apparatus 1000 for managing the model may correspond to the server in the method 300 according to the embodiment of the present application, and the apparatus 1000 for managing the model may include a unit for executing the method executed by the server in the method 300 in FIG. 4 . In addition, each unit in the apparatus 1000 for managing the model and the above-mentioned other operations or functions are respectively for realizing the corresponding flow of the server in the method 300 in FIG. 4 .
在一种可能的实现方式中,所述收发单元1100和所述处理单元1200可分别用于:In a possible implementation manner, the transceiver unit 1100 and the processing unit 1200 may be respectively used for:
收发单元1100,用于获取终端设备的第一模型的模型文件和所述终端设备的待处理任务的信息,所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境。A transceiver unit 1100, configured to acquire a model file of a first model of a terminal device and information about tasks to be processed of the terminal device, where the first model is a model related to the task to be processed, and the first model can run in the operating environment of the terminal device.
处理单元1200,用于将所述第一模型转换成第二模型,所述第二模型能够运行于所述服务器的运行环境;还用于调度第一虚拟化容器,并将所述第二模型和所述待处理任务加载到所述第一虚拟化容器中。The processing unit 1200 is configured to convert the first model into a second model, where the second model can run in the operating environment of the server; and is further configured to schedule a first virtualized container, and convert the second model and the to-be-processed task is loaded into the first virtualized container.
可选地,所述处理单元1200用于调度第一虚拟化容器,包括:查询空闲容器;在存在空闲容器的情况下,将所述空闲容器作为所述第一虚拟化容器;或者,在不存在空闲容器的情况下,通过实例化操作,得到所述第一虚拟化容器。Optionally, the processing unit 1200 is configured to schedule the first virtualized container, including: querying an idle container; if there is an idle container, using the idle container as the first virtualized container; or, when not When there is an idle container, the first virtualized container is obtained through an instantiation operation.
可选地,所述收发单元1100还用于:返回针对所述待处理任务的处理结果,所述处理结果是所述第一虚拟化容器对所述第二模型和所述待处理任务进行处理得到的。Optionally, the transceiver unit 1100 is further configured to: return a processing result for the to-be-processed task, where the processing result is that the first virtualization container processes the second model and the to-be-processed task owned.
应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process of each unit performing the above-mentioned corresponding steps has been described in detail in the above-mentioned method embodiments, and for the sake of brevity, it will not be repeated here.
还应理解,该管理模型的装置1000为服务器时,该装置1000中的收发单元1100可对应于图6中示出的装置800中的收发器830,该装置1000中的处理单元1200可对应于图6中示出的装置800中的处理器810。It should also be understood that when the device 1000 of the management model is a server, the transceiver unit 1100 in the device 1000 may correspond to the transceiver 830 in the device 800 shown in FIG. 6 , and the processing unit 1200 in the device 1000 may correspond to The processor 810 in the apparatus 800 shown in FIG. 6 .
还应理解,该管理模型的装置1000为配置于服务器中的芯片时,该装置1000中的收发单元1200可以为输入/输出接口电路。It should also be understood that when the apparatus 1000 of the management model is a chip configured in a server, the transceiver unit 1200 in the apparatus 1000 may be an input/output interface circuit.
可选地,该管理模型的装置1000还包括存储单元,该存储单元可以用于存储指令或者数据,处理单元可以调用该存储单元中存储的指令或者数据,以实现相应的操作。该存储单元可通过至少一个存储器实现,例如可对应于图6中的装置800中的存储器820。Optionally, the apparatus 1000 for managing a model further includes a storage unit, which can be used to store instructions or data, and the processing unit can call the instructions or data stored in the storage unit to implement corresponding operations. The storage unit may be implemented by at least one memory, for example, may correspond to the memory 820 in the device 800 in FIG. 6 .
在一种可能的设计中,该管理模型的装置1000可对应于上文方法实施例中的终端设备,例如,可以为终端设备,或者配置于终端设备中的芯片。In a possible design, the apparatus 1000 for the management model may correspond to the terminal device in the above method embodiments, for example, it may be a terminal device or a chip configured in the terminal device.
具体地,该管理模型的装置1000可对应于根据本申请实施例的方法300中的终端设备,该管理模型的装置1000可以包括用于执行图4中方法300中的终端设备执行的方法的单元。并且,该管理模型的装置1000中的各单元和上述其他操作或功能分别为了实现图4中的方法300中的终端设备相应流程。Specifically, the apparatus 1000 of the management model may correspond to the terminal device in the method 300 according to the embodiment of the present application, and the apparatus 1000 of the management model may include a unit for executing the method performed by the terminal device in the method 300 in FIG. 4 . . Moreover, each unit in the apparatus 1000 of the management model and the above-mentioned other operations or functions are respectively for realizing the corresponding process of the terminal device in the method 300 in FIG. 4 .
在一种可能的实现方式中,所述收发单元1100和所述处理单元1200可分别用于:In a possible implementation manner, the transceiver unit 1100 and the processing unit 1200 may be respectively used for:
处理单元1200,用于在确定对待处理任务进行算力卸载的情况下,触发模型上移机制,所述模型上移机制用于将所述终端设备的第一模型上传到服务器,所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境。The processing unit 1200 is configured to trigger a model moving mechanism when it is determined to unload the computing power of the task to be processed, where the model moving mechanism is used to upload the first model of the terminal device to the server, the first model The model is a model related to the to-be-processed task, and the first model can run in the running environment of the terminal device.
收发单元1100,用于发送所述第一消息,所述第一消息包括所述第一模型的模型文件和所述待处理任务的信息。The transceiver unit 1100 is configured to send the first message, where the first message includes the model file of the first model and the information of the to-be-processed task.
可选地,所述收发单元1100还用于,接收针对所述待处理任务的处理结果,所述处理结果是第一虚拟化容器对第二模型和所述待处理任务进行处理得到的,所述第二模型能够运行于所述服务器的运行环境。Optionally, the transceiver unit 1100 is further configured to receive a processing result for the to-be-processed task, where the processing result is obtained by the first virtualization container processing the second model and the to-be-processed task, so The second model can run in the operating environment of the server.
应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process of each unit performing the above-mentioned corresponding steps has been described in detail in the above-mentioned method embodiments, and for the sake of brevity, it will not be repeated here.
还应理解,该管理模型的装置1000为终端设备时,该管理模型的装置1000中的收发单元1100可对应于图7中示出的终端设备2000中的收发器2020,该管理模型的装置1000中的处理单元1200可对应于图7中示出的终端设备2000中的处理器2010。It should also be understood that when the apparatus 1000 of the management model is a terminal device, the transceiver unit 1100 in the apparatus 1000 of the management model may correspond to the transceiver 2020 of the terminal device 2000 shown in FIG. 7 , and the apparatus 1000 of the management model The processing unit 1200 in may correspond to the processor 2010 in the terminal device 2000 shown in FIG. 7 .
还应理解,该管理模型的装置1000为配置于终端设备中的芯片时,该管理模型的装置1000中的收发单元1200可以为输入/输出接口电路。It should also be understood that when the apparatus 1000 of the management model is a chip configured in a terminal device, the transceiver unit 1200 in the apparatus 1000 of the management model may be an input/output interface circuit.
可选地,该管理模型的装置1000还包括存储单元,该存储单元可以用于存储指令或者数据,处理单元可以调用该存储单元中存储的指令或者数据,以实现相应的操作。该存 储单元可通过至少一个存储器实现,例如可对应于图7中的终端设备2000中的存储器2030。Optionally, the apparatus 1000 for managing a model further includes a storage unit, which can be used to store instructions or data, and the processing unit can call the instructions or data stored in the storage unit to implement corresponding operations. The storage unit may be implemented by at least one memory, for example, may correspond to the memory 2030 in the terminal device 2000 in FIG. 7 .
如图6所示,本申请实施例还提供一种管理模型的装置800。该装置800包括处理器810,处理器810与存储器820耦合,存储器820用于存储计算机程序或指令和/或数据,处理器810用于执行存储器820存储的计算机程序或指令和/或数据,使得上文方法实施例中的方法被执行。As shown in FIG. 6 , an embodiment of the present application further provides an apparatus 800 for managing models. The apparatus 800 includes a processor 810 coupled to a memory 820 for storing computer programs or instructions and/or data, and the processor 810 for executing the computer programs or instructions and/or data stored in the memory 820 such that The methods in the above method embodiments are performed.
可选地,该装置800包括的处理器810为一个或多个。Optionally, the apparatus 800 includes one or more processors 810 .
可选地,如图6所示,该装置800还可以包括存储器820。Optionally, as shown in FIG. 6 , the apparatus 800 may further include a memory 820 .
可选地,该装置800包括的存储器820可以为一个或多个。Optionally, the device 800 may include one or more memories 820 .
可选地,该存储器820可以与该处理器810集成在一起,或者分离设置。Optionally, the memory 820 may be integrated with the processor 810, or provided separately.
可选地,如图6所示,该装置800还可以包括收发器830,收发器830用于信号的接收和/或发送。例如,处理器810用于控制收发器830进行信号的接收和/或发送。Optionally, as shown in FIG. 6 , the apparatus 800 may further include a transceiver 830, and the transceiver 830 is used for signal reception and/or transmission. For example, the processor 810 is used to control the transceiver 830 to receive and/or transmit signals.
作为一种方案,该装置800用于实现上文方法实施例中由服务器执行的操作。As a solution, the apparatus 800 is used to implement the operations performed by the server in the above method embodiments.
例如,处理器810用于实现上文方法实施例中由服务器执行的处理相关的操作,收发器830用于实现上文方法实施例中由服务器执行的收发相关的操作。For example, the processor 810 is configured to implement the processing-related operations performed by the server in the above method embodiments, and the transceiver 830 is configured to implement the above-mentioned method embodiments performed by the server.
可以理解的是,图6仅仅示出了示意性简化框图。在实际应用中,装置800也可以包括其他元件,包含但不限于任意数量的收发器、处理器、控制器、存储器等,对此不作具体限定。It will be appreciated that FIG. 6 only shows a schematic simplified block diagram. In practical applications, the apparatus 800 may also include other elements, including but not limited to any number of transceivers, processors, controllers, memories, etc., which are not specifically limited.
在一种可能的设计中,该装置800可以是芯片,例如可以为可用于服务器中的芯片,用于实现处理器810的相关功能。该芯片可以为实现相关功能的现场可编程门阵列,专用集成芯片,系统芯片,中央处理器,网络处理器,数字信号处理电路,微控制器,还可以采用可编程控制器或其他集成芯片。该芯片中,可选的可以包括一个或多个存储器,用于存储程序代码,当所述代码被执行时,使得处理器实现相应的功能。In a possible design, the apparatus 800 may be a chip, such as a chip that can be used in a server, for implementing the relevant functions of the processor 810 . The chip can be a field programmable gate array, an application-specific integrated chip, a system chip, a central processing unit, a network processor, a digital signal processing circuit, a microcontroller, and a programmable controller or other integrated chips for realizing related functions. The chip may optionally include one or more memories for storing program codes, and when the codes are executed, make the processor implement corresponding functions.
图7是本申请实施例提供的终端设备2000的结构示意图。该终端设备2000可应用于如图1所示的系统中,执行上述方法实施例中终端设备的功能。如图7所示,该终端设备2000包括处理器2010和收发器2020。可选地,该终端设备2000还包括存储器2030。其中,处理器2010、收发器2002和存储器2030之间可以通过内部连接通路互相通信,传递控制或数据信号,该存储器2030用于存储计算机程序,该处理器2010用于从该存储器2030中调用并运行该计算机程序,以控制该收发器2020收发信号。可选地,终端设备2000还可以包括天线2040,用于将收发器2020输出的上行数据或上行控制信令通过无线信号发送出去。FIG. 7 is a schematic structural diagram of a terminal device 2000 provided by an embodiment of the present application. The terminal device 2000 can be applied to the system shown in FIG. 1 to perform the functions of the terminal device in the foregoing method embodiments. As shown in FIG. 7 , the terminal device 2000 includes a processor 2010 and a transceiver 2020 . Optionally, the terminal device 2000 further includes a memory 2030 . Among them, the processor 2010, the transceiver 2002 and the memory 2030 can communicate with each other through an internal connection path to transmit control or data signals, the memory 2030 is used to store computer programs, and the processor 2010 is used to call and store computer programs from the memory 2030. The computer program is run to control the transceiver 2020 to send and receive signals. Optionally, the terminal device 2000 may further include an antenna 2040 for sending the uplink data or uplink control signaling output by the transceiver 2020 through wireless signals.
上述处理器2010可以和存储器2030可以合成一个处理装置,处理器2010用于执行存储器2030中存储的程序代码来实现上述功能。具体实现时,该存储器2030也可以集成在处理器2010中,或者独立于处理器2010。该处理器2010可以与图5中的处理单元对应。The above-mentioned processor 2010 and the memory 2030 can be combined into a processing device, and the processor 2010 is configured to execute the program codes stored in the memory 2030 to realize the above-mentioned functions. During specific implementation, the memory 2030 may also be integrated in the processor 2010 or independent of the processor 2010 . The processor 2010 may correspond to the processing unit in FIG. 5 .
上述收发器2020可以与图5中的通信单元对应,也可以称为收发单元。收发器2020可以包括接收器(或称接收机、接收电路)和发射器(或称发射机、发射电路)。其中,接收器用于接收信号,发射器用于发射信号。The foregoing transceiver 2020 may correspond to the communication unit in FIG. 5 , and may also be referred to as a transceiver unit. The transceiver 2020 may include a receiver (or receiver, receiving circuit) and a transmitter (or transmitter, transmitting circuit). Among them, the receiver is used for receiving signals, and the transmitter is used for transmitting signals.
应理解,图7所示的终端设备2000能够实现图4所示方法实施例中涉及终端设备的 各个过程。终端设备2000中的各个模块的操作或功能,分别为了实现上述方法实施例中的相应流程。具体可参见上述方法实施例中的描述,为避免重复,此处适当省略详细描述。It should be understood that the terminal device 2000 shown in FIG. 7 can implement various processes involving the terminal device in the method embodiment shown in FIG. 4 . The operations or functions of each module in the terminal device 2000 are respectively to implement the corresponding processes in the foregoing method embodiments. For details, reference may be made to the descriptions in the foregoing method embodiments, and to avoid repetition, the detailed descriptions are appropriately omitted here.
上述处理器2010可以用于执行前面方法实施例中描述的由终端设备内部实现的动作,而收发器2020可以用于执行前面方法实施例中描述的终端设备向网络设备发送或从网络设备接收的动作。具体请见前面方法实施例中的描述,此处不再赘述。The above-mentioned processor 2010 may be used to perform the actions described in the foregoing method embodiments that are implemented inside the terminal device, and the transceiver 2020 may be used to perform the actions described in the foregoing method embodiments that the terminal device sends to or receives from the network device. action. For details, please refer to the descriptions in the foregoing method embodiments, which will not be repeated here.
可选地,上述终端设备2000还可以包括电源2050,用于给终端设备中的各种器件或电路提供电源。Optionally, the above terminal device 2000 may further include a power supply 2050 for providing power to various devices or circuits in the terminal device.
除此之外,为了使得终端设备的功能更加完善,该终端设备2000还可以包括输入单元2060、显示单元2070、音频电路2080、摄像头2090和传感器2100等中的一个或多个,所述音频电路还可以包括扬声器2082、麦克风2084等。In addition, in order to make the functions of the terminal device more complete, the terminal device 2000 may further include one or more of an input unit 2060, a display unit 2070, an audio circuit 2080, a camera 2090, a sensor 2100, etc., the audio circuit Speakers 2082, microphones 2084, etc. may also be included.
可以理解,图7中所示的终端设备只是一种举例,并不对本申请的保护范围构成限定。事实上,终端设备也可以有其他形式。It can be understood that the terminal device shown in FIG. 7 is only an example, and does not limit the protection scope of the present application. In fact, the terminal equipment can also have other forms.
根据本申请实施例提供的方法,本申请还提供一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得该计算机执行上述任一方法实施例中服务器侧的方法,或者,使得该计算机执行上述任一方法所示实施例中终端设备侧的方法。According to the method provided by the embodiment of the present application, the present application also provides a computer program product, the computer program product includes: computer program code, when the computer program code runs on a computer, the computer is made to execute any of the above method embodiments The method on the server side in the above method, or make the computer execute the method on the terminal device side in the embodiment shown in any of the above methods.
根据本申请实施例提供的方法,本申请还提供一种计算机可读存储介质,该计算机可读介质存储有程序代码,当该程序代码在计算机上运行时,使得该计算机执行上述任一方法所示实施例中服务器侧的方法,或者,使得该计算机执行上述任一方法所示实施例中终端设备侧的方法。According to the methods provided by the embodiments of the present application, the present application further provides a computer-readable storage medium, where program codes are stored in the computer-readable medium, and when the program codes are run on a computer, the computer is made to execute any of the above-mentioned methods. The method on the server side in the example embodiment, or the computer is caused to execute the method on the terminal device side in the embodiment shown by any of the above methods.
本申请实施例还提供了一种处理装置,包括处理器和接口;所述处理器用于执行上述任一方法实施例中的管理模型的方法。An embodiment of the present application further provides a processing apparatus, including a processor and an interface; the processor is configured to execute the method for managing a model in any of the foregoing method embodiments.
本申请实施例还提供了一种芯片,包括处理器和接口;所述处理器通过接口读取存储器上存储的指令,用于执行上述任一方法实施例中的管理模型的方法。An embodiment of the present application further provides a chip, including a processor and an interface; the processor reads the instructions stored in the memory through the interface, and is used to execute the method for managing the model in any of the above method embodiments.
本申请实施例还提供一种通信系统,该通信系统包括上文实施例中的服务器与终端设备。An embodiment of the present application further provides a communication system, where the communication system includes the server and the terminal device in the above embodiment.
上述各个装置实施例中的管理模型的装置和方法实施例中的服务器和终端设备完全对应,由相应的模块或单元执行相应的步骤,例如通信单元(收发器)执行方法实施例中接收或发送的步骤,除发送、接收外的其它步骤可以由处理单元(处理器)执行。具体单元的功能可以参考相应的方法实施例。其中,处理器可以为一个或多个。The apparatus and method for managing the model in the above-mentioned various apparatus embodiments completely correspond to the server and the terminal device, and corresponding steps are performed by the corresponding module or unit, for example, the communication unit (transceiver) performs the receiving or sending in the method embodiment. The steps other than sending and receiving can be performed by the processing unit (processor). For functions of specific units, reference may be made to corresponding method embodiments. The number of processors may be one or more.
本领域技术人员还可以了解到本申请实施例列出的各种说明性逻辑块(illustrative logical block)和步骤(step)可以通过电子硬件、电脑软件,或两者的结合进行实现。这样的功能是通过硬件还是软件来实现取决于特定的应用和整个系统的设计要求。本领域技术人员可以对于每种特定的应用,可以使用各种方法实现所述的功能,但这种实现不应被理解为超出本申请实施例保护的范围。Those skilled in the art can also understand that various illustrative logical blocks (illustrative logical blocks) and steps (steps) listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functionality is implemented in hardware or software depends on the specific application and overall system design requirements. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be construed as exceeding the protection scope of the embodiments of the present application.
应理解,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可 编程门阵列(field programmable gate array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor in this embodiment of the present application may be an integrated circuit chip, which has a signal processing capability. In the implementation process, each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable circuits. Programming logic devices, discrete gate or transistor logic devices, discrete hardware components, may also be a system on chip (SoC), a central processor unit (CPU), or a network processor (network processor). processor, NP), can also be a digital signal processing circuit (digital signal processor, DSP), can also be a microcontroller (micro controller unit, MCU), can also be a programmable logic device (programmable logic device, PLD) or other Integrated chip. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
本申请所描述的技术可通过各种方式来实现。例如,这些技术可以用硬件、软件或者硬件结合的方式来实现。对于硬件实现,用于在装置(例如,服务器,基站,终端、网络实体、或芯片)处执行这些技术的处理单元,可以实现在一个或多个通用处理器、DSP、数字信号处理器件、ASIC、可编程逻辑器件、FPGA、或其它可编程逻辑装置,离散门或晶体管逻辑,离散硬件部件,或上述任何组合中。通用处理器可以为微处理器,可选地,该通用处理器也可以为任何传统的处理器、控制器、微控制器或状态机。处理器也可以通过计算装置的组合来实现,例如数字信号处理器和微处理器,多个微处理器,一个或多个微处理器联合一个数字信号处理器核,或任何其它类似的配置来实现。The techniques described in this application can be implemented in a variety of ways. For example, these techniques can be implemented in hardware, software, or a combination of hardware. For a hardware implementation, a processing unit for performing the techniques at an apparatus (eg, server, base station, terminal, network entity, or chip) may be implemented in one or more general purpose processors, DSPs, digital signal processing devices, ASICs , programmable logic device, FPGA, or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of the foregoing. A general-purpose processor may be a microprocessor, or alternatively, the general-purpose processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors in combination with a digital signal processor core, or any other similar configuration. accomplish.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which acts as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另 一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, high-density digital video discs (DVDs)), or semiconductor media (eg, solid state disks, SSD)) etc.
应理解,在本申请中,“当…时”、“若”以及“如果”均指在某种客观情况下服务器或终端设备会做出相应的处理,并非是限定时间,且也不要求服务器或终端设备实现时一定要有判断的动作,也不意味着存在其它限定。It should be understood that in this application, "when", "if" and "if" all mean that the server or terminal device will perform corresponding processing under certain objective circumstances, not a limited time, and does not require the server Or the terminal device must have a judgment action when it is implemented, and it does not mean that there are other restrictions.
本领域普通技术人员可以理解:本申请中涉及的第一、第二等各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围,也表示先后顺序。Those of ordinary skill in the art can understand that the first, second, and other numeral numbers involved in the present application are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application, but also represent the sequence.
本申请中对于使用单数表示的元素旨在用于表示“一个或多个”,而并非表示“一个且仅一个”,除非有特别说明。本申请中,在没有特别说明的情况下,“至少一个”旨在用于表示“一个或者多个”,“多个”旨在用于表示“两个或两个以上”。References in this application to elements in the singular are intended to mean "one or more" rather than "one and only one" unless specifically stated otherwise. In this application, unless otherwise specified, "at least one" is intended to mean "one or more", and "plurality" is intended to mean "two or more".
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A可以是单数或者复数,B可以是单数或者复数。Additionally, the terms "system" and "network" are often used interchangeably herein. The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently The three cases of B, where A can be singular or plural, and B can be singular or plural.
字符“/”一般表示前后关联对象是一种“或”的关系。The character "/" generally indicates that the associated objects are an "or" relationship.
在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在2个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。The terms "component", "module", "system" and the like are used in this specification to refer to a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device may be components. One or more components may reside within a process and/or thread of execution, and a component may be localized on one computer and/or distributed between 2 or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. A component may, for example, be based on a signal having one or more data packets (eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals) Communicate through local and/or remote processes.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间 接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a removable hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk and other media that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (14)

  1. 一种管理模型的方法,其特征在于,包括:A method for managing models, comprising:
    服务器获取终端设备的第一模型和所述终端设备的待处理任务的信息,所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境;The server acquires a first model of a terminal device and information about tasks to be processed of the terminal device, where the first model is a model related to the tasks to be processed, and the first model can run when the terminal device runs surroundings;
    所述服务器将所述第一模型转换成第二模型,所述第二模型能够运行于所述服务器的运行环境;The server converts the first model into a second model, and the second model can run in the operating environment of the server;
    所述服务器调度第一虚拟化容器,并将所述第二模型和所述待处理任务加载到所述第一虚拟化容器中。The server schedules a first virtualized container, and loads the second model and the to-be-processed task into the first virtualized container.
  2. 根据权利要求1所述的方法,其特征在于,所述服务器调度第一虚拟化容器,包括:The method according to claim 1, wherein the server scheduling the first virtualized container comprises:
    所述服务器查询空闲容器;the server queries idle containers;
    在存在空闲容器的情况下,所述服务器将所述空闲容器作为所述第一虚拟化容器;或者,If there is an idle container, the server uses the idle container as the first virtualized container; or,
    在不存在空闲容器的情况下,所述服务器通过实例化操作,得到所述第一虚拟化容器。When there is no idle container, the server obtains the first virtualized container through an instantiation operation.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    所述服务器返回针对所述待处理任务的处理结果,所述处理结果是所述第一虚拟化容器对所述第二模型和所述待处理任务进行处理得到的。The server returns a processing result for the to-be-processed task, where the processing result is obtained by processing the second model and the to-be-processed task by the first virtualization container.
  4. 一种管理模型的方法,其特征在于,包括:A method for managing models, comprising:
    在确定对待处理任务进行算力卸载的情况下,终端设备触发模型上移机制,所述模型上移机制用于将所述终端设备的第一模型上传到服务器,所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境;In the case where it is determined to unload the computing power of the task to be processed, the terminal device triggers a model moving mechanism, and the model moving mechanism is used to upload the first model of the terminal device to the server, and the first model is the same as the the model related to the task to be processed, the first model can run in the running environment of the terminal device;
    所述终端设备发送所述第一消息,所述第一消息包括所述第一模型的模型文件和所述待处理任务的信息。The terminal device sends the first message, where the first message includes a model file of the first model and information of the to-be-processed task.
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    所述终端设备接收针对所述待处理任务的处理结果,所述处理结果是第一虚拟化容器对第二模型和所述待处理任务进行处理得到的,所述第二模型能够运行于所述服务器的运行环境。The terminal device receives a processing result for the to-be-processed task, where the processing result is obtained by processing a second model and the to-be-processed task by the first virtualization container, and the second model can run on the The operating environment of the server.
  6. 一种管理模型的装置,其特征在于,包括:A device for managing models, comprising:
    收发单元,用于获取终端设备的第一模型和所述终端设备的待处理任务的信息,所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境;a transceiver unit, configured to acquire a first model of a terminal device and information about tasks to be processed of the terminal device, where the first model is a model related to the tasks to be processed, and the first model can run on the The operating environment of the terminal equipment;
    处理单元,用于将所述第一模型转换成第二模型,所述第二模型能够运行于所述服务器的运行环境;a processing unit, configured to convert the first model into a second model, where the second model can run in the running environment of the server;
    所述处理单元还用于调度第一虚拟化容器,并将所述第二模型和所述待处理任务加载到所述第一虚拟化容器中。The processing unit is further configured to schedule a first virtualized container, and load the second model and the to-be-processed task into the first virtualized container.
  7. 根据权利要求6所述的装置,其特征在于,所述处理单元用于调度第一虚拟化容器,包括:The apparatus according to claim 6, wherein the processing unit is configured to schedule the first virtualized container, comprising:
    查询空闲容器;Query free containers;
    在存在空闲容器的情况下,将所述空闲容器作为所述第一虚拟化容器;或者,If there is an idle container, use the idle container as the first virtualized container; or,
    在不存在空闲容器的情况下,通过实例化操作,得到所述第一虚拟化容器。In the case that there is no idle container, the first virtualized container is obtained through an instantiation operation.
  8. 根据权利要求6或7所述的装置,其特征在于,所述收发单元还用于:The device according to claim 6 or 7, wherein the transceiver unit is further configured to:
    返回针对所述待处理任务的处理结果,所述处理结果是所述第一虚拟化容器对所述第二模型和所述待处理任务进行处理得到的。Return a processing result for the to-be-processed task, where the processing result is obtained by the first virtualization container processing the second model and the to-be-processed task.
  9. 一种管理模型的装置,其特征在于,所述装置为终端设备,所述终端设备包括:An apparatus for managing models, characterized in that the apparatus is a terminal device, and the terminal device includes:
    处理单元,用于在确定对待处理任务进行算力卸载的情况下,触发模型上移机制,所述模型上移机制用于将所述终端设备的第一模型上传到服务器,所述第一模型是与所述待处理任务相关的模型,所述第一模型能够运行于所述终端设备的运行环境;a processing unit, configured to trigger a model moving mechanism when it is determined that the computing power of the task to be processed is unloaded, and the model moving mechanism is used to upload the first model of the terminal device to the server, the first model is a model related to the task to be processed, and the first model can run in the operating environment of the terminal device;
    收发单元,用于发送所述第一消息,所述第一消息包括所述第一模型的模型文件和所述待处理任务的信息。A transceiver unit, configured to send the first message, where the first message includes a model file of the first model and information of the to-be-processed task.
  10. 根据权利要求9所述的装置,其特征在于,所述收发单元还用于,接收针对所述待处理任务的处理结果,所述处理结果是第一虚拟化容器对第二模型和所述待处理任务进行处理得到的,所述第二模型能够运行于所述服务器的运行环境。The apparatus according to claim 9, wherein the transceiver unit is further configured to receive a processing result for the to-be-processed task, where the processing result is the first virtualization container's response to the second model and the to-be-processed task. Obtained by processing the processing task, the second model can run in the running environment of the server.
  11. 一种管理模型的装置,其特征在于,包括处理器,所述处理器与存储器耦合,所述存储器用于存储计算机程序或指令,所述处理器用于执行存储器中的所述计算机程序或指令,使得权利要求1至3中任一项所述的方法被执行。An apparatus for managing models, characterized in that it comprises a processor, wherein the processor is coupled with a memory, the memory is used for storing computer programs or instructions, and the processor is used for executing the computer programs or instructions in the memory, The method of any one of claims 1 to 3 is caused to be performed.
  12. 一种管理模型的装置,其特征在于,包括处理器,所述处理器与存储器耦合,所述存储器用于存储计算机程序或指令,所述处理器用于执行存储器中的所述计算机程序或指令,使得权利要求4或5所述的方法被执行。An apparatus for managing models, characterized in that it comprises a processor, wherein the processor is coupled with a memory, the memory is used for storing computer programs or instructions, and the processor is used for executing the computer programs or instructions in the memory, The method of claim 4 or 5 is caused to be performed.
  13. 一种计算机可读存储介质,其特征在于,存储有计算机程序或指令,当所述计算机程序或指令被执行时,使得权利要求1至3中任一项所述的方法被执行。A computer-readable storage medium, characterized in that a computer program or instruction is stored, and when the computer program or instruction is executed, the method of any one of claims 1 to 3 is executed.
  14. 一种计算机可读存储介质,其特征在于,存储有计算机程序或指令,当所述计算机程序或指令被执行时,使得权利要求4或5所述的方法被执行。A computer-readable storage medium, characterized in that a computer program or instruction is stored, and when the computer program or instruction is executed, the method according to claim 4 or 5 is performed.
PCT/CN2021/074081 2021-01-28 2021-01-28 Method and apparatus for model management WO2022160155A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/074081 WO2022160155A1 (en) 2021-01-28 2021-01-28 Method and apparatus for model management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/074081 WO2022160155A1 (en) 2021-01-28 2021-01-28 Method and apparatus for model management

Publications (1)

Publication Number Publication Date
WO2022160155A1 true WO2022160155A1 (en) 2022-08-04

Family

ID=82654028

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/074081 WO2022160155A1 (en) 2021-01-28 2021-01-28 Method and apparatus for model management

Country Status (1)

Country Link
WO (1) WO2022160155A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725949A (en) * 2018-12-25 2019-05-07 南京邮电大学 A kind of mobile edge calculations uninstalling system and method based on mobile agent
CN110347500A (en) * 2019-06-18 2019-10-18 东南大学 For the task discharging method towards deep learning application in edge calculations environment
CN111262906A (en) * 2020-01-08 2020-06-09 中山大学 Method for unloading mobile user terminal task under distributed edge computing service system
US20200327371A1 (en) * 2019-04-09 2020-10-15 FogHorn Systems, Inc. Intelligent Edge Computing Platform with Machine Learning Capability

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725949A (en) * 2018-12-25 2019-05-07 南京邮电大学 A kind of mobile edge calculations uninstalling system and method based on mobile agent
US20200327371A1 (en) * 2019-04-09 2020-10-15 FogHorn Systems, Inc. Intelligent Edge Computing Platform with Machine Learning Capability
CN110347500A (en) * 2019-06-18 2019-10-18 东南大学 For the task discharging method towards deep learning application in edge calculations environment
CN111262906A (en) * 2020-01-08 2020-06-09 中山大学 Method for unloading mobile user terminal task under distributed edge computing service system

Similar Documents

Publication Publication Date Title
WO2020164369A1 (en) State configuration method and device
WO2020156127A1 (en) Method for wireless communication and communication apparatus
JP7182628B2 (en) Wireless communication method, terminal device and network device
US20220225254A1 (en) Method for processing timing advance ta of terminal, and apparatus
US20160014595A1 (en) Receive Operation Mode Indication for Power Save
WO2021197087A1 (en) Communication priority determining method and apparatus
WO2022160155A1 (en) Method and apparatus for model management
WO2021027907A1 (en) Communication method and communication apparatus
US20230179991A1 (en) Facilitation of machine type communication firmware over the air
WO2022012256A1 (en) Communication method and communication device
US20200296763A1 (en) Multi-user (mu) enhanced distributed channel access (edca) termination signaling
WO2020093940A1 (en) Beam training method and device
WO2024007814A1 (en) Data transmission method and apparatus
WO2024067172A1 (en) Data transmission method and apparatus
WO2021164331A1 (en) Communication method and communication apparatus
WO2023151583A1 (en) Method and apparatus for sending self-organizing network report
US20230336437A1 (en) Intelligent component update method and communication apparatus
US20240080788A1 (en) Information transmission method, lightweight processing method, and related communication apparatus
WO2022120803A1 (en) Communication method and apparatus
WO2023216696A1 (en) Information processing method and apparatus
WO2023088268A1 (en) Ai information transmission method and device
WO2023241448A1 (en) Measurement processing method, terminal, and network side device
CN116405909A (en) Software version compatible method, device, terminal equipment and medium of heterogeneous network
WO2021081919A1 (en) Method and apparatus for establishing connection
WO2023193791A1 (en) Communication method and communication apparatus

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21921775

Country of ref document: EP

Kind code of ref document: A1