Object category determination method and device, equipment, medium and program product
Data expansion and feature optimization are performed through the generative adversarial network of quantum state element learning, which solves the problems of low data expansion efficiency and limited improvement in model performance in the prior art, and improves classification accuracy and model adaptability in financial data analysis.
Patent Information
- Application Number
- CN202411134036.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-26
Smart Images

Figure CN119025968A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an object category determination method, device, equipment, medium and program product. Background Art
[0002] When financial institutions make decisions through data analysis, they need to determine the category of the decision-making object and determine whether it poses risks. Category determination mainly relies on historical data and statistical models, but the amount of historical data is usually limited or the data is unbalanced. Therefore, data expansion is required to facilitate model training and improve model performance.
[0003] In the existing technology, data augmentation usually relies on simple techniques such as rotation and flipping.
[0004] However, with this existing method, the expanded data is relatively simple, the data expansion efficiency is limited, the data expansion effect is poor, and it cannot effectively improve the performance of the model, resulting in a low accuracy rate in the final category determination. Summary of the invention
[0005] The present application provides an object category determination method for solving the problem that the existing data expansion effect is poor, the model performance improvement is limited, and the object category determination accuracy is not high.
[0006] In a first aspect, an embodiment of the present application provides a method for determining an object category, comprising:
[0007] Obtaining sample data of an object to be classified, a trained feature extraction model, a trained feature dimension reduction model, and a trained classifier model, wherein the feature extraction model is obtained by training based on an expanded training data set, and the expanded training data set is obtained by performing data expansion on the training data before expansion using a generative adversarial network based on quantum state meta-learning;
[0008] Based on the sample data and the feature extraction model, obtaining a first new sample after feature extraction;
[0009] Based on the first new sample and the feature dimension reduction model, obtaining a second new sample after feature dimension reduction;
[0010] Based on the second new sample and the classifier model, a classification result is obtained as the category of the object to be classified.
[0011] In a second aspect, an embodiment of the present application provides an object category determination device, including:
[0012] A model acquisition module, used to acquire sample data of the object to be classified, a feature extraction model after training, a feature dimension reduction model after training, and a classifier model after training, wherein the feature extraction model is obtained by training based on an expanded training data set, and the expanded training data set is obtained by data expansion of the training data before expansion based on a generative adversarial network based on quantum state meta-learning;
[0013] A feature extraction module, used for acquiring a first new sample after feature extraction based on the sample data and the feature extraction model;
[0014] A feature dimension reduction module, used for obtaining a second new sample after feature dimension reduction based on the first new sample and the feature dimension reduction model;
[0015] A classification module is used to obtain a classification result based on the second new sample and the classifier model as the category of the object to be classified.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method as described above.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement the above-mentioned method when executed by a processor.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0019] The object category determination method, apparatus, device, medium and program product provided in the embodiments of the present application can achieve efficient data expansion through a generative adversarial network based on quantum state meta-learning, so that the model can learn more complex data features on a limited data set and improve classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] Figure 1 A schematic diagram of a scene for determining an object category provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of a flow chart of a method for determining an object category provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the model training process provided in the embodiment of the present application;
[0024] Figure 4 A training flow chart of a generative adversarial network algorithm based on quantum state meta-learning provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of the feature extraction model training process provided in an embodiment of the present application;
[0026] Figure 6 This is the overall flow chart of the feature extraction model training process for this application;
[0027] Figure 7 A schematic diagram of the feature dimensionality reduction model training process provided in an embodiment of the present application;
[0028] Figure 8 This is the overall flow chart of the feature dimensionality reduction model training process for this application;
[0029] Fig. 9 A schematic diagram of the classifier model training process provided in the embodiment of the present application;
[0030] Fig.10 A schematic diagram of the structure of an object category determination device provided in an embodiment of the present application;
[0031] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0032] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0033] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.
[0034] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of financial data or user data and other information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, models, etc. may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0035] In real-world financial data processing, the diversity and complexity of data often lead to poor results of traditional machine learning methods, especially when the amount of data is limited or the data is unbalanced. At the same time, the dynamic changes in the financial market require machine learning models to have higher adaptability and prediction accuracy. At present, when making decisions, financial institutions need to rely on accurate data analysis results to avoid losses caused by bad decisions. Traditional data analysis methods mainly rely on historical data and statistical models, which often seem to be inadequate when dealing with complex and dynamically changing market environments. With the increase in data volume and the diversification of data types, the shortcomings of traditional methods in data utilization efficiency and model generalization ability have gradually become apparent. In addition, the rapid changes in the financial market require analytical tools to quickly adapt to new influencing factors and market conditions. The update and iteration speed and flexibility of traditional models often cannot meet these requirements. Specifically, traditional data analysis methods have the following main problems: (1) Data augmentation usually relies on simple techniques such as rotation and flipping, which cannot effectively process complex or high-dimensional data. (2) The neural network structure of the model is fixed and cannot adapt to changes in data characteristics, which may lead to poor training results. (3) Feature dimensionality reduction technology often ignores the matching degree between features and target space, which may affect the performance of subsequent models. (4) Ensemble methods such as random forests lack dynamic adjustment of features and sample participation during the decision tree construction process, which limits the performance of the model on new or unseen data.
[0036] In response to the above problems, the embodiments of the present application provide a data risk method based on artificial intelligence, which can be used to determine the category of an object. It mainly achieves the discrimination of quantity categories by utilizing trained feature extraction models, feature dimensionality reduction models and classifier models. It has at least the following advantages: (1) Through efficient data expansion and feature optimization, the model can learn more complex data features on a limited data set, improving the accuracy of classification and prediction. (2) By dynamically adjusting the network structure and the participation of the decision tree, the model can better adapt to different data features and changes, reducing overfitting. (3) Quantum machine learning and topological dynamic adjustment mechanisms reduce unnecessary calculations, optimize the training process, and improve classification accuracy.
[0037] Figure 1A schematic diagram of a scene for determining an object category provided in an embodiment of the present application, such as Figure 1 As shown, the new samples to be classified are input into the trained feature extraction model for feature extraction to obtain new samples after feature extraction, and then the new samples after feature extraction are input into the trained feature dimension reduction model for feature dimension reduction to obtain new samples after feature dimension reduction, and finally the new samples after feature dimension reduction are input into the trained classifier model for classification to obtain the classification results.
[0038] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0039] Figure 2 The following is a flow chart of a method for determining an object category provided in an embodiment of the present application, wherein the object may refer to a customer of a financial institution. Figure 2 As shown, the method may specifically include the following steps:
[0040] Step S210: Obtain sample data, feature extraction model, feature dimension reduction model and classifier model of the object to be classified.
[0041] Among them, the feature extraction model is trained based on the expanded training data set, and the expanded training data set is a generative adversarial network optimized by quantum computing, which is obtained by data expansion of the training data before expansion.
[0042] In this embodiment, the feature extraction model, the feature dimension reduction model and the classifier model are all pre-trained. Among them, the training data of the feature extraction model is the original data expanded by the generative adversarial network. After the feature extraction model is trained, the feature extraction data output by the feature extraction model can be used as the training data of the feature dimension reduction model. After the feature dimension reduction model is trained, the feature dimension reduction data output by the feature dimension reduction model can be used to train the classifier model, thereby completing the training of the feature extraction model, the feature dimension reduction model and the classifier model.
[0043] For example, Figure 3 A schematic diagram of the model training process provided in the embodiment of the present application, such as Figure 3 As shown, data collection and annotation are first performed to complete the construction of the original training data set.
[0044] The data is collected from financial transaction records, financial information related to users, market economic indicators, etc. In some implementations, after the data collection is completed, a structured data table can be used as a data storage format to store each data record, and each record corresponds to a specific customer or transaction instance.
[0045] Exemplarily, the attributes of the data include:
[0046] a1: customer age, integer type
[0047] a2: account balance, floating point number
[0048] a3: historical overdue times, integer type
[0049] a4: credit card limit utilization rate, floating point type
[0050] a5: loan-to-income ratio, floating point number
[0051] a6: Career stability score, integer type
[0052] a7: Housing ownership type, discrete data (such as rental, ownership, etc.)
[0053] a8: the time interval between the last loan application, integer type
[0054] a9: historical query times, integer type
[0055] a 10 : Marital status, discrete data (such as married, unmarried, etc.)
[0056] This embodiment is only used to illustrate a data format and type of the present invention. In actual applications, the attributes of data are usually more than 10 attributes, and the number of attributes of data may reach dozens or even hundreds.
[0057] Furthermore, after completing the data collection, the data can be manually labeled. For example, the labeled categories can be low-level, medium-level, and high-level, totaling three categories. Therefore, when confirming the object category later, it can be confirmed which category the object belongs to.
[0058] In this embodiment, the acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training data can easily lead to poor generalization of the model and affect the accuracy of the model. Based on this, the embodiment of the present application uses a generative adversarial network based on quantum state meta-learning to generate training samples, thereby achieving data expansion.
[0059] In this embodiment, the sample data may be collected based on customer financial transaction records, customer credit reports, and market economic indicators.
[0060] Step S220: Based on the sample data and the feature extraction model, obtain a first new sample after feature extraction.
[0061] In this embodiment, the feature extraction model can use a 3-layer fully connected neural network for feature extraction. In some related technologies, neural networks are mainly used for feature extraction. In some neural network structures, gradient disappearance, gradient explosion, or falling into local optimal solutions may be encountered, affecting the stability of training and the performance of the model. In this embodiment, a feature extraction model of a neural network optimized based on a topological adaptive learning algorithm is adopted, and a topological dynamic adjustment mechanism is adopted, which allows the neural network to adjust not only weights and biases during the learning process, but also the topological structure of its internal connections.
[0062] Step S230: Based on the first new sample and the feature dimension reduction model, obtain a second new sample after feature dimension reduction.
[0063] In this embodiment, it has been mentioned above that the data after feature extraction can be input into the feature dimensionality reduction model to train the feature dimensionality reduction model.
[0064] Among them, a micro-adjustable strategy auto-encoding neural network can be used as a feature dimensionality reduction model. The micro-adjustable strategy auto-encoding neural network includes an encoder and a decoder. The encoder is responsible for compressing the input high-dimensional features into a low-dimensional feature, and the decoder attempts to reconstruct the original input data with this low-dimensional feature. In order to improve the training efficiency and reconstruction quality of the feature dimensionality reduction model, this embodiment adopts a dual loss calculation method, which not only considers the reconstruction error, but also evaluates the adaptability of the encoded low-dimensional features to the target dimensionality reduction space, thereby optimizing the quality of feature representation.
[0065] Step S240: Based on the second new sample and the classifier model, a classification result is obtained as the category of the object to be classified.
[0066] In this embodiment, it has been mentioned above that the reduced-dimensional data is input into a random forest classification algorithm based on participation restriction to train the classifier model.
[0067] Among them, the random forest classifier proposed in this embodiment adopts an enhanced ensemble learning framework, which combines multiple decision trees to improve the generalization ability of the model. Each decision tree is trained on a random subset of the data, so that the classifier model shows high robustness and accuracy on the entire data set.
[0068] In this embodiment, the trained model is used to process the newly collected samples to complete the classification task. In one embodiment, the newly collected data is subjected to feature extraction by the feature extraction model, and then converted by the data dimension reduction model to match the data format used in the training process. The processed data is then classified using the classifier model.
[0069] Exemplarily, the categories of objects can be divided into three levels: low, medium, and high. The higher the level, the higher the risk of the object. Financial institutions need to be more cautious when conducting related business activities on the object to avoid losses due to wrong decisions.
[0070] The embodiment of the present application performs data expansion by utilizing a generative adversarial network based on quantum state meta-learning, thereby improving the quality and efficiency of data generation. Through the encoding and decoding process of the quantum state, it is possible to capture subtle data features in higher-dimensional data representations, thereby facilitating the generation of more diverse and realistic synthetic data. At the same time, it enables the feature extraction model trained thereby to learn more complex data features on a limited data set, thereby improving the feature extraction accuracy of the feature extraction model, thereby further improving the accuracy of subsequent object classification.
[0071] The following describes in detail how to implement the training of the above-mentioned generative adversarial network, feature extraction model, feature dimensionality reduction model and classifier model through some embodiments.
[0072] First, the training process of the generative adversarial network is described in detail through some embodiments. Specifically, Figure 4 A training flowchart of a generative adversarial network algorithm based on quantum state meta-learning is provided in an embodiment of the present application, wherein the generative adversarial network based on quantum state meta-learning includes a generator and a discriminator, the generator is responsible for generating new data samples, and the discriminator is responsible for determining the authenticity of the samples.
[0073] like Figure 4 As shown, it specifically includes the following steps:
[0074] Step S201, initialize and set the parameters of the generator and the discriminator and initialize the quantum state. The initialization of the quantum state can ensure the correct encoding of the quantum data. The specific initialization method can be expressed as:
[0075]
[0076]
[0077] Ψ (0) =qua(ψ b1 , ψ b2 , ..., ψ bi , ..., ψbn )
[0078] In the above formula, Represents the initial parameters of the generator; represents the initial parameters of the discriminator; Ψ (0) represents the initial encoding state of the quantum state; θ bgi and θ bdi represents the random initial value of the corresponding network parameter; ψ bi Represents the initial parameters of quantum state encoding; rand() is the random generation function; qua() is the Pauli gate initialization function.
[0079] Step S202: Convert the original data vector x into quantum state data Ψ(x).
[0080] The conversion process can be realized by the following steps: based on the set quantum coding function, the i-th element in the original data vector and the quantum coding parameter corresponding to the i-th element, the i-th element is converted into a quantum code; then the quantum codes obtained by converting each element are superimposed to obtain the quantum-coded data. Where i is [1, n].
[0081] Exemplarily, the specific conversion formula can be expressed as:
[0082]
[0083] In the above formula, qe() represents the quantum encoding function, Ψ(x) represents the data after quantum encoding, and x bi represents the i-th element in the original data vector, ψ bi is the corresponding quantum coding parameter, Represents a superposition of quantum states.
[0084] Step S203: While fixing the discriminator parameters, update the parameters of the generator to minimize the first loss function associated with the quantum state.
[0085] Among them, the parameter update process of the generator can be implemented through the following steps: based on the output of the discriminator, the output of the generator, the set regularization parameter, the first quantum coded data, and the second quantum coded data, a first loss function is obtained; then, with the goal of minimizing the first loss function, based on the set learning rate, the gradient of the generator parameters, and the generator parameters before the update, the updated generator parameters are determined.
[0086] Among them, the first quantum coded data is the quantum coded data corresponding to the input noise vector, and the second quantum coded data is the quantum coded data corresponding to the target generated data, and the target generated data is generated by the generator based on the input noise vector.
[0087] Exemplarily, the training goal of the generator is to minimize the first loss function L associated with the quantum state Q , update the generator parameters Θ g can be expressed as:
[0088]
[0089]
[0090] In the above formula, and Respectively represent the generator parameters before and after the update; λ b is the learning rate; represents the gradient with respect to the generator parameters; L Q is the quantum state correlation loss function, D and G are the outputs of the discriminator and generator respectively; z i is the input noise vector; λ q is a regularization parameter used to adjust the consistency of the quantum state; ∥∥2 represents the L2 norm. b Set to 0.01, λ q Set to 0.3.
[0091] Step S204: While fixing the parameters of the generator, update the parameters of the discriminator to maximize its ability to distinguish between generated data and real data.
[0092] Among them, update the generator parameter Θ d can be expressed as:
[0093]
[0094]
[0095] In the above formula, and Respectively represent the discriminator parameters before and after the update; γ b is the learning rate; represents the gradient about the discriminator parameters; L D is the loss function of the discriminator.
[0096] Step S205: According to the feedback from the discriminator, adjust the quantum state data encoding process to optimize the quality of data generation.
[0097] Among them, in some embodiments, adjusting the quantum state data coding state can be specifically achieved through the following steps: determining the quantum state loss function based on the set adjustment rate, the second quantum coding data and the third quantum coding data; and then determining the updated quantum state coding parameters based on the quantum state loss function, the gradient of the quantum state parameters, the set adjustment rate, the quantum state coding parameters before and after the update, the generator parameters and the discriminator parameters.
[0098] The third quantum coded data is the quantum coded data corresponding to the i-th element in the original data vector.
[0099] Exemplarily, the updating method of quantum state parameters can be expressed as:
[0100]
[0101]
[0102] In the above formula, Ψ (t+1) and (t) Represents the quantum state parameters before and after the update; α b is the adjustment rate; represents the gradient of the quantum state parameters; L Ψ is the quantum state adjustment loss function, σ b is a weight factor used to strengthen the influence of quantum state consistency. b Set to 0.5, α b Set to 0.3.
[0103] In this embodiment, the loss function is calculated using quantum states. Compared with the traditional method of directly applying real data to calculate the loss, it has higher accuracy and can further improve the performance of the generative adversarial network.
[0104] Step S206, repeat the above steps until the preset first stop iteration condition is met, which means that the generative adversarial network training is completed.
[0105] Exemplarily, in one embodiment, the preset first condition for stopping iteration is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.
[0106] The embodiments of the present application optimize the generative adversarial network by utilizing the principles of quantum computing to improve the quality and efficiency of data generation. Through the encoding and decoding process of the quantum state, it is possible to capture subtle data features in higher-dimensional data representations, which helps to generate more diverse and realistic synthetic data.
[0107] The feature extraction model training process is described in detail below through some embodiments. Specifically, Figure 5The following is a schematic diagram of the feature extraction model training process provided in the embodiment of the present application, wherein the feature extraction model of the neural network optimized based on the topological adaptive learning algorithm is adopted in the present embodiment. Figure 5 As shown in the figure, the training process of the neural network optimized based on the topology adaptation learning algorithm is as follows:
[0108] Step S301: Initialize the parameters (weight w and bias b) of the neural network and the basic topology structure, and define the initial weight matrix W. (0) and the bias vector B (0) for:
[0109] W (0) =randn(d in , d out )
[0110] B (0) =randn(0, d out )
[0111] In the above formula, d in and d out They represent the input and output dimensions of the network layer of the neural network respectively, and randn() randomly selects values within a specific interval.
[0112] Step S302: Before each iteration begins, the neural network analyzes the requirements of the current task on the network structure through the built-in topology sensor.
[0113] In this embodiment, the topology sensor is defined as a function T, which outputs a topology adjustment index τ based on the current loss L and the topological structure S of the neural network, which can be specifically expressed as:
[0114] τ=T(L,S)
[0115]
[0116] In the above formula, Sig() is the Sigmoid activation function.
[0117] Furthermore, the gradient The calculation method can be expressed as:
[0118]
[0119] In the above formula, E is the prediction error, which is calculated by the preset Softmax function.
[0120] Step S303: Calculate the second loss function L under the current network configuration.
[0121] In some embodiments, the second loss function L can be specifically implemented through the following steps: obtaining a prediction error based on the actual label of the i-th element and the predicted label of the i-th element in the expanded training data set; determining a topological adaptability penalty based on the rate of change of the topological structure; and obtaining a second loss function based on the set topological weight hyperparameters, prediction error, and topological adaptability penalty.
[0122] Among them, the second loss function L is composed of two indicators: prediction error E and topology adaptability penalty P. The second loss function L is composed of two indicators, prediction error E and topology adaptability penalty P, which is more comprehensive. Exemplarily, the specific calculation method can be expressed as:
[0123] L=E+λ sa P
[0124]
[0125]
[0126] In the above formula, λ sa is the topology weight hyperparameter, Δs j Indicates the change in the jth structural element (such as connection weight). For example, λ sa is set to 0.1.
[0127] Furthermore, Δs j The calculation method can be expressed as:
[0128]
[0129] In the above formula, and are the structural states in consecutive iterations, respectively.
[0130] Step S304: According to the values of τ and L, it is decided whether to perform parameter optimization or topology adjustment. The adjustment method is implemented by the decision function D, which can be expressed as:
[0131]
[0132] In the above formula, θ cp is the preset indicator threshold. For example, θ cp Set to 0.5.
[0133] Step S305: Execute parameter or topology adjustment.
[0134] In some embodiments, the parameter adjustment of the neural network can be specifically achieved through the following steps: determining the gradient of the weight parameter based on the second loss function and the weight parameter of the neural network; determining the gradient of the bias parameter based on the second loss function and the bias parameter of the neural network; determining the adjusted weight parameter based on the current learning rate, the weight parameter before adjustment and the weight parameter gradient; determining the adjusted bias parameter based on the current learning rate, the bias parameter before adjustment and the bias parameter gradient.
[0135] Among them, the current learning rate is obtained by optimizing the learning rate and adjustment factor in the previous iteration.
[0136] Exemplarily, the parameter adjustment rule can be expressed as:
[0137]
[0138]
[0139] In the above formula, w (t+1) and b (t+1) are the adjusted neural network weights and biases, w (t) and b (t+1) are the neural network weights and biases before adjustment, η vh is the learning rate. For example, η vh Set to 0.01.
[0140] Furthermore, the gradient Calculated by the chain rule, it can be expressed as:
[0141]
[0142] Similarly, It is calculated by the chain rule and can be expressed as:
[0143]
[0144] In the above formula, y i is the actual label of the i-th sample, is the predicted label of the i-th sample output by the preset Softmax function.
[0145] Step S306: Optimize the effectiveness of topology and parameter adjustment through a feedback loop.
[0146] Specifically, adjusting η or λ to optimize the learning process can be expressed as:
[0147] η vh (t+1) =η vh (t) ×β bu
[0148] λ sa (t+1) =λ sa (t) +α bu
[0149] In the above formula, η vh (t+1) and λ sa (t+1) are the adjusted learning rate and topology weight hyperparameters, η vh (t) and λ sa (t) are the learning rate and topology weight hyperparameters before adjustment, β bu and α bu is the adjustment factor. For example, β bu and α bu Set to 0.9 and 0.01 respectively.
[0150] Step S307: Adopting an adaptive topology reconstruction feedback mechanism, by monitoring the performance feedback of the neural network, dynamically adjusting the reconstruction strategy of the topology structure, and achieving more sophisticated network optimization.
[0151] In some embodiments, the adjustment of the topological structure can be specifically achieved through the following steps: determining the accuracy of the neural network based on the prediction error and maximum possible error of the neural network; determining the output stability of the neural network based on the prediction label of each element and the average of all prediction labels; determining the performance monitoring function based on the set weight value, output stability and accuracy; determining the adaptive adjustment factor based on the performance monitoring function, the sensitivity of the adjustment and the upper limit of the adjustment rate; determining the adjusted topological structure based on the adaptive adjustment factor, the topological adjustment direction, and the topological structure before adjustment.
[0152] Specifically, the performance monitoring function R is defined as a measure of the stability and accuracy of the neural network output, which can be expressed as:
[0153] R=ω1R s +ω2R p
[0154] In the above formula, R s Represents output stability, obtained by calculating the output variance, R p represents accuracy, measured by the inverse loss function value. The weights ω1 and ω2 adjust the influence weights of stability and accuracy. For example, ω1 and ω2 are set to 0.6 and 0.4 respectively.
[0155] Furthermore, R s and R p The calculation method can be expressed as:
[0156]
[0157]
[0158] In the above formula, yes The average value, E max is the maximum possible error. E max Can be set to 0.5.
[0159] Furthermore, the adaptive adjustment factor δ is used bu , dynamically adjust the topology according to the value of R, which can be expressed as:
[0160] δ bu =κ up (1-e -λ vu R )
[0161] In the formula, κ up is the upper limit of the adjustment rate, λ vu is the sensitivity of the adjustment. For example, κ up and λ vu Set to 0.1 and 5 respectively.
[0162] Furthermore, the topology is adjusted according to δ, which can be expressed as:
[0163] S (t+1) =S (t) +δ bu ΔS
[0164] In the above formula, S is the topological structure before adjustment, S (t+1) is the adjusted topological structure, and ΔS is the topological adjustment direction derived based on the gradient or other optimization algorithms.
[0165] Step S308, repeat the above steps until the preset second stop iteration condition is met, which means that the feature extraction model training is completed.
[0166] In one embodiment, the preset second stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.
[0167] For example, Figure 6 This is an overall flow chart of the feature extraction model training process of this application. In this embodiment, the above-mentioned adaptive adjustment method is used to avoid the difficulty of parameter adjustment caused by traditional manual setting of parameters, thereby improving the parameter adjustment effect.
[0168] When training a feature extraction model, the embodiment of the present application can automatically detect and optimize the network topology structure by using a neural network optimized by a topology adaptation learning algorithm, thereby solving the problems of gradient vanishing, gradient exploding, or falling into local optimality that traditional neural networks may face.
[0169] The following describes the feature dimension reduction model training process in detail through some embodiments. Specifically, Figure 7 A schematic diagram of the feature dimensionality reduction model training process provided for an embodiment of the present application, wherein this embodiment adopts a micro-adjustable strategy autoencoder neural network as a feature dimensionality reduction model. The micro-adjustable strategy autoencoder neural network includes an encoder and a decoder. The encoder is responsible for compressing the input high-dimensional features into a low-dimensional feature space, and the decoder attempts to reconstruct the original input data from this low-dimensional feature space. In order to improve the training efficiency and reconstruction quality of the model, this embodiment adopts a dual loss calculation method, which not only considers the reconstruction error, but also evaluates the fitness of the encoded low-dimensional features and the target dimensionality reduction space, thereby optimizing the quality of feature representation. Figure 7 As shown in the figure, the feature dimension reduction model training process based on the micro-adjustable strategy autoencoder neural network is as follows:
[0170] Step S401, initialization stage, all parameters in the autoencoder neural network, such as weight w and bias b, are initialized with random values. In one embodiment, Gaussian distribution is used for initialization, which can be expressed as:
[0171]
[0172]
[0173] In the formula, w pij represents the connection weight from the jth neuron to the ith neuron in the autoencoder. pi Represents the bias of the i-th neuron. σ cb is the standard deviation, used to control the dispersion of the initialization. For example, σ cb Set to 0.01.
[0174] Step S402: Input the high-dimensional feature data x after feature extraction p To the encoder, it is propagated through the activation function and multi-layer network structure to generate a low-dimensional feature representation. Each layer of the encoder outputs z pl Defined as:
[0175]
[0176] Further, the low-dimensional features enter the decoder, and the decoder attempts to reconstruct the original high-dimensional data. The output of the decoder reconstructs for:
[0177]
[0178] In the above formula, z pl is the output of the encoder layer l; y pk is the k-th layer input of the decoder; Sig() is the Sigmoid activation function.
[0179] Furthermore, let the last layer output of the encoder be z pm , then the final output of the encoder can be fine-tuned based on the learnable adjustment factor and the set adjustment parameters.
[0180] Specifically, a micro-adjustable layer is used to adjust the encoder output z pm for It can be expressed as:
[0181]
[0182] In the above formula, ⊙ represents element-wise multiplication; α p is a learnable adjustment factor; δ p is a parameter adjusted according to the gradient information. For example, δ p Set to 0.3.
[0183] In one embodiment, the adjustment factor may be determined based on the k-th encoded feature of the encoder, the weight of the k-th encoded feature to the adjustment factor, and the bias of the adjustment factor.
[0184] Specifically, the adjustment factor α p The calculation method can be expressed as:
[0185]
[0186] In the above formula, Represents the feature after encoding from the kth to the weight of the adjustment factor; is the bias of the adjustment factor; Re() is the ReLU activation function.
[0187] Step S403: Calculate the total loss function L p .
[0188] Among them, the total loss function L p Including reconstruction loss and dual loss. In some embodiments, the total loss function L can be calculated by the following steps p : Calculate the total loss function based on the number of samples of training data input to the feature dimensionality reduction model, the i-th original data point, the i-th reconstructed data point, the dual loss function, the target low-dimensional feature space, and the weight factor of the dual loss.
[0189] In one embodiment, for the reconstruction loss, the mean square error is used to measure the difference between the reconstructed data and the original data. For the dual loss, the matching degree between the encoded features and the predetermined low-dimensional target features is evaluated to optimize the representation ability of the features.
[0190] Specifically, the total loss function L p The calculation method can be expressed as:
[0191]
[0192] In the above formula, N is the number of samples; x pi is the i-th original data point; is the i-th reconstructed data point; D() is the dual loss function; z target is the target low-dimensional space; p is the weight factor of the dual loss. For example, λ p Set to 0.4.
[0193] Furthermore, the dual loss function D() is used to measure the encoded feature z pm and the target low-dimensional space z target The matching degree between them, the dual loss function can be calculated according to the i-th feature dimension after encoding and the i-th feature dimension in the target low-dimensional feature space.
[0194] The specific calculation method can be expressed as:
[0195]
[0196] In the above formula, z pmi is the i-th feature dimension after encoding; z targeti is the i-th feature dimension in the target low-dimensional space.
[0197] The total loss function calculated in this embodiment takes into account more factors besides the reconstruction error, which can further improve the accuracy of the feature dimensionality reduction model.
[0198] Step S404: Update the network parameters using the gradient descent method according to the total loss function.
[0199] In the micro-adjustment layer, the parameters are adjusted according to the gradient information to achieve better information compression and feature expression. Specifically, let the gradient and Used to update parameters, the update method of the autoencoder parameters can be expressed as:
[0200]
[0201]
[0202] In the formula, and are the updated autoencoder weights and bias parameters, and are the autoencoder weights and bias parameters before updating; γ p is the learning rate. Preferably, γ p Set to 0.01.
[0203] Furthermore, the gradient of the weight The calculation method can be expressed as:
[0204]
[0205] In the formula, is the partial derivative of the loss function with respect to the model output, It is the partial derivative of the model output with respect to the weight.
[0206] Similarly, the gradient of the bias The calculation method can be expressed as:
[0207]
[0208] In the formula, is a constant term, preferably set to 1.
[0209] S405, repeating the above steps until a preset third stop iteration condition is met, which means that the feature dimensionality reduction model training is completed.
[0210] Exemplarily, in one embodiment, the preset third condition for stopping iteration is reaching a preset maximum number of iterations, for example, the preset maximum number of iterations is set to 1000 times.
[0211] Figure 8 This is an overall flow chart of the feature dimensionality reduction model training process of the present application. When training the feature dimensionality reduction model, the embodiment of the present application uses the dual loss to evaluate the fit between the encoded features and the target dimensionality reduction space, thereby optimizing the representation ability of the features. It not only focuses on the reconstruction error, but also evaluates the expression efficiency of the features, which helps to generate a more effective feature representation.
[0212] The following describes the classifier model training process in detail through some embodiments. Specifically, Fig. 9A schematic diagram of the classifier model training process provided in the embodiment of the present application, wherein the embodiment inputs the reduced-dimensional data into the random forest classification algorithm based on participation restriction to train the classifier model. The random forest classifier proposed in the embodiment adopts an enhanced ensemble learning framework, which combines multiple decision trees to improve the generalization ability of the model. Each decision tree is trained on a random subset of the data, so that the model shows high robustness and accuracy on the entire data set. Fig. 9 As shown in the figure, the training process of the random forest classification algorithm based on participation restriction is as follows:
[0213] Step S501: Initialize and set the number of decision trees N, the maximum depth D, and the minimum number of sample splits S in the random forest. min , respectively expressed as:
[0214] N=qN,D=qD,S min =qS
[0215] In the above formula, qN represents the number of decision trees; qD represents the maximum depth of the tree; qS represents the minimum number of sample splits. For example, qN is set to 100, qD is set to 5, and qS is set to 10.
[0216] Step S502: Set an initial participation limit for each decision tree.
[0217] Among them, the participation restrictions include the maximum number of features F max and the number of samples M max , determines the maximum number of features and samples available in the process of building each tree. In some embodiments, the maximum number of features can be determined based on the set feature selection ratio coefficient and the total number of features. In addition, the maximum number of samples can also be determined based on the set sample selection ratio coefficient and the total number of samples.
[0218] Specifically, it can be expressed as:
[0219] F max =γ vu *qF
[0220] M max =λ vu *qM
[0221] In the above formula, γ vu is the scaling factor for feature selection, λ vu The scaling factor selected for the sample; qF and qM represent the total number of features and samples, respectively. For example, γ vu is 0.3, λ vu is 0.4.
[0222] Step S503: Construct multiple decision trees in parallel on different random subsets of the training data. i and the number of samples M i Subject to participation constraints, it can be expressed as:
[0223] F i =min(randint(1,F max ), qF)
[0224] M i =min(randint(1,M max ), qM)
[0225] In the above formula, F i and M i They represent the number of features and the number of samples used by the i-th decision tree respectively, and randint() is a random function.
[0226] Step S504: In each step of tree construction, dynamically adjust the participation limit of the tree according to its performance.
[0227] In some embodiments, the number of features used by the i-th decision tree during iterative training may be determined based on the prediction accuracy, expected accuracy, feature adjustment coefficient, and maximum number of features of the i-th decision tree. In addition, the number of samples used by the i-th decision tree during iterative training may also be determined based on the prediction accuracy, expected accuracy, sample adjustment coefficient, and maximum number of samples of the i-th decision tree.
[0228] Specifically, if the prediction accuracy of the i-th decision tree is P i Did not meet expectations target , adjust the participation limit to allow it to use more features and samples in subsequent training. The adjustment method can be expressed as:
[0229] ΔF=α F *(P target -P i )
[0230]
[0231] ΔM=α M *(P target -P i )
[0232]
[0233] In the above formula, α F and α M is the adjustment coefficient. By adjusting the participation limit through the above more detailed calculation method, higher classification accuracy can be achieved.
[0234] Furthermore, in some implementations, the sample adjustment coefficient and the feature adjustment coefficient may be determined based on a standard deviation parameter, a current number of iterations, a prediction accuracy, and an expected accuracy during the adjustment process.
[0235] Specifically, the adjustment coefficient α F and α M It is used to control the dynamic adjustment range of the number of features and samples. The calculation method can be expressed as:
[0236]
[0237]
[0238] In the above formula, σ F and σ M is the standard deviation parameter in the adjustment process; T is the current number of iterations.
[0239] S505, the prediction results of all decision trees are summarized, and a voting or averaging method is used to generate the final classification result. The weighted average method is used to obtain the final classification result R, which can be expressed as:
[0240]
[0241] In the above formula, R i is the output of the i-th decision tree, w i It is a weight that is dynamically adjusted based on the performance of the tree.
[0242] Furthermore, w i The calculation method can be expressed as:
[0243]
[0244] In the above formula, P i is the accuracy of the ith decision tree.
[0245] S506: Based on the final classification result, evaluate whether a fourth stop iteration condition is met.
[0246] Specifically, the final classification result can be used to evaluate whether the performance P of the entire random forest meets the established performance standard P std Or the upper limit of the number of iterations T max , the calculation method can be expressed as:
[0247]
[0248] In the above formula, P represents the average accuracy of the entire random forest; P i is the accuracy of a single decision tree.
[0249] The embodiment of the present application improves the accuracy and robustness of the classifier model on various data subsets by utilizing a mechanism of dynamically adjusting the features and sample usage of each decision tree based on a random forest classifier with participation restrictions, thereby further improving classification accuracy.
[0250] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0251] Fig.10 A schematic diagram of the structure of the object category determination device provided in the embodiment of the present application, such as Fig.10 As shown, the object category determination device 1000 includes: a model acquisition module 1010, a feature extraction module 1020, a feature dimension reduction module 1030 and a classification module 1040. Among them, the model acquisition module is used to obtain sample data of the object to be classified, a feature extraction model after training, a feature dimension reduction model after training and a classifier model after training. The feature extraction module is used to obtain a first new sample after feature extraction based on the sample data and the feature extraction model. The feature dimension reduction module is used to obtain a second new sample after feature dimension reduction based on the first new sample and the feature dimension reduction model. The classification module is used to obtain a classification result based on the second new sample and the classifier model as the category of the object to be classified.
[0252] Among them, the feature extraction model is trained based on the expanded training data set, and the expanded training data set is obtained by data expansion of the training data before expansion based on the generative adversarial network based on quantum state meta-learning.
[0253] Optionally, generate an adversarial network training module to perform the following steps:
[0254] S201: Initialize the parameters of the generator, the parameters of the discriminator and the quantum state encoding parameters in the generative adversarial network. The generator is used to generate data, and the discriminator is used to determine the authenticity of the data.
[0255] S202: based on the quantum state encoding parameter, converting the original data vector into quantum encoded data;
[0256] S203: Fix the parameters of the discriminator, and update the parameters of the generator with the goal of minimizing the first loss function associated with the quantum-encoded data;
[0257] S204: Fix the parameters of the generator, and update the parameters of the discriminator with the goal of maximizing the ability of the generative adversarial network to distinguish between generated data and real data;
[0258] S205: adjusting quantum state encoding parameters to optimize the quality of data generated after quantum encoding;
[0259] S206: Repeat the above steps S202 to S205 until the first stop iteration condition is met.
[0260] Optionally, the generative adversarial network training module is specifically used to perform the following steps: based on the set quantum coding function, the i-th element in the original data vector and the quantum coding parameter corresponding to the i-th element, the i-th element is converted into a quantum code, and the quantum codes obtained by converting each element are superimposed to obtain quantum-coded data. Wherein, i is [1, n].
[0261] Optionally, the generative adversarial network training module is specifically used to perform the following steps: determine a first loss function based on the output of the discriminator, the output of the generator, the set regularization parameter, the first quantum coded data, and the second quantum coded data; with the goal of minimizing the first loss function, determine the updated generator parameters based on the set learning rate, the gradient of the generator parameters, and the generator parameters before the update.
[0262] Among them, the first quantum coded data is the quantum coded data corresponding to the input noise vector, and the second quantum coded data is the quantum coded data corresponding to the target generated data, and the target generated data is generated by the generator based on the input noise vector.
[0263] Optionally, the generative adversarial network training module is specifically used to perform the following steps: determine the quantum state loss function based on the set adjustment rate, the second quantum coding data and the third quantum coding data; determine the updated quantum state coding parameters based on the quantum state loss function, the gradient of the quantum state parameters, the set adjustment rate, the quantum state coding parameters before and after the update, the generator parameters and the discriminator parameters.
[0264] The third quantum coded data is the quantum coded data corresponding to the i-th element in the original data vector.
[0265] Optionally, a feature extraction model training module is also included to perform the following steps:
[0266] S301: Initialize the parameters and topology of the neural network;
[0267] S302: Obtain a second loss function of the neural network and determine the current loss;
[0268] S303: Determine a topology adjustment index based on the current loss and topology structure;
[0269] S304: Determine an optimization object according to the magnitude relationship between the topology adjustment index and the preset index threshold, where the optimization object is a parameter of the neural network or a topological structure of the neural network;
[0270] S305: If the optimization object is the parameters of the neural network, the parameters of the neural network are adjusted according to the set parameter adjustment rules;
[0271] S306: If the optimization object is the topological structure of the neural network, the topological structure of the neural network is adjusted according to the set topological adjustment rule;
[0272] S307: Repeat steps S302 to S306 until a second iteration stop condition is met.
[0273] Optionally, the feature extraction model training module can be specifically used to: obtain the prediction error based on the actual label of the i-th element and the predicted label of the i-th element in the expanded training data set; determine the topological adaptability penalty based on the rate of change of the topological structure; obtain the second loss function based on the set topological weight hyperparameters, prediction error and topological adaptability penalty.
[0274] Optionally, the feature extraction model training module can be specifically used to: determine the gradient of the weight parameter based on the second loss function and the weight parameter of the neural network; determine the gradient of the bias parameter based on the second loss function and the bias parameter of the neural network; determine the adjusted weight parameter based on the current learning rate, the weight parameter before adjustment and the weight parameter gradient, the current learning rate is obtained by optimizing the learning rate and adjustment factor in the last iteration; determine the adjusted bias parameter based on the current learning rate, the bias parameter before adjustment and the bias parameter gradient.
[0275] Optionally, the feature extraction model training module can be specifically used to: determine the accuracy of the neural network based on the prediction error and maximum possible error of the neural network; determine the output stability of the neural network based on the prediction label of each element and the average of all prediction labels; determine the performance monitoring function based on the set weight value, output stability and accuracy; determine the adaptive adjustment factor based on the performance monitoring function, the sensitivity of the adjustment and the upper limit of the adjustment rate; determine the adjusted topology based on the adaptive adjustment factor, the topology adjustment direction, and the topology before adjustment.
[0276] Optionally, a feature dimension reduction model training module is also included, which is used to perform the following steps:
[0277] S401: Initializing weight parameters and bias parameters of the autoencoder neural network;
[0278] S402: Based on the high-dimensional features, the initialized encoder and decoder, obtain low-dimensional features and original high-dimensional data obtained by decoding the low-dimensional features;
[0279] S403: Determine a total loss function based on the original high-dimensional data and low-dimensional features;
[0280] S404: updating the weight parameters and bias parameters of the autoencoder neural network according to the total loss function;
[0281] S405: Repeat steps S402 to S404 until a third iteration stop condition is met.
[0282] Optionally, the feature dimension reduction model training module is specifically used to fine-tune the final output of the encoder based on a learnable adjustment factor and a set adjustment parameter.
[0283] Optionally, the feature dimensionality reduction model training module is specifically used to determine a learnable adjustment factor based on the kth encoded feature of the encoder, the weight from the kth encoded feature to the adjustment factor, and the bias of the adjustment factor.
[0284] Optionally, the feature dimensionality reduction model training module is specifically used to calculate the total loss function based on the number of original data input into the feature dimensionality reduction model, the i-th original data point, the i-th reconstructed data point, the dual loss function, the target low-dimensional feature space, and the weight factor of the dual loss.
[0285] Optionally, the feature dimensionality reduction model training module is specifically used to calculate a dual loss function based on the i-th feature dimension after encoding and the i-th feature dimension in the target low-dimensional feature space.
[0286] Optionally, a classifier model training module is also included, which is used to perform the following steps:
[0287] S501: Initialize the number of decision trees, maximum depth, and minimum number of sample splits in the random forest;
[0288] S502: Setting an initial participation limit for each decision tree;
[0289] S503: Constructing multiple decision trees in parallel on different random subsets of the training data of the classifier model;
[0290] S504: When constructing the decision tree, dynamically adjust the participation limit of the decision tree according to the performance of the decision tree;
[0291] S505, determining the final classification result based on the prediction results of all decision trees;
[0292] S506: Repeat iterative training of the classifier model until the final classification result meets the fourth iteration stop condition.
[0293] Optionally, the classifier model training module can be specifically used to: determine the maximum number of features based on a set feature selection ratio coefficient and a total number of features; determine the maximum number of samples based on a set sample selection ratio coefficient and a total number of samples; and use the maximum number of features and the maximum number of samples as initial participation limits for a decision tree.
[0294] Optionally, the classifier model training module can be specifically used to: determine the number of features used by the i-th decision tree in iterative training based on the prediction accuracy, expected accuracy, feature adjustment coefficient and maximum number of features of the i-th decision tree; determine the number of samples used by the i-th decision tree in iterative training based on the prediction accuracy, expected accuracy, sample adjustment coefficient and maximum number of samples of the i-th decision tree.
[0295] Optionally, the classifier model training module can be specifically used to determine the sample adjustment coefficient and the feature adjustment coefficient based on the standard deviation parameter in the adjustment process, the number of current iterative training, the prediction accuracy and the expected accuracy.
[0296] The device provided in the embodiment of the present application can be used to execute the method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0297] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the model acquisition module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above model acquisition module. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0298] Fig.11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11As shown, the electronic device 1100 includes: at least one processor 1101, a memory 1102, a bus 1103 and a communication interface 1104. In the embodiment, the processor, the communication interface and the memory communicate with each other through the bus. The communication interface is used to communicate with other devices. The communication interface includes a communication interface for data transmission and a display interface or an operation interface for human-computer interaction. The processor is used to execute computer execution instructions, and specifically can execute the relevant steps in the method described in the above embodiment.
[0299] The processor may be a central processing unit, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs. The memory is used to store computer execution instructions. The memory may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
[0300] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When at least one processor of an electronic device executes the computer instructions, the electronic device executes the methods provided in the above-mentioned various implementation modes.
[0301] This embodiment also provides a computer program product, which includes computer instructions. The computer instructions are stored in a readable storage electronic device. At least one processor can read the computer instructions from the readable storage medium. At least one processor executes the computer instructions so that the electronic device implements the methods provided by the above-mentioned various embodiments.
[0302] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0303] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0304] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0305] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0306] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0307] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0308] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0309] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0310] It is to be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not intended to limit the scope of the embodiments of the present application. In the embodiments of the present application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0311] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for determining an object category, characterized in that: include: Obtaining sample data of an object to be classified, a trained feature extraction model, a trained feature dimension reduction model, and a trained classifier model, wherein the feature extraction model is obtained by training based on an expanded training data set, and the expanded training data set is obtained by performing data expansion on the training data before expansion using a generative adversarial network based on quantum state meta-learning; Based on the sample data and the feature extraction model, obtaining a first new sample after feature extraction; Based on the first new sample and the feature dimension reduction model, obtaining a second new sample after feature dimension reduction; Based on the second new sample and the classifier model, a classification result is obtained as the category of the object to be classified.
2. The method according to claim 1, characterized in that The generative adversarial network based on quantum state meta-learning is trained through the following steps: S201: Initializing parameters of a generator, parameters of a discriminator, and quantum state encoding parameters in the generative adversarial network, wherein the generator is used to generate data, and the discriminator is used to determine the authenticity of the data; S202: based on the quantum state encoding parameter, converting the original data vector into quantum encoded data; S203: Fix the parameters of the discriminator, and update the parameters of the generator with the goal of minimizing a first loss function associated with the quantum encoded data; S204: Fixing the parameters of the generator, and updating the parameters of the discriminator with the goal of maximizing the ability of the generative adversarial network to distinguish between generated data and real data; S205: adjusting quantum state encoding parameters to optimize the quality of data generated after quantum encoding; S206: Repeat the above steps S202 to S205 until the first stop iteration condition is met.
3. The method according to claim 2, characterized in that The converting the original data vector into quantum-encoded data includes: Based on the set quantum coding function, the i-th element in the original data vector and the quantum coding parameter corresponding to the i-th element, the i-th element is converted into a quantum code, where i takes a value of [1, n]; The quantum codes obtained by transforming each element are superimposed to obtain the quantum coded data.
4. The method according to claim 2, characterized in that: The updating of the parameters of the generator with the goal of minimizing a first loss function associated with the quantum encoded data comprises: Determining the first loss function based on the output of the discriminator, the output of the generator, the set regularization parameter, the first quantum coded data, and the second quantum coded data, wherein the first quantum coded data is the quantum coded data corresponding to the input noise vector, and the second quantum coded data is the quantum coded data corresponding to the target generated data, and the target generated data is generated by the generator based on the input noise vector; With the goal of minimizing the first loss function, the updated generator parameters are determined based on the set learning rate, the gradient of the generator parameters, and the generator parameters before updating.
5. The method according to claim 2, characterized in that: The adjusting of the quantum state encoding parameters includes: Determine a quantum state loss function based on a set adjustment rate, second quantum coded data, and third quantum coded data, wherein the third quantum coded data is quantum coded data corresponding to the i-th element in the original data vector; Based on the quantum state loss function, the gradient of the quantum state parameters, the set adjustment rate, the quantum state coding parameters before and after the update, the generator parameters and the discriminator parameters, the updated quantum state coding parameters are determined.
6. The method according to claim 1, characterized in that The feature extraction model is a neural network optimized based on a topology adaptation learning algorithm, and the feature extraction model is trained through the following steps: S301: Initializing the parameters and topological structure of the neural network; S302: Obtain a second loss function of the neural network to determine a current loss; S303: Determine a topology adjustment index based on the current loss and the topology structure; S304: determining an optimization object according to a magnitude relationship between the topology adjustment index and a preset index threshold, wherein the optimization object is a parameter of the neural network or a topological structure of the neural network; S305: If the optimization object is the parameters of the neural network, the parameters of the neural network are adjusted according to the set parameter adjustment rules; S306: If the optimization object is the topological structure of the neural network, the topological structure of the neural network is adjusted according to the set topological adjustment rule; S307: Repeat steps S302 to S306 until a second iteration stop condition is met.
7. The method according to claim 6, characterized in that The obtaining of a second loss function of the neural network comprises: Obtaining a prediction error based on the actual label of the i-th element and the predicted label of the i-th element in the expanded training data set; Determining a topology adaptability penalty based on a rate of change of the topology structure; The second loss function is obtained based on the set topology weight hyperparameter, the prediction error and the topology adaptability penalty.
8. The method according to claim 6, characterized in that The step of adjusting the parameters of the neural network according to the set parameter adjustment rules includes: Determining a gradient of the weight parameter based on the second loss function and the weight parameter of the neural network; Determining a gradient of the bias parameter based on the second loss function and a bias parameter of the neural network; Determine the adjusted weight parameter based on the current learning rate, the weight parameter before adjustment, and the gradient of the weight parameter, wherein the current learning rate is obtained by optimizing the learning rate and the adjustment factor in the last iteration; An adjusted bias parameter is determined based on the current learning rate, the bias parameter before adjustment, and the gradient of the bias parameter.
9. The method according to claim 6, characterized in that The step of adjusting the topological structure of the neural network according to the set topological adjustment rule includes: determining an accuracy of the neural network based on a prediction error and a maximum possible error of the neural network; Determining the output stability of the neural network based on the predicted labels of each element and the average of all predicted labels; Determining a performance monitoring function based on the set weight values, the output stability and accuracy; Determining an adaptive adjustment factor based on the performance monitoring function, the sensitivity of the adjustment, and an upper limit of the adjustment rate; Based on the adaptive adjustment factor, the topology adjustment direction, and the topology structure before adjustment, the adjusted topology structure is determined.
10. The method according to claim 1, characterized in that The feature dimension reduction model is an autoencoding neural network with a micro-adjustable strategy. The autoencoding neural network includes an encoder and a decoder. The encoder is used to compress the high-dimensional features after input feature extraction into low-dimensional features. The decoder is used to reconstruct the original high-dimensional data based on the low-dimensional features. The feature dimension reduction model is trained by the following steps: S401: Initializing weight parameters and bias parameters of the autoencoder neural network; S402: Based on the high-dimensional features, the initialized encoder and decoder, obtain low-dimensional features and original high-dimensional data obtained by decoding the low-dimensional features; S403: Determine a total loss function based on the original high-dimensional data and the low-dimensional features; S404: updating the weight parameters and bias parameters of the autoencoder neural network according to the total loss function; S405: Repeat steps S402 to S404 until a third iteration stop condition is met.
11. The method according to claim 10, characterized in that Also includes: Based on the learnable adjustment factor and the set adjustment parameters, the final output of the encoder is fine-tuned.
12. The method according to claim 11, characterized in that Also includes: The learnable adjustment factor is determined based on a k-th encoded feature of the encoder, a weight from the k-th encoded feature to the adjustment factor, and a bias of the adjustment factor.
13. The method according to claim 10, characterized in that The determining of the total loss function based on the original high-dimensional data and the low-dimensional features comprises: The total loss function is calculated based on the number of original data input to the feature dimensionality reduction model, the i-th original data point, the i-th reconstructed data point, the dual loss function, the target low-dimensional feature space, and the weight factor of the dual loss.
14. The method according to claim 13, characterized in that Also includes: The dual loss function is calculated according to the i-th feature dimension after encoding and the i-th feature dimension in the target low-dimensional feature space.
15. The method according to claim 1, characterized in that The classifier model is a random forest classification algorithm based on participation restriction, and the classifier model is trained through the following steps: S501: Initialize the number of decision trees, maximum depth, and minimum number of sample splits in the random forest; S502: Setting an initial participation limit for each decision tree; S503: Construct multiple decision trees in parallel on different random subsets of the training data of the classifier model; S504: When constructing the decision tree, dynamically adjust the participation limit of the decision tree according to the performance of the decision tree; S505, determining the final classification result based on the prediction results of all decision trees; S506: Repeat iterative training of the classifier model until the final classification result satisfies a fourth iteration stopping condition.
16. The method according to claim 15, characterized in that The initial participation limit is set for each decision tree, including: Determine the maximum number of features based on the set feature selection ratio coefficient and the total number of features; Determine the maximum number of samples based on the set sample selection ratio coefficient and the total number of samples; The maximum number of features and the maximum number of samples are used as initial participation limits of the decision tree.
17. The method according to claim 15, characterized in that The dynamically adjusting the participation limit of the decision tree according to the performance of the decision tree includes: Based on the prediction accuracy, expected accuracy, feature adjustment coefficient and maximum number of features of the i-th decision tree, determine the number of features used by the i-th decision tree during iterative training; Based on the prediction accuracy, expected accuracy, sample adjustment coefficient and maximum number of samples of the ith decision tree, the number of samples used by the ith decision tree in iterative training is determined.
18. The method according to claim 17, characterized in that Also includes: The sample adjustment coefficient and the feature adjustment coefficient are determined based on the standard deviation parameter in the adjustment process, the number of current iterative training, the prediction accuracy and the expected accuracy.
19. An object category determination device, characterized in that: include: A model acquisition module, used to acquire sample data of the object to be classified, a feature extraction model after training, a feature dimension reduction model after training, and a classifier model after training, wherein the feature extraction model is obtained by training based on an expanded training data set, and the expanded training data set is obtained by data expansion of the training data before expansion based on a generative adversarial network based on quantum state meta-learning; A feature extraction module, used for acquiring a first new sample after feature extraction based on the sample data and the feature extraction model; A feature dimension reduction module, used for obtaining a second new sample after feature dimension reduction based on the first new sample and the feature dimension reduction model; A classification module is used to obtain a classification result based on the second new sample and the classifier model as the category of the object to be classified.
20. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 18.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 18 when executed by a processor.
22. A computer program product, comprising a computer program, which implements the method according to any one of claims 1 to 18 when executed by a processor.
Citation Information
Cited By
Engineering patrol robot positioning method based on multi-sensor data fusion
CN119803482A
Machine room equipment operation and maintenance data classification method and system based on artificial intelligence
CN120257132A
Well drilling leakage identification method based on artificial intelligence
CN121434938A
