Model training method and communication apparatus

By introducing data value and value threshold in the wireless network, the data is divided into two parts for model training, which solves the problem of large data transmission volume for small computing power devices, maintains model accuracy and reduces transmission volume, and improves communication efficiency.

WO2024187413A1PCT designated stage expired Publication Date: 2024-09-19HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2023/081653
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-15
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

In wireless networks, devices with small computing power cannot use large models for training due to limited computing power. This results in low model accuracy and large data transmission volume, which increases wireless transmission bandwidth requirements. How to reduce data transmission without losing model accuracy? Quantity is an issue that needs to be solved urgently.

Method used

By introducing data value and value threshold, local data is divided into two parts, data with higher data value is used for knowledge distillation, and data with smaller data value is used for student model update, reducing the amount of data transmission and achieving model training.

Benefits of technology

It effectively reduces the amount of data transmission, saves link resources, and improves model training efficiency without losing the accuracy of the student model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023081653_19092024_PF_FP_ABST
    Figure CN2023081653_19092024_PF_FP_ABST
Patent Text Reader

Abstract

The present application is applied to the field of wireless communications. Provided are a model training method and a communication apparatus. The method comprises: a first device sending a first training data set to a second device; the second device sending, to the first device, first feedback information which comprises a data value of each piece of data in the first training data set; and the first device determining a first data set and a second data set according to the received data values and a first value threshold, and performing model training on a student model according to the first data set and the second data set, wherein data in the first data set and data in the second data set both belong to the first training data set. In the method, the first device can divide local data into a first data set and a second data set according to data values and a value threshold, and can perform model training according to the two data sets, so as to facilitate a reduction in the volume of transmitted data without losing the accuracy of a student model, thereby reducing communication overheads of a wireless network.
Need to check novelty before this filing date? Find Prior Art

Description

Model training method and communication device Technical Field

[0001] The present application relates to the field of artificial intelligence (AI), and in particular to a model training method and a communication device. Background Art

[0002] With the widespread adoption of AI technology, an increasing number of AI tasks are expected within sixth-generation (6G) networks. Due to limited computing power, wireless edge devices can only use small models for training. However, the large number of wireless parameters limits the expressive power of small models. Knowledge distillation technology trains a teacher model with a large number of parameters and uses this model to train a student model with a smaller number of parameters, enabling the student model to acquire the capabilities of the teacher model. Applying knowledge distillation in wireless networks can help low-computing devices train student models, improving model accuracy and convergence speed.

[0003] During the knowledge distillation process, low-computing devices need to continuously upload the full amount of local data. This local data is fed into the teacher model, which then outputs soft labels. Low-computing devices need to download the full set of soft labels for model distillation. Low-computing devices upload and download large amounts of data, requiring high wireless transmission bandwidth. Reducing data transmission while maintaining the accuracy of the student model is a pressing issue.

[0004] Summary of the Invention

[0005] The present application provides a model training method and a communication device that can reduce the amount of data transmission without losing the accuracy of the student model.

[0006] On the first aspect, a model training method is provided, which can be executed by a first device (for example, a terminal), or by a component of the first device (for example, a processor, a chip, or a chip system, etc.), or by a logic module or software that can realize all or part of the functions of the first device.

[0007] The method includes: sending a first training data set to a second device, the first training data set including at least one piece of data; receiving first feedback information from the second device, the first feedback information including the data value of each piece of data in the first training data set; determining a first data set and a second data set based on the data value of each piece of data in the first training data set and a first value threshold, the data in the first data set and the data in the second data set both belonging to the first training data set; and performing model training on a student model based on the first data set and the second data set.

[0008] According to the model training method provided in the present application, by introducing data value and value threshold (for example, a first value threshold), the first device can divide the local data into two parts (i.e., a first data set and a second data set) according to the data value and the value threshold, and perform model training based on these two parts of data, which is beneficial to reducing the amount of data transmission without losing the accuracy of the student model, thereby reducing the wireless network communication overhead.

[0009] In one possible implementation, the first feedback information also includes a first soft label, which is an output obtained by the second device using the first training dataset as input to the teacher model. Training the student model based on the first dataset and the second dataset includes: performing knowledge distillation on the student model using the soft labels corresponding to the first dataset in the first dataset and the first soft labels, and / or updating the student model using the second dataset, where the first dataset is data in the first training dataset whose data value is greater than or equal to a first value threshold, and the second dataset is data in the first training dataset whose data value is less than the first value threshold, where the first value threshold is a positive number.

[0010] The above-mentioned knowledge distillation and updating the student model using the second data set can be performed simultaneously, or one can be performed first and then the other. If knowledge distillation is performed first and the accuracy of the student model reaches the convergence condition during the knowledge distillation process, then updating the student model using the second data set can be skipped. Otherwise, updating the student model using the second data set must be performed again. Similarly, if updating the student model using the second data set is performed first and the accuracy of the student model reaches the convergence condition during the process, then knowledge distillation can be skipped. Otherwise, knowledge distillation must be performed again.

[0011] Furthermore, model training is performed on the student model based on the first data set and the second data set, and the method also includes: determining whether the accuracy of the student model meets the convergence condition; if the accuracy of the student model does not meet the convergence condition, sending the second training data set to the second device, the second training data set including at least one data; receiving second feedback information from the second device, the second feedback information including a second soft label and a data value of each data in the second training data set, the second soft label being the output obtained by the second device by using the second training data set as the input of the teacher model; determining a third data set and a fourth data set based on the data value of each data in the second training data set and the second value threshold, the third data set being data in the second training data set whose data value is greater than or equal to the second value threshold, and the fourth data set being data in the second training data set whose data value is less than the second value threshold, and the second value threshold is a positive number; model training is performed on the student model based on the third data set, the fourth data set and the second soft label.

[0012] If, after performing the above-mentioned knowledge distillation and updating the student model with the second data set, the accuracy of the student model still does not meet the convergence condition, it is necessary to send the second training data set to the second device and perform the other subsequent operations described above.

[0013] The student model is trained according to the third data set, the fourth data set and the second soft label, including: the first device uses the soft label corresponding to the third data set in the third data set and the second soft label to perform knowledge distillation on the student model, and / or, uses the fourth data set to update the student model.

[0014] According to the model training method provided in this application, a first device and a second device jointly perform model training. By using data with higher data value in the training dataset for knowledge distillation and data with lower data value for updating the student model, the model convergence accuracy requirements can be achieved using less data. Compared with traditional knowledge distillation, this reduces data transmission, thereby saving link resources.

[0015] In one possible implementation, model training is performed on a student model based on a first data set and a second data set, including: determining a third data set and a fourth data set in the second training data set, where the third data set is data in the second training data set whose similarity with the first data set is greater than or equal to a first similarity threshold, and the fourth data set is data in the second training data set whose similarity with the first data set is less than the first similarity threshold, the first similarity threshold is a positive number, and the first data set is data in the first training data set whose data value is greater than or equal to the first value threshold; sending the third data set to a second device; receiving a second soft label from the second device, where the second soft label is an output obtained by the second device by using the third data set as an input to a teacher model; performing knowledge distillation on the student model using the third data set and the second soft label, and / or updating the student model using the fourth data set.

[0016] The above-mentioned knowledge distillation and updating the student model using the fourth data set can be performed simultaneously, or one can be performed first and then the other. If knowledge distillation is performed first and the accuracy of the student model reaches the convergence condition during the knowledge distillation process, then updating the student model using the fourth data set can be skipped. Otherwise, updating the student model using the fourth data set must be performed again. Similarly, if updating the student model using the fourth data set is performed first and the accuracy of the student model reaches the convergence condition during the process, then knowledge distillation can be skipped. Otherwise, knowledge distillation must be performed again.

[0017] Furthermore, model training is performed on the student model based on the first data set and the second data set, which also includes: determining whether the accuracy of the student model meets the convergence condition; if the accuracy of the student model does not meet the convergence condition, determining the fifth data set and the sixth data set in the third training data set, the fifth data set being data in the third training data set whose similarity with the seventh data set is greater than or equal to the second similarity threshold, the sixth data set being data in the third training data set whose similarity with the seventh data set is less than the second similarity threshold, the second similarity threshold is a positive number, and the seventh data set includes data in the first data set and the third data set; sending the fifth data set to the second device; receiving a third soft label from the second device, the third soft label being the output obtained by the second device by using the fifth data set as the input of the teacher model; using the fifth data set and the third soft label to perform knowledge distillation on the student model, and / or, using the sixth data set to update the student model.

[0018] If after performing the above-mentioned knowledge distillation and updating the student model with the fourth data set, the accuracy of the student model still does not meet the convergence condition, the first device also needs to determine the fifth data set and the sixth data set in the third training data set and perform the subsequent operations described above.

[0019] According to the model training method provided in this application, the first device and the second device jointly perform model training. By introducing similarity, data with high similarity to data with higher data value in the dataset can be extracted and transmitted. Knowledge distillation is performed using data with high similarity to data with higher data value in the dataset, and student model updates are performed using data with low similarity to data with higher data value in the dataset. This allows the model convergence accuracy requirements to be achieved using less data. Compared with traditional knowledge distillation, data transmission is reduced, thereby saving link resources.

[0020] In a possible implementation, before determining the first data set and the second data set based on the data value of each data item in the first training data set and the first value threshold, the method further includes: receiving the first value threshold from the second device.

[0021] In a possible implementation, before determining the third data set and the fourth data set based on the data value of each data item in the second training data set and the second value threshold, the method further includes: receiving the second value threshold from the second device.

[0022] In one possible implementation, both the first value threshold and the second value threshold are positively correlated with the currently available computing power of the first device.

[0023] Exemplarily, the second device may determine the first value threshold and the second value threshold based on the currently available computing power of the first device and the currently available computing power of the second device.

[0024] For example, the data value of each piece of data in the first training dataset can be sorted from smallest to largest. The first value threshold can be the k*nth percentile of the sorted data value. Here, k = the current available computing power of the first device / the current available computing power of the second device. The second value threshold can also be calculated using a similar method.

[0025] Because the second device has more computing power than the first, calculating and configuring the value threshold on the second device does not increase the load on the first device compared to calculating the value threshold on the first device itself. Furthermore, the available computing power / transmission rate of the first device may vary continuously. Dynamically calculating and configuring the value threshold based on the current computing power can adapt to changes in the computing power / transmission rate of the first device.

[0026] In one possible implementation, before determining the third data set and the fourth data set in the second training data set, the method further includes: receiving a first similarity threshold and / or a similarity calculation method from a second device, the similarity calculation method being used to calculate the similarity between any data in the second training data set and the first data set.

[0027] In a possible implementation, before determining the fifth data set and the sixth data set in the third training data set, the method further includes: receiving a second similarity threshold from a second device.

[0028] In one example, the second device may determine the first similarity threshold and the second similarity threshold based on the current available computing power of the first device and the maximum available computing power of the first device. For example, similarity threshold = (maximum available computing power - previous available computing power) / maximum available computing power.

[0029] Because the second device has more computing power than the first, configuring the similarity threshold on the first device via the second device does not increase the load on the first device compared to calculating the similarity threshold on the first device itself. Furthermore, the available computing power / transmission rate of the first device may vary continuously, and a dynamic similarity threshold can adapt to changes in the computing power / transmission rate of the first device.

[0030] In one possible implementation, before sending the first training data set to the second device, the method also includes: sending collaboration request information to the second device, the collaboration request information including the collaboration type and the identifier of the collaborative model, the collaboration type is knowledge distillation, and the identifier of the collaborative model is the identifier of the teacher model.

[0031] Based on the collaboration request information, the second device can send one or more of the following to the first device: value threshold (for example, first value threshold, second value threshold, etc.), similarity threshold (for example, first similarity threshold, second similarity threshold, etc.), and similarity calculation method.

[0032] On the second aspect, a model training method is provided, which can be executed by a second device (for example, a network device), or by a component of the second device (such as a processor, chip, or chip system, etc.), or by a logic module or software that can realize all or part of the functions of the second device.

[0033] The method includes: receiving at least one piece of data from a first device; determining the data value of each piece of data in the at least one piece of data; sending first feedback information to the first device, the first feedback information including the data value of each piece of data in the at least one piece of data, the data value of each piece of data in the at least one piece of data being used by the first device to determine data for knowledge distillation and data for updating a student model.

[0034] It should be understood that the at least one piece of data may be the first training data set, the second training data set, the third data set, etc. of the first aspect.

[0035] According to the model training method provided in the present application, by introducing data value and value threshold (for example, a first value threshold), the first device can divide the local data into two parts (i.e., a first data set and a second data set) according to the data value and the value threshold, and perform model training based on these two parts of data, which is beneficial to reducing the amount of data transmission without losing the accuracy of the student model, thereby reducing the wireless network communication overhead.

[0036] In one possible implementation, the first feedback information also includes a soft label; wherein, before sending the feedback information to the first device, the method also includes: inputting at least one piece of data into the teacher model to obtain a soft label output by the teacher model, and the soft label is used for knowledge distillation on the first device.

[0037] In one possible implementation, the method further includes: sending a value threshold to the first device, where the value threshold is used by the first device to determine data for knowledge distillation and data for student model update based on the data value of the data.

[0038] It should be understood that the value threshold may be, for example, the first value threshold, the second value threshold, etc. of the first aspect.

[0039] In one possible implementation, the method further includes: sending a similarity threshold and / or a similarity calculation method to the first device, the similarity calculation method is used to calculate the similarity of the data, and the similarity threshold is used by the first device to determine the data for knowledge distillation and the data for student model update based on the similarity of the data.

[0040] For the specific implementation methods and technical effects of the corresponding solutions of the second aspect, please refer to the description of the first aspect.

[0041] According to a third aspect, a communication device is provided, comprising a module or unit for executing the method according to the first aspect or any possible implementation manner of the first aspect.

[0042] In a fourth aspect, a communication device is provided, comprising a module or unit for executing the method in the second aspect or any possible implementation manner of the second aspect.

[0043] In a fifth aspect, a communication device is provided, comprising a processor coupled to a memory, the memory being used to store computer programs or instructions, and the processor being used to execute the computer programs or instructions stored in the memory to implement the method in the first aspect or any possible implementation of the first aspect.

[0044] In one possible implementation, the apparatus further includes a memory coupled to the processor.

[0045] In a possible implementation, there are one or more processors and / or one or more memories.

[0046] In a possible implementation, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0047] In a possible implementation, the device further includes a communication interface, and the processor is coupled to the communication interface.

[0048] In one implementation, the apparatus is a first device. Exemplarily, the communication interface may be a transceiver, or an input / output interface.

[0049] In another implementation, the apparatus is a chip in the first device. Exemplarily, the communication interface may be an input / output interface.

[0050] In the sixth aspect, a communication device is provided, including a processor, the processor being coupled to a memory, the memory being used to store computer programs or instructions, and the processor being used to execute the computer programs or instructions stored in the memory to implement the method in the second aspect or any possible implementation of the second aspect.

[0051] In one possible implementation, the apparatus further includes a memory coupled to the processor.

[0052] In a possible implementation, there are one or more processors and / or one or more memories.

[0053] In a possible implementation, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0054] In a possible implementation, the device further includes a communication interface, and the processor is coupled to the communication interface.

[0055] In one implementation, the apparatus is a second device. Exemplarily, the communication interface may be a transceiver, or an input / output interface.

[0056] In another implementation, the apparatus is a chip in the second device. Exemplarily, the communication interface may be an input / output interface.

[0057] In a seventh aspect, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of any of the above aspects or any possible implementation of any of the above aspects.

[0058] In a specific implementation, the processor may be a chip, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.

[0059] In an eighth aspect, a communication system is provided, comprising at least one of the communication device provided in the third aspect and the communication device provided in the fourth aspect, or comprising at least one of the communication device provided in the fifth aspect and the communication device provided in the sixth aspect.

[0060] In the ninth aspect, a computer program product is provided, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a method in any one of the above aspects or any possible implementation of any one of the aspects.

[0061] In the tenth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions). When the computer program runs on a computer, the computer executes the method in any one of the above aspects or any possible implementation of any one of the aspects.

[0062] In the eleventh aspect, a chip is provided, comprising a processor for calling and running a computer program from a memory, so that a communication device equipped with the chip executes the method in any one of the above aspects or any possible implementation of any one of the aspects.

[0063] In the twelfth aspect, a communication device is provided, which includes an interface and a processor, wherein the interface is used to send and / or receive signals, so that the processor executes the method in any one of the above aspects or any possible implementation of any one of the aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] FIG1 is a schematic diagram of a process of traditional knowledge distillation;

[0065] FIG2 is a schematic diagram of a communication system provided in an embodiment of the present application;

[0066] FIG3 is a schematic flow chart of a model training method provided in an embodiment of the present application;

[0067] FIG4 is a flow chart of a training loss prediction model provided by the present application;

[0068] FIG5 is a schematic flow chart of a model training method provided in an embodiment of the present application;

[0069] FIG6 is a schematic diagram of performing knowledge distillation on a student model and updating the student model provided by the present application;

[0070] FIG7 is a schematic flow chart of a model training method provided in an embodiment of the present application;

[0071] FIG8 is a schematic diagram of the relationship between sample quantity and accuracy obtained by model training using the method provided by this application and traditional knowledge distillation;

[0072] FIG9 is a schematic flow chart of a model training method provided in an embodiment of the present application;

[0073] FIG10 is a schematic diagram of a method for calculating data similarity provided by the present application;

[0074] FIG11 is a schematic diagram of performing knowledge distillation on a student model and updating the student model provided by the present application;

[0075] FIG12 is a schematic flow chart of a model training method provided in an embodiment of the present application;

[0076] FIG13 is a schematic diagram showing the relationship between sample quantity and accuracy obtained by model training using the method provided by this application and traditional knowledge distillation;

[0077] FIG14 is a schematic block diagram of a communication device provided in an embodiment of the present application;

[0078] FIG15 is a schematic block diagram of another communication device provided in an embodiment of the present application;

[0079] FIG16 is a schematic structural diagram of a terminal provided in an embodiment of the present application;

[0080] Figure 17 is a schematic structural diagram of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0081] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0082] In the description of this application, unless otherwise specified, " / " indicates that the objects associated with each other are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, in the description of this application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. In addition, to facilitate the clear description of the technical solutions of the embodiments of this application, in the embodiments of this application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0083] It should be understood that, in this application, “in case of”, “if”, “when”, “if” and similar expressions can be used interchangeably.

[0084] With the widespread adoption of AI technology, an increasing number of AI tasks are expected within 6G networks. Due to limited computing power, wireless edge devices can only use small models for training. However, the large number of wireless parameters limits the expressive power of small models. Furthermore, numerous industry studies have shown that initially training a large, high-precision model and then compressing it to create a smaller model can achieve higher model accuracy than initially training a small model on a dataset.

[0085] Knowledge distillation is a model compression technique that involves training a large-parameter teacher model and using it to train a smaller-parameter student model, imbuing the student model with the capabilities of the teacher model. In the future, it is expected that pre-trained models designed for wireless networks (i.e., teacher models) will be deployed within the network and serve as the pre-training foundation for various wireless AI tasks. Resource-constrained devices with limited computing power in wireless networks can leverage the knowledge from pre-trained large models to assist in training their own smaller models (i.e., student models), improving model accuracy and convergence speed.

[0086] Figure 1 shows a schematic diagram of the process of traditional knowledge distillation. Referring to Figure 1, a teacher model is deployed on a device with high computing power. Due to resource constraints, a device with low computing power cannot directly run the teacher model. A student model is deployed on a device with low computing power, and the student model can be customized on demand according to local resources. Among them, a device with high computing power refers to a device with more resources (such as computing resources) than a device with low computing power. For example, a device with low computing power can be a terminal, and a device with high computing power can be a network device, a core network device, an edge data center, or a general-purpose computer. For another example, a device with low computing power can be a base station, and a device with high computing power can be a core network device, an edge data center, or a general-purpose computer.

[0087] Knowledge distillation mainly includes the following steps:

[0088] (1) The low-computing-power device generates data online and uploads the generated local data to the high-computing-power device.

[0089] (2) The high-computing power device uses the teacher model to calculate the output of the local data, namely the soft label.

[0090] (3) Download soft tags on devices with low computing power.

[0091] (4) The low-computing device uses the student model to calculate the output of the local data, namely the hard label.

[0092] (5) The low-computing-power device calculates the loss L of the student model and uses the loss L of the student model to update the student model parameters.

[0093] For example, L = aL soft +bL hard Where a is L soft The weight of L hard The weight of .

[0094] L soft is the student loss, which can be obtained based on the local label and the student hard label. For example, L soft =Student hard tag-local tag.

[0095] In this application, local labels can also be referred to as original labels, groundtruth labels, true values, or hard targets. Student hard labels are the output of the student model and can also be referred to as hard labels.

[0096] L hardis the distill loss, which can be obtained based on the soft labels and student hard labels. For example, L hard = soft label - student hard label. It should be understood that the soft label is the output of the teacher model.

[0097] (6) Repeat steps (1) to (5) until the student model meets the accuracy requirements.

[0098] During the model training process, low-computing devices need to continuously upload all local data and download all soft labels. This large amount of data upload and download requires high wireless transmission bandwidth. Reducing data transmission without compromising student model accuracy is a pressing issue.

[0099] In view of this, the present application provides a model training method. By introducing data value and value threshold, a small computing power device (i.e., the first device in this application) can divide local data into two parts according to the data value and value threshold, and perform model training based on these two parts of data. This is beneficial to reducing the amount of data transmission without losing the accuracy of the student model, thereby reducing wireless network communication overhead.

[0100] This application can be applied to long-term evolution (LTE) systems, fifth-generation (5G) mobile communication systems, new radio (NR), 6G communication systems, future evolved communication systems, or other communication systems, etc., and this application does not limit this. This application is also applicable to information technology (IT) systems.

[0101] Figure 2 shows a schematic diagram of a communication system applicable to the present application. As shown in Figure 2, the communication system 200 may include a first device 210 and a second device 220. A student model is deployed on the first device 210, and a trained teacher model (hereinafter referred to as the teacher model) is deployed on the second device. It should be understood that the communication system shown in Figure 2 may also include more nodes, and the embodiments of the present application are not shown one by one in the figure.

[0102] For example, the first device may be a terminal, and the second device may be a network device, a core network device, an edge data center, or a general-purpose computer. Alternatively, the first device may be a network device, and the second device may be a core network device, an edge data center, or a general-purpose computer. Alternatively, the first device may be a terminal, and the second device may be a core network device, an edge data center, or a general-purpose computer.

[0103] Exemplarily, the available computing power of the first device 210 is less than that of the second device 220 .

[0104] For example, the computing power of a device can be expressed as the number of floating-point operations per second (FLOPS) performed by the device's central processing unit (CPU). FLOPS = number of CPU cores * single-core clock speed * floating-point calculation value per CPU cycle * 1,000,000. For example, the available computing power of the first device 210 is 100 GFLOPS (G = 10^9), and the available computing power of the second device 220 is currently 1,000 GFLOPS.

[0105] The terminal in the embodiments of the present application may refer to user equipment (UE), station, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. The terminal may also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a large screen, a vehicle-mounted device, a wearable device, a terminal in a 5G network or a terminal in a future-evolved public land mobile network (PLMN), etc., and the embodiments of the present application are not limited to this.

[0106] The network device in the embodiment of the present application may be a device for communicating with a terminal. For example, the network device may be a base station, an evolved NodeB (eNodeB), a transmission reception point (TRP), a next generation NodeB (gNB) in a 5G mobile communication system, a base station in a future mobile communication system, or an access node (AP) in a WiFi system. For another example, the network device may also be a module or unit that completes part of the functions of a base station, for example, a centralized unit (CU) or a distributed unit (DU). For another example, the network device may also be a wireless controller, a relay station, an access point, a vehicle-mounted device, a wearable device, an access network device in other communication systems that will evolve in the future, etc. in a cloud radio access network (CRAN) scenario. This application does not limit the specific technology and specific device form adopted by the network device.

[0107] The core network device in this application can provide user connections, user management, and service carrying, and provide an interface to the external network as a bearer network. For example, the core network device can be a session management function (SMF).

[0108] In an embodiment of the present application, the first device or the second device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software. In addition, the embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application. As long as it is possible to communicate according to the method provided in the embodiment of the present application by running a program that records the code of the method provided in the embodiment of the present application, for example, the execution subject of the method provided in the embodiment of the present application can be the first device or the second device, or it can be a functional module in the first device or the second device that can call a program and execute the program.

[0109] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" as used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or magnetic tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memories (EPROMs), cards, sticks or key drives, etc.). In addition, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0110] The method provided in this application is described in detail below in conjunction with the accompanying drawings. It is understood that some of the drawings provided in this application primarily use the first device and / or the second device as examples of the execution subject to illustrate the method, but this application does not limit the execution subject. For example, the first device or the second device in the drawings may also be a chip, chip system, or processor that supports the device to implement the method, or a logic module or software that can implement all or part of the functions of the device.

[0111] Figure 3 is a schematic flow chart of a model training method provided by the present application. The method 300 may include S310 to S340, and each step is described below.

[0112] S310: A first device sends a first training data set to a second device. Correspondingly, the second device receives the first training data set.

[0113] The first training data set includes at least one piece of data. For example, for image data, a piece of data may indicate at least one image, i.e., a piece of data may include data of at least one image. For another example, for video data, a piece of data may include video data of a time slice (i.e., a duration, such as 5 seconds).

[0114] It should be understood that the first training data set may include data generated locally by the first device, and may also include data obtained by the first device from other devices.

[0115] S320: The second device sends first feedback information to the first device. In response, the first device receives the first feedback information. The first feedback information includes the data value of each data item in the first training data set.

[0116] It is understandable that except for special reasons, such as program exceptions or calculation errors, the data value of some data may be empty. Generally, the first feedback information will include the data value of each data.

[0117] Specifically, after receiving the first training data set sent by the first device, the second device can calculate the data value of each data in the first training data set, and then return the calculated data value of each data in the first training data set to the first device.

[0118] Optionally, the first feedback information may further include a first soft tag.

[0119] Specifically, after receiving the first training data set, the second device may also input the first training data set into the teacher model, and the teacher model outputs a first soft label.

[0120] In one possible implementation, the data value of any piece of data satisfies the following formula (1):

[0121] Among them, DV is the data value of the data; r i is the true value label of the data, that is, the real label of the data; p i is the output corresponding to the data as the input of the teacher model, which represents the probability that the data belongs to the i-th category among N categories.

[0122] The above method calculates data value by using the uncertainty of the category. The smaller the uncertainty of the data, the greater its data value, and the more knowledge is contained in the corresponding soft label output by the teacher model.

[0123] It should be understood that when the data value of any data in the first training data set is calculated by formula (1), p i is the soft tag corresponding to the data in the first soft tag.

[0124] Take any data in the first training data set as an example of a handwritten digital picture. Assume that the hard target corresponding to the data is the category of the picture classification 8, that is, r1 to r 10 0, 0, 0, 0, 0, 0, 1, 0, 0, p1 to p 10 The order is 0.01, 0.02, 0.04, 0.03, 0.06, 0.07, 0.03, 0.67, 0.05, 0.02. So DV = 0.4005.

[0125] In another possible implementation, the first device may use any piece of data as input to a loss prediction model to obtain the data value of the data output by the loss prediction model, wherein the loss prediction model is obtained through knowledge distillation.

[0126] Exemplarily, the loss prediction model can be trained by the method shown in FIG4 . Referring to FIG4 , the first device can input a training data set (for example, a first training data set, a second training data set, etc.) into the loss prediction model and the teacher model, calculate the loss of the loss prediction model through the loss of the teacher model and the output of the loss prediction model, and update the parameters of the loss prediction model according to the loss of the loss prediction model. The loss of the teacher model is equal to the difference between the output of the teacher model and the label of the training data set (that is, the true value of the training data set). The loss of the loss prediction model is the weighted sum of the output of the loss prediction model and the loss of the teacher model. For example, the sum of the weight of the output of the loss prediction model and the weight of the loss of the teacher model can be 1.

[0127] It should be understood that the teacher model shown in Figure 4 is different from the teacher model deployed on the second device. For example, the teacher model shown in Figure 4 is a subset of the teacher model deployed on the second device. For example, the model obtained by removing the last layer of the teacher model on the second device is the teacher model shown in Figure 4.

[0128] After the loss prediction model is trained, any piece of data of the first device can be input into the loss prediction model, and the loss prediction model outputs the data value of the data.

[0129] S330: The first device determines a first data set and a second data set based on the data value of each data item in the first training data set and a first value threshold, wherein both the data in the first data set and the data in the second data set belong to the first training data set.

[0130] In one example, the first value threshold is a positive number, the first data set is data in the first training data set whose data value is greater than or equal to the first value threshold, and the second data set is data in the first training data set whose data value is less than the first value threshold.

[0131] In another example, the first value threshold is a negative number, the first data set is data in the first training data set whose data value is greater than or equal to the absolute value of the first value threshold, and the second data set is data in the first training data set whose data value is less than the absolute value of the first value threshold.

[0132] In a possible implementation, the first value threshold may be sent by the second device to the first device.

[0133] For example, the second device may send the first value threshold to the first device before S310 or S330. For another example, the first feedback information may include the first value threshold.

[0134] In one example, the second device may determine the first value threshold based on the currently available computing power of the first device and the currently available computing power of the second device.

[0135] For example, the data value of each data in the first training data set can be sorted in order from small to large, and the first value threshold can be the k*nth data value among the n data values ​​after sorting. Here, k = the current available computing power of the first device / the current available computing power of the second device, and n is the number of data items included in the first training data set. For example, the current available computing power of the first device is 100GFLOPS, and the current available computing power of the second device is 1000GFLOPS, then k = 0.1. At the same time, if the first training data set includes 20 data items, that is, n = 20, then the first value threshold is the second data value after sorting the 20 data values. For example, if the sorted data values ​​are 0.1, 0.2, 0.4, ..., then the first value threshold can be 0.2.

[0136] The currently available computing power of the first device may be sent by the first device to the second device, may be configured to the second device by operation administration and maintenance (OAM), or may be obtained by the second device from other devices.

[0137] Optionally, the first value threshold may be pre-configured on the first device; or the first value threshold may be sent to the first device by another device; or the second device may send a calculation method and related information for the value threshold (e.g., the second device's currently available computing power) to the first device, and the first device may calculate the first value threshold based on the calculation method and related information. This application does not limit how the first device obtains the first value threshold.

[0138] S340: The first device performs model training on the student model based on the first data set and the second data set.

[0139] According to the model training method provided in the present application, by introducing data value and value threshold (for example, a first value threshold), the first device can divide the local data into two parts (i.e., a first data set and a second data set) according to the data value and the value threshold, and perform model training based on these two parts of data, which is beneficial to reducing the amount of data transmission without losing the accuracy of the student model, thereby reducing the wireless network communication overhead.

[0140] Two implementations of S340 are described below. It should be noted that the solutions described below all assume that the first value threshold is a positive number.

[0141] First, the first implementation of S340 is described in conjunction with the method 500 shown in Figure 5. For details of the first implementation of S340, please refer to S504 in the method 500.

[0142] 5 shows a schematic flow chart of a model training method provided by the present application. The method 500 may include S501 to S504.

[0143] S501: A first device sends a first training data set to a second device. Correspondingly, the second device receives the first training data set.

[0144] This step is the same as S310, and reference may be made to S310.

[0145] S502: The second device sends first feedback information to the first device. Correspondingly, the first device receives the first feedback information.

[0146] The first feedback information includes the data value and the first soft label of each data item in the first training data set. For how to calculate the data value of the data and how to obtain the first soft label, please refer to the relevant description of step S320.

[0147] S503: The first device determines a first data set and a second data set according to the data value of each piece of data in the first training data set and a first value threshold.

[0148] The first data set is data in the first training data set whose data value is greater than or equal to the first value threshold, and the second data set is data in the first training data set whose data value is less than the first value threshold.

[0149] It should be understood that step S503 may also refer to the relevant description of S330.

[0150] S504: The first device performs knowledge distillation on the student model using the first dataset and the soft label corresponding to the first dataset in the first soft label, and / or updates the student model using the second dataset.

[0151] S504 is described with reference to FIG. 6 .

[0152] Figure 6(a) shows the process of the first device performing knowledge distillation on the student model using the first dataset and the soft labels corresponding to the first dataset in the first soft labels. Referring to Figure 6(a), after obtaining the first dataset based on the first value threshold, the first device inputs the first dataset into the student model, and the student model outputs the student hard labels. The first device then obtains the distillation loss based on the soft labels corresponding to the first dataset in the first soft labels and the student hard labels, and obtains the student loss based on the student hard labels and the hard targets corresponding to the first dataset (i.e., the labels of the first dataset). The first device calculates the loss of the student model based on the distillation loss and the student loss, and updates the student model parameters based on the loss.

[0153] Figure 6(b) illustrates the process of the first device updating the student model using the second dataset. Referring to Figure 6(b), after obtaining the second dataset based on the first value threshold, the first device inputs the second dataset into the student model, which then outputs student hard labels. The first device then obtains the student loss based on the student hard labels and the hard targets corresponding to the second dataset (i.e., the labels of the second dataset). The first device can then update the student model parameters based on the student loss.

[0154] It should be understood that the meanings and calculation methods of the various labels and losses involved in FIG6 can refer to the relevant description of FIG1 above, and will not be repeated here.

[0155] The above-mentioned knowledge distillation and updating the student model using the second data set can be performed simultaneously, or one can be performed first and then the other. If knowledge distillation is performed first and the accuracy of the student model reaches the convergence condition during the knowledge distillation process, then updating the student model using the second data set can be skipped. Otherwise, updating the student model using the second data set must be performed again. Similarly, if updating the student model using the second data set is performed first and the accuracy of the student model reaches the convergence condition during the process, then knowledge distillation can be skipped. Otherwise, knowledge distillation must be performed again.

[0156] If, after performing the above-described knowledge distillation and updating the student model with the second dataset, the accuracy of the student model still does not meet the convergence condition, the first device may further update the training dataset and repeat steps S501 to S504. It should be understood that, in this case, the training dataset involved in steps S501 to S504 is no longer the first training dataset, but an updated training dataset, such as the second training dataset.

[0157] Specifically, if the accuracy of the student model does not meet the convergence condition, the first device sends a second training data set to the second device, and the second training data set includes at least one data. Then, the second device can input the second training data set into the teacher model to obtain the soft label output by the teacher model (denoted as: second soft label). In addition, the second device can calculate the data value of each data in the second training data set. Afterwards, the second device can send second feedback information to the first device, and the second feedback information includes the second soft label and the data value of each data in the second training data set. After receiving the second feedback information, the first device can determine the third data set and the fourth data set based on the data value of each data in the second training data set and the second value threshold. Then, the second device can perform model training on the student model based on the third data set, the fourth data set and the second soft label.

[0158] The third and fourth datasets both belong to the second training dataset. Furthermore, if the second value threshold is a positive number, the third dataset is the data in the second training dataset whose data value is greater than or equal to the second value threshold, and the fourth dataset is the data in the second training dataset whose data value is less than the second value threshold. If the second value threshold is a negative number, the third dataset is the data in the second training dataset whose data value is greater than or equal to the absolute value of the second value threshold, and the fourth dataset is the data in the second training dataset whose data value is less than the absolute value of the second value threshold.

[0159] The second value threshold may be the first value threshold mentioned above, or the second value threshold may be a value threshold dynamically configured by the second device to the first device.

[0160] In one example, similar to the method for determining the first value threshold, the second value threshold can be determined based on the current available computing power of the first device. It should be understood that if the second value threshold is determined by the second device, the available computing power of the first device may have changed relative to the first value threshold when the second device determined the second value threshold, and thus the second value threshold determined by the second device may be different from the first value threshold.

[0161] Similar to the first value threshold, the second value threshold can be sent by other devices to the first device; or, the second device can send relevant information (for example, the second device's currently available computing power) to the first device, and the first device calculates the second value threshold based on the calculation method and relevant information of the value threshold previously sent by the second device.

[0162] Assume that the second value threshold is a positive number. Specifically, training the student model based on the third dataset, the fourth dataset, and the second soft label may include: the first device performing knowledge distillation on the student model using the soft label corresponding to the third dataset in the third dataset and the second soft label, and / or updating the student model using the fourth dataset.

[0163] The first device uses the third data set and the soft label corresponding to the third data set in the second soft label to perform knowledge distillation on the student model, which is similar to the first device using the first data set and the soft label corresponding to the first data set in the first soft label to perform knowledge distillation on the student model described in S504. For details, please refer to the relevant instructions above and will not be repeated here. Similarly, the first device uses the fourth data set to update the student model, which is similar to the first device using the second data set to update the student model. For details, please refer to the relevant instructions above and will not be repeated here.

[0164] According to the model training method provided in this application, a first device and a second device jointly perform model training. By using data with higher data value in the training dataset for knowledge distillation and data with lower data value for updating the student model, the model convergence accuracy requirements can be achieved using less data. Compared with traditional knowledge distillation, this reduces data transmission, thereby saving link resources.

[0165] In order to enable those skilled in the art to better understand the present application, referring to FIG7 , the present application also provides a complete flowchart for model training using the first implementation method mentioned above.

[0166] For example, FIG7 shows a schematic flow chart of a model training method provided by the present application, wherein the method 700 adopts the first implementation method mentioned above during the student model training process. The method 700 may include S701 to S709, and each step is described below.

[0167] S701: A first device sends a collaboration request message to a second device. Correspondingly, the second device receives the collaboration request message.

[0168] The collaboration request information includes a collaboration type (Pattern) and an identifier of a collaborative model. The collaboration type is knowledge distillation, and the identifier of the collaborative model is the identifier of the teacher model.

[0169] S702: The second device dynamically configures a value threshold.

[0170] The second device can sense the computing power of the first device, then calculate the value threshold of the data based on the current available computing power of the first device, and dynamically configure the value threshold for the first device. It should be understood that when the value threshold is dynamically configured, if the current available computing power of the first device is greater, the value threshold will be smaller, and vice versa.

[0171] Because the second device has more computing power than the first, calculating and configuring the value threshold on the second device does not increase the load on the first device compared to calculating the value threshold on the first device itself. Furthermore, the available computing power / transmission rate of the first device may vary continuously, and dynamically calculating and configuring the value threshold can adapt to changes in the computing power / transmission rate of the first device.

[0172] As an alternative to S702, the value threshold may be configured only once, that is, the value threshold is not configured dynamically, but is set to a fixed value during a complete training process.

[0173] It should be understood that the value thresholds dynamically configured in S702 may be: a first value threshold, a second value threshold, ... in sequence.

[0174] S703: The first device continuously generates and / or receives data streams from other devices online, and uploads a data set to the second device at intervals (a fixed time period or when the number of data items reaches a threshold). It should be understood that each data set uploaded by the first device includes at least one data item.

[0175] It should be understood that the data sets sent by the first device to the second device may be: a first training data set, a second training data set, ... in sequence.

[0176] It should also be understood that the data set (such as the first training data set or the second training data set, etc.) sent by the first device to the second device each time may not include the same data, but this application does not exclude the situation where the data sets sent twice adjacently include part or all of the same data.

[0177] S704: After receiving the data set, the second device calculates the soft label corresponding to each piece of data through the forward propagation of the teacher model, and at the same time, the second device calculates the data value of each piece of data.

[0178] Regarding how to calculate the data value, you can refer to the relevant content in the previous article, which will not be repeated here.

[0179] It should be understood that the soft tags calculated by the second device may be: a first soft tag, a second soft tag, ... in sequence.

[0180] S705: The second device sends the soft tag and data value to the first device. Correspondingly, the first device receives the soft tag and data value.

[0181] S706: The first device determines set A and set B according to the data value and the value threshold.

[0182] Specifically, the first device splits the data set uploaded to the second device in step S703 into set A and set B based on the data value and the value threshold sent by the second device. Assuming the value threshold is an integer, set A is the data in the data set uploaded to the second device in step S703 that is greater than or equal to the value threshold, and set B is the data in the data set uploaded to the second device in step S703 that is less than the value threshold.

[0183] It should be understood that if the first training dataset is uploaded in step S703, then set A is the first dataset and set B is the second dataset. If the second training dataset is uploaded in step S703, then set A is the third dataset and set B is the fourth dataset.

[0184] S707: Use set A and the soft labels corresponding to set A in the soft labels for knowledge distillation, and use set B to update the student model.

[0185] For details about this step, please refer to the description of S504 above, which will not be repeated here.

[0186] S708: The first device determines whether the accuracy of the student model meets the convergence condition.

[0187] If the accuracy of the student model does not meet the convergence condition, S703 to S708 are repeated, otherwise S709 is executed, ie, the training is terminated.

[0188] S709, terminate the training.

[0189] According to the model training method provided in this application, a first device and a second device jointly perform model training. By using data with higher data value in the training dataset for knowledge distillation and data with lower data value for updating the student model, the model convergence accuracy requirements can be achieved using less data. Compared with traditional knowledge distillation, this reduces data transmission, thereby saving link resources.

[0190] Figure 8 shows a schematic diagram of the sample quantity-accuracy relationship obtained by model training using the method provided by this application (specifically, method 500 or method 700) and traditional knowledge distillation. Among them, the data set uses fashion-mnist, the parameters of the teacher model are 407050, the parameters of the student model are 50890, each sample is trained for 30 rounds (epochs), and the target accuracy is 0.95. Referring to Figure 8, using traditional knowledge distillation, 34k samples are required to achieve the target accuracy; using the method provided by this application, only 22k samples are needed to achieve the target accuracy, and the efficiency is improved by 35%. The simulation results show that compared with traditional knowledge distillation, the method provided by this application uses less data to achieve the model convergence accuracy requirements, and compared with traditional knowledge distillation, it reduces data transmission, thereby saving link resources.

[0191] The first implementation of S340 is described in detail above. The second implementation of S340 is described below in conjunction with the method 900 shown in FIG9 . For details of the second implementation of S340 , refer to S904 to S907 in the method 900 .

[0192] 9 shows a schematic flow chart of a model training method provided by the present application. The method 900 may include S901 to S907.

[0193] S901 to S903 are the same as S310 to S330, and reference may be made to S310 to S330.

[0194] Assuming that the first value threshold is a positive number, the first data set is data in the first training data set whose data value is greater than or equal to the first value threshold, and the second data set is data in the first training data set whose data value is less than the first value threshold.

[0195] S904: The first device determines a third data set and a fourth data set in the second training data set.

[0196] It should be understood that the second training dataset may include data newly generated locally by the first device, or may include data obtained by the first device from other devices. The first training dataset and the second training dataset may not include the same data, but this application does not exclude the possibility that the first dataset and the second dataset include some or all of the same data.

[0197] Wherein, when the first similarity threshold is a positive number, the third data set is the data in the second training data set whose similarity with the first data set is greater than or equal to the first similarity threshold, and the fourth data set is the data in the second training data set whose similarity with the first data set is less than the first similarity threshold. Wherein, when the first similarity threshold is a negative number, the third data set is the data in the second training data set whose similarity with the first data set is greater than or equal to the absolute value of the first similarity threshold, and the fourth data set is the data in the second training data set whose similarity with the first data set is less than the absolute value of the first similarity threshold.

[0198] In a possible implementation manner, the first similarity threshold and / or the similarity calculation method may be sent by the second device to the first device.

[0199] For example, the second device may send the first similarity threshold and / or the similarity calculation method to the first device before S904. For another example, the first feedback information may include the first similarity threshold and / or the similarity calculation method.

[0200] In one example, the second device may determine the first similarity threshold based on the currently available computing power of the first device and the maximum available computing power of the first device.

[0201] For example, assuming that the maximum available computing power of the first device is 100 GFLOPS and the current available computing power is 85 GFLOPS, the similarity threshold = (maximum available computing power - current available computing power) / maximum available computing power = 0.15.

[0202] In one example, when the data is image data, the similarity between the first data and the second data satisfies formula (2):

[0203] The first data is any piece of data, PSNR is the similarity between the first data and the second data, is the maximum possible pixel value of the picture represented by the first data. If each pixel is represented by 8 bits of binary, then is 255. MSE represents the mean square error between the first data and the second data.

[0204] If the similarity between the first data and any piece of data in the first data set is calculated, the second data is the data in the first data set, and the similarity between the first data and the first data set is equal to the average of the sum of the similarities between the first data and each piece of data in the first data set.

[0205] It should be understood that the similarity between any piece of data and a certain data set is calculated in a similar manner and will not be described in detail here.

[0206] In another example, when the data is time series data, the similarity between the first data and the second data may be calculated using a dynamic time warping (DTW) algorithm.

[0207] Specifically, the first data and the second data are each a sequence, and the first device may first calculate a distance matrix M between each point in the two sequences. Then, the first device searches for a path from the upper left corner to the lower right corner of the matrix such that the sum of the elements on the path is minimized.

[0208] For example, if the first data is A = [1,1,3,3,2,4] and the second data is B = [1,3,2,2,4,4], then the matrix M can be seen in Figure 10. In the matrix M, any point M(i,j) = |(A(j)-B(i)|. The shortest path length L from the upper left corner (1,1) of the matrix to any point (i,j) can be calculated using the following formula (3): min (i, j): L min (i, j) = min{L min (i, j-1), L min (i-1, j), L min (i-1, j-1)}+M(i, j) (3)

[0209] Calculated by formula (3), the path from the upper left corner to the lower right corner of the matrix that minimizes the sum of the elements on the path is shown in Figure 10. Since the sum of the elements of this path is 0, the similarity between the first data and the second data is 0.

[0210] Optionally, the first similarity threshold and / or the similarity calculation method may also be pre-configured on the first device; or, the first similarity threshold and / or the similarity calculation method may be sent to the first device by other devices.

[0211] S905: The first device sends a third data set to the second device. Correspondingly, the second device receives the third data set.

[0212] S906: The second device sends a second soft tag to the first device. Correspondingly, the first device receives the second soft tag.

[0213] Specifically, after receiving the third data set sent by the first device, the second device inputs the third data set into the teacher model, and the output of the teacher model is the second soft label.

[0214] S907: The first device performs knowledge distillation on the student model using the third data set and the second soft label, and / or updates the student model using the fourth data set.

[0215] S907 is described with reference to FIG. 11 .

[0216] Figure 11(a) shows the process of the first device performing knowledge distillation on the student model using the third data set and the second soft label. Referring to Figure 11(a), after the first device obtains the third data set based on the first similarity threshold, it inputs the third data set into the student model, and the student model outputs the student hard label. Then, the first device can obtain the distillation loss based on the second soft label and the student hard label, and obtain the student loss based on the student hard label and the hard target corresponding to the third data set (i.e., the label of the third data set). The first device calculates the loss of the student model based on the distillation loss and the student loss, and updates the student model parameters based on this loss.

[0217] Figure 11(b) shows the process of the first device updating the student model using the fourth dataset. Referring to Figure 11(b), after obtaining the fourth dataset based on the first similarity threshold, the first device inputs the fourth dataset into the student model, which then outputs student hard labels. The first device then obtains a student loss based on the student hard labels and the hard targets corresponding to the fourth dataset (i.e., the labels of the fourth dataset). The first device can then update the student model parameters based on the student loss.

[0218] It should be understood that the meanings and calculation methods of the various labels and losses involved in FIG11 can all be referred to the relevant description of FIG1 above, and will not be repeated here.

[0219] The above-mentioned knowledge distillation and updating the student model using the fourth data set can be performed simultaneously, or one can be performed first and then the other. If knowledge distillation is performed first and the accuracy of the student model reaches the convergence condition during the knowledge distillation process, then updating the student model using the fourth data set can be skipped. Otherwise, updating the student model using the fourth data set must be performed again. Similarly, if updating the student model using the fourth data set is performed first and the accuracy of the student model reaches the convergence condition during the process, then knowledge distillation can be skipped. Otherwise, knowledge distillation must be performed again.

[0220] If, after performing the above-described knowledge distillation and updating the student model using the fourth dataset, the student model's accuracy still does not meet the convergence condition, the first device may further update the training dataset and repeat steps S904 to S907. It should be understood that, in this case, the training dataset involved in steps S904 to S907 is no longer the second training dataset, but rather an updated training dataset, such as the third training dataset. Furthermore, in step S904, the fourth and fifth datasets within the third training dataset must be determined.

[0221] Specifically, if the accuracy of the student model does not meet the convergence criteria, the first device determines a fifth dataset and a sixth dataset from the third training dataset. The first device then sends the fifth dataset to the second device. After receiving the fifth dataset, the second device inputs the fifth dataset into the teacher model to obtain a third soft label as output. The second device sends the third soft label to the first device, and the first device performs knowledge distillation on the student model using the fifth dataset and the third soft label, and / or updates the student model using the sixth dataset.

[0222] Where the second similarity threshold is a positive number, the fifth dataset is the data in the third training dataset whose similarity with the seventh dataset is greater than or equal to the second similarity threshold, and the sixth dataset is the data in the third training dataset whose similarity with the seventh dataset is less than the second similarity threshold. Where the second similarity threshold is a negative number, the fifth dataset is the data in the third training dataset whose similarity with the seventh dataset is greater than or equal to the absolute value of the second similarity threshold, and the sixth dataset is the data in the third training dataset whose similarity with the seventh dataset is less than the absolute value of the second similarity threshold. The seventh dataset is the union of the first and third datasets.

[0223] The second similarity threshold may be the first similarity threshold mentioned above, or the second similarity threshold may be a similarity threshold dynamically configured by the second device to the first device.

[0224] In one example, similar to the method for determining the first similarity threshold, the second similarity threshold can be determined based on the current available computing power of the first device and the maximum available computing power of the first device. It should be understood that the available computing power of the first device may have changed when the second device determines the second similarity threshold relative to the available computing power of the first device when the second device determines the first similarity threshold, and thus the second similarity threshold determined by the second device may be different from the first similarity threshold.

[0225] Similar to the first similarity threshold, the second similarity threshold may be sent by other devices to the first device, or may be determined by the first device according to the similarity calculation method sent by the second device.

[0226] The second device uses the fifth data set and the third soft label to perform knowledge distillation on the student model, which is similar to the second device in S907 using the third data set and the second soft label to perform knowledge distillation on the student model. For details, please refer to the relevant instructions above and will not be repeated here. The second device uses the sixth data set to update the student model, which is similar to the second device in S907 using the fourth data set to update the student model. Please refer to the relevant instructions above and will not be repeated here.

[0227] According to the model training method provided in this application, the first device and the second device jointly perform model training. By introducing similarity, data with high similarity to data with higher data value in the dataset can be extracted and transmitted. Knowledge distillation is performed using data with high similarity to data with higher data value in the dataset, and student model updates are performed using data with low similarity to data with higher data value in the dataset. This allows the model convergence accuracy requirements to be achieved using less data. Compared with traditional knowledge distillation, data transmission is reduced, thereby saving link resources.

[0228] In order to enable those skilled in the art to better understand the present application, referring to Figure 12, the present application also provides a complete flowchart for model training using the above-mentioned second implementation method.

[0229] For example, Figure 12 shows a schematic flow chart of a model training method provided by the present application, which adopts the second implementation method mentioned above during the student model training process. The method 1200 may include S1201 to S1213. Each step is described below.

[0230] S1201: A first device sends a collaboration request to a second device. Correspondingly, the second device receives the collaboration request.

[0231] The collaboration request information includes a collaboration type (Pattern) and an identifier of a collaborative model. The collaboration type is knowledge distillation, and the identifier of the collaborative model is the identifier of the teacher model.

[0232] S1202, the second device dynamically configures a value threshold, a similarity calculation method, and a similarity threshold.

[0233] The second device can sense the currently available computing power of the first device, then calculate the value threshold of the data based on the currently available computing power of the first device, and dynamically configure the value threshold for the first device. It should be understood that when the value threshold is dynamically configured, if the currently available computing power of the first device is greater, the value threshold will be smaller, and vice versa.

[0234] The second device may also dynamically configure a similarity calculation method and a similarity threshold based on the data type used by the current model and the currently available computing power of the first device.

[0235] Because the second device has more computing power than the first device, configuring the value and similarity thresholds for the first device via the second device does not increase the load on the first device compared to calculating the value and similarity thresholds on the first device itself. Furthermore, the available computing power / transmission rate of the first device may vary continuously. Dynamically configuring the value threshold, similarity calculation method, and similarity threshold can adapt to changes in the computing power / transmission rate of the first device. It should be understood that the similarity thresholds dynamically configured in S1202 may be, in order: first similarity threshold, second similarity threshold, etc.

[0236] As an alternative to S1202, the value threshold, similarity calculation method and / or similarity threshold can be configured only once, that is, the value threshold, similarity calculation method and / or similarity threshold are not dynamically configured, but the value threshold, similarity calculation method and / or similarity threshold are set to fixed values ​​during a complete training process.

[0237] S1203: The first device continuously generates and / or receives data streams from other devices online, and sends a portion of the data as an initial data set to the second device. It should be understood that the initial data set is a first training data set.

[0238] S1204: After the second device receives the initial data set, the second device calculates the data value of each piece of data in the initial data set.

[0239] Regarding how to calculate the data value, you can refer to the relevant content in the previous article, which will not be repeated here.

[0240] S1205: The second device sends the data value of each piece of data in the initial data set to the first device. Correspondingly, the first device receives the data value of each piece of data in the initial data set.

[0241] S1206: The first device determines a set A based on the data value and the value threshold of each piece of data in the initial data set. Optionally, the first device may also determine a set B.

[0242] Specifically, the first device splits the initial data set into set A and set B based on the data value and the value threshold of each data item in the initial data set. Assuming the value threshold is an integer, set A consists of data in the initial data set that is greater than or equal to the value threshold, and set B consists of data in the initial data set that is less than the value threshold.

[0243] It should be understood that set A is the first data set and set B is the second data set.

[0244] S1207: The first device continuously generates and / or receives data streams from other devices online, calculates the similarity between each data item in the data set and set A at regular intervals (a fixed time period or when the number of data items reaches a threshold), and adds data with a similarity greater than or equal to a similarity threshold to set A. Optionally, the first device may also add data with a similarity less than the similarity threshold to set B.

[0245] It should be understood that if the dataset in S1207 is the second training dataset, then the data added to Set A becomes the third dataset, and the data added to Set B becomes the fourth dataset. Furthermore, Set A now includes the first and third datasets, and Set B includes the second and fourth datasets. After entering the next loop, the dataset in S1207 becomes the third training dataset. At this point, the data added to Set A becomes the fifth dataset, and the data added to Set B becomes the sixth dataset. Furthermore, Set A now includes the first, third, and fifth datasets, and Set B includes the second, fourth, and sixth datasets.

[0246] S1208: The first device sends incremental data of set A to the second device.

[0247] That is, the first device uploads the data whose similarity, as determined in step S1207, is greater than or equal to the similarity threshold to the second device. For example, if the data whose similarity, as determined in step S1207, is greater than or equal to the similarity threshold, is the third data set, then the incremental data of set A sent to the second device in step S1208 is the third data set. After entering the next loop, the data whose similarity, as determined in step S1207, is greater than or equal to the similarity threshold, becomes the fifth data set, and thus the incremental data of set A sent to the second device in step S1208 is the fifth data set.

[0248] S1209: After receiving the data, the second device calculates the soft label corresponding to each piece of data through forward propagation of the teacher model.

[0249] Regarding how to calculate the data value, you can refer to the relevant content in the previous article, which will not be repeated here.

[0250] It should be understood that if the incremental data of set A uploaded in step S1208 is the third data set and the soft label calculated in step S1209 is the second soft label, then after entering the next loop, the incremental data of set A uploaded in step S1208 is the fifth data set and the soft label calculated in step S1209 is the third soft label.

[0251] S1210: The second device sends a soft tag to the first device. Correspondingly, the first device receives the soft tag.

[0252] S1211: The first device uses the incremental data and soft labels of set A to perform knowledge distillation, and uses the incremental data of set B to update the student model.

[0253] That is, the first device uses the data whose similarity is greater than or equal to the similarity threshold determined in step S1207 and the soft label obtained in step S1210 to perform knowledge distillation, and uses the data whose similarity is less than the similarity threshold determined in step S1207 to update the student model.

[0254] For details about this step, please refer to the description of S907 above, which will not be repeated here.

[0255] S1212: The first device determines whether the accuracy of the student model meets the convergence condition.

[0256] If the accuracy of the student model does not meet the convergence condition, S1207 to S1212 are repeated, otherwise S1213 is executed, and the training is terminated.

[0257] S1213, terminate training.

[0258] According to the model training method provided in this application, the first device and the second device jointly perform model training. By introducing similarity, data with high similarity to data with higher data value in the dataset can be extracted. Knowledge distillation is performed using data with high similarity to data with higher data value in the dataset, and the student model is updated using data with low similarity to data with higher data value in the dataset. This allows the model convergence accuracy requirements to be achieved using less data. Compared with traditional knowledge distillation, data transmission is reduced, thereby saving link resources.

[0259] Figure 13 shows a schematic diagram of the sample quantity-accuracy relationship obtained by model training using the method provided by this application (specifically, method 900 or method 1200) and traditional knowledge distillation. Among them, the data set uses fashion-mnist, the parameters of the teacher model are 407050, the parameters of the student model are 50890, each sample is trained for 30 rounds, and the target accuracy is 0.95. Referring to Figure 13, using traditional knowledge distillation, 34k samples are required to achieve the target accuracy; using the method provided by this application, only 26k samples are needed to achieve the target accuracy. Simulation results show that the second method provided by this application only requires uploading samples whose data similarity is greater than or equal to the similarity threshold, that is, only 13K samples need to be uploaded to achieve model convergence. Compared with traditional knowledge distillation, the method provided by this application can use less data to achieve model convergence accuracy requirements, reduce data transmission, thereby saving link resources and improving communication efficiency.

[0260] It should be noted that in the embodiments described above, the data value is calculated by the second device. As an alternative, the data value can be calculated by the first device. For example, the second device can configure the data value calculation method for the first device, and the first device then calculates the data value based on the data value calculation method.

[0261] The above describes the method embodiments provided by this application, and the following describes the device embodiments provided by this application. It should be understood that the description of the device embodiments corresponds to the description of the method embodiments. Therefore, for matters not described in detail, reference can be made to the method embodiments above. For the sake of brevity, they will not be repeated here.

[0262] Figure 14 is a schematic block diagram of a communication device provided in an embodiment of the present application. As shown in Figure 14, the communication device 2000 may include a communication unit 2100 and a processing unit 2200. The communication unit 2100 can implement corresponding communication functions, and the communication can be internal communication of the communication device 2000 or communication between the communication device 2000 and other devices; the processing unit 2200 can implement corresponding processing functions. The communication unit 2100 can also be called a communication interface or a transceiver unit. Optionally, the communication device 2000 may also include a storage unit, which can be used to store instructions and / or data, and the processing unit 2200 can read the instructions and / or data in the storage unit so that the device implements the aforementioned method embodiment.

[0263] In one possible design, the communication device 2000 may be the first device in the above method 300, or may be a module or chip applied to the first device. The communication device 2000 may be used to execute the steps or processes executed by the first device in the above embodiments.

[0264] Specifically, the communication unit 2100 is used to send a first training data set to the second device, where the first training data set includes at least one piece of data; the communication unit 2100 is also used to receive first feedback information from the second device, where the first feedback information includes the data value of each piece of data in the first training data set; the processing unit 2200 is used to determine a first data set and a second data set based on the data value of each piece of data in the first training data set and a first value threshold, where both the data in the first data set and the data in the second data set belong to the first training data set; the processing unit 2200 is also used to perform model training on the student model based on the first data set and the second data set.

[0265] Optionally, the first feedback information further includes a first soft label, which is an output obtained by the second device by using the first training dataset as input to the teacher model. The processing unit 2200 is specifically configured to: perform knowledge distillation on the student model using the first dataset and the soft label corresponding to the first dataset in the first soft label, and / or update the student model using the second dataset, where the first dataset is data in the first training dataset whose data value is greater than or equal to a first value threshold, and the second dataset is data in the first training dataset whose data value is less than the first value threshold, where the first value threshold is a positive number.

[0266] Optionally, the processing unit 2200 is further specifically used to: determine whether the accuracy of the student model meets the convergence condition; if the accuracy of the student model does not meet the convergence condition, control the communication unit 2100 to send a second training data set to the second device, the second training data set including at least one data; control the communication unit 2100 to receive second feedback information from the second device, the second feedback information including a second soft label and a data value of each data in the second training data set, the second soft label being the output obtained by the second device by using the second training data set as the input of the teacher model; determine a third data set and a fourth data set based on the data value of each data in the second training data set and a second value threshold, the third data set being data in the second training data set whose data value is greater than or equal to the second value threshold, and the fourth data set being data in the second training data set whose data value is less than the second value threshold, and the second value threshold is a positive number; perform model training on the student model based on the third data set, the fourth data set and the second soft label.

[0267] Optionally, the processing unit 2200 is specifically used to: determine a third data set and a fourth data set in the second training data set, the third data set being data in the second training data set whose similarity with the first data set is greater than or equal to a first similarity threshold, the fourth data set being data in the second training data set whose similarity with the first data set is less than the first similarity threshold, the first similarity threshold is a positive number, and the first data set being data in the first training data set whose data value is greater than or equal to a first value threshold; control the communication unit 2100 to send the third data set to the second device; control the communication unit 2100 to receive a second soft label from the second device, the second soft label being the output obtained by the second device by using the third data set as the input of the teacher model; use the third data set and the second soft label to perform knowledge distillation on the student model, and / or use the fourth data set to update the student model.

[0268] Optionally, the processing unit 2200 is further specifically used to: determine whether the accuracy of the student model meets the convergence condition; if the accuracy of the student model does not meet the convergence condition, determine the fifth data set and the sixth data set in the third training data set, the fifth data set being data in the third training data set whose similarity with the seventh data set is greater than or equal to the second similarity threshold, the sixth data set being data in the third training data set whose similarity with the seventh data set is less than the second similarity threshold, the second similarity threshold being a positive number, and the seventh data set including data in the first data set and the third data set; control the communication unit 2100 to send the fifth data set to the second device; control the communication unit 2100 to receive a third soft label from the second device, the third soft label being the output obtained by the second device by using the fifth data set as the input of the teacher model; use the fifth data set and the third soft label to perform knowledge distillation on the student model, and / or use the sixth data set to update the student model.

[0269] Optionally, the communication unit 2100 is further used to: receive the first value threshold from the second device.

[0270] Optionally, the communication unit 2100 is further used to: receive the second value threshold from the second device.

[0271] Optionally, both the first value threshold and the second value threshold are positively correlated with the currently available computing power of the device.

[0272] Optionally, the communication unit 2100 is further used to: receive the first similarity threshold and / or similarity calculation method from the second device, where the similarity calculation method is used to calculate the similarity between any data in the second training data set and the first data set.

[0273] Optionally, the communication unit 2100 is further configured to: receive the second similarity threshold from the second device.

[0274] Optionally, the communication unit 2100 is further used to: send collaboration request information to the second device, the collaboration request information including the collaboration type and the identifier of the collaboration model, the collaboration type is knowledge distillation, and the identifier of the collaboration model is the identifier of the teacher model.

[0275] In another possible design, the communication device 2000 may be the second device in the above method, or may be a module or chip applied to the second device. The communication device 2000 may be used to execute the steps or processes executed by the second device in the above method embodiment.

[0276] Specifically, the communication unit 2100 is used to receive at least one piece of data from the first device; the processing unit 2200 is used to determine the data value of each piece of data in the at least one piece of data; the communication unit 2100 is also used to send first feedback information to the first device, and the first feedback information includes the data value of each piece of data in the at least one piece of data, and the data value of each piece of data in the at least one piece of data is used to determine data for knowledge distillation and data for student model updating.

[0277] Optionally, the processing unit 2200 is further used to: input the at least one piece of data into the teacher model to obtain a soft label output by the teacher model, and the soft label is used to perform the knowledge distillation.

[0278] Optionally, the communication unit 2100 is further used to: send a value threshold to the first device, where the value threshold is used to determine the data used for the knowledge distillation and the data used for updating the student model based on the data value of the data.

[0279] Optionally, the communication unit 2100 is also used to: send a similarity threshold and / or a similarity calculation method to the first device, the similarity calculation method is used to calculate the similarity of the data, and the similarity threshold is used to determine the data used for the knowledge distillation and the data used for the student model update based on the similarity of the data.

[0280] Regarding the steps or processes executed by each unit in the communication device 2000, please refer to the above method 300 for details, which will not be described in detail here.

[0281] It should be understood that the "unit" in the communication device 2000 can be implemented by hardware, can be implemented by software, and can also be implemented by hardware executing the corresponding software implementation. For example, the "unit" can refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit and / or other suitable components that support the described functions. For another example, the communication unit 2100 can be replaced by a transceiver transceiver circuit (for example, a receiving circuit and a transmitting circuit), and the processing unit 2200 can be replaced by a processor or a processing circuit.

[0282] Figure 15 shows a schematic block diagram of another communication device 3000 provided in an embodiment of the present application. The device 3000 can be a first device or a second device, or a chip, a chip system, or a processor that supports the first device or the second device to implement the above method. The device can be used to implement the method described in the above method embodiment. For details, please refer to the description of the above method embodiment.

[0283] The device 3000 may include one or more processors 3100, which may also be referred to as processing units, and may implement certain control functions. The processor 3100 may be a general-purpose processor or a dedicated processor. For example, it may be a baseband processor or a central processing unit. The baseband processor may be used to process communication protocols and communication data, and the central processing unit may be used to control a communication device (e.g., a base station, a baseband chip, a user chip, a DU or a CU, etc.), execute software programs, and process data from the software programs.

[0284] In an optional design, the processor 3100 may also store instructions and / or data, which can be executed by the processor 3100 so that the device 3000 performs the method described in the above method embodiment.

[0285] In another optional design, the device 3000 may include a communication interface 3200 for implementing receiving and transmitting functions. For example, the communication interface 3200 may be a transceiver circuit, an interface, an interface circuit, or a transceiver. The transceiver circuit, interface, interface circuit, or transceiver for implementing the receiving and transmitting functions may be separate or integrated. The transceiver circuit, interface, interface circuit, or transceiver may be used for reading and writing code / data, or the transceiver circuit, interface, interface circuit, or transceiver may be used for transmitting or delivering signals.

[0286] Optionally, the device 3000 may include one or more memories 3300, which may store instructions. The instructions may be executed on the processor 3100, causing the device 3000 to perform the method described in the above method embodiment. Optionally, the memory 3300 may also store data. Optionally, the processor 3100 may also store instructions and / or data. The processor 3100 and memory 3300 may be provided separately or integrated together.

[0287] Figure 16 is a schematic diagram of the structure of a terminal 4000 provided in this application. The aforementioned communication device 2000 or communication device 3000 can be configured in the terminal 4000. Alternatively, the communication device 2000 or communication device 3000 itself can be the terminal 4000. In other words, the terminal 4000 can perform the actions performed by the terminal in the above-mentioned method embodiment. Optionally, for ease of illustration, Figure 16 only shows the main components of the terminal. As shown in Figure 16, the terminal 4000 includes a processor, memory, control circuitry, an antenna, and input / output devices.

[0288] The processor is primarily used to process communication protocols and communication data, control the entire terminal, execute software programs, and process software program data, for example, to support the terminal in performing the actions described in the above method embodiments. The memory is primarily used to store software programs and data. The control circuit is primarily used to convert baseband signals into radio frequency signals and process radio frequency signals. The control circuit and antenna together are also called a transceiver, which is primarily used to transmit and receive radio frequency signals in the form of electromagnetic waves. Input and output devices, such as touch screens, displays, and keyboards, are primarily used to receive user input and output data to the user.

[0289] When the terminal is powered on, the processor reads the software program stored in the storage unit, interprets and executes the program's instructions, and processes the program's data. When data needs to be transmitted wirelessly, the processor performs baseband processing on the data to be transmitted and outputs the baseband signal to the RF circuit. The RF circuit then performs RF processing on the baseband signal and transmits it via the antenna as electromagnetic waves. When data is sent to the terminal, the RF circuit receives the RF signal via the antenna, converts it into a baseband signal, and outputs the baseband signal to the processor, which converts the baseband signal into data and processes it.

[0290] Those skilled in the art will appreciate that, for ease of explanation, FIG16 shows only one memory and processor. In an actual terminal, there may be multiple processors and memories. The memory may also be referred to as a storage medium or storage device, etc., which is not limited in the present embodiment.

[0291] For example, a processor may include a baseband processor and a central processing unit (CPU). The baseband processor is primarily responsible for processing communication protocols and communication data, while the CPU is primarily responsible for controlling the entire terminal, executing software programs, and processing data from software programs. The processor in Figure 16 integrates the functions of both the baseband processor and the CPU. Those skilled in the art will appreciate that the baseband processor and the CPU may also be independent processors interconnected via a bus or other technology. Those skilled in the art will appreciate that a terminal may include multiple baseband processors to accommodate different network standards, multiple CPUs to enhance its processing capabilities, and that the various components of the terminal may be connected via various buses. The baseband processor may also be referred to as a baseband processing circuit or a baseband processing chip. The CPU may also be referred to as a central processing circuit or a central processing chip. The functionality for processing communication protocols and communication data may be built into the processor or stored as a software program in a storage unit, with the processor executing the software program to implement the baseband processing functionality.

[0292] For example, in the embodiment of the present application, the antenna and control circuit with transceiver functions can be regarded as the transceiver unit 4100 of the terminal 4000, and the processor with processing function can be regarded as the processing unit 4200 of the terminal 4000. As shown in Figure 16, the terminal 4000 includes a transceiver unit 4100 and a processing unit 4200. The transceiver unit can also be referred to as a transceiver, a transceiver, a transceiver device, etc. Optionally, the device used to implement the receiving function in the transceiver unit 4100 can be regarded as a receiving unit, and the device used to implement the transmitting function in the transceiver unit 4100 can be regarded as a transmitting unit, that is, the transceiver unit 4100 includes a receiving unit and a transmitting unit. For example, the receiving unit can also be referred to as a receiver, a receiver, a receiving circuit, etc., and the transmitting unit can be referred to as a transmitter, a transmitter, or a transmitting circuit, etc.

[0293] Figure 17 is a schematic diagram of the structure of a network device 5000 provided in an embodiment of the present application. The aforementioned communication device 2000 or communication device 3000 can be configured in the network device 5000. Alternatively, the communication device 2000 or communication device 3000 itself can be the network device 5000. Alternatively, the network device 5000 can perform the actions performed by the network device in the aforementioned method embodiment.

[0294] As shown in Figure 17, the network device 5000 may include one or more DUs 5010 and one or more CUs 5020. The CU 5020 can communicate with the NG core (Next Generation Core Network, NC). The DU 5010 may include at least one antenna 5011, at least one radio frequency unit 5012, at least one processor 5013, and at least one memory 5014. The DU 5010 is primarily used for transmitting and receiving radio frequency signals, converting radio frequency signals into baseband signals, and performing some baseband processing. The CU 5020 may include at least one processor 5022 and at least one memory 5021. The CU 5020 and the DU 5010 can communicate via interfaces, wherein the control plane (CP) interface may be an Fs-C, such as F1-C, and the user plane (UP) interface may be an Fs-U, such as F1-U.

[0295] The CU 5020 is primarily used for baseband processing and controlling the network device 5000. The DU 5010 and CU 5020 can be physically located together or separately, i.e., as a distributed base station. The CU 5020 is the control center of the network device 5000, also known as a processing unit, and is primarily used to perform baseband processing functions. For example, the CU 5020 can be used to control the network device 5000 to execute the operating procedures for the first device or the second device in the above-described method embodiments.

[0296] Specifically, baseband processing on the CU and DU can be divided according to the protocol layers of the wireless network. For example, the functions of the PDCP layer and above are located in the CU, while the functions of the protocol layers below the PDCP, such as the RLC layer and the MAC layer, are located in the DU. For another example, the CU implements the functions of the RRC layer and the PDCP layer, while the DU implements the functions of the RLC layer, the MAC layer, and the PHY layer.

[0297] In addition, the network device 5000 may optionally include one or more radio frequency units (RUs), one or more DUs, and one or more CUs. The DU may include at least one processor 5013 and at least one memory 5014, the RU may include at least one antenna 5011 and at least one radio frequency unit 5012, and the CU may include at least one processor 5022 and at least one memory 5021.

[0298] In one example, the CU 5020 can be composed of one or more single boards, and multiple single boards can jointly support a wireless access network with a single access indication (such as a 5G network), or can respectively support wireless access networks with different access standards (such as an LTE network, a 5G network, or other networks). The memory 5021 and the processor 5022 can serve one or more single boards. That is, a memory and a processor can be set separately on each single board. It is also possible that multiple single boards share the same memory and processor. In addition, necessary circuits can be set on each single board. The DU 5010 can be composed of one or more single boards, and multiple single boards can jointly support a wireless access network with a single access indication (such as a 5G network), or can respectively support wireless access networks with different access standards (such as an LTE network, a 5G network, or other networks). The memory 5014 and the processor 5013 can serve one or more single boards. That is, a memory and a processor can be set separately on each single board. It is also possible that multiple single boards share the same memory and processor. In addition, necessary circuits can be set on each single board.

[0299] It should be understood that the network device 5000 shown in FIG17 is capable of implementing each process related to the actions performed by the first device or the second device in the aforementioned method embodiments. The operations and / or functions of the various modules in the network device 5000 are respectively for implementing the corresponding processes in the aforementioned method embodiments. For details, please refer to the description of the aforementioned method embodiments; to avoid repetition, detailed descriptions are omitted here.

[0300] It should be understood that the network device 5000 shown in FIG17 is only one possible architecture of a network device and does not constitute any limitation to this application. The method provided in this application is applicable to network devices of other architectures. For example, network devices including CU, DU, and AAU, etc. This application does not limit the specific architecture of the network device.

[0301] It should be understood that, in one possible design, each step in the method embodiment provided in the present application can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0302] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0303] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0304] The present application also provides a computer program product, which includes: computer program code, which, when executed on a computer, enables the computer to execute the steps or processes executed by the first device or the second device in any of the above method embodiments.

[0305] The present application also provides a computer-readable storage medium, which stores program code. When the program code runs on a computer, the computer executes the steps or processes executed by the first device or the second device in any of the above method embodiments.

[0306] The present application also provides a communication device, including a processor and an interface, wherein the interface is used to send and / or receive signals, so that the processor executes the various steps or processes executed by the first device or the second device in any of the above method embodiments.

[0307] The present application also provides a communication system, which includes at least one of a first device and a second device.

[0308] The above-mentioned device embodiments and method embodiments are completely corresponding, and the corresponding steps are performed by the corresponding modules or units. For example, the communication unit or communication interface performs the receiving or sending steps in the method embodiment. Other steps except sending and receiving can be performed by the processing unit or processor.

[0309] In the embodiments of this application, each term and English abbreviation is provided for convenience of description and shall not constitute any limitation to this application. This application does not exclude the possibility of defining other terms that can achieve the same or similar functions in existing or future agreements.

[0310] As used in this specification, the terms "component," "module," "system," and the like are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside in a process and / or an execution thread, and a component can be located on one computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable storage media having various data structures stored thereon. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0311] Those skilled in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0312] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can be based on the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0313] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0314] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0315] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0316] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0317] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0318] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A model training method, characterized in that: Applied to a first device, the method includes: Sending a first training data set to a second device, where the first training data set includes at least one piece of data; receiving first feedback information from the second device, where the first feedback information includes data value of each piece of data in the first training data set; Determine a first data set and a second data set according to the data value of each piece of data in the first training data set and a first value threshold, wherein both the data in the first data set and the data in the second data set belong to the first training data set; Model training is performed on the student model according to the first data set and the second data set.

2. The method according to claim 1, characterized in that The first feedback information further includes a first soft label, which is an output obtained by the second device by using the first training data set as an input of a teacher model; The step of performing model training on the student model according to the first data set and the second data set includes: The student model is subjected to knowledge distillation using the first data set and the soft label corresponding to the first data set in the first soft label, and / or the student model is updated using the second data set, wherein the first data set is data in the first training data set whose data value is greater than or equal to a first value threshold, and the second data set is data in the first training data set whose data value is less than the first value threshold, and the first value threshold is a positive number.

3. The method according to claim 2, characterized in that The performing model training on the student model according to the first data set and the second data set further includes: Determining whether the accuracy of the student model meets the convergence condition; If the accuracy of the student model does not meet the convergence condition, sending a second training data set to the second device, where the second training data set includes at least one piece of data; receiving second feedback information from the second device, the second feedback information including a second soft label and a data value of each piece of data in the second training data set, the second soft label being an output obtained by the second device by using the second training data set as an input of the teacher model; Determine a third data set and a fourth data set according to the data value and the second value threshold of each data in the second training data set, wherein the third data set is data in the second training data set whose data value is greater than or equal to the second value threshold, and the fourth data set is data in the second training data set whose data value is less than the second value threshold, and the second value threshold is a positive number; The student model is trained according to the third data set, the fourth data set and the second soft label.

4. The method according to claim 1, characterized in that The performing model training on the student model according to the first data set and the second data set includes: Determine a third data set and a fourth data set in the second training data set, wherein the third data set is data in the second training data set whose similarity with the first data set is greater than or equal to a first similarity threshold, the fourth data set is data in the second training data set whose similarity with the first data set is less than the first similarity threshold, the first similarity threshold is a positive number, and the first data set is data in the first training data set. According to data whose value is greater than or equal to a first value threshold; sending the third data set to the second device; receiving a second soft label from the second device, where the second soft label is an output of the second device obtained by using the third data set as an input of a teacher model; The third data set and the second soft label are used to perform knowledge distillation on the student model, and / or the fourth data set is used to update the student model.

5. The method according to claim 4, characterized in that The performing model training on the student model according to the first data set and the second data set further includes: Determining whether the accuracy of the student model meets the convergence condition; If the accuracy of the student model does not meet the convergence condition, determine a fifth data set and a sixth data set in the third training data set, wherein the fifth data set is data in the third training data set whose similarity with the seventh data set is greater than or equal to a second similarity threshold, the sixth data set is data in the third training data set whose similarity with the seventh data set is less than the second similarity threshold, the second similarity threshold is a positive number, and the seventh data set includes data in the first data set and the third data set; sending the fifth data set to the second device; receiving a third soft label from the second device, wherein the third soft label is an output of the second device obtained by using the fifth data set as an input of the teacher model; The fifth data set and the third soft label are used to perform knowledge distillation on the student model, and / or the sixth data set is used to update the student model.

6. The method according to any one of claims 1 to 5, characterized in that Before determining the first data set and the second data set according to the data value of each piece of data in the first training data set and the first value threshold, the method further includes: The first value threshold is received from the second device.

7. The method according to claim 3, characterized in that Before determining the third data set and the fourth data set according to the data value and the second value threshold of each piece of data in the second training data set, the method further includes: The second value threshold is received from the second device.

8. The method according to claim 3 or 7, characterized in that Both the first value threshold and the second value threshold are positively correlated with the currently available computing power of the first device.

9. The method according to claim 4 or 5, characterized in that Before determining the third data set and the fourth data set in the second training data set, the method further includes: The first similarity threshold and / or similarity calculation method is received from the second device, where the similarity calculation method is used to calculate the similarity between any data in the second training data set and the first data set.

10. The method according to claim 5, characterized in that Before determining the fifth data set and the sixth data set in the third training data set, the method further includes: The second similarity threshold is received from the second device.

11. The method according to any one of claims 2 to 5, characterized in that: Before sending the first training data set to the second device, the method further includes: Sending collaboration request information to the second device, wherein the collaboration request information includes a collaboration type and a collaboration mode. The identifier of the collaborative model is the identifier of the teacher model. The collaborative type is knowledge distillation. The identifier of the collaborative model is the identifier of the teacher model.

12. A model training method, characterized in that: Applied to the second device, the method includes: receiving at least one piece of data from a first device; Determining the data value of each piece of data in the at least one piece of data; Sending first feedback information to the first device, the first feedback information including the data value of each piece of the at least one piece of data, the data value of each piece of the at least one piece of data is used by the first device to determine data for knowledge distillation and data for updating the student model.

13. The method according to claim 12, characterized in that The first feedback information also includes a soft tag; Before sending the feedback information to the first device, the method further includes: The at least one piece of data is input into a teacher model to obtain the soft label output by the teacher model, and the soft label is used for the first device to perform the knowledge distillation.

14. The method according to claim 12 or 13, characterized in that The method further comprises: A value threshold is sent to the first device, where the value threshold is used by the first device to determine data used for the knowledge distillation and data used for updating the student model according to data value of the data.

15. The method according to any one of claims 12 to 14, characterized in that The method further comprises: A similarity threshold and / or a similarity calculation method is sent to the first device, where the similarity calculation method is used to calculate the similarity of the data, and the similarity threshold is used by the first device to determine the data used for the knowledge distillation and the data used for updating the student model according to the similarity of the data.

16. A communication device, characterized in that: include: A communication unit, configured to send a first training data set to a second device, wherein the first training data set includes at least one piece of data; The communication unit is further configured to receive first feedback information from the second device, wherein the first feedback information includes a data value of each piece of data in the first training data set; A processing unit, configured to determine a first data set and a second data set according to a data value of each piece of data in the first training data set and a first value threshold, wherein both the data in the first data set and the data in the second data set belong to the first training data set; The processing unit is also used to perform model training on the student model based on the first data set and the second data set.

17. The device according to claim 16, characterized in that The first feedback information further includes a first soft label, which is an output obtained by the second device by using the first training data set as an input of a teacher model; Wherein, the processing unit is specifically used for: The student model is subjected to knowledge distillation using the first data set and the soft label corresponding to the first data set in the first soft label, and / or the student model is updated using the second data set, wherein the first data set is data in the first training data set whose data value is greater than or equal to a first value threshold, and the second data set is data in the first training data set whose data value is less than the first value threshold, and the first value threshold is a positive number.

18. The device according to claim 17, characterized in that The processing unit is further specifically used for: Determining whether the accuracy of the student model meets the convergence condition; If the accuracy of the student model does not meet the convergence condition, controlling the communication unit to send a second training data set to the second device, the second training data set including at least one piece of data; Controlling the communication unit to receive second feedback information from the second device, the second feedback information including a second soft label and a data value of each piece of data in the second training data set, the second soft label being an output obtained by the second device by using the second training data set as an input of the teacher model; Determine a third data set and a fourth data set according to the data value and the second value threshold of each data in the second training data set, wherein the third data set is data in the second training data set whose data value is greater than or equal to the second value threshold, and the fourth data set is data in the second training data set whose data value is less than the second value threshold, and the second value threshold is a positive number; The student model is trained according to the third data set, the fourth data set and the second soft label.

19. The device according to claim 16, characterized in that The processing unit is specifically used for: Determine a third data set and a fourth data set in the second training data set, wherein the third data set is data in the second training data set whose similarity with the first data set is greater than or equal to a first similarity threshold, and the fourth data set is data in the second training data set whose similarity with the first data set is less than the first similarity threshold, the first similarity threshold is a positive number, and the first data set is data in the first training data set whose data value is greater than or equal to a first value threshold; Controlling the communication unit to send the third data set to the second device; Controlling the communication unit to receive a second soft label from the second device, where the second soft label is an output obtained by the second device by using the third data set as an input of a teacher model; The third data set and the second soft label are used to perform knowledge distillation on the student model, and / or the fourth data set is used to update the student model.

20. The device according to claim 19, characterized in that The processing unit is further specifically used for: Determining whether the accuracy of the student model meets the convergence condition; If the accuracy of the student model does not meet the convergence condition, determine a fifth data set and a sixth data set in the third training data set, wherein the fifth data set is data in the third training data set whose similarity with the seventh data set is greater than or equal to a second similarity threshold, the sixth data set is data in the third training data set whose similarity with the seventh data set is less than the second similarity threshold, the second similarity threshold is a positive number, and the seventh data set includes data in the first data set and the third data set; Controlling the communication unit to send the fifth data set to the second device; controlling the communication unit to receive a third soft label from the second device, where the third soft label is an output of the second device obtained by using the fifth data set as an input of the teacher model; The fifth data set and the third soft label are used to perform knowledge distillation on the student model, and / or the sixth data set is used to update the student model.

21. The device according to any one of claims 16 to 20, characterized in that The communication unit is also used for: The first value threshold is received from the second device.

22. The device according to claim 18, characterized in that The communication unit is also used for: The second value threshold is received from the second device.

23. The device according to claim 18 or 22, characterized in that Both the first value threshold and the second value threshold are positively correlated with the currently available computing power of the device.

24. The device according to claim 19 or 20, characterized in that The communication unit is also used for: The first similarity threshold and / or similarity calculation method is received from the second device, where the similarity calculation method is used to calculate the similarity between any data in the second training data set and the first data set.

25. The device according to claim 20, characterized in that The communication unit is also used for: The second similarity threshold is received from the second device.

26. The device according to any one of claims 17 to 20, characterized in that The communication unit is also used for: Sending collaboration request information to the second device, the collaboration request information including a collaboration type and an identifier of a collaboration model, the collaboration type is knowledge distillation, and the identifier of the collaboration model is an identifier of the teacher model.

27. A communication device, characterized in that: include: A communication unit, configured to receive at least one piece of data from a first device; A processing unit, configured to determine a data value of each piece of data in the at least one piece of data; The communication unit is also used to send first feedback information to the first device, wherein the first feedback information includes a data value of each of the at least one data, and the data value of each of the at least one data is used to determine data for knowledge distillation and data for updating a student model.

28. The device according to claim 27, characterized in that The processing unit is also used for: The at least one piece of data is input into a teacher model to obtain a soft label output by the teacher model, and the soft label is used to perform the knowledge distillation.

29. The device according to claim 27 or 28, characterized in that The communication unit is also used for: A value threshold is sent to the first device, where the value threshold is used to determine data used for the knowledge distillation and data used for updating the student model according to data value of the data.

30. The device according to any one of claims 27 to 29, characterized in that The communication unit is also used for: A similarity threshold and / or a similarity calculation method is sent to the first device, where the similarity calculation method is used to calculate the similarity of the data, and the similarity threshold is used to determine the data used for the knowledge distillation and the data used for updating the student model according to the similarity of the data.

31. A communication device, characterized in that: The device comprises a processor, wherein the processor is coupled to a memory, wherein the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the device executes the method as claimed in any one of claims 1 to 11 or claims 12 to 15.

32. A communication device, characterized in that: The method comprises a processor and an interface, wherein the interface is used to send and / or receive signals, so that the processor executes the method according to any one of claims 1 to 11 or claims 12 to 15.

33. A readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed, the computer is caused to perform the method as claimed in any one of claims 1 to 11 or any one of claims 12 to 15.

34. A computer program product, characterized in that The method comprises computer program instructions, wherein the computer program instructions cause the computer to execute the method according to any one of claims 1 to 11 or any one of claims 12 to 15.

35. A communication system, characterized in that: Comprising the device as described in any one of claims 16-26, and / or, the device as described in any one of claims 27-30.

Citation Information

Patent Citations

  • Neural network training method, image processing method and device

    CN111489365A

  • Information redundancy elimination method for sample set

    CN112200255A

  • Student model training method and device, computer equipment and storage medium

    CN112749728A

  • Knowledge graph embedding compression method based on knowledge graph distillation

    CN113987196A

  • Model training method and device, electronic equipment and storage medium

    CN114330510A

Cited By

  • Food sensory preference degree identification method, device and equipment based on 3D facial micro-expression and medium

    CN120198950A