WO2024017074A1 - 一种通信方法及通信装置 - Google Patents

一种通信方法及通信装置 Download PDF

Info

Publication number
WO2024017074A1
WO2024017074A1 PCT/CN2023/106241 CN2023106241W WO2024017074A1 WO 2024017074 A1 WO2024017074 A1 WO 2024017074A1 CN 2023106241 W CN2023106241 W CN 2023106241W WO 2024017074 A1 WO2024017074 A1 WO 2024017074A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
model
function
task
execute
Prior art date
Application number
PCT/CN2023/106241
Other languages
English (en)
French (fr)
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
Priority claimed from CN202211044983.XA external-priority patent/CN117479184A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024017074A1 publication Critical patent/WO2024017074A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Definitions

  • the present application relates to the field of communication, and specifically to a communication method and communication device.
  • AI artificial intelligence
  • Embodiments of the present application provide a communication method that can realize the transfer of AI models between communication devices while avoiding waste of resources.
  • a communication method is provided.
  • the method may be executed by the first device or may be executed by a component (such as a chip or circuit) of the first device, which is not limited in this application.
  • a component such as a chip or circuit
  • the following description takes the execution of the first device as an example.
  • the communication method includes: the first device obtains a first function, the first function is used to evaluate the resources consumed by the second device to execute the artificial intelligence AI model; the first device determines based on the information of the first function and the first AI model The first resource consumed by the second device for executing the first AI model; the first device determines whether to send first information to the second device based on the first resource, where the first information includes at least one of the following: the first How to obtain the AI model or the first AI model.
  • the first device can evaluate the resources consumed by the second device to execute the AI model according to the first function, and determine whether to send the first AI to the second device according to the resources consumed by the second device to execute the first AI model.
  • model it can be understood that the first device does not send all AI models, but before sending the AI model, it will evaluate the resources consumed by the second device to execute the AI model. If the resources consumed by the second device to execute the first AI model If certain requirements are not met, the first AI model may not be sent to the second device, so as to send an appropriate AI model to the second device and avoid wasting resources caused by sending an inappropriate AI model.
  • the first function includes at least one of the following: a second AI model generated by training based on the second information and the third information; or, based on the second A mapping function formed by fitting the information and the third information; or a mapping table obtained statistically based on the second information and the third information, wherein the input of the first function is related to the second information , the output of the first function is related to the third information, and the second information includes at least one of the following information: information about the AI operator, information about the AI module, or information about the third AI model;
  • the third information includes at least one of the following information: resources consumed by a third device for executing the AI operator, resources consumed by a third device for executing the AI module, resources consumed by a third device for executing the third AI model.
  • the resources consumed, the third device is the second device or the third device and the second device have the same first capability, and the first capability is related to the AI operator and the AI module. Or related to the execution of the third AI model.
  • the information of the AI module includes at least one of the following: type information of the AI module, parameters of the AI module, and preceding and following modules of the AI module. information, or the information of the preceding and following operators of the AI module;
  • the information of the said AI operator includes at least one of the following: the type information of the said AI operator, the parameters of the said AI operator, the preceding and following information of the said AI operator Operator information, or module information before and after the AI operator;
  • the information of the third AI model includes at least one of the following: parameters of the overall structure of the third AI model or parameters of the substructure of the third AI model .
  • the information of the first AI model includes at least one of the following: information of AI operators constituting the first AI model, information constituting the first AI Information about the AI module of the model, parameters of the overall structure of the first AI model, or parameters of the substructure of the first AI model.
  • the first device obtains the first function, including: the first device receives the first function; or, the first device receives the first indication information, and The first function is obtained according to the first instruction information, wherein the first instruction information includes information indicating a manner of obtaining the first function, and/or an identification of the first function.
  • the first device can obtain the first function by directly receiving the first function, or by receiving the first instruction information and indirectly obtaining the first function according to the first instruction information, which provides different acquisition methods. , increasing the flexibility of the solution.
  • the first device when the first resource satisfies a first condition, the first device sends the first information to the second device, wherein the first condition Related to preset threshold.
  • the first device determines that the first resource consumed by the second device to execute the first AI model meets the first condition, it sends the first AI model or the acquisition method of the first AI model to the second device, that is to say It is guaranteed that the transmitted first AI model can satisfy the first condition when executed in the second device.
  • the first resource includes at least one of the following: time or energy.
  • the preset threshold when the first resource includes time and energy, includes a first preset threshold and a second preset threshold, and the first preset threshold Assume that the threshold is related to the time, and the second preset threshold is related to the energy.
  • the method before the first device determines whether to send the first information to the second device according to the first resource, the method further includes: the first device receives from At least one of the following information of the second device: processing resource indication information or second indication information, wherein the processing resource indication information is used to indicate the processing resources that the second device can use to execute the first AI model.
  • the second instruction information is used to indicate adjusting the value of the first resource consumed by the second device for executing the first AI model.
  • the processing resource is related to a first capability of the second device, and the first capability is related to the AI operator, the AI module or the Related to the execution of the third AI model.
  • the first device determines the first resources consumed by the second device to execute the first AI model based on the first function and the information of the first AI model, Including: the first device determines the first resources consumed by the second device to execute the first AI model based on the information of the first function and the first AI model and at least one of the following information: the resource indication information or the second instruction information.
  • the first device when the first device evaluates the first resources consumed by the second device to execute the first AI model, in addition to considering the first function, the first device can also consider the second device can be used to execute the first AI model.
  • the proportion of processing resources, and the value of the first resource consumed by the first AI model can also be considered, adding other considerations to improve the accuracy of the evaluation.
  • the method further includes: the first device obtains a second function, the second function is used to evaluate the resources consumed by the fourth device to execute the AI model; A device determines the second resources consumed by the fourth device to execute the fourth AI model based on the information of the second function and the fourth AI model; the first device determines to send the first information to the second device based on the first resources. , and when it is determined to send the fourth information to the fourth device according to the second resource, the first device determines the first task and the fourth task performed by the second device according to the second function and the first function. The device performs a second task, and the first task and the second task satisfy the first rule.
  • a communication method including: a first device obtains a first function, the first function is used to evaluate the resources consumed by a second device to execute an artificial intelligence AI model; the first device obtains a second function, the second function is used to evaluate The resources consumed by the fourth device for executing the AI model.
  • the first device determines the first task executed by the second device and the second task executed by the fourth device according to the second function and the first function. A task and the second task satisfy the first rule.
  • the first device can obtain the functions of different devices and determine the allocation of tasks by combining multiple functions corresponding to multiple devices.
  • the first device can complete the allocation of AI execution tasks according to certain constraints.
  • the first rule includes at least one of the following: the first task and the second task are executed and completed at the same time; or, the first task and The second task is executed and completed according to a predefined time sequence; or, there is a preset time difference between the time when the first task is completed and the time when the second task is completed; or, the first The energy required to complete the task execution is equal to the energy required to complete the second task execution; or, the ratio between the energy required to complete the first task execution and the energy required to complete the second task execution Meet the preset ratio requirement; or, there is a preset energy difference between the energy required to complete the first task and the energy required to complete the second task.
  • the second aspect provides a communication method.
  • the method may be executed by the second device or may be executed by a component (such as a chip or circuit) of the second device, which is not limited in this application.
  • a component such as a chip or circuit
  • the following description takes the execution of the second device as an example.
  • the communication method includes: the second device obtains a first function and/or first indication information, the first indication information includes information indicating a way to obtain the first function, and/or an identification of the first function, the The first function is used to evaluate the resources consumed by the second device for executing the artificial intelligence AI model; the second device sends the first function and/or the first instruction information to the first device.
  • the first function includes at least one of the following: a second AI model generated by training according to the second information and the third information; or, according to the second A mapping function formed by fitting the information and the third information; or a mapping table obtained statistically based on the second information and the third information, wherein the input of the first function is related to the second information , the output of the first function is related to the third information, and the second information includes at least one of the following information: information about the AI operator, information about the AI module, or information about the third AI model;
  • the third information includes at least one of the following information: resources consumed by a third device for executing the AI operator, resources consumed by a third device for executing the AI module, resources consumed by a third device for executing the third AI model.
  • the resources consumed, the third device is the second device or the third device and the second device have the same first capability, and the first capability is related to the AI operator and the AI module. Or related to the execution of the third AI model.
  • the method further includes: the second device receiving first information from the first device, the first information including at least one of the following: the first AI model or how to obtain the first AI model.
  • the method further includes: the second device sending processing resource indication information or second indication information to the first device, wherein the processing resource indication information is used to Indicates the proportion of processing resources that the second device can use to execute the first AI model, and the second indication information is used to indicate adjusting the value of the first resources consumed by the second device to execute the first AI model.
  • the processing resource is related to a first capability of the second device, and the first capability is related to the AI operator, the AI module or the Related to the execution of the third AI model.
  • a first device is provided.
  • the first device is used to perform the above-mentioned first aspect and any implementation manner thereof.
  • the first device includes a processor and a memory, the memory is used to store a computer program; the processor is used to call and run the computer program from the memory, so that the first device executes the above-mentioned first aspect and any implementation thereof Way.
  • a second device is provided.
  • the second device is used to perform the above second aspect and any implementation manner thereof.
  • the second device includes a processor and a memory, the memory is used to store a computer program; the processor is used to call and run the computer program from the memory, so that the second device executes the above second aspect and any implementation thereof Way.
  • a communication device is provided.
  • the communication device is used to perform the method provided by the above-mentioned first aspect and any one of its implementation modes or the second aspect and any one of its implementation modes.
  • the communication device may include units and/or modules (eg, processing unit, transceiver unit) for executing the method provided by the first aspect or the second aspect and any one of its implementations.
  • the communication device is a terminal device.
  • the transceiver unit may be a transceiver, or an input/output interface.
  • the processing unit may be at least one processor.
  • the transceiver may be a transceiver circuit.
  • the input/output interface may be an input/output circuit.
  • the communication device may be a chip, a chip system or a circuit in a terminal device.
  • the transceiver unit may be an input/output interface, interface circuit, output circuit, input circuit, pin or related circuit on the chip, chip system or circuit, etc.
  • the processing unit may be at least one processor, processing circuit or logic circuit etc.
  • the present application provides a processor for executing the method provided in the first aspect or the second aspect.
  • processor output, reception, input and other operations can be understood as processor output, reception, input and other operations.
  • transmitting and receiving operations performed by the radio frequency circuit and the antenna, which is not limited in this application.
  • a computer-readable storage medium stores a computer program.
  • the communication device causes the communication device to execute the method of any implementation of the first aspect or the second aspect.
  • An eighth aspect provides a computer program product containing instructions.
  • the computer program product When the computer program product is run on a computer, it causes The computer executes the method provided by any implementation of the first aspect or the second aspect.
  • a ninth aspect provides a chip.
  • the chip includes a processor and a communication interface.
  • the processor reads instructions through the communication interface and executes the method provided by any one of the implementations of the first aspect or the second aspect.
  • the chip also includes a memory, the memory stores computer programs or instructions, and the processor is used to execute the computer program or instructions stored on the memory.
  • the processor is used to execute the above.
  • a communication system including the first device of the third aspect and the second device of the fourth aspect.
  • Figure 1 is a communication scenario applicable to the embodiment of the present application.
  • Figure 2 is a schematic flow chart of a communication method provided by this application.
  • Figure 3 is a schematic diagram of the first function generation process provided by the embodiment of the present application.
  • Figure 4 is a schematic flow chart of another communication method provided by this application.
  • FIG. 5 is a schematic block diagram of the communication device 10 provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of another communication device 20 according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a chip system 30 provided by an embodiment of the present application.
  • the technical solutions of the embodiments of this application can be applied to various communication systems.
  • fifth generation (5G) system or new radio (NR) long term evolution (LTE) system
  • LTE frequency division duplex (FDD) system LTE time division duplex Work (time division duplex, TDD), etc.
  • the technical solution provided by this application can also be applied to future communication systems, such as the sixth generation mobile communication system.
  • the technical solutions of the embodiments of this application can also be applied to device-to-device (D2D) communication, vehicle-to-everything (V2X) communication, machine-to-machine (M2M) communication, and machine-to-machine (M2M) communication.
  • Type communication machine type communication, MTC
  • Internet of things Internet of things, IoT
  • Terminal equipment in the embodiments of this application may refer to access terminal, user unit, user station, mobile station, mobile station, relay station, remote station, remote terminal, mobile device, user terminal (user terminal), user equipment (user equipment, UE), terminal, wireless communication equipment, user agent or user device.
  • the terminal device may also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a device with wireless communications Functional handheld devices, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or terminals in future evolved public land mobile communications networks (PLMN) Equipment or terminal equipment in future Internet of Vehicles, etc., the embodiments of this application are not limited to this.
  • SIP session initiation protocol
  • WLL wireless local loop
  • PDA personal digital assistant
  • PLMN public land mobile communications networks
  • a wearable device may also be called a wearable smart device, which is a general term for applying wearable technology to intelligently design daily wear and develop wearable devices.
  • wearable devices are portable devices that are worn directly on the body or are integrated into the user's clothing or accessories.
  • Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured devices that can achieve complete or partial functions without relying on smartphones.
  • it can also be a portable device that only focuses on a certain type of application function and needs to be used in conjunction with other devices such as smartphones.
  • smart bracelets and smart jewelry for physical sign monitoring.
  • the terminal device may also be a terminal device in the IoT system.
  • IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-computer interconnection and object interconnection.
  • IoT technology can achieve massive connections, deep coverage, and terminal power saving through, for example, narrowband (NB) technology.
  • NB narrowband
  • the terminal device may also include a sensor, whose main functions include collecting data (part of the terminal device), receiving control information and downlink data of the network device, and sending electromagnetic waves to transmit uplink data to the network device.
  • the network device in the embodiment of the present application may be any communication device with wireless transceiver functions used to communicate with terminal devices.
  • the equipment includes but is not limited to: evolved Node B (eNB), radio network controller (RNC), Node B (Node B, NB), home base station (home evolved NodeB, HeNB, or home Node B, HNB), baseband unit (baseBand unit, BBU), access point (AP), wireless relay node, wireless backhaul node, transmission point in the wireless fidelity (wireless fidelity, WIFI) system (transmission point, TP) or transmission and reception point (TRP), etc.
  • eNB evolved Node B
  • RNC radio network controller
  • Node B Node B
  • NB home base station
  • baseband unit baseBand unit, BBU
  • AP access point
  • wireless relay node wireless backhaul node
  • transmission point in the wireless fidelity (wireless fidelity, WIFI) system transmission point, TP) or transmission and reception point (TRP), etc.
  • Network equipment and terminal equipment can be deployed on land, indoors or outdoors, handheld or vehicle-mounted; they can also be deployed on water; they can also be deployed on aircraft, balloons and satellites in the sky. In the embodiments of this application, the scenarios in which network devices and terminal devices are located are not limited.
  • the terminal device or network device 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 can be any one or more computer operating systems that implement business processing through processes, for example, operating system, operating system, operating system, operating system or operating system, etc.
  • This application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
  • various aspects or features of the present application may be implemented as methods, apparatus, or articles 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 include but are not limited to: magnetic storage devices (such as hard disks, floppy disks or tapes, etc.), optical disks (such as compact discs (CD), digital versatile discs (DVD), etc.) , smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.).
  • the various storage media described herein may represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable storage 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.
  • this application can be applied to a communication system including two devices, such as device #1 and device #2, where there is an AI model (eg, AI model #1) to be sent to device #1 on device #2, Device #1 has an execution environment that executes the AI model #1.
  • Device #2 can be a base station or core network device, but it can also be another device that owns AI model #1 and is preparing to send AI model #1 to device #1, or is preparing to arrange the execution of AI model #1 for device #1
  • the device of the task; device #1 can be a terminal, but it can also be other devices that are prepared to obtain AI model #1 from device #2 and execute or obtain the execution task of AI model #1.
  • device #2 sends AI model #1 to device #1, which can be understood as device #2 sending the information of AI model #1 to device #1, and device #1 can determine AI model # based on the information of AI model #1. 1.
  • the communication system shown in FIG. 1 is taken as an example to describe in detail the communication system applicable to the embodiment of the present application.
  • the communication system 100 may include at least one network device, such as the network device 110 shown in FIG. 1 ; the communication system 100 may also include at least one terminal device, such as the terminal device 120 shown in FIG. 1 .
  • the network device 110 and the terminal device 120 may communicate through wireless links.
  • Each communication device, such as the network device 110 and the terminal device 120 can be configured with multiple antennas.
  • the configured plurality of antennas may include at least one transmitting antenna for transmitting signals and at least one receiving antenna for receiving signals. Therefore, the communication devices in the communication system 100, such as the network device 110 and the terminal device 120, can communicate through multi-antenna technology.
  • Figure 1 takes communication between a network device and a terminal device as an example to briefly illustrate a communication scenario to which the present application can be applied, and does not limit other scenarios to which the present application can be applied.
  • Figure 1 is only a simplified schematic diagram for ease of understanding.
  • the communication system may also include other network devices or other terminal devices, which are not shown in Figure 1 .
  • AI Artificial intelligence
  • artificial intelligence is a branch of computer science that attempts to understand the nature of intelligence and produce a new type of computer that can Intelligent machines respond in a similar way to intelligence.
  • Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making. Intelligent machines can be applied in various fields, such as natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, etc.
  • AI also includes machine learning (ML). In this application, AI represents AI/ML.
  • AI model can be regarded as the core of intelligent machines. Based on different types of AI models, intelligent machines can be applied to various fields, such as natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and Search etc.
  • AI models include convolutional neural network (CNN), recurrent neural network (RNN), deep learning models based on self-attention mechanism (such as Transformer), etc.
  • AI model parameters usually include structural parameters and weight parameters (referred to as weights).
  • Structural parameters are part of the AI model hyperparameters (hyper parameters) and are used to describe the structure of the AI model, such as the number of layers of CNN, the type of operator in each layer, the size and number of convolution kernels, etc.
  • Weight is the data used in the AI model to process input data, for example, each element in the convolution kernel, the weight coefficient and bias in the fully connected operator, etc.
  • Execution environment refers to the conditions for the device to execute the AI model, including hardware and software. Different hardware (such as memory reading, computing power, etc.) designs may have different AI model execution capabilities; software may include AI model optimization, compilation, and execution environments, which can also affect the execution performance of the AI model. It can be considered that depending on the execution environment, the execution capabilities of the AI model may be different, and the execution performance may also be different.
  • Executing AI model in this application includes but is not limited to training and/or inference.
  • AI model training is the process of training an AI model in a data-driven manner by learning the input/output relationship and obtaining the trained AI model for reasoning, or in other words, learning and obtaining it through data samples (known input data and output data)
  • AI model inference is the process of using a trained AI model to produce a set of outputs based on a set of inputs, or the process of processing input data through a trained AI model to achieve a specific function, such as fingerprint unlocking, image Recognition, semantic recognition, etc., or channel state information (CSI) encoding and decoding, terminal positioning, etc. in 5G communications.
  • CSI channel state information
  • Execution performance Indicates the performance of executing the AI model or the resources consumed by executing the AI model.
  • the resources include at least one of the following: time or energy.
  • the execution performance may be the duration and/or energy consumption of executing the AI model.
  • the execution performance of a device executing an AI model and the resources consumed by the device executing an AI model are equivalent descriptions.
  • for indicating may include direct indicating and indirect indicating.
  • indication information When describing certain indication information as indicating A, it may include that the indication information directly indicates A or indirectly indicates A, but it does not mean that the indication information must include A.
  • the information indicated by the indication information is called information to be indicated, and during the specific implementation process, there are many ways to indicate the information to be indicated.
  • the information to be instructed can be sent together as a whole, or can be divided into multiple sub-information and sent separately, and the sending period and/or sending timing of these sub-information can be the same or different.
  • the specific sending method is not limited in this application.
  • the “save” involved in the embodiments of this application may refer to saving in one or more memories.
  • the one or more memories may be provided separately, or may be integrated in an encoder or decoder, a processor, or a communication device.
  • the one or more memories may also be partially provided separately and partially integrated in the decoder, processor, or communication device.
  • the type of memory can be any form of storage medium, and this application is not limited thereto.
  • the sending end device transfers the AI model to the receiving end device.
  • the receiving device executes the AI model, the receiving device is generally required to complete the execution of the AI model within limited conditions.
  • the AI model can be transferred between communication devices in the following manner, and the receiving device can complete the execution of the AI model within limited conditions:
  • the sending device transmits the AI model to the receiving device.
  • the receiving device receives and executes the AI model, it can determine whether the execution of the AI model can be completed under limited conditions. If it cannot be completed under the limited conditions, The execution of the AI model was completed under the conditions, indicating that the transmission failed, causing a waste of transmission resources and causing additional calculation and power consumption to the receiving device.
  • the sending device transmits AI model #1 to the receiving device.
  • the receiving device executes the AI model #1.
  • the receiving device can complete the execution of the AI model within a limited time, based on the computing capability of the receiving device C UE (for example, floating-point operations per second second, FLOPS) as the unit) and the AI model's computational complexity C M (for example, floating-point operation (FLOP) as the unit) to evaluate the matching situation. If the following formula is met, it means that the receiving device can complete the AI model execution within the required time:
  • t th is a preconfigured value
  • the AI model is highly implementation-dependent.
  • AI models with the same purpose may have very different internal model structures, and different structures may be affected by hardware utilization, Different data scheduling delays lead to vastly different computing efficiencies; software optimization and compilation are required between the AI model and hardware computing resources. Different software optimization and compilation methods also bring different computing efficiencies; different AI computing hardware implementation orientations are different. It may also bring about different AI model computing efficiency. These factors may lead to a hundreds-fold deviation in computational efficiency, which is difficult to compensate for by simply configuring margins.
  • the communication method provided by the embodiment of the present application can be applied to a system that communicates through multi-antenna technology, such as the communication system 100 shown in FIG. 1 .
  • the communication system may include at least one network device and at least one terminal device. Network equipment and terminal equipment can communicate through multi-antenna technology.
  • the embodiments shown below do not specifically limit the specific structure of the execution body of the method provided by the embodiment of the present application, as long as the program that records the code of the method provided by the embodiment of the present application can be run according to the present application. It is sufficient to communicate using the method provided in the application embodiment.
  • the execution subject of the method provided by the embodiment of the present application may be the first device and the second device, or the functional module in the first device and the second device that can call the program and execute the program.
  • FIG. 2 is a schematic flow chart of a communication method provided by this application. Includes the following steps:
  • the first device obtains the first function of the second device.
  • the above-mentioned first device may be the device #2 mentioned above, and the second device may be the device #1 mentioned above.
  • the first device may be a network device, and the second device may be a terminal device, or, for another example, the first device may be a core network device, and the second device may be a terminal device.
  • the first device can be understood as a device for sending the AI model and can be called a sending device; the second device can be understood as a device for receiving the AI model and can be called a receiving device.
  • the above-mentioned first function is used to evaluate the resources consumed by the second device to execute the AI model, or in other words, the first function is used to evaluate the execution performance of the AI model in the execution environment of the second device.
  • the function may also be called an evaluator, an evaluation function, an evaluation table, or an evaluation model, etc.
  • the name of the function used to evaluate the resources consumed by a certain device to execute the AI model is not specified. It is limited that functions that can be used to evaluate the resources consumed by the device to execute the AI model are within the protection scope of this application.
  • the resources consumed by the second device for executing the AI model may be: the time consumed by the second device for executing the AI model.
  • the resources consumed by the second device for executing the AI model may be: energy consumed by the second device for executing the AI model.
  • the above-mentioned resources consumed by the second device to execute the AI model are time or energy, which are only examples and do not constitute any limitation on the scope of protection of this application.
  • This application does not limit the specific form of the resources consumed by the second device to execute the AI model. It can also be other resources besides time or energy, such as the memory consumed or the impact on the execution of other applications on the second device.
  • the first function in this embodiment includes at least one of the following:
  • the second AI model generated by training based on the second information and the third information; or,
  • a mapping function formed by fitting according to the second information and the third information or,
  • the input of the first function is related to the second information
  • the output of the first function is related to the third information
  • the second information includes at least one of the following information: Information, information of the AI module or information of the third AI model;
  • the third information includes at least one of the following information: resources consumed by a third device for executing the AI operator, resources consumed by a third device for executing the AI module, resources consumed by a third device for executing the third AI
  • resources consumed by the model, the third device is the second device or the third device and the second device have the same first capability, the first capability is the same as the AI operator, the Related to the execution of the AI module or the third AI model.
  • the above-mentioned first capability can be understood as the execution environment of the second device, or can be understood as the software and hardware capabilities of the second device for executing AI operators, AI modules or third AI models.
  • it may include but not Limited to: the ability to execute hardware (such as memory reading, computing power, etc.), optimization and compilation capabilities, etc.; or the first ability can be understood as the second and third devices that may affect AI operators, AI modules, or third devices.
  • the first function obtained by the first device may be used to evaluate the execution performance of the AI model in the execution environment of the second device, or may be used to evaluate the execution of multiple devices.
  • the execution performance of the AI model in the environment (for example, the multiple devices belong to the same category of devices) is not limited in this embodiment.
  • the third device may be a second device, or a device having the same first capability (such as software and hardware capabilities, execution environment, or execution capabilities) as the second device, where the first capability may be provided by simulation software, such as
  • the third device is a device installed with simulation software.
  • the simulation software can simulate the same or similar results as the second device when executing the AI operator, AI module or third AI model.
  • the specific details of the third device are: The form is not limited.
  • the above-mentioned second information and third information are related information, that is to say, when the second information is the information of the AI operator, the third information is the consumption of the third device to execute the AI operator. resources; similarly, when the second information is the information of the AI module, the third information is the resources consumed by the third device to execute the AI module; when the second information is the information of the third AI model In this case, the third information is the resources consumed by the third device to execute the third AI model; in the case where the second information is the information of the AI operator and the AI module, the third information is the resources consumed by the third device to execute the AI.
  • the resources consumed by the operator and the resources consumed by the third device for executing the AI module, etc. will not be described again here.
  • the information of the AI module involved in this embodiment includes at least one of the following:
  • the type information of the AI module can also be understood as the front and rear substructure information of the AI module or the front and rear layer information of the AI module.
  • the above parameters of the AI module may include structural parameters of the AI module and/or weight parameters of the AI module. Relatively speaking, the structural parameters of the AI module are required.
  • the information of the AI operator involved in this embodiment includes at least one of the following:
  • the type information of the AI operator the parameters of the AI operator, the information of the preceding and following operators of the AI operator, or the information of the preceding and following modules of the AI operator.
  • the information of the AI operator can also be understood as the information of the front and rear substructures of the AI operator or the information of the front and rear layers of the AI operator.
  • the above parameters of the AI operator may include the structural parameters of the AI operator and/or the weight parameters of the AI operator. Relatively speaking, the structural parameters of the AI operator are required.
  • the information of the third AI model involved in this embodiment includes at least one of the following:
  • Parameters of the overall structure of the third AI model or parameters of the substructure of the third AI model can be understood as the remaining part of the overall structure of the third AI model after deleting some AI operators or some AI modules.
  • the first function is the second AI model. That is to say, in this implementation manner, the first device can evaluate the execution performance of a certain AI model in the execution environment of the second device based on the second AI model.
  • the second AI model may be based on a traditional machine learning algorithm or a deep learning algorithm, or the like.
  • the input information of the second AI model is the information of the first AI model
  • the output information of the second AI model is the execution performance of the first AI model executed by the second device.
  • the first function is a mapping function. That is to say, in this implementation manner, the first device can evaluate the execution performance of a certain AI model in the execution environment of the second device according to the mapping function.
  • the mapping function may be a linear function, a polynomial function, a nonlinear function, etc.
  • the input information of the mapping function is the information of the first AI model
  • the output information of the mapping function is the execution performance of the first AI model executed by the second device.
  • the first function is a mapping table. That is to say, in this implementation, the first device can evaluate the execution performance of a certain AI model in the execution environment of the second device according to the mapping table.
  • the mapping table includes a correspondence between the information of the first AI model and the execution performance of the second device executing the first AI model.
  • the first device can obtain multiple functions respectively corresponding to multiple devices.
  • the first device obtains function #1 and function #2.
  • function #1 is used to evaluate the resources consumed by executing the AI model in the execution environment of device #1
  • function #2 is used to evaluate the resources consumed by executing the AI model in the execution environment of device #2.
  • This application also provides a communication method.
  • the first device obtains multiple functions corresponding to multiple devices, the first device can perform task allocation based on the multiple functions. This embodiment will not be described in detail. The process of assigning tasks to the first device will be introduced in detail in this article with reference to Figure 5.
  • the following description takes the first device obtaining the first function corresponding to the second device as an example.
  • the process for the first device to obtain the functions corresponding to other devices is similar to the process for the first device to obtain the first function corresponding to the second device, and will not be described again in this application.
  • what the first device obtains may be the identification of the first function (such as ID, number, etc.), and the corresponding relationship between the identification of the first function and the first function may be agreed in advance or through other means.
  • the first device can determine the first function based on the correspondence between the identifier of the first function and the first function.
  • the first device obtaining the first function may be the first device receiving the first function.
  • the first device receiving the first function may be the first device receiving the first function from the second device, or the first device receiving the first function from other devices related to the second device.
  • other devices related to the second device can communicate with the first device and can obtain the first function.
  • other devices related to the second device can communicate with the first device and the third device respectively.
  • the first device may obtain the first function by receiving first instruction information and obtaining the first function according to the first instruction information, wherein the first instruction information includes an instruction to obtain the first function. Information about the mode of the first function, and/or the identification of the first function.
  • the first device receiving the first indication information may be the first device receiving the first indication information from the second device, or the first device receiving the first indication information from other devices related to the second device. Instructions.
  • Implementation #1 The first device receives the first function from the second device.
  • the above-mentioned step S310 is: the first device receives the first function from the second device, or the second device sends the first function to the first device.
  • the second device needs to obtain the first function.
  • the first function is set in the second device when the second device is produced.
  • the first function is obtained by the second device from other devices.
  • the first function is generated and set on another device, and the second device knows how to obtain the first function.
  • the second device receives first instruction information indicating how to obtain the first function, and the second device obtains the first function according to the first instruction information.
  • the first instruction information may include but is not limited to the following information: the identification of the first function, the device or website address where the first function is placed, the communication protocol for obtaining the first function, the format of the first function, or the use of the first function. methods etc.
  • the first function is set on another device, and the second device obtains the identifier of the first function.
  • the second device receives first indication information indicating the identity of the first function, and the second device obtains the first function according to the first indication information.
  • the first instruction information includes but is not limited to the following information: identification information such as ID or number of the first function.
  • the first function is generated by the second device.
  • the generation process of the first function will be described in detail below in conjunction with Figure 3 and will not be described in detail here.
  • the second device after the second device obtains the first function, it can send the first function to the first device.
  • the specific sending method is not limited in this embodiment, and it can be carried in existing signaling. , or the first function can be sent through newly added signaling.
  • Implementation manner #2 The first device receives first indication information from the second device, where the first indication information includes information indicating a method of obtaining the first function and/or an identification of the first function.
  • the above-mentioned step S310 is: the first device receives the first instruction information from the second device, and obtains the first function according to the first instruction information.
  • the second device needs to obtain the first indication information. For example, after the first function is generated, it is set on another device, and information indicating a way to obtain the first function and/or an identification of the first function is sent to the second device.
  • the second device may send the first indication information to the first device.
  • the specific sending method is not limited in this embodiment, and may be carried in the existing information.
  • the first indication information may also be sent through newly added signaling.
  • the first device can obtain the first function according to the first indication information.
  • the first device obtains the first function according to the first instruction information: the first instruction information is information indicating a method of obtaining the first function, the first device determines the method of obtaining the first function, and Obtain the first function according to the acquisition method.
  • the information indicating the method of acquiring the first function may include but is not limited to: the identification of the first function, the indication of the device or website where the first function is placed, and the communication of acquiring the first function. Information such as protocol, format and usage of the first function.
  • the first device may obtain the first function from the device or website where the first AI model is placed.
  • the first device obtains the first function according to the first instruction information: the first instruction information is an identifier of the first function, and the first device obtains the first function from a device storing the first function according to the identifier of the first function. Get the first function.
  • the management device includes multiple functions, wherein the identifiers of the multiple functions are #1, #2 and #3 respectively.
  • the first device learns that the identifier of the first function is #3, then the first device can assign #3 Report to the management device, and the management device sends the function identified as #3 to the first device.
  • Implementation method #3 The first device downloads the first function from other devices (eg, on the Internet).
  • the relevant manufacturer of the second device generates the first function and sets it on the Internet for downloading.
  • the way in which the relevant manufacturer of the second device generates the first function will be described in detail below in conjunction with Figure 3 and will not be described in detail here.
  • the first device downloads the first function from the Internet.
  • the first device can download the function #1 from the Internet.
  • the relevant manufacturer of the first device downloads multiple functions corresponding to multiple devices from the Internet, and places the identifiers of the multiple functions in the first device.
  • the relevant manufacturer of the first device downloaded function #1 corresponding to device #1, function #2 corresponding to device #2, and function #3 corresponding to device #3 from the Internet, where the identifier of function #1 is "# 1", the identifier of function #2 is "#2", and the identifier of function #3 is "#3".
  • the relevant manufacturer of the first device places "#1", “#2" and "#3" in the first device. If the first device needs to determine the function identified as "#1", the first device obtains the information from the Internet. Download this function #1.
  • the relevant manufacturer of the first device downloads multiple functions corresponding to multiple devices from the Internet, places the identifiers of the multiple functions on other devices, and notifies the first device to obtain the functions. Way.
  • Implementation method #4 The first device obtains the first function indirectly.
  • the relevant manufacturer of the second device generates the first function, and sets it on the Internet for downloading or sending it to the relevant manufacturer of the first device for use.
  • the relevant manufacturer or related device of the first device downloads the first function from the Internet or receives the first function, and has the ability to use the first function, which is equivalent to the first device indirectly acquiring the first function.
  • Implementation Mode #1 to Implementation Mode #4 briefly introduce the way in which the first device directly or indirectly obtains the first function of the second device in this embodiment, and do not constitute any limitation on the protection scope of this application. Others The method of obtaining the first function of the second device is also within the protection scope of this application. For example, in a predefined method, the first device locally configures functions corresponding to different devices. No more examples will be given here.
  • the method flow shown in Figure 2 also includes:
  • the first device determines the first resources consumed by the second device for executing the first AI model based on the first function and the information of the first AI model.
  • the first AI model is any AI model to be executed by the second device.
  • the first resources consumed by executing the first AI model in the execution environment of the second device can be understood as: executing in the execution environment of the second device. Time information, energy information or other information of the first AI model, etc.
  • the time it takes to execute the first AI model in the execution environment of the second device refers to the time it takes to execute the first AI model in the execution environment of the second device; executing the first AI model in the execution environment of the second device
  • the energy of the model refers to the energy consumed by executing the first AI model in the execution environment of the second device.
  • the information of the first AI model includes at least one of the following: information of the AI operators constituting the first AI model, information of the AI modules constituting the first AI model, parameters of the overall structure of the first AI model, or substructure of the first AI model. parameters.
  • the first device combines the obtained first function and at least one AI model to be delivered on the first device to respectively determine the resources consumed by the execution of the at least one AI model to be delivered on the second device.
  • the first device determines the first resources consumed by the second device to execute the first AI model according to the first function and the first AI model information.
  • the first device may determine the first resources consumed by the second device according to the first function and the first AI model.
  • the information of the AI model evaluates the first resources consumed by the second device for executing the first AI model. That is to say, in this implementation, the first device executes the evaluation process.
  • the first device determines the first resources consumed by the second device to execute the first AI model based on the information of the first function and the first AI model, which may be: the first device uses the first function or The identification of the first function is sent to other devices. Assuming that the other devices know the information of the first AI model (for example, the other devices are related devices of the first device), the other devices execute the evaluation process, and then send the evaluation results to First device.
  • the first device may send the first AI model that needs to be evaluated or the identification of the first AI model to the other device.
  • the first device determines the first resources consumed by the second device to execute the first AI model according to the first function, which may be: the first AI model or the first AI that the first device will need to evaluate.
  • the identification of the model is sent to other devices. It is assumed that the other devices know the first function, and the other devices execute the evaluation process, and then send the evaluation results to the first device.
  • the first device may send the first function and/or the first instruction information to the other device, and the other device obtains the first function based on the first instruction information. a function.
  • the above-mentioned other device execution evaluation process may be completed before the first device needs to determine the first resources consumed by the second device to execute the first AI model, which is equivalent to the first device passing the first function and/or the first
  • the identity of the AI model queries other devices for evaluation results and receives evaluation results from the other devices.
  • the relevant manufacturer or related device of the first device downloads the first function from the Internet or receives the first function, it obtains the evaluation result of the first AI model based on the information of the first function and the first AI model, and Put that assessment on other devices.
  • the first device needs to determine the first resources consumed by the second device to execute the first AI model, the first device sends the first function and/or the identification of the first AI model to the other device, and the other device is based on the first The function and/or the identification of the first AI model sends the evaluation result corresponding to the first function to the first device.
  • the evaluation result queried by the first device from other devices through the identification of the first function includes at least one of the following possibilities: whether the first resource consumed by the first AI model and the first resource consumed by the first AI model satisfy The first condition, or whether the first information should be sent to the second device, etc.
  • the evaluation results will be described in detail below and will not be repeated here.
  • the first device in the process of evaluating the first resources consumed by the second device to execute the first AI model, the first device considers the second
  • other parameters can also be considered, including but not limited to:
  • the first device receives at least one of the following information from the second device: processing resource indication information or second indication information.
  • the first device determines the first resources consumed by the second device to execute the first AI model based on the first function, including: the first device determines the first resource based on the first function and at least one of the following information: The first resource consumed by the second device for executing the first AI model: the resource indication information or the second indication information.
  • the processing resource indication information is used to indicate the proportion of processing resources that the second device can use to execute the first AI model
  • the second indication information is used to indicate adjusting the processing resources executed by the second device. The value of the first resource consumed by the first AI model.
  • the processing resource is related to a first capability of the second device, and the first capability is related to execution of the AI operator, the AI module, or the third AI model.
  • the processing resource related to the first capability of the second device includes but is not limited to: the processing resource is a manifestation of the first capability.
  • the resource indication information is sent by the second device to the first device and is used to indicate the proportion of resources currently available to the second device for executing the first AI model. If only 50% of computing resources (proportion of available resources) are available for AI model execution, the execution time may need to be doubled.
  • the resource indication information is sent by the second device to the first device, and is used to indicate the proportion of resources currently occupied by the second device for executing tasks.
  • the proportion of resources currently occupied by the second device for executing tasks is 30%
  • the first device determines that the proportion of resources currently available for the second device to execute the first AI model is 70%.
  • processing resource indication information can also be used to indicate the processing resources that the second device can use to execute the first AI model, which is equivalent to indicating the processing resources that can be used to execute the first AI model. Absolute value.
  • the above-mentioned second instruction information may indicate a method of adjusting the value of the first resource consumed by executing the first AI model, so as to adjust the value of the first resource consumed by the second device to execute the first AI model.
  • the purpose of obtaining the value of the first resource consumed indicates that the evaluation result is doubled, indicating that the evaluated value of the first resource consumed by the second device for executing the first AI model needs to be doubled.
  • the first device may adjust the said processing resource according to the processing resources that the second device can use to execute the first AI model.
  • the value of the first resource consumed by the second device for executing the first AI model may be adjusted.
  • the execution time may need to be doubled (information on the impact of the proportion of available resources on execution performance).
  • the first device determines whether to send the first information to the second device based on the above-mentioned evaluation result or the adjusted evaluation result.
  • the method flow shown in Figure 2 also includes:
  • S330 The first device determines whether to send the first information to the second device according to the first resource.
  • the first information includes at least one of the following: the first AI model or the acquisition method of the first AI model.
  • the above-mentioned first information including the first AI model can be understood as the first information including information of the first AI model, for example, including but not limited to structural information of the first AI model, weight information of the first AI model, etc.
  • the above-mentioned first information includes the acquisition method of the first AI model. It can be understood that the first information includes information indicating the acquisition method. For example, it may include but is not limited to: the identification of the first AI model and the device on which the first AI model is placed. Or website instructions, information such as the communication protocol for obtaining the first AI model, the format and usage of the first AI model, etc.
  • the first device when the first resource satisfies a first condition, the first device sends the first information to the second device, where the first condition is the same as a preset Threshold related.
  • the preset threshold may also be obtained by the first device from the second device or other devices related to the second device.
  • the first resource includes at least one of the following: time or energy.
  • the preset threshold includes a first preset threshold and a second preset threshold.
  • the first preset threshold is related to the time
  • the second preset threshold is related to the time. Let the threshold be related to the energy.
  • the first condition when the first resource is time, the first condition may be that the time consumed by the second device to execute the first AI model is less than or equal to the first threshold; in addition, when the first resource is energy , the above-mentioned first condition may be that the energy consumed by the second device to execute the first AI model is less than or equal to the second threshold.
  • the evaluation result is that the first resource meets the first condition (or the first AI model matches the second device), and the first device determines Send the first information to the second device.
  • the first device may also obtain evaluation results from other devices.
  • the evaluation result may be the first resource consumed by the second device executing the first AI model, or whether the first resource consumed by the second device executing the first AI model The first condition is met or whether the first information should be sent to the second device.
  • the first device determines that it needs to send the AI model based on the evaluation results, it can send the AI model, for example: AI model structure description and AI model weight, or only include the AI model weight and the AI model structure is determined by other methods; it can also send the AI model Information on the acquisition method of the model.
  • the acquisition method information may include but is not limited to: the identification of the AI model, the device or URL instructions for placing the AI model, the communication protocol for acquiring the AI model, the format or usage of the AI model, etc.
  • the first device may send the time to enable the first AI model to the second device.
  • the second device obtains the first AI model and deploys and applies the first AI model. If the second device receives the acquisition method information of the first AI model, it acquires the first AI model based on the information and deploys and applies the first AI model. In addition, if the second device receives the time to enable the first AI model (for example, the first information includes the time to enable the first AI model), then the first AI model is enabled at that time.
  • the second device can feed back the result of executing the first AI model.
  • the first device when the first resource does not meet the first condition, the first device does not send the first information to the second device, or the first device sends the first information to the second device.
  • the second device sends information indicating not to start the AI mode or informing that there is no matching AI model, or the first device does not send information to the second device.
  • the evaluation result is an indication that the first resource does not meet the first condition (or that no AI model matches the second device), and the first device sends information to the second device indicating not to start the AI mode or informing that there is no matching AI model. .
  • the first device may adjust the execution configuration of the first AI model so that the first AI model after the execution configuration is adjusted executes The consumed first resource may satisfy the first condition, and then the first device sends the first information and performs the configuration adjustment instruction to the second device.
  • the above-mentioned adjustment of the execution configuration of the first AI model includes but is not limited to: reducing the number of samples when the first AI model is executed, so that the first resources consumed by the execution of the first AI model after the number of samples are reduced can satisfy First condition. It is understandable that the adjustment of the execution configuration of the first AI model can also be completed by other devices and sent to the first device, which will not be described again here.
  • the first device can evaluate the resources consumed by the second device to execute the AI model according to the first function, and determine whether to apply to the second device according to the resources consumed by the second device to execute the first AI model.
  • the second device sends the first AI model
  • the first device does not send all the AI models, but before sending the AI model, it will evaluate the resources consumed by the second device to execute the AI model. If the second device executes the first If the resources consumed by an AI model do not meet certain requirements, the first AI model may not be sent to the second device, so as to send an appropriate AI model to the second device and avoid wasting resources caused by sending an inappropriate AI model.
  • FIG. 2 briefly introduces the generation of the first function.
  • the generation process of the first function is introduced in detail below in conjunction with FIG. 3 .
  • FIG. 3 is a schematic diagram of the first function generation process provided by the embodiment of the present application, which includes the following steps:
  • the second information can be understood as information related to the input of the first function
  • the third information can be understood as information related to the output of the first function.
  • the second information and the third information required to generate the first function are information known to the third device (or generation device).
  • the above-mentioned second information is the information of multiple known AI operators
  • the third information is obtained by executing the multiple known AI operators based on the execution environment of the third device. Variety of Consumed Resources #1.
  • the above-mentioned second information is the information of multiple known AI modules
  • the third information is the execution of the multiple known AI modules based on the execution environment of the third device.
  • the above-mentioned second information is the information of multiple known AI models
  • the third information is the execution of the multiple known AI models based on the execution environment of the third device, and the multiple obtained Resources consumed #3.
  • the above-mentioned second information includes information about multiple known AI operators and information about multiple known AI modules
  • the third information includes: execution based on the execution environment of the third device Various consumed resources #1 obtained by the various known AI operators, and various consumed resources #2 obtained by executing the various known AI modules based on the execution environment of the third device.
  • the above-mentioned second information includes information about multiple known AI operators and multiple known AI models.
  • the third information includes: executing the multiple known AI operators based on the execution environment of the third device, obtaining multiple consumed resources #1, and executing the multiple known AI operators based on the execution environment of the third device.
  • the second information required to generate the first function may be the information of the above-mentioned multiple known AI operators, the information of the multiple known AI modules, and the information of the multiple known AI models.
  • the third information is the consumed resource corresponding to the corresponding second information.
  • the execution environment of the third device is the same as or similar to the execution environment of the second device, that is to say, the first function generated in the third device can be used to evaluate the resources consumed by the second device to execute the AI model.
  • the third information required to generate the first function may also include the confidence of the output result.
  • the above-mentioned second information and third information required to generate the first function constitute a data set, and then the first function is generated through the data set.
  • the generation process here can be training to generate an AI model and fitting to form a mapping. Function or statistic to obtain mapping table.
  • the method flow shown in Figure 3 also includes:
  • S420 Generate a first function based on the second information and the third information.
  • the generation process of the first function can be divided into two implementation methods:
  • One implementation method is that the above-mentioned second information is an AI module or an AI operator.
  • the second information is an AI module or AI operator
  • the second information when evaluating the expected execution performance of a complete AI model, it is necessary to decompose the AI model into a series of AI modules and/or AI operators, and execute the series of AI respectively.
  • Modules and/or AI operators the execution performance of all AI modules and/or AI operators is obtained, and the overall execution performance of the AI model is obtained based on the execution performance of all AI modules and/or AI operators.
  • the execution performance of all AI modules and/or AI operators can be summarized to obtain the overall execution performance of the AI model.
  • the second information includes but is not limited to the following information:
  • Type of AI module or AI operator batch size, parameters of AI module or AI operator, front and back layer information or other information.
  • AI modules or AI operator types include convolution operators, fully connected operators, LSTM modules, Transformer modules, ResBlock modules, etc.
  • this type of data is usually encoded in one-hot encoding. Coding, the specific definition of AI modules or AI operators and their coding can be determined through negotiation.
  • Batch size refers to the number of samples input into the AI model in a batch (the AI model to be sent for application). When executing an AI model (training or inference), batch size will affect the amount of calculation required to execute the AI module or AI operator, thereby affecting execution performance;
  • the parameters of the AI module or AI operator include parameters and/or configuration parameters that describe the specific internal structure of the AI module or AI operator.
  • its parameters may include but are not limited to input data dimensions and output data.
  • Dimension for convolution operators, its parameters may include but are not limited to convolution kernel size, number of input channels, number of output channels, stride length, whether to pad, whether to add bias, and whether to expand (dilation) etc.
  • Long Short Term Memory (LSTM) neural network may include but is not limited to whether it is one-way or two-way.
  • the information of at least one layer of AI modules or AI operators before and after the current AI module or AI operator which may include types and parameters.
  • the previous and subsequent AI modules or AI operators may have some overlap with the current AI module or operator.
  • the data dimension output by the previous layer may be equal to the input data dimension of the current layer.
  • the repeated information does not need to be input repeatedly;
  • Other information may include but is not limited to: execution type (training or inference), parallel information (whether there is Other AI models or AI operators are executed in parallel with the current AI model or AI operator, and their information), numerical accuracy information, quantification information, pruning information (such as whether to prune, pruning ratio, etc.), operator or module fusion Information etc.
  • the third information is the execution performance of the AI module or AI operator executed in the execution environment of the third device, where the execution may be training or inference, and the execution performance may be execution time and/or energy consumption. , that is, execution time and/or energy consumption.
  • the method of generating data sets is to collect all possible AI modules that have been disclosed so far. or AI operator, or all available AI modules or AI operators are agreed in advance.
  • the information of a configured AI module or AI operator is used as the second information, and in the first
  • the AI module or AI operator is executed in the execution environment or simulation execution environment of the third device, and the execution performance is obtained as the third information.
  • each set of second information and third information constitutes a sample of the data set.
  • changing the configuration (changing the content of the second information) and obtaining another execution performance can constitute another sample of the data set.
  • each AI module or AI operator can be assigned a type code, thereby generating a first function applicable to all AI modules or AI operators; it can also be used for each AI
  • the module or AI operator generates a function.
  • the function can omit the type encoding input, but may need a function number corresponding to the specific AI module or AI operator.
  • the functions of all AI modules or AI operators constitute the first function. , when executing the first function, it is necessary to find the corresponding function for the specific AI module or AI operator and execute it; it can also be a mixture of these two methods.
  • Another implementation is that the above-mentioned second information is parameters of the overall structure of the AI model or parameters of the substructure of the AI model.
  • the overall structure of the AI model or the substructure of the AI model is composed of multiple AI modules and/or AI operators.
  • the complete AI model can be executed in the execution environment of the third device to obtain the overall execution performance of the AI model as the third information.
  • Third information a complete AI model structure can also be decomposed into multiple operators, modules, and substructures, and then executed in the execution environment of the third device respectively, and the execution performance of each operator, module, and substructure can be obtained and summarized. The overall execution performance of the AI model is used as the third information.
  • the first function when the first function is an AI model, for example, it can be based on RNN, long short-term memory (LSTM), and Gate Recurrent Unit (GRU) in the AI algorithm. Or algorithms such as Transformer. Expand the complete AI model into a series of AI modules or AI operators, and input the first function as a sequence, similar to the way sentences or sequences are processed in natural language processing.
  • LSTM long short-term memory
  • GRU Gate Recurrent Unit
  • the second information can be pre-processed, and the third information can also be post-processed.
  • pre-processing may include but is not limited to: splitting, fusion, normalization, translation, whitening, etc.
  • post-processing may include but is not limited to: aggregation/overlay, quantization, encoding, etc.
  • possible forms include but are not limited to: based on traditional machine learning algorithms or deep learning algorithms; when the first function is a mapping function, possible forms include but are not limited to: linear functions, Polynomial function, some non-linear function, etc.; when the first function is a mapping table, possible forms include but are not limited to: all data sets are listed in a table.
  • FIG. 4 is a schematic flow chart of another communication method provided by this application, including the following steps:
  • S510 The first device obtains the first function and the second function.
  • the first function is used to evaluate the resources consumed by the second device for executing the AI model; the second function is used for evaluating the resources consumed by the fourth device for executing the AI model.
  • the process of the first device obtaining the first function may refer to the description in step S310 in the embodiment shown in FIG. 2, which will not be described again.
  • the process of the first device obtaining the second function is the same as the first device obtaining the second function. The process of the first function is similar and will not be repeated here.
  • the generation process of the first function and the second function can refer to the description in Figure 3 and will not be described again here.
  • the first device after the first device obtains the first function and the second function, it can allocate tasks based on the first function, the second function and the total tasks to be allocated.
  • the method flow shown in Figure 4 also includes:
  • the first device determines the first task to be executed by the second device and the second task to be executed by the fourth device based on the first function, the second function and the total tasks to be allocated.
  • the total tasks to be allocated include the first task and the second task.
  • the first device after the first device obtains the first function and the second function, it can determine the first task to be executed by the second device according to the first function, the second function and the total tasks to be allocated. task and a second task performed by the fourth device. That is to say, the task allocation process is executed by the first device.
  • the first device determines the first task to be executed by the second device and the second task to be executed by the fourth device based on the first function, the second function and the total tasks to be allocated, which may be: first The device sends the first function and the second function, or the identifier of the first function and the identifier of the second function to other devices, and the other devices execute the allocation process and then send the allocation result to the first device.
  • the first device may send the total task to be assigned or the identification of the total task to the other device.
  • the first device after the first device obtains the functions corresponding to multiple devices, it can combine the obtained functions and the total tasks to be allocated to evaluate the execution performance of the total tasks to be allocated in the multiple devices.
  • execution may include AI model inference or training.
  • the first task and the second task satisfy a first rule
  • the first rule includes at least one of the following:
  • the first task and the second task are executed and completed at the same time; or,
  • the first task and the second task are executed and completed according to a predefined time sequence; or,
  • the energy required to complete the first task is equal to the energy required to complete the second task; or,
  • the ratio between the energy required to complete the first task and the energy required to complete the second task meets the preset ratio requirement; or,
  • the first task and the second task include but are not limited to any of the following: AI model training with different numbers of samples, AI model inference with different numbers of samples, training of AI models at different stages, or AI model training. Different stages of reasoning.
  • the first device sends the first task and the second task to the second device and the fourth device according to the allocation result, the second device receives and executes the first task, and the fourth device receives and executes the second task.
  • the second device and the fourth device feed back execution results according to the instructions.
  • the embodiment shown in Figure 4 takes the first device to obtain two functions corresponding to two devices as an example. This does not constitute any limitation on the protection scope of the present application.
  • the first device can also obtain two functions.
  • the above devices correspond to functions respectively, and tasks are allocated based on the obtained functions.
  • the specific allocation targets and allocation process are shown in the process shown in Figure 4, which will not be described again here.
  • devices in the existing network architecture are mainly used as examples for illustrative description (such as the first device, the second device, etc.). It should be understood that the specific form of the device in this application The examples are not limiting. For example, devices that can implement the same functions in the future are applicable to the embodiments of this application.
  • the methods and operations implemented by the device can also be implemented by components of the device (such as chips or circuits).
  • the communication method provided by the embodiment of the present application is described in detail with reference to FIGS. 2 to 4 .
  • the above communication method is mainly introduced from the perspective of interaction between the first device and the second device. It can be understood that, in order to implement the above functions, the first device and the second device include corresponding hardware structures and/or software modules for performing each function.
  • Embodiments of the present application can divide the first device and the second device into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. middle.
  • the above integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods. The following is an example of dividing each functional module according to each function.
  • FIG. 5 is a schematic block diagram of the communication device 10 provided by the embodiment of the present application.
  • the device 10 includes a transceiver module 11 and a processing module 12 .
  • the transceiver module 11 can implement corresponding communication functions, and the processing module 12 is used to perform data processing, or in other words, the transceiver module 11 is used to perform operations related to receiving and sending, and the processing module 12 is used to perform other operations besides receiving and sending.
  • the transceiver module 11 may also be called a communication interface or communication unit.
  • the device 10 may also include a storage module 13, which may be used to store instructions and/or data, and the processing module 12 may read the instructions and/or data in the storage module, so that the device implements each of the foregoing. Actions of equipment in method embodiments.
  • the device 10 may correspond to the first device in the above method embodiment, or be a component (such as a chip) of the first device.
  • the device 10 can implement steps or processes corresponding to those performed by the first device in the above method embodiment, wherein the transceiver module 11 can be used to perform operations related to the transceiver of the first device in the above method embodiment, and the processing module 12 can To perform operations related to the processing of the first device in the above method embodiment.
  • the transceiver module 11 is used to obtain a first function, the first function is used to evaluate the resources consumed by the second device to execute the artificial intelligence AI model; the processing module 12 is used to obtain the first function according to the first function.
  • a function determines the first resource consumed by the second device for executing the first AI model; the transceiver module 11 is used to determine whether to send the first information to the second device according to the first resource, the first information Including at least one of the following: the first AI model or the acquisition method of the first AI model.
  • the device 10 may correspond to the second device in the above method embodiment, or be a component (such as a chip) of the second device.
  • the device 10 can implement steps or processes corresponding to those performed by the second device in the above method embodiment, wherein the transceiver module 11 can be used to perform operations related to the transceiver of the second device in the above method embodiment, and the processing module 12 can be used To perform operations related to the processing of the second device in the above method embodiment.
  • the transceiver module 11 is used to obtain the first function and/or the first indication information, the first indication information is used to indicate the way to obtain the first function, or the first indication
  • the information is the identification of the first function, and the first function is used to evaluate the resources consumed by the second device to execute the artificial intelligence AI model; the transceiver module 11 is used to send the first function and the first function to the first device. /or the first indication information.
  • the device 10 here is embodied in the form of a functional module.
  • module may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor, or a group of processors) used to execute one or more software or firmware programs. processor, etc.) and memory, merged logic circuitry, and/or other suitable components to support the described functionality.
  • ASIC application specific integrated circuit
  • the device 10 can be specifically the mobility management network element in the above embodiments, and can be used to execute various processes and/or corresponding to the mobility management network element in the above method embodiments. or steps; alternatively, the apparatus 10 may be specifically a terminal device in the above embodiments, and may be used to execute various processes and/or steps corresponding to the terminal devices in the above method embodiments. To avoid duplication, they will not be described again here.
  • the device 10 of each of the above solutions has the function of realizing the corresponding steps performed by the equipment (such as the first equipment and the second equipment) in the above method.
  • This function can be implemented by hardware, or it can be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions; for example, the transceiver module can be replaced by a transceiver (for example, the sending unit in the transceiver module can be replaced by a transmitter, and the receiving unit in the transceiver module can be replaced by a receiver.
  • other units, such as processing modules, etc. can be replaced by processors to respectively perform the sending and receiving operations and related processing operations in each method embodiment.
  • transceiver module 11 may also be a transceiver circuit (for example, it may include a receiving circuit and a transmitting circuit), and the processing module may be a processing circuit.
  • FIG. 6 is a schematic diagram of another communication device 20 according to an embodiment of the present application.
  • the device 20 includes a processor 21, which is used to execute computer programs or instructions stored in the memory 22, or read data/signaling stored in the memory 22, to perform the methods in each of the above method embodiments.
  • processors 21 there are one or more processors 21 .
  • the device 20 further includes a memory 22, which is used to store computer programs or instructions and/or data.
  • the memory 22 may be integrated with the processor 21 or may be provided separately.
  • the device 20 also includes a transceiver 23, which is used for receiving and/or transmitting signals.
  • the processor 21 is used to control the transceiver 23 to receive and/or transmit signals.
  • the device 20 is used to implement the operations performed by the first device or the second device in each of the above method embodiments.
  • processors mentioned in the embodiments of this application may be a central processing unit (CPU), or other general-purpose processor, digital signal processor (DSP), application specific integrated circuit ( application specific integrated circuit (ASIC), ready-made field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA ready-made field programmable gate array
  • a general purpose processor can be a microprocessor or The processor may also be any conventional processor, etc.
  • non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase electrically programmable read-only memory (EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM). For example, RAM can be used as an external cache.
  • RAM includes the following forms: static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (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).
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component
  • the memory storage module
  • memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
  • FIG. 7 is a schematic diagram of a chip system 30 provided by an embodiment of the present application.
  • the chip system 30 (or can also be called a processing system) includes a logic circuit 31 and an input/output interface 32.
  • the logic circuit 31 may be a processing circuit in the chip system 30 .
  • the logic circuit 31 can be coupled to the memory unit and call instructions in the memory unit, so that the chip system 30 can implement the methods and functions of various embodiments of the present application.
  • the input/output interface 32 can be an input/output circuit in the chip system 30, which outputs information processed by the chip system 30, or inputs data or signaling information to be processed into the chip system 30 for processing.
  • the chip system 30 is used to implement the operations performed by the first device and the second device in each of the above method embodiments.
  • the logic circuit 31 is used to implement the processing-related operations performed by the first device and the second device in the above method embodiment
  • the input/output interface 32 is used to implement the processing-related operations performed by the first device and the second device in the above method embodiment. Send and/or receive related operations performed by the device.
  • Embodiments of the present application also provide a computer-readable storage medium on which computer instructions for implementing the methods executed by the first device and the second device in each of the above method embodiments are stored.
  • Embodiments of the present application also provide a computer program product that includes instructions that, when executed by a computer, implement the methods executed by the first device and the second device in each of the above method embodiments.
  • An embodiment of the present application also provides a communication system, including the aforementioned first device and second device.
  • the disclosed devices and methods can be implemented in other ways.
  • the device 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 coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer may be a personal computer, a server, or a network device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • 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 contains one or more available media integrated.
  • the available media may be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media (such as solid state disks (SSD)).
  • the aforementioned available media include but Not limited to: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory)

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供了一种通信方法和通信装置。该方法包括:第一设备获取用于评估第二设备执行人工智能AI模型所消耗资源的第一函数,并根据第一函数和第一AI模型的信息确定第二设备执行第一AI模型所消耗的第一资源。第一设备根据第一资源确定是否向第二设备发送第一AI模型或第一AI模型的获取方式。第一设备通过第一函数评估第二设备执行AI模型所消耗的资源,并根据第二设备执行第一AI模型所消耗的资源确定是否向第二设备发送第一AI模型。如果第二设备执行第一AI模型所消耗的资源不满足一定要求,则不向第二设备发送该第一AI模型;以便于向第二设备发送合适的AI模型,避免发送不合适的AI模型而造成资源浪费。

Description

一种通信方法及通信装置
本申请要求于2022年07月21日提交国家知识产权局、申请号为202210864312.1、发明名称为“一种AI模型使用场景的指示方法、终端设备、网络设备”和于2022年08月30日提交国家知识产权局、申请号为202211044983.X、发明名称为“一种通信方法及通信装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,具体涉及一种通信方法和通信装置。
背景技术
在无线通信系统中引入人工智能(artificial intelligence,AI)技术是近些年的研究热点。AI技术应用于无线通信系统时,存在通信设备间传递AI模型的场景,即发送端设备向接收端设备传递AI模型。进一步地,接收端设备需要在限定的条件下完成该AI模型的执行。限定的条件可能包括:一定时间内和/或一定能量下完成该AI模型的执行,AI模型的执行包括AI模型的训练和/或推理。因此如何实现通信设备间传递AI模型成为亟待解决的问题。
发明内容
本申请实施例提供一种通信方法,能够在避免资源浪费的前提下实现通信设备间传递AI模型。
第一方面,提供了一种通信方法。该方法可以由第一设备执行,也可以由第一设备的组成部件(例如芯片或者电路)执行,本申请对此不作限定。为了便于描述,下面以第一设备执行为例进行说明。
该通信方法包括:第一设备获取第一函数,该第一函数用于评估第二设备执行人工智能AI模型所消耗的资源;该第一设备根据该第一函数和第一AI模型的信息确定该第二设备执行第一AI模型所消耗的第一资源;该第一设备根据该第一资源确定是否向该第二设备发送第一信息,该第一信息包括以下至少一项:该第一AI模型或该第一AI模型的获取方式。
基于上述技术方案,第一设备可以通过根据第一函数评估第二设备执行AI模型所消耗的资源,并根据第二设备执行第一AI模型所消耗的资源确定是否向第二设备发送第一AI模型,可以理解为第一设备不是发送所有的AI模型,而是在发送AI模型之前,会评估第二设备执行该AI模型所消耗的资源,如果第二设备执行第一AI模型所消耗的资源不满足一定要求可以不向第二设备发送该第一AI模型,以便于向第二设备发送合适的AI模型,避免发送不合适的AI模型而造成资源浪费。
结合第一方面,在第一方面的某些实现方式中,所述第一函数包括以下至少一项:根据第二信息和第三信息训练生成的第二AI模型;或者,根据所述第二信息和所述第三信息拟合形成的映射函数;或者,根据所述第二信息和所述第三信息统计获得的映射表格,其中,所述第一函数的输入与所述第二信息相关,所述第一函数的输出与所述第三信息相关,所述第二信息包括以下信息中的至少一项:AI算子的信息、AI模块的信息或第三AI模型的信息;所述第三信息包括以下信息中的至少一项:第三设备执行所述AI算子所消耗的资源、第三设备执行所述AI模块所消耗的资源、第三设备执行所述第三AI模型所消耗的资源,所述第三设备为所述第二设备或所述第三设备与所述第二设备具有相同的第一能力,所述第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。
基于上述技术方案,本申请中涉及的第一函数的具体体现形式有多种可能,提高方案的灵活性。
结合第一方面,在第一方面的某些实现方式中,所述AI模块的信息包括以下至少一种:所述AI模块的类型信息、所述AI模块的参数、所述AI模块的前后模块信息、或所述AI模块的前后算子信息;所述AI算子的信息包括以下至少一种:所述AI算子的类型信息、所述AI算子的参数、所述AI算子的前后算子信息、或所述AI算子的前后模块信息;所述第三AI模型的信息包括以下至少一种:所述第三AI模型整体结构的参数或所述第三AI模型子结构的参数。
结合第一方面,在第一方面的某些实现方式中,所述第一AI模型的信息包括以下至少一种:构成所述第一AI模型的AI算子的信息、构成所述第一AI模型的AI模块的信息、所述第一AI模型整体结构的参数或所述第一AI模型子结构的参数。
结合第一方面,在第一方面的某些实现方式中,该第一设备获取第一函数,包括:该第一设备接收该第一函数;或者,该第一设备接收第一指示信息,并根据该第一指示信息获取该第一函数,其中,所述第一指示信息包括指示获取所述第一函数的方式的信息,和/或所述第一函数的标识。
基于上述技术方案,第一设备获取第一函数可以是直接接收到该第一函数,还可以是接收到第一指示信息,根据第一指示信息间接获取到第一函数,提供了不同的获取方式,增加方案的灵活性。
结合第一方面,在第一方面的某些实现方式中,在该第一资源满足第一条件的情况下,该第一设备向该第二设备发送该第一信息,其中,该第一条件与预设阈值相关。
基于上述技术方案,第一设备确定第二设备执行第一AI模型所消耗的第一资源满足第一条件时,向第二设备发送第一AI模型或第一AI模型的获取方式,也就是说保证传输的第一AI模型在第二设备中被执行时能够满足第一条件。
结合第一方面,在第一方面的某些实现方式中,该第一资源包括以下至少一项:时间或能量。
结合第一方面,在第一方面的某些实现方式中,在该第一资源包括时间和能量的情况下,该预设阈值包括第一预设阈值和第二预设阈值,该第一预设阈值与该时间相关,该第二预设阈值与该能量相关。
结合第一方面,在第一方面的某些实现方式中,在该第一设备根据该第一资源确定是否向该第二设备发送第一信息之前,该方法还包括:该第一设备接收来自该第二设备的以下信息中的至少一项:处理资源指示信息或第二指示信息,其中,该处理资源指示信息用于指示该第二设备能够用于执行该第一AI模型的处理资源的占比,该第二指示信息用于指示调整该第二设备执行该第一AI模型所消耗的该第一资源的取值。
结合第一方面,在第一方面的某些实现方式中,所述处理资源与所述第二设备的第一能力相关,所述第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。
结合第一方面,在第一方面的某些实现方式中,该第一设备根据该第一函数和第一AI模型的信息确定该第二设备执行该第一AI模型所消耗的第一资源,包括:该第一设备根据该第一函数和该第一AI模型的信息以及以下信息中的至少一项确定该第二设备执行该第一AI模型所消耗的第一资源:该资源指示信息或该第二指示信息。
基于上述技术方案,第一设备在评估第二设备执行第一AI模型所消耗的第一资源的过程中,除了考虑第一函数还可以考虑到第二设备能够用于执行该第一AI模型的处理资源的占比,以及还可以考虑调整第一AI模型所消耗的该第一资源的取值,增加了其他的考虑因素,提高评估的准确性。
结合第一方面,在第一方面的某些实现方式中,该方法还包括:第一设备获取第二函数,该第二函数用于评估第四设备执行AI模型的所消耗的资源;该第一设备根据该第二函数第四AI模型的信息确定该第四设备执行第四AI模型所消耗的第二资源;在该第一设备根据该第一资源确定向该第二设备发送第一信息,且根据该第二资源确定向该第四设备发送第四信息的情况下,该第一设备根据该第二函数和该第一函数,确定该第二设备执行的第一任务和该第四设备执行的第二任务,该第一任务和该第二任务满足第一规则。
或者说,
一种通信方法,包括:第一设备获取第一函数,该第一函数用于评估第二设备执行人工智能AI模型所消耗的资源;第一设备获取第二函数,该第二函数用于评估第四设备执行AI模型的所消耗的资源,该第一设备根据该第二函数和该第一函数,确定该第二设备执行的第一任务和该第四设备执行的第二任务,该第一任务和该第二任务满足第一规则。
基于上述技术方案,第一设备可以获取不同设备的函数,联合多个设备分别对应的多个函数确定任务的分配情况,第一设备可按照一定的约束条件完成AI执行任务的分配。
结合第一方面,在第一方面的某些实现方式中,所述第一规则包括以下至少一项:所述第一任务和所述第二任务同时执行完成;或者,所述第一任务和所述第二任务按照预定义时序执行完成;或者,所述第一任务执行完成的时刻和所述第二任务执行完成的时刻之间相差预设时间差;或者,所述第一 任务执行完成所需的能量和所述第二任务执行完成所需的能量相等;或者,所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量之间的比例满足预设比例要求;或者,所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量之间相差预设能量差。
第二方面,提供了一种通信方法。该方法可以由第二设备执行,也可以由第二设备的组成部件(例如芯片或者电路)执行,本申请对此不作限定。为了便于描述,下面以第二设备执行为例进行说明。
该通信方法包括:第二设备获取第一函数和/或第一指示信息,该第一指示信息包括指示获取所述第一函数的方式的信息,和/或所述第一函数的标识,该第一函数用于评估该第二设备执行人工智能AI模型所消耗的资源;该第二设备向第一设备发送该第一函数和/或该第一指示信息。
结合第二方面,在第二方面的某些实现方式中,所述第一函数包括以下至少一项:根据第二信息和第三信息训练生成的第二AI模型;或者,根据所述第二信息和所述第三信息拟合形成的映射函数;或者,根据所述第二信息和所述第三信息统计获得的映射表格,其中,所述第一函数的输入与所述第二信息相关,所述第一函数的输出与所述第三信息相关,所述第二信息包括以下信息中的至少一项:AI算子的信息、AI模块的信息或第三AI模型的信息;所述第三信息包括以下信息中的至少一项:第三设备执行所述AI算子所消耗的资源、第三设备执行所述AI模块所消耗的资源、第三设备执行所述第三AI模型所消耗的资源,所述第三设备为所述第二设备或所述第三设备与所述第二设备具有相同的第一能力,所述第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该第二设备接收来自该第一设备的第一信息,该第一信息包括以下至少一项:该第一AI模型或该第一AI模型的获取方式。
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该第二设备向该第一设备发送处理资源指示信息或第二指示信息,其中,该处理资源指示信息用于指示该第二设备能够用于执行该第一AI模型的处理资源的占比,该第二指示信息用于指示调整该第二设备执行该第一AI模型所消耗的该第一资源的取值。
结合第二方面,在第二方面的某些实现方式中,所述处理资源与所述第二设备的第一能力相关,所述第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。
以上第二方面及其可能的设计所示方法的技术效果可参照第一方面及其可能的设计中的技术效果。
第三方面,提供了一种第一设备。第一设备用于执行上述第一方面及其任意一种实施方式。具体地,第一设备包括处理器和存储器,该存储器用于存储计算机程序;该处理器用于从存储器中调用并运行该计算机程序,使得该第一设备执行上述第一方面及其任意一种实施方式。
第四方面,提供了一种第二设备。第二设备用于执行上述第二方面及其任意一种实施方式。具体地,第二设备包括处理器和存储器,该存储器用于存储计算机程序;该处理器用于从存储器中调用并运行该计算机程序,使得该第二设备执行上述第二方面及其任意一种实施方式。
第五方面,提供了一种通信装置。该通信装置用于执行上述第一方面及其任意一种实施方式或第二方面及其任意一种实施方式提供的方法。具体地,该通信装置可包括用于执行第一方面或第二方面及其任意一种实施方式提供的方法的单元和/或模块(如,处理单元,收发单元)。
在一种实现方式中,该通信装置为终端设备。当该通信装置为终端设备时,收发单元可以是收发器,或,输入/输出接口。处理单元可以是至少一个处理器。可选地,收发器可以为收发电路。可选地,输入/输出接口可以为输入/输出电路。
在另一种实现方式中,该通信装置可以为终端设备中的芯片、芯片系统或电路。此时,收发单元可以是该芯片、芯片系统或电路上的输入/输出接口、接口电路、输出电路、输入电路、管脚或相关电路等;处理单元可以是至少一个处理器、处理电路或逻辑电路等。
第六方面,本申请提供一种处理器,用于执行上述第一方面或第二方面提供的方法。
对于处理器所涉及的发送和获取/接收等操作,如果没有特殊说明,或者,如果未与其在相关描述中的实际作用或者内在逻辑相抵触,则可以理解为处理器输出和接收、输入等操作,也可以理解为由射频电路和天线所进行的发送和接收操作,本申请对此不做限定。
第七方面,提供一种计算机可读存储介质。该计算机可读存储介质存储有计算机程序,当计算机程序在通信装置上运行时,使得通信装置执行上述第一方面或第二方面的任意一种实现方式的方法。
第八方面,提供一种包含指令的计算机程序产品。当该计算机程序产品在计算机上运行时,使得 计算机执行上述第一方面或第二方面的任意一种实现方式提供的方法。
第九方面,提供一种芯片,芯片包括处理器与通信接口,处理器通过通信接口读取指令,执行上述第一方面或第二方面的任意一种实现方式提供的方法。
可选地,作为一种实现方式,芯片还包括存储器,存储器存储有计算机程序或指令,处理器用于执行存储器上存储的计算机程序或指令,当计算机程序或指令被执行时,处理器用于执行上述第一方面或第二方面的任意一种实现方式提供的方法。
第十方面,提供一种通信系统,包括第三方面的第一设备和第四方面的第二设备。
附图说明
图1是本申请实施例适用的一种通信场景。
图2是本申请提供的一种通信方法的示意性流程图。
图3为本申请实施例提供的第一函数生成过程的示意图。
图4是本申请提供的另一种通信方法的示意性流程图。
图5是本申请实施例提供的通信装置10的示意性框图。
图6是本申请实施例提供另一种通信装置20的示意图。
图7是本申请实施例提供一种芯片系统30的示意图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
本申请实施例的技术方案可以应用于各种通信系统。例如:第五代(5th generation,5G)系统或新空口(new radio,NR)、长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)等。本申请提供的技术方案还可以应用于未来的通信系统,如第六代移动通信系统。本申请实施例的技术方案还可以应用于设备到设备(device to device,D2D)通信,车辆外联(vehicle-to-everything,V2X)通信,机器到机器(machine to machine,M2M)通信,机器类型通信(machine type communication,MTC),以及物联网(internet of things,IoT)通信系统或者其他通信系统。
本申请实施例中的终端设备(terminal equipment)可以指接入终端、用户单元、用户站、移动站、移动台、中继站、远方站、远程终端、移动设备、用户终端(user terminal)、用户设备(user equipment,UE)、终端(terminal)、无线通信设备、用户代理或用户装置。终端设备还可以是蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备或者未来车联网中的终端设备等,本申请实施例对此并不限定。
示例性地,在本申请实施例中,可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称。如眼镜、手套、手表、服饰及鞋等。可穿戴设备是直接穿在身上,或是整合到用户的衣服或配件的便携式设备。可穿戴设备不仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、可不依赖智能手机实现完整或者部分的功能。例如:智能手表或智能眼镜等。另外,还可以为只专注于某一类应用功能,需要和其它设备如智能手机配合使用的便携式设备。如各类进行体征监测的智能手环、智能首饰等。
此外,在本申请实施例中,终端设备还可以是IoT系统中的终端设备。IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。在本申请实施例中,IoT技术可以通过例如窄带(narrow band,NB)技术,做到海量连接,深度覆盖,终端省电。
此外,在本申请实施例中,终端设备还可以包括传感器,主要功能包括收集数据(部分终端设备)、接收网络设备的控制信息与下行数据,并发送电磁波,向网络设备传输上行数据。
本申请实施例中的网络设备可以是用于与终端设备通信的任意一种具有无线收发功能的通信设备。该设备包括但不限于:演进型节点B(evolved Node B,eNB)、无线网络控制器(radio network controller,RNC)、节点B(Node B,NB)、家庭基站(home evolved NodeB,HeNB,或home Node B,HNB)、基带单元(baseBand unit,BBU),无线保真(wireless fidelity,WIFI)系统中的接入点(access point,AP)、无线中继节点、无线回传节点、传输点(transmission point,TP)或者发送接收点(transmission and reception point,TRP)等,还可以为5G系统,如NR系统中的gNB,或传输点(TRP或TP),5G系统中的基站的一个或一组(包括多个天线面板)天线面板,或者,还可以为构成gNB或传输点的网络节点,如基带单元(BBU),或分布式单元(distributed unit,DU)等。
网络设备和终端设备可以部署在陆地上,包括室内或室外、手持或车载;也可以部署在水面上;还可以部署在空中的飞机、气球和卫星上。本申请实施例中对网络设备和终端设备所处的场景不做限定。
在本申请实施例中,终端设备或网络设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,操作系统、操作系统、操作系统、操作系统或操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质包括但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读存储介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
具体地,本申请可以应用于包括两个设备的通信系统中,如包括设备#1和设备#2,其中设备#2上有待发送给设备#1的AI模型(如,AI模型#1),设备#1具有执行该AI模型#1的执行环境。设备#2可以是基站或核心网设备,但也可以是其它拥有AI模型#1、并准备将AI模型#1发送给设备#1的设备,或准备给设备#1安排AI模型#1的执行任务的设备;设备#1可以是终端,但也可以是其它准备从设备#2获取AI模型#1并执行或获取AI模型#1的执行任务的设备。其中,设备#2向设备#1发送AI模型#1,可以理解为该设备#2向设备#1发送AI模型#1的信息,设备#1可以根据该AI模型#1的信息确定AI模型#1。
为便于理解本申请实施例,下面以首先以设备#2为基站,设备#1为终端设备进行说明。图1中示出的通信系统为例详细说明适用于本申请实施例的通信系统。如图1所示,该通信系统100可以包括至少一个网络设备,例如图1所示的网络设备110;该通信系统100还可以包括至少一个终端设备,例如图1所示的终端设备120。网络设备110与终端设备120可通过无线链路通信。各通信设备,如网络设备110和终端设备120,均可以配置多个天线。对于该通信系统100中的每一个通信设备而言,所配置的多个天线可以包括至少一个用于发送信号的发射天线和至少一个用于接收信号的接收天线。因此,该通信系统100中的各通信设备之间,如网络设备110与终端设备120之间,可通过多天线技术通信。
应理解,图1是以网络设备与终端设备通信为例,简单说明本申请能够应用的一个通信场景,不对本申请可以应用的其他场景产生限制。
还应理解,图1仅为便于理解而示例的简化示意图,该通信系统中还可以包括其他网络设备或者还可以包括其他终端设备,图1中未予以画出。
为了便于理解本申请实施例的技术方案,首先对本申请实施例涉及到的一些术语或概念进行简单描述。
1、人工智能(artificial intelligence,AI):是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类 智能相似的方式作出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。智能机器可以应用于各个领域,例如,自然语言处理,计算机视觉,决策与推理,人机交互,推荐与搜索等。AI还包括机器学习(machine learning,ML),本申请以AI代表AI/ML。
通常,上述智能机器的设计原理与实现方法都依赖于AI模型。下面简单介绍AI模型。
2、AI模型:AI模型可以视为智能机器的核心,基于AI模型的类型不同,使得智能机器可以应用于各个领域,例如,自然语言处理,计算机视觉,决策与推理,人机交互,推荐与搜索等。目前,比较流行的AI模型包括卷积神经网络(convolutional neural network,CNN)、循环神经网络(Recurrent Neural Network,RNN)、基于自注意力机制的深度学习模型(例如Transformer)等。
3、AI模型参数:通常包括结构参数和权重参数(简称权重)。结构参数是AI模型超参数(hyper parameter)的一部分,用于描述AI模型的结构,例如CNN的层数、每一层的算子类型、卷积核的尺寸和数量等。权重是AI模型中对输入数据进行处理时使用的数据,例如,卷积核中的每个元素、全连接算子中的权重系数和偏置等。
4、执行环境:指的是设备执行AI模型的条件,包括硬件和软件。硬件(例如内存读取、算力等)设计不同,可能具有不同的AI模型执行能力;软件可能包括AI模型优化、编译、执行环境,同样可以影响AI模型的执行表现。可以认为,执行环境不同,AI模型的执行能力可能不同,执行表现可能也不同。
5、执行AI模型:本申请中执行AI模型包括但不限于训练和/或推理。AI模型训练即以数据驱动的方式通过学习输入/输出关系训练AI模型并获得训练后的AI模型以用于推理的过程,或者说是通过数据样本(已知的输入数据和输出数据)学习获取AI模型中可训练权重值的过程。AI模型推理即使用训练好的AI模型基于一组输入产生一组输出的过程,或者说是通过训练好的AI模型对输入数据进行处理以实现特定功能的过程,特定功能例如,指纹解锁,图像识别,语义识别等,或5G通信中的信道状态信息(channel state information,CSI)编解码、终端定位等。
6、执行表现:表示执行AI模型的表现或者说执行AI模型所消耗的资源,该资源包括以下至少一项:时间或能量。示例性地,执行表现可以是执行AI模型的时长和/或能耗。下文中设备执行某个AI模型的执行表现和设备执行某个AI模型所消耗的资源为等价的描述。
此外,为了便于理解本申请实施例,做出以下几点说明。
第一,在本申请中,“用于指示”可以包括用于直接指示和用于间接指示。当描述某一指示信息用于指示A时,可以包括该指示信息直接指示A或间接指示A,而并不代表该指示信息中一定包括有A。
将指示信息所指示的信息称为待指示信息,则具体实现过程中,对待指示信息进行指示的方式有很多种。待指示信息可以作为一个整体一起发送,也可以分成多个子信息分开发送,而且这些子信息的发送周期和/或发送时机可以相同,也可以不同。具体发送方法本申请不进行限定。
第二,在本申请中示出的“至少一个”是指一个或者多个,“多个”是指两个或两个以上。另外,在本申请的实施例中,“第一”、“第二”以及各种数字编号(例如,“#1”、“#2”等)只是为了描述方便进行的区分,并不用来限制本申请实施例的范围。下文各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定,应该理解这样描述的对象在适当情况下可以互换,以便能够描述本申请的实施例以外的方案。此外,在本申请实施例中,“310”、“320”等字样仅为了描述方便作出的标识,并不是对执行步骤的次序进行限定。
第三,在本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
第四,本申请实施例中涉及的“保存”,可以是指的保存在一个或者多个存储器中。所述一个或者多个存储器,可以是单独的设置,也可以是集成在编码器或者译码器,处理器、或通信装置中。所述一个或者多个存储器,也可以是一部分单独设置,一部分集成在译码器、处理器、或通信装置中。存储器的类型可以是任意形式的存储介质,本申请并不对此限定。
第五,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
上文结合图1简单介绍了本申请实施例提供的通信方法能够应用的场景,以及介绍了本申请实施例中可能涉及到的基本概念。
具体地,AI技术应用于无线通信系统时,可能存在通信设备间需要传递AI模型的场景,即发送端设备向接收端设备传递AI模型。另外,在接收端设备执行该AI模型的情况下,一般要求接收端设备需要在限定的条件内完成该AI模型的执行。
示例性地,可以通过如下方式实现通信设备间传递AI模型,且接收端设备能够在限定的条件内完成该AI模型的执行:
作为一种可能的实现方式,发送端设备向接收端设备传递AI模型,接收端设备接收并执行AI模型后即可判断能否在限定的条件下完成该AI模型的执行,如果不能在限定的条件下完成该AI模型的执行,表明本次传递失败,造成传输资源的浪费,并给接收端设备带来额外的计算量和功耗。
例如,发送端设备向接收端设备传递AI模型#1,接收端设备接收到AI模型#1之后执行该AI模型#1,执行之后确定不能在第一时长内完成该AI模型#1的执行。表明发送端设备向接收端设备传递AI模型#1无意义,造成传输资源的浪费。
作为另一种可能的实现方式,针对接收端设备能否在限定的时间内完成AI模型执行的情况,基于接收端设备的计算能力CUE(例如以每秒浮点计算(floating-point operations per second,FLOPS)为单位)和AI模型的计算复杂度CM(例如以浮点计算(floating-point operation,FLOP)为单位)评估匹配情况。如果满足以下公式,表示接收端设备可以在要求的时间内完成AI模型执行:
其中,tth表示裕量,可提前配置;ti表示限定的时间。
该实现方式下,tth为预配置的值,而AI模型是高度实现相关的,相同目的的AI模型可能具有非常不同的模型内部结构,而不同的结构在实际计算时可能因为硬件利用率、数据调度时延等不同而计算效率大相径庭;AI模型到硬件计算资源之间,需要软件优化和编译,不同的软件优化和编译方法同样带来不同的计算效率;不同的AI计算硬件实现取向不同,同样可能带来不同的AI模型计算效率。这些因素可能导致上百倍的计算效率偏差,也就是说难以通过简单配置裕量进行补偿。
上述的几种实现方式,在实现通信设备间传递AI模型的信息的过程中都存在一些缺陷,本申请提供一种通信方法,以期在尽量少的传输资源开销的前提下,实现通信设备间传递AI模型。
应理解,本申请实施例提供的通信方法可以应用于通过多天线技术通信的系统,例如,图1中所示的通信系统100。该通信系统可以包括至少一个网络设备和至少一个终端设备。网络设备和终端设备之间可通过多天线技术通信。
还应理解,下文示出的实施例并未对本申请实施例提供的方法的执行主体的具体结构特别限定,只要能够通过运行记录有本申请实施例的提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可。例如,本申请实施例提供的方法的执行主体可以是第一设备与第二设备,或者,是第一设备与第二设备中能够调用程序并执行程序的功能模块。
以下,以第一设备与第二设备之间的交互为例详细说明本申请实施例提供的通信方法。
图2是本申请提供的一种通信方法的示意性流程图。包括以下步骤:
S310,第一设备获取第二设备的第一函数。
示例性地,上述的第一设备可以为前文所述的设备#2,第二设备可以为前文所述的设备#1,该实施例中对于第一设备和第二设备的具体体现形式不做任何的限定。例如,第一设备可以是网络设备,第二设备可以是终端设备,或者,还例如,第一设备可以是核心网设备,第二设备可以是终端设备。其中,第一设备可以理解为用于发送AI模型的设备,可以称为发送端设备;第二设备可以理解为用于接收AI模型的设备,可以称为接收端设备。
具体地,上述的第一函数用于评估第二设备执行AI模型所消耗的资源,或者说,该第一函数用于评估在第二设备的执行环境下执行AI模型的执行表现。
示例性地,该实施例中函数还可以称为评估器、评估函数、评估表格、或评估模型等,本申请中对于用于评估某个设备执行AI模型所消耗的资源的函数的名称不做限定,能够用于评估设备执行AI模型所消耗的资源的函数均在本申请的保护范围之内。
作为一种可能的实现方式,上述的第二设备执行AI模型所消耗的资源可以是:第二设备执行AI模型所消耗的时间。
作为另一种可能的实现方式,上述的第二设备执行AI模型所消耗的资源可以是:第二设备执行AI模型所消耗的能量。
上述第二设备执行AI模型所消耗的资源为时间或者能量只是举例,对本申请的保护范围不构成任何的限定,本申请中对于第二设备执行AI模型所消耗的资源的具体形式不做限定,还可以是除时间或者能量之外的其他资源,如,所消耗的内存或对第二设备执行其他应用的影响度等。
示例性地,该实施例中所述第一函数包括以下至少一项:
根据第二信息和第三信息训练生成的第二AI模型;或者,
根据所述第二信息和所述第三信息拟合形成的映射函数;或者,
根据所述第二信息和所述第三信息统计获得的映射表格,
其中,所述第一函数的输入与所述第二信息相关,所述第一函数的输出与所述第三信息相关,所述第二信息包括以下信息中的至少一项:AI算子的信息、AI模块的信息或第三AI模型的信息;
所述第三信息包括以下信息中的至少一项:第三设备执行所述AI算子所消耗的资源、第三设备执行所述AI模块所消耗的资源、第三设备执行所述第三AI模型所消耗的资源,所述第三设备为所述第二设备或所述第三设备与所述第二设备具有相同的第一能力,所述第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。
具体地,上述第一能力可以理解为第二设备的执行环境,或者可以理解为第二设备中用于执行AI算子、AI模块或第三AI模型的软硬件能力,例如,可能包括但不限于:执行硬件的能力(如,内存读取、算力等),优化和编译的能力等;或者第一能力可以理解为第二设备和第三设备中可能影响AI算子、AI模块或第三AI模型执行表现的因素。
另外,需要说明的是,上述的第一设备获取的第一函数,可以是用于评估在第二设备的执行环境下执行AI模型的执行表现,还可以是用于评估在多个设备的执行环境下执行AI模型的执行表现(如,该多个设备属于同一类的设备),该实施例中不做限制。
第三设备可以是第二设备,还可以是与第二设备具有相同第一能力(如,软硬件能力、执行环境或执行能力)的设备,其中,第一能力可以由仿真软件提供,如第三设备为安装有仿真软件的设备,该仿真软件在执行AI算子、AI模块或第三AI模型时可以仿真出与第二设备相同或相近的结果,该实施例中对于第三设备的具体形式不做限定。
应理解,上述的第二信息和第三信息为相关的信息,也就是说在第二信息为AI算子的信息的情况下,第三信息为第三设备执行所述AI算子的所消耗的资源;同理,在第二信息为AI模块的信息的情况下,第三信息为第三设备执行所述AI模块的所消耗的资源;在第二信息为第三AI模型的信息的情况下,第三信息为第三设备执行所述第三AI模型的所消耗的资源;在第二信息为AI算子和AI模块的信息的情况下,第三信息为第三设备执行所述AI算子的所消耗的资源以及第三设备执行所述AI模块的所消耗的资源,等等,这里不再赘述。
示例性地,该实施例中涉及的AI模块的信息包括以下至少一种:
AI模块的类型信息、AI模块的参数、AI模块的前后模块信息、或AI模块的前后算子信息。其中,AI模块的信息还可以理解为AI模块的前后子结构信息或者AI模块的前后层信息。
上述的AI模块的参数可以包括AI模块的结构参数和/或AI模块的权重参数,相对来说,AI模块的结构参数是必需的。
示例性地,该实施例中涉及的AI算子的信息包括以下至少一种:
AI算子的类型信息、AI算子的参数、AI算子的前后算子信息、或AI算子的前后模块信息。其中,AI算子的信息还可以理解为AI算子的前后子结构信息或者AI算子的前后层信息。
上述的AI算子的参数可以包括AI算子的结构参数和/或AI算子的权重参数,相对来说,AI算子的结构参数是必需的。
示例性地,该实施例中涉及的第三AI模型的信息包括以下至少一种:
第三AI模型整体结构的参数或第三AI模型子结构的参数。其中,第三AI模型的子结构可以理解为第三AI模型的整体结构中删除部分AI算子或部分AI模块之后剩下的部分。
作为一种可能的实现方式,第一函数为第二AI模型。也就是说在该实现方式下,第一设备可以根据该第二AI模型评估在第二设备的执行环境下执行某个AI模型的执行表现。
示例性地,第二AI模型可以基于传统机器学习算法或深度学习算法等。
例如,该第二AI模型的输入信息为第一AI模型的信息,该第二AI模型的输出信息为第二设备执行第一AI模型的执行表现。
作为另一种可能的实现方式,第一函数为映射函数。也就是说在该实现方式下,第一设备可以根据该映射函数评估在第二设备的执行环境下执行某个AI模型的执行表现。
示例性地,映射函数可以为线性函数、多项式函数、非线性函数等。
例如,该映射函数的输入信息为第一AI模型的信息,该映射函数的输出信息为第二设备执行第一AI模型的执行表现。
作为又一种可能的实现方式,第一函数为映射表格。也就是说在该实现方式下,第一设备可以根据该映射表格评估在第二设备的执行环境下执行某个AI模型的执行表现。
例如,映射表格包括第一AI模型的信息和第二设备执行第一AI模型的执行表现之间的对应关系。
应理解,上述的几种可能的实现方式只是举例说明第一函数可能的形式,对本申请的保护范围不构成任何的限定,其他能够用于评估在第二设备的执行环境下执行第一AI模型的执行表现的信息也在本申请的保护范围之内,这里不再赘述。
应理解,该实施例中第一设备可以获取多个设备分别对应的多个函数。
例如,第一设备获取函数#1和函数#2。其中,函数#1用于评估在设备#1的执行环境下执行AI模型所消耗的资源;函数#2用于评估在设备#2的执行环境下执行AI模型所消耗的资源。
本申请中还提供一种通信方法,在第一设备获取到多个设备分别对应的多个函数的情况下,第一设备可以基于多个函数进行任务分配,该实施例中不进行赘述,下文中将结合图5详细介绍第一设备分配任务的流程。
为了便于描述,下文中以第一设备获取第二设备对应的第一函数为例进行说明。第一设备获取其他设备对应的函数的过程与第一设备获取第二设备对应的第一函数的过程类似,本申请中不再重复说明。
示例性地,第一设备获取的可能是第一函数的标识(如ID、编号等),第一函数的标识和第一函数之间的对应关系可以是提前约定或通过其它手段约定。第一设备获取到第一函数的标识之后,能够根据第一函数的标识和第一函数之间的对应关系确定第一函数。
作为一种可能的实现方式,第一设备获取第一函数可以是第一设备接收所述第一函数。所述第一设备接收所述第一函数可以是所述第一设备接收来自所述第二设备的所述第一函数,还可以是第一设备接收来自所述第二设备相关的其他设备的所述第一函数,该第二设备相关的其他设备可以和第一设备通信,并且能够获取第一函数,例如,该第二设备相关的其他设备可以分别与所述第一设备和所述第二设备通信;或者还例如,该第二设备相关的其他设备可以和第一设备通信,但是无需和第二设备建立通信,而是保管有上述的第一函数即可。
作为另一种可能的实现方式,第一设备获取第一函数可以是接收第一指示信息,并根据所述第一指示信息获取所述第一函数,其中,所述第一指示信息包括指示获取所述第一函数的方式的信息,和/或第一函数的标识。所述第一设备接收第一指示信息可以是所述第一设备接收来自所述第二设备的第一指示信息,还可以是第一设备接收来自所述第二设备相关的其他设备的第一指示信息。
为了便于理解,下面结合具体的实现方式说明第一设备获取第一函数的过程:
实现方式#1:第一设备接收来自第二设备的第一函数。在该实现方式#1下上述的步骤S310为:第一设备接收来自第二设备的第一函数,或者说第二设备向第一设备发送第一函数。
在该实现方式#1下,第二设备需要获取第一函数。
作为一种可能的实现方式,该第一函数为生产第二设备的时候设置在第二设备中的。
作为另一种可能的实现方式,该第一函数为第二设备从其他设备中获取的。
例如,第一函数生成后设置在其他设备上,第二设备已知第一函数的获取方式。如,第二设备接收到指示第一函数的获取方式的第一指示信息,第二设备根据第一指示信息获取到第一函数。其中,该第一指示信息可能包括但不限于以下信息:第一函数的标识、放置第一函数的设备或网址指示、获取第一函数的通信协议、第一函数的格式、或使用第一函数的方法等。
还例如,第一函数设置在其他设备上,第二设备获取第一函数的标识。如,第二设备接收到指示第一函数的标识的第一指示信息,第二设备根据第一指示信息获取到第一函数。其中,该第一指示信息包括但不限于以下信息:第一函数的ID或编号等标识信息。
作为又一种可能的实现方式,该第一函数为第二设备生成的,下面将结合图3详细介绍第一函数的生成过程,这里不进行赘述。
应理解,上述只是举例说明第二设备获取第一函数的方式,对本申请的保护范围不构成任何的限定,其他能够获取第一函数的方式也在本申请的保护范围之内。
在该实现方式#1下,第二设备获取第一函数之后,可以将第一函数发送给第一设备,具体的发送方式该实施例中不做限定,可以是携带在已有的信令中,也可以是通过新增的信令发送该第一函数。
实现方式#2:第一设备接收来自第二设备的第一指示信息,该第一指示信息包括指示第一函数的获取方式的信息和/或第一函数的标识。在该实现方式#2下上述的步骤S310为:第一设备接收来自第二设备的第一指示信息,并根据第一指示信息获取第一函数。
在该实现方式#2下,第二设备需要获取第一指示信息。例如,第一函数生成后设置在其他设备上,将指示获取第一函数的方式的信息和/或第一函数的标识发送给第二设备。
在该实现方式#2下,第二设备获取第一指示信息之后,可以将第一指示信息发送给第一设备,具体的发送方式该实施例中不做限定,可以是携带在已有的信令中,也可以是通过新增的信令发送该第一指示信息。
进一步地,第一设备可以根据第一指示信息获取第一函数。
示例性地,第一设备根据第一指示信息获取所述第一函数可以是:第一指示信息为指示获取所述第一函数的方式的信息,第一设备确定第一函数的获取方式,并根据获取方式获取该第一函数,例如,指示获取所述第一函数的方式的信息可能包括但不限于:第一函数的标识、放置第一函数的设备或网址指示、获取第一函数的通信协议、第一函数的格式和使用方法等信息。
例如,第一设备在获取方式指示放置第一AI模型的设备或网址的情况下,第一设备可以从放置第一AI模型的设备或网址获取该第一函数。
示例性地,第一设备根据第一指示信息获取所述第一函数可以是:第一指示信息为第一函数的标识,第一设备根据第一函数的标识从保存有第一函数的设备中获取该第一函数。
例如,管理设备中包括有多个函数,其中,多个函数的标识分别为#1、#2和#3,第一设备获知第一函数的标识为#3,则第一设备可以将#3上报给管理设备,管理设备将标识为#3的函数发送给第一设备。
实现方式#3:第一设备从其他设备(如,互联网上)下载该第一函数。
在该实现方式#3下,第二设备的相关厂商生成第一函数,设置在互联网上,供下载使用。其中,第二设备的相关厂商生成第一函数的方式,下面将结合图3详细介绍这里不进行赘述。
作为一种可能的实现方式,第一设备从互联网上下载该第一函数。
例如,若第一设备需要确定设备#1对应的函数#1,则第一设备可以从互联网上下载该函数#1。
作为另一种可能的实现方式,第一设备的相关厂商从互联网上下载多个设备分别对应的多个函数,并将多个函数的标识置于第一设备中。
例如,第一设备的相关厂商从互联网上下载了备#1对应的函数#1、设备#2对应的函数#2以及设备#3对应的函数#3,其中,函数#1的标识为“#1”、函数#2的标识为“#2”、函数#3的标识为“#3”。第一设备的相关厂商将“#1”、“#2”以及“#3”置于第一设备中,若第一设备需要确定标识为“#1”的函数,则第一设备从互联网上下载该函数#1。
作为又一种可能的实现方式,第一设备的相关厂商从互联网上下载多个设备分别对应的多个函数,并将多个函数的标识置于其他设备上并告知第一设备获取函数的获取方式。
实现方式#4:第一设备间接获取该第一函数。
在该实现方式#4下,第二设备的相关厂商生成第一函数,设置在互联网上,供下载使用,或发送给第一设备的相关厂商供使用。其中,第二设备的相关厂商生成第一函数的方式,下面将结合图3详细介绍这里不进行赘述。第一设备的相关厂商或相关设备从互联网上下载该第一函数或接收到该第一函数,具有了使用该第一函数的能力,相当于第一设备间接获取了该第一函数。
应理解,上述的实现方式#1至实现方式#4简单介绍了该实施例中第一设备直接或间接获取第二设备的第一函数的方式,对本申请的保护范围不构成任何的限定,其他能够获取第二设备的第一函数的方式也在本申请的保护范围之内,例如,预定义的方式,第一设备本地配置了不同设备对应的函数。这里不再一一举例说明。
进一步地,第一设备获取第二设备的第一函数之后,可以根据第二设备的第一函数评估第二设备执行AI模型所消耗的资源,图2所示的方法流程还包括:
S320,第一设备根据第一函数和第一AI模型的信息确定第二设备执行第一AI模型所消耗的第一资源。
其中,第一AI模型为任意的待第二设备执行的AI模型,在第二设备的执行环境下执行第一AI模型所消耗的第一资源可以理解为:在第二设备的执行环境下执行第一AI模型的时间信息、能量信息或其他信息等。其中,在第二设备的执行环境下执行第一AI模型的时间指的是在第二设备的执行环境下执行第一AI模型所消耗的时长;在第二设备的执行环境下执行第一AI模型的能量指的是在第二设备的执行环境下执行第一AI模型所消耗的能量。
第一AI模型的信息包括以下至少一种:构成第一AI模型的AI算子的信息、构成第一AI模型的AI模块的信息、第一AI模型整体结构的参数或第一AI模型子结构的参数。
具体地,第一设备结合获取的第一函数和第一设备上待下发的至少一个AI模型,分别确定待下发的至少一个AI模型在第二设备被执行所消耗的资源。
作为一种可能的实现方式,第一设备根据第一函数和第一AI模型的信息确定第二设备执行第一AI模型所消耗的第一资源,可以是第一设备根据第一函数和第一AI模型的信息评估第二设备执行第一AI模型所消耗的第一资源,也就是说该实现方式下由第一设备执行评估流程。
作为另一种可能的实现方式,第一设备根据第一函数和第一AI模型的信息确定第二设备执行第一AI模型所消耗的第一资源,可以是:第一设备将第一函数或第一函数的标识发送给其他设备,假设该其他设备已知第一AI模型的信息(如,该其他设备为第一设备的相关设备),由其他设备执行评估流程,再将评估结果发送给第一设备。
可选地,在该实现方式下,如果该其他设备未知需要评估的第一AI模型,第一设备可以将需要评估的第一AI模型或第一AI模型的标识发送给该其他设备。
作为又一种可能的实现方式,第一设备根据第一函数确定第二设备执行第一AI模型所消耗的第一资源,可以是:第一设备将需要评估的第一AI模型或第一AI模型的标识发送给其他设备,假设该其他设备已知第一函数,由其他设备执行评估流程,再将评估结果发送给第一设备。
可选地,在该实现方式下,如果该其他设备未知第一函数,第一设备可以将第一函数和/或第一指示信息发送给该其他设备,该其他设备根据第一指示信息获取第一函数。
应理解,上述的其他设备执行评估流程可以是在第一设备需要确定第二设备执行第一AI模型所消耗的第一资源之前完成的,相当于第一设备通过第一函数和/或第一AI模型的标识向其他设备查询评估结果,并从该其他设备接收评估结果。
例如,第一设备的相关厂商或相关设备从互联网上下载第一函数或接收到第一函数后,根据该第一函数和第一AI模型的信息,获得该第一AI模型的评估结果,并将该评估结果置于其他设备上。第一设备在需要确定第二设备执行第一AI模型所消耗的第一资源时,将该第一函数和/或该第一AI模型的标识发送给该其他设备,该其他设备基于该第一函数和/或该第一AI模型的标识将该第一函数对应的评估结果发送给第一设备。
示例性地,第一设备通过第一函数的标识从其他设备查询的评估结果包括以下至少一种可能:第一AI模型所消耗的第一资源、第一AI模型所消耗的第一资源是否满足第一条件、或是否应向第二设备发送第一信息等。下文中将对评估结果进行详细说明,这里不再赘述。
示例性地,第一设备在评估第二设备执行第一AI模型所需消耗的第一资源的过程中除了考虑第二 设备的第一函数之外,还可以考虑其他的参数,包括但不限于:
第一设备接收来自所述第二设备的以下信息中的至少一项:处理资源指示信息或第二指示信息。
从而,第一设备根据所述第一函数确定第二设备执行第一AI模型所消耗的第一资源,包括:所述第一设备根据所述第一函数和以下信息中的至少一项确定所述第二设备执行第一AI模型所消耗的第一资源:所述资源指示信息或所述第二指示信息。
其中,所述处理资源指示信息用于指示所述第二设备能够用于执行所述第一AI模型的处理资源的占比,所述第二指示信息用于指示调整所述第二设备执行所述第一AI模型所消耗的所述第一资源的取值。
示例性地,处理资源与第二设备的第一能力相关,而第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。其中,处理资源与第二设备的第一能力相关包括但不限于:处理资源为第一能力的一种表现形式。
例如,资源指示信息为第二设备发送给第一设备的,用于指示第二设备当前可用于执行第一AI模型的资源的比例。如果只有50%计算资源(可用资源比例)可用于AI模型执行,则执行时间可能需要延长一倍。
还例如,资源指示信息为第二设备发送给第一设备的,用于指示第二设备当前执行任务所占的资源的比例。如,第二设备当前执行任务所占的资源的比例为30%,第一设备确定第二设备当前可用于执行第一AI模型的资源的比例为70%。
作为一种示例,上述的处理资源指示信息还可以用于指示所述第二设备能够用于执行所述第一AI模型的处理资源,相当于指示能够用于执行第一AI模型的处理资源的绝对值。
作为一种示例,上述的第二指示信息可以通过指示调整执行所述第一AI模型所消耗的所述第一资源的取值的方法,以达到调整第二设备执行所述第一AI模型所消耗的所述第一资源的取值的目的。例如,第二指示信息指示评估结果翻倍,表示评估得到的第二设备执行所述第一AI模型所消耗的所述第一资源的取值需要翻倍。
作为一种示例,在第一设备接收到上述的处理资源指示信息和第二指示信息的情况下,第一设备可以根据第二设备能够用于执行所述第一AI模型的处理资源调整所述第二设备执行所述第一AI模型所消耗的所述第一资源的取值。
例如,如果只有50%资源(可用资源比例)可用于AI模型执行,则执行时间可能需要延长一倍(可用资源比例对执行表现的影响信息)。
具体地,该实施例中第一设备根据上述的评估结果或调整后的评估结果,确定是否向第二设备发送的第一信息。图2所示的方法流程还包括:
S330,第一设备根据第一资源确定是否向第二设备发送第一信息。
具体地,第一信息包括以下至少一项:所述第一AI模型或所述第一AI模型的获取方式。
上述的第一信息包括第一AI模型可以理解为第一信息包括第一AI模型的信息,例如,包括但不限定第一AI模型的结构信息、第一AI模型的权重信息等。
上述的第一信息包括所述第一AI模型的获取方式可以理解为第一信息包括指示获取方式的信息,例如,可能包括但不限于:第一AI模型的标识、放置第一AI模型的设备或网址指示、获取第一AI模型的通信协议、第一AI模型的格式和使用方法等信息。
作为一种可能的实现方式,在所述第一资源满足第一条件的情况下,所述第一设备向所述第二设备发送所述第一信息,其中,所述第一条件与预设阈值相关。所述预设阈值也可以是第一设备从第二设备或其他与第二设备相关的设备处获取的。
第一资源包括以下至少一项:时间或能量。在所述第一资源包括时间和能量的情况下,所述预设阈值包括第一预设阈值和第二预设阈值,所述第一预设阈值与所述时间相关,所述第二预设阈值与所述能量相关。
示例性地,第一资源为时间的情况下,上述第一条件可以是第二设备执行所述第一AI模型所消耗的时间小于或者等于第一阈值;另外,第一资源为能量的情况下,上述第一条件可以是第二设备执行所述第一AI模型所消耗的能量小于或者等于第二阈值。
例如,评估结果为第一资源满足第一条件(或者说第一AI模型与第二设备相匹配),第一设备确 定向第二设备送第一信息。
还例如,由步骤S320中所示,第一设备还可以从其他设备获取评估结果。当第一设备从其他设备获取评估结果时,该评估结果可以是第二设备执行第一AI模型所消耗的第一资源,也可以是第二设备执行第一AI模型所消耗的第一资源是否满足第一条件或是否应向第二设备发送第一信息。
如果第一设备根据评估结果确定需要发送AI模型,则可以发送AI模型,例如:AI模型结构描述和AI模型权重,或,仅包含AI模型权重而AI模型结构通过其它方式确定;也可以发送AI模型的获取方法信息,获取方法信息可能包括但不限于:AI模型的标识、放置AI模型的设备或网址指示、获取AI模型的通信协议、AI模型的格式或使用方法等。
可选地,在该实现方式下,第一设备可以向第二设备发送启用该第一AI模型的时间。
可选地,在该实现方式下,第二设备获取第一AI模型并部署应用第一AI模型。如果第二设备接收的是第一AI模型的获取方法信息,则根据该信息获取第一AI模型并部署应用第一AI模型。另外,如果第二设备接收到启用该第一AI模型的时间(如,第一信息中包括启用该第一AI模型的时间),则在该时间启用该第一AI模型。
可选地,在该实现方式下,第二设备可以反馈执行第一AI模型的结果。
作为另一种可能的实现方式,在所述第一资源不满足第一条件的情况下,所述第一设备不向所述第二设备发送所述第一信息,或者,第一设备向所述第二设备发送指示不启动AI模式或告知没有匹配的AI模型的信息,或者,第一设备不向所述第二设备发送信息。
例如,评估结果为第一资源不满足第一条件(或者说没有AI模型与第二设备相匹配)指示,第一设备向第二设备发送指示不启动AI模式或告知没有匹配的AI模型的信息。
作为又一种可能的实现方式,在所述第一资源不满足第一条件的情况下,所述第一设备可以调整第一AI模型的执行配置,使得执行配置调整后的第一AI模型执行所消耗的第一资源可以满足第一条件,然后所述第一设备向第二设备送第一信息和执行配置调整指示。
示例性的,上述的调整第一AI模型的执行配置包括但不限于:减少该第一AI模型执行时的样本数量,使得样本数量减少后的第一AI模型执行所消耗的第一资源可以满足第一条件。可理解的,第一AI模型执行配置的调整也可以由其他设备完成,并发送给所述第一设备,在此不再赘述。
图2所示的实施例中,详细介绍了第一设备可以通过根据第一函数评估第二设备执行AI模型所消耗的资源,并根据第二设备执行第一AI模型所消耗的资源确定是否向第二设备发送第一AI模型,可以理解为第一设备不是发送所有的AI模型,而是在发送AI模型之前,会评估第二设备执行该AI模型所消耗的资源,如果第二设备执行第一AI模型所消耗的资源不满足一定要求可以不向第二设备发送该第一AI模型,以便于向第二设备发送合适的AI模型,避免发送不合适的AI模型而造成资源浪费。
另外,图2所示的实施例中简单介绍了第一函数的生成,为了便于理解,下面结合图3详细介绍第一函数的生成过程。
图3为本申请实施例提供的第一函数生成过程的示意图,包括以下步骤:
S410,确定生成第一函数的所需的第二信息和第三信息。
其中,第二信息可以理解为第一函数的输入相关的信息,第三信息可以理解为第一函数的输出相关的信息。具体地,该实施例中生成第一函数所需的第二信息和第三信息为第三设备(或生成设备)已知的信息。
作为一种可能的实现方式,上述的第二信息为多种已知的AI算子的信息,则第三信息为基于第三设备的执行环境执行该多种已知的AI算子,获得的多种所消耗的资源#1。
作为另一种可能的实现方式,上述的第二信息为多种已知的AI模块的信息,则第三信息为基于第三设备的执行环境执行该多种已知的AI模块,获得的多种所消耗的资源#2。
作为又一种可能的实现方式,上述的第二信息为多种已知的AI模型的信息,则第三信息为基于第三设备的执行环境执行该多种已知的AI模型,获得的多种所消耗的资源#3。
作为又一种可能的实现方式,上述的第二信息包括多种已知的AI算子的信息和多种已知的AI模块的信息,则第三信息包括:基于第三设备的执行环境执行该多种已知的AI算子,获得的多种所消耗的资源#1,以及基于第三设备的执行环境执行该多种已知的AI模块,获得的多种所消耗的资源#2。
作为又一种可能的实现方式,上述的第二信息包括多种已知的AI算子的信息和多种已知的AI模 型的信息,则第三信息包括:基于第三设备的执行环境执行该多种已知的AI算子,获得的多种所消耗的资源#1,以及基于第三设备的执行环境执行该多种已知的AI模型,获得的多种所消耗的资源#3。
也就是说,生成第一函数的所需的第二信息可以是上述的多种已知的AI算子的信息、多种已知的AI模块的信息和多种已知的AI模型的信息的任意组合,第三信息则为相应的第二信息所对应的消耗资源。
应理解,第三设备的执行环境和第二设备的执行环境相同或者类似,也就是说在第三设备中生成的第一函数可以用于评估第二设备执行AI模型所消耗的资源。
示例性地,生成第一函数的所需的第三信息还可以包括输出结果的置信度。
具体地,上述的生成第一函数的所需的第二信息和第三信息构成了数据集,然后通过该数据集生成第一函数,这里的生成过程可以是训练生成AI模型、拟合形成映射函数或统计获得映射表格。图3所示的方法流程还包括:
S420,基于第二信息和第三信息生成第一函数。
该实施例中,第一函数的生成过程可以分为两种实现方式:
一种实现方式是,上述的第二信息为AI模块或AI算子。
当第二信息为AI模块或AI算子时,在评估一个完整AI模型的执行预期表现时,需要把该AI模型分解为一系列AI模块和/或AI算子,并分别执行该一系列AI模块和/或AI算子,得到所有AI模块和/或AI算子的执行表现,根据所有AI模块和/或AI算子的执行表现得到该AI模型的整体执行表现。
例如,可以将所有AI模块和/或AI算子的执行表现汇总得到该AI模型的整体执行表现。
示例性地,第二信息包括但不限于以下信息:
AI模块或AI算子的类型、批处理数量(Batch size)、AI模块或AI算子的参数、前后层信息或者其他信息。
其中,AI模块或AI算子类型包括卷积算子、全连接算子、LSTM模块、Transformer模块、ResBlock模块等,示例性地,这种类型的数据通常以独热编码(one-hot)方式编码,AI模块或AI算子的具体定义及其编码可以通过协商确定。
Batch size,即一批次输入AI模型(待发送应用的AI模型)的样本数量。在执行AI模型时(训练或推理),batch size会影响执行AI模块或AI算子的计算量,进而影响执行表现;
AI模块或AI算子的参数包括描述AI模块或AI算子具体内部结构的参数和/或配置参数,示例性地,针对全连接算子,其参数可能包括但不限于输入数据维度和输出数据维度;针对卷积算子,其参数可能包括但不限于卷积核大小、输入通道数、输出通道数、步(stride)长、是否填充(padding)、是否加偏置、是否扩展(dilation)等;长短期记忆(Long Short Term Memory,LSTM)神经网络可能包括但不限于是单向还是双向等。这些参数会影响执行AI模块或AI算子的计算量,进而影响执行表现;
前后层信息,即在整个AI模型中,当前AI模块或AI算子的前后至少一层AI模块或AI算子的信息,可能包括类型和参数。前后AI模块或AI算子与当前AI模块或算子可能有部分信息重复,例如前一层输出的数据维度可能等于当前层的输入数据维度,此时这些重复信息可以不用重复输入;
其它信息,其它可能影响当前输入AI模块或AI算子执行表现的信息,或者是AI模块或AI算子的配置信息,可能包括但不限于:执行类型(训练还是推理)、并行信息(是否有其它AI模型或AI算子与当前AI模型或AI算子并行执行,及其信息)、数值精度信息、量化信息、剪枝信息(例如是否剪枝、剪枝比例等)、算子或模块融合信息等。
该实现方式下,第三信息为AI模块或AI算子在第三设备的执行环境中被执行的执行表现,其中,执行可以是训练或推理,执行表现可能为执行时间和/或能量的消耗,即执行时长和/或能耗。
由上述可知,该实现方式下,数据集(包括训练数据集、validation数据集、测试数据集等模型生成过程中可能用到的所有数据集)的生成方法:搜集目前已公开的所有可能AI模块或AI算子,或者是提前约定可用的所有AI模块或AI算子,针对每一个AI模块或AI算子,将一种配置的AI模块或AI算子的信息作为第二信息,并且在第三设备的执行环境或仿真执行环境中执行该AI模块或AI算子,得到执行表现作为第三信息。此时,每一组第二信息和第三信息构成了数据集的一个样本。针对同一个AI模块或AI算子,变换配置(改变第二信息的内容),得到另外的执行表现,即可构成数据集的另一个样本。
该实现方式下,第一函数的生成过程中,可以赋予每个AI模块或AI算子一个类型编码,从而生成一个适用于所有AI模块或AI算子的第一函数;也可以针对每个AI模块或AI算子生成一个函数,该函数可以略去类型编码输入,但可能需要一个函数编号对应具体的AI模块或AI算子,此时所有AI模块或AI算子的函数构成了第一函数,在执行该第一函数时,需要针对具体AI模块或AI算子找到对应的函数并执行;还可以是这两种方式的混合。
另一种实现方式是,上述的第二信息为AI模型整体结构的参数或AI模型子结构的参数,AI模型整体结构或AI模型子结构由多个AI模块和/或AI算子构成。
以第二信息为AI模型的整体结构参数为例,把一个完整AI模型结构参数作为第二信息,可以在第三设备的执行环境下执行该完整AI模型得到该AI模型的整体执行表现作为第三信息,也可以把一个完整AI模型结构分解成多个算子、模块、子结构之后,分别在第三设备的执行环境下执行,获得各算子、模块、子结构的执行表现后汇总得到该AI模型的整体执行表现作为第三信息。
该实现方式下,当第一函数为AI模型时,示例性地,可以基于AI算法中的RNN、长短期记忆(Long short-term memory,LSTM)、门控循环单元(Gate Recurrent Unit,GRU)或Transformer等算法。把完整AI模型展开成一系列AI模块或AI算子,并作为一个序列输入第一函数,类似于自然语言处理中句子或序列的处理方式。
可选地,可以对第二信息进行预处理,还可以对第三信息进行后处理。其中,预处理可能包括但不限于:拆分、融合、归一化、平移、白化等;后处理可能包括但不限于:汇总/叠加、量化、编码等。
当该第一函数为AI模型时,可能的形式包括但不限于:基于传统机器学习算法或深度学习算法等;当该第一函数为映射函数时,可能的形式包括但不限于:线性函数、多项式函数、某种非线性函数等;当第一函数为映射表格时,可能的形式包括但不限于:所有数据集列成表格。
图4是本申请提供的另一种通信方式的示意性流程图,包括以下步骤:
S510,第一设备获取第一函数和第二函数。
第一函数用于评估第二设备执行AI模型所消耗的资源;第二函数用于评估第四设备执行AI模型所消耗的资源。
具体地,第一设备获取第一函数的过程可以参考上述图2所示的实施例中步骤S310中的描述,这里不再赘述,另外,第一设备获取第二函数的过程与第一设备获取第一函数的过程类似,这里也不再赘述。
第一函数和第二函数的生成过程可以参考图3的描述,这里不再赘述。
该实施例中第一设备获取第一函数和第二函数之后,可以基于第一函数、第二函数和待分配的总任务分配任务,图4所示的方法流程还包括:
S520,第一设备根据第一函数、第二函数和待分配的总任务确定第二设备执行的第一任务以及第四设备执行的第二任务。
具体地,待分配的总任务包含第一任务和第二任务。
作为一种可能的实现方式,该实施例中,第一设备获取第一函数和第二函数之后,可以根据第一函数、第二函数和待分配的总任务自行确定第二设备执行的第一任务以及第四设备执行的第二任务。也就是说任务分配的流程由第一设备执行。
作为另一种可能的实现方式,第一设备根据第一函数、第二函数和待分配的总任务确定第二设备执行的第一任务以及第四设备执行的第二任务,可以是:第一设备将第一函数和第二函数,或,第一函数的标识和第二函数的标识发送给其他设备,由其他设备执行分配流程,再将分配结果发送给第一设备。
可选地,在该实现方式下,如果该其他设备未知待分配的总任务,第一设备可以将待分配的总任务或总任务的标识发送给该其他设备。
该实施例中,第一设备获取了多个设备分别对应的函数之后,可以结合获取的函数和待分配的总任务,评估待分配的总任务在多个设备中执行的执行表现,根据执行表现及任务要求确定任务分配(或者说任务负荷分担)。其中,执行可能包括AI模型推理或训练。
示例性地,第一任务和所述第二任务满足第一规则,第一规则包括以下至少一项:
所述第一任务和所述第二任务同时执行完成;或者,
所述第一任务和所述第二任务按照预定义时序执行完成;或者,
所述第一任务执行完成的时刻和所述第二任务执行完成的时刻之间相差预设时间差;或者,
所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量相等;或者,
所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量之间的比例满足预设比例要求;或者,
所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量之间相差预设能量差。
示例性地,第一任务和所述第二任务包括但不限于以下任意一种:不同数量样本的AI模型训练、不同数量样本的AI模型推理、AI模型的不同阶段的训练、或AI模型的不同阶段的推理。
进一步地,第一设备根据分配结果向第二设备和第四设备发送第一任务和第二任务,第二设备接收并执行第一任务,第四设备接收并执行第二任务。
可选的,第二设备和第四设备按照指示反馈执行结果。
应理解,图4所示的实施例中以第一设备获取到两个设备分别对应的两个函数为例进行说明,对本申请的保护范围不构成任何的限定,第一设备还可以获取两个以上的设备分别对应的函数,并基于获取的函数进行任务分配,具体地分配目标和分配过程如图4所示的流程所示,这里不再赘述。
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解,在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
还应理解,在上述一些实施例中,主要以现有的网络架构中的设备为例进行了示例性说明(如第一设备、第二设备等),应理解,对于设备的具体形式本申请实施例不作限定。例如,在未来可以实现同样功能的设备都适用于本申请实施例。
可以理解的是,上述各个方法实施例中,由设备(如第一设备、第二设备)实现的方法和操作,也可以由设备的部件(例如芯片或者电路)实现。
以上,结合图2至图4详细说明了本申请实施例提供的通信方法。上述通信方法主要从第一设备、第二设备之间交互的角度进行了介绍。可以理解的是,第一设备、第二设备,为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。
本领域技术人员应该可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
以下,结合图5至图7详细说明本申请实施例提供第一设备、第二设备。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的内容可以参见上文方法实施例,为了简洁,部分内容不再赘述。
本申请实施例可以根据上述方法示例对第一设备、第二设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。下面以采用对应各个功能划分各个功能模块为例进行说明。
图5是本申请实施例提供的通信装置10的示意性框图。该装置10包括收发模块11和处理模块12。收发模块11可以实现相应的通信功能,处理模块12用于进行数据处理,或者说该收发模块11用于执行接收和发送相关的操作,该处理模块12用于执行除了接收和发送以外的其他操作。收发模块11还可以称为通信接口或通信单元。
可选地,该装置10还可以包括存储模块13,该存储模块13可以用于存储指令和/或数据,处理模块12可以读取存储模块中的指令和/或数据,以使得装置实现前述各个方法实施例中设备的动作。
在第一种设计中,该装置10可对应于上文方法实施例中的第一设备,或者是第一设备的组成部件(如芯片)。
该装置10可实现对应于上文方法实施例中的第一设备执行的步骤或者流程,其中,收发模块11可用于执行上文方法实施例中第一设备的收发相关的操作,处理模块12可用于执行上文方法实施例中第一设备的处理相关的操作。
在一种可能的实现方式,收发模块11,用于获取第一函数,所述第一函数用于评估第二设备执行人工智能AI模型所消耗的资源;处理模块12,用于根据所述第一函数确定所述第二设备执行第一AI模型所消耗的第一资源;收发模块11,用于根据所述第一资源确定是否向所述第二设备发送第一信息,所述第一信息包括以下至少一项:所述第一AI模型或所述第一AI模型的获取方式。
应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。
在第一种设计中,该装置10可对应于上文方法实施例中的第二设备,或者是第二设备的组成部件(如芯片)。
该装置10可实现对应于上文方法实施例中的第二设备执行的步骤或者流程,其中,收发模块11可用于执行上文方法实施例中第二设备的收发相关的操作,处理模块12可用于执行上文方法实施例中第二设备的处理相关的操作。
在一种可能的实现方式,收发模块11,用于获取第一函数和/或第一指示信息,所述第一指示信息用于指示获取所述第一函数的方式,或者所述第一指示信息为所述第一函数的标识,所述第一函数用于评估所述第二设备执行人工智能AI模型所消耗的资源;收发模块11,用于向第一设备发送所述第一函数和/或所述第一指示信息。
应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。
还应理解,这里的装置10以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,装置10可以具体为上述实施例中的移动管理网元,可以用于执行上述各方法实施例中与移动管理网元对应的各个流程和/或步骤;或者,装置10可以具体为上述实施例中的终端设备,可以用于执行上述各方法实施例中与终端设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。
上述各个方案的装置10具有实现上述方法中的设备(如第一设备和第二设备)所执行的相应步骤的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块;例如收发模块可以由收发机替代(例如,收发模块中的发送单元可以由发送机替代,收发模块中的接收单元可以由接收机替代),其它单元,如处理模块等可以由处理器替代,分别执行各个方法实施例中的收发操作以及相关的处理操作。
此外,上述收发模块11还可以是收发电路(例如可以包括接收电路和发送电路),处理模块可以是处理电路。
图6是本申请实施例提供另一种通信装置20的示意图。该装置20包括处理器21,处理器21用于执行存储器22存储的计算机程序或指令,或读取存储器22存储的数据/信令,以执行上文各方法实施例中的方法。可选地,处理器21为一个或多个。
可选地,如图6所示,该装置20还包括存储器22,存储器22用于存储计算机程序或指令和/或数据。该存储器22可以与处理器21集成在一起,或者也可以分离设置。可选地,存储器22为一个或多个。
可选地,如图6所示,该装置20还包括收发器23,收发器23用于信号的接收和/或发送。例如,处理器21用于控制收发器23进行信号的接收和/或发送。
作为一种方案,该装置20用于实现上文各个方法实施例中由第一设备或第二设备执行的操作。
应理解,本申请实施例中提及的处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者 该处理器也可以是任何常规的处理器等。
还应理解,本申请实施例中提及的存储器可以是易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM)。例如,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)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。
还需要说明的是,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
图7是本申请实施例提供一种芯片系统30的示意图。该芯片系统30(或者也可以称为处理系统)包括逻辑电路31以及输入/输出接口(input/output interface)32。
其中,逻辑电路31可以为芯片系统30中的处理电路。逻辑电路31可以耦合连接存储单元,调用存储单元中的指令,使得芯片系统30可以实现本申请各实施例的方法和功能。输入/输出接口32,可以为芯片系统30中的输入输出电路,将芯片系统30处理好的信息输出,或将待处理的数据或信令信息输入芯片系统30进行处理。
作为一种方案,该芯片系统30用于实现上文各个方法实施例中由第一设备和第二设备执行的操作。
例如,逻辑电路31用于实现上文方法实施例中由第一设备和第二设备执行的处理相关的操作;输入/输出接口32用于实现上文方法实施例中由第一设备和第二设备执行的发送和/或接收相关的操作。
本申请实施例还提供一种计算机可读存储介质,其上存储有用于实现上述各方法实施例中由第一设备和第二设备执行的方法的计算机指令。
本申请实施例还提供一种计算机程序产品,包含指令,该指令被计算机执行时以实现上述各方法实施例中由第一设备和第二设备执行的方法。
本申请实施例还提供了一种通信系统,包括前述的第一设备和第二设备。
上述提供的任一种装置中相关内容的解释及有益效果均可参考上文提供的对应的方法实施例,此处不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。此外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。例如,所述计算机可以是个人计算机,服务器,或者网络设备等。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD)等。例如,前述的可用介质包括但不限于:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random  access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (21)

  1. 一种通信方法,其特征在于,包括:
    第一设备获取第一函数,所述第一函数用于评估第二设备执行人工智能AI模型所消耗的资源;
    所述第一设备根据所述第一函数和第一AI模型的信息确定所述第二设备执行所述第一AI模型所消耗的第一资源;
    所述第一设备根据所述第一资源确定是否向所述第二设备发送第一信息,所述第一信息包括以下至少一项:所述第一AI模型或所述第一AI模型的获取方式。
  2. 根据权利要求1所述的方法,其特征在于,所述第一函数包括以下至少一项:
    根据第二信息和第三信息训练生成的第二AI模型;或者,
    根据所述第二信息和所述第三信息拟合形成的映射函数;或者,
    根据所述第二信息和所述第三信息统计获得的映射表格,
    其中,所述第一函数的输入与所述第二信息相关,所述第一函数的输出与所述第三信息相关,所述第二信息包括以下信息中的至少一项:AI算子的信息、AI模块的信息或第三AI模型的信息;
    所述第三信息包括以下信息中的至少一项:第三设备执行所述AI算子所消耗的资源、第三设备执行所述AI模块所消耗的资源、第三设备执行所述第三AI模型所消耗的资源,所述第三设备为所述第二设备或所述第三设备与所述第二设备具有相同的第一能力,所述第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。
  3. 根据权利要求2所述的方法,其特征在于,
    所述AI模块的信息包括以下至少一种:所述AI模块的类型信息、所述AI模块的参数、所述AI模块的前后模块信息、或所述AI模块的前后算子信息;
    所述AI算子的信息包括以下至少一种:所述AI算子的类型信息、所述AI算子的参数、所述AI算子的前后算子信息、或所述AI算子的前后模块信息;
    所述第三AI模型的信息包括以下至少一种:所述第三AI模型整体结构的参数或所述第三AI模型子结构的参数。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一AI模型的信息包括以下至少一种:构成所述第一AI模型的AI算子的信息、构成所述第一AI模型的AI模块的信息、所述第一AI模型整体结构的参数或所述第一AI模型子结构的参数。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一设备获取第一函数,包括:
    所述第一设备接收所述第一函数;或者,
    所述第一设备接收第一指示信息,并根据所述第一指示信息获取所述第一函数,其中,所述第一指示信息包括指示获取所述第一函数的方式的信息,和/或所述第一函数的标识。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,在所述第一资源满足第一条件的情况下,所述第一设备向所述第二设备发送所述第一信息,其中,所述第一条件与预设阈值相关。
  7. 根据权利要求6所述的方法,其特征在于,所述第一资源包括以下至少一项:时间或能量。
  8. 根据权利要求7所述的方法,其特征在于,在所述第一资源包括时间和能量的情况下,所述预设阈值包括第一预设阈值和第二预设阈值,所述第一预设阈值与所述时间相关,所述第二预设阈值与所述能量相关。
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,在所述第一设备根据所述第一资源确定是否向所述第二设备发送第一信息之前,所述方法还包括:
    所述第一设备接收来自所述第二设备的以下信息中的至少一项:处理资源指示信息或第二指示信息,
    其中,所述处理资源指示信息用于指示所述第二设备能够用于执行所述第一AI模型的处理资源的占比,所述第二指示信息用于指示调整所述第二设备执行所述第一AI模型所消耗的所述第一资源的取值。
  10. 根据权利要求9所述的方法,其特征在于,所述第一设备根据所述第一函数和第一AI模型的 信息确定所述第二设备执行所述第一AI模型所消耗的第一资源,包括:
    所述第一设备根据所述第一函数、第一AI模型的信息和以下信息中的至少一项确定所述第二设备执行第一AI模型所消耗的第一资源:所述资源指示信息或所述第二指示信息。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    第一设备获取第二函数,所述第二函数用于评估第四设备执行AI模型的所消耗的资源;
    所述第一设备根据所述第二函数和第四AI模型的信息确定所述第四设备执行所述第四AI模型所消耗的第二资源;
    在所述第一设备根据所述第一资源确定向所述第二设备发送第一信息,且根据所述第二资源确定向所述第四设备发送第四信息的情况下,所述第一设备根据所述第二函数和所述第一函数,确定所述第二设备执行的第一任务和所述第四设备执行的第二任务,所述第一任务和所述第二任务满足第一规则。
  12. 根据权利要求11所述的方法,其特征在于,所述第一规则包括以下至少一项:
    所述第一任务和所述第二任务同时执行完成;或者,
    所述第一任务和所述第二任务按照预定义时序执行完成;或者,
    所述第一任务执行完成的时刻和所述第二任务执行完成的时刻之间相差预设时间差;或者,
    所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量相等;或者,
    所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量之间的比例满足预设比例要求;或者,
    所述第一任务执行完成所需的能量和所述第二任务执行完成所需的能量之间相差预设能量差。
  13. 一种通信方法,其特征在于,包括:
    第二设备获取第一函数和/或第一指示信息,所述第一指示信息包括指示获取所述第一函数的方式的信息,和/或所述第一函数的标识,所述第一函数用于评估所述第二设备执行人工智能AI模型所消耗的资源;
    所述第二设备向第一设备发送所述第一函数和/或所述第一指示信息。
  14. 根据权利要求13所述的方法,其特征在于,所述第一函数包括以下至少一项:
    根据第二信息和第三信息训练生成的第二AI模型;或者,
    根据所述第二信息和所述第三信息拟合形成的映射函数;或者,
    根据所述第二信息和所述第三信息统计获得的映射表格,
    其中,所述第一函数的输入与所述第二信息相关,所述第一函数的输出与所述第三信息相关,所述第二信息包括以下信息中的至少一项:AI算子的信息、AI模块的信息或第三AI模型的信息;
    所述第三信息包括以下信息中的至少一项:第三设备执行所述AI算子所消耗的资源、第三设备执行所述AI模块所消耗的资源、第三设备执行所述第三AI模型所消耗的资源,所述第三设备为所述第二设备或所述第三设备与所述第二设备具有相同的第一能力,所述第一能力与所述AI算子、所述AI模块或所述第三AI模型的执行相关。
  15. 根据权利要求13或14所述的方法,其特征在于,所述方法还包括:
    所述第二设备接收来自所述第一设备的第一信息,所述第一信息包括以下至少一项:所述第一AI模型或所述第一AI模型的获取方式。
  16. 根据权利要求13至15中任一项所述的方法,其特征在于,所述方法还包括:
    所述第二设备向所述第一设备发送处理资源指示信息或第二指示信息,
    其中,所述处理资源指示信息用于指示所述第二设备能够用于执行所述第一AI模型的处理资源的占比,所述第二指示信息用于指示调整所述第二设备执行所述第一AI模型所消耗的所述第一资源的取值。
  17. 一种第一设备,其特征在于,所述第一设备包括处理器和存储器,所述处理器和所述存储器相耦合,所述存储器用于存储计算机程序,当所述处理器运行所述计算机程序时,使得所述第一设备执行如权利要求1-12中任意一项所述的方法。
  18. 一种第二设备,其特征在于,所述第二设备包括处理器和存储器,所述处理器和所述存储器相耦合,所述存储器用于存储计算机程序,当所述处理器运行所述计算机程序时,使得所述第二设备执 行如权利要求13-16中任意一项所述的方法。
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在第一终端上运行时,使得所述第一终端执行如权利要求1-16中任一项所述的方法。
  20. 一种计算机程序产品,其特征在于,包含指令,当所述计算机指令在第一终端上运行时,使得所述第一终端执行如权利要求1-16中任一项所述的方法。
  21. 一种芯片,其特征在于,所述芯片安装在第一终端中,所述芯片包括处理器与通信接口,所述处理器通过所述通信接口读取指令并运行时,使得所述第一终端执行如权利要求1-16中任一项所述的方法。
PCT/CN2023/106241 2022-07-21 2023-07-07 一种通信方法及通信装置 WO2024017074A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210864312.1 2022-07-21
CN202210864312 2022-07-21
CN202211044983.XA CN117479184A (zh) 2022-07-21 2022-08-30 一种通信方法及通信装置
CN202211044983.X 2022-08-30

Publications (1)

Publication Number Publication Date
WO2024017074A1 true WO2024017074A1 (zh) 2024-01-25

Family

ID=89617071

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/106241 WO2024017074A1 (zh) 2022-07-21 2023-07-07 一种通信方法及通信装置

Country Status (1)

Country Link
WO (1) WO2024017074A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020042112A1 (zh) * 2018-08-30 2020-03-05 华为技术有限公司 一种终端对ai任务支持能力的评测方法及终端
CN111949972A (zh) * 2020-02-19 2020-11-17 华控清交信息科技(北京)有限公司 人工智能模型的验证方法、系统、设备及存储介质
WO2021128110A1 (zh) * 2019-12-25 2021-07-01 华为技术有限公司 通信方法及装置
WO2021142609A1 (zh) * 2020-01-14 2021-07-22 Oppo广东移动通信有限公司 信息上报方法、装置、设备和存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020042112A1 (zh) * 2018-08-30 2020-03-05 华为技术有限公司 一种终端对ai任务支持能力的评测方法及终端
WO2021128110A1 (zh) * 2019-12-25 2021-07-01 华为技术有限公司 通信方法及装置
WO2021142609A1 (zh) * 2020-01-14 2021-07-22 Oppo广东移动通信有限公司 信息上报方法、装置、设备和存储介质
CN111949972A (zh) * 2020-02-19 2020-11-17 华控清交信息科技(北京)有限公司 人工智能模型的验证方法、系统、设备及存储介质

Similar Documents

Publication Publication Date Title
WO2022041947A1 (zh) 一种更新机器学习模型的方法及通信装置
CN115280338A (zh) 一种基于联邦学习的模型训练方法、电子设备及存储介质
CN104038456B (zh) 设备间直接通信的通信方法及通信节点
WO2023072049A1 (zh) 联邦学习方法及相关装置
WO2020073257A1 (zh) 无线通信方法和终端设备
EP4156028A1 (en) Multitask learning method and device
WO2021197087A1 (zh) 通信优先级确定方法及装置
CN114270723A (zh) 一种信道状态信息处理方法、电子设备及存储介质
WO2024017074A1 (zh) 一种通信方法及通信装置
WO2023040700A1 (zh) 一种人工智能ai通信方法及装置
WO2023141887A1 (zh) 语义通信的传输方法、终端设备
WO2022012256A1 (zh) 通信的方法及通信装置
WO2022001822A1 (zh) 获取神经网络的方法和装置
CN117479184A (zh) 一种通信方法及通信装置
JP7425197B2 (ja) スケジューリング方法及び装置
WO2022267633A1 (zh) 信息传输的方法和装置
WO2024108356A1 (zh) Csi反馈的方法、发端设备和收端设备
WO2023102706A1 (zh) 信息指示方法、信息处理方法和设备
WO2023088241A1 (zh) 一种人工智能ai通信方法及装置
WO2022151092A1 (zh) 信道数据传输方法、装置、通信设备及存储介质
WO2024046288A1 (zh) 通信方法和装置
WO2023001060A1 (zh) 一种通信方法及相关装置
WO2024067245A1 (zh) 模型匹配的方法和通信装置
WO2024016363A1 (zh) 异构人工智能ai框架的模型交互方法、装置及系统
EP4301005A1 (en) Communication method, device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23842139

Country of ref document: EP

Kind code of ref document: A1