AI network information transmission methods, devices and communication equipment
By converting AI network information into an ONNX file structure, the problem of limited information transmission between devices with different neural network frameworks is solved, enabling cross-framework information transmission and effective resource utilization.
Patent Information
- Application Number
- CN202111666991.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-12-31
AI Technical Summary
Communication devices with different neural network frameworks cannot directly read AI network information, which limits the transmission of AI network information between communication devices.
The information of the target AI network is converted into an Open Neural Network Exchange (ONNX) file structure, and transmitted between communication devices with different neural network frameworks through the ONNX file structure. The second end converts the ONNX file structure into an AI network under its own neural network framework.
It enables the transmission of AI network information between communication devices with different neural network frameworks, avoiding transmission obstruction and reducing transmission overhead during the communication process.
Smart Images

Figure CN116418797B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technology, specifically relating to an AI network information transmission method, apparatus, and communication equipment. Background Technology
[0002] Artificial Intelligence (AI) is a new technological science that studies and develops theories, methods, technologies, and application systems to simulate, extend, and expand human intelligence. It has attracted widespread attention, and its applications are becoming increasingly widespread. Currently, researchers have begun to explore the application of AI networks in communication systems; for example, network-side devices and terminals can transmit communication data via AI networks. However, different communication devices use different neural network frameworks, and the file structures for storing AI network information under different neural network frameworks differ. This can lead to communication devices being unable to read AI network information transmitted by other communication devices with different neural network frameworks, thus limiting the transmission of AI network information between communication devices. Summary of the Invention
[0003] This application provides an AI network information transmission method, apparatus, and communication device, which can solve the problem of limited transmission of AI network information between communication devices in related technologies.
[0004] Firstly, an AI network information transmission method is provided, including:
[0005] The first end converts the AI network information of the target AI network into an Open Neural Network Exchange (ONNX) file structure;
[0006] The first end sends the ONNX file structure to the second end.
[0007] Secondly, an AI network information transmission method is provided, including:
[0008] The second end receives the ONNX file structure sent by the first end, wherein the ONNX file structure is obtained by the first end from the AI network information of the target AI network.
[0009] Thirdly, an AI network information transmission device is provided, comprising:
[0010] The conversion module is used to convert the AI network information of the target AI network into an Open Neural Network Exchange (ONNX) file structure;
[0011] The sending module is used to send the ONNX file structure to the second end.
[0012] Fourthly, an AI network information transmission device is provided, comprising:
[0013] The receiving module is used to receive the ONNX file structure sent by the first end, wherein the ONNX file structure is obtained by the first end from the AI network information of the target AI network.
[0014] Fifthly, a communication device is provided, including a processor and a memory, the memory storing a program or instructions executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the AI network information transmission method as described in the first aspect, or implement the steps of the AI network information transmission method as described in the second aspect.
[0015] In a sixth aspect, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the AI network information transmission method as described in the first aspect, or implement the steps of the AI network information transmission method as described in the second aspect.
[0016] In a seventh aspect, a chip is provided, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the AI network information transmission method as described in the first aspect, or to implement the steps of the AI network information transmission method as described in the second aspect.
[0017] Eighthly, a computer program / program product is provided, which is stored in a storage medium and is executed by at least one processor to implement the steps of the AI network information transmission method as described in the first aspect, or to implement the steps of the AI network information transmission method as described in the second aspect.
[0018] In this embodiment, the first end converts the AI network information of the target AI network based on its own neural network framework into an ONNX file structure, and then sends the ONNX file structure to the second end. The second end can then convert the ONNX file structure into an AI network under its own neural network framework. This allows two communication devices with different neural network frameworks to transmit AI network information based on the ONNX file structure, avoiding obstruction of AI network information transmission between communication devices. Attached Figure Description
[0019] Figure 1 This is a block diagram of a wireless communication system applicable to embodiments of this application;
[0020] Figure 2 This is a flowchart of an AI network information transmission method provided in an embodiment of this application;
[0021] Figure 3 This is a flowchart of another AI network information transmission method provided in the embodiments of this application;
[0022] Figure 4 This is a structural diagram of an AI network information transmission device provided in an embodiment of this application;
[0023] Figure 5 This is a structural diagram of another AI network information transmission device provided in the embodiments of this application;
[0024] Figure 6 This is a structural diagram of a communication device provided in an embodiment of this application;
[0025] Figure 7 This is a structural diagram of a terminal provided in an embodiment of this application;
[0026] Figure 8 This is a structural diagram of a network-side device provided in an embodiment of this application;
[0027] Figure 9 This is a structural diagram of another network-side device provided in an embodiment of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0029] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0030] It is worth noting that the technologies described in this application are not limited to Long Term Evolution (LTE) / LTE-Advanced (LTE-A) systems, but can also be used in other wireless communication systems, such as Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency Division Multiple Access (SC-FDMA), and other systems. The terms "system" and "network" in this application are often used interchangeably, and the described technologies can be used with the systems and radio technologies mentioned above, as well as with other systems and radio technologies. The following description describes New Radio (NR) systems for illustrative purposes, and NR terminology is used in most of the following description; however, these technologies can also be applied to applications beyond NR systems, such as 6th generation (6G) radio systems. th Generation 6G communication system.
[0031] Figure 1This diagram illustrates a block diagram of a wireless communication system applicable to embodiments of this application. The wireless communication system includes a terminal 11 and a network-side device 12. Terminal 11 can be a mobile phone, tablet computer, laptop computer, personal digital assistant (PDA), handheld computer, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, vehicle-mounted device (VUE), pedestrian terminal (PUE), smart home (home devices with wireless communication capabilities, such as refrigerators, televisions, washing machines, or furniture), game console, personal computer (PC), ATM, or self-service machine, etc. Wearable devices include: smartwatches, smart bracelets, smart headphones, smart glasses, smart jewelry (smart bracelets, smart chains, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, etc. It should be noted that the specific type of terminal 11 is not limited in this embodiment. Network-side equipment 12 may include access network equipment or core network equipment. Access network equipment may also be referred to as radio access network equipment, radio access network (RAN), radio access network function, or radio access network unit. Access network equipment may include base stations, WLAN access points, or WiFi nodes, etc. Base stations may be referred to as Node B, evolved Node B (eNB), access point, base transceiver station (BTS), radio base station, radio transceiver, Basic Service Set (BSS), Extended Service Set (ESS), home B node, home evolved B node, Transmitting Receiving Point (TRP), or any other suitable term in the field, as long as the same technical effect is achieved. The base station is not limited to specific technical terms. It should be noted that this application embodiment only uses a base station in an NR system as an example for description and does not limit the specific type of base station.Core network equipment may include, but is not limited to, at least one of the following: core network node, core network function, Mobility Management Entity (MME), Access and Mobility Management Function (AMF), Session Management Function (SMF), User Plane Function (UPF), Policy Control Function (PCF), Policy and Charging Rules Function (PCRF), Edge Application Server Discovery Function (EASDF), Unified Data Management (UDM), Unified Data Repository (UDR), Home Subscriber Server (HSS), Centralized network configuration (CNC), Network Repository Function (NRF), Network Exposure Function (NEF), Local NEF (or L-NEF), Binding Support Function (BSF), and Application Function. Function (AF), etc. It should be noted that the embodiments of this application only use the core network equipment in the NR system as an example for introduction, and do not limit the specific type of core network equipment.
[0032] To better understand, the relevant concepts that may be involved in the embodiments of this application are explained below.
[0033] Neural Network Framework
[0034] There are many implementation frameworks for neural networks, including TensorFlow, PyTorch, Keras, MXNet, and Caffe2, each with its own focus. For example, Caffe2 and Keras are high-level deep learning frameworks that can quickly validate models, while TensorFlow and PyTorch are low-level deep learning frameworks that allow modification of the underlying details of neural networks. Furthermore, PyTorch focuses on supporting dynamic graph models, TensorFlow focuses on supporting various hardware and fast execution speed, and Caffe2 focuses on lightweight operation. Each implementation framework uses its own method to describe neural networks and complete operations such as network construction, training, and inference.
[0035] Typically, network information from two different neural network frameworks is stored in different file structures, making it impossible to read directly. It requires interaction through other standard structures.
[0036] Open Neural Network Exchange (ONNX)
[0037] ONNX is an AI interaction network. ONNX itself is only a data structure used to describe an AI network, without including the implementation details. ONNX stores the entire AI network, including its structure and parameters, in the computational graph protocol class (GraphProto). It completes the basic description of the AI network through the node protocol class (NodeProto), parameter information protocol class (ValueInfoProto), and tensor protocol class (TensorProto). NodeProto describes the network structure; ONNX describes each operator of the AI network as a node. The names of each node's inputs and outputs are globally unique, and the network structure is described by matching these names. All network parameters are treated as inputs or outputs and are also retrieved by name. Therefore, ONNX can represent the entire network structure through a series of NodeProto entities. ValueInfoProto describes all input and output information, including dimensions and element types, indicating the size of the corresponding elements, and the correspondence between the name of each input / output and the record in the NodeProto. TensorProto stores the numerical values of specific network parameters, retrieving the corresponding parameters from their storage locations based on the names of each node's inputs and outputs.
[0038] In addition, ONNX records the functionality of nodes through the attribute protocol class (AttributeProto), such as convolutional layers, multiplication layers, etc., and assigns corresponding node functions. The values of the hyperparameters required for these functions are stored in TensorProto, and the dimensions of the hyperparameters are stored in ValueInfoProto.
[0039] In some embodiments, a protocol class (Proto, Protocol) can also be called a structure, such as a node structure (NodeProto), a parameter information structure (ValueInfoProto), a tensor structure (TensorProto), an attribute structure (AttributeProto), etc. A Proto can be considered as data, files, etc., formed based on a specific protocol.
[0040] The AI network information transmission method provided in this application will be described in detail below with reference to the accompanying drawings and through some embodiments and application scenarios.
[0041] Please refer to Figure 2 , Figure 2 This is a flowchart of an AI network information transmission method provided in an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0042] Step 201: The first end converts the AI network information of the target AI network into an ONNX file structure;
[0043] Step 202: The first end sends the ONNX file structure to the second end.
[0044] In this embodiment, the first end converts the AI network information of the target AI network into an ONNX file structure. For example, if the AI network information includes the complete network structure and all network parameters of the target AI network, the first end expresses the network structure and network parameters in an ONNX file structure based on the ONNX structure. For example, the network structure is described by a node protocol class (NodeProto) and a parameter information protocol class (ValueInfoProto), and the network parameters are described by a tensor protocol class (TensorProto), etc.
[0045] Furthermore, the first end sends the ONNX file structure to the second end, and the second end converts the ONNX file structure into an AI network under its own neural network framework, so as to realize the training and application of the AI network by the second end.
[0046] In this embodiment, the first end converts the AI network information of the target AI network applicable to its own neural network framework into an ONNX file structure, and then sends the ONNX file structure to the second end. The second end can then convert the ONNX file structure into an AI network under its own neural network framework. This allows two communication devices with different neural network frameworks to transmit AI network information based on the ONNX file structure, avoiding obstruction of AI network information transmission between communication devices.
[0047] It should be noted that the AI network information includes at least one of the network structure and network parameters of the target AI network. For example, the AI network information includes the complete network structure and all network parameters of the target AI network, or it includes only the complete network structure of the target AI network, or only the updated AI network structure of the target AI network, or only some network parameters of the target AI network, or only some values of the network parameters of the target AI network, and so on. In this way, the network structure and network parameters of the AI network can be sent separately, thus eliminating the need to transmit the entire AI network, including the entire network structure and network parameters, during communication, effectively reducing transmission overhead during communication.
[0048] In this embodiment of the application, the ONNX file structure includes a target protocol class, which includes at least one of the following: Node Protocol Class (NodeProto), Parameter Information Protocol Class (ValueInfoProto), Tensor Protocol Class (TensorProto), and Attribute Protocol Class (AttributeProto).
[0049] Among them, NodeProto is used to describe the network structure; ValueInfoProto is used to describe all input, output and network parameter information, including dimensions and element types, indicating the size of the corresponding elements, and the name or index of each input, output and network parameter and its correspondence recorded in NodeProto; TensorProto is used to store the values of specific network parameters, and the corresponding parameters are obtained from the storage location according to the name of each node's input and output; AttributeProto is used to record the function of the node, such as convolutional layer, multiplication layer, etc., and assign the corresponding node function, while the values of the hyperparameters required for these functions are stored in TensorProto, and the dimensions of the hyperparameters are stored in ValueInfoProto.
[0050] It should be noted that the target protocol class includes at least one of the aforementioned node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class, and the ONNX file structure also includes at least one of these three classes. For example, if the target protocol class includes a node protocol class, the node protocol class can be used to compose a complete onnx.proto file to generate the ONNX file structure; if the target protocol class includes a node protocol class, parameter information protocol class, and tensor protocol class, then the onnx.proto file is composed of these three classes to generate the ONNX file structure. Of course, the protocol classes included in the ONNX file structure can also be other possible cases, which will not be listed in detail here.
[0051] Optionally, the ONNX file structure includes at least one computation graph protocol class (GraphProto), which includes the target protocol class. That is, when the target protocol class includes at least one of the above-mentioned node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class, the content included in the target protocol class can be written into the computation graph protocol class.
[0052] For example, if the target protocol class includes a node protocol class, a parameter information protocol class, and a tensor protocol class, then these three classes are written into a computation graph protocol class. An ONNX file structure is generated based on this computation graph protocol class, and the first end sends the ONNX file structure to the second end. This combines the node protocol class, parameter information protocol class, and tensor protocol class for transmission.
[0053] Optionally, the ONNX file structure may include multiple image protocol classes, and the target protocol classes included in each computation graph protocol class may be different. For example, the ONNX file structure includes two computation graph protocol classes, one of which includes node protocol classes and parameter information protocol classes, and the other includes tensor protocol classes. In addition, each computation graph protocol class may also include multiple node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
[0054] It should be noted that the ONNX file structure may also include a model protocol class (ModelProto). The model protocol class includes a computation graph protocol class, which in turn includes several node protocol classes, parameter information protocol classes, and tensor protocol classes. The node protocol class may contain several attribute protocol classes. In this embodiment, the ONNX file structure may include multiple computation graph protocol classes, regardless of whether a model protocol class is present. That is, the ONNX file structure in this embodiment may not include a model protocol class, thus eliminating the need to transmit the model protocol class. This saves transmission overhead on communication devices and is more conducive to the application of the ONNX file structure in air interface transmission.
[0055] Optionally, the target protocol class can be any one of the following: NodeProto, ValueInfoProto, TensorProto, and AttributeProto. When there are at least two ONNX file structures, one ONNX file structure corresponds to one target protocol class. In this case, the first end sends the ONNX file structure to the second end, including any one of the following:
[0056] The first end sends the at least two ONNX file structures to the second end in a combined manner;
[0057] The first end sends the at least two ONNX file structures to the second end respectively.
[0058] In this embodiment, each proto can be independently configured as an ONNX file structure, and thus one ONNX file structure corresponds to one type of proto. For example, if the AI network information of the target AI network includes network structure and weight parameters, and the AI network information generates node protocol classes, parameter information protocol classes, and tensor protocol classes based on the ONNX structure, then the node protocol class corresponds to one ONNX file structure, the parameter information protocol class corresponds to one ONNX file structure, and the tensor protocol class corresponds to one ONNX file structure, resulting in three ONNX file structures. This makes the generation of ONNX file structures more flexible, facilitates the differentiation of ONNX file structures at the second end, and allows the transmission of ONNX file structures in different time slots and time-frequency positions, making more efficient use of time-frequency resources and facilitating scheduling.
[0059] Optionally, the first end can send the three ONNX file structures to the second end separately, for example, by sending the three ONNX file structures sequentially; alternatively, the first end can merge the three ONNX file structures and send the merged three ONNX file structures to the second end all at once. Thus, the second end can clearly identify that each ONNX file structure corresponds to a specific proto type, making it easier for the second end to convert the ONNX file structure into AI network information within its own neural network framework.
[0060] In this embodiment of the application, when the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, after the first end sends the ONNX file structure to the second end, the method further includes:
[0061] The first end sends the values of the network parameters of the target AI network to the second end.
[0062] Specifically, after the first end transmits the ONNX file structure containing the node protocol class and parameter information protocol class to the second end, the first end can also send the network parameter values of the target AI network to the second end. Understandably, since the first end has already sent the ONNX file structure containing the node protocol class and parameter information protocol class to the second end, the second end already knows the number and overhead of the network parameters. The first end can directly send the specific values of the network parameters according to the order of the parameter information protocol class without converting them into an ONNX file structure, and the second end receives the specific values of each parameter in sequence. The node protocol class and parameter information protocol class can be contained within a single ONNX file structure, or each can correspond to a separate ONNX file structure.
[0063] Optionally, the first end sends the values of the network parameters of the target AI network to the second end, including:
[0064] The first end sends the values of the network parameters of the target AI network to the second end through a data channel.
[0065] In this embodiment of the application, the ONNX file structure includes a first numeric index and a second numeric index of integer type. The first numeric index is used to identify the target protocol class, and one target protocol class corresponds to one first numeric index. The second numeric index is used to identify at least one of the network parameters, inputs and outputs of the target AI network.
[0066] Understandably, the protocol classes included in the ONNX file structure can be identified by a first numerical index. In this embodiment, the target protocol class includes at least one of node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. One protocol class can correspond to one first numerical index. For example, if the ONNX file structure includes a total of 5 protocol classes, these 5 protocol classes can be represented by 5 first numerical indices (e.g., 1, 2, 3, 4, 5).
[0067] Alternatively, a protocol class type can correspond to a numerical index. For example, if there are a total of 5 protocol classes and 4 protocol class types, then these 5 protocol classes can be represented by 4 first numerical indices.
[0068] Alternatively, each protocol class type can correspond to a sequence of numeric indices. For example, there are a total of 3 node protocol classes, 4 parameter information protocol classes, and 1 tensor protocol class. The 3 node protocol classes can be represented by numeric indices 0, 1, and 2; the 4 parameter information protocol classes can be represented by 0, 1, 2, and 3; and the tensor protocol class can be represented by 0. The sequences of the three protocol classes are distinguished by specific identifiers.
[0069] In this embodiment, the content described by the target protocol class can be identified using a second numerical index. For example, a node protocol class is used to describe the network structure of the target AI network. The names of the inputs and outputs of each node in the network structure are unique. A node protocol class can describe the inputs and outputs of a node in the network structure, as well as the related network parameters. Therefore, the inputs, outputs, and network parameters corresponding to a node protocol class can be identified using a second numerical index; for example, the inputs, outputs, and network parameters each correspond to three different second numerical indices. Similarly, the content described by other protocol classes can also be identified using a second numerical index.
[0070] Thus, for the ONNX file structure, the first numeric index identifies the protocol class included in the ONNX file structure, and the second numeric index identifies the content described by the protocol class. Both the first and second numeric indices are integer (int) type indices. Compared to identifying using strings, using integer type indices can more effectively save transmission overhead.
[0071] Optionally, when the ONNX file structure includes a node protocol class, the node protocol class includes a second numeric index for characterizing the inputs and outputs of the target AI network. It should be noted that other protocol classes, such as parameter information protocol classes, tensor protocol classes, and attribute protocol classes, can also use a second numeric index to identify the content described by that protocol class, such as the network parameters, inputs, and outputs of the target AI network.
[0072] Optionally, when the number of inputs and outputs of the target AI network is multiple and consecutive, the node protocol class includes a target digital index and at least one of the number of inputs and outputs of the target AI network, wherein the target digital index is a digital index in the second digital index used to identify the first input and the first output among the multiple inputs and outputs of the target AI network.
[0073] It should be noted that the ONNX file structure describes the network structure of the target AI network through node protocol classes. The network structure includes multiple nodes, and each node corresponds to at least one input and at least one output. When the number of nodes in the network structure is multiple and consecutive, the input and output of a node correspond to a second numeric index, and thus should correspond to multiple consecutive second numeric indices. In this case, the node protocol class in the ONNX file structure can only include the second numeric index (i.e., the target numeric index) used to identify the input and output of the first node among the multiple nodes and the total number of nodes.
[0074] For example, the target AI network structure includes 3 nodes. The input and output of the same node correspond to a second numerical index, resulting in 3 second numerical indices, such as 11, 12, and 13. In this case, the node protocol class includes the second numerical index used to identify the input and output of the first node and the total number of nodes (i.e., the number of inputs and outputs). Therefore, the node protocol class in the ONNX file structure would include 11 and 3, eliminating the need to include all the second numerical indices. When the target AI network has a large number of inputs and outputs, it is unnecessary to include the second numerical index used to identify each input and output. The node protocol class only needs to include the target numerical index and the total number of inputs and outputs, thus saving content in the ONNX file structure and effectively reducing the transmission overhead. After receiving the ONNX file structure, the second end can derive the second numerical index corresponding to each input and output based on the target numerical index and the total number of inputs and outputs.
[0075] In this embodiment, a parameter information protocol class is used to describe at least one of the inputs, outputs, and network parameters corresponding to network nodes in the target AI network. The parameter information protocol class includes a first element type and dimension information. Specifically, the parameter information protocol class is used to describe the information of all inputs and outputs of the target AI network. The parameter information protocol class includes dimension information and a first element type, indicating the size of the corresponding element. The name of each input and output corresponds to the input and output recorded in the node protocol class.
[0076] Optionally, the first element type is represented by the integer length of the quantization bit. That is, the first element type is replaced by the quantization bit, so the first element type can be omitted and a default type, such as integer (int) length, can be used. In other words, the quantization bit is an integer length, and the first element type can be represented by specifying the integer length.
[0077] Optionally, the first element type corresponds to a network node or network parameter of the target AI network. This can be achieved through a pre-defined correspondence, such as using a corresponding integer length for a certain type of network node or network parameter, for example, using a 3-bit integer for the weights of a convolutional node and a 1-bit integer for the bias.
[0078] It should be noted that the element type in the ONNX file structure is currently defined as follows:
[0079] enum DataType{UNDEFINED=0; FLOAT=1; UINT8=2;...INT32=6; INT64=7; STRING=8; BOOL=9;...COMPLEX128=15;...}
[0080] In this embodiment, the element type can be modified to int1 = 0, int2 = 1, int3 = 2, int4 = 3..., where int1 represents a 1-bit index, i.e., only 0 and 1 values, and int2 corresponds to an index of 00 01 10 11 or 0123. The specific quantization table corresponding to the index is determined by the protocol according to the function of the AI network, or configured by the base station. Optionally, the first element type and the subsequent second element type can be represented by such an integer length.
[0081] In this embodiment of the application, a network node of the target AI network corresponds to a parameter information protocol class. The parameter information protocol class represents at least one of the input, output and network parameters of the corresponding network node through dimension information. The dimension information includes the dimension number value and the dimension size value. For example, for a 3-dimensional matrix (2×6×14), the dimension number value is 3, that is, the dimension is 3, and the dimension size value is 2×6×14=168, then the dimension information includes (3,2,6,14) or (3,(2,6,14)).
[0082] Optionally, the dimension size is the number of values included in the corresponding dimension, and the values are normalized values. For example, for a 3-dimensional matrix (2×6×14), the dimension size is 168, meaning that the dimension includes 168 values, and these values are normalized values.
[0083] Optionally, the dimension information in the parameter information protocol class includes the corresponding dimension quantity value and dimension size value. The dimension quantity value in the parameter information protocol class is arranged according to a preset order, and the dimension size value in the parameter information protocol class is arranged according to the preset order. The preset order is the preset arrangement order of the network parameters of the target AI network.
[0084] In this embodiment, one network parameter of the target AI network corresponds to one parameter information protocol class. The parameter information protocol class includes dimension information, which includes a dimension quantity value and a dimension size value. The dimension quantity value and dimension size value describe the network parameter corresponding to the parameter information protocol class, thus each network parameter corresponds to one dimension quantity value and one dimension size value. When the target AI network includes multiple network parameters, the ONNX file structure includes multiple corresponding parameter information protocol classes. Since each parameter information protocol class includes a dimension quantity value and a dimension size value, the ONNX file structure correspondingly includes multiple dimension quantity values and multiple dimension size values. In this case, these dimension quantity values and dimension size values can be arranged according to a preset order of network parameters in the target AI network. For example, all dimension quantity values can be arranged first according to the preset order of network parameters, and then all dimension size values can be arranged according to the preset order of network parameters. This way, the dimension quantity values use the same bit length, and after parsing the dimension quantity value, the second end knows the bit length corresponding to the subsequent dimension size value, thus omitting the network parameter identifier and saving transmission overhead.
[0085] Optionally, when the target parameter information protocol class is used to characterize the target network parameter, the target parameter information protocol class includes the position of the maximum value, the maximum value being the largest value among the values of the target network parameter, and the target tensor protocol class corresponding to the target network parameter includes the quantized value of the ratio of each remaining value in the target network parameter to the maximum value, the remaining values being the other values in the dimension corresponding to the target parameter information protocol class besides the maximum value.
[0086] Wherein, the target network parameter is any network parameter of the target AI network, the target parameter information protocol class is the parameter information protocol class in the ONNX file structure used to represent the target network parameter, and the target tensor protocol class is the tensor protocol class corresponding to the target network parameter represented by the target parameter information protocol class. For example, if the target network parameter includes 168 values, then the target parameter information protocol class corresponding to the target network parameter includes the position of the largest value among these 168 values, and the remaining 167 values are represented by the target tensor protocol class corresponding to the target network parameter, which includes the quantized value of the ratio of these 167 values to the largest value.
[0087] In this embodiment of the application, the parameter information protocol class further includes an indication parameter for indicating the position of non-zero values in the network parameters. Accordingly, values that are quantized to 0 or less than the minimum quantization threshold in the tensor protocol class corresponding to the network parameter may be omitted.
[0088] It should be noted that the current definition of the parameter information protocol class in the ONNX file structure is as follows:
[0089] {optional string name = 1;
[0090] optional Typeproto type=2;
[0091] optional string doc_string=3;}
[0092] In this embodiment, Typeproto can be modified to int to record the element type, i.e., the quantization bit depth. When there is no record, it can be the same as the previous parameter information protocol class; or type can be deleted and Typeproto can be stored in the computation graph protocol class, indicating that all parameter information protocol classes use the same quantization bit depth.
[0093] In this embodiment, the tensor protocol class includes a second element type and a numerical value; alternatively, the tensor protocol class may only include numerical values. The tensor protocol class is used to characterize the network parameters of the target AI network, using the second element type and numerical value to characterize information such as the name and value of the network parameters.
[0094] Optionally, the second element type is characterized by the integer length of the quantized bits, that is, the second element type only needs to indicate the length.
[0095] Optionally, the second element type corresponds to the first element type in the parameter information protocol class. For example, the second element type and the first element type are used to describe the same network parameter. The correspondence can be sorted according to the index order of the network parameters of the target AI network.
[0096] Optionally, the order of the second element types in the tensor protocol class is the same as the order of the first element types in the parameter information protocol class. It should be noted that the names and / or indices of network parameters may be omitted in the tensor protocol class.
[0097] In this embodiment, the ONNX file structure includes a list of protocol classes, with each list corresponding to a protocol class type. These protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes. In other words, proto files can be stored by category, with one type of proto corresponding to one list of protocol classes. For example, if the ONNX file structure includes node protocol classes, parameter information protocol classes, and tensor protocol classes, then the ONNX file structure also includes three lists: a node protocol list, a parameter information protocol class list, and a tensor protocol class list. It should be noted that the protocol class list can include multiple corresponding protocol classes. For example, the node protocol class list stores multiple node protocol classes, arranged in a certain order. Each protocol class stored in the protocol class list includes a corresponding list indicator, which indicates the position of the protocol class in the list.
[0098] It should be noted that for an AI network, the reading order of network nodes can be agreed upon, such as from the inside out or from top to bottom. For example, all node protocol classes can be arranged in order, meaning that the input of each node must be one or more nodes that precede it, thus eliminating the need for a list of each node.
[0099] Optionally, if the length of each node protocol class is also predetermined by the protocol or configured by the base station, then the corresponding node protocol class can be found through offset. When deleting, inserting, or adding a node protocol class, the corresponding position can be found directly. Similarly, the same applies to parameter information protocol classes and tensor protocol classes; they can be arranged into corresponding lists according to the order recorded in the node protocol classes.
[0100] Optionally, the method may further include:
[0101] The first end sends an instruction message to the second end; or,
[0102] The first end sends the ONNX file structure to the second end, including:
[0103] The first end sends the ONNX file structure carrying indication information to the second end;
[0104] The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
[0105] In other words, the indication information can be sent separately or included in the ONNX file structure. Optionally, each protocol class list can form a separate ONNX file structure, and the second end can determine the start and / or end position of this protocol class list in the ONNX file structure based on the indication information.
[0106] Optionally, after receiving the ONNX file structure, the second end can add some content to the ONNX file structure. For example, if the first end is a core network device and the second end is a base station, the ONNX file structure sent by the core network device to the base station only includes node protocol information. After receiving the ONNX file structure, the base station can supplement it with parameter information, protocol information, and tensor protocol information. Alternatively, the ONNX file structure sent by the core network device to the base station may include all node protocol information, all parameter information, protocol information, and some tensor protocol information corresponding to the target AI network. The base station can then supplement other tensor protocol information at relevant positions based on the start and end positions of the list corresponding to the tensor protocol types.
[0107] It should be noted that the protocol class list can be a grouping of proto, for example, grouping or segmenting according to the function or requirements of proto.
[0108] In this embodiment, the ONNX file structure includes a predefined index, which is used to represent preset network nodes. For example, the first end can predefine some commonly used or historically used network nodes as preset network nodes, and represent these preset network nodes through the predefined index. The second end can obtain information such as the function and input / output dimensions of the corresponding preset network nodes based on the predefined index. By setting the predefined index, it is not necessary to represent all network nodes through node protocol classes, thus reducing the number of node protocol classes in the ONNX file structure and saving transmission overhead.
[0109] Optionally, the network nodes include Discrete Fourier Transform (DFT) nodes, Inverse Discrete Fourier Transform (IDFT) nodes, filtering nodes, etc.
[0110] When the target AI network is updated, the preset network node can be an outdated network node within the target AI network. Optionally, when updating the target AI network, outdated network nodes can be used as preset network nodes, and these outdated network nodes can then be represented in the ONNX file structure using predefined indexes. Optionally, outdated network nodes can be merged into a single node and indicated by a predefined index, such as the index corresponding to a historical node.
[0111] In this embodiment of the application, the first end converts the AI network information of the target AI network into an ONNX file structure, including:
[0112] The first end converts the first AI network information of the target AI network into a first ONNX file structure and converts the second AI network information of the target AI network into a second ONNX file structure, wherein the target protocol class included in the first ONNX file structure is different from the target protocol class included in the second ONNX file structure;
[0113] The first end sends the ONNX file structure to the second end, including:
[0114] The first end sends the first ONNX file structure and the second ONNX file structure to the second end.
[0115] In other words, when generating the ONNX file structure, the first end can generate different ONNX file structures based on the protocol class type. Each ONNX file structure includes a different protocol class, and then these ONNX file structures are sent separately. For example, the first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class. The first end sends these two ONNX file structures to the second end respectively.
[0116] It should be noted that, depending on the number of protocol types, the first end can generate multiple ONNX file structures. For example, if the AI network information of the target AI network corresponds to the node protocol type, parameter information protocol type, and tensor protocol type respectively, the first end can generate three ONNX file structures respectively, corresponding to the node protocol type, parameter information protocol type, and tensor protocol type, and send these three ONNX file structures respectively.
[0117] Of course, the first end can also include all protocol classes in an ONNX file structure.
[0118] Optionally, the protocol classes corresponding to the first and second ONNX file structures can be of various types. For example, the first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class; or, the first ONNX file structure includes both a node protocol class and a parameter information protocol class, and the second ONNX file structure includes a tensor protocol class; or, the first ONNX file structure includes a node protocol class, and the second ONNX file structure includes both a parameter information protocol class and a tensor protocol class.
[0119] To better understand, the technical solutions of the embodiments of this application will be described below through specific examples.
[0120] Terminal and network-side equipment use a joint AI network to provide Channel State Information (CSI) feedback. Specifically, the terminal converts the channel information into several bits of CSI feedback information through the AI network and reports it to the base station. The base station receives the bit information fed back by the terminal and recovers the channel information through the base station's AI network.
[0121] Since the AI networks of base stations and terminals need to be jointly trained, and different cell channel conditions may require new network parameters, when a terminal accesses the network, the base station needs to send the network parameters used by the terminal to the terminal.
[0122] The network fed back by CSI can be divided into two parts: the terminal encoding part and the base station decoding part. The terminal only needs to obtain the network structure of the encoding part.
[0123] The core network equipment sends the encoded network structure to the terminal via Non-access Stratum (NAS) information. This information can be an ONNX file structure containing only NodeProto information, or a file structure containing a list of NodeProtos. After the core network equipment sends this ONNX file structure to the base station, the base station forwards it to the terminal.
[0124] After receiving the NAS information from the core network equipment, if the NAS information is transparent to the base station, the base station directly forwards the NAS information, then saves the weight parameters into an ONNX file structure containing only ValueInfoProto and TensorProto, and sends it to the terminal via Radio Resource Control (RRC) signaling.
[0125] If the NAS signaling base station can interpret it, the base station can send the NodeProto ONNX file structure together with its own ONNX file structure including ValueInfoProto and TensorProto to the terminal via RRC signaling, or merge the two into a single ONNX file structure and send it to the terminal.
[0126] Optionally, the base station can supplement the ValueInfoProto and TensorProto information into the ONNX file structure of the NAS information and still forward it to the user according to the NAS information.
[0127] Alternatively, the core network equipment can send an ONNX file structure including NodeProto, ValueInfoProto, and TensorProto, where ValueInfoProto and TensorProto can be partial or complete. After receiving the NAS information, if it is transparent and directly forwarded, the base station then sends its own ONNX file structure of ValueInfoProto and TensorProto via RRC signaling. If it is non-transparent, the base station can send its own ONNX file structure together with the core network equipment's ONNX file structure to the terminal via RRC, or merge them and send them to the terminal.
[0128] Please refer to Figure 3 , Figure 3 This is a flowchart of another AI network information transmission method provided in the embodiments of this application, such as... Figure 3 As shown, the method includes the following steps:
[0129] Step 301: The second end receives the ONNX file structure sent by the first end. The ONNX file structure is obtained by the first end from converting the AI network information of the target AI network.
[0130] In this embodiment, the first end converts the AI network information of the target AI network into an ONNX file structure. For example, if the AI network information includes the complete network structure and all network parameters of the target AI network, the first end expresses the network structure and network parameters into an ONNX file structure based on the ONNX structure. For example, the network structure is described using a node protocol class (NodeProto) and a parameter information protocol class (ValueInfoProto), and the network parameters are described using a tensor protocol class (TensorProto), etc. The specific implementation of the first end converting the AI network information into an ONNX file structure can be found in [reference needed]. Figure 2 The descriptions in the previous embodiments will not be repeated in this embodiment.
[0131] In this embodiment, the second end receives the ONNX file structure sent by the first end, and converts the ONNX file structure into an AI network under its own neural network framework to enable the second end to train and apply the AI network. This allows two communication devices with different neural network frameworks to transmit AI network information based on the ONNX file structure, avoiding obstruction of AI network information transmission between communication devices.
[0132] It should be noted that the AI network information includes at least one of the network structure and network parameters of the target AI network. For example, the AI network information includes the complete network structure and all network parameters of the target AI network, or it includes only the complete network structure of the target AI network, or only the updated AI network structure of the target AI network, or only some network parameters of the target AI network, or only some values of the network parameters of the target AI network, and so on. In this way, the network structure and network parameters of the AI network can be sent separately, thus eliminating the need to transmit the entire AI network, including the entire network structure and network parameters, during communication, effectively reducing transmission overhead during communication.
[0133] In this embodiment of the application, the ONNX file structure includes a target protocol class, which includes at least one of the following: Node Protocol Class (NodeProto), Parameter Information Protocol Class (ValueInfoProto), Tensor Protocol Class (TensorProto), and Attribute Protocol Class (AttributeProto).
[0134] Optionally, the ONNX file structure includes at least one computation graph protocol class (GraphProto), which includes the target protocol class. That is, when the target protocol class includes at least one of the above-mentioned node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class, the content included in the target protocol class can be written into the computation graph protocol class.
[0135] Optionally, the target protocol class includes any one of the node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. When the number of ONNX file structures is at least two, one ONNX file structure corresponds to one target protocol class.
[0136] The second end receives the ONNX file structure sent by the first end, including any one of the following:
[0137] The second end receives at least two of the ONNX file structures that are merged and sent by the first end;
[0138] The second end receives at least two of the ONNX file structures sent by the first end.
[0139] In this embodiment, each proto can be independently configured as an ONNX file structure, and thus one ONNX file structure corresponds to one type of proto. For example, if the AI network information of the target AI network includes network structure and weight parameters, and the AI network information generates node protocol class, parameter information protocol class, and tensor protocol class based on the ONNX structure, then the node protocol class corresponds to one ONNX file structure, the parameter information protocol class corresponds to one ONNX file structure, and the tensor protocol class corresponds to one ONNX file structure, resulting in three ONNX file structures.
[0140] Optionally, the first end can send the three ONNX file structures to the second end separately, for example, by sending the three ONNX file structures sequentially; alternatively, the first end can merge the three ONNX file structures and send the merged three ONNX file structures to the second end all at once. Then, the second end can perform the corresponding receiving action, and for each received ONNX file structure, it can clearly identify that one ONNX file structure corresponds to one proto type, making it easier for the second end to convert the ONNX file structure into AI network information within its own neural network framework.
[0141] Optionally, if the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, after the second end receives the ONNX file structure sent by the first end, the method further includes:
[0142] The second end receives the network parameter values of the target AI network sent by the first end.
[0143] Specifically, after the first end transmits the ONNX file structure containing the node protocol class and parameter information protocol class to the second end, the first end can also send the network parameter values of the target AI network to the second end. Understandably, since the first end has already sent the ONNX file structure containing the node protocol class and parameter information protocol class to the second end, the second end already knows the number and overhead of the network parameters. The node protocol class and parameter information protocol class can be contained within a single ONNX file structure, or each can correspond to a separate ONNX file structure.
[0144] Optionally, the second end receives the values of the network parameters of the target AI network sent by the first end through the data channel.
[0145] In this embodiment of the application, the ONNX file structure includes a first numeric index and a second numeric index of integer type. The first numeric index is used to identify the target protocol class, and one target protocol class corresponds to one first numeric index. The second numeric index is used to identify at least one of the network parameters, inputs and outputs of the target AI network.
[0146] Optionally, if the ONNX file structure includes a node protocol class, the node protocol class includes a second digital index for characterizing the inputs and outputs of the target AI network.
[0147] Optionally, when the number of inputs and outputs of the target AI network is multiple and consecutive, the node protocol class includes a target number index, and includes at least one of the number of inputs and the number of outputs of the target AI network;
[0148] The target digital index is the digital index in the second digital index used to identify the first input and the first output among the multiple inputs and outputs of the target AI network.
[0149] Optionally, a parameter information protocol class is used to characterize at least one of the input, output, and network parameters corresponding to a network node in the target AI network, and the parameter information protocol class includes a first element type and dimension information.
[0150] Optionally, the first element type is characterized by the integer length of the quantization bits.
[0151] Optionally, the first element type corresponds to a network node or network parameter of the target AI network.
[0152] Optionally, the dimension information in the parameter information protocol class includes the corresponding dimension quantity value and dimension size value. The dimension quantity value in the parameter information protocol class is arranged according to a preset order, and the dimension size value in the parameter information protocol class is arranged according to the preset order. The preset order is the preset arrangement order of the network parameters of the target AI network.
[0153] Optionally, the dimension size value is the number of values included in the corresponding dimension, and the values are normalized values.
[0154] Optionally, when the target parameter information protocol class is used to characterize the target network parameter, the target parameter information protocol class includes the position of the maximum value, the maximum value being the largest value among the values of the target network parameter, and the target tensor protocol class corresponding to the target network parameter includes the quantized value of the ratio of each remaining value in the target network parameter to the maximum value, the remaining values being the other values in the dimension corresponding to the target parameter information protocol class besides the maximum value.
[0155] Optionally, the parameter information protocol class includes an indication parameter for indicating the position of a non-zero value.
[0156] Optionally, the tensor protocol class includes a second element type and a value, or the tensor protocol class includes a value.
[0157] Optionally, the second element type is characterized by the integer length of the quantization bits.
[0158] Optionally, the second element type corresponds to the first element type.
[0159] Optionally, the order of the second element types in the tensor protocol class is the same as the order of the first element types in the parameter information protocol class.
[0160] Optionally, the ONNX file structure includes a list of protocol classes, with each list of protocol classes corresponding to a protocol class type. The protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
[0161] Optionally, the method further includes:
[0162] The second end receives the indication information sent by the first end; or,
[0163] The second end receives the ONNX file structure sent by the first end, including:
[0164] The second end receives the ONNX file structure carrying indication information sent by the first end;
[0165] The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
[0166] In other words, the indication information can be sent separately or included in the ONNX file structure. Optionally, each protocol class list can form a separate ONNX file structure, and the second end can determine the start and / or end position of this protocol class list in the ONNX file structure based on the indication information.
[0167] Optionally, after receiving the ONNX file structure, the second end can add some content to the ONNX file structure. For example, if the first end is a core network device and the second end is a base station, the ONNX file structure sent by the core network device to the base station only includes node protocol information. After receiving the ONNX file structure, the base station can supplement it with parameter information, protocol information, and tensor protocol information. Alternatively, the ONNX file structure sent by the core network device to the base station may include all node protocol information, all parameter information, protocol information, and some tensor protocol information corresponding to the target AI network. The base station can then supplement other tensor protocol information at relevant positions based on the start and end positions of the list corresponding to the tensor protocol types.
[0168] In this embodiment of the application, the ONNX file structure includes a predefined index, which is used to characterize a preset network node.
[0169] Optionally, if the target AI network is updated, the preset network node is a network node in the target AI network that has not been updated.
[0170] It should be noted that the AI network information transmission method provided in this application embodiment is applied to the second end, and is consistent with the above. Figure 2 Corresponding to the AI network information transmission method applied to the first end provided in the embodiments, the specific implementation process of the relevant steps in this application embodiments and the relevant concepts involved in the ONNX file structure can be referred to the above. Figure 2 The descriptions in the method embodiments are omitted here to avoid repetition.
[0171] In this embodiment, the second end receives the ONNX file structure sent by the first end, and then the second end can convert the ONNX file structure into an AI network under its own neural network framework, so as to realize the training and application of the AI network by the second end. In this way, two communication devices with different neural network frameworks can transmit AI network information based on the ONNX file structure, avoiding the obstruction of AI network information transmission between communication devices.
[0172] The AI network information transmission method provided in this application can be executed by an AI network information transmission device. This application uses an AI network information transmission device executing the AI network information transmission method as an example to illustrate the AI network information transmission device provided in this application.
[0173] Please refer to Figure 4 , Figure 4 This is a structural diagram of an AI network information transmission device provided in an embodiment of this application, such as... Figure 4 As shown, the AI network information transmission device 400 includes:
[0174] The conversion module 401 is used to convert the AI network information of the target AI network into an Open Neural Network Exchange (ONNX) file structure.
[0175] The sending module 402 is used to send the ONNX file structure to the second end.
[0176] Optionally, the ONNX file structure includes a target protocol class, which includes at least one of the following: a node protocol class;
[0177] Parameter information protocol class;
[0178] Tensor protocol class;
[0179] Attribute protocol class.
[0180] Optionally, the ONNX file structure includes at least one computation graph protocol class, which includes the target protocol class.
[0181] Optionally, the target protocol class includes any one of the node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. When the number of ONNX file structures is at least two, one ONNX file structure corresponds to one target protocol class.
[0182] The sending module 402 is also configured to perform any one of the following:
[0183] At least two of the ONNX file structures are merged and sent to the second end;
[0184] At least two of the ONNX file structures are sent to the second end respectively.
[0185] Optionally, if the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, the sending module 402 is further configured to:
[0186] The values of the network parameters of the target AI network are sent to the second end.
[0187] Optionally, the sending module 402 is further configured to:
[0188] The network parameters of the target AI network are transmitted to the second end via a data channel.
[0189] Optionally, the ONNX file structure includes a first numeric index and a second numeric index of integer type. The first numeric index is used to identify the target protocol class, and one target protocol class corresponds to one first numeric index. The second numeric index is used to identify at least one of the network parameters, inputs, and outputs of the target AI network.
[0190] Optionally, if the ONNX file structure includes a node protocol class, the node protocol class includes a second digital index for characterizing the inputs and outputs of the target AI network.
[0191] Optionally, when the number of inputs and outputs of the target AI network is multiple and consecutive, the node protocol class includes a target number index, and includes at least one of the number of inputs and the number of outputs of the target AI network;
[0192] The target digital index is the digital index in the second digital index used to identify the first input and the first output among the multiple inputs and outputs of the target AI network.
[0193] Optionally, a parameter information protocol class is used to characterize at least one of the input, output, and network parameters corresponding to a network node in the target AI network, and the parameter information protocol class includes a first element type and dimension information.
[0194] Optionally, the first element type is characterized by the integer length of the quantization bits.
[0195] Optionally, the first element type corresponds to a network node or network parameter of the target AI network.
[0196] Optionally, the dimension information in the parameter information protocol class includes the corresponding dimension quantity value and dimension size value. The dimension quantity value in the parameter information protocol class is arranged according to a preset order, and the dimension size value in the parameter information protocol class is arranged according to the preset order. The preset order is the preset arrangement order of the network parameters of the target AI network.
[0197] Optionally, the dimension size value is the number of values included in the corresponding dimension, and the values are normalized values.
[0198] Optionally, when the target parameter information protocol class is used to characterize the target network parameter, the target parameter information protocol class includes the position of the maximum value, the maximum value being the largest value among the values of the target network parameter, and the target tensor protocol class corresponding to the target network parameter includes the quantized value of the ratio of each remaining value in the target network parameter to the maximum value, the remaining values being the other values in the dimension corresponding to the target parameter information protocol class besides the maximum value.
[0199] Optionally, the parameter information protocol class includes an indication parameter for indicating the position of a non-zero value.
[0200] Optionally, the tensor protocol class includes a second element type and a value, or the tensor protocol class includes a value.
[0201] Optionally, the second element type is characterized by the integer length of the quantization bits.
[0202] Optionally, the second element type corresponds to the first element type.
[0203] Optionally, the order of the second element types in the tensor protocol class is the same as the order of the first element types in the parameter information protocol class.
[0204] Optionally, the ONNX file structure includes a list of protocol classes, with each list of protocol classes corresponding to a protocol class type. The protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
[0205] Optionally, the sending module is further configured to:
[0206] Send indication information to the second end; or,
[0207] Send the ONNX file structure carrying indication information to the second end;
[0208] The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
[0209] Optionally, the ONNX file structure includes a predefined index, which is used to characterize a preset network node.
[0210] Optionally, if the target AI network is updated, the preset network node is a network node in the target AI network that has not been updated.
[0211] Optionally, the conversion module 401 is further configured to:
[0212] The first AI network information of the target AI network is converted into a first ONNX file structure, and the second AI network information of the target AI network is converted into a second ONNX file structure, wherein the target protocol class included in the first ONNX file structure is different from the target protocol class included in the second ONNX file structure;
[0213] The sending module 402 is further configured to:
[0214] Send the first ONNX file structure and the second ONNX file structure to the second end;
[0215] Optionally, the first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class; or,
[0216] The first ONNX file structure includes a node protocol class and a parameter information protocol class; the second ONNX file structure includes a tensor protocol class; or,
[0217] The first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class and a tensor protocol class.
[0218] In this embodiment, the device converts the AI network information of the target AI network applicable to its own neural network framework into an ONNX file structure, and then sends the ONNX file structure to the second end. The second end can then convert the ONNX file structure into an AI network under its own neural network framework. This allows two communication devices with different neural network frameworks to transmit AI network information based on the ONNX file structure, avoiding obstruction of AI network information transmission between communication devices.
[0219] The AI network information transmission device 400 in this embodiment can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices besides a terminal. For example, a terminal can include, but is not limited to, the type of terminal 11 listed above; other devices can be servers, network attached storage (NAS), etc., and this embodiment does not impose specific limitations.
[0220] The AI network information transmission device 400 provided in this application embodiment can achieve... Figure 2 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0221] Please refer to Figure 5 , Figure 5 This is a structural diagram of another AI network information transmission device provided in the embodiments of this application, such as... Figure 5 As shown, the AI network information transmission device 500 includes:
[0222] The receiving module 501 is used to receive the ONNX file structure sent by the first end, wherein the ONNX file structure is obtained by the first end from the AI network information of the target AI network.
[0223] Optionally, the ONNX file structure includes a target protocol class, which includes at least one of the following: a node protocol class;
[0224] Parameter information protocol class;
[0225] Tensor protocol class;
[0226] Attribute protocol class.
[0227] Optionally, the ONNX file structure includes at least one computation graph protocol class, which includes the target protocol class.
[0228] Optionally, the target protocol class includes any one of the node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. When the number of ONNX file structures is at least two, one ONNX file structure corresponds to one target protocol class.
[0229] The receiving module 501 is also configured to perform any one of the following:
[0230] Receive at least two of the ONNX file structures sent by the first end in a combined manner;
[0231] Receive at least two of the ONNX file structures sent by the first end.
[0232] Optionally, if the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, the receiving module 501 is further configured to:
[0233] Receive the network parameter values of the target AI network sent by the first end.
[0234] Optionally, the receiving module 501 is further configured to:
[0235] The system receives the network parameter values of the target AI network sent by the first end via a data channel.
[0236] Optionally, the ONNX file structure includes a first numeric index and a second numeric index of integer type. The first numeric index is used to identify the target protocol class, and one target protocol class corresponds to one first numeric index. The second numeric index is used to identify at least one of the network parameters, inputs, and outputs of the target AI network.
[0237] Optionally, if the ONNX file structure includes a node protocol class, the node protocol class includes a second digital index for characterizing the inputs and outputs of the target AI network.
[0238] Optionally, when the number of inputs and outputs of the target AI network is multiple and consecutive, the node protocol class includes a target number index, and includes at least one of the number of inputs and the number of outputs of the target AI network;
[0239] The target digital index is the digital index in the second digital index used to identify the first input and the first output among the multiple inputs and outputs of the target AI network.
[0240] Optionally, a parameter information protocol class is used to characterize at least one of the input, output, and network parameters corresponding to a network node in the target AI network, and the parameter information protocol class includes a first element type and dimension information.
[0241] Optionally, the first element type is characterized by the integer length of the quantization bits.
[0242] Optionally, the first element type corresponds to a network node or network parameter of the target AI network.
[0243] Optionally, the dimension information in the parameter information protocol class includes the corresponding dimension quantity value and dimension size value. The dimension quantity value in the parameter information protocol class is arranged according to a preset order, and the dimension size value in the parameter information protocol class is arranged according to the preset order. The preset order is the preset arrangement order of the network parameters of the target AI network.
[0244] Optionally, the dimension size value is the number of values included in the corresponding dimension, and the values are normalized values.
[0245] Optionally, when the target parameter information protocol class is used to characterize the target network parameter, the target parameter information protocol class includes the position of the maximum value, the maximum value being the largest value among the values of the target network parameter, and the target tensor protocol class corresponding to the target network parameter includes the quantized value of the ratio of each remaining value in the target network parameter to the maximum value, the remaining values being the other values in the dimension corresponding to the target parameter information protocol class besides the maximum value.
[0246] Optionally, the parameter information protocol class includes an indication parameter for indicating the position of a non-zero value.
[0247] Optionally, the tensor protocol class includes a second element type and a value, or the tensor protocol class includes a value.
[0248] Optionally, the second element type is characterized by the integer length of the quantization bits.
[0249] Optionally, the second element type corresponds to the first element type.
[0250] Optionally, the order of the second element types in the tensor protocol class is the same as the order of the first element types in the parameter information protocol class.
[0251] Optionally, the ONNX file structure includes a list of protocol classes, with each list of protocol classes corresponding to a protocol class type. The protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
[0252] Optionally, the receiving module 501 is further configured to:
[0253] Receive the indication information sent by the first end; or,
[0254] Receive the ONNX file structure carrying indication information sent by the first end;
[0255] The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
[0256] Optionally, the ONNX file structure includes a predefined index, which is used to characterize a preset network node.
[0257] Optionally, if the target AI network is updated, the preset network node is a network node in the target AI network that has not been updated.
[0258] In this embodiment, the device can receive an ONNX file structure sent by a first end, and then convert the ONNX file structure into an AI network under its own neural network framework to achieve the training and application of the AI network. This allows two communication devices with different neural network frameworks to transmit AI network information based on the ONNX file structure, avoiding obstruction of AI network information transmission between communication devices.
[0259] The AI network information transmission device 500 in this embodiment can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices besides a terminal. For example, the terminal can include, but is not limited to, the type of terminal 11 listed above; other devices can be servers, network attached storage (NAS), etc., and this embodiment does not impose specific limitations.
[0260] The AI network information transmission device 500 provided in this application embodiment can achieve... Figure 3 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0261] Optional, such as Figure 6 As shown in the figure, this application embodiment also provides a communication device 600, including a processor 601 and a memory 602. The memory 602 stores a program or instructions that can run on the processor 601. When the program or instructions are executed by the processor 601, they implement the above-mentioned... Figure 2 or Figure 3 The steps of the AI network information transmission method embodiment described above are the same and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0262] This application embodiment also provides a terminal, the above-mentioned... Figure 2 or Figure 3 All implementation processes and methods of the method embodiments can be applied to this terminal embodiment and achieve the same technical effect. Specifically, Figure 7 A schematic diagram of the hardware structure of a terminal to implement an embodiment of this application.
[0263] The terminal 700 includes, but is not limited to, at least some of the following components: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, and processor 710.
[0264] Those skilled in the art will understand that the terminal 700 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 7 The terminal structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0265] It should be understood that, in this embodiment, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The GPU 7041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0266] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 701 can transmit it to the processor 710 for processing; in addition, the radio frequency unit 701 can send uplink data to the network-side device. Typically, the radio frequency unit 701 includes, but is not limited to, an antenna, amplifier, transceiver, coupler, low-noise amplifier, duplexer, etc.
[0267] The memory 709 can be used to store software programs or instructions, as well as various data. The memory 709 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 709 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 709 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0268] Processor 710 may include one or more processing units; optionally, processor 710 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 710.
[0269] In one embodiment of this application, terminal 700 is the first terminal. Processor 710 is used to convert the AI network information of the target AI network into an Open Neural Network Exchange (ONNX) file structure.
[0270] Radio frequency unit 701 is used to send the ONNX file structure to the second end.
[0271] Optionally, the ONNX file structure includes a target protocol class, which includes at least one of the following:
[0272] Node protocol class;
[0273] Parameter information protocol class;
[0274] Tensor protocol class;
[0275] Attribute protocol class.
[0276] Optionally, the ONNX file structure includes at least one computation graph protocol class, which includes the target protocol class.
[0277] Optionally, the target protocol class includes any one of the node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. When the number of ONNX file structures is at least two, one ONNX file structure corresponds to one target protocol class.
[0278] The radio frequency unit 701 is configured to perform any of the following:
[0279] At least two of the ONNX file structures are merged and sent to the second end;
[0280] At least two of the ONNX file structures are sent to the second end respectively.
[0281] Optionally, when the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, the radio frequency unit 701 is configured to:
[0282] The values of the network parameters of the target AI network are sent to the second end.
[0283] Optionally, the radio frequency unit 701 is used for:
[0284] The network parameters of the target AI network are transmitted to the second end via a data channel.
[0285] Optionally, the ONNX file structure includes a first numeric index and a second numeric index of integer type. The first numeric index is used to identify the target protocol class, and one target protocol class corresponds to one first numeric index. The second numeric index is used to identify at least one of the network parameters, inputs, and outputs of the target AI network.
[0286] Optionally, if the ONNX file structure includes a node protocol class, the node protocol class includes a second digital index for characterizing the inputs and outputs of the target AI network.
[0287] Optionally, when the number of inputs and outputs of the target AI network is multiple and consecutive, the node protocol class includes a target number index, and includes at least one of the number of inputs and the number of outputs of the target AI network;
[0288] The target digital index is the digital index in the second digital index used to identify the first input and the first output among the multiple inputs and outputs of the target AI network.
[0289] Optionally, a parameter information protocol class is used to characterize at least one of the input, output, and network parameters corresponding to a network node in the target AI network, and the parameter information protocol class includes a first element type and dimension information.
[0290] Optionally, the first element type is characterized by the integer length of the quantization bits.
[0291] Optionally, the first element type corresponds to a network node or network parameter of the target AI network.
[0292] Optionally, the dimension information in the parameter information protocol class includes the corresponding dimension quantity value and dimension size value. The dimension quantity value in the parameter information protocol class is arranged according to a preset order, and the dimension size value in the parameter information protocol class is arranged according to the preset order. The preset order is the preset arrangement order of the network parameters of the target AI network.
[0293] Optionally, the dimension size value is the number of values included in the corresponding dimension, and the values are normalized values.
[0294] Optionally, when the target parameter information protocol class is used to characterize the target network parameter, the target parameter information protocol class includes the position of the maximum value, the maximum value being the largest value among the values of the target network parameter, and the target tensor protocol class corresponding to the target network parameter includes the quantized value of the ratio of each remaining value in the target network parameter to the maximum value, the remaining values being the other values in the dimension corresponding to the target parameter information protocol class besides the maximum value.
[0295] Optionally, the parameter information protocol class includes an indication parameter for indicating the position of a non-zero value.
[0296] Optionally, the tensor protocol class includes a second element type and a value, or the tensor protocol class includes a value.
[0297] Optionally, the second element type is characterized by the integer length of the quantization bits.
[0298] Optionally, the second element type corresponds to the first element type.
[0299] Optionally, the order of the second element types in the tensor protocol class is the same as the order of the first element types in the parameter information protocol class.
[0300] Optionally, the ONNX file structure includes a list of protocol classes, with each list of protocol classes corresponding to a protocol class type. The protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
[0301] Optionally, the radio frequency unit 701 is further configured to:
[0302] Send indication information to the second end; or,
[0303] Send the ONNX file structure carrying indication information to the second end;
[0304] The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
[0305] Optionally, the ONNX file structure includes a predefined index, which is used to characterize a preset network node.
[0306] Optionally, if the target AI network is updated, the preset network node is a network node in the target AI network that has not been updated.
[0307] Optionally, the processor 710 is further configured to:
[0308] The first AI network information of the target AI network is converted into a first ONNX file structure, and the second AI network information of the target AI network is converted into a second ONNX file structure, wherein the target protocol class included in the first ONNX file structure is different from the target protocol class included in the second ONNX file structure;
[0309] The radio frequency unit 701 is also used for:
[0310] Send the first ONNX file structure and the second ONNX file structure to the second end;
[0311] Optionally, the first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class; or,
[0312] The first ONNX file structure includes a node protocol class and a parameter information protocol class; the second ONNX file structure includes a tensor protocol class; or,
[0313] The first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class and a tensor protocol class.
[0314] In another embodiment of this application, terminal 700 can serve as a second terminal. The radio frequency unit 701 is used to receive an ONNX file structure sent by the first terminal, wherein the ONNX file structure is obtained by the first terminal converting AI network information of the target AI network.
[0315] Optionally, the ONNX file structure includes a target protocol class, which includes at least one of the following:
[0316] Node protocol class;
[0317] Parameter information protocol class;
[0318] Tensor protocol class;
[0319] Attribute protocol class.
[0320] Optionally, the target protocol class includes any one of the node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. When the number of ONNX file structures is at least two, one ONNX file structure corresponds to one target protocol class.
[0321] The radio frequency unit 701 is used to perform any of the following:
[0322] Receive at least two of the ONNX file structures sent by the first end in a combined manner;
[0323] Receive at least two of the ONNX file structures sent by the first end.
[0324] Optionally, when the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, the radio frequency unit 701 is further configured to:
[0325] Receive the network parameter values of the target AI network sent by the first end.
[0326] Optionally, the ONNX file structure includes a list of protocol classes, with each list of protocol classes corresponding to a protocol class type. The protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
[0327] Optionally, the radio frequency unit 701 is further configured to:
[0328] Receive the indication information sent by the first end; or,
[0329] Receive the ONNX file structure carrying indication information sent by the first end;
[0330] The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
[0331] The terminal 700 provided in this application embodiment can perform the above-described actions as a first or second terminal. Figure 2 or Figure 3 The AI network information transmission method described above can achieve the same technical effect, and will not be elaborated further here.
[0332] This application also provides a network-side device, as described above. Figure 2 and Figure 3 All implementation processes and methods of the above-described method embodiments can be applied to the network-side device embodiment and can achieve the same technical effect.
[0333] Specifically, embodiments of this application also provide a network-side device. For example... Figure 8 As shown, the network-side device 800 includes: an antenna 81, a radio frequency (RF) device 82, a baseband device 83, a processor 84, and a memory 85. The antenna 81 is connected to the RF device 82. In the uplink direction, the RF device 82 receives information through the antenna 81 and transmits the received information to the baseband device 83 for processing. In the downlink direction, the baseband device 83 processes the information to be transmitted and sends it to the RF device 82. The RF device 82 processes the received information and transmits it through the antenna 81.
[0334] The method executed by the network-side device in the above embodiments can be implemented in the baseband device 83, which includes a baseband processor.
[0335] Baseband device 83 may include, for example, at least one baseband board on which multiple chips are disposed, such as Figure 8 As shown, one of the chips is, for example, a baseband processor, which is connected to the memory 85 via a bus interface to call the program in the memory 85 and execute the network device operation shown in the above method embodiment.
[0336] The network-side device may also include a network interface 86, such as a common public radio interface (CPRI).
[0337] Specifically, the network-side device 800 of this embodiment further includes: instructions or programs stored in a memory 85 and executable on a processor 84, wherein the processor 84 calls the instructions or programs in the memory 85 to execute. Figure 4 or Figure 5The methods executed by each module shown achieve the same technical effect, and to avoid repetition, they will not be described in detail here.
[0338] Specifically, embodiments of this application also provide another network-side device. For example... Figure 9 As shown, the network-side device 900 includes a processor 901, a network interface 902, and a memory 903. The network interface 902 is, for example, a common public radio interface (CPRI).
[0339] Specifically, the network-side device 900 of this embodiment further includes: instructions or programs stored in a memory 903 and executable on a processor 901, wherein the processor 901 calls the instructions or programs in the memory 903 to execute. Figure 4 or Figure 5 The methods executed by each module shown achieve the same technical effect, and to avoid repetition, they will not be described in detail here.
[0340] This application embodiment also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the above-described functionality. Figure 2 or Figure 3 The various processes in the method embodiments described herein can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0341] The processor is the processor in the terminal described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0342] This application embodiment also provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the above. Figure 2 or Figure 3 The various processes in the method embodiments described herein can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0343] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0344] This application embodiment also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the above. Figure 2 or Figure 3 The various processes in the method embodiments described herein can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0345] This application also provides a communication system, including: a terminal and a network-side device, wherein the terminal can be used to perform the above-described... Figure 2 The network-side device can be used to perform the steps of the method as described above. Figure 3 The steps of the method, or the terminal, can be used to perform the above-described steps. Figure 3 The network-side device can be used to perform the steps of the method as described above. Figure 2 The steps of the method are described.
[0346] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0347] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0348] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An AI network information transmission method, characterized in that, include: The first end converts the AI network information of the target AI network into an Open Neural Network Exchange (ONNX) file structure; The first end sends the ONNX file structure to the second end; The ONNX file structure includes a target protocol class, which includes at least one of the following: Node protocol class; Parameter information protocol class; Tensor protocol class; Attribute protocol class; When the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, after the first end sends the ONNX file structure to the second end, the method further includes: The first end sends the values of the network parameters of the target AI network to the second end.
2. The method according to claim 1, characterized in that, The ONNX file structure includes at least one computation graph protocol class, and the computation graph protocol class includes the target protocol class.
3. The method according to claim 1, characterized in that, The target protocol class includes any one of the node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. When the number of ONNX file structures is at least two, one ONNX file structure corresponds to one target protocol class. The first end sends the ONNX file structure to the second end, including any one of the following: The first end sends at least two of the ONNX file structures to the second end in a combined manner; The first end sends at least two of the ONNX file structures to the second end respectively.
4. The method according to claim 1, characterized in that, The first end sends the values of the network parameters of the target AI network to the second end, including: The first end sends the values of the network parameters of the target AI network to the second end through a data channel.
5. The method according to any one of claims 1-3, characterized in that, The ONNX file structure includes a first numeric index and a second numeric index of integer type. The first numeric index is used to identify the target protocol class, and one target protocol class corresponds to one first numeric index. The second numeric index is used to identify at least one of the network parameters, inputs, and outputs of the target AI network.
6. The method according to claim 5, characterized in that, In the case where the ONNX file structure includes a node protocol class, the node protocol class includes a second digital index for characterizing the inputs and outputs of the target AI network.
7. The method according to claim 6, characterized in that, When the number of inputs and outputs of the target AI network is multiple and consecutive, the node protocol class includes a target numeric index, and includes at least one of the number of inputs and the number of outputs of the target AI network; The target digital index is the digital index in the second digital index used to identify the first input and the first output among the multiple inputs and outputs of the target AI network.
8. The method according to any one of claims 1-3, characterized in that, A parameter information protocol class is used to characterize at least one of the input, output and network parameters of a network node in the target AI network, and the parameter information protocol class includes a first element type and dimension information.
9. The method according to claim 8, characterized in that, The first element type is characterized by the integer length of the quantization bits.
10. The method according to claim 8, characterized in that, The first element type corresponds to the network node or network parameter of the target AI network.
11. The method according to claim 8, characterized in that, The dimension information in the parameter information protocol class includes the corresponding dimension quantity value and dimension size value. The dimension quantity value in the parameter information protocol class is arranged according to a preset order, and the dimension size value in the parameter information protocol class is arranged according to the preset order. The preset order is the preset arrangement order of the network parameters of the target AI network.
12. The method according to claim 11, characterized in that, The dimension size is the number of values included in the corresponding dimension, and the values are normalized values.
13. The method according to claim 8, characterized in that, When a target parameter information protocol class is used to characterize a target network parameter, the target parameter information protocol class includes the position of the maximum value, where the maximum value is the largest value among the values of the target network parameter. The target tensor protocol class corresponding to the target network parameter includes the quantized value of the ratio of each remaining value in the target network parameter to the maximum value, where the remaining values are other values in the dimension corresponding to the target parameter information protocol class except for the maximum value.
14. The method according to claim 8, characterized in that, The parameter information protocol class includes indication parameters for indicating the position of non-zero values.
15. The method according to claim 8, characterized in that, The tensor protocol class includes a second element type and a value, or the tensor protocol class includes a value.
16. The method according to claim 15, characterized in that, The second element type is characterized by the integer length of the quantization bits.
17. The method according to claim 15, characterized in that, The second element type corresponds to the first element type.
18. The method according to claim 15, characterized in that, The order of the second element types in the tensor protocol class is the same as the order of the first element types in the parameter information protocol class.
19. The method according to any one of claims 1-3, characterized in that, The ONNX file structure includes a list of protocol classes, with each list of protocol classes corresponding to a protocol class type. The protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
20. The method according to claim 19, characterized in that, The method further includes: The first end sends an indication message to the second end; or, The first end sends the ONNX file structure to the second end, including: The first end sends the ONNX file structure carrying indication information to the second end; The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
21. The method according to any one of claims 1-3, characterized in that, The ONNX file structure includes a predefined index, which is used to characterize a preset network node.
22. The method according to claim 21, characterized in that, In the event that the target AI network is updated, the preset network node is a network node in the target AI network that has not been updated.
23. The method according to any one of claims 1-3, characterized in that, The first end converts the AI network information of the target AI network into an ONNX file structure, including: The first end converts the first AI network information of the target AI network into a first ONNX file structure and converts the second AI network information of the target AI network into a second ONNX file structure, wherein the target protocol class included in the first ONNX file structure is different from the target protocol class included in the second ONNX file structure; The first end sends the ONNX file structure to the second end, including: The first end sends the first ONNX file structure and the second ONNX file structure to the second end.
24. The method according to claim 23, characterized in that, The first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class; or, The first ONNX file structure includes a node protocol class and a parameter information protocol class; the second ONNX file structure includes a tensor protocol class; or, The first ONNX file structure includes a node protocol class, and the second ONNX file structure includes a parameter information protocol class and a tensor protocol class.
25. An AI network information transmission method, characterized in that, include: The second end receives the ONNX file structure sent by the first end, wherein the ONNX file structure is obtained by the first end from the AI network information of the target AI network. The ONNX file structure includes a target protocol class, which includes at least one of the following: Node protocol class; Parameter information protocol class; Tensor protocol class; Attribute protocol class; When the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, after the second end receives the ONNX file structure sent by the first end, the method further includes: The second end receives the network parameter values of the target AI network sent by the first end.
26. The method according to claim 25, characterized in that, The ONNX file structure includes at least one computation graph protocol class, and the computation graph protocol class includes the target protocol class.
27. The method according to claim 25, characterized in that, The target protocol class includes any one of the node protocol class, parameter information protocol class, tensor protocol class, and attribute protocol class. When the number of ONNX file structures is at least two, one ONNX file structure corresponds to one target protocol class. The second end receives the ONNX file structure sent by the first end, including any one of the following: The second end receives at least two of the ONNX file structures that are merged and sent by the first end; The second end receives at least two of the ONNX file structures sent by the first end.
28. The method according to any one of claims 25-27, characterized in that, The ONNX file structure includes a list of protocol classes, with each list of protocol classes corresponding to a protocol class type. The protocol class types include node protocol classes, parameter information protocol classes, tensor protocol classes, and attribute protocol classes.
29. The method according to claim 28, characterized in that, The method further includes: The second end receives the indication information sent by the first end; or, The second end receives the ONNX file structure sent by the first end, including: The second end receives the ONNX file structure carrying indication information sent by the first end; The indication information is used to indicate at least one of the start and end positions of the protocol class list in the ONNX file structure.
30. An AI network information transmission device, characterized in that, include: The conversion module is used to convert the AI network information of the target AI network into an Open Neural Network Exchange (ONNX) file structure; The sending module is used to send the ONNX file structure to the second end; The ONNX file structure includes a target protocol class, which includes at least one of the following: Node protocol class; Parameter information protocol class; Tensor protocol class; Attribute protocol class; When the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, the sending module is further configured to: The values of the network parameters of the target AI network are sent to the second end.
31. An AI network information transmission device, characterized in that, include: The receiving module is used to receive the ONNX file structure sent by the first end, wherein the ONNX file structure is obtained by the first end from the AI network information of the target AI network. The ONNX file structure includes a target protocol class, which includes at least one of the following: Node protocol class; Parameter information protocol class; Tensor protocol class; Attribute protocol class; When the ONNX file structure includes at least one of a node protocol class and a parameter information protocol class, the receiving module is further configured to: Receive the network parameter values of the target AI network sent by the first end.
32. A communication device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the AI network information transmission method as described in any one of claims 1-24, or to implement the steps of the AI network information transmission method as described in any one of claims 25-29.
33. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the steps of the AI network information transmission method as described in any one of claims 1-24, or implement the steps of the AI network information transmission method as described in any one of claims 25-29.
Citation Information
Patent Citations
Cross-data format model conversion acceleration method and device
CN112328674A
Neural network generation method and device, electronic equipment and storage medium
CN112541577A