A method for element identification and prediction applied to potassium and magnesium sulfate

By applying the element recognition prediction method of the MoINexTR neural network architecture in potassium magnesium sulfate fertilizer, using image processing and neural network technology, the real-time, convenience and efficiency of fertilizer element recognition in the existing technology is solved, and fast and accurate fertilizer element recognition and quality control are achieved.

CN119049579BActive Publication Date: 2025-05-09CHONGQING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411351548.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-05-09
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The prior art has shortcomings in real-time, convenience, cost and efficiency in the identification and quality control of potassium magnesium sulfate fertilizers, especially in rapid testing and large-scale production in fields or production sites.

Method used

The element recognition prediction method based on the MoINexTR neural network architecture is adopted, and the fertilizer image is collected and the convolutional neural network and Transformer model are used to achieve rapid and accurate identification of elements such as potassium, magnesium and sulfate in fertilizer.

Benefits of technology

It improves the accuracy and speed of element identification, reduces cost and operational complexity, and can quickly and efficiently analyze fertilizer quality in environments with limited resources to meet the needs of modern agriculture and industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119049579B_ABST
    Figure CN119049579B_ABST
Patent Text Reader

Abstract

The invention discloses an element identification and prediction method applied to potassium magnesium sulfate, and relates to the field of element prediction algorithms. The invention uses a MoINeXTR network, and combines the specific physical and chemical properties of magnesium sulfate fertilizer, so that the network can more accurately identify and predict various elements and contents in the fertilizer. The optimized network parameters and structure can better handle the complex chemical bonds and element distribution in the potassium magnesium sulfate fertilizer, thereby improving the recognition accuracy and the accuracy of fertilizer quality evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of element prediction algorithms, and in particular to an element identification prediction method applied to potassium and magnesium sulfates. Background Art

[0002] As a compound fertilizer, potassium magnesium sulfate fertilizer is widely used to increase crop yields and improve soil quality because it contains key elements such as potassium, magnesium and sulfur. In existing technologies, the production and quality control of potassium magnesium sulfate fertilizer mainly rely on chemical analysis methods such as titration, spectral analysis and mass spectrometry. These methods determine the elemental content of fertilizer samples by measuring specific chemical components. For example, the concentrations of potassium, magnesium and sulfate can be accurately determined by atomic absorption spectroscopy (AAS) or inductively coupled plasma mass spectrometry (ICP-MS). These techniques usually require professional chemical laboratory equipment and well-trained technicians to operate, so they are costly and time-consuming.

[0003] In terms of elemental judgment, although traditional chemical analysis methods are accurate, they often lack real-time and convenience. For example, when farmers or fertilizer manufacturers need to quickly judge the quality of fertilizers in the field or at the production site, traditional laboratory analysis methods are not practical enough. In addition, these methods are inefficient when processing a large number of samples, making it difficult to meet the needs of modern agriculture and industrial production for fast and efficient analysis methods.

[0004] Although traditional chemical analysis methods have advantages in accuracy, they have some obvious limitations in practical applications. First, these methods usually require destructive sample processing, which means that a certain amount of fertilizer sample will be consumed for each analysis, which is not suitable for precious or limited sample analysis. Secondly, since professional equipment and personnel are required, these methods are high in cost and operational complexity, which is not conducive to use in resource-limited environments. In addition, traditional methods are also insufficient in analysis speed and cannot meet the needs of rapid detection, especially in large-scale production and real-time monitoring.

[0005] More importantly, existing technologies often have difficulty in providing sufficient information to fully understand the chemical state and bioavailability of fertilizers when dealing with complex samples. For example, the chemical forms of elements in fertilizers and their interactions are crucial to plant nutrient absorption, but traditional chemical analysis methods have difficulty providing detailed information in this regard. Summary of the invention

[0006] In view of the defects of the prior art, the present invention proposes a method for identifying and predicting elements of potassium sulfate and magnesium fertilizers based on the MoINexTR neural network architecture. By collecting fertilizer images and using convolutional neural networks and Transformer models, rapid and accurate identification of elements such as potassium, magnesium and sulfate in fertilizers is achieved.

[0007] Among them, an element identification prediction method applied to potassium magnesium sulfate comprises the following steps:

[0008] S1. Collecting images of potassium magnesium sulfate fertilizer containing elements and molecular structures, processing the images to form an image data set, annotating the image data in the image data set, and recording the atomic types and bond types contained in the image data;

[0009] S2. Extract features from the image dataset using a convolutional neural network based on atom types and bond types;

[0010] S3. Use the extracted features as model input to build and train the MoINexTR neural network model;

[0011] S4. Input new data and output element type prediction results through the trained MoINexTR neural network model;

[0012] Among them, in step S2, feature extraction specifically includes local feature extraction and global feature extraction, the local feature extraction is to extract the chemical structure and interaction around the atoms in the image data as features, and the global feature extraction is to extract the overall structure of the molecules or compounds in the image data as features.

[0013] Furthermore, in step S2, the local feature extraction is specifically to perform convolution operations on the local features of the potassium element and the magnesium element respectively through a convolutional neural network.

[0014] Furthermore, the convolution operation on the local features of potassium and magnesium by using the convolutional neural network is specifically expressed as follows:

[0015]

[0016] Among them, the Represents the local characteristics of potassium element, Representing the local features of magnesium, the CNN K and CNN Mg Respectively represent the convolution operation for the local features of potassium and magnesium, the I resize Represents the resized image.

[0017] Furthermore, in step S2, the global feature extraction is specifically to perform a convolution operation on the global features of sulfate through a convolutional neural network.

[0018] Furthermore, the convolution operation on the global features of sulfate by the convolutional neural network is specifically expressed as:

[0019]

[0020] Among them, the represents the global characteristics of sulfate, represents a convolution operation for the global feature of sulfate radical, wherein I resize Represents the resized image.

[0021] Furthermore, the step S3 includes the following sub-steps:

[0022] S301. The interactions between different elements are captured through the self-attention mechanism of Transformer to obtain a comprehensive feature representation, which is further processed through normalization and feedforward network to obtain the final features, where the interactions include the binding mode of potassium and sulfate, and the binding structure of magnesium ions in magnesium sulfate;

[0023] S302. Process the output of the Transformer according to the classifier and output the element type prediction result.

[0024] Furthermore, in step S301, the interaction between different elements is captured by the self-attention mechanism of Transformer, and the comprehensive feature representation is specifically expressed as:

[0025]

[0026] Wherein, H represents the feature representation obtained by the self-attention mechanism, Represents the local characteristics of potassium element, Represents the local characteristics of magnesium element, Represents the global characteristics of sulfate.

[0027] Furthermore, in step S301, further processing is performed through normalization and feedforward network to obtain the final feature specifically represented as:

[0028] H′=LayerNorm(H+FeedForward(H));

[0029] Among them, H' represents the final feature processed by normalization and feedforward network.

[0030] Furthermore, in step S302, the output element type prediction result is specifically expressed as:

[0031] For potassium, the following predictions are made:

[0032]

[0033] For magnesium, the following predictions are made:

[0034]

[0035] For sulfate, make a prediction:

[0036]

[0037] Among them, the It indicates the prediction of potassium type. It indicates the prediction of the type of magnesium element. represents the prediction of sulfate type, the W K , W Mg and Respectively represent the weight matrices for potassium, magnesium and sulfate, and the b k , b Mg and represent the bias vectors for potassium, magnesium and sulfate, respectively.

[0038] Further, the step S3 also includes step S303, setting weight parameters for the elements in the potassium magnesium sulfate fertilizer, and designing a cross entropy loss function according to the weight parameters of different elements, and the cross entropy loss function is specifically expressed as:

[0039]

[0040] Among them, the represents the loss function, N represents the total number of training samples, and λ K , Mg and Respectively represent the loss weights of potassium, magnesium and sulfate, and the y Ki represents the actual presence label of potassium in sample i, the y Mgi represents the actual presence label of magnesium element in sample i, represents the actual presence label of sulfate in sample i, the y Ki represents the probability of the presence of potassium in sample i predicted by the model, and the y Mgi represents the probability of the existence of magnesium in sample i predicted by the model, It represents the probability of the presence of sulfate in sample i predicted by the model.

[0041] The beneficial effects of the invention are:

[0042] The present invention uses the MoINeXTR network and combines the specific physical and chemical properties of magnesium sulfate fertilizer, so that the network can more accurately identify and predict various elements and contents in the fertilizer. The optimized network parameters and structure can better handle the complex chemical bonds and element distribution in potassium magnesium sulfate fertilizer, thereby improving the recognition accuracy and the accuracy of fertilizer quality evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A method flow chart of an element identification prediction method applied to potassium and magnesium sulfate provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.

[0045] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0046] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention. It should be noted that relational terms such as the terms "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0047] Moreover, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus. In the absence of more restrictions, an element defined by the phrase "comprises a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0048] The features and performance of the present invention are further described in detail below in conjunction with the embodiments.

[0049] Among them, Figure 1 , an element identification prediction method applied to potassium and magnesium sulfate, comprising the following steps:

[0050] S1. Collecting images of potassium magnesium sulfate fertilizer containing elements and molecular structures, processing the images to form an image data set, annotating the image data in the image data set, and recording the atomic types and bond types contained in the image data;

[0051] S2. Extract features from the image dataset using a convolutional neural network based on atom types and bond types;

[0052] S3. Use the extracted features as model input to build and train the MoINexTR neural network model;

[0053] S4. Input new data and output element type prediction results through the trained MoINexTR neural network model;

[0054] Among them, in step S2, feature extraction specifically includes local feature extraction and global feature extraction, the local feature extraction is to extract the chemical structure and interaction around the atoms in the image data as features, and the global feature extraction is to extract the overall structure of the molecules or compounds in the image data as features.

[0055] Specifically, in the above embodiment, a CNN neural network is used to extract features, and its network architecture is specifically as follows: the size of the convolution kernel affects the locality of feature extraction. In this embodiment, a smaller convolution kernel (such as 3x3 or 5x5) is used to capture the local features of potassium and magnesium elements, and a larger convolution kernel (such as 7x7 or larger) is used to capture the global features of sulfate. For identifying the environment around atoms, a smaller convolution kernel is required to capture details, while for capturing the features of the entire molecular structure, a larger convolution kernel is required. Among them, local features focus on small areas or single elements in images or molecular structures, describing the environment of specific atoms or small molecular groups, such as the types and numbers of atoms and bonds connected around them, and are usually used to capture detailed information, such as edges, textures, and local shapes; while global features describe the overall properties of the entire image or molecule, including the geometric structure, symmetry, electronic distribution, and functional groups of the entire molecule, and are usually used to capture the overall structure and layout, such as the three-dimensional shape and overall chemical properties of the molecule.

[0056] Furthermore, in step S2, the local feature extraction is specifically to perform convolution operations on the local features of the potassium element and the magnesium element respectively through a convolutional neural network.

[0057] Furthermore, the convolution operation on the local features of potassium and magnesium by using the convolutional neural network is specifically expressed as follows:

[0058]

[0059] Among them, the Represents the local characteristics of potassium element, Representing the local features of magnesium, the CNN K and CNN Mg Respectively represent the convolution operation for the local features of potassium and magnesium, the Iresize Represents the resized image.

[0060] Specifically, the above embodiment includes a CNN architecture with two branches, each branch specifically processes one element, wherein: for the CNN branch of potassium element, the network structure is:

[0061] First layer: Use 32 3x3 convolution kernels with a stride of 1 and padding of 'same' to keep the output size unchanged.

[0062] Activation function: ReLU.

[0063] Second layer: Use 32 3x3 convolution kernels, stride 1, and padding 'same'.

[0064] Activation function: ReLU.

[0065] Pooling layer: 2x2 max pooling with a stride of 2.

[0066] For the CNN branch of magnesium, the network structure is:

[0067] First layer: use 32 3x3 convolution kernels, stride 1, padding 'same';

[0068] Activation function: ReLU;

[0069] Second layer: use 64 3x3 convolution kernels with a stride of 1 and padding of 'same' to increase the receptive field;

[0070] Activation function: ReLU;

[0071] Pooling layer: 2x2 max pooling with a stride of 2.

[0072] Furthermore, in step S2, the global feature extraction is specifically to perform a convolution operation on the global features of sulfate through a convolutional neural network.

[0073] Furthermore, the convolution operation on the global features of sulfate by the convolutional neural network is specifically expressed as:

[0074]

[0075] Among them, the represents the global characteristics of sulfate, represents a convolution operation for the global feature of sulfate radical, wherein I resize Represents the resized image.

[0076] Specifically, the CNN network structure for sulfate in the above embodiment is as follows:

[0077] First layer: Use a larger number of convolution kernels (64 3x3 convolution kernels);

[0078] Activation function: ReLU;

[0079] Pooling layer: Use a 2x2 or larger pooling window for downsampling to reduce the spatial size of the feature map while retaining important features;

[0080] Deep network: add more convolutional layers and pooling layers, each followed by a ReLU activation function to gradually extract higher-level global features;

[0081] Fully connected layer: A fully connected layer is used at the end of the network to integrate all features;

[0082] After the last convolutional layer, a global average pooling layer is used to reduce the spatial dimensions (width and height) of each feature map to 1, generating a fixed-length feature vector.

[0083] Furthermore, the step S3 includes the following sub-steps:

[0084] S301. The interactions between different elements are captured through the self-attention mechanism of Transformer to obtain a comprehensive feature representation, which is further processed through normalization and feedforward network to obtain the final features, where the interactions include the binding mode of potassium and sulfate, and the binding structure of magnesium ions in magnesium sulfate;

[0085] S302. Process the output of the Transformer according to the classifier and output the element type prediction result.

[0086] Furthermore, in step S301, the interaction between different elements is captured by the self-attention mechanism of Transformer, and the comprehensive feature representation is specifically expressed as:

[0087]

[0088] Wherein, H represents the feature representation obtained by the self-attention mechanism, Represents the local characteristics of potassium element, Represents the local characteristics of magnesium element, Represents the global features of sulfate. Specifically, in the image of potassium magnesium sulfate fertilizer, some elements (potassium, magnesium) may appear more frequently than other elements (sulfate). The self-attention mechanism can help the model pay more attention to less common elements, thereby alleviating the category imbalance problem to a certain extent. The self-attention mechanism plays a role in improving feature extraction capabilities, enhancing model performance and interpretability in the MolNexTR neural network, enabling the model to more accurately identify and analyze the chemical elements in potassium magnesium sulfate fertilizer.

[0089] Furthermore, in step S301, further processing is performed through normalization and feedforward network to obtain the final feature specifically represented as:

[0090] H′=LayerNorm(H+FeedForward(H));

[0091] Among them, H' represents the final feature processed by normalization and feedforward network.

[0092] Furthermore, in step S302, the output element type prediction result is specifically expressed as:

[0093] For potassium, the following predictions are made:

[0094]

[0095] For magnesium, the following predictions are made:

[0096]

[0097] For sulfate, make a prediction:

[0098]

[0099] Among them, the It indicates the prediction of potassium type. It indicates the prediction of the type of magnesium element. represents the prediction of sulfate species, the Wk, W Mg and Respectively represent the weight matrices for potassium, magnesium and sulfate, and the b k , b Mg and represent the bias vectors for potassium, magnesium and sulfate, respectively.

[0100] Further, the step S3 also includes step S303, setting weight parameters for the elements in the potassium magnesium sulfate fertilizer, and designing a cross entropy loss function according to the weight parameters of different elements, and the cross entropy loss function is specifically expressed as:

[0101]

[0102] Among them, the represents the loss function, N represents the total number of training samples, and λ K , Mg and Respectively represent the loss weights of potassium, magnesium and sulfate, and the y Ki represents the actual presence label of potassium in sample i, the y Mgi represents the actual presence label of magnesium element in sample i, represents the actual presence label of sulfate in sample i, the y Ki represents the probability of the presence of potassium in sample i predicted by the model, and the y Mgi represents the probability of the existence of magnesium in sample i predicted by the model, It represents the probability of the presence of sulfate in sample i predicted by the model.

[0103] Further, as a preferred technical solution of this embodiment, an element identification prediction system applied to potassium and magnesium sulfate is proposed, comprising:

[0104] A data acquisition module is used to acquire images of potassium magnesium sulfate fertilizers containing elements and molecular structures, process the images to form image data sets, annotate the image data in the image data sets, and record the atomic types and bond types contained in the image data;

[0105] The feature extraction module is used to extract features from the image dataset through a convolutional neural network according to the atom type and bond type; the model construction module uses the extracted features as model input to build and train the MoINexTR neural network model;

[0106] The data prediction module is used to input new data and output the element type prediction results through the trained MoINexTR neural network model;

[0107] Among them, in the feature extraction module, feature extraction specifically includes local feature extraction and global feature extraction. The local feature extraction is to extract the chemical structure and interaction around the atoms in the image data as features, and the global feature extraction is to extract the overall structure of the molecules or compounds in the image data as features.

[0108] Furthermore, in the feature extraction module, local feature extraction is specifically performed by respectively performing convolution operations on local features of potassium and magnesium through a convolutional neural network.

[0109] Furthermore, the convolution operation on the local features of potassium and magnesium by using the convolutional neural network is specifically expressed as follows:

[0110]

[0111] Among them, the Represents the local characteristics of potassium element, Representing the local features of magnesium, the CNN K and CNN Mg Respectively represent the convolution operation for the local features of potassium and magnesium, the I resize Represents the resized image.

[0112] Furthermore, in the feature extraction module, global feature extraction is specifically performed a convolution operation on the global features of sulfate through a convolutional neural network.

[0113] Furthermore, the convolution operation on the global features of sulfate by the convolutional neural network is specifically expressed as:

[0114]

[0115] Among them, the represents the global characteristics of sulfate, represents a convolution operation for the global feature of sulfate radical, wherein I resize Represents the resized image.

[0116] Furthermore, the model building module includes the following sub-steps:

[0117] The feature input unit is used to capture the interactions between different elements through the self-attention mechanism of the Transformer to obtain a comprehensive feature representation, which is further processed through normalization and a feedforward network to obtain the final features, where the interactions include the binding mode of potassium and sulfate, and the binding structure of magnesium ions in magnesium sulfate;

[0118] The prediction output unit is used to process the output of the Transformer according to the classifier and output the element type prediction result.

[0119] Furthermore, in the feature input unit, the interaction between different elements is captured through the self-attention mechanism of Transformer, and the comprehensive feature representation is specifically expressed as:

[0120]

[0121] Wherein, H represents the feature representation obtained by the self-attention mechanism, Represents the local characteristics of potassium element, Represents the local characteristics of magnesium element, Represents the global characteristics of sulfate.

[0122] Furthermore, in the feature input unit, further processing is performed through normalization and feedforward network to obtain the final feature specifically expressed as:

[0123] H′=LayerNorm(H+FeedForward(H));

[0124] Among them, H' represents the final feature processed by normalization and feedforward network.

[0125] Furthermore, in the prediction output unit, the output element type prediction result is specifically expressed as:

[0126] For potassium, the following predictions are made:

[0127]

[0128] For magnesium, the following predictions are made:

[0129]

[0130] For sulfate, make a prediction:

[0131]

[0132] Among them, the It indicates the prediction of potassium type. It indicates the prediction of the type of magnesium element. represents the prediction of sulfate type, the W K , W Mg and Respectively represent the weight matrices for potassium, magnesium and sulfate, and the b k , b Mg and represent the bias vectors for potassium, magnesium and sulfate, respectively.

[0133] Furthermore, the model building module also includes a loss function definition unit, which is used to set weight parameters for elements in potassium magnesium sulfate fertilizer, and design a cross entropy loss function according to the weight parameters of different elements. The cross entropy loss function is specifically expressed as:

[0134]

[0135] Among them, the represents the loss function, N represents the total number of training samples, and λ K , Mg and Respectively represent the loss weights of potassium, magnesium and sulfate, and the y Kirepresents the actual presence label of potassium in sample i, the y Mgi represents the actual presence label of magnesium element in sample i, represents the actual presence label of sulfate in sample i, the y Ki represents the probability of the presence of potassium in sample i predicted by the model, and the y Mgi represents the probability of the existence of magnesium in sample i predicted by the model, It represents the probability of the presence of sulfate in sample i predicted by the model.

[0136] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. An element identification prediction method applied to potassium and magnesium sulfate, characterized in that: The following steps are involved: S1. Collecting images of potassium magnesium sulfate fertilizer containing elements and molecular structures, processing the images to form an image data set, annotating the image data in the image data set, and recording the atomic types and bond types contained in the image data; S2. Feature extraction of image datasets using convolutional neural networks based on atom types and bond types; S3. Use the extracted features as model input to build and train the MoINexTR neural network model; S4. Input new data and output element type prediction results through the trained MoINexTR neural network model; Wherein, in step S2, feature extraction specifically includes local feature extraction and global feature extraction, wherein the local feature extraction is to extract the chemical structure and interaction around the atoms in the image data as features, and the global feature extraction is to extract the overall structure of the molecules or compounds in the image data as features; The step S3 comprises the following sub-steps: S301. The interactions between different elements are captured through the self-attention mechanism of Transformer to obtain a comprehensive feature representation, which is further processed through normalization and feedforward network to obtain the final features, where the interactions include the binding mode of potassium and sulfate, and the binding structure of magnesium ions in magnesium sulfate; S302. Process the output of the Transformer according to the classifier and output the element type prediction result.

2. The element identification prediction method applied to potassium and magnesium sulfate according to claim 1, characterized in that: In step S2, the local feature extraction is specifically to perform convolution operations on the local features of potassium and magnesium respectively through a convolutional neural network.

3. The element identification prediction method applied to potassium and magnesium sulfate as claimed in claim 2, characterized in that: The convolution operation of the local features of potassium and magnesium by the convolutional neural network is specifically expressed as follows: ; ; Among them, the Represents the local characteristics of potassium element, Represents the local characteristics of magnesium element, and Respectively represent the convolution operation for the local features of potassium and magnesium. Represents the resized image.

4. The element identification prediction method applied to potassium and magnesium sulfate according to claim 1, characterized in that: In step S2, the global feature extraction is specifically to perform a convolution operation on the global features of sulfate through a convolutional neural network.

5. The element identification prediction method applied to potassium and magnesium sulfate according to claim 4, characterized in that: The convolution operation on the global features of sulfate by the convolutional neural network is specifically expressed as: ; Among them, the represents the global characteristics of sulfate, represents a convolution operation on the global features of sulfate. Represents the resized image.

6. The element identification prediction method applied to potassium and magnesium sulfate according to claim 1, characterized in that: In step S301, the interaction between different elements is captured by the self-attention mechanism of Transformer, and the comprehensive feature representation is specifically expressed as: ; Among them, the represents the feature representation obtained by the self-attention mechanism. Represents the local characteristics of potassium element, Represents the local characteristics of magnesium element, Represents the global characteristics of sulfate.

7. The element identification prediction method applied to potassium and magnesium sulfate according to claim 1, characterized in that: In step S301, further processing is performed through normalization and feedforward network to obtain the final feature, which is specifically expressed as: ; Among them, the Represents the final features processed by normalization and feed-forward network.

8. The element identification prediction method applied to potassium and magnesium sulfate according to claim 1, characterized in that: In step S302, the output element type prediction result is specifically expressed as: For potassium, the following predictions are made: ; For magnesium, the following predictions are made: ; For sulfate, make a prediction: ; Among them, the It indicates the prediction of potassium type. It indicates the prediction of the type of magnesium element. represents the prediction of sulfate species, , and Respectively represent the weight matrices for potassium, magnesium and sulfate, , and are the bias vectors for potassium, magnesium, and sulfate, respectively.

9. The element identification prediction method applied to potassium and magnesium sulfate according to claim 1, characterized in that: The step S3 also includes step S303, setting weight parameters for the elements in the potassium magnesium sulfate fertilizer, and designing a cross entropy loss function according to the weight parameters of different elements, wherein the cross entropy loss function is specifically expressed as: Among them, the represents the loss function, Represents the total number of training samples. , and Respectively represent the loss weights of potassium, magnesium and sulfate, Representation sample The actual presence of potassium in the label, Representation sample The actual presence of magnesium in the label, Representation sample The actual presence of sulfate in the label, Represents the model prediction sample The probability of the presence of potassium in Represents the model prediction sample The probability of the presence of magnesium in Represents the model prediction sample The probability of the presence of sulfate in the medium.

Citation Information

Patent Citations

  • Molecular property prediction method and system based on graph neural network

    CN115274008A

  • Transform and graph neural network-combined drug target interaction prediction method

    CN116417093A