WO2021120677A1 - Warehousing model training method and device, computer device and storage medium - Google Patents
Warehousing model training method and device, computer device and storage medium Download PDFInfo
- Publication number
- WO2021120677A1 WO2021120677A1 PCT/CN2020/111429 CN2020111429W WO2021120677A1 WO 2021120677 A1 WO2021120677 A1 WO 2021120677A1 CN 2020111429 W CN2020111429 W CN 2020111429W WO 2021120677 A1 WO2021120677 A1 WO 2021120677A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- model
- storage
- storage model
- local
- shared
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/087—Inventory or stock management, e.g. order filling, procurement or balancing against orders
Definitions
- This application relates to the field of artificial intelligence technology, in particular to a storage model training method, device, computer equipment and storage medium.
- the above-mentioned data provider may be a company or an enterprise, or an individual user.
- the data provided by the data owner may be uniformly collected customer data, such as user data and business data.
- user data may include user identity data, for example;
- business data may include business data that occurs on business applications provided by the company, such as warehoused goods data, commodity transaction data on Taobao, and the like.
- data is a very important and private asset, and data privacy protection is required.
- the purpose of the embodiments of this application is to propose a storage model training method, device, computer equipment, and storage medium to solve the problem of excessive network resource occupation in the existing storage model training method and the inability to guarantee the storage of goods during network transmission. Data privacy and security issues.
- an embodiment of the present application provides a storage model training method, which adopts the following technical solutions:
- test sample data set Input the test sample data set to the initial storage model for model testing, and output the model test results, where the test sample data set is stored in the database of the cloud server;
- the shared storage model includes several shared storage sub-models, and each shared storage sub-model corresponds to a storage classification identification;
- the shared storage sub-model corresponding to the storage classification identifier is sent to the node of the storage server.
- the shared storage model includes at least an input layer, a convolutional layer, and an output layer.
- the local training data set is imported into the shared storage model, and the shared storage model is model-trained to obtain the local storage model, which specifically includes:
- the shared storage model is iteratively updated according to the adaptation result, and the local storage model is obtained.
- the local storage model which specifically includes:
- the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold, and the local storage model is obtained.
- receiving the trained local storage model, and performing a weighted aggregation operation on the received local storage model to obtain the initial storage model which specifically includes:
- the weighted aggregation operation is performed on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model, which is specifically:
- J( ⁇ ) is the loss function of the storage model
- ⁇ i is the weight of the i-th local storage model in the storage model
- h ⁇ (x i )-y i is the loss function of the i-th local storage model.
- the initial storage model is iteratively updated until the model detection result falls within the range of the preset standard detection result, and the storage model is output, which specifically includes:
- the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold, and the storage model is output.
- an embodiment of the present application also provides a storage model training device, which adopts the following technical solutions:
- the model building module is used to build the shared storage model and send the shared storage model to the node of the storage server;
- the data set generation module is used to retrieve historical data of warehoused goods from the database of the warehouse server and generate a local training data set;
- the local training module is used to import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model;
- the joint training module is used to receive the local storage model that has been trained, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;
- the model verification module is used to input the test sample data set into the initial storage model for model test, and output the model test result, where the test sample data set is stored in the database of the cloud server;
- the model output module is used to determine whether the model test result is within the range of the preset standard test result. When the model test result is not within the range of the preset standard test result, iteratively update the initial storage model until the model test result The storage model will be output until it falls within the scope of the preset standard test results.
- the embodiments of the present application also provide a computer device, which adopts the following technical solutions:
- a computer device includes a memory and a processor.
- the memory stores computer-readable instructions.
- the processor executes the computer-readable instructions, the following steps of the storage model training method are implemented:
- test sample data set Input the test sample data set to the initial storage model for model testing, and output the model test results, where the test sample data set is stored in the database of the cloud server;
- the embodiments of the present application also provide a computer-readable storage medium, which adopts the following technical solutions:
- a computer-readable storage medium on which computer-readable instructions are stored.
- the following steps of the storage model training method are implemented:
- test sample data set Input the test sample data set to the initial storage model for model testing, and output the model test results, where the test sample data set is stored in the database of the cloud server;
- the application discloses a storage model training method, device, computer equipment and storage medium, which relate to the field of artificial intelligence technology and are applied to the training of storage models.
- the storage model training method constructs a shared storage model and sends the shared storage model. Go to the warehouse server; train the shared warehouse model through the local training data set in the warehouse server database to obtain the local warehouse model; then aggregate the local warehouse models to obtain the initial warehouse model; use the test sample data in the cloud server database Iteratively update the initial storage model according to the model detection results, and finally output conforms to the standard storage model.
- This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model. The initial storage model is tested through the detection sample data set.
- the output conforms to the standard storage model.
- the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required
- the training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
- Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
- Figure 2 shows a flowchart of an embodiment of the storage model training method of the present application
- FIG. 3 shows a flowchart of an embodiment of local storage model training in the storage model training method of the present application
- FIG. 4 shows a flowchart of an embodiment of the iterative update of the warehouse model in the warehouse model training method of the present application
- FIG. 5 shows a schematic structural diagram of an embodiment of the storage model training device of the present application
- Fig. 6 is a schematic structural diagram of an embodiment of a computer device according to the present application.
- the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105.
- the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105.
- the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
- the user can use the terminal devices 101, 102, and 103 to interact with the server 105 through the network 104 to receive or send messages and so on.
- Various communication client applications such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social platform software, can be installed on the terminal devices 101, 102, and 103.
- the terminal devices 101, 102, 103 may be various electronic devices with display screens and support for web browsing, including but not limited to smart phones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic Video experts compress standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image experts compress standard audio layer 4) players, laptop portable computers and desktop computers, etc.
- MP3 players Moving Picture Experts Group Audio Layer III, dynamic Video experts compress standard audio layer 3
- MP4 Moving Picture Experts Group Audio Layer IV, dynamic image experts compress standard audio layer 4
- laptop portable computers and desktop computers etc.
- the server 105 may be a server that provides various services, for example, a background server that provides support for pages displayed on the terminal devices 101, 102, and 103.
- the method for receiving the trained local storage model provided by the embodiments of the present application is generally executed by the server, and accordingly, the device for receiving the trained local storage model is generally set in the server.
- terminal devices, networks, and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks, and servers according to implementation needs.
- the storage model training method includes the following steps:
- S201 Construct a shared storage model, and send the shared storage model to the node of the storage server;
- step S201 constructs a shared storage model and sends the shared storage model to the node of the storage server, which specifically includes:
- the shared storage model includes several shared storage sub-models, and each shared storage sub-model corresponds to a storage classification identification;
- the shared storage sub-model corresponding to the storage classification identifier is sent to the node of the storage server.
- warehousing can be divided into multiple categories according to the different storage objects, such as physical warehousing, virtual warehousing, etc., physical warehousing, virtual warehousing can continue to be divided into different levels according to the nature of the storage object, for example, physical warehousing can be divided For physical solid storage, physical liquid storage, physical gas storage, etc.
- all warehouses in the warehouse system are classified in advance, and a warehouse classification identifier is added to each warehouse.
- the cloud server when the cloud server constructs the shared storage model, it first obtains the classification identification of each storage, and constructs the shared storage model according to the storage classification identification.
- the cloud server When receiving the modeling request instruction from the storage server, the cloud server first extracts the storage from the modeling request instruction.
- the storage classification identification corresponding to the server identifies the storage classification identification of the storage server, and sends the shared storage sub-model corresponding to the storage classification identification to the node of the storage server.
- the shared storage model is constructed based on the long and short-term memory network LSTM, where the shared storage model includes at least three network layers, specifically the input layer, the convolutional layer, and the output layer, through the long-short-term memory network LSTM
- the forget gate is constructed in the input layer of the shared storage model, and the sigmoid function is used to determine which feature information needs to be ignored.
- the LSTM forget gate calculation formula is as follows:
- gate represents the threshold of the forget gate
- ⁇ represents the sigmoid function
- W and U represent the weight of the forget gate
- b represents the forgetting constant
- X t represents the input information of the current input layer
- h t-1 represents the output layer of the previous Output information.
- the embodiment of the application constructs the LSTM forget gate through the input layer of the shared storage model.
- the input layer can filter the training samples, and judge whether to receive the training samples according to the calculated gate value.
- the gate value is larger.
- the training samples of allow the input layer to ignore the training samples with smaller gate values, which can be compared by setting the standard gate value, so that the model training effect is better.
- the long and short-term memory network (LSTM, Long Short-Term Memory) is a kind of time cyclic neural network, which is specially designed to solve the long-term dependence problem of the general RNN (Recurrent Neural Network, RNN cyclic neural network).
- the internet LSTM contains LSTM blocks. LSTM blocks are also called intelligent network units. LSTM blocks can memorize values of variable length of time. There is a threshold gate in LSTM blocks that can determine whether the input data information is input or not. It is important to be remembered, and to determine whether the output of the data information output by the LSTM can be output.
- the training of LSTM adopts gradient descent method, which applies sequential reverse transfer algorithm, which can be used to modify the weight of LSTM.
- the shared storage model is first constructed on the cloud server.
- the shared storage model is sent to the storage server node.
- the storage server node receives the shared storage model, Retrieve historical data of warehousing goods from its own database, use the retrieved historical data of warehousing goods as a local training data set, and import the local training data set into the shared storage model for model training.
- each storage server when each storage server has a modeling requirement, it can send a modeling request instruction to the cloud server, obtain the shared storage sub-model corresponding to its own classification identification, and use the local training data set in its own server Train the shared storage sub-model, and determine the trained shared storage sub-model as its own local storage model.
- S203 Import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model;
- the local training data set is imported into the shared storage model, and the local training data set is used to perform model training on the shared storage model to obtain the local storage model.
- the warehousing server can use the local warehousing model to process warehousing cargo data.
- Figure 3 shows a flowchart of an embodiment of the local storage model training in the storage model training method of the present application.
- the shared storage model includes at least an input layer, a convolutional layer, and an output layer. Import the training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model, which specifically includes:
- S301 Import the local training data set into the shared storage model, and perform vector feature conversion processing on the local training data set through the input layer to obtain target data;
- the shared storage model includes at least three network layers, specifically the input layer, the convolutional layer and the output layer.
- the input layer of the shared storage model is provided with a vector conversion port.
- the initial vector set corresponding to the local training data set is obtained, and the initial vector set is obtained As the target data, it is input into the convolutional layer of the shared storage model.
- the convolution calculation process is to use an m*n matrix to convolve the input value.
- a x*n convolution kernel is constructed, and the convolution kernel performs sliding operations on the original matrix. For example, if the value of m is 5 and the value of x is 1, the convolution kernel slides from top to bottom. First, x is multiplied by the n-dimensional vector in the first row and summed to obtain a value, and then x continues to slide down and Line 2, Line 3... Perform convolution operation, and get a total of 5*1 matrix, which is the result of convolution.
- the convolutional layer of the shared storage model is equipped with a standard convolution kernel.
- the target data is directly imported into the standard convolution kernel to perform the convolution calculation of the target data, and the characteristics of the target data are extracted from the obtained convolution calculation result. data.
- the adaptive classifier is preset in the output layer.
- the output layer receives the feature data, it uses the preset adaptive classifier to calculate the similarity of the feature data, and extracts the maximum similarity from the calculation result. The result of the adaptation.
- the shared storage model needs to be iteratively updated by comparing the adaptation result with the greatest similarity with the preset standard adaptation result. Among them, by iteratively updating the shared storage model, the initial model parameters of the shared storage model are optimized, and a local storage model with more accurate output results is obtained.
- the initial model parameters of the shared storage model are only a series of initial parameters preset during model training for the shared storage model when the shared storage model is constructed.
- the proportions of the parameters of each storage model cannot be exactly the same.
- the shared storage model is trained to obtain the local storage model, and the shared storage model is performed according to the adaptation result. Iteratively update to optimize the initial model parameters of the shared storage model to obtain a local storage model with better output effects.
- step S304 is to iteratively update the shared storage model according to the adaptation result to obtain the local storage model, which specifically includes:
- the back-propagation algorithm that is, the Backpropagation Algorithm (BP Algorithm) is a learning algorithm suitable for multi-layer neural networks. It is based on the gradient descent method and is used for the error of the deep learning network. Calculation.
- the input and output relationship of the BP network is essentially a mapping relationship: the function of a BP neural network with n inputs and m outputs is a continuous mapping from n-dimensional Euclidean space to a finite field in m-dimensional Euclidean space. A mapping is highly non-linear.
- the learning process of BP algorithm is composed of forward propagation process and back propagation process.
- the input information passes through the input layer through the hidden layer, is processed layer by layer and transmitted to the output layer, and transferred to the back propagation, layer by layer, the partial derivative of the objective function with respect to the weight of each neuron is obtained, which constitutes The gradient of the objective function to the weight vector is used as the basis for modifying the weight.
- the backpropagation algorithm is used to adjust the initial parameters of each network layer of the shared storage model, and the error back propagation update of each network layer of the shared storage model is performed to obtain the updated
- the weights and offsets of each network layer are calculated using the updated weights and offsets of each network layer to calculate the adaptation error of the local training data set to obtain the adaptation error.
- the adaptation error is compared with a preset adaptation error threshold, where the preset adaptation error threshold can be set in advance according to an empirical value.
- the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold, and the local storage model is obtained.
- the adaptation error is less than or equal to the preset adaptation error threshold, it indicates that the trained shared storage model meets the model standard, and it is taken as the local storage model. If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold, and the local storage model is obtained. In the embodiment of the present application, after the local storage model is obtained, it is stored in the storage server, while the local storage model is copied, and the copied local storage model is sent to the cloud server.
- the iterative update of the shared storage model is to use the preset loss function of the local storage model to perform iterative update by adjusting the initial parameters of each network layer in the shared storage model. If the adaptation error is less than or equal to the preset Set the adaptation error threshold, stop iteration, and determine the shared storage model corresponding to the adaptation error as the local storage model.
- the adaptation error is compared with the preset adaptation error threshold by calculating the adaptation error. If the adaptation error is less than or equal to the preset adaptation error threshold, it indicates acceptance The trained shared storage model meets the model standard. If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold. By iteratively updating the shared storage model, the use error of the finally obtained local storage model is smaller, and the prediction accuracy of the local storage model is improved.
- S204 Receive a local storage model that has been trained, and perform a weighted aggregation operation on the received local storage model to obtain an initial storage model;
- the local storage model training is performed on the storage server.
- the storage server copies the trained local storage model and sends the copied local storage model to the cloud server, and the cloud server receives the completed training
- the local storage model of, and the weighted aggregation operation is performed on the received local storage model to obtain the initial storage model.
- the storage server extracts the loss function of the trained local storage model, and sends the loss function to the cloud server, and the cloud server receives the trained local storage model The loss function of, and the weighted aggregation operation is performed on the received loss function to obtain the loss function of the storage model.
- the electronic device (such as the server/terminal device shown in FIG. 1) on which the warehouse model training method runs can receive the trained local warehouse model through a wired connection or a wireless connection*.
- the above-mentioned wireless connection methods can include, but are not limited to, 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future .
- receiving the trained local storage model, and performing a weighted aggregation operation on the received local storage model to obtain the initial storage model which specifically includes:
- the cloud server can simultaneously send the shared storage model to multiple storage servers, and the multiple storage servers can perform model training on their respective local storage models at the same time.
- the trained local storage model is uploaded to the cloud server.
- the cloud server receives multiple trained local storage models and extracts the loss functions of the multiple trained local storage models.
- a weighted aggregation operation is performed on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model, which is specifically:
- J( ⁇ ) is the loss function of the storage model
- ⁇ i is the weight of the i-th local storage model in the storage model
- h ⁇ (x i )-y i is the loss function of the i-th local storage model.
- the proportion of each local storage in the entire storage system is not the same.
- the cloud server performs a weighted aggregation operation on the extracted loss functions of multiple local storage models, it needs to first Calculate the weight of each local storage in the entire storage system.
- the weight of each local storage in the entire storage system is the weight of each local storage model in the storage model.
- the cloud server uses the weighted aggregation calculation of the loss functions of multiple trained local storage models as the loss function of the storage model, and fills the loss function of the storage model into the shared storage model to obtain the initial Warehousing model.
- the weighted aggregation operation is performed on the loss functions of the multiple extracted local storage models, and the loss function of the storage model is calculated as the loss function of the shared storage model.
- the loss function of the storage model is filled into the shared storage model. Storage model, get the initial storage model.
- S205 Input the test sample data set to the initial storage model for model test, and output the model test result, where the test sample data set is stored in the database of the cloud server;
- the detection sample data set is obtained from the database of the cloud server, and the detection sample data set is input to the initial storage model for model detection, and the model detection result is obtained, where ,
- the test sample data set is a data set specially used for model testing.
- S206 Determine whether the model test result is within the range of the preset standard test result. If the model test result is not within the range of the preset standard test result, the initial storage model is iteratively updated until the model test result falls within the preset standard. The storage model will be output within the range of the standard test results.
- the model test result is obtained, and the model test result is compared with the preset standard test result to determine whether the model test result is within the range of the preset standard test result. If the test error is less than or It is equal to the preset detection error threshold, indicating that the trained storage model meets the model standard. If the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold.
- FIG. 4 shows a flowchart of an embodiment of the storage model iterative update in the storage model training method of the present application.
- the initial storage model is iteratively updated until the model detection result falls within the preset standard Within the scope of the test results, output the storage model, including:
- the backpropagation algorithm is used to adjust the initial parameters of each network layer of the initial storage model, and the error back propagation update of each network layer of the initial storage model is performed to obtain the updated network
- the weights and biases of the layers, using the updated weights and biases of each network layer, are used to calculate the detection error of the detection sample data set to obtain the detection error.
- the detection error is compared with a preset detection error threshold, where the preset detection error threshold can be set in advance according to an empirical value.
- the detection error is less than or equal to the preset detection error threshold, it indicates that the storage model receiving training meets the model standard. If the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold to obtain the storage model.
- the iterative update of the initial storage model specifically refers to the iterative update by adjusting the initial parameters of each network layer in the initial storage model under the condition of the determined loss function of the storage model. If the detection error is less than or equal to the preset If the detection error threshold is detected, the iteration is stopped, and the initial storage model corresponding to the detection error is determined as a storage model that meets the model standard.
- the detection error when training the storage model, the detection error is calculated by comparing the detection error with the preset detection error threshold. If the detection error is less than or equal to the preset detection error threshold, it indicates that the storage model receiving training meets Model standard, if the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold. By iteratively updating the initial storage model, the use error of the final storage model is smaller, and the prediction accuracy of the storage model is improved.
- This embodiment discloses a storage model training method, which involves the field of artificial intelligence technology and is applied to the training of storage models.
- the storage model can be used for storage goods supervision, storage goods evaluation, and so on.
- the storage model training method constructs a shared storage model and sends the shared storage model to the storage server; performs model training on the shared storage model through the local training data set in the database of the storage server to obtain the local storage model; and then aggregates the local storage model.
- the storage model is used to obtain the initial storage model; the detection sample data set in the database of the cloud server is used for model detection; and the initial storage model is iteratively updated according to the model detection results, and the final output conforms to the standard joint prediction model.
- This application builds a shared storage model on the cloud server, trains a local storage model on the storage server, and then aggregates the local prediction models to form an initial storage model.
- the initial storage model is tested through the detection sample data set. When the standard detection result is within the range, the output conforms to the standard storage model.
- the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required
- the training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
- the above-mentioned local training data set may also be stored in a node of a blockchain.
- the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
- Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
- the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
- This application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, small computers, large computers, including Distributed computing environment for any of the above systems or equipment, etc.
- This application may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
- program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
- This application can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network.
- program modules can be located in local and remote computer storage media including storage devices.
- the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through computer-readable instructions, which can be stored in a computer-readable storage medium.
- the computer-readable instructions When executed, they may include the processes of the above-mentioned method embodiments.
- the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
- this application provides an embodiment of a storage model training device.
- the device embodiment corresponds to the method embodiment shown in FIG. It can be applied to various electronic devices.
- Figure 5 shows a schematic structural diagram of an embodiment of the storage model training device of the present application.
- the storage model training device described in this embodiment includes: a model construction module 501 and a data set generation module 502 , A local training module 503, a joint training module 504, a model verification module 505, and a model output module 506. among them:
- the model construction module 501 is used to construct a shared storage model and send the shared storage model to the node of the storage server;
- the data set generating module 502 is used to retrieve the historical data of the warehoused goods from the database of the warehouse server and generate a local training data set;
- the local training module 503 is used to import the local training data set into the shared storage model, perform model training on the shared storage model, and obtain the local storage model;
- the joint training module 504 is configured to receive the local storage model that has been trained, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;
- the model verification module 505 is used to input the test sample data set to the initial storage model for model test, and output the model test result, where the test sample data set is stored in the database of the cloud server;
- the model output module 506 is used to determine whether the model check result is within the range of the preset standard check result. When the model check result is not within the preset standard check result range, iteratively update the initial storage model until the model check The result falls within the range of the preset standard test results, and the storage model is output.
- model construction module 501 specifically includes:
- the modeling unit is used to obtain the storage classification identification and construct a shared storage model based on the storage classification identification.
- the shared storage model includes several shared storage sub-models, and each shared storage sub-model corresponds to a storage classification identification;
- the receiving unit is configured to receive a modeling request instruction from the storage server, and the modeling request instruction carries a storage classification identifier corresponding to the storage server;
- the sending unit is used to send the shared storage sub-model corresponding to the storage classification identifier to the node of the storage server.
- the shared storage model includes at least an input layer, a convolutional layer, and an output layer
- the local training module 503 specifically includes:
- the conversion unit is used to import the local training data set into the shared storage model, and perform vector feature conversion processing on the local training data set through the input layer to obtain the target data;
- the feature data extraction unit is used to perform convolution calculation on the target data with the convolution layer, and extract the feature data of the target data;
- the adaptation unit is used to import the feature data into the output layer for adaptation calculation, and output the adaptation result;
- the local iterative unit is used to iteratively update the shared storage model according to the adaptation result to obtain the local storage model.
- the local iteration unit specifically includes:
- the adaptation fitting subunit is used to fit the adaptation result to the preset standard adaptation result through the backpropagation algorithm to obtain the adaptation error;
- the adaptation error comparison subunit is used to compare the adaptation error with a preset adaptation error threshold
- the local iterative subunit is used to iteratively update the shared storage model when the adaptation error is greater than the preset adaptation error threshold until the adaptation error is less than or equal to the preset adaptation error threshold to obtain the local storage model.
- joint training module 504 specifically includes:
- the loss function extraction unit is used to extract the loss functions of multiple trained local storage models
- the weighted aggregation operation unit is used to perform weighted aggregation operation on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model;
- the loss function fill-in unit is used to fill the loss function of the storage model into the shared storage model to obtain the initial storage model.
- weighted aggregation operation unit is specifically configured to perform weighted aggregation operation on the extracted loss functions of multiple local storage models through the following formula:
- J( ⁇ ) is the loss function of the storage model
- ⁇ i is the weight of the i-th local storage model in the storage model
- h ⁇ (x i )-y i is the loss function of the i-th local storage model.
- model output module 506 specifically includes:
- the detection error fitting unit is used to fit the model detection result with the preset standard detection result through the backpropagation algorithm to obtain the detection error;
- the detection error comparison unit is used to compare the detection error with a preset detection error threshold
- the model output unit is used to iteratively update the initial storage model when the detection error is greater than the preset detection error threshold, and output the storage model until the detection error is less than or equal to the preset detection error threshold.
- This embodiment discloses a storage model training device, which includes: a model construction module 501, used to construct a shared storage model, and send the shared storage model to a node of a storage server; a data set generation module 502, used to send data from the storage server Retrieve historical data of warehoused goods in the database and generate a local training data set; the local training module 503 is used to import the local training data set into the shared warehouse model, and perform model training on the shared warehouse model to obtain the local warehouse model; The training module 504 is used to receive the trained local storage model and perform weighted aggregation operations on the received local storage model to obtain the initial storage model; the model verification module 505 is used to input the test sample data set into the initial storage model Perform model testing and output the model testing results.
- a model construction module 501 used to construct a shared storage model, and send the shared storage model to a node of a storage server
- a data set generation module 502 used to send data from the storage server Retrieve historical data of warehoused goods in the database and generate a local
- the testing sample data set is stored in the database of the cloud server; the model output module 506 is used to determine whether the model testing results are within the range of the preset standard testing results.
- the model testing When the result is not within the range of the preset standard detection result, the initial storage model is iteratively updated until the model detection result falls within the range of the preset standard detection result, and the storage model is output.
- This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model. The initial storage model is tested through the detection sample data set. When the standard detection result is within the range, the output conforms to the standard storage model.
- the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required
- the training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
- FIG. 6 is a block diagram of the basic structure of the computer device in this embodiment.
- the computer device 6 includes a memory 61, a processor 62, and a network interface 63 that communicate with each other through a system bus. It should be pointed out that only the computer device 6 with components 61-63 is shown in the figure, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
- Its hardware includes, but is not limited to, a microprocessor, a dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
- ASIC Application Specific Integrated Circuit
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- DSP Digital Processor
- the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
- the memory 61 includes at least one type of readable storage medium, the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static memory Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
- the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6.
- the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart media card (SMC), a secure digital (Secure Digital, SD) card, Flash Card, etc.
- the memory 61 may also include both the internal storage unit of the computer device 6 and its external storage device.
- the memory 61 is generally used to store an operating system and various application software installed on the computer device 6, such as computer-readable instructions for a warehouse model training method.
- the memory 61 can also be used to temporarily store various types of data that have been output or will be output.
- the processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
- the processor 62 is generally used to control the overall operation of the computer device 6.
- the processor 62 is configured to run computer-readable instructions or processed data stored in the memory 61, for example, computer-readable instructions for running the storage model training method.
- the network interface 63 may include a wireless network interface or a wired network interface, and the network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
- the application discloses a storage model training method, device, computer equipment and storage medium, which relate to the field of artificial intelligence technology and are applied to the training of storage model.
- the storage model training method constructs a shared storage model and sends the shared storage model. Go to the warehouse server; train the shared warehouse model through the local training data set in the warehouse server database to obtain the local warehouse model; then aggregate the local warehouse models to obtain the initial warehouse model; use the test sample data in the cloud server database Iteratively update the initial warehousing model according to the model testing results, and finally output conforms to the standard warehousing model.
- This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model.
- the initial storage model is tested through the detection sample data set.
- the output conforms to the standard storage model.
- the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required
- the training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
- This application also provides another implementation manner, that is, a computer-readable storage medium is provided with computer-readable instructions stored thereon, and the computer-readable storage medium may be non-volatile or It is volatile, and the computer-readable instructions can be executed by at least one processor, so that the at least one processor executes the steps of the storage model training method described above.
- the application discloses a storage model training method, device, computer equipment and storage medium, which relate to the field of artificial intelligence technology and are applied to the training of storage model.
- the storage model training method constructs a shared storage model and sends the shared storage model. Go to the warehouse server; train the shared warehouse model through the local training data set in the warehouse server database to obtain the local warehouse model; then aggregate the local warehouse models to obtain the initial warehouse model; use the test sample data in the cloud server database Iteratively update the initial warehousing model according to the model testing results, and finally output conforms to the standard warehousing model.
- This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model.
- the initial storage model is tested through the detection sample data set.
- the output conforms to the standard storage model.
- the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required
- the training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
- the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.
- a terminal device which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Business, Economics & Management (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Finance (AREA)
- Human Resources & Organizations (AREA)
- Accounting & Taxation (AREA)
- Marketing (AREA)
- Development Economics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Operations Research (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Quality & Reliability (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Databases & Information Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
A warehousing model training method and device, computer device and storage medium relating to machine learning technology in the field of artificial intelligence. The method involves constructing a shared warehousing model and sending the shared warehousing model to a warehousing server; performing model training on the shared warehousing model by means of a local training data set in the storage server database to obtain a local warehousing model; aggregating the local warehousing model to obtain an initial warehousing model; utilizing a test sample data set in a cloud server database to test the model; and iteratively updating the initial warehousing model on the basis of the model testing results, and finally outputting the compliant warehousing model. The present method further relates to blockchain technology in that confidential information of the local training data set may be stored in a blockchain. The present method reduces network transmission pressures between the warehousing server and the cloud server, while also ensuring the confidentiality and security of the local warehouse goods data.
Description
本申请要求于2020年7月7日提交中国专利局、申请号为202010647255.2,申请名称为“一种仓储模型训练方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 7, 2020, with the application number of 202010647255.2, and the application titled "A storage model training method, device, computer equipment and storage medium", and its entire contents Incorporated in this application by reference.
本申请涉及人工智能技术领域,具体涉及一种仓储模型训练方法、装置、计算机设备及存储介质。This application relates to the field of artificial intelligence technology, in particular to a storage model training method, device, computer equipment and storage medium.
随着计算机技术的发展,越来越多的新兴技术应用到仓储管理领域,传统仓储管理服务正在逐步向智能仓储管理服务转变,例如通过大数据模型来监测和评估仓库中货物的状态和动态价值,但由于仓储管理在智能化过程中数据体量大、形式各异,且不同类型的仓库有不同的管理标准,因此对建模技术提出的更高的要求。With the development of computer technology, more and more emerging technologies are applied to the field of warehousing management. Traditional warehousing management services are gradually transforming to intelligent warehousing management services, such as monitoring and evaluating the status and dynamic value of goods in the warehouse through big data models , But due to the large volume and different forms of data in the intelligent process of warehouse management, and different types of warehouses have different management standards, higher requirements are put forward on modeling technology.
目前,标准的机器学习方法需要将训练数据集中到一个服务器或一个数据中心内进行模型训练,即机器学习模型一般设置在模型服务提供方,而用于模型训练和模型预测的数据一般位于各个数据拥有方,在模型服务提供方进行模型训练以及利用模型进行预测时,需要使用各个数据拥有方的数据,此时各个数据拥有方通过网络将自身数据传输给模型服务提供方,供模型服务提供方使用。在模型训练过程中,申请人意识到现有的模型训练通过网络来进行数据传输存在以下困难:At present, standard machine learning methods need to concentrate training data in a server or a data center for model training, that is, machine learning models are generally set up in the model service provider, and the data used for model training and model prediction are generally located in each data When the model service provider conducts model training and uses the model to make predictions, the owner needs to use the data of each data owner. At this time, each data owner transmits its own data to the model service provider through the network for the model service provider use. During the model training process, the applicant realized that the existing model training has the following difficulties in data transmission through the network:
1)、用于模型训练的数据格式各不相同,且体量巨大,通过网传输占用大量网络资源,在网络不稳定情况下,极容易导致数据丢失;1) The data formats used for model training are different, and the volume is huge, and transmission through the network takes up a lot of network resources. In the case of network instability, it is very easy to cause data loss;
2)、通过网络来进行数据传输难以保证数据的隐秘性和安全性,容易被不法分子窃取。2) Data transmission through the network is difficult to ensure the privacy and security of the data, and it is easy to be stolen by criminals.
其中,上述数据提供方可以是公司或企业,也可以是个体用户。数据拥有方所提供的数据可以是统一收集的客户数据,比如,用户数据和业务数据等。其中,用户数据例如可以包括用户身份数据等;业务数据例如可以包括在公司提供的业务应用上发生的业务数据,比如仓储货物数据、淘宝上的商品交易数据等。对于数据拥有方而言,数据是非常重要和隐私的资产,需要进行数据隐私保护。Among them, the above-mentioned data provider may be a company or an enterprise, or an individual user. The data provided by the data owner may be uniformly collected customer data, such as user data and business data. Among them, user data may include user identity data, for example; business data may include business data that occurs on business applications provided by the company, such as warehoused goods data, commodity transaction data on Taobao, and the like. For data owners, data is a very important and private asset, and data privacy protection is required.
发明内容Summary of the invention
本申请实施例的目的在于提出一种仓储模型训练方法、装置、计算机设备及存储介质,以解决现有的仓储模型训练方式存在的过度占用网络资源问题,以及无法保证在网络传输过程中仓储货物数据的隐秘性和安全性问题。The purpose of the embodiments of this application is to propose a storage model training method, device, computer equipment, and storage medium to solve the problem of excessive network resource occupation in the existing storage model training method and the inability to guarantee the storage of goods during network transmission. Data privacy and security issues.
为了解决上述技术问题,本申请实施例提供一种仓储模型训练方法,采用了如下所述的技术方案:In order to solve the above technical problems, an embodiment of the present application provides a storage model training method, which adopts the following technical solutions:
构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上;Build a shared storage model and send the shared storage model to the node of the storage server;
从仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;Retrieve historical data of warehoused goods from the database of the warehouse server and generate local training data sets;
将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型;Import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model;
接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型;Receive the trained local storage model, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;
将检测样本数据集输入到初始仓储模型进行模型检测,输出模型检测结果,其中,检测样本数据集存储于云端服务器的数据库内;Input the test sample data set to the initial storage model for model testing, and output the model test results, where the test sample data set is stored in the database of the cloud server;
判断模型检测结果是否在存在于预设标准检测结果的范围内,若模型检测结果不在预设标准检测结果的范围内,则对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。Determine whether the model test result is within the range of the preset standard test result. If the model test result is not within the range of the preset standard test result, the initial storage model is iteratively updated until the model test result falls within the preset standard test The storage model is output until the result is within the range.
进一步地,构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上,具体包括:Further, construct a shared storage model and send the shared storage model to the node of the storage server, which specifically includes:
获取仓储分类标识,根据仓储分类标识构建共享仓储模型,其中,共享仓储模型包括若干个共享仓储子模型,每一个共享仓储子模型均对应一种仓储分类标识;Obtain the storage classification identification, and construct a shared storage model based on the storage classification identification. The shared storage model includes several shared storage sub-models, and each shared storage sub-model corresponds to a storage classification identification;
接收仓储服务器的建模请求指令,建模请求指令携带有仓储服务器对应的仓储分类标识;Receive a modeling request instruction from the storage server, and the modeling request instruction carries a storage classification identifier corresponding to the storage server;
将与仓储分类标识相对应的共享仓储子模型发送到仓储服务器的节点上。The shared storage sub-model corresponding to the storage classification identifier is sent to the node of the storage server.
进一步地,共享仓储模型至少包括输入层、卷积层和输出层,将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型,具体包括:Further, the shared storage model includes at least an input layer, a convolutional layer, and an output layer. The local training data set is imported into the shared storage model, and the shared storage model is model-trained to obtain the local storage model, which specifically includes:
将本地训练数据集导入共享仓储模型,通过输入层对本地训练数据集进行向量特征转换处理,得到目标数据;Import the local training data set into the shared storage model, and perform vector feature conversion processing on the local training data set through the input layer to obtain the target data;
采用卷积层对目标数据进行卷积计算,提取目标数据的特征数据;Use the convolutional layer to perform convolution calculation on the target data, and extract the characteristic data of the target data;
将特征数据导入到输出层中进行适配计算,输出适配结果;Import the feature data into the output layer for adaptation calculation, and output the adaptation result;
根据适配结果对共享仓储模型进行迭代更新,得到本地仓储模型。The shared storage model is iteratively updated according to the adaptation result, and the local storage model is obtained.
进一步地,在根据适配结果对共享仓储模型进行迭代更新,得到本地仓储模型,具体包括:Further, after iteratively updating the shared storage model according to the adaptation result, the local storage model is obtained, which specifically includes:
通过反向传播算法对适配结果与预设标准适配结果进行拟合,获取适配误差;Fit the adaptation result with the preset standard adaptation result through the backpropagation algorithm to obtain the adaptation error;
将适配误差与预设适配误差阈值进行比较;Compare the adaptation error with a preset adaptation error threshold;
若适配误差大于预设适配误差阈值,则对共享仓储模型进行迭代更新,直到适配误差小于等于预设适配误差阈值为止,得到本地仓储模型。If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold, and the local storage model is obtained.
进一步地,接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型,具体包括:Further, receiving the trained local storage model, and performing a weighted aggregation operation on the received local storage model to obtain the initial storage model, which specifically includes:
提取多个已训练完成的本地仓储模型的损失函数;Extract the loss functions of multiple trained local storage models;
对提取到的多个本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数;Perform a weighted aggregation operation on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model;
将仓储模型的损失函数填入共享仓储模型,得到初始仓储模型。Fill the loss function of the storage model into the shared storage model to obtain the initial storage model.
进一步地,对提取到的多个本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数,具体为:Further, the weighted aggregation operation is performed on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model, which is specifically:
通过以下公式对提取到的多个本地仓储模型的损失函数进行加权聚合运算:Use the following formula to perform a weighted aggregation operation on the extracted loss functions of multiple local storage models:
其中,J(θ)为仓储模型的损失函数,ω
i为第i个本地仓储模型在仓储模型中的权重,h
θ(x
i)-y
i为第i个本地仓储模型的损失函数。
Among them, J(θ) is the loss function of the storage model, ω i is the weight of the i-th local storage model in the storage model, and h θ (x i )-y i is the loss function of the i-th local storage model.
进一步地,对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型,具体包括:Further, the initial storage model is iteratively updated until the model detection result falls within the range of the preset standard detection result, and the storage model is output, which specifically includes:
通过反向传播算法对模型检测结果与预设标准检测结果进行拟合,获取检测误差;Fit the model test results with the preset standard test results through the backpropagation algorithm to obtain the detection error;
将检测误差与预设检测误差阈值进行比较;Compare the detection error with the preset detection error threshold;
若检测误差大于预设检测误差阈值,则对初始仓储模型进行迭代更新,直到检测误差小于或等于预设检测误差阈值为止,输出仓储模型。If the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold, and the storage model is output.
为了解决上述技术问题,本申请实施例还提供一种仓储模型训练装置,采用了如下所述的技术方案:In order to solve the above technical problems, an embodiment of the present application also provides a storage model training device, which adopts the following technical solutions:
模型构建模块,用于构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上;The model building module is used to build the shared storage model and send the shared storage model to the node of the storage server;
数据集生成模块,用于从仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;The data set generation module is used to retrieve historical data of warehoused goods from the database of the warehouse server and generate a local training data set;
本地训练模块,用于将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型;The local training module is used to import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model;
联合训练模块,用于接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型;The joint training module is used to receive the local storage model that has been trained, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;
模型验证模块,用于将检测样本数据集输入到初始仓储模型进行模型检测,输出模型检测结果,其中,检测样本数据集存储于云端服务器的数据库内;The model verification module is used to input the test sample data set into the initial storage model for model test, and output the model test result, where the test sample data set is stored in the database of the cloud server;
模型输出模块,用于判断模型检测结果是否在存在于预设标准检测结果的范围内,当模型检测结果不在预设标准检测结果的范围内时,对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。The model output module is used to determine whether the model test result is within the range of the preset standard test result. When the model test result is not within the range of the preset standard test result, iteratively update the initial storage model until the model test result The storage model will be output until it falls within the scope of the preset standard test results.
为了解决上述技术问题,本申请实施例还提供一种计算机设备,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiments of the present application also provide a computer device, which adopts the following technical solutions:
一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,处理器执行计算机可读指令时实现如下仓储模型训练方法的步骤:A computer device includes a memory and a processor. The memory stores computer-readable instructions. When the processor executes the computer-readable instructions, the following steps of the storage model training method are implemented:
构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上;Build a shared storage model and send the shared storage model to the node of the storage server;
从仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;Retrieve historical data of warehoused goods from the database of the warehouse server and generate local training data sets;
将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型;Import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model;
接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型;Receive the trained local storage model, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;
将检测样本数据集输入到初始仓储模型进行模型检测,输出模型检测结果,其中,检测样本数据集存储于云端服务器的数据库内;Input the test sample data set to the initial storage model for model testing, and output the model test results, where the test sample data set is stored in the database of the cloud server;
判断模型检测结果是否在存在于预设标准检测结果的范围内,若模型检测结果不在预设标准检测结果的范围内,则对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。Determine whether the model test result is within the range of the preset standard test result. If the model test result is not within the range of the preset standard test result, the initial storage model is iteratively updated until the model test result falls within the preset standard test The storage model is output until the result is within the range.
为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiments of the present application also provide a computer-readable storage medium, which adopts the following technical solutions:
一种计算机可读存储介质,计算机可读存储介质上存储有计算机可读指令,计算机可读指令被处理器执行时实现如下仓储模型训练方法的步骤:A computer-readable storage medium on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the following steps of the storage model training method are implemented:
构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上;Build a shared storage model and send the shared storage model to the node of the storage server;
从仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;Retrieve historical data of warehoused goods from the database of the warehouse server and generate local training data sets;
将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型;Import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model;
接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型;Receive the trained local storage model, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;
将检测样本数据集输入到初始仓储模型进行模型检测,输出模型检测结果,其中,检测样本数据集存储于云端服务器的数据库内;Input the test sample data set to the initial storage model for model testing, and output the model test results, where the test sample data set is stored in the database of the cloud server;
判断模型检测结果是否在存在于预设标准检测结果的范围内,若模型检测结果不在预设标准检测结果的范围内,则对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。Determine whether the model test result is within the range of the preset standard test result. If the model test result is not within the range of the preset standard test result, the initial storage model is iteratively updated until the model test result falls within the preset standard test The storage model is output until the result is within the range.
与现有技术相比,本申请实施例主要有以下有益效果:Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
本申请公开了一种仓储模型训练方法、装置、计算机设备及存储介质,涉及人工智能技术领域,应用于仓储模型的训练,所述仓储模型训练方法通过构建共享仓储模型,并将 共享仓储模型发送到仓储服务器;通过仓储服务器的数据库中的本地训练数据集对共享仓储模型进行模型训练,得到本地仓储模型;然后通过聚合本地仓储模型,得到初始仓储模型;利用云端服务器的数据库中的检测样本数据集进行模型检测;并根据模型检测结果对初始仓储模型进行迭代更新,最后输出符合标准仓储模型。本申请通过在云端服务器构建共享仓储模型,在仓储服务器训练本地仓储模型,然后将本地仓储模型进行聚合,形成初始仓储模型,通过检测样本数据集对初始仓储模型进行检测,当模型检测结果在预设标准检测结果的范围内时,输出符合标准仓储模型,本申请在仓储模型训练过程中,通过云端服务器将共享仓储模型发送到仓储服务器,在仓储服务器中进行模型训练,因此不需要将仓储服务器的训练数据集通过网络上传到云端服务器,极大程度地降低了网络传输的压力,保证了本地仓储货物数据的隐秘性和安全性。The application discloses a storage model training method, device, computer equipment and storage medium, which relate to the field of artificial intelligence technology and are applied to the training of storage models. The storage model training method constructs a shared storage model and sends the shared storage model. Go to the warehouse server; train the shared warehouse model through the local training data set in the warehouse server database to obtain the local warehouse model; then aggregate the local warehouse models to obtain the initial warehouse model; use the test sample data in the cloud server database Iteratively update the initial storage model according to the model detection results, and finally output conforms to the standard storage model. This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model. The initial storage model is tested through the detection sample data set. When the standard detection result is within the range, the output conforms to the standard storage model. In this application, during the storage model training process, the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required The training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the solution in this application more clearly, the following will briefly introduce the drawings used in the description of the embodiments of the application. Obviously, the drawings in the following description are some embodiments of the application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1是本申请可以应用于其中的示例性系统架构图;Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
图2示出了本申请的仓储模型训练方法的一个实施例的流程图;Figure 2 shows a flowchart of an embodiment of the storage model training method of the present application;
图3示出了本申请的仓储模型训练方法中本地仓储模型训练的一个实施例的流程图;FIG. 3 shows a flowchart of an embodiment of local storage model training in the storage model training method of the present application;
图4示出了本申请的仓储模型训练方法中仓储模型迭代更新的一个实施例的流程图;FIG. 4 shows a flowchart of an embodiment of the iterative update of the warehouse model in the warehouse model training method of the present application;
图5示出了本申请的仓储模型训练装置的一个实施例的结构示意图;FIG. 5 shows a schematic structural diagram of an embodiment of the storage model training device of the present application;
图6是根据本申请的计算机设备的一个实施例的结构示意图。Fig. 6 is a schematic structural diagram of an embodiment of a computer device according to the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the technical field of the application; the terms used in the specification of the application herein are only for describing specific embodiments. The purpose is not to limit the application; the terms "including" and "having" in the specification and claims of the application and the above-mentioned description of the drawings and any variations thereof are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific sequence.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。The reference to "embodiments" herein means that a specific feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art clearly and implicitly understand that the embodiments described herein can be combined with other embodiments.
为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings.
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。The user can use the terminal devices 101, 102, and 103 to interact with the server 105 through the network 104 to receive or send messages and so on. Various communication client applications, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social platform software, can be installed on the terminal devices 101, 102, and 103.
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式 计算机等等。The terminal devices 101, 102, 103 may be various electronic devices with display screens and support for web browsing, including but not limited to smart phones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic Video experts compress standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image experts compress standard audio layer 4) players, laptop portable computers and desktop computers, etc.
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上显示的页面提供支持的后台服务器。The server 105 may be a server that provides various services, for example, a background server that provides support for pages displayed on the terminal devices 101, 102, and 103.
需要说明的是,本申请实施例所提供的接收已训练完成的本地仓储模型方法一般由服务器执行,相应地,接收已训练完成的本地仓储模型装置一般设置于服务器中。It should be noted that the method for receiving the trained local storage model provided by the embodiments of the present application is generally executed by the server, and accordingly, the device for receiving the trained local storage model is generally set in the server.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks, and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks, and servers according to implementation needs.
继续参考图2,示出了本申请的仓储模型训练方法的一个实施例的流程图。所述的仓储模型训练方法,包括以下步骤:Continuing to refer to FIG. 2, a flowchart of an embodiment of the storage model training method of the present application is shown. The storage model training method includes the following steps:
S201,构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上;S201: Construct a shared storage model, and send the shared storage model to the node of the storage server;
进一步地,在本申请具体的实施例中,步骤S201构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上,具体包括:Further, in a specific embodiment of the present application, step S201 constructs a shared storage model and sends the shared storage model to the node of the storage server, which specifically includes:
获取仓储分类标识,根据仓储分类标识构建共享仓储模型,其中,共享仓储模型包括若干个共享仓储子模型,每一个共享仓储子模型均对应一种仓储分类标识;Obtain the storage classification identification, and construct a shared storage model based on the storage classification identification. The shared storage model includes several shared storage sub-models, and each shared storage sub-model corresponds to a storage classification identification;
接收仓储服务器的建模请求指令,建模请求指令携带有仓储服务器对应的仓储分类标识;Receive a modeling request instruction from the storage server, and the modeling request instruction carries a storage classification identifier corresponding to the storage server;
将与仓储分类标识相对应的共享仓储子模型发送到仓储服务器的节点上。The shared storage sub-model corresponding to the storage classification identifier is sent to the node of the storage server.
其中,仓储根据其存储对象的不同可以划分为多个类别,例如实物仓储、虚拟仓储等等,实物仓储、虚拟仓储还可以继续根据存储对象性质不同继续进行不同层级的划分,例如实物仓储可划分为实物固体仓储、实物液体仓储、实物气体仓储等等。在本实施例中,预先为仓储系统中所有仓储进行分类,并为每一个仓储添加仓储分类标识。Among them, warehousing can be divided into multiple categories according to the different storage objects, such as physical warehousing, virtual warehousing, etc., physical warehousing, virtual warehousing can continue to be divided into different levels according to the nature of the storage object, for example, physical warehousing can be divided For physical solid storage, physical liquid storage, physical gas storage, etc. In this embodiment, all warehouses in the warehouse system are classified in advance, and a warehouse classification identifier is added to each warehouse.
具体的,云端服务器在构建共享仓储模型时,先获取各个仓储的分类标识,根据仓储分类标识构建共享仓储模型,当接收仓储服务器的建模请求指令时,云端服务器先从建模请求指令提取仓储服务器对应的仓储分类标识,对仓储服务器的仓储分类标识进行识别,并将与仓储分类标识相对应的共享仓储子模型发送到仓储服务器的节点上。Specifically, when the cloud server constructs the shared storage model, it first obtains the classification identification of each storage, and constructs the shared storage model according to the storage classification identification. When receiving the modeling request instruction from the storage server, the cloud server first extracts the storage from the modeling request instruction. The storage classification identification corresponding to the server identifies the storage classification identification of the storage server, and sends the shared storage sub-model corresponding to the storage classification identification to the node of the storage server.
在本申请具体的实施例中,基于长短期记忆网络LSTM构建共享仓储模型,其中,共享仓储模型至少包括3个网络层,具体为输入层、卷积层和输出层,通过长短期记忆网络LSTM在共享仓储模型的输入层构建遗忘门,利用sigmoid函数决定哪些特征信息需要被忽略,LSTM遗忘门计算公式如下:In the specific embodiment of this application, the shared storage model is constructed based on the long and short-term memory network LSTM, where the shared storage model includes at least three network layers, specifically the input layer, the convolutional layer, and the output layer, through the long-short-term memory network LSTM The forget gate is constructed in the input layer of the shared storage model, and the sigmoid function is used to determine which feature information needs to be ignored. The LSTM forget gate calculation formula is as follows:
gate=σ(WX
t+Uh
t-1+b)
gate=σ(WX t +Uh t-1 +b)
其中,gate表示遗忘门的门限值,σ表示sigmoid函数,W、U表示遗忘门权重,b表示遗忘常数,X
t表示当前输入层的输入信息,h
t-1表示上一个时刻输出层的输出信息。
Among them, gate represents the threshold of the forget gate, σ represents the sigmoid function, W and U represent the weight of the forget gate, b represents the forgetting constant, X t represents the input information of the current input layer, and h t-1 represents the output layer of the previous Output information.
本申请实施例通过共享仓储模型的输入层构建LSTM遗忘门,在进行模型训练时,输入层可以实现对训练样本进行筛选,根据计算得到的gate值,判断是否接收训练样本,对于gate值较大的训练样本,允许通过输入层,忽略gate值较小的训练样本,可以通过设定标准gate值来比较,使得模型训练效果更好。The embodiment of the application constructs the LSTM forget gate through the input layer of the shared storage model. During model training, the input layer can filter the training samples, and judge whether to receive the training samples according to the calculated gate value. The gate value is larger. The training samples of, allow the input layer to ignore the training samples with smaller gate values, which can be compared by setting the standard gate value, so that the model training effect is better.
其中,长短期记忆网络(LSTM,Long Short-Term Memory)是一种时间循环神经网络,是为了解决一般的RNN(RecurrentNeuralNetwork,RNN循环神经网络)存在的长期依赖问题而专门设计出来的时间循环神经网络。LSTM中含有LSTM区块(blocks),LSTM区块也被称为智能网络单元,LSTM区块可以记忆不定时间长度的数值,LSTM区块中有一个门限值gate能够决定输入的数据信息input是否重要到需要被记住,以及决定经LSTM输出的数据信息output能不能被输出。LSTM为了最小化训练误差,LSTM的训练采用梯度下降法(Gradient descent),应用时序性倒传递算法,可用来修改LSTM的权重。Among them, the long and short-term memory network (LSTM, Long Short-Term Memory) is a kind of time cyclic neural network, which is specially designed to solve the long-term dependence problem of the general RNN (Recurrent Neural Network, RNN cyclic neural network). The internet. LSTM contains LSTM blocks. LSTM blocks are also called intelligent network units. LSTM blocks can memorize values of variable length of time. There is a threshold gate in LSTM blocks that can determine whether the input data information is input or not. It is important to be remembered, and to determine whether the output of the data information output by the LSTM can be output. In order to minimize the training error of LSTM, the training of LSTM adopts gradient descent method, which applies sequential reverse transfer algorithm, which can be used to modify the weight of LSTM.
S202,从仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;S202: Retrieve historical data of warehoused goods from the database of the warehouse server, and generate a local training data set;
具体的,在本申请实施例中,先在云端服务器构建共享仓储模型,在仓储服务器存在建模需求时,将共享仓储模型发送到仓储服务器节点上,在仓储服务器节点接收到共享仓储模型后,从自身的数据库内调取仓储货物的历史数据,将调取的仓储货物历史数据作为 本地训练数据集,将本地训练数据集导入到共享仓储模型,进行模型训练。Specifically, in the embodiment of the present application, the shared storage model is first constructed on the cloud server. When the storage server has a modeling requirement, the shared storage model is sent to the storage server node. After the storage server node receives the shared storage model, Retrieve historical data of warehousing goods from its own database, use the retrieved historical data of warehousing goods as a local training data set, and import the local training data set into the shared storage model for model training.
需要说明的是,每一个仓储服务器存在建模需求时,都可以向云端服务器发送建模请求指令,获取与自身分类标识相对应的共享仓储子模型,并在自身的服务器内通过本地训练数据集训练共享仓储子模型,将训练好的共享仓储子模型确定为自身的本地仓储模型。It should be noted that when each storage server has a modeling requirement, it can send a modeling request instruction to the cloud server, obtain the shared storage sub-model corresponding to its own classification identification, and use the local training data set in its own server Train the shared storage sub-model, and determine the trained shared storage sub-model as its own local storage model.
S203,将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型;S203: Import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model;
具体的,将本地训练数据集导入到共享仓储模型,利用本地训练数据集对共享仓储模型进行模型训练,得到本地仓储模型。仓储服务器可以利用本地仓储模型来进行仓储货物数据的处理。Specifically, the local training data set is imported into the shared storage model, and the local training data set is used to perform model training on the shared storage model to obtain the local storage model. The warehousing server can use the local warehousing model to process warehousing cargo data.
进一步地,请参考图3,图3示出了本申请的仓储模型训练方法中本地仓储模型训练的一个实施例的流程图,共享仓储模型至少包括输入层、卷积层和输出层,将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型,具体包括:Further, please refer to Figure 3. Figure 3 shows a flowchart of an embodiment of the local storage model training in the storage model training method of the present application. The shared storage model includes at least an input layer, a convolutional layer, and an output layer. Import the training data set into the shared storage model, and perform model training on the shared storage model to obtain the local storage model, which specifically includes:
S301,将本地训练数据集导入共享仓储模型,通过输入层对本地训练数据集进行向量特征转换处理,得到目标数据;S301: Import the local training data set into the shared storage model, and perform vector feature conversion processing on the local training data set through the input layer to obtain target data;
其中,共享仓储模型至少包括3个网络层,具体为输入层、卷积层和输出层。Among them, the shared storage model includes at least three network layers, specifically the input layer, the convolutional layer and the output layer.
具体的,共享仓储模型的输入层中设置有向量转换端口,通过直接将本地训练数据集导入到向量转换端口进行向量特征转换处理,得到本地训练数据集对应的初始向量集合,将得到初始向量集合作为目标数据输入到共享仓储模型的卷积层中。Specifically, the input layer of the shared storage model is provided with a vector conversion port. By directly importing the local training data set to the vector conversion port for vector feature conversion processing, the initial vector set corresponding to the local training data set is obtained, and the initial vector set is obtained As the target data, it is input into the convolutional layer of the shared storage model.
S302,采用卷积层对目标数据进行卷积计算,提取目标数据的特征数据;S302, using a convolutional layer to perform convolution calculation on the target data, and extract characteristic data of the target data;
其中,卷积计算过程为采用m*n的矩阵对输入数值进行卷积,以1维卷积为例,构建一x*n的卷积核,该卷积核在原始矩阵上滑动运算。例如m的值为5,x的值为1,则卷积核自上而下滑动,x首先与第一行的n维向量相乘并求和,得到一个值,随后x继续往下滑动与第2行,第3行…进行卷积运算,共得到5*1的矩阵,即为卷积结果。Among them, the convolution calculation process is to use an m*n matrix to convolve the input value. Taking a 1-dimensional convolution as an example, a x*n convolution kernel is constructed, and the convolution kernel performs sliding operations on the original matrix. For example, if the value of m is 5 and the value of x is 1, the convolution kernel slides from top to bottom. First, x is multiplied by the n-dimensional vector in the first row and summed to obtain a value, and then x continues to slide down and Line 2, Line 3... Perform convolution operation, and get a total of 5*1 matrix, which is the result of convolution.
具体的,共享仓储模型的卷积层中设置有标准卷积核,通过直接将目标数据导入到标准卷积核进行目标数据的卷积计算,从得到的卷积计算结果中提取目标数据的特征数据。Specifically, the convolutional layer of the shared storage model is equipped with a standard convolution kernel. The target data is directly imported into the standard convolution kernel to perform the convolution calculation of the target data, and the characteristics of the target data are extracted from the obtained convolution calculation result. data.
S303,将特征数据导入到输出层中进行适配计算,输出适配结果;S303: Import the feature data into the output layer for adaptation calculation, and output the adaptation result;
具体的,输出层中预先设置有的适配分类器,当输出层接收到特征数据时,利用预先设置好的适配分类器对特征数据进行相似度计算,并从计算结果中提取相似度最大的适配结果。Specifically, the adaptive classifier is preset in the output layer. When the output layer receives the feature data, it uses the preset adaptive classifier to calculate the similarity of the feature data, and extracts the maximum similarity from the calculation result. The result of the adaptation.
S304,根据适配结果对共享仓储模型进行迭代更新,得到本地仓储模型。S304: Iteratively update the shared storage model according to the adaptation result to obtain a local storage model.
具体的,通过比对相似度最大的适配结果与预设标准适配结果,来判断是否需要对共享仓储模型进行迭代更新。其中,通过对共享仓储模型进行迭代更新,来优化共享仓储模型的初始模型参数,得到输出结果更加精确的本地仓储模型。Specifically, it is determined whether the shared storage model needs to be iteratively updated by comparing the adaptation result with the greatest similarity with the preset standard adaptation result. Among them, by iteratively updating the shared storage model, the initial model parameters of the shared storage model are optimized, and a local storage model with more accurate output results is obtained.
需要说明的是,共享仓储模型的初始模型参数只是在构建共享仓储模型时为了共享仓储模型在进行模型训练预设的一系列初始参数,在实际训过程中,由于各个仓储模型应用场景不同,因此各个仓储模型参数比重不可能完全相同,根据不同的训练样本获得的识别结果与预设标准结果之间必然存在误差,且误差大小存在差异,因此需要将训练过程中产生的误差信息逐层回传给共享仓储模型中的各层网络结构,并通过对预设的初始模型参数进行调整,才能获得效果更好的仓储模型。It should be noted that the initial model parameters of the shared storage model are only a series of initial parameters preset during model training for the shared storage model when the shared storage model is constructed. In the actual training process, due to the different application scenarios of each storage model, The proportions of the parameters of each storage model cannot be exactly the same. There must be errors between the recognition results obtained according to different training samples and the preset standard results, and there are differences in the size of the errors. Therefore, the error information generated during the training process needs to be returned layer by layer. Only by adjusting the preset initial model parameters to each layer of the network structure in the shared storage model can a better storage model be obtained.
在本实施例中,通过对本地训练数据集进行向量特征转换处理、卷积计算以及适配计算,来对共享仓储模型进行模型训练,得到本地仓储模型,并根据适配结果对共享仓储模型进行迭代更新,来优化共享仓储模型的初始模型参数,得到输出效果更好的本地仓储模型。In this embodiment, by performing vector feature conversion processing, convolution calculation, and adaptation calculation on the local training data set, the shared storage model is trained to obtain the local storage model, and the shared storage model is performed according to the adaptation result. Iteratively update to optimize the initial model parameters of the shared storage model to obtain a local storage model with better output effects.
进一步地,步骤S304在根据适配结果对共享仓储模型进行迭代更新,得到本地仓储模型,具体包括:Further, step S304 is to iteratively update the shared storage model according to the adaptation result to obtain the local storage model, which specifically includes:
通过反向传播算法对适配结果与预设标准适配结果进行拟合,获取适配误差;Fit the adaptation result with the preset standard adaptation result through the backpropagation algorithm to obtain the adaptation error;
其中,反向传播算法,即误差反向传播算法(Backpropagation algorithm,BP算法)适合于多层神经元网络的一种学习算法,它建立在梯度下降法的基础上,用于深度学习网 络的误差计算。BP网络的输入、输出关系实质上是一种映射关系:一个n输入m输出的BP神经网络所完成的功能是从n维欧氏空间向m维欧氏空间中一有限域的连续映射,这一映射具有高度非线性。BP算法的学习过程由正向传播过程和反向传播过程组成。在正向传播过程中,输入信息通过输入层经隐含层,逐层处理并传向输出层,并转入反向传播,逐层求出目标函数对各神经元权值的偏导数,构成目标函数对权值向量的梯量,以作为修改权值的依据。Among them, the back-propagation algorithm, that is, the Backpropagation Algorithm (BP Algorithm) is a learning algorithm suitable for multi-layer neural networks. It is based on the gradient descent method and is used for the error of the deep learning network. Calculation. The input and output relationship of the BP network is essentially a mapping relationship: the function of a BP neural network with n inputs and m outputs is a continuous mapping from n-dimensional Euclidean space to a finite field in m-dimensional Euclidean space. A mapping is highly non-linear. The learning process of BP algorithm is composed of forward propagation process and back propagation process. In the process of forward propagation, the input information passes through the input layer through the hidden layer, is processed layer by layer and transmitted to the output layer, and transferred to the back propagation, layer by layer, the partial derivative of the objective function with respect to the weight of each neuron is obtained, which constitutes The gradient of the objective function to the weight vector is used as the basis for modifying the weight.
具体的,根据适配结果和预设标准适配结果,使用反向传播算法对共享仓储模型各个网络层的初始参数进行调整,对共享仓储模型各个网络层进行误差反传更新,获取更新后的各个网络层的权值和偏置,使用更新后的各个网络层的权值和偏置,对本地训练数据集进行适配误差计算,得到适配误差。Specifically, according to the adaptation result and the preset standard adaptation result, the backpropagation algorithm is used to adjust the initial parameters of each network layer of the shared storage model, and the error back propagation update of each network layer of the shared storage model is performed to obtain the updated The weights and offsets of each network layer are calculated using the updated weights and offsets of each network layer to calculate the adaptation error of the local training data set to obtain the adaptation error.
将适配误差与预设适配误差阈值进行比较;Compare the adaptation error with a preset adaptation error threshold;
具体的,将适配误差与预设适配误差阈值进行比较,其中,预设适配误差阈值可以根据经验值提前进行设定。Specifically, the adaptation error is compared with a preset adaptation error threshold, where the preset adaptation error threshold can be set in advance according to an empirical value.
若适配误差大于预设适配误差阈值,则对共享仓储模型进行迭代更新,直到适配误差小于等于预设适配误差阈值为止,得到本地仓储模型。If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold, and the local storage model is obtained.
具体的,若适配误差小于或等于预设适配误差阈值,则表明接受训练的共享仓储模型符合模型标准,将其作为本地仓储模型。若适配误差大于预设适配误差阈值,则对共享仓储模型进行迭代更新,直到适配误差小于等于预设适配误差阈值为止,得到本地仓储模型。在本申请实施例中,在得到本地仓储模型之后,将其存储在仓储服务器内,同时本地仓储模型进行复制,并将复制的本地仓储模型发送到云端服务器。Specifically, if the adaptation error is less than or equal to the preset adaptation error threshold, it indicates that the trained shared storage model meets the model standard, and it is taken as the local storage model. If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold, and the local storage model is obtained. In the embodiment of the present application, after the local storage model is obtained, it is stored in the storage server, while the local storage model is copied, and the copied local storage model is sent to the cloud server.
其中,对共享仓储模型进行迭代更新具体为利用预先设置好的本地仓储模型的损失函数,通过对共享仓储模型中各个网络层的初始参数进行调整的方式进行迭代更新,若适配误差小于等于预设适配误差阈值,则停止迭代,并将该适配误差对应的共享仓储模型确定为本地仓储模型。Among them, the iterative update of the shared storage model is to use the preset loss function of the local storage model to perform iterative update by adjusting the initial parameters of each network layer in the shared storage model. If the adaptation error is less than or equal to the preset Set the adaptation error threshold, stop iteration, and determine the shared storage model corresponding to the adaptation error as the local storage model.
本实施例通过,在进行本地仓储模型训练时,通过计算适配误差,将适配误差与预设适配误差阈值进行比较,若适配误差小于或等于预设适配误差阈值,则表明接受训练的共享仓储模型符合模型标准,若适配误差大于预设适配误差阈值,则对共享仓储模型进行迭代更新,直到适配误差小于等于预设适配误差阈值为止。通过对共享仓储模型进行迭代更新,使得最终得到的本地仓储模型的使用误差更小,提高了本地仓储模型预测准确度。In this embodiment, during the training of the local storage model, the adaptation error is compared with the preset adaptation error threshold by calculating the adaptation error. If the adaptation error is less than or equal to the preset adaptation error threshold, it indicates acceptance The trained shared storage model meets the model standard. If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is iteratively updated until the adaptation error is less than or equal to the preset adaptation error threshold. By iteratively updating the shared storage model, the use error of the finally obtained local storage model is smaller, and the prediction accuracy of the local storage model is improved.
S204,接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型;S204: Receive a local storage model that has been trained, and perform a weighted aggregation operation on the received local storage model to obtain an initial storage model;
具体的,在仓储服务器进行本地仓储模型训练,在本地仓储模型训练完成后,仓储服务器对训练完成的本地仓储模型进行复制,并将复制的本地仓储模型发送给云端服务器,云端服务器接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型。Specifically, the local storage model training is performed on the storage server. After the local storage model training is completed, the storage server copies the trained local storage model and sends the copied local storage model to the cloud server, and the cloud server receives the completed training The local storage model of, and the weighted aggregation operation is performed on the received local storage model to obtain the initial storage model.
在本申请另一种实施例中,在本地仓储模型训练完成后,仓储服务器提取训练完成的本地仓储模型的损失函数,并将损失函数发送给云端服务器,云端服务器接收已训练完成的本地仓储模型的损失函数,并对接收到的损失函数进行加权聚合运算,得到仓储模型的损失函数。In another embodiment of the present application, after the training of the local storage model is completed, the storage server extracts the loss function of the trained local storage model, and sends the loss function to the cloud server, and the cloud server receives the trained local storage model The loss function of, and the weighted aggregation operation is performed on the received loss function to obtain the loss function of the storage model.
在本实施例中,仓储模型训练方法运行于其上的电子设备(例如图1所示的服务器/终端设备)可以通过有线连接方式或者无线连接方式*接收已训练完成的本地仓储模型。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。In this embodiment, the electronic device (such as the server/terminal device shown in FIG. 1) on which the warehouse model training method runs can receive the trained local warehouse model through a wired connection or a wireless connection*. It should be pointed out that the above-mentioned wireless connection methods can include, but are not limited to, 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future .
进一步地,接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型,具体包括:Further, receiving the trained local storage model, and performing a weighted aggregation operation on the received local storage model to obtain the initial storage model, which specifically includes:
提取多个已训练完成的本地仓储模型的损失函数;Extract the loss functions of multiple trained local storage models;
具体的,在仓储模型训练过程中,云端服务器可以同时将共享仓储模型发送给多个仓 储服务器,多个仓储服务器可以同时对各自的本地仓储模型进行模型训练。在多个本地仓储模型训练完成后,向云端服务器上传训练完成的本地仓储模型,云端服务器接收多个已训练完成的本地仓储模型,并提取多个已训练完成的本地仓储模型的损失函数。Specifically, during the storage model training process, the cloud server can simultaneously send the shared storage model to multiple storage servers, and the multiple storage servers can perform model training on their respective local storage models at the same time. After the training of multiple local storage models is completed, the trained local storage model is uploaded to the cloud server. The cloud server receives multiple trained local storage models and extracts the loss functions of the multiple trained local storage models.
对提取到的多个本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数;Perform a weighted aggregation operation on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model;
具体的,对提取到的多个本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数,具体为:Specifically, a weighted aggregation operation is performed on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model, which is specifically:
通过以下公式对提取到的多个本地仓储模型的损失函数进行加权聚合运算:Use the following formula to perform a weighted aggregation operation on the extracted loss functions of multiple local storage models:
其中,J(θ)为仓储模型的损失函数,ω
i为第i个本地仓储模型在仓储模型中的权重,h
θ(x
i)-y
i为第i个本地仓储模型的损失函数。
Among them, J(θ) is the loss function of the storage model, ω i is the weight of the i-th local storage model in the storage model, and h θ (x i )-y i is the loss function of the i-th local storage model.
需要说明的是,在本实施例中,每一个本地仓储在整个仓储系统中的占比并不相同,云端服务器在对提取到的多个本地仓储模型的损失函数进行加权聚合运算时,需要先计算各个本地仓储在整个仓储系统中的权重,各个本地仓储在整个仓储系统中的权重即为各个本地仓储模型在仓储模型中的权重。It should be noted that in this embodiment, the proportion of each local storage in the entire storage system is not the same. When the cloud server performs a weighted aggregation operation on the extracted loss functions of multiple local storage models, it needs to first Calculate the weight of each local storage in the entire storage system. The weight of each local storage in the entire storage system is the weight of each local storage model in the storage model.
将仓储模型的损失函数填入共享仓储模型,得到初始仓储模型。Fill the loss function of the storage model into the shared storage model to obtain the initial storage model.
具体的,云端服务器将通过对多个已训练完成的本地仓储模型的损失函数进行加权聚合运算后得到的损失函数作为仓储模型的损失函数,将仓储模型的损失函数填入共享仓储模型,得到初始仓储模型。Specifically, the cloud server uses the weighted aggregation calculation of the loss functions of multiple trained local storage models as the loss function of the storage model, and fills the loss function of the storage model into the shared storage model to obtain the initial Warehousing model.
在本实施例中,对提取到的多个本地仓储模型的损失函数进行加权聚合运算,将计算得到仓储模型的损失函数,作为共享仓储模型的损失函数,通将仓储模型的损失函数填入共享仓储模型,得到初始仓储模型。In this embodiment, the weighted aggregation operation is performed on the loss functions of the multiple extracted local storage models, and the loss function of the storage model is calculated as the loss function of the shared storage model. The loss function of the storage model is filled into the shared storage model. Storage model, get the initial storage model.
S205,将检测样本数据集输入到初始仓储模型进行模型检测,输出模型检测结果,其中,检测样本数据集存储于云端服务器的数据库内;S205: Input the test sample data set to the initial storage model for model test, and output the model test result, where the test sample data set is stored in the database of the cloud server;
具体的,在本申请实施例中,在得到初始仓储模型之后,从云端服务器的数据库内获取检测样本数据集,并将检测样本数据集输入到初始仓储模型进行模型检测,获取模型检测结果,其中,检测样本数据集是专门用于模型检测的数据集。Specifically, in the embodiment of the present application, after the initial storage model is obtained, the detection sample data set is obtained from the database of the cloud server, and the detection sample data set is input to the initial storage model for model detection, and the model detection result is obtained, where , The test sample data set is a data set specially used for model testing.
S206,判断模型检测结果是否在存在于预设标准检测结果的范围内,若模型检测结果不在预设标准检测结果的范围内,则对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。S206: Determine whether the model test result is within the range of the preset standard test result. If the model test result is not within the range of the preset standard test result, the initial storage model is iteratively updated until the model test result falls within the preset standard. The storage model will be output within the range of the standard test results.
具体的,输出模型检测结果之后,获取模型检测结果,将模型检测结果与预设标准检测结果进行比对,判断模型检测结果是否在存在于预设标准检测结果的范围内,若检测误差小于或等于预设检测误差阈值,则表明接收训练的仓储模型符合模型标准,若检测误差大于预设检测误差阈值,则对初始仓储模型进行迭代更新,直到检测误差小于等于预设检测误差阈值为止。Specifically, after outputting the model test result, the model test result is obtained, and the model test result is compared with the preset standard test result to determine whether the model test result is within the range of the preset standard test result. If the test error is less than or It is equal to the preset detection error threshold, indicating that the trained storage model meets the model standard. If the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold.
进一步地,请参考图4,图4示出了本申请的仓储模型训练方法中仓储模型迭代更新的一个实施例的流程图,对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型,具体包括:Further, please refer to FIG. 4, which shows a flowchart of an embodiment of the storage model iterative update in the storage model training method of the present application. The initial storage model is iteratively updated until the model detection result falls within the preset standard Within the scope of the test results, output the storage model, including:
S401,通过反向传播算法对模型检测结果与预设标准检测结果进行拟合,获取检测误差;S401: Fit the model test result with the preset standard test result by using a backpropagation algorithm to obtain a detection error;
具体的,根据检测结果和预设标准检测结果,使用反向传播算法对初始仓储模型各个网络层的初始参数进行调整,对初始仓储模型各个网络层进行误差反传更新,获取更新后的各个网络层的权值和偏置,使用更新后的各个网络层的权值和偏置,对检测样本数据集进行检测误差计算,得到检测误差。Specifically, according to the detection results and the preset standard detection results, the backpropagation algorithm is used to adjust the initial parameters of each network layer of the initial storage model, and the error back propagation update of each network layer of the initial storage model is performed to obtain the updated network The weights and biases of the layers, using the updated weights and biases of each network layer, are used to calculate the detection error of the detection sample data set to obtain the detection error.
S402,将检测误差与预设检测误差阈值进行比较;S402: Compare the detection error with a preset detection error threshold;
具体的,将检测误差与预设检测误差阈值进行比较,其中,预设检测误差阈值可以根据经验值提前进行设定。Specifically, the detection error is compared with a preset detection error threshold, where the preset detection error threshold can be set in advance according to an empirical value.
S403,若检测误差大于预设检测误差阈值,则对初始仓储模型进行迭代更新,直到检测误差小于或等于预设检测误差阈值为止,输出仓储模型。S403: If the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold, and the storage model is output.
具体的,若检测误差小于或等于预设检测误差阈值,则表明接收训练的仓储模型符合模型标准。若检测误差大于预设检测误差阈值,则对初始仓储模型进行迭代更新,直到检测误差小于等于预设检测误差阈值为止,得到仓储模型。Specifically, if the detection error is less than or equal to the preset detection error threshold, it indicates that the storage model receiving training meets the model standard. If the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold to obtain the storage model.
其中,对初始仓储模型进行迭代更新具体为在确定的仓储模型的损失函数的条件下,通过对初始仓储模型中各个网络层的初始参数进行调整的方式进行迭代更新,若检测误差小于等于预设检测误差阈值,则停止迭代,并将该检测误差对应的初始仓储模型确定为符合模型标准的仓储模型。Among them, the iterative update of the initial storage model specifically refers to the iterative update by adjusting the initial parameters of each network layer in the initial storage model under the condition of the determined loss function of the storage model. If the detection error is less than or equal to the preset If the detection error threshold is detected, the iteration is stopped, and the initial storage model corresponding to the detection error is determined as a storage model that meets the model standard.
在本实施例中,在进行仓储模型训练时,通过计算检测误差,将检测误差与预设检测误差阈值进行比较,若检测误差小于或等于预设检测误差阈值,则表明接收训练的仓储模型符合模型标准,若检测误差大于预设检测误差阈值,则对初始仓储模型进行迭代更新,直到检测误差小于等于预设检测误差阈值为止。通过对初始仓储模型进行迭代更新,使得最终得到的仓储模型的使用误差更小,提高了仓储模型预测准确度。In this embodiment, when training the storage model, the detection error is calculated by comparing the detection error with the preset detection error threshold. If the detection error is less than or equal to the preset detection error threshold, it indicates that the storage model receiving training meets Model standard, if the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold. By iteratively updating the initial storage model, the use error of the final storage model is smaller, and the prediction accuracy of the storage model is improved.
本实施例公开了一种仓储模型训练方法,涉及人工智能技术领域,应用于仓储模型的训练,仓储模型可以用于仓储货物监管、仓储货物评估等等。所述仓储模型训练方法通过构建共享仓储模型,并将共享仓储模型发送到仓储服务器;通过仓储服务器的数据库中的本地训练数据集对共享仓储模型进行模型训练,得到本地仓储模型;然后通过聚合本地仓储模型,得到初始仓储模型;利用云端服务器的数据库中的检测样本数据集进行模型检测;并根据模型检测结果对初始仓储模型进行迭代更新,最后输出符合标准联合预测模型。本申请通过在云端服务器构建共享仓储模型,在仓储服务器训练本地仓储模型,然后将本地预测模型进行聚合,形成初始仓储模型,通过检测样本数据集对初始仓储模型进行检测,当模型检测结果在预设标准检测结果的范围内时,输出符合标准仓储模型,本申请在仓储模型训练过程中,通过云端服务器将共享仓储模型发送到仓储服务器,在仓储服务器中进行模型训练,因此不需要将仓储服务器的训练数据集通过网络上传到云端服务器,极大程度地降低了网络传输的压力,保证了本地仓储货物数据的隐秘性和安全性。This embodiment discloses a storage model training method, which involves the field of artificial intelligence technology and is applied to the training of storage models. The storage model can be used for storage goods supervision, storage goods evaluation, and so on. The storage model training method constructs a shared storage model and sends the shared storage model to the storage server; performs model training on the shared storage model through the local training data set in the database of the storage server to obtain the local storage model; and then aggregates the local storage model. The storage model is used to obtain the initial storage model; the detection sample data set in the database of the cloud server is used for model detection; and the initial storage model is iteratively updated according to the model detection results, and the final output conforms to the standard joint prediction model. This application builds a shared storage model on the cloud server, trains a local storage model on the storage server, and then aggregates the local prediction models to form an initial storage model. The initial storage model is tested through the detection sample data set. When the standard detection result is within the range, the output conforms to the standard storage model. In this application, during the storage model training process, the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required The training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
需要强调的是,为进一步保证上述本地训练数据集的私密性和安全性,上述本地训练数据集还可以存储于一区块链的节点中。It should be emphasized that, in order to further ensure the privacy and security of the above-mentioned local training data set, the above-mentioned local training data set may also be stored in a node of a blockchain.
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。This application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, small computers, large computers, including Distributed computing environment for any of the above systems or equipment, etc. This application may be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through computer-readable instructions, which can be stored in a computer-readable storage medium. When the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Among them, the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of the drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless explicitly stated in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least part of the steps in the flowchart of the drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the order of execution is also It is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
进一步参考图5,作为对上述图2所示方法的实现,本申请提供了一种仓储模型训练装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。With further reference to FIG. 5, as an implementation of the method shown in FIG. 2, this application provides an embodiment of a storage model training device. The device embodiment corresponds to the method embodiment shown in FIG. It can be applied to various electronic devices.
如图5所示,图5示出了本申请的仓储模型训练装置的一个实施例的结构示意图,本实施例所述的一种仓储模型训练装置包括:模型构建模块501、数据集生成模块502、本地训练模块503、联合训练模块504、模型验证模块505以及模型输出模块506。其中:As shown in Figure 5, Figure 5 shows a schematic structural diagram of an embodiment of the storage model training device of the present application. The storage model training device described in this embodiment includes: a model construction module 501 and a data set generation module 502 , A local training module 503, a joint training module 504, a model verification module 505, and a model output module 506. among them:
模型构建模块501,用于构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上;The model construction module 501 is used to construct a shared storage model and send the shared storage model to the node of the storage server;
数据集生成模块502,用于从仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;The data set generating module 502 is used to retrieve the historical data of the warehoused goods from the database of the warehouse server and generate a local training data set;
本地训练模块503,用于将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型;The local training module 503 is used to import the local training data set into the shared storage model, perform model training on the shared storage model, and obtain the local storage model;
联合训练模块504,用于接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型;The joint training module 504 is configured to receive the local storage model that has been trained, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;
模型验证模块505,用于将检测样本数据集输入到初始仓储模型进行模型检测,输出模型检测结果,其中,检测样本数据集存储于云端服务器的数据库内;The model verification module 505 is used to input the test sample data set to the initial storage model for model test, and output the model test result, where the test sample data set is stored in the database of the cloud server;
模型输出模块506,用于判断模型检测结果是否在存在于预设标准检测结果的范围内,当模型检测结果不在预设标准检测结果的范围内时,对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。The model output module 506 is used to determine whether the model check result is within the range of the preset standard check result. When the model check result is not within the preset standard check result range, iteratively update the initial storage model until the model check The result falls within the range of the preset standard test results, and the storage model is output.
进一步地,模型构建模块501具体包括:Further, the model construction module 501 specifically includes:
建模单元,用于获取仓储分类标识,根据仓储分类标识构建共享仓储模型,其中,共享仓储模型包括若干个共享仓储子模型,每一个共享仓储子模型均对应一种仓储分类标识;The modeling unit is used to obtain the storage classification identification and construct a shared storage model based on the storage classification identification. The shared storage model includes several shared storage sub-models, and each shared storage sub-model corresponds to a storage classification identification;
接收单元,用于接收仓储服务器的建模请求指令,建模请求指令携带有仓储服务器对应的仓储分类标识;The receiving unit is configured to receive a modeling request instruction from the storage server, and the modeling request instruction carries a storage classification identifier corresponding to the storage server;
发送单元,用于将与仓储分类标识相对应的共享仓储子模型发送到仓储服务器的节点上。The sending unit is used to send the shared storage sub-model corresponding to the storage classification identifier to the node of the storage server.
进一步地,共享仓储模型至少包括输入层、卷积层和输出层,本地训练模块503具体包括:Further, the shared storage model includes at least an input layer, a convolutional layer, and an output layer, and the local training module 503 specifically includes:
转换单元,用于将本地训练数据集导入共享仓储模型,通过输入层对本地训练数据集进行向量特征转换处理,得到目标数据;The conversion unit is used to import the local training data set into the shared storage model, and perform vector feature conversion processing on the local training data set through the input layer to obtain the target data;
特征数据提取单元,用于用卷积层对目标数据进行卷积计算,提取目标数据的特征数据;The feature data extraction unit is used to perform convolution calculation on the target data with the convolution layer, and extract the feature data of the target data;
适配单元,用于将特征数据导入到输出层中进行适配计算,输出适配结果;The adaptation unit is used to import the feature data into the output layer for adaptation calculation, and output the adaptation result;
本地迭代单元,用于根据适配结果对共享仓储模型进行迭代更新,得到本地仓储模型。The local iterative unit is used to iteratively update the shared storage model according to the adaptation result to obtain the local storage model.
进一步地,本地迭代单元具体包括:Further, the local iteration unit specifically includes:
适配拟合子单元,用于通过反向传播算法对适配结果与预设标准适配结果进行拟合,获取适配误差;The adaptation fitting subunit is used to fit the adaptation result to the preset standard adaptation result through the backpropagation algorithm to obtain the adaptation error;
适配误差比较子单元,用于将适配误差与预设适配误差阈值进行比较;The adaptation error comparison subunit is used to compare the adaptation error with a preset adaptation error threshold;
本地迭代子单元,用于当适配误差大于预设适配误差阈值时,对共享仓储模型进行迭代更新,直到适配误差小于等于预设适配误差阈值为止,得到本地仓储模型。The local iterative subunit is used to iteratively update the shared storage model when the adaptation error is greater than the preset adaptation error threshold until the adaptation error is less than or equal to the preset adaptation error threshold to obtain the local storage model.
进一步地,联合训练模块504具体包括:Further, the joint training module 504 specifically includes:
损失函数提取单元,用于提取多个已训练完成的本地仓储模型的损失函数;The loss function extraction unit is used to extract the loss functions of multiple trained local storage models;
加权聚合运算单元,用于对提取到的多个本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数;The weighted aggregation operation unit is used to perform weighted aggregation operation on the extracted loss functions of multiple local storage models to obtain the loss function of the storage model;
损失函数填入单元,用于将仓储模型的损失函数填入共享仓储模型,得到初始仓储模型。The loss function fill-in unit is used to fill the loss function of the storage model into the shared storage model to obtain the initial storage model.
进一步地,加权聚合运算单元具体用于通过以下公式对提取到的多个本地仓储模型的损失函数进行加权聚合运算:Further, the weighted aggregation operation unit is specifically configured to perform weighted aggregation operation on the extracted loss functions of multiple local storage models through the following formula:
其中,J(θ)为仓储模型的损失函数,ω
i为第i个本地仓储模型在仓储模型中的权重,h
θ(x
i)-y
i为第i个本地仓储模型的损失函数。
Among them, J(θ) is the loss function of the storage model, ω i is the weight of the i-th local storage model in the storage model, and h θ (x i )-y i is the loss function of the i-th local storage model.
进一步地,模型输出模块506具体包括:Further, the model output module 506 specifically includes:
检测误差拟合单元,用于通过反向传播算法对模型检测结果与预设标准检测结果进行拟合,获取检测误差;The detection error fitting unit is used to fit the model detection result with the preset standard detection result through the backpropagation algorithm to obtain the detection error;
检测误差比较单元,用于将检测误差与预设检测误差阈值进行比较;The detection error comparison unit is used to compare the detection error with a preset detection error threshold;
模型输出单元,用于当检测误差大于预设检测误差阈值时,对初始仓储模型进行迭代更新,直到检测误差小于或等于预设检测误差阈值为止,输出仓储模型。The model output unit is used to iteratively update the initial storage model when the detection error is greater than the preset detection error threshold, and output the storage model until the detection error is less than or equal to the preset detection error threshold.
本实施例公开了一种仓储模型训练装置,包括:模型构建模块501,用于构建共享仓储模型,并将共享仓储模型发送到仓储服务器的节点上;数据集生成模块502,用于从仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;本地训练模块503,用于将本地训练数据集导入到共享仓储模型,对共享仓储模型进行模型训练,得到本地仓储模型;联合训练模块504,用于接收已训练完成的本地仓储模型,并对接收到的本地仓储模型进行加权聚合运算,得到初始仓储模型;模型验证模块505,用于将检测样本数据集输入到初始仓储模型进行模型检测,输出模型检测结果,其中,检测样本数据集存储于云端服务器的数据库内;模型输出模块506,用于判断模型检测结果是否在存在于预设标准检测结果的范围内,当模型检测结果不在预设标准检测结果的范围内时,对初始仓储模型进行迭代更新,直到模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。本申请通过在云端服务器构建共享仓储模型,在仓储服务器训练本地仓储模型,然后将本地仓储模型进行聚合,形成初始仓储模型,通过检测样本数据集对初始仓储模型进行检测,当模型检测结果在预设标准检测结果的范围内时,输出符合标准仓储模型,本申请在仓储模型训练过程中,通过云端服务器将共享仓储模型发送到仓储服务器,在仓储服务器中进行模型训练,因此不需要将仓储服务器的训练数据集通过网络上传到云端服务器,极大程度地降低了网络传输的压力,保证了本地仓储货物数据的隐秘性和安全性。This embodiment discloses a storage model training device, which includes: a model construction module 501, used to construct a shared storage model, and send the shared storage model to a node of a storage server; a data set generation module 502, used to send data from the storage server Retrieve historical data of warehoused goods in the database and generate a local training data set; the local training module 503 is used to import the local training data set into the shared warehouse model, and perform model training on the shared warehouse model to obtain the local warehouse model; The training module 504 is used to receive the trained local storage model and perform weighted aggregation operations on the received local storage model to obtain the initial storage model; the model verification module 505 is used to input the test sample data set into the initial storage model Perform model testing and output the model testing results. The testing sample data set is stored in the database of the cloud server; the model output module 506 is used to determine whether the model testing results are within the range of the preset standard testing results. When the model testing When the result is not within the range of the preset standard detection result, the initial storage model is iteratively updated until the model detection result falls within the range of the preset standard detection result, and the storage model is output. This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model. The initial storage model is tested through the detection sample data set. When the standard detection result is within the range, the output conforms to the standard storage model. In this application, during the storage model training process, the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required The training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图6,图6为本实施例计算机设备基本结构框图。In order to solve the above technical problems, the embodiments of the present application also provide computer equipment. Please refer to FIG. 6 for details. FIG. 6 is a block diagram of the basic structure of the computer device in this embodiment.
所述计算机设备6包括通过系统总线相互通信连接存储器61、处理器62、网络接口63。需要指出的是,图中仅示出了具有组件61-63的计算机设备6,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that communicate with each other through a system bus. It should be pointed out that only the computer device 6 with components 61-63 is shown in the figure, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions. Its hardware includes, but is not limited to, a microprocessor, a dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机 交互。The computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
所述存储器61至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器61可以是所述计算机设备6的内部存储单元,例如该计算机设备6的硬盘或内存。在另一些实施例中,所述存储器61也可以是所述计算机设备6的外部存储设备,例如该计算机设备6上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器61还可以既包括所述计算机设备6的内部存储单元也包括其外部存储设备。本实施例中,所述存储器61通常用于存储安装于所述计算机设备6的操作系统和各类应用软件,例如仓储模型训练方法的计算机可读指令等。此外,所述存储器61还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 61 includes at least one type of readable storage medium, the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static memory Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart media card (SMC), a secure digital (Secure Digital, SD) card, Flash Card, etc. Of course, the memory 61 may also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store an operating system and various application software installed on the computer device 6, such as computer-readable instructions for a warehouse model training method. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or will be output.
所述处理器62在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器62通常用于控制所述计算机设备6的总体操作。本实施例中,所述处理器62用于运行所述存储器61中存储的计算机可读指令或者处理数据,例如运行所述仓储模型训练方法的计算机可读指令。In some embodiments, the processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to run computer-readable instructions or processed data stored in the memory 61, for example, computer-readable instructions for running the storage model training method.
所述网络接口63可包括无线网络接口或有线网络接口,该网络接口63通常用于在所述计算机设备6与其他电子设备之间建立通信连接。The network interface 63 may include a wireless network interface or a wired network interface, and the network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
本申请公开了一种仓储模型训练方法、装置、计算机设备及存储介质,涉及人工智能技术领域,应用于仓储模型的训练,所述仓储模型训练方法通过构建共享仓储模型,并将共享仓储模型发送到仓储服务器;通过仓储服务器的数据库中的本地训练数据集对共享仓储模型进行模型训练,得到本地仓储模型;然后通过聚合本地仓储模型,得到初始仓储模型;利用云端服务器的数据库中的检测样本数据集进行模型检测;并根据模型检测结果对初始仓储模型进行迭代更新,最后输出符合标准仓储模型。本申请通过在云端服务器构建共享仓储模型,在仓储服务器训练本地仓储模型,然后将本地仓储模型进行聚合,形成初始仓储模型,通过检测样本数据集对初始仓储模型进行检测,当模型检测结果在预设标准检测结果的范围内时,输出符合标准仓储模型,本申请在仓储模型训练过程中,通过云端服务器将共享仓储模型发送到仓储服务器,在仓储服务器中进行模型训练,因此不需要将仓储服务器的训练数据集通过网络上传到云端服务器,极大程度地降低了网络传输的压力,保证了本地仓储货物数据的隐秘性和安全性。The application discloses a storage model training method, device, computer equipment and storage medium, which relate to the field of artificial intelligence technology and are applied to the training of storage model. The storage model training method constructs a shared storage model and sends the shared storage model. Go to the warehouse server; train the shared warehouse model through the local training data set in the warehouse server database to obtain the local warehouse model; then aggregate the local warehouse models to obtain the initial warehouse model; use the test sample data in the cloud server database Iteratively update the initial warehousing model according to the model testing results, and finally output conforms to the standard warehousing model. This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model. The initial storage model is tested through the detection sample data set. When the standard detection result is within the range, the output conforms to the standard storage model. In this application, during the storage model training process, the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required The training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读存储介质可以是非易失性,也可以是易失性,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行如上述的仓储模型训练方法的步骤。This application also provides another implementation manner, that is, a computer-readable storage medium is provided with computer-readable instructions stored thereon, and the computer-readable storage medium may be non-volatile or It is volatile, and the computer-readable instructions can be executed by at least one processor, so that the at least one processor executes the steps of the storage model training method described above.
本申请公开了一种仓储模型训练方法、装置、计算机设备及存储介质,涉及人工智能技术领域,应用于仓储模型的训练,所述仓储模型训练方法通过构建共享仓储模型,并将共享仓储模型发送到仓储服务器;通过仓储服务器的数据库中的本地训练数据集对共享仓储模型进行模型训练,得到本地仓储模型;然后通过聚合本地仓储模型,得到初始仓储模型;利用云端服务器的数据库中的检测样本数据集进行模型检测;并根据模型检测结果对初始仓储模型进行迭代更新,最后输出符合标准仓储模型。本申请通过在云端服务器构建共享仓储模型,在仓储服务器训练本地仓储模型,然后将本地仓储模型进行聚合,形成初始仓储模型,通过检测样本数据集对初始仓储模型进行检测,当模型检测结果在预设标准检测结果的范围内时,输出符合标准仓储模型,本申请在仓储模型训练过程中,通过云端服务器将共享仓储模型发送到仓储服务器,在仓储服务器中进行模型训练,因此不需要将仓储服务器的训练数据集通过网络上传到云端服务器,极大程度地降低了网络传输的压力,保证了本地仓储货物数据的隐秘性和安全性。The application discloses a storage model training method, device, computer equipment and storage medium, which relate to the field of artificial intelligence technology and are applied to the training of storage model. The storage model training method constructs a shared storage model and sends the shared storage model. Go to the warehouse server; train the shared warehouse model through the local training data set in the warehouse server database to obtain the local warehouse model; then aggregate the local warehouse models to obtain the initial warehouse model; use the test sample data in the cloud server database Iteratively update the initial warehousing model according to the model testing results, and finally output conforms to the standard warehousing model. This application builds a shared storage model on a cloud server, trains a local storage model on the storage server, and then aggregates the local storage models to form an initial storage model. The initial storage model is tested through the detection sample data set. When the standard detection result is within the range, the output conforms to the standard storage model. In this application, during the storage model training process, the shared storage model is sent to the storage server through the cloud server, and the model training is performed in the storage server, so the storage server is not required The training data set is uploaded to the cloud server through the network, which greatly reduces the pressure of network transmission and ensures the privacy and security of local warehoused goods data.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可 借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.
显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The drawings show preferred embodiments of the present application, but do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these examples is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although this application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, it is still possible for those skilled in the art to modify the technical solutions described in each of the foregoing specific embodiments, or equivalently replace some of the technical features. . All equivalent structures made by using the contents of the description and drawings of this application, directly or indirectly used in other related technical fields, are similarly within the scope of patent protection of this application.
Claims (20)
- 一种仓储模型训练方法,包括:A storage model training method, including:构建共享仓储模型,并将所述共享仓储模型发送到仓储服务器的节点上;Construct a shared storage model, and send the shared storage model to the node of the storage server;从所述仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;Retrieve historical data of stored goods from the database of the storage server, and generate a local training data set;将所述本地训练数据集导入到所述共享仓储模型,对所述共享仓储模型进行模型训练,得到本地仓储模型;Importing the local training data set into the shared storage model, and performing model training on the shared storage model to obtain a local storage model;接收已训练完成的本地仓储模型,并对接收到的所述本地仓储模型进行加权聚合运算,得到初始仓储模型;Receiving a local storage model that has been trained, and performing a weighted aggregation operation on the received local storage model to obtain an initial storage model;将检测样本数据集输入到所述初始仓储模型进行模型检测,输出模型检测结果,其中,所述检测样本数据集存储于云端服务器的数据库内;Inputting the test sample data set to the initial storage model for model testing, and outputting the model test result, wherein the test sample data set is stored in the database of the cloud server;判断所述模型检测结果是否在存在于预设标准检测结果的范围内,若所述模型检测结果不在预设标准检测结果的范围内,则对所述初始仓储模型进行迭代更新,直到所述模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。It is determined whether the model detection result is within the range of the preset standard detection result, and if the model detection result is not within the range of the preset standard detection result, the initial storage model is iteratively updated until the model The test result falls within the range of the preset standard test result, and the storage model is output.
- 如权利要求1所述仓储模型训练方法,其中,所述构建共享仓储模型,并将所述共享仓储模型发送到仓储服务器的节点上,具体包括:The storage model training method according to claim 1, wherein said constructing a shared storage model and sending the shared storage model to a node of a storage server specifically includes:获取仓储分类标识,根据所述仓储分类标识构建共享仓储模型,其中,共享仓储模型包括若干个共享仓储子模型,每一个所述共享仓储子模型均对应一种仓储分类标识;Obtain a storage classification ID, and construct a shared storage model according to the storage classification ID, where the shared storage model includes several shared storage sub-models, and each of the shared storage sub-models corresponds to a storage classification ID;接收所述仓储服务器的建模请求指令,所述建模请求指令携带有仓储服务器对应的仓储分类标识;Receiving a modeling request instruction from the storage server, where the modeling request instruction carries a storage classification identifier corresponding to the storage server;将与所述仓储分类标识相对应的共享仓储子模型发送到仓储服务器的节点上。The shared storage sub-model corresponding to the storage classification identifier is sent to the node of the storage server.
- 如权利要求1所述仓储模型训练方法,其中,所述共享仓储模型至少包括输入层、卷积层和输出层,所述将所述本地训练数据集导入到所述共享仓储模型,对所述共享仓储模型进行模型训练,得到本地仓储模型,具体包括:The storage model training method of claim 1, wherein the shared storage model includes at least an input layer, a convolutional layer, and an output layer, and the local training data set is imported into the shared storage model, and the shared storage model The shared storage model performs model training to obtain the local storage model, which specifically includes:将所述本地训练数据集导入所述共享仓储模型,通过所述输入层对所述本地训练数据集进行向量特征转换处理,得到目标数据;Importing the local training data set into the shared storage model, and performing vector feature conversion processing on the local training data set through the input layer to obtain target data;采用所述卷积层对所述目标数据进行卷积计算,提取所述目标数据的特征数据;Performing convolution calculation on the target data by using the convolution layer, and extracting characteristic data of the target data;将所述特征数据导入到所述输出层中进行适配计算,输出适配结果;Importing the feature data into the output layer for adaptation calculation, and outputting the adaptation result;根据所述适配结果对所述共享仓储模型进行迭代更新,得到本地仓储模型。The shared storage model is iteratively updated according to the adaptation result to obtain a local storage model.
- 如权利要求3所述仓储模型训练方法,其中,在所述根据所述适配结果对所述共享仓储模型进行迭代更新,得到本地仓储模型,具体包括:5. The storage model training method according to claim 3, wherein the step of iteratively updating the shared storage model according to the adaptation result to obtain a local storage model specifically includes:通过反向传播算法对所述适配结果与预设标准适配结果进行拟合,获取适配误差;Fitting the adaptation result with the preset standard adaptation result through a backpropagation algorithm to obtain the adaptation error;将所述适配误差与预设适配误差阈值进行比较;Comparing the adaptation error with a preset adaptation error threshold;若所述适配误差大于预设适配误差阈值,则对所述共享仓储模型进行迭代更新,直到所述适配误差小于等于预设适配误差阈值为止,得到本地仓储模型。If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is updated iteratively until the adaptation error is less than or equal to the preset adaptation error threshold to obtain a local storage model.
- 如权利要求1所述仓储模型训练方法,其中,所述接收已训练完成的本地仓储模型,并对接收到的所述本地仓储模型进行加权聚合运算,得到初始仓储模型,具体包括:5. The storage model training method according to claim 1, wherein said receiving a local storage model that has been trained and performing a weighted aggregation operation on the received local storage model to obtain an initial storage model specifically includes:提取多个已训练完成的所述本地仓储模型的损失函数;Extracting a plurality of loss functions of the local storage model that have been trained;对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数;Performing a weighted aggregation operation on the extracted multiple loss functions of the local storage model to obtain the loss function of the storage model;将所述仓储模型的损失函数填入所述共享仓储模型,得到初始仓储模型。The loss function of the storage model is filled into the shared storage model to obtain an initial storage model.
- 如权利要求5所述仓储模型训练方法,其中,所述对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数,具体为:5. The storage model training method of claim 5, wherein the weighted aggregation operation is performed on the extracted loss functions of the multiple local storage models to obtain the loss function of the storage model, specifically:通过以下公式对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算:Perform a weighted aggregation operation on the extracted loss functions of the multiple local storage models using the following formula:其中,J(θ)为仓储模型的损失函数,ω i为第i个本地仓储模型在仓储模型中的权重, h θ(x i)-y i为第i个本地仓储模型的损失函数。 Among them, J(θ) is the loss function of the storage model, ω i is the weight of the i-th local storage model in the storage model, and h θ (x i )-y i is the loss function of the i-th local storage model.
- 如权利要求1所述仓储模型训练方法,其中,所述对所述初始仓储模型进行迭代更新,直到所述模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型,具体包括:5. The storage model training method according to claim 1, wherein said iteratively updating said initial storage model until said model detection result falls within the range of a preset standard detection result, outputting the storage model specifically comprises:通过反向传播算法对所述模型检测结果与预设标准检测结果进行拟合,获取检测误差;Fitting the model detection result with the preset standard detection result through a backpropagation algorithm to obtain a detection error;将所述检测误差与预设检测误差阈值进行比较;Comparing the detection error with a preset detection error threshold;若所述检测误差大于预设检测误差阈值,则对所述初始仓储模型进行迭代更新,直到所述检测误差小于或等于预设检测误差阈值为止,输出仓储模型。If the detection error is greater than the preset detection error threshold, the initial storage model is iteratively updated until the detection error is less than or equal to the preset detection error threshold, and the storage model is output.
- 一种仓储模型训练装置,包括:A storage model training device, including:模型构建模块,用于构建共享仓储模型,并将所述共享仓储模型发送到仓储服务器的节点上;The model building module is used to build a shared storage model, and send the shared storage model to the node of the storage server;数据集生成模块,用于从所述仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;A data set generation module, used to retrieve historical data of stored goods from the database of the storage server, and generate a local training data set;本地训练模块,用于将所述本地训练数据集导入到所述共享仓储模型,对所述共享仓储模型进行模型训练,得到本地仓储模型;A local training module, configured to import the local training data set into the shared storage model, and perform model training on the shared storage model to obtain a local storage model;联合训练模块,用于接收已训练完成的本地仓储模型,并对接收到的所述本地仓储模型进行加权聚合运算,得到初始仓储模型;The joint training module is used to receive the local storage model that has been trained, and perform a weighted aggregation operation on the received local storage model to obtain the initial storage model;模型验证模块,用于将检测样本数据集输入到所述初始仓储模型进行模型检测,输出模型检测结果,其中,所述检测样本数据集存储于云端服务器的数据库内;The model verification module is used to input the test sample data set into the initial storage model for model test, and output the model test result, wherein the test sample data set is stored in the database of the cloud server;模型输出模块,用于判断所述模型检测结果是否在存在于预设标准检测结果的范围内,当所述模型检测结果不在预设标准检测结果的范围内时,对所述初始仓储模型进行迭代更新,直到所述模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。The model output module is used to determine whether the model detection result is within the scope of the preset standard detection result, and when the model detection result is not within the scope of the preset standard detection result, iterate the initial storage model Update, until the model detection result falls within the range of the preset standard detection result, output the storage model.
- 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下所述的仓储模型训练方法的步骤:A computer device includes a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the following steps of the storage model training method are implemented:构建共享仓储模型,并将所述共享仓储模型发送到仓储服务器的节点上;Construct a shared storage model, and send the shared storage model to the node of the storage server;从所述仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;Retrieve historical data of stored goods from the database of the storage server, and generate a local training data set;将所述本地训练数据集导入到所述共享仓储模型,对所述共享仓储模型进行模型训练,得到本地仓储模型;Importing the local training data set into the shared storage model, and performing model training on the shared storage model to obtain a local storage model;接收已训练完成的本地仓储模型,并对接收到的所述本地仓储模型进行加权聚合运算,得到初始仓储模型;Receiving a local storage model that has been trained, and performing a weighted aggregation operation on the received local storage model to obtain an initial storage model;将检测样本数据集输入到所述初始仓储模型进行模型检测,输出模型检测结果,其中,所述检测样本数据集存储于云端服务器的数据库内;Inputting the test sample data set to the initial storage model for model testing, and outputting the model test result, wherein the test sample data set is stored in the database of the cloud server;判断所述模型检测结果是否在存在于预设标准检测结果的范围内,若所述模型检测结果不在预设标准检测结果的范围内,则对所述初始仓储模型进行迭代更新,直到所述模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。It is determined whether the model detection result is within the range of the preset standard detection result, and if the model detection result is not within the range of the preset standard detection result, the initial storage model is iteratively updated until the model The test result falls within the range of the preset standard test result, and the storage model is output.
- 如权利要求9所述计算机设备,其中,所述构建共享仓储模型,并将所述共享仓储模型发送到仓储服务器的节点上,具体包括:9. The computer device according to claim 9, wherein said constructing a shared storage model and sending said shared storage model to a node of a storage server specifically comprises:获取仓储分类标识,根据所述仓储分类标识构建共享仓储模型,其中,共享仓储模型包括若干个共享仓储子模型,每一个所述共享仓储子模型均对应一种仓储分类标识;Obtain a storage classification ID, and construct a shared storage model according to the storage classification ID, where the shared storage model includes several shared storage sub-models, and each of the shared storage sub-models corresponds to a storage classification ID;接收所述仓储服务器的建模请求指令,所述建模请求指令携带有仓储服务器对应的仓储分类标识;Receiving a modeling request instruction from the storage server, where the modeling request instruction carries a storage classification identifier corresponding to the storage server;将与所述仓储分类标识相对应的共享仓储子模型发送到仓储服务器的节点上。The shared storage sub-model corresponding to the storage classification identifier is sent to the node of the storage server.
- 如权利要求9所述计算机设备,其中,所述共享仓储模型至少包括输入层、卷积层和输出层,所述将所述本地训练数据集导入到所述共享仓储模型,对所述共享仓储模型进行模型训练,得到本地仓储模型,具体包括:The computer device according to claim 9, wherein the shared storage model includes at least an input layer, a convolutional layer, and an output layer, and the local training data set is imported into the shared storage model, and the shared storage model is The model is trained to obtain a local storage model, including:将所述本地训练数据集导入所述共享仓储模型,通过所述输入层对所述本地训练数据集进行向量特征转换处理,得到目标数据;Importing the local training data set into the shared storage model, and performing vector feature conversion processing on the local training data set through the input layer to obtain target data;采用所述卷积层对所述目标数据进行卷积计算,提取所述目标数据的特征数据;Performing convolution calculation on the target data by using the convolution layer, and extracting characteristic data of the target data;将所述特征数据导入到所述输出层中进行适配计算,输出适配结果;Import the feature data into the output layer for adaptation calculation, and output the adaptation result;根据所述适配结果对所述共享仓储模型进行迭代更新,得到本地仓储模型。The shared storage model is iteratively updated according to the adaptation result to obtain a local storage model.
- 如权利要求11所述计算机设备,其中,在所述根据所述适配结果对所述共享仓储模型进行迭代更新,得到本地仓储模型,具体包括:11. The computer device according to claim 11, wherein the step of iteratively updating the shared storage model according to the adaptation result to obtain a local storage model specifically includes:通过反向传播算法对所述适配结果与预设标准适配结果进行拟合,获取适配误差;Fitting the adaptation result with the preset standard adaptation result through a backpropagation algorithm to obtain the adaptation error;将所述适配误差与预设适配误差阈值进行比较;Comparing the adaptation error with a preset adaptation error threshold;若所述适配误差大于预设适配误差阈值,则对所述共享仓储模型进行迭代更新,直到所述适配误差小于等于预设适配误差阈值为止,得到本地仓储模型。If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is updated iteratively until the adaptation error is less than or equal to the preset adaptation error threshold to obtain a local storage model.
- 如权利要求9所述计算机设备,其中,所述接收已训练完成的本地仓储模型,并对接收到的所述本地仓储模型进行加权聚合运算,得到初始仓储模型,具体包括:9. The computer device according to claim 9, wherein said receiving the trained local storage model and performing a weighted aggregation operation on the received local storage model to obtain the initial storage model specifically includes:提取多个已训练完成的所述本地仓储模型的损失函数;Extracting a plurality of loss functions of the local storage model that have been trained;对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数;Performing a weighted aggregation operation on the extracted multiple loss functions of the local storage model to obtain the loss function of the storage model;将所述仓储模型的损失函数填入所述共享仓储模型,得到初始仓储模型。The loss function of the storage model is filled into the shared storage model to obtain an initial storage model.
- 如权利要求13所述计算机设备,其中,所述对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数,具体为:The computer device according to claim 13, wherein the weighted aggregation operation is performed on the extracted loss functions of the multiple local storage models to obtain the loss function of the storage model, specifically:通过以下公式对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算:Perform a weighted aggregation operation on the extracted loss functions of the multiple local storage models using the following formula:其中,J(θ)为仓储模型的损失函数,ω i为第i个本地仓储模型在仓储模型中的权重,h θ(x i)-y i为第i个本地仓储模型的损失函数。 Among them, J(θ) is the loss function of the storage model, ω i is the weight of the i-th local storage model in the storage model, and h θ (x i )-y i is the loss function of the i-th local storage model.
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下所述的仓储模型训练方法的步骤:A computer-readable storage medium having computer-readable instructions stored thereon, and when the computer-readable instructions are executed by a processor, the steps of the storage model training method described below are implemented:构建共享仓储模型,并将所述共享仓储模型发送到仓储服务器的节点上;Construct a shared storage model, and send the shared storage model to the node of the storage server;从所述仓储服务器的数据库内调取仓储货物的历史数据,并生成本地训练数据集;Retrieve historical data of stored goods from the database of the storage server, and generate a local training data set;将所述本地训练数据集导入到所述共享仓储模型,对所述共享仓储模型进行模型训练,得到本地仓储模型;Importing the local training data set into the shared storage model, and performing model training on the shared storage model to obtain a local storage model;接收已训练完成的本地仓储模型,并对接收到的所述本地仓储模型进行加权聚合运算,得到初始仓储模型;Receiving a local storage model that has been trained, and performing a weighted aggregation operation on the received local storage model to obtain an initial storage model;将检测样本数据集输入到所述初始仓储模型进行模型检测,输出模型检测结果,其中,所述检测样本数据集存储于云端服务器的数据库内;Inputting the test sample data set to the initial storage model for model testing, and outputting the model test result, wherein the test sample data set is stored in the database of the cloud server;判断所述模型检测结果是否在存在于预设标准检测结果的范围内,若所述模型检测结果不在预设标准检测结果的范围内,则对所述初始仓储模型进行迭代更新,直到所述模型检测结果落入预设标准检测结果的范围内为止,输出仓储模型。It is determined whether the model detection result is within the range of the preset standard detection result, and if the model detection result is not within the range of the preset standard detection result, the initial storage model is iteratively updated until the model The test result falls within the range of the preset standard test result, and the storage model is output.
- 如权利要求15所述计算机可读存储介质,其中,所述构建共享仓储模型,并将所述共享仓储模型发送到仓储服务器的节点上,具体包括:15. The computer-readable storage medium according to claim 15, wherein said constructing a shared storage model and sending the shared storage model to a node of a storage server specifically comprises:获取仓储分类标识,根据所述仓储分类标识构建共享仓储模型,其中,共享仓储模型包括若干个共享仓储子模型,每一个所述共享仓储子模型均对应一种仓储分类标识;Obtain a storage classification ID, and construct a shared storage model according to the storage classification ID, where the shared storage model includes several shared storage sub-models, and each of the shared storage sub-models corresponds to a storage classification ID;接收所述仓储服务器的建模请求指令,所述建模请求指令携带有仓储服务器对应的仓储分类标识;Receiving a modeling request instruction from the storage server, where the modeling request instruction carries a storage classification identifier corresponding to the storage server;将与所述仓储分类标识相对应的共享仓储子模型发送到仓储服务器的节点上。The shared storage sub-model corresponding to the storage classification identifier is sent to the node of the storage server.
- 如权利要求15所述计算机可读存储介质,其中,所述共享仓储模型至少包括输入层、卷积层和输出层,所述将所述本地训练数据集导入到所述共享仓储模型,对所述共享仓储模型进行模型训练,得到本地仓储模型,具体包括:The computer-readable storage medium according to claim 15, wherein the shared storage model includes at least an input layer, a convolutional layer, and an output layer, and the local training data set is imported into the shared storage model for all The shared storage model is used for model training to obtain the local storage model, which specifically includes:将所述本地训练数据集导入所述共享仓储模型,通过所述输入层对所述本地训练数据 集进行向量特征转换处理,得到目标数据;Importing the local training data set into the shared storage model, and performing vector feature conversion processing on the local training data set through the input layer to obtain target data;采用所述卷积层对所述目标数据进行卷积计算,提取所述目标数据的特征数据;Performing convolution calculation on the target data by using the convolution layer, and extracting characteristic data of the target data;将所述特征数据导入到所述输出层中进行适配计算,输出适配结果;Import the feature data into the output layer for adaptation calculation, and output the adaptation result;根据所述适配结果对所述共享仓储模型进行迭代更新,得到本地仓储模型。The shared storage model is iteratively updated according to the adaptation result to obtain a local storage model.
- 如权利要求17所述计算机可读存储介质,其中,在所述根据所述适配结果对所述共享仓储模型进行迭代更新,得到本地仓储模型,具体包括:17. The computer-readable storage medium according to claim 17, wherein the step of iteratively updating the shared storage model according to the adaptation result to obtain a local storage model specifically includes:通过反向传播算法对所述适配结果与预设标准适配结果进行拟合,获取适配误差;Fitting the adaptation result with the preset standard adaptation result through a backpropagation algorithm to obtain the adaptation error;将所述适配误差与预设适配误差阈值进行比较;Comparing the adaptation error with a preset adaptation error threshold;若所述适配误差大于预设适配误差阈值,则对所述共享仓储模型进行迭代更新,直到所述适配误差小于等于预设适配误差阈值为止,得到本地仓储模型。If the adaptation error is greater than the preset adaptation error threshold, the shared storage model is updated iteratively until the adaptation error is less than or equal to the preset adaptation error threshold to obtain a local storage model.
- 如权利要求15所述计算机可读存储介质,其中,所述接收已训练完成的本地仓储模型,并对接收到的所述本地仓储模型进行加权聚合运算,得到初始仓储模型,具体包括:15. The computer-readable storage medium according to claim 15, wherein said receiving the trained local storage model and performing a weighted aggregation operation on the received local storage model to obtain the initial storage model specifically includes:提取多个已训练完成的所述本地仓储模型的损失函数;Extracting a plurality of loss functions of the local storage model that have been trained;对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数;Performing a weighted aggregation operation on the extracted multiple loss functions of the local storage model to obtain the loss function of the storage model;将所述仓储模型的损失函数填入所述共享仓储模型,得到初始仓储模型。The loss function of the storage model is filled into the shared storage model to obtain an initial storage model.
- 如权利要求19所述计算机可读存储介质,其中,所述对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算,得到仓储模型的损失函数,具体为:19. The computer-readable storage medium of claim 19, wherein the weighted aggregation operation is performed on the extracted loss functions of the multiple local storage models to obtain the loss function of the storage model, specifically:通过以下公式对提取到的多个所述本地仓储模型的损失函数进行加权聚合运算:Perform a weighted aggregation operation on the extracted loss functions of the multiple local storage models using the following formula:其中,J(θ)为仓储模型的损失函数,ω i为第i个本地仓储模型在仓储模型中的权重,h θ(x i)-y i为第i个本地仓储模型的损失函数。 Among them, J(θ) is the loss function of the storage model, ω i is the weight of the i-th local storage model in the storage model, and h θ (x i )-y i is the loss function of the i-th local storage model.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010647255.2A CN111831675A (en) | 2020-07-07 | 2020-07-07 | Storage model training method and device, computer equipment and storage medium |
CN202010647255.2 | 2020-07-07 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021120677A1 true WO2021120677A1 (en) | 2021-06-24 |
Family
ID=72900405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/111429 WO2021120677A1 (en) | 2020-07-07 | 2020-08-26 | Warehousing model training method and device, computer device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111831675A (en) |
WO (1) | WO2021120677A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114011903A (en) * | 2021-11-01 | 2022-02-08 | 深圳市信润富联数字科技有限公司 | Stamping production abnormity monitoring method, device and system and readable storage medium |
CN114996317A (en) * | 2022-07-05 | 2022-09-02 | 中国电信股份有限公司 | Asynchronous optimization method and device based on longitudinal federal learning and storage medium |
CN115009755A (en) * | 2022-04-13 | 2022-09-06 | 北京京东振世信息技术有限公司 | Control method and device for storage system equipment |
CN117056133A (en) * | 2023-10-12 | 2023-11-14 | 杭州浩联智能科技有限公司 | Data backup method, device and medium based on distributed Internet of things architecture |
WO2024067358A1 (en) * | 2022-09-30 | 2024-04-04 | 深圳市库宝软件有限公司 | Efficiency analysis method and system for warehouse management system, and computer device |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113762862A (en) * | 2020-12-28 | 2021-12-07 | 京东城市(北京)数字科技有限公司 | Cargo abnormity monitoring method and device, electronic equipment and storage medium |
CN112733910B (en) * | 2020-12-30 | 2024-10-22 | 华为技术有限公司 | Method for acquiring placement position, method for training model and related equipment |
CN112936304B (en) * | 2021-02-02 | 2022-09-16 | 浙江大学 | Self-evolution type service robot system and learning method thereof |
CN113344587B (en) * | 2021-08-05 | 2022-04-05 | 北京轻松筹信息技术有限公司 | Data grade determining method and device, electronic equipment and storage medium |
CN115860641B (en) * | 2023-01-10 | 2023-07-21 | 广州宇浪软件科技有限公司 | Logistics storage management method and system based on information sharing |
CN117391585B (en) * | 2023-11-01 | 2024-09-27 | 深圳市正业玖坤信息技术有限公司 | Warehouse information management method and system of industrial Internet |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018093462A1 (en) * | 2016-11-21 | 2018-05-24 | Google Llc | Management and evaluation of machine-learned models based on locally logged data |
CN109754060A (en) * | 2017-11-06 | 2019-05-14 | 阿里巴巴集团控股有限公司 | A kind of training method and device of neural network machine learning model |
CN110399742A (en) * | 2019-07-29 | 2019-11-01 | 深圳前海微众银行股份有限公司 | A kind of training, prediction technique and the device of federation's transfer learning model |
CN110442457A (en) * | 2019-08-12 | 2019-11-12 | 北京大学深圳研究生院 | Model training method, device and server based on federation's study |
CN110751286A (en) * | 2018-07-23 | 2020-02-04 | 第四范式(北京)技术有限公司 | Training method and training system of neural network model |
CN111369042A (en) * | 2020-02-27 | 2020-07-03 | 山东大学 | Wireless service flow prediction method based on weighted federal learning |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10380498B1 (en) * | 2015-05-22 | 2019-08-13 | Amazon Technologies, Inc. | Platform services to enable one-click execution of the end-to-end sequence of modeling steps |
CN109840730B (en) * | 2017-11-29 | 2021-06-29 | 北京京东尚科信息技术有限公司 | Method and device for data prediction |
CN108873697A (en) * | 2018-06-23 | 2018-11-23 | 四川工大创兴大数据有限公司 | A kind of storage method and system based on artificial intelligence |
TWI684145B (en) * | 2018-08-31 | 2020-02-01 | 財團法人工業技術研究院 | A system for configuring storage spaces of warehouse |
CN110532978A (en) * | 2019-09-03 | 2019-12-03 | 北京百度网讯科技有限公司 | Storage management method, device, equipment and storage medium |
CN111027715B (en) * | 2019-12-11 | 2021-04-02 | 支付宝(杭州)信息技术有限公司 | Monte Carlo-based federated learning model training method and device |
-
2020
- 2020-07-07 CN CN202010647255.2A patent/CN111831675A/en active Pending
- 2020-08-26 WO PCT/CN2020/111429 patent/WO2021120677A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018093462A1 (en) * | 2016-11-21 | 2018-05-24 | Google Llc | Management and evaluation of machine-learned models based on locally logged data |
CN109754060A (en) * | 2017-11-06 | 2019-05-14 | 阿里巴巴集团控股有限公司 | A kind of training method and device of neural network machine learning model |
CN110751286A (en) * | 2018-07-23 | 2020-02-04 | 第四范式(北京)技术有限公司 | Training method and training system of neural network model |
CN110399742A (en) * | 2019-07-29 | 2019-11-01 | 深圳前海微众银行股份有限公司 | A kind of training, prediction technique and the device of federation's transfer learning model |
CN110442457A (en) * | 2019-08-12 | 2019-11-12 | 北京大学深圳研究生院 | Model training method, device and server based on federation's study |
CN111369042A (en) * | 2020-02-27 | 2020-07-03 | 山东大学 | Wireless service flow prediction method based on weighted federal learning |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114011903A (en) * | 2021-11-01 | 2022-02-08 | 深圳市信润富联数字科技有限公司 | Stamping production abnormity monitoring method, device and system and readable storage medium |
CN115009755A (en) * | 2022-04-13 | 2022-09-06 | 北京京东振世信息技术有限公司 | Control method and device for storage system equipment |
CN115009755B (en) * | 2022-04-13 | 2024-04-05 | 北京京东振世信息技术有限公司 | Control method and device for warehouse system equipment |
CN114996317A (en) * | 2022-07-05 | 2022-09-02 | 中国电信股份有限公司 | Asynchronous optimization method and device based on longitudinal federal learning and storage medium |
CN114996317B (en) * | 2022-07-05 | 2024-02-23 | 中国电信股份有限公司 | Asynchronous optimization method and device based on longitudinal federal learning and storage medium |
WO2024067358A1 (en) * | 2022-09-30 | 2024-04-04 | 深圳市库宝软件有限公司 | Efficiency analysis method and system for warehouse management system, and computer device |
CN117056133A (en) * | 2023-10-12 | 2023-11-14 | 杭州浩联智能科技有限公司 | Data backup method, device and medium based on distributed Internet of things architecture |
CN117056133B (en) * | 2023-10-12 | 2024-02-06 | 杭州浩联智能科技有限公司 | Data backup method, device and medium based on distributed Internet of things architecture |
Also Published As
Publication number | Publication date |
---|---|
CN111831675A (en) | 2020-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021120677A1 (en) | Warehousing model training method and device, computer device and storage medium | |
US9807473B2 (en) | Jointly modeling embedding and translation to bridge video and language | |
WO2021155713A1 (en) | Weight grafting model fusion-based facial recognition method, and related device | |
WO2022105117A1 (en) | Method and device for image quality assessment, computer device, and storage medium | |
CN112148987A (en) | Message pushing method based on target object activity and related equipment | |
WO2021174877A1 (en) | Processing method for smart decision-based target detection model, and related device | |
WO2022083093A1 (en) | Probability calculation method and apparatus in graph, computer device and storage medium | |
CN112766649B (en) | Target object evaluation method based on multi-scoring card fusion and related equipment thereof | |
CN112863683A (en) | Medical record quality control method and device based on artificial intelligence, computer equipment and storage medium | |
CN112995414B (en) | Behavior quality inspection method, device, equipment and storage medium based on voice call | |
WO2023071105A1 (en) | Method and apparatus for analyzing feature variable, computer device, and storage medium | |
CN112633973A (en) | Commodity recommendation method and related equipment thereof | |
CN112861662B (en) | Target object behavior prediction method based on face and interactive text and related equipment | |
CN112925911B (en) | Complaint classification method based on multi-modal data and related equipment thereof | |
CN113420212A (en) | Deep feature learning-based recommendation method, device, equipment and storage medium | |
CN110866637B (en) | Scoring prediction method, scoring prediction device, computer equipment and storage medium | |
CN116684330A (en) | Traffic prediction method, device, equipment and storage medium based on artificial intelligence | |
CN115510186A (en) | Instant question and answer method, device, equipment and storage medium based on intention recognition | |
WO2021000411A1 (en) | Neural network-based document classification method and apparatus, and device and storage medium | |
US20220318639A1 (en) | Training individually fair machine learning algorithms via distributionally robust optimization | |
CN117235257A (en) | Emotion prediction method, device, equipment and storage medium based on artificial intelligence | |
CN116776150A (en) | Interface abnormal access identification method and device, computer equipment and storage medium | |
CN115099875A (en) | Data classification method based on decision tree model and related equipment | |
CN115392361A (en) | Intelligent sorting method and device, computer equipment and storage medium | |
US11934384B1 (en) | Systems and methods for providing a nearest neighbors classification pipeline with automated dimensionality reduction |
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: 20902447 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20902447 Country of ref document: EP Kind code of ref document: A1 |