Data preprocessing method and device, computer equipment and storage medium
By calculating mean and variance and standardizing the neural network data, the problem of neural network sensitivity to initial weights is solved, and the training efficiency and convergence speed are improved.
Patent Information
- Application Number
- CN202411239861.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-03
AI Technical Summary
Neural networks are sensitive to the initial weight value during training, which may lead to gradient disappearance or gradient explosion, affecting the training efficiency and convergence of loss functions.
By dividing the data to be processed, the data mean and variance are calculated, and standardized processing is performed based on standardized parameters, the sensitivity to initialized parameters is reduced, and the output of the intermediate layer is stabilized, thereby accelerating the convergence speed and improving the learning rate.
Through standardized processing, the output distribution of the intermediate layer during the training process remains stable, reducing the sensitivity to initialization parameters and improving the training efficiency of the neural network.
Smart Images

Figure CN119066343A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of neural networks, and in particular to a data preprocessing method, device, computer equipment and storage medium. Background Art
[0002] In the training process of the neural network, the initial weight value needs to be set in advance, and the setting of the initial weight value is very important. If the initial weight value is set unreasonably, it may cause the gradient to vanish or explode, that is, the derivative of the activation function is very small or very large, which will cause the gradient to decrease rapidly (gradient vanishing) or increase (gradient explosion) during the back propagation process, making it difficult for the network to learn; unreasonable initial weight values may also cause the loss function value to fluctuate greatly during the training process, making it difficult to converge to a stable minimum value. Therefore, in order to improve the training efficiency of the neural network, a data preprocessing method that can reduce the sensitivity of the neural network to the initial weight value is urgently needed. Summary of the invention
[0003] The main purpose of this application is to provide a data preprocessing method, device, equipment and computer storage medium, aiming to improve the efficiency of neural network training.
[0004] In a first aspect, the present application provides a data preprocessing method, the data preprocessing method comprising the following steps:
[0005] Acquire the data to be processed, and divide the data to be processed to obtain multiple target batches of sub-data to be processed;
[0006] Calculate the data mean and data variance for each target batch of sub-data to be processed;
[0007] Based on preset standardization parameters, the to-be-processed sub-data of the target batch are standardized according to the data mean and the data variance to obtain target data corresponding to the to-be-processed data;
[0008] The target data is input into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed.
[0009] In a second aspect, the present application further provides a data preprocessing device, the data preprocessing device comprising:
[0010] A data acquisition module is used to acquire the data to be processed and divide the data to be processed to obtain multiple target batches of sub-data to be processed;
[0011] A feature calculation module is used to calculate the data mean and data variance for each target batch of sub-data to be processed;
[0012] A data standardization module, configured to perform standardization processing on the to-be-processed sub-data of the target batch based on preset standardization parameters, according to the data mean and the data variance, to obtain target data corresponding to the to-be-processed data;
[0013] The data processing module is used to input the target data into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed.
[0014] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the data preprocessing method as described above is implemented.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the data preprocessing method as described above is implemented.
[0016] The present application provides a data preprocessing method, device, equipment and computer storage medium. The present application obtains the data to be processed and divides the data to be processed to obtain multiple target batches of sub-data to be processed; respectively calculates the data mean and data variance for each target batch of sub-data to be processed; based on the preset standardization parameters, the sub-data to be processed of the target batch are standardized according to the data mean and the data variance to obtain the target data corresponding to the data to be processed; the target data is input into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed. By standardizing the data of each batch, the distribution of the output of the intermediate layer during the training process remains relatively stable, thereby accelerating the convergence speed, reducing the sensitivity to the initialization parameters, and allowing the use of a higher learning rate to improve the training efficiency of the neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A flowchart of a data preprocessing method provided in one embodiment of the present application;
[0019] Figure 2 A usage scenario diagram of a data preprocessing method provided in one embodiment of the present application;
[0020] Figure 3 A schematic block diagram of a data preprocessing device provided in one embodiment of the present application;
[0021] Figure 4 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0024] Embodiments of the present application provide a data preprocessing method, apparatus, computer equipment, and computer-readable storage medium.
[0025] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0026] Please refer to Figure 1 , Figure 1 A flow chart of a data preprocessing method provided for an embodiment of the present application. The data preprocessing method can be used in a terminal or a server to implement... Among them, the terminal can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device; the server can be an independent server, or a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0027] Please refer to Figure 2 , Figure 2 This is a usage scenario diagram provided by an embodiment of the present application. Figure 2As shown, the target screenshot obtained during the execution of the operation script can be obtained by the server from the terminal device, and the test report can be stored in the server or the terminal device, which is not limited here.
[0028] like Figure 1 As shown, the data preprocessing method includes steps S101 to S104.
[0029] Step S101: Acquire data to be processed, and divide the data to be processed to obtain multiple target batches of sub-data to be processed.
[0030] Exemplarily, the data preprocessing provided in the embodiment of the present application divides the data to be processed into multiple smaller target batches, thereby achieving parallel processing of the sub-data to be processed of these target batches, effectively utilizing memory resources, and thus improving computing efficiency.
[0031] In some implementations, the acquiring of the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed includes:
[0032] Get the preset data batch size;
[0033] Data is randomly extracted from the data to be processed according to the data batch size to obtain multiple target batches of sub-data to be processed.
[0034] For example, in the process of data preprocessing, choosing an appropriate batch size is key. Smaller batches may lead to increased noise during training, while larger batches can provide more stable statistical estimates, but may increase memory usage and may reduce training flexibility. Specifically, the batch size can be selected between 32-128 according to actual conditions, for example, the batch size is set to 32, 64, and 128. Batch sizes within this range can provide more stable mean and variance estimates, thereby reducing training instability caused by estimation errors, helping the model learn more robust feature representations, and ensuring that the model is neither too noisy due to too small a batch, nor lacking generalization capabilities due to too large a batch.
[0035] For example, randomly extracting data helps the model learn the general characteristics of the data instead of just remembering specific samples in the training set, thereby reducing overfitting and improving model robustness.
[0036] Exemplarily, when the amount of data to be processed cannot be divided by the batch size, the incomplete data in the last batch is discarded to avoid introducing unnecessary noise and causing inaccurate estimation.
[0037] In some implementations, the method further includes, before obtaining the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed:
[0038] Obtaining input data, and multiplying the input data with a preset weight matrix to obtain weighted data corresponding to the input data;
[0039] The weighted data is added to a preset bias vector to obtain the data to be processed.
[0040] Exemplarily, before preprocessing the data to be processed, the data to be processed is obtained by forward propagating the input data in the neural network. Specifically, the input data is multiplied by the weight matrix, and then the bias vector is added to extract the features of the input data, and the input data is converted to a new feature space to prepare for the subsequent nonlinear activation function.
[0041] Step S102: Calculate the data mean and data variance for each target batch of sub-data to be processed.
[0042] Exemplarily, directly calculating the mean and variance of the complete data to be processed may lead to large estimation errors in some cases. The data preprocessing method provided in the embodiment of the present application divides the data to be processed into target batches of sub-data to be processed, and each target batch has a small amount of data, so that the mean and variance of the data are updated more frequently, thereby reducing the estimation error.
[0043] Step S103: Based on preset standardization parameters, the to-be-processed sub-data of the target batch are standardized according to the data mean and the data variance to obtain target data corresponding to the to-be-processed data.
[0044] Exemplarily, the distribution of the sub-data to be processed is adjusted to a standard normal distribution through standardization processing, thereby reducing the internal covariate shift of the sub-data to be processed, making the distribution of the sub-data to be processed more stable, thereby reducing the scale difference of activation values between different layers of the neural network, and helping to accelerate the convergence speed of the gradient descent algorithm.
[0045] In some embodiments, the standardization process is performed on the to-be-processed sub-data of the target batch based on the preset standardization parameters according to the data mean and the data variance to obtain the target data corresponding to the to-be-processed data, including:
[0046] Calculating a target difference between each of the sub-data to be processed and the data mean, and determining a normalized value according to a ratio of the target difference to the data variance;
[0047] The target data corresponding to the sub-data to be processed is determined according to the standardized value and the preset scaling parameter and offset parameter.
[0048] In some implementations, determining a standardized value based on a ratio of the target difference to the data variance comprises:
[0049] The normalization value is determined according to a ratio of the target difference value to a target product of the data variance and a preset compression ratio parameter.
[0050] In some implementations, determining the target data corresponding to the sub-data to be processed according to the standardized value and the preset scaling parameter and offset parameter includes:
[0051] Determine the target data corresponding to the sub-data to be processed according to BN(x)=γ*z / (T+α*σ)+β;
[0052] Among them, x is the sub-data to be processed, BN(x) is the target data corresponding to the sub-data to be processed, z is the standardized value, T is the preset temperature parameter, α is the temperature coefficient of the temperature parameter, γ is the preset offset parameter, β is the preset offset parameter, and σ is the data standard deviation of the target sub-data.
[0053] Step S104: input the target data into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed.
[0054] In some embodiments, inputting the target data into a preset processing function so that the processing function performs excitation processing on corresponding neurons according to the data to be processed includes:
[0055] The target data is input into a preset activation function, so that the activation function determines whether to activate the neuron according to the target data.
[0056] In some embodiments, the method further comprises:
[0057] Determine the global mean value corresponding to the data to be processed according to the data mean values corresponding to each of the sub-data to be processed;
[0058] Performing moving average processing on the data variance corresponding to each of the sub-data to be processed to determine the moving mean variance corresponding to the data to be processed;
[0059] The input test data is standardized according to the global mean and the moving mean variance.
[0060] The data preprocessing method provided in the above embodiment obtains the data to be processed and divides the data to be processed to obtain multiple target batches of sub-data to be processed; respectively calculates the data mean and data variance for each target batch of sub-data to be processed; based on the preset standardization parameters, the sub-data to be processed of the target batch are standardized according to the data mean and the data variance to obtain the target data corresponding to the data to be processed; the target data is input into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed. By standardizing the data of each batch, the distribution of the output of the intermediate layer during the training process remains relatively stable, thereby accelerating the convergence speed, reducing the sensitivity to the initialization parameters, and allowing the use of a higher learning rate, thereby improving the training efficiency of the neural network.
[0061] See also Figure 3 , Figure 3 It is a schematic diagram of a data preprocessing device provided in an embodiment of the present application. The data preprocessing device can be configured in a server or a terminal to execute the aforementioned data preprocessing method.
[0062] like Figure 3 As shown, the data preprocessing device includes: a data acquisition module 110, a feature calculation module 120, a data standardization module 130, and a data processing module 140.
[0063] The data acquisition module 110 is used to acquire the data to be processed and divide the data to be processed to obtain multiple target batches of sub-data to be processed;
[0064] A feature calculation module 120 is used to calculate the data mean and data variance for each target batch of sub-data to be processed;
[0065] A data standardization module 130 is used to perform standardization processing on the to-be-processed sub-data of the target batch based on preset standardization parameters, according to the data mean and the data variance, to obtain target data corresponding to the to-be-processed data;
[0066] The data processing module 140 is used to input the target data into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed.
[0067] In some implementations, the data acquisition module 110, in the process of acquiring the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed, is used to implement:
[0068] Get the preset data batch size;
[0069] Data is randomly extracted from the data to be processed according to the data batch size to obtain multiple target batches of sub-data to be processed.
[0070] In some embodiments, the data standardization module 130 performs standardization processing on the target batch of sub-data to be processed based on the preset standardization parameters according to the data mean and the data variance to obtain the target data corresponding to the data to be processed, and is used to achieve:
[0071] Calculating a target difference between each of the sub-data to be processed and the data mean, and determining a normalized value according to a ratio of the target difference to the data variance;
[0072] The target data corresponding to the sub-data to be processed is determined according to the standardized value and the preset scaling parameter and offset parameter.
[0073] In some implementations, the data standardization module 130, during the process of determining the standardized value according to the ratio of the target difference value to the data variance, is configured to implement:
[0074] The normalization value is determined according to a ratio of the target difference value to a target product of the data variance and a preset compression ratio parameter.
[0075] In some implementations, the data standardization module 130, in the process of determining the target data corresponding to the sub-data to be processed according to the standardized value and the preset scaling parameter and offset parameter, is used to implement:
[0076] Determine the target data corresponding to the sub-data to be processed according to BN(x)=γ*z / (T+α*σ)+β;
[0077] Among them, x is the sub-data to be processed, BN(x) is the target data corresponding to the sub-data to be processed, z is the standardized value, T is the preset temperature parameter, α is the temperature coefficient of the temperature parameter, γ is the preset offset parameter, β is the preset offset parameter, and σ is the data standard deviation of the target sub-data.
[0078] In some implementations, the data preprocessing device, during the execution of the data preprocessing method, is used to implement:
[0079] Determine the global mean value corresponding to the data to be processed according to the data mean values corresponding to each of the sub-data to be processed;
[0080] Performing moving average processing on the data variance corresponding to each of the sub-data to be processed to determine the moving mean variance corresponding to the data to be processed;
[0081] The input test data is standardized according to the global mean and the moving mean variance.
[0082] In some embodiments, the data processing module 140, in the process of inputting the target data into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed, is used to implement:
[0083] Inputting the target data into a preset activation function so that the activation function determines whether to activate the neuron according to the target data;
[0084] In some implementations, before executing the steps of acquiring the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed, the data acquisition module 110 is further configured to implement:
[0085] Obtaining input data, and multiplying the input data with a preset weight matrix to obtain weighted data corresponding to the input data;
[0086] The weighted data is added to a preset bias vector to obtain the data to be processed.
[0087] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0088] The method and apparatus of the present application can be used in many general or special computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which 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.
[0089] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in Figure 4 Runs on the computer device shown.
[0090] See also Figure 4 , Figure 4 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.
[0091] like Figure 4 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.
[0092] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any data preprocessing method.
[0093] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0094] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any data preprocessing method.
[0095] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0097] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0098] Acquire the data to be processed, and divide the data to be processed to obtain multiple target batches of sub-data to be processed;
[0099] Calculate the data mean and data variance for each target batch of sub-data to be processed;
[0100] Based on preset standardization parameters, the to-be-processed sub-data of the target batch are standardized according to the data mean and the data variance to obtain target data corresponding to the to-be-processed data;
[0101] The target data is input into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed.
[0102] In one embodiment, the processor is used to implement the following steps in the process of obtaining the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed:
[0103] Get the preset data batch size;
[0104] Data is randomly extracted from the data to be processed according to the data batch size to obtain multiple target batches of sub-data to be processed.
[0105] In one embodiment, the processor is used to implement the following steps in the process of performing standardization processing on the to-be-processed sub-data of the target batch based on the preset standardization parameters according to the data mean and the data variance to obtain the target data corresponding to the to-be-processed data:
[0106] Calculating a target difference between each of the sub-data to be processed and the data mean, and determining a normalized value according to a ratio of the target difference to the data variance;
[0107] The target data corresponding to the sub-data to be processed is determined according to the standardized value and the preset scaling parameter and offset parameter.
[0108] In one embodiment, the processor, in the process of determining the normalized value according to the ratio of the target difference value to the data variance, is configured to implement the following steps:
[0109] The normalization value is determined according to a ratio of the target difference value to a target product of the data variance and a preset compression ratio parameter.
[0110] In one embodiment, the processor, in the process of determining the target data corresponding to the sub-data to be processed according to the standardized value and the preset scaling parameter and offset parameter, is used to implement the following steps:
[0111] Determine the target data corresponding to the sub-data to be processed according to BN(x)=γ*z / (T+α*σ)+β;
[0112] Among them, x is the sub-data to be processed, BN(x) is the target data corresponding to the sub-data to be processed, z is the standardized value, T is the preset temperature parameter, α is the temperature coefficient of the temperature parameter, γ is the preset offset parameter, β is the preset offset parameter, and σ is the data standard deviation of the target sub-data.
[0113] In one embodiment, the processor is used to implement the following steps in the process of implementing the data preprocessing method:
[0114] Determine the global mean value corresponding to the data to be processed according to the data mean values corresponding to each of the sub-data to be processed;
[0115] Performing moving average processing on the data variance corresponding to each of the sub-data to be processed to determine the moving mean variance corresponding to the data to be processed;
[0116] The input test data is standardized according to the global mean and the moving mean variance.
[0117] In one embodiment, the processor is used to implement the following steps in the process of inputting the target data into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed:
[0118] Inputting the target data into a preset activation function so that the activation function determines whether to activate the neuron according to the target data;
[0119] In one embodiment, before obtaining the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed, the processor is further configured to implement the following steps:
[0120] Obtaining input data, and multiplying the input data with a preset weight matrix to obtain weighted data corresponding to the input data;
[0121] The weighted data is added to a preset bias vector to obtain the data to be processed.
[0122] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the data preprocessing described above can refer to the corresponding process in the aforementioned data preprocessing control method embodiment, and will not be repeated here.
[0123] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the data preprocessing method of the present application.
[0124] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0125] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0126] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0127] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data preprocessing method, It is characterized in that The method comprises: Acquire the data to be processed, and divide the data to be processed to obtain multiple target batches of sub-data to be processed; Calculate the data mean and data variance for each target batch of sub-data to be processed; Based on preset standardization parameters, the to-be-processed sub-data of the target batch are standardized according to the data mean and the data variance to obtain target data corresponding to the to-be-processed data; The target data is input into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed.
2. The data preprocessing method according to claim 1, It is characterized in that The step of obtaining the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed includes: Get the preset data batch size; Data is randomly extracted from the data to be processed according to the data batch size to obtain multiple target batches of sub-data to be processed.
3. The data preprocessing method according to claim 1, It is characterized in that The step of performing standardization processing on the to-be-processed sub-data of the target batch based on the preset standardization parameters and according to the data mean and the data variance to obtain target data corresponding to the to-be-processed data includes: Calculating a target difference between each of the sub-data to be processed and the data mean, and determining a normalized value according to a ratio of the target difference to the data variance; The target data corresponding to the sub-data to be processed is determined according to the standardized value and the preset scaling parameter and offset parameter.
4. The data preprocessing method according to claim 3, It is characterized in that The determining of the standardized value according to the ratio of the target difference value to the data variance includes: The normalization value is determined according to a ratio of the target difference value to a target product of the data variance and a preset compression ratio parameter.
5. The data preprocessing method according to claim 3, It is characterized in that Determining the target data corresponding to the sub-data to be processed according to the standardized value and the preset scaling parameter and offset parameter includes: Determine the target data corresponding to the sub-data to be processed according to BN(x)=γ*z / (T+α*σ)+β; Among them, x is the sub-data to be processed, BN(x) is the target data corresponding to the sub-data to be processed, z is the standardized value, T is the preset temperature parameter, α is the temperature coefficient of the temperature parameter, γ is the preset offset parameter, β is the preset offset parameter, and σ is the data standard deviation of the target sub-data.
6. The data preprocessing method according to claim 5, It is characterized in that The method further comprises: Determine the global mean value corresponding to the data to be processed according to the data mean values corresponding to each of the sub-data to be processed; Performing moving average processing on the data variance corresponding to each of the sub-data to be processed to determine the moving mean variance corresponding to the data to be processed; The input test data is standardized according to the global mean and the moving mean variance.
7. The data preprocessing method according to any one of claims 1 to 6, It is characterized in that The step of inputting the target data into a preset processing function so that the processing function excites corresponding neurons according to the data to be processed includes: Inputting the target data into a preset activation function so that the activation function determines whether to activate the neuron according to the target data; The method further includes, before obtaining the data to be processed and dividing the data to be processed to obtain multiple target batches of sub-data to be processed: Obtaining input data, and multiplying the input data with a preset weight matrix to obtain weighted data corresponding to the input data; The weighted data is added to a preset bias vector to obtain the data to be processed.
8. A data preprocessing device, It is characterized in that The data preprocessing device comprises: A data acquisition module is used to acquire the data to be processed and divide the data to be processed to obtain multiple target batches of sub-data to be processed; A feature calculation module is used to calculate the data mean and data variance for each target batch of sub-data to be processed; A data standardization module, configured to perform standardization processing on the to-be-processed sub-data of the target batch based on preset standardization parameters, according to the data mean and the data variance, to obtain target data corresponding to the to-be-processed data; The data processing module is used to input the target data into a preset processing function so that the processing function excites the corresponding neurons according to the data to be processed.
9. A computer device, It is characterized in that The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the data preprocessing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the data preprocessing method according to any one of claims 1 to 7 are implemented.
