WO2023092439A1 - 一种模型训练方法以及装置 - Google Patents

一种模型训练方法以及装置 Download PDF

Info

Publication number
WO2023092439A1
WO2023092439A1 PCT/CN2021/133389 CN2021133389W WO2023092439A1 WO 2023092439 A1 WO2023092439 A1 WO 2023092439A1 CN 2021133389 W CN2021133389 W CN 2021133389W WO 2023092439 A1 WO2023092439 A1 WO 2023092439A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
fault model
training
data
state
Prior art date
Application number
PCT/CN2021/133389
Other languages
English (en)
French (fr)
Inventor
吕清
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2021/133389 priority Critical patent/WO2023092439A1/zh
Publication of WO2023092439A1 publication Critical patent/WO2023092439A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning

Definitions

  • the embodiments of the present application relate to the technical field of smart car data processing, and in particular to a model training method and device.
  • the current system architecture for predicting vehicle faults based on data models is centralized data model training and fault prediction.
  • the historical operating data of vehicles is collected centrally in the cloud, and the data model is trained, updated, and fault predicted in the cloud.
  • the vehicle data needs to leave the vehicle and upload to the server, which poses a security risk, and the data is easily lost during the transmission process, and the integrity of the data is at risk.
  • Embodiments of the present application provide a model training method and device, which are used to ensure data security and improve the efficiency of updating fault models.
  • the first aspect of the present application provides a model training method, the method comprising: obtaining the first data corresponding to the first vehicle; inputting the first data into the first fault model to predict the first state of the first vehicle; When it is a fault, the label of the first vehicle is obtained, and the label is used to indicate the second state of the first vehicle; training is performed according to the second state, the second data of the first vehicle and the first fault model, and the training parameters are obtained; the training parameters sent to the server.
  • the executor is the first vehicle in the vehicle-cloud collaborative system, wherein the vehicle-cloud collaborative system includes a server and multiple vehicles interacting with the server, and the multiple vehicles include the first vehicle.
  • the first vehicle predicts the first data based on the first fault model, and when the first state of the first vehicle is predicted to be a fault, obtain the label of the first vehicle, and combine the second data of the first vehicle with the label when obtaining the label.
  • the first fault model is trained, and then the training parameters obtained from the training are sent to the server to update the first fault model.
  • the data of the first vehicle does not need to be sent to the server, and the prediction model can be updated in time when the first vehicle obtains the label, ensuring data Security and improved efficiency in updating failure models.
  • the second data includes data before the failure of the first vehicle and the first data.
  • the second data includes both the first data and the operating data when the first vehicle does not predict a failure
  • the first vehicle can be trained based on the change of the operating data from the first state from normal to failure to improve training. Effect.
  • the method before training according to the second state, the second data of the first vehicle and the first fault model, the method further includes: acquiring a third fault model from the server; Used to update the first failure model.
  • the first fault model saved by the server can also be adjusted based on user needs, such as modifying the algorithm of the model.
  • the first fault model used by the first vehicle for training needs to be aligned with the server.
  • a vehicle After a vehicle obtains the tag, it can obtain the third fault model from the server, and then update the locally stored first fault model with the third fault model. All vehicles interacting with the server (including the first vehicle) also need to obtain the entire third fault model from the server when training the model, so as to improve the accuracy of model training.
  • the method further includes: acquiring second fault model parameters, where the second fault model parameters are used to update the first fault model.
  • the server after the server aggregates the training parameters to generate the second fault model parameters, it can send the second fault model parameters to the first vehicle, so that the first vehicle can update the local storage according to the second fault model parameters The parameters of the first fault model, and then the first vehicle can predict the state of the first vehicle based on the updated first fault model, improving the effect of fault prediction.
  • the method before training according to the second state, the second data of the first vehicle, and the first fault model, the method further includes: acquiring a termination condition, the termination condition is used to control the second state, the second The number of training times for the second data and the first fault model.
  • the first vehicle is training the second state, the second data of the first vehicle and the first fault model, and also needs to obtain the termination condition of the training to control the number of training times of the first fault model, wherein , the termination condition may be pre-saved locally in the first vehicle, or adaptively adjusted by the server and sent to the first vehicle, so as to improve the effect of model training.
  • the second aspect of the present application provides a model training method, the method includes: obtaining the training parameters of the first vehicle, determining the effectiveness of the second state of the first vehicle; when the second state of the first vehicle is valid, training Parameter aggregation, determining second fault model parameters; sending the second fault model parameters to the first vehicle, where the second fault model parameters are used to update the first fault model.
  • the server after the server receives the training parameters of the first vehicle, it can acquire the label of the first vehicle, wherein, because the label of the first vehicle is time-sensitive, the label acquired by the server is not necessarily the staff based on the first state Therefore, the server also needs to detect the timeliness of the tag to determine the validity of the second state. Only the training parameters of the first vehicle whose second state is valid are aggregated to improve the aggregation effect.
  • the method further includes: sending a third fault model to the first vehicle, where the third fault model is used to update the first fault model.
  • the first fault model saved by the server can also be adjusted based on user needs, such as modifying the algorithm of the model.
  • the first fault model used by the first vehicle for training needs to be aligned with the server to improve model training. Effect.
  • the method further includes: determining a termination condition, where the termination condition is used to control the training times of the second state, the second data and the first fault model.
  • the server may adaptively adjust the termination condition of the first vehicle during model training to improve the effect of model training.
  • the third aspect of the embodiments of the present application provides a model training device, which can implement the method in the first aspect or any possible implementation manner of the first aspect.
  • the apparatus includes corresponding units or modules for performing the above method.
  • the units or modules included in the device can be realized by means of software and/or hardware.
  • the device can be, for example, a network device, or a chip, a chip system, or a processor that supports the network device to implement the above method, or a logic module or software that can realize all or part of the functions of the network device.
  • the fourth aspect of the embodiment of the present application provides a model training device, which can implement the method in the second aspect or any possible implementation manner of the second aspect.
  • the apparatus includes corresponding units or modules for performing the above method.
  • the units or modules included in the device can be realized by means of software and/or hardware.
  • the device can be, for example, a network device, or a chip, a chip system, or a processor that supports the network device to implement the above method, or a logic module or software that can realize all or part of the functions of the network device.
  • the fifth aspect of the embodiment of the present application provides a computer device, including: a processor, a memory, and a transceiver, and the processor is used to execute instructions stored in the memory, so that the computer device performs the first aspect or any one of the first aspect.
  • the computer device may be, for example, a smart vehicle, or a chip or a chip system that supports the smart vehicle to implement the above method.
  • the sixth aspect of the embodiment of the present application provides a computer device, including: a processor, a memory, and a transceiver.
  • the processor is used to execute instructions stored in the memory, so that the computer device performs the second aspect or any of the second aspects.
  • the computer device may be, for example, a network device, or a chip or a chip system that supports the network device to implement the above method.
  • the seventh aspect of the embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed, the computer executes the first aspect or any possibility of the first aspect The method provided by the embodiment.
  • the eighth aspect of the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores instructions, and when the instructions are executed, the computer executes any possibility of the aforementioned second aspect or the second aspect The method provided by the embodiment.
  • the ninth aspect of the embodiment of the present application provides a computer program product.
  • the computer program product includes computer program code.
  • the computer program code When executed, the computer executes the first aspect or any possible implementation of the first aspect. method provided.
  • the tenth aspect of the embodiment of the present application provides a computer program product, the computer program product includes computer program code, when the computer program code is executed, the computer executes the second aspect or any possible implementation of the second aspect method provided.
  • FIG. 1 is a schematic structural diagram of a vehicle-cloud collaboration system provided in an embodiment of the present application
  • Fig. 2 is a schematic flow chart of a model training method provided by the embodiment of the present application.
  • Fig. 3 is a schematic diagram of labeling provided by the embodiment of the present application.
  • FIG. 4 is a schematic diagram of interaction between a vehicle and a server provided in an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a model training device provided in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another model training device provided in the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another computer device provided by an embodiment of the present application.
  • Embodiments of the present application provide a model training method and device, which are used to ensure data security and improve the efficiency of updating fault models.
  • Federated learning a distributed machine learning algorithm, uses multiple clients, such as mobile devices or edge servers, and servers to collaboratively complete model training and algorithm updates on the premise that the data does not leave the domain. to get the trained global model. It can be understood that in the process of machine learning, each participant can conduct joint modeling with the help of data from other parties. All parties do not need to share data resources, that is, when the data does not come out of the local area, data joint training is carried out to establish a shared machine learning model.
  • the system includes a server and N vehicles, such as vehicle 1, vehicle 2, ..., vehicle N-1 and vehicle N, where the server can be a server cluster, It is not limited here.
  • N vehicles can collect their own driving data, and then exchange data with the server.
  • the server and the N vehicles can interact through any communication mechanism/communication standard communication network, and the communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.
  • the communication network may include a wireless network, a wired network, or a combination of a wireless network and a wired network, and the like.
  • the wireless network includes but is not limited to: the fifth generation mobile communication technology (5th-Generation, 5G) system, long term evolution (long term evolution, LTE) system, global system for mobile communication (GSM) or code division Multiple access (code division multiple access, CDMA) network, wideband code division multiple access (wideband code division multiple access, WCDMA) network, wireless fidelity (wireless fidelity, WiFi), Bluetooth (blue tooth), Zigbee protocol (Zigbee) , radio frequency identification technology (radio frequency identification, RFID), long-range (Long Range, Lora) wireless communication, near field communication (near field communication, NFC) in any one or a combination of more.
  • the wired network may include an optical fiber communication network or a network composed of coaxial cables.
  • the embodiment of the present application provides a model training method, which is specifically described as follows.
  • the first vehicle is any one of the N vehicles.
  • the server can send the model to be trained to the connected vehicle, and the vehicle can use the locally stored driving data to train the model, and feed back the training parameters of the trained model to the server.
  • the one or more received training parameters can be aggregated to obtain aggregated parameters, which is equivalent to obtaining an aggregated fault model.
  • the final fault model can be output to complete federated learning.
  • the first vehicle predicts the first data based on the first fault model, and when the first state of the first vehicle is predicted to be a fault, obtain the label of the first vehicle, and combine the second data of the first vehicle with the label when obtaining the label
  • the first fault model is trained, and then the training parameters obtained through the training are sent to the server, so that the server updates the first fault model based on the training parameters.
  • the above-mentioned faults can be vehicle battery thermal runaway faults or vehicle battery pack faults, etc., and are not limited to faults of the vehicle as a whole, system, and components, and can also be applied to fault prediction of various industrial equipment such as machining equipment, agricultural machinery, and ships. , is not limited here.
  • Fig. 2 it is a flow chart of a model training method provided by the embodiment of the present application, the method includes:
  • Step 201 The first vehicle acquires the first data corresponding to the first vehicle.
  • the first data is real-time running data of the first vehicle, and the first vehicle monitors its own running data in real time, and stores the monitored data as the first data.
  • the first vehicle can collect the real-time running data through the sensor, and then store the real-time running data locally, and the first vehicle can extract the current data as the first data.
  • the first data may include at least one of the following: positioning data of the first vehicle, driving speed data, mileage data, battery power data, battery voltage data, braking data, accelerator data, motor voltage and current data, insulation resistance data And temperature data, etc., are not limited here.
  • Step 202 The first vehicle inputs the first data into the first fault model to predict the first state of the first vehicle.
  • the first vehicle after the first vehicle collects the first data, it can input the first data into the locally stored first fault model, and the first fault model can process the first data and output the processing result,
  • the processing result is the result of predicting the state of the first vehicle, the predicted state is taken as the first state, the first state includes failure or normal, and the first state is the state of the first vehicle within a preset time range.
  • the first fault model can be obtained by training according to the sample data and the state corresponding to the sample data. After the first fault model obtains the first data, it can match the corresponding state according to the similarity between the first data and the sample data as first state.
  • the locally stored first fault model may be sent by the server to the first vehicle, and the first fault model may be a model stored locally by the server, such as a global model stored locally by the server, or the server may receive other After the server sends the model, save the received model locally or update the locally stored model.
  • Step 203 When the first state is failure, the first vehicle obtains the tag of the first vehicle.
  • the tag of the first vehicle can be obtained, which is an identifier set by the staff after checking the current state of the first vehicle, It is used to indicate the second state of the first vehicle, and the second state is the current state of the first vehicle.
  • the staff can be notified to perform closed-loop processing (fault diagnosis, maintenance), and the staff can mark the first vehicle according to the current actual situation of the first vehicle during closed-loop processing. Label.
  • the way for the first vehicle to obtain the tag may be that after the staff can directly tag the first vehicle, the first vehicle obtains it locally.
  • the way for the first vehicle to obtain the tag can also be that the staff tags the first vehicle in a subsystem, and the first vehicle waits for the subsystem to send the tag, or the first vehicle directly sends an acquisition request to the first vehicle to receive the tag from the sub-system.
  • the label of the system which is not limited here. Take the staff tagging in the subsystem as an example. Please refer to the tagging diagram shown in Figure 3.
  • the first state will be predicted based on real-time operating data.
  • the staff can label the vehicle.
  • the staff labels Vehicle 1 and Vehicle 2 in the subsystem and sends the labels to the corresponding vehicles.
  • Step 204 The first vehicle performs training according to the second state, the second data of the first vehicle and the first fault model to obtain training parameters.
  • the federated learning training method can be started, that is, the second data stored locally by the first vehicle is read.
  • the second data is the historical operation data stored locally by the first vehicle.
  • a vehicle can train the second state indicated by the label, the second data, and the locally stored first fault model.
  • the trained model can be obtained, and then parameters can be extracted from the trained model as training parameters.
  • the second data includes both the first data and the operating data when the first vehicle is not predicted to be faulty, and the first vehicle can be trained based on the change of the operating data from the first state from normal to faulty to improve the training effect.
  • the first vehicle inputs the second state and the second data into the first fault model, and then uses an algorithm to optimize the parameters of the first fault model.
  • an algorithm to optimize the parameters of the first fault model.
  • methods such as grid search, random search, genetic algorithm, particle swarm optimization and other methods can be used to adjust the parameters of the model to obtain parameters with good prediction effect, while the parameters are persisted.
  • the first fault model used by the first vehicle for training may also be a model aligned with the server. After the first vehicle obtains the label, it may obtain the third fault model from the server, and then the third fault model The locally stored first fault model is updated.
  • the first fault model stored in the server may be trained based on the random forest algorithm.
  • the server changes the algorithm type of the first fault model, for example, to the third fault model of the generative confrontation network, all the server interactions Vehicles (including the first vehicle) also need to obtain the entire third fault model from the server when training the model, so as to improve the accuracy of model training.
  • the termination condition can be What is stored locally in the first vehicle may also be adaptively adjusted by the server and sent to the first vehicle, which is not limited here.
  • Step 205 The first vehicle sends the training parameters to the server.
  • the first vehicle after the first vehicle finishes training the first fault model, it can encrypt the obtained training parameters, and then send the encrypted training parameters to the server, and the corresponding server can receive the encrypted training parameters.
  • each tagged vehicle regardless of whether the second state indicated by the tag is normal or faulty
  • each labeled vehicle sends training parameters to the server.
  • Step 206 The server determines the validity of the second state of the first vehicle.
  • the server may decrypt the training parameters, and then obtain the label of the first vehicle based on the first vehicle to which the training parameters belong.
  • the label obtained by the server is not necessarily obtained by the staff based on the first status inspection. Therefore, the server also needs to detect the timeliness of the label to determine the validity of the second status. sex.
  • the label can be carried by the first vehicle when sending the training parameters, wherein, the label can be represented by "1" and "0", with "1" representing normal and "0" representing failure.
  • the label It also carries a time stamp
  • the server can determine whether it is within the preset time range according to the time stamp, or compare the time stamp with the time stamp carried by the training parameters sent by the first vehicle last time, and it does not mean that the second state is valid at the same time , is not limited here.
  • both the first vehicle and the server can obtain the tag in the subsystem, which is not limited here.
  • Step 207 When the second state of the first vehicle is valid, the server aggregates the training parameters to determine the second fault model parameters.
  • the server After the server receives at least one training parameter sent by the first vehicle, it can aggregate at least one training parameter corresponding to the first vehicle that is valid in the second state, wherein the aggregation is to aggregate multiple data into the first data process, in the embodiment of the present application, the server fuses multiple training parameters into one parameter to generate the second fault model parameters, and then updates the locally stored first fault model based on the aggregation result.
  • the manner of aggregating at least one training parameter may include methods such as averaging, weighted summation, or weighted fusion with the local first fault model parameter, which may be based on actual application scenarios, and the present application does not limit the aggregation method .
  • the server sums and averages multiple training parameters, and the finally obtained average parameter is the second fault model parameter in the embodiment of the present application.
  • the server can also retrain the received training parameters locally, so as to retain the personalized processing of the server data distribution characteristics for the first fault model parameters, so that the final model can adapt to the data of each vehicle
  • the distribution structure can also adapt to the data distribution of the server, and improve the generalization ability of the finally obtained second fault model parameters in the federated learning system.
  • Step 208 The server sends the second fault model parameters to the first vehicle.
  • the server after the server aggregates the training parameters based on the federated learning method to generate the second fault model parameters, it can send the second fault model parameters to all vehicles interacting with the server, and the first vehicle receives the second fault model parameters After the model parameters, the parameters of the second fault model can be updated to the locally stored parameters of the first fault model, and then the first vehicle can continue to predict the state of the first vehicle based on the updated first fault model.
  • the second fault model parameter sent by the server is encrypted data, and the first vehicle needs to decrypt the encrypted data to obtain the second fault model parameter after receiving the encrypted data.
  • the first vehicle predicts the first data based on the first fault model, and when the first state of the first vehicle is predicted to be a fault, the tag of the first vehicle is obtained, and when the tag is obtained, the first The second data of the vehicle and the first fault model are trained, and then the training parameters obtained by training are sent to the server to update the first fault model.
  • the data of the first vehicle does not need to be sent to the server, and the first vehicle can obtain the label in time Update prediction models, ensure data security and improve the efficiency of updating failure models.
  • the server determines the validity of the tags of the first vehicle, and aggregates only the training parameters with valid tags, so as to achieve the aggregation effect of the training parameters.
  • model training method has been described above, and the device for executing the method will be described below.
  • FIG. 5 it is a schematic structural diagram of a model training device provided by the embodiment of the present application.
  • the device 50 includes: an acquisition unit 501 for acquiring the first data corresponding to the device 50 ; a prediction unit 502 , It is used to input the first data into the first fault model to predict the first state of the device 50; the obtaining unit 501 is also used to obtain the label of the device 50 when the first state is a fault, and the label is used to indicate the second state of the device 50. state; a training unit 503, configured to perform training according to the second state, the second data of the device 50, and the first fault model to obtain training parameters; a sending unit 504, configured to send the training parameters to the server.
  • the second data includes data before the failure of the device 50 and the first data.
  • the obtaining unit 501 is further configured to: obtain a third fault model from the server, where the third fault model is used to update the first fault model.
  • the obtaining unit 501 is further configured to: obtain a second fault model parameter, and the second fault model parameter is used to update the first fault model.
  • the obtaining unit 501 is further configured to: obtain a termination condition, the termination condition is used to control the number of training times of the second state, the second data and the first fault model.
  • Acquisition unit 501 is used to execute step 201 and step 203 in the method embodiment of FIG. 2
  • prediction unit 502 is used to execute step 202 in the method embodiment of FIG. 2
  • training unit 503 is used to execute step 205 in the method embodiment of FIG. 2
  • the sending unit 504 is configured to execute step 204 in the method embodiment in FIG. 2 , which will not be repeated here.
  • Fig. 6, is a schematic structural diagram of another model training device provided by the embodiment of the present application.
  • Fault model parameters, the second fault model parameters are used to update the first fault model.
  • the sending unit 603 is further configured to: send a third fault model to the first vehicle, and the third fault model is used to update the first fault model.
  • the apparatus 60 further includes a determining unit 604, which is specifically configured to: determine a termination condition, and the termination condition is used to control the second state, the second data, and the number of training times of the first fault model.
  • a determining unit 604 which is specifically configured to: determine a termination condition, and the termination condition is used to control the second state, the second data, and the number of training times of the first fault model.
  • the acquiring unit 601 is used to execute step 206 in the method embodiment in FIG. 2
  • the aggregation unit 602 is used to execute step 207 in the method embodiment in FIG. 2
  • the sending unit 603 is used to execute step 208 in the method embodiment in FIG. 2 , where No longer.
  • each unit in the device can be implemented in the form of software called by the processing element; they can also be implemented in the form of hardware; some units can also be implemented in the form of software called by the processing element, and some units can be implemented in the form of hardware.
  • each unit can be a separate processing element, or it can be integrated in a certain chip of the device.
  • it can also be stored in the memory in the form of a program, which is called and executed by a certain processing element of the device. Function.
  • all or part of these units can be integrated together, or implemented independently.
  • the processing element mentioned here may also be a processor, which may be an integrated circuit with signal processing capabilities.
  • each step of the above method or each unit above may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software called by the processing element.
  • the units in any of the above devices may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (application specific integrated circuit, ASIC), or, one or Multiple microprocessors (digital signal processor, DSP), or, one or more field programmable gate arrays (field programmable gate array, FPGA), or a combination of at least two of these integrated circuit forms.
  • ASIC application specific integrated circuit
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the units in the device can be implemented in the form of a processing element scheduler
  • the processing element can be a general-purpose processor, such as a central processing unit (central processing unit, CPU) or other processors that can call programs.
  • CPU central processing unit
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • FIG. 7 is a schematic diagram of a possible logical structure of a computer device 70 provided by an embodiment of the present application.
  • the computer device 70 includes: a processor 701 , a communication interface 702 , a storage system 703 and a bus 704 .
  • the processor 701 , the communication interface 702 and the storage system 703 are connected to each other through a bus 704 .
  • the processor 701 is used to control and manage the actions of the computer device 70 , for example, the processor 701 is used to execute the steps performed by the first vehicle in the method embodiment in FIG. 2 .
  • the communication interface 702 is used to support the computer device 70 to communicate.
  • the storage system 703 is used for storing program codes and data of the computer device 70 .
  • the processor 701 may be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor 701 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
  • the bus 704 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the sending unit 504 in the device 50 is equivalent to the communication interface 702 in the computer device 70
  • the acquisition unit 501 , prediction unit 502 and training unit 503 in the device 50 are equivalent to the processor 701 in the computer device 70 .
  • the computer device 70 of this embodiment may correspond to the first vehicle in the method embodiment of FIG. 2 above, and the communication interface 702 in the computer device 70 may realize the functions and/or functions of the first vehicle in the method embodiment of FIG. 2 above. Or the various steps implemented, for the sake of brevity, will not be repeated here.
  • FIG. 8 is a schematic diagram of a possible logical structure of a computer device 80 provided by an embodiment of the present application.
  • the computer device 80 includes: a processor 801 , a communication interface 802 , a storage system 803 and a bus 804 .
  • the processor 801 , the communication interface 802 and the storage system 803 are connected to each other through a bus 804 .
  • the processor 801 is used to control and manage the actions of the computer device 80 , for example, the processor 801 is used to execute the steps performed by the server in the method embodiment in FIG. 2 .
  • the communication interface 802 is used to support the computer device 80 in communicating.
  • the storage system 803 is used for storing program codes and data of the computer device 80 .
  • the processor 801 may be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor 801 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
  • the bus 804 can be a PCI bus or an EISA bus, etc.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 8 , but it does not mean that there is only one bus or one type of bus.
  • the sending unit 603 in the device 60 is equivalent to the communication interface 802 in the computer device 80
  • the obtaining unit 601 , aggregation unit 602 and determination unit 604 in the device 60 are equivalent to the processor 801 in the computer device 80 .
  • the computer device 80 in this embodiment may correspond to the server in the above-mentioned method embodiment in FIG. Various steps are not repeated here for the sake of brevity.
  • a computer-readable storage medium stores computer-executable instructions.
  • the processor of the device executes the computer-executable instructions
  • the device executes the above-mentioned method in FIG. 2 The steps of the model training method executed by the first vehicle in the embodiment.
  • a computer-readable storage medium stores computer-executable instructions.
  • the processor of the device executes the computer-executable instructions
  • the device executes the above-mentioned method in FIG. 2
  • a computer program product includes computer-executable instructions stored in a computer-readable storage medium; when the processor of the device executes the computer-executable instructions , the device executes the steps of the model training method executed by the first vehicle in the above method embodiment in FIG. 2 .
  • a computer program product includes computer-executable instructions stored in a computer-readable storage medium; when the processor of the device executes the computer-executable instructions , the device executes the steps of the model training method executed by the server in the method embodiment in FIG. 2 above.
  • the disclosed system, device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the essence of the technical solution of this application or the part that contributes to the present or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disc, etc., which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请实施例公开了一种模型训练方法以及装置。该方法包括:第一车辆基于第一故障模型对第一数据进行预测,当预测第一车辆的第一状态为故障时,获取该第一车辆的标签,当获得标签时结合该第一车辆的第二数据和该第一故障模型进行训练,然后将训练获得的训练参数发送给服务器更新第一故障模型,第一车辆的数据不需要发送给服务器,且第一车辆获得标签时可以及时更新预测模型,保障数据安全性以及提高故障模型更新效率。服务器在收到第一车辆的训练参数后,对第一车辆的标签的有效性进行确定,只对标签有效的训练参数进行聚合,可以训练参数的聚合效果。

Description

一种模型训练方法以及装置 技术领域
本申请实施例涉及智能车数据处理技术领域,尤其涉及一种模型训练方法以及装置。
背景技术
在使用车辆的过程中,车辆当中的各个系统或者部件会产生大量的运行数据,通过分析这些数据,提前预测车辆可能发生的故障并及时干预,对于保障车辆的运行安全和降低车辆的维修成本都具有重要意义。
当前基于数据模型预测车辆故障的系统架构为集中式数据模型训练和故障预测,车辆的历史运行数据集中收集于云端,在云端进行数据模型的训练、更新以及故障预测。但是,车辆数据需要离开车辆上传至服务器,数据存在安全风险,而且在传输过程数据容易丢失,数据的完整性存在风险。
发明内容
本申请实施例提供了一种模型训练方法以及装置,用于保障数据安全性以及提高更新故障模型的效率。
本申请第一方面提供了一种模型训练方法,该方法包括:获取第一车辆对应的第一数据;将第一数据输入第一故障模型,预测第一车辆的第一状态;在第一状态为故障时,获取第一车辆的标签,标签用于指示第一车辆的第二状态;根据第二状态、第一车辆的第二数据和第一故障模型进行训练,获得训练参数;将训练参数发送至服务器。
上述方面中,执行主体为车云协同系统中的第一车辆,其中,车云协同系统包括服务器和与服务器交互的多个车辆,该多个车辆包括第一车辆。第一车辆基于第一故障模型对第一数据进行预测,当预测第一车辆的第一状态为故障时,获取该第一车辆的标签,当获得标签时结合该第一车辆的第二数据和该第一故障模型进行训练,然后将训练获得的训练参数发送给服务器更新第一故障模型,第一车辆的数据不需要发送给服务器,且第一车辆获得标签时可以及时更新预测模型,保障数据安全性以及提高更新故障模型的效率。
在一种可能的实施方式中,第二数据包括第一车辆发生故障前的数据和第一数据。
上述可能的实施方式中,第二数据同时包括第一数据和第一车辆没有预测出故障时的运行数据,第一车辆可以基于运行数据从第一状态在正常到故障的变化进行训练,提高训练效果。
在一种可能的实施方式中,在根据第二状态、第一车辆的第二数据和第一故障模型进行训练之前,该方法还包括:获取来自服务器的第三故障模型;根据第三故障模型用于更新第一故障模型。
上述可能的实施方式中,服务器保存的第一故障模型还可以基于用户需求调整,例如修改模型的算法,此时第一车辆用来训练的第一故障模型还需要跟服务器对齐后的模型,第一车辆在获得标签后,可以向服务器获取第三故障模型,再将该第三故障模型对本地存 储的第一故障模型进行更新。服务器进行交互的所有车辆(包括第一车辆)在训练模型时还需要向服务器获取整个第三故障模型,以提高模型训练的准确度。
在一种可能的实施方式中,在将训练参数发送至服务器之后,该方法还包括:获取第二故障模型参数,第二故障模型参数用于更新第一故障模型。
上述可能的实施方式中,服务器在聚合训练参数生成第二故障模型参数后,即可将该第二故障模型参数发送给第一车辆,以使得第一车辆可以根据第二故障模型参数更新本地存储的第一故障模型的参数,然后第一车辆可以基于更新后的第一故障模型为第一车辆的状态进行预测,提高故障预测效果。
在一种可能的实施方式中,在根据第二状态、第一车辆的第二数据和第一故障模型进行训练之前,该方法还包括:获取终止条件,终止条件用于控制第二状态、第二数据和第一故障模型的训练次数。
上述可能的实施方式中,第一车辆在对第二状态、第一车辆的第二数据和第一故障模型进行训练,还需要获取训练的终止条件,以控制第一故障模型的训练次数,其中,该终止条件可以是预先保存在第一车辆本地的,还可以是由服务器适应性调整并发送给第一车辆的,提高模型训练效果。
本申请第二方面提供了一种模型训练方法,该方法包括:获取第一车辆的训练参数,确定第一车辆的第二状态的有效性;当第一车辆的第二状态有效时,将训练参数聚合,确定第二故障模型参数;向第一车辆发送第二故障模型参数,第二故障模型参数用于更新第一故障模型。
上述方面中,服务器在接收到第一车辆的训练参数后,可以获取该第一车辆的标签,其中,由于第一车辆的标签具有时效性,服务器获取的标签不一定是工作人员基于第一状态检查得出的,因此,服务器还需要检测该标签的时效性,以判断该第二状态的有效性。只对第二状态有效的第一车辆的训练参数进行聚合,提高聚合效果。
在一种可能的实施方式中,该方法还包括:向第一车辆发送第三故障模型,第三故障模型用于更新第一故障模型。
上述可能的实施方式中,服务器保存的第一故障模型还可以基于用户需求调整,例如修改模型的算法,此时第一车辆用来训练的第一故障模型还需要跟服务器进行对齐,提高模型训练效果。
在一种可能的实施方式中,该方法还包括:确定终止条件,终止条件用于控制第二状态、第二数据和第一故障模型的训练次数。
上述可能的实施方式中,服务器可以适应性调整第一车辆在模型训练时的终止条件,提高模型训练效果。
本申请实施例第三方面提供了一种模型训练装置,可以实现上述第一方面或第一方面中任一种可能的实施方式中的方法。该装置包括用于执行上述方法的相应的单元或模块。该装置包括的单元或模块可以通过软件和/或硬件方式实现。该装置例如可以为网络设备,也可以为支持网络设备实现上述方法的芯片、芯片系统、或处理器等,还可以为能实现全部或部分网络设备功能的逻辑模块或软件。
本申请实施例第四方面提供了一种模型训练装置,可以实现上述第二方面或第二方面中任一种可能的实施方式中的方法。该装置包括用于执行上述方法的相应的单元或模块。该装置包括的单元或模块可以通过软件和/或硬件方式实现。该装置例如可以为网络设备,也可以为支持网络设备实现上述方法的芯片、芯片系统、或处理器等,还可以为能实现全部或部分网络设备功能的逻辑模块或软件。
本申请实施例第五方面提供了一种计算机设备,包括:处理器、存储器、以及收发器,该处理器用于执行该存储器中存储的指令,使得计算机设备执行上述第一方面或第一方面任一种可选方式所提供的方法,该通信接口用于接收或发送数据。该计算机设备例如可以为智能车辆,也可以为支持智能车辆实现上述方法的芯片或芯片系统等。
本申请实施例第六方面提供了一种计算机设备,包括:处理器、存储器、以及收发器,该处理器用于执行该存储器中存储的指令,使得计算机设备执行上述第二方面或第二方面任一种可选方式所提供的方法,该通信接口用于接收或发送数据。该计算机设备例如可以为网络设备,也可以为支持网络设备实现上述方法的芯片或芯片系统等。
本申请实施例第七方面提供了一种计算机可读存储介质,该计算机可读存储介质中保存有指令,当该指令被执行时,使得计算机执行前述第一方面或第一方面任一种可能的实施方式提供的方法。
本申请实施例第八方面提供了一种计算机可读存储介质,该计算机可读存储介质中保存有指令,当该指令被执行时,使得计算机执行前述第二方面或第二方面任一种可能的实施方式提供的方法。
本申请实施例第九方面提供了一种计算机程序产品,计算机程序产品中包括计算机程序代码,当该计算机程序代码被执行时,使得计算机执行前述第一方面或第一方面任一种可能的实施方式提供的方法。
本申请实施例第十方面提供了一种计算机程序产品,计算机程序产品中包括计算机程序代码,当该计算机程序代码被执行时,使得计算机执行前述第二方面或第二方面任一种可能的实施方式提供的方法。
附图说明
图1为本申请实施例提供的一种车云协同系统的结构示意图;
图2为本申请实施例提供的一种模型训练方法的流程示意图;
图3为本申请实施例提供的一种打标签示意图;
图4为本申请实施例提供的一种车辆和服务器的交互示意图;
图5为本申请实施例提供的一种模型训练装置的结构示意图;
图6为本申请实施例提供的另一种模型训练装置的结构示意图;
图7为本申请实施例提供的一种计算机设备的结构示意图;
图8为本申请实施例提供的另一种计算机设备的结构示意图。
具体实施方式
本申请实施例提供了一种模型训练方法以及装置,用于保障数据安全性以及提高更新故障模型的效率。
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本申请实施例,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。
下面对本申请实施例中的一些概念进行解释。
联邦学习(federated learning,FL),一种分布式机器学习算法,通过多个客户端,如移动设备或边缘服务器,和服务器在数据不出域的前提下,协作式完成模型训练和算法更新,以得到训练后的全局模型。可以理解为,在进行机器学习的过程中,各参与方可借助其他方数据进行联合建模。各方无需共享数据资源,即数据不出本地的情况下,进行数据联合训练,建立共享的机器学习模型。
首先,对车云协同系统进行描述,请参阅图1,该系统包括服务器和N个车辆,例如车辆1、车辆2、…、车辆N-1和车辆N,其中,该服务器可以是服务器集群,此处不作限定。N个车辆可以采集自身的行车数据,然后与服务器进行数据交互。具体地,服务器与N个车辆之间,可以通过任何通信机制/通信标准的通信网络进行交互,通信网络可以是广域网、局域网、点对点连接等方式,或它们的任意组合。具体地,该通信网络可以包括无线网络、有线网络或者无线网络与有线网络的组合等。该无线网络包括但不限于:第五代移动通信技术(5th-Generation,5G)系统,长期演进(long term evolution,LTE)系统、全球移动通信系统(global system for mobile communication,GSM)或码分多址(code division multiple access,CDMA)网络、宽带码分多址(wideband code division multiple access,WCDMA)网络、无线保真(wireless fidelity,WiFi)、蓝牙(blue tooth)、紫蜂协议(Zigbee)、射频识别技术(radio frequency identification,RFID)、远程(Long Range,Lora)无线通信、近距离无线通信(near field communication,NFC)中的任意一种或多种的组合。该有线网络可以包括光纤通信网络或同轴电缆组成的网络等。
本申请实施例提供了一种模型训练方法,该方法具体如下所述。
在本申请实施例中,第一车辆为N个车辆中的任意一个。
在进行联邦学习时,服务器可以向与其建立连接的车辆下发待训练的模型,车辆可以使用本地存储的行车数据对该模型进行训练,并将训练后的模型的训练参数反馈至服务器,服务器在接收到一个或者多个车辆反馈的训练参数之后,即可对接收到的一个或者多个训练参数进行聚合,以得到聚合后的参数,相当于获得聚合后的故障模型。在满足停止条件之后,即可输出最终的故障模型,完成联邦学习。
第一车辆基于第一故障模型对第一数据进行预测,当预测第一车辆的第一状态为故障时,获取该第一车辆的标签,当获得标签时结合该第一车辆的第二数据和该第一故障模型进行训练,然后将训练获得的训练参数发送给服务器,以使得服务器基于训练参数更新第一故障模型。
上述故障可以是车辆电池热失控故障或车辆电池组故障等,还可以不限制于车辆的整体、系统以及部件故障,也可应用于机械加工设备、农用机械以及船舶等各种工业设备的故障预测,此处不作限定。
请参阅图2,如图2所示为本申请实施例提供的一种模型训练方法的流程图,该方法包括:
步骤201.第一车辆获取第一车辆对应的第一数据。
本实施例中,第一数据为第一车辆的实时运行数据,第一车辆实时监控自身运行时的数据,并将存储监控的数据作为第一数据。其中,第一车辆可以通过传感器采集该实时运行数据,然后将该实时运行数据存储在本地,第一车辆可以提取当前的数据作为第一数据。该第一数据可以包括以下至少一项:第一车辆的定位数据、行驶速度数据、行驶里程数据、电池电量数据、电池电压数据、刹车数据、油门数据、电机的电压和电流数据、绝缘电阻数据和温度数据等,此处不作限定。
步骤202.第一车辆将第一数据输入第一故障模型,预测第一车辆的第一状态。
本实施例中,第一车辆在采集到第一数据后,可以将该第一数据输入到本地存储的第一故障模型中,第一故障模型可以对第一数据进行处理,并输出处理结果,该处理结果即为对第一车辆的状态进行预测的结果,预测的状态作为第一状态,该第一状态包括故障或正常,该第一状态为第一车辆在预设时间范围内的状态。其中,第一故障模型可以是根据样本数据和该样本数据对应的状态训练获得的,第一故障模型在获取到第一数据后,可以根据第一数据和样本数据的相似度匹配相应的状态作为第一状态。
其中,该本地存储的第一故障模型可以是由服务器发送给第一车辆的,该第一故障模型可以是服务器本地存储的模型,如服务器本地存储的全局模型,或者服务器可以是在接收到其他服务器发送的模型之后,将接收到的模型保存在本地或者更新本地存储的模型。
步骤203.在第一状态为故障时,第一车辆获取第一车辆的标签。
本实施例中,当第一故障模型预测第一车辆的第一状态为故障时,则可以获取第一车辆的标签,该标签为工作人员对该第一车辆的当前状态检查后设置的标识,用于指示该第一车辆的第二状态,该第二状态即为第一车辆的当前状态。当第一故障模型预测到第一车 辆将故障时,可以通知工作人员进行闭环处理时(故障诊断、维护),工作人员在闭环处理时可以根据第一车辆当前的实际情况给该第一车辆打上标签。第一车辆获取标签的方式可以是工作人员可以直接在第一车辆上打标签后,第一车辆在本地获取。第一车辆获取标签的方式还可以是工作人员在一个子系统为该第一车辆打标签,第一车辆等待该子系统发送标签,或者第一车辆直接向第一车辆发送获取请求以接收来自子系统的标签,此处不作限定。以工作人员在子系统打标签为例,请参阅图3所示的打标签示意图,对于每个车辆上的第一故障模型,都会根据实时运行数据预测第一状态,当车辆的第一状态为故障时,工作人员可以为该车辆打标签,如图3中所示,工作人员在子系统中为车辆1和车辆2打标签,并将标签发送给对应的车辆。
步骤204.第一车辆根据第二状态、第一车辆的第二数据和第一故障模型进行训练,获得训练参数。
本实施例中,当第一车辆获取到标签后,可以启动联邦学习训练方法,即读取第一车辆本地存储的第二数据,该第二数据为第一车辆本地存储的历史运行数据,第一车辆可以对该标签指示的第二状态、第二数据和本地存储的第一故障模型进行训练,在训练结束后,即可获得训练好的模型,然后可以从该训练好的模型提取参数作为训练参数。其中,第二数据同时包括第一数据和第一车辆没有预测出故障时的运行数据,第一车辆可以基于运行数据从第一状态在正常到故障的变化进行训练,提高训练效果。本实施例中,第一车辆将第二状态和第二数据输入到第一故障模型中,然后利用算法优化该第一故障模型的参数。在具体实施中,为了提高预测的准确率,可以使用诸如网格搜索、随机搜索、遗传算法、粒子群优化等方法来进行模型调参,得到具有良好预测效果的参数,同时参数持久化保持。
本实施例中,第一车辆用来训练的第一故障模型还可以是跟服务器对齐后的模型,第一车辆在获得标签后,可以向服务器获取第三故障模型,再将该第三故障模型对本地存储的第一故障模型进行更新。示例性的,服务器存储的第一故障模型可以是基于随机森林算法训练的,当服务器对该第一故障模型更改算法类型是,例如改成生成式对抗网络的第三故障模型,服务器交互的所有车辆(包括第一车辆)在训练模型时还需要向服务器获取整个第三故障模型,以提高模型训练的准确度。
第一车辆在对第二状态、第一车辆的第二数据和第一故障模型进行训练,还需要获取训练的终止条件,以控制第一故障模型的训练次数,其中,该终止条件可以是预先保存在第一车辆本地的,还可以是由服务器适应性调整并发送给第一车辆的,此处不作限定。
步骤205.第一车辆将训练参数发送至服务器。
本实施例中,第一车辆在对第一故障模型训练结束后,可以将获得训练参数进行加密,再将加密后的训练参数发送给服务器,相应的服务器可以接收该加密后的训练参数。请参阅图4所示的车辆和服务器的交互示意图,每个打上标签的车辆(无论标签指示的第二状态为正常或故障)都会基于打上的标签进行模型训练,没有打标签的车辆不进行模型训练,每个打上标签的车辆都会将训练参数发送给服务器。
步骤206.服务器确定第一车辆的第二状态的有效性。
本实施例中,服务器在接收到第一车辆的训练参数后,可以对该训练参数进行解密, 然后基于该训练参数所属的第一车辆,可以获取该第一车辆的标签。其中,由于第一车辆的标签具有时效性,服务器获取的标签不一定是工作人员基于第一状态检查得出的,因此,服务器还需要检测该标签的时效性,以判断该第二状态的有效性。其中,该标签可以是第一车辆在发送训练参数时同时携带,其中,该标签可以通过“1”和“0”表示,用“1”表示正常,用“0”表示故障,同时,该标签也携带有时间戳,服务器可以根据该时间戳确定是否在预设的时间范围内,或者将该时间戳与第一车辆上一次发送的训练参数携带的时间戳比较,不同时表示第二状态有效,此处不作限定。本实施例中,工作人员在将第一车辆和标签的对应关系输入到一个子系统中时,第一车辆和服务器都可以在该子系统获得该标签,此处不作限定。
步骤207.当第一车辆的第二状态有效时,服务器将训练参数聚合,确定第二故障模型参数。
服务器在接收到的至少一个第一车辆发送的训练参数,即可对第二状态有效的第一车辆对应的至少一个训练参数进行聚合,其中,聚合即为聚集多个数据融合成第一数据的过程,本申请实施例中服务器将多个训练参数融合成一个参数,以生成第二故障模型参数,然后基于聚合结果来更新本地存储的第一故障模型。
具体地,对至少一个训练参数进行聚合的方式可以包括求均值、加权求和或者与本地的第一故障模型参数进行加权融合等方式,具体可以根据实际应用场景,本申请对聚合方式并不作限定。示例性的,服务器将多个训练参数求和,并求平均,最终获得的平均参数即为本申请实施例的第二故障模型参数。
在本申请实施方式中,服务器还可以在本地对接收到的训练参数进行再次训练,从而对第一故障模型参数保留服务器数据分布特性的个性化处理,使最终得到的模型在适应各个车辆的数据分布结构同时,也可以适应服务器的数据分布,提高最终得到的第二故障模型参数在联邦学习系统中的泛化能力。通过第一车辆和服务器分层训练的方式,能够充分利用各个车辆数据的差异性和服务器之间的数据分布差异,实现一定程度的去个性化处理,并一定程度地适应各个车辆的个性化特征,有利于提高训练后的第二故障模型参数的准确度。
步骤208.服务器向第一车辆发送第二故障模型参数。
本实施例中,服务器在基于联邦学习方法聚合训练参数生成第二故障模型参数后,即可将该第二故障模型参数发送给该服务器交互的所有车辆,第一车辆在接收到该第二故障模型参数后可以将第二故障模型参数对本地存储的第一故障模型的参数进行更新,然后第一车辆可以基于更新后的第一故障模型继续为第一车辆的状态进行预测。其中,服务器发送的第二故障模型参数为已加密的数据,第一车辆在接收到该已加密的数据后,还需要进行解密,才可以获得该第二故障模型参数。
本申请实施例中,第一车辆基于第一故障模型对第一数据进行预测,当预测第一车辆的第一状态为故障时,获取该第一车辆的标签,当获得标签时结合该第一车辆的第二数据和该第一故障模型进行训练,然后将训练获得的训练参数发送给服务器更新第一故障模型, 第一车辆的数据不需要发送给服务器,且第一车辆获得标签时可以及时更新预测模型,保障数据安全性以及提高更新故障模型的效率。
进一步的,服务器在收到第一车辆的训练参数后,对第一车辆的标签的有效性进行确定,只对标签有效的训练参数进行聚合,可以训练参数的聚合效果。
上面讲述了模型训练方法,下面对执行该方法的装置进行描述。
请参阅图5,如图5所示为本申请实施例提供的一种模型训练装置的结构示意图,该装置50包括:获取单元501,用于获取装置50对应的第一数据;预测单元502,用于将第一数据输入第一故障模型,预测装置50的第一状态;获取单元501还用于,在第一状态为故障时,获取装置50的标签,标签用于指示装置50的第二状态;训练单元503,用于根据第二状态、装置50的第二数据和第一故障模型进行训练,获得训练参数;发送单元504,用于将训练参数发送至服务器。
可选的,第二数据包括装置50发生故障前的数据和第一数据。
可选的,获取单元501还用于:获取来自服务器的第三故障模型,第三故障模型用于更新第一故障模型。
可选的,获取单元501还用于:获取第二故障模型参数,第二故障模型参数用于更新第一故障模型。
可选的,获取单元501还用于:获取终止条件,终止条件用于控制第二状态、第二数据和第一故障模型的训练次数。
获取单元501用于执行图2方法实施例中的步骤201和步骤203,预测单元502用于执行图2方法实施例中的步骤202,训练单元503用于执行图2方法实施例中的步骤205,发送单元504用于执行图2方法实施例中的步骤204,此处不再赘述。
请参阅图6,如图6所示为本申请实施例提供的另一种模型训练装置的结构示意图,该装置60包括:获取单元601,用于获取第一车辆的训练参数,确定第一车辆的第二状态的有效性;聚合单元602,用于当第一车辆的第二状态有效时,将训练参数聚合,确定第二故障模型参数;发送单元603,用于向第一车辆发送第二故障模型参数,第二故障模型参数用于更新第一故障模型。
可选的,发送单元603还用于:向第一车辆发送第三故障模型,第三故障模型用于更新第一故障模型。
可选的,装置60还包括确定单元604,确定单元604具体用于:确定终止条件,终止条件用于控制第二状态、第二数据和第一故障模型的训练次数。
获取单元601用于执行图2方法实施例中的步骤206,聚合单元602用于执行图2方法实施例中的步骤207,发送单元603用于执行图2方法实施例中的步骤208,此处不再赘述。
应理解以上装置中单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理 元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以成为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。
在一个例子中,以上任一装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA),或这些集成电路形式中至少两种的组合。再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
图7所示,为本申请的实施例提供的计算机设备70的一种可能的逻辑结构示意图。计算机设备70包括:处理器701、通信接口702、存储系统703以及总线704。处理器701、通信接口702以及存储系统703通过总线704相互连接。在本申请的实施例中,处理器701用于对计算机设备70的动作进行控制管理,例如,处理器701用于执行图2的方法实施例中第一车辆所执行的步骤。通信接口702用于支持计算机设备70进行通信。存储系统703,用于存储计算机设备70的程序代码和数据。
其中,处理器701可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器701也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。总线704可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
装置50中的发送单元504相当于计算机设备70中的通信接口702,装置50中的获取单元501、预测单元502和训练单元503相当于计算机设备70中的处理器701。
本实施例的计算机设备70可对应于上述图2方法实施例中的第一车辆,该计算机设备70中的通信接口702可以实现上述图2方法实施例中的第一车辆所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
图8所示,为本申请的实施例提供的计算机设备80的一种可能的逻辑结构示意图。计 算机设备80包括:处理器801、通信接口802、存储系统803以及总线804。处理器801、通信接口802以及存储系统803通过总线804相互连接。在本申请的实施例中,处理器801用于对计算机设备80的动作进行控制管理,例如,处理器801用于执行图2的方法实施例中服务器所执行的步骤。通信接口802用于支持计算机设备80进行通信。存储系统803,用于存储计算机设备80的程序代码和数据。
其中,处理器801可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器801也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。总线804可以是PCI总线或EISA总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
装置60中的发送单元603相当于计算机设备80中的通信接口802,装置60中的获取单元601、聚合单元602和确定单元604相当于计算机设备80中的处理器801。
本实施例的计算机设备80可对应于上述图2方法实施例中的服务器,该计算机设备80中的通信接口802可以实现上述图2方法实施例中的服务器所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
在本申请的另一实施例中,还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当设备的处理器执行该计算机执行指令时,设备执行上述图2方法实施例中的第一车辆所执行的模型训练方法的步骤。
在本申请的另一实施例中,还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当设备的处理器执行该计算机执行指令时,设备执行上述图2方法实施例中的服务器所执行的模型训练方法的步骤。
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;当设备的处理器执行该计算机执行指令时,设备执行上述图2方法实施例中的第一车辆所执行的模型训练方法的步骤。
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;当设备的处理器执行该计算机执行指令时,设备执行上述图2方法实施例中的服务器所执行的模型训练方法的步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件 可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对当前做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。

Claims (20)

  1. 一种模型训练方法,其特征在于,所述方法包括:
    获取第一车辆对应的第一数据;
    将所述第一数据输入第一故障模型,预测所述第一车辆的第一状态;
    在所述第一状态为故障时,获取所述第一车辆的标签,所述标签用于指示所述第一车辆的第二状态;
    根据所述第二状态、所述第一车辆的第二数据和所述第一故障模型进行训练,获得训练参数;
    将所述训练参数发送至服务器。
  2. 根据权利要求1所述的方法,其特征在于,所述第二数据包括所述第一车辆发生故障前的数据和所述第一数据。
  3. 根据权利要求1或2所述的方法,其特征在于,在根据所述第二状态、所述第一车辆的第二数据和所述第一故障模型进行训练之前,所述方法还包括:
    获取来自所述服务器的第三故障模型,所述第三故障模型用于更新所述第一故障模型。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,在将所述训练参数发送至服务器之后,所述方法还包括:
    获取第二故障模型参数,所述第二故障模型参数用于更新所述第一故障模型。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,在根据所述第二状态、所述第一车辆的第二数据和所述第一故障模型进行训练之前,所述方法还包括:
    获取终止条件,所述终止条件用于控制所述第二状态、所述第二数据和所述第一故障模型的训练次数。
  6. 一种模型训练方法,其特征在于,所述方法包括:
    获取第一车辆的训练参数,确定所述第一车辆的第二状态的有效性;
    当所述第一车辆的第二状态有效时,将所述训练参数聚合,确定第二故障模型参数;
    向所述第一车辆发送第二故障模型参数,所述第二故障模型参数用于更新第一故障模型。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    向所述第一车辆发送第三故障模型,所述第三故障模型用于更新第一故障模型。
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    确定终止条件,所述终止条件用于控制所述第二状态、所述第二数据和所述第一故障模型的训练次数。
  9. 一种模型训练装置,其特征在于,所述装置包括:
    获取单元,用于获取所述装置对应的第一数据;
    预测单元,用于将所述第一数据输入第一故障模型,预测所述装置的第一状态;
    所述获取单元还用于,在所述第一状态为故障时,获取所述装置的标签,所述标签用于指示所述装置的第二状态;
    训练单元,用于根据所述第二状态、所述装置的第二数据和所述第一故障模型进行训 练,获得训练参数;
    发送单元,用于将所述训练参数发送至服务器。
  10. 根据权利要求9所述的装置,其特征在于,所述第二数据包括所述装置发生故障前的数据和所述第一数据。
  11. 根据权利要求9或10所述的装置,其特征在于,所述获取单元还用于:
    获取来自所述服务器的第三故障模型,所述第三故障模型用于更新所述第一故障模型。
  12. 根据权利要求9-11任一项所述的装置,其特征在于,所述获取单元还用于:
    获取第二故障模型参数,所述第二故障模型参数用于更新所述第一故障模型。
  13. 根据权利要求9-12任一项所述的装置,其特征在于,所述获取单元还用于:
    获取终止条件,所述终止条件用于控制所述第二状态、所述第二数据和所述第一故障模型的训练次数。
  14. 一种模型训练装置,其特征在于,所述装置包括:
    获取单元,用于获取第一车辆的训练参数,确定所述第一车辆的第二状态的有效性;
    聚合单元,用于当所述第一车辆的第二状态有效时,将所述训练参数聚合,确定第二故障模型参数;
    发送单元,用于向所述第一车辆发送第二故障模型参数,所述第二故障模型参数用于更新第一故障模型。
  15. 根据权利要求14所述的装置,其特征在于,所述发送单元还用于:
    向所述第一车辆发送第三故障模型,所述第三故障模型用于更新第一故障模型。
  16. 根据权利要求14或15所述的装置,其特征在于,所述装置还包括确定单元,所述确定单元具体用于:
    确定终止条件,所述终止条件用于控制所述第二状态、所述第二数据和所述第一故障模型的训练次数。
  17. 一种计算机设备,其特征在于,包括:处理器,所述处理器与存储器耦合,
    所述处理器用于执行所述存储器中存储的指令,使得所述计算机设备执行如权利要求1至5中任一项所述的方法。
  18. 一种计算机设备,其特征在于,包括:处理器,所述处理器与存储器耦合,
    所述处理器用于执行所述存储器中存储的指令,使得所述计算机设备执行如权利要求6至8中任一项所述的方法。
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令被执行时,使得计算机执行如权利要求1至8中任一项所述的方法。
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,其特征在于,当所述计算机程序代码在计算机上运行时,使得计算机实现如权利要求1至8中任一项所述的方法。
PCT/CN2021/133389 2021-11-26 2021-11-26 一种模型训练方法以及装置 WO2023092439A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/133389 WO2023092439A1 (zh) 2021-11-26 2021-11-26 一种模型训练方法以及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/133389 WO2023092439A1 (zh) 2021-11-26 2021-11-26 一种模型训练方法以及装置

Publications (1)

Publication Number Publication Date
WO2023092439A1 true WO2023092439A1 (zh) 2023-06-01

Family

ID=86538559

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/133389 WO2023092439A1 (zh) 2021-11-26 2021-11-26 一种模型训练方法以及装置

Country Status (1)

Country Link
WO (1) WO2023092439A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117521151A (zh) * 2024-01-05 2024-02-06 齐鲁工业大学(山东省科学院) 一种基于区块链的去中心化联邦学习数据共享方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050515A1 (en) * 2018-06-27 2019-02-14 Intel Corporation Analog functional safety with anomaly detection
CN111565174A (zh) * 2020-04-20 2020-08-21 中移雄安信息通信科技有限公司 车辆质量信息确定模型训练方法及车辆质量信息确定方法
CN112015749A (zh) * 2020-10-27 2020-12-01 支付宝(杭州)信息技术有限公司 基于隐私保护更新业务模型的方法、装置及系统
US20210056780A1 (en) * 2019-08-22 2021-02-25 GM Global Technology Operations LLC Adaptive fault diagnostic system for motor vehicles
CN112906139A (zh) * 2021-04-08 2021-06-04 平安科技(深圳)有限公司 车辆故障风险评估方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050515A1 (en) * 2018-06-27 2019-02-14 Intel Corporation Analog functional safety with anomaly detection
US20210056780A1 (en) * 2019-08-22 2021-02-25 GM Global Technology Operations LLC Adaptive fault diagnostic system for motor vehicles
CN111565174A (zh) * 2020-04-20 2020-08-21 中移雄安信息通信科技有限公司 车辆质量信息确定模型训练方法及车辆质量信息确定方法
CN112015749A (zh) * 2020-10-27 2020-12-01 支付宝(杭州)信息技术有限公司 基于隐私保护更新业务模型的方法、装置及系统
CN112906139A (zh) * 2021-04-08 2021-06-04 平安科技(深圳)有限公司 车辆故障风险评估方法、装置、电子设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117521151A (zh) * 2024-01-05 2024-02-06 齐鲁工业大学(山东省科学院) 一种基于区块链的去中心化联邦学习数据共享方法
CN117521151B (zh) * 2024-01-05 2024-04-09 齐鲁工业大学(山东省科学院) 一种基于区块链的去中心化联邦学习数据共享方法

Similar Documents

Publication Publication Date Title
CN108279383B (zh) 电池寿命预测方法、电池数据服务器及电池数据处理系统
McKee et al. Survey of advances and challenges in intelligent autonomy for distributed cyber‐physical systems
US20200014633A1 (en) System and method to control a cross domain workflow based on a hierarchical engine framework
Hu et al. Review of cyber-physical system architecture
CN107800554B (zh) 数据采集方法、装置和系统
Verdouw et al. Smart agri-food logistics: requirements for the future internet
JP6623312B2 (ja) サービス層におけるデータ分析サービスを有効にする方法
CN105052076B (zh) 一种基于云计算的网元管理系统及网元管理方法
WO2023092439A1 (zh) 一种模型训练方法以及装置
CN104219687B (zh) 检测目标网络覆盖的方法及装置
EP4162650A1 (en) Methods and apparatus relating to machine-learning in a communications network
US20230135938A1 (en) Service mesh switching
Xu et al. Health monitoring and management for manufacturing workers in adverse working conditions
CN105577439A (zh) 一种基于传感设备为基础的仿真模拟方法
WO2021139476A1 (zh) 交集数据的生成方法和基于交集数据的联邦模型训练方法
Li et al. IoB: Internet-of-Batteries for Electric Vehicles–Architectures, Opportunities, and Challenges
Liu et al. An implementation of industrial IoT: a case study in lithium-ion battery pack and assembly
JP2022141067A (ja) 蓄電池の情報システム及び情報提供方法
CN118159988A (zh) 一种模型训练方法以及装置
WO2022110604A1 (zh) 一种电池监控平台的控制方法及控制系统
CN104113454A (zh) 一种加油站智能控制器及基于本控制器的通讯系统
WO2022119929A1 (en) Systems and methods for administrating a federated learning network
CN116074178A (zh) 网络的数字孪生架构、网络会话处理方法及装置
WO2020140890A1 (zh) 一种数据处理方法及装置
CN112668744A (zh) 一种数据处理方法和装置

Legal Events

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

Ref document number: 21965174

Country of ref document: EP

Kind code of ref document: A1