Crystal space group identification method, device, equipment, medium and product
By introducing superclass information of crystal structures into deep learning models as supervised training, the problem of low accuracy of crystal space group recognition in the prior art is solved, and the effect of higher recognition accuracy and reduced confusion is achieved.
Patent Information
- Application Number
- CN202510380664.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-27
AI Technical Summary
Existing deep learning models have low accuracy in crystal space group recognition and are prone to confusion.
By using the superclass information of the crystal structure as a supervised training of the spatial group recognition model, the model learns chemistry theory, thereby improving the accuracy of spatial group recognition.
It improves the accuracy of crystal space group recognition and reduces confusion in recognition results.
Smart Images

Figure CN120220924A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method, apparatus, device, medium and product for identifying the space group of crystals. Background Art
[0002] The development of deep learning has greatly affected the research paradigms of traditional sciences and has been widely applied in many fields such as physics, chemistry, biology, and materials science, promoting cross-disciplinarity and cooperation between different disciplines. Researchers initially used deep learning models to process massive amounts of scientific data and gradually replaced complex and time-consuming manual operations in traditional scientific paradigms with domain-specific deep learning models, greatly improving research efficiency and liberating the mind.
[0003] Currently, in crystal materials science, more and more researchers are committed to exploring how to apply deep learning to spectroscopy to infer the symmetry properties of crystals. Although the application of deep learning models such as convolutional networks has achieved certain results in the space group identification task, existing deep learning models usually directly extract features and classify crystal spectral data. It is difficult for deep learning models to comprehensively capture the crystal structure features in crystal spectral data, and the output space group identification results often do not conform to chemical theory, resulting in serious problems of confusion in space group identification. Figure 1 are schematic diagrams of the crystal structures of 4 types of crystal materials that are prone to confusion in space group identification, as Figure 1 shown as I4, P4, Four types of space groups. In terms of lattice type, they are divided into two categories, I and P, representing body-centered lattice and primitive lattice respectively. In terms of point group type, they are divided into two categories, 4 and -4, representing 4-fold rotation axis and 4-fold inversion rotation axis respectively. There are overlaps in the crystal structure features among the above four types of space groups, and confusion is likely to occur during the classification process. Summary of the Invention
[0004] The present invention provides a method, apparatus, device, medium and product for identifying the space group of crystals to solve the problem of low accuracy in crystal space group identification. By using the superclass information of the crystal structure as supervision to train the space group identification model, the space group identification model can learn chemical theory, improve the accuracy of space group identification, and avoid confusion in space group identification.
[0005] According to one aspect of the present invention, there is provided a method for identifying the space group of crystals, the method comprising:
[0006] Obtaining spectral data of a target crystal material;
[0007] Based on the spectral data of the target crystal material and a pre-trained space group identification model, determining a space group identification result of the target crystal material;
[0008] Among them, the space group recognition model is obtained by training a pre-constructed convolutional neural network based on the spectral data of crystal material samples and the reference structure types of crystal material samples; the reference structure types include the reference types of space groups and the reference types of superclasses; the superclasses include at least one superclass of space groups.
[0009] According to another aspect of the present invention, there is provided a device for recognizing the space group of a crystal, the device comprising:
[0010] A spectral data acquisition module, configured to acquire the spectral data of a target crystal material;
[0011] An identification result determination module, configured to determine the space group identification result of the target crystal material based on the spectral data of the target crystal material and a pre-trained space group recognition model;
[0012] Among them, the space group recognition model is obtained by training a pre-constructed convolutional neural network based on the spectral data of crystal material samples and the reference structure types of crystal material samples; the reference structure types include the reference types of space groups and the reference types of superclasses; the superclasses include at least one superclass of space groups.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0014] At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the method for recognizing the space group of a crystal according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, there is provided a computer-readable storage medium, the computer-readable storage medium storing computer instructions, and when the computer instructions are executed by a processor, the method for recognizing the space group of a crystal according to any embodiment of the present invention is implemented.
[0016] According to another aspect of the present invention, there is provided a computer program product, including a computer program, and when the computer program is executed by a processor, the method for recognizing the space group of a crystal according to any embodiment of the present invention is implemented.
[0017] In the technical solution of the embodiment of the present invention, by obtaining the spectral data of the target crystal material, based on the spectral data of the target crystal material, and using a pre-trained space group recognition model, the space group recognition result of the target crystal material is determined; wherein, the space group recognition model is obtained by training a pre-constructed convolutional neural network based on the spectral data of crystal material samples and the reference structure types of crystal material samples; the reference structure types include the reference types of space groups and the reference types of superclasses; the superclasses include at least one superclass of the space group. This technical solution solves the problem of low accuracy in crystal space group recognition. By using the superclass information of the crystal structure as the supervision for training the space group recognition model, the space group recognition model can learn chemical theories, improve the accuracy of space group recognition, and avoid confusion in space group recognition.
[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0020] Figure 1 are schematic diagrams of the crystal structures of 4 crystal materials that are prone to confusion in space group recognition;
[0021] Figure 2 is a flowchart of a method for identifying the space group of a crystal according to Embodiment 1 of the present invention;
[0022] Figure 3 is a flowchart of a method for identifying the space group of a crystal according to Embodiment 2 of the present invention;
[0023] Figure 4 is a schematic diagram of a convolutional neural network according to Embodiment 2 of the present invention;
[0024] Figure 5 is a schematic diagram of the structure of a device for identifying the space group of a crystal according to Embodiment 3 of the present invention;
[0025] Figure 6 is a schematic diagram of the structure of an electronic device for implementing the method for identifying the space group of a crystal in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] To enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application all comply with the relevant regulations of national laws and regulations.
[0028] Embodiment 1
[0029] Figure 2 FIG. 10 is a flowchart of a method for identifying the space group of a crystal provided in Embodiment 1 of the present invention. This embodiment is applicable to the scenario of crystal structure analysis, especially the case of distinguishing the space groups of crystal materials. This method can be executed by a device for identifying the space group of a crystal, and this device can be implemented in the form of hardware and / or software, and this device can be configured in an electronic device. As Figure 2 shown, this method includes:
[0030] S110. Obtain the spectral data of the target crystal material.
[0031] This solution can be executed by an electronic device such as a computer or a server, and the electronic device can obtain the spectral data of the target crystal material. Among them, the target crystal material can be a crystal material whose space group type has not been determined, and the spectral data can be the diffraction spectrum of the target crystal material, such as a PXRD (Powder X-Ray Diffraction) spectrum. PXRD is a non-destructive experimental technique for studying crystal structure, phase composition and material properties by analyzing the X-ray diffraction pattern of materials, and is widely used in the fields of materials science, chemistry and geology to complete tasks such as phase identification, crystal structure analysis and material property evaluation.
[0032] Predicting the crystal structure from PXRD spectra usually requires multiple complex steps, such as background removal, peak identification, space group determination, basic model construction, and alignment analysis. Among them, space group determination is a crucial step. The space group is a description of the crystal structure. There are theoretically 230 space groups, which define the symmetry characteristics of the crystal, including operations such as rotation, reflection, and inversion. The symmetry characteristics are the basis for studying the crystal structure and its properties. After determining the space group type of the crystal material, researchers can construct and optimize the crystal structure model based on the symmetry characteristics, while an incorrect selection of the space group type may lead to an inaccurate or unreasonable structure model. Therefore, how to efficiently and accurately determine the space group type of crystal materials has profound practical significance.
[0033] For different space groups from the same crystal system, or different space groups of the same point group. Although the crystal materials may have very similar local structures or overall frameworks, their final properties are very different. Directly performing feature extraction and space group classification on the spectral data of the target crystal material in the form of a sequence lacks the guidance of necessary chemical knowledge. Therefore, in the training process of the space recognition model, the superclass of the space group is introduced as supervision to guide the convolutional neural network to learn chemical theory and achieve more accurate space group recognition.
[0034] S120. According to the spectral data of the target crystal material, based on the pre-trained space group recognition model, determine the space group recognition result of the target crystal material; wherein, the space group recognition model is obtained by training a pre-constructed convolutional neural network based on the spectral data of the crystal material samples and the reference structure types of the crystal material samples; the reference structure types include the reference types of the space groups and the reference types of the superclasses; the superclasses include at least one superclass of the space group.
[0035] It can be understood that the superclass is also called the parent class. In the classification system, the superclass is a relative concept, which refers to a more general class that contains other subclasses in the hierarchical classification structure. In crystallography, the space group is a fine-grained classification method for crystal structures, which describes the lattice type and symmetry operations satisfied by the crystal structure. Taking diamond as an example, it belongs to the Fd-3m space group, where F represents the face-centered lattice type, d represents the glide plane, -3 represents the 3-fold rotation inversion symmetry, and m represents the mirror symmetry. When performing space group classification, it is necessary to judge both the lattice type and various symmetry operations, such as point symmetry, translational symmetry, glide planes, and combinations of screw axes.
[0036] In addition to space groups, there are also coarser-grained classification methods for crystal structures. For example, they can be divided into 7 crystal systems according to the symmetry degree of geometric morphology, 32 point groups according to the point symmetry of the primitive cell, 7 lattice systems according to the point symmetry of the Bravais lattice, 14 Bravais lattice classes according to the space symmetry of the Bravais lattice, 73 algebraic crystal classes according to the combination of point symmetry and translational symmetry, and so on. The above-mentioned coarser-grained type classification methods are all superclasses of space groups, and the structural information described by superclasses is more limited compared to space groups. Therefore, in this solution, the superclasses of space groups can include one or more of superclasses such as crystal systems, point groups, lattice systems, Bravais lattice classes, and algebraic crystal classes.
[0037] The electronic device can use the spectral data of the crystal material sample as input and the reference structure type of the crystal material sample as supervision to train a pre-constructed convolutional neural network to obtain a space group recognition model that meets the requirements of prediction accuracy. It should be noted that the reference structure type of the crystal material sample can be determined based on chemical theory, including both the reference type of the space group and the reference type of the superclass of the space group. After obtaining the space group recognition model, the electronic device can input the spectral data of the target crystal material into the space group recognition model to obtain the space group type of the target crystal material.
[0038] The technical solution of the embodiment of the present invention determines the space group recognition result of the target crystal material by obtaining the spectral data of the target crystal material and based on the spectral data of the target crystal material and a pre-trained space group recognition model; wherein, the space group recognition model is trained by using the spectral data of the crystal material sample and the reference structure type of the crystal material sample on a pre-constructed convolutional neural network; the reference structure type includes the reference type of the space group and the reference type of the superclass; the superclass includes at least one superclass of the space group. This technical solution solves the problem of low accuracy in crystal space group recognition. By using the superclass information of the crystal structure as supervision to train the space group recognition model, the space group recognition model can learn chemical theory, improve the accuracy of space group recognition, and avoid confusion in space group recognition.
[0039] Embodiment Two
[0040] Figure 3 It is a flowchart of a method for identifying the space group of a crystal provided in Embodiment Two of the present invention. This embodiment is based on the above embodiment and details the training process of the space group recognition model. As Figure 3 shown, the method includes:
[0041] S210. Determine the first sequence data of the crystal material sample according to the spectral data of the crystal material sample, and determine the first feature of the crystal material sample based on the first sequence data of the crystal material sample and a first network unit; the first network unit is constructed based on a residual convolutional network.
[0042] In this solution, the electronic device can pre-obtain a training data set, which may include multiple crystal material samples. Each crystal material sample may correspond to a spectral data and a reference structure type data. The reference structure type includes the reference type of the space group and also includes the types of at least one superclass of the space group.
[0043] After obtaining the spectral data of the crystal material sample, the electronic device can perform preprocessing such as filtering and noise reduction on the spectral data to obtain the first sequence data of the crystal material sample. For the PXRD spectrum, the electronic device can extract the diffraction angle data and diffraction intensity data in the PXRD spectrum. The diffraction angle data can be used to characterize the interplanar spacing. According to Bragg's law, the interplanar spacing is inversely proportional to the sine value of the diffraction angle. Bragg's law can be expressed as: 2dsinθ = nλ, where d represents the adjacent interplanar spacing, θ represents the diffraction angle, n represents the diffraction order, and λ represents the incident wave wavelength. The diffraction intensity data can be used to characterize the amount of crystal planes in the crystal structure. The electronic device can calculate the sine value of the diffraction angle to obtain the angle processing data, and use the angle processing data and the diffraction intensity data as the first sequence data of the crystal material sample. Specifically, the electronic device can use the angle processing data and the diffraction intensity data as the first sequence data of two channels, or sequentially connect the angle processing data and the diffraction intensity data to obtain the first sequence data of one channel.
[0044] The electronic device can pre-construct a first network unit based on a residual convolutional network (Residual Network, ResNet), use the first sequence data as the input data of the first network unit, and obtain the first feature of the crystal material sample. It can be understood that the first feature can be used to characterize the features between adjacent peaks in the spectral data and can be used as the local feature of the spectral data.
[0045] Figure 4 FIG. is a schematic diagram of a convolutional neural network provided in Embodiment 2 of the present invention. In a specific example, taking the PXRD spectrum of the crystal material sample as the input data of the convolutional neural network, the structure of the first network unit is as Figure 4 shown, and the expression of the first feature can be expressed as: E local= Projection(Flatten(ConvBlocks(sinA || I))), where Projection(·) represents a mapping function, Flatten(·) represents a feature flattening function, ConvBlocks(·) represents the first network unit, A represents diffraction angle data, sinA represents angle processing data, I represents diffraction intensity data, and || represents a concatenation operation.
[0046] S220. Split the first sequence data of the crystal material sample to generate at least two second sequence data, and determine the second features of each second sequence data; the second features include a first sub-feature, a second sub-feature, a third sub-feature, and a fourth sub-feature; the first sub-feature is used to represent the crystal plane spacing feature matched by the second sequence data, the second sub-feature is used to represent the crystal plane number feature matched by the second sequence data, the third sub-feature is used to characterize the position of the second sequence data in the first sequence data, and the fourth sub-feature is used to characterize the information value of the second sequence data.
[0047] After obtaining the first sequence data, the electronic device can split the first sequence data of the crystal material sample according to a preset splitting rule to obtain multiple second sequence data. Among them, the sequence lengths of the multiple second sequence data can be the same or different. In a feasible solution, the electronic device can split the first sequence data of the crystal material sample into multiple second sequence data with equal lengths according to a preset sequence length. After obtaining each second sequence data, the electronic device can process each second sequence data to determine the second features of each second sequence data. Specifically, extract the crystal plane spacing feature and the crystal plane number feature in the second sequence data as the first sub-feature and the second sub-feature corresponding to the second sequence data respectively. The electronic device can record the position of the second sequence data in the first sequence data as the third sub-feature of the second sequence data, and evaluate whether the information in the second sequence data is valuable to determine the fourth sub-feature of the second sequence data.
[0048] In a feasible solution, the first sub-feature can be the crystal plane spacing feature obtained by extracting features from the angle processing data based on the first convolutional unit. The second sub-feature can be the crystal plane number feature obtained by extracting features from the diffraction intensity data based on the second convolutional unit. It is easy to understand that the diffraction intensity of some spectral segments in the PXRD spectrum is all 0. This part of the spectral segment not only does not provide any useful information during the training process of the convolutional neural network, but also is likely to mislead the learning of the convolutional neural network, thereby affecting the training efficiency and recognition effect of the space group recognition model. Therefore, the electronic device can determine whether the diffraction intensity data in the second sequence data is all 0. If it is all 0, it is determined that the second sequence data has no information value, otherwise it is determined that the second sequence data has information value.
[0049] S230. Determine the third feature of the crystal material sample based on the second network unit according to the second feature of each second sequence data; the second network unit is constructed based on the attention mechanism network.
[0050] The electronic device can pre-construct the second network unit based on the attention mechanism network. Among them, the attention mechanism network can be a self-attention mechanism network, such as a multi-head attention mechanism network. After obtaining the second features of each second sequence data, the electronic device can merge the second features of each second sequence data, perform feature extraction on the merged second features based on the second network unit, perform global pooling on the features output by the second network unit, and obtain the global representation of the spectral data of the crystal material sample, that is, the third feature.
[0051] In a specific example, the structure of the second network unit can be as Figure 4 shown, where e learnable represents the first sub-feature, e intensity represents the second sub-feature, e postion represents the third sub-feature, e mask represents the fourth sub-feature. Based on the second network unit shown in Figure 4 , the third feature can be expressed as: E global = GlobalPooling(AttentionBlocks((e intensity ||e learnable ) + e postion , e mask ))), where GlobalPooling(·) represents the global pooling function, AttentionBlocks(·) represents the second network unit, and || represents the concatenation operation.
[0052] S240. Determine the predicted structure type of the crystal material sample according to the first feature and the third feature of the crystal material sample; the predicted structure type includes the space group prediction type and the superclass prediction type.
[0053] It can be understood that the first feature of the crystal material sample is the local characterization of spectral data, and the third feature is the global characterization of spectral data. The electronic device can connect the first feature and the third feature and input the connected features into the activation unit. The activation unit may include multiple classification branches, each classification branch corresponding to a classification task. Each classification branch may include a space group branch and each superclass branch of the space group. Each classification branch may match different activation functions, such as activation functions like Sigmoid, Softmax, Tanh, and ReLU. Each classification branch can output the classification result of a classification task. Therefore, the activation unit can output the predicted type of the space group and the predicted types of each superclass of the space group.
[0054] S250. Perform at least one iterative training on the convolutional neural network according to the predicted structure type and the reference structure type of the crystal material sample to determine the space group recognition model.
[0055] The electronic device can compare the predicted structure type and the reference structure type of the crystal material sample, count model evaluation parameters such as the prediction accuracy, prediction loss, and precision of the crystal material samples in the training dataset, and perform iterative training on the convolutional neural network according to the model evaluation parameters to obtain a space group recognition model that meets the model evaluation conditions.
[0056] In this solution, the performing at least one iterative training on the convolutional neural network according to the predicted structure type and the reference structure type of the crystal material sample to determine the space group recognition model includes:
[0057] Determine the first loss according to the predicted structure type and the reference structure type of the crystal material sample;
[0058] Perform at least one iterative training on the convolutional neural network according to the first loss to determine the space group recognition model.
[0059] It can be understood that the electronic device can set different loss functions for each classification, such as cross-entropy loss, hinge loss, and mean squared error loss, etc., to calculate the prediction loss of each classification. The electronic device can use the reference structure type of the crystal material sample as a benchmark to judge the correctness of the predicted result type, and then calculate the prediction loss of each classification.
[0060] The electronic device can take the sum of the prediction losses of each classification as the first loss, perform iterative training on the convolutional neural network based on the first loss until the iteration termination condition is met, and output the space group recognition model. Among them, the iteration termination condition can be that the number of iterations reaches a preset number, or the first loss reaches a preset loss threshold, or the convolutional neural network can also be verified after each iterative training, and the verification results such as verification accuracy and verification loss meet the preset evaluation conditions.
[0061] Based on the above solution, the superclass prediction types include the prediction types of each superclass of the space group;
[0062] Determining the first loss according to the predicted structure type and the reference structure type of the crystal material sample includes:
[0063] Determining the first branch loss according to the predicted space group type and the reference space group type of the crystal material sample, and determining the second branch loss matched by each superclass according to the predicted type of each superclass and the reference type of each superclass;
[0064] Determining the first loss according to the first branch loss, the weight coefficient of the first branch loss, the second branch losses matched by each superclass, and the weight coefficients of each second branch loss.
[0065] In this solution, the electronic device can calculate the first branch loss based on the loss function matched by the space group branch according to the predicted space group type and the reference space group type of the crystal material sample. At the same time, the electronic device can calculate the second branch losses matched by each superclass based on the loss functions matched by each superclass according to the predicted type of each superclass and the reference type of each superclass. Calculate the weighted sum of each branch loss according to the first branch loss, the weight coefficient of the first branch loss, the second branch losses matched by each superclass, and the weight coefficients of each second branch loss to obtain the first loss.
[0066] It is easy to understand that for the same deep learning model, the difficulties of different classification tasks are different, so the descent gradients of the classification losses are different. During the training process of the convolutional neural network, the classification losses of some classification tasks will decrease first. After the classification effects of these parts are optimized, the remaining classification tasks will be gradually optimized. This selective training process is not conducive to the generalization of the space group recognition model and will also affect the prediction effects between different classification tasks. Therefore, this solution sets weight coefficients for the losses of different classification tasks and continuously updates the weight coefficients of the losses of each classification task during the training process of the convolutional neural network to balance the training processes of each classification task and promote the generalization of the space group recognition model.
[0067] In a preferred solution, after each iterative training of the convolutional neural network ends, the method further includes:
[0068] Obtaining the weight parameters of the shared network for this iteration, and updating the weight coefficient of the first branch loss and the weight coefficients of each second branch loss based on a preset objective function and constraint conditions according to the weight parameters of the shared network for this iteration and the first loss output for this iteration; the shared network is the network structure shared by each classification task in the convolutional neural network.
[0069] During the training process of the convolutional neural network, after each iteration of training is completed, the electronic device can obtain the weight parameters of the shared network in the convolutional neural network obtained in this iteration. It can be understood that when the convolutional neural network completes a multi-classification task, there is a shared network structure in the structure of the convolutional neural network, and the weight parameters of the shared network have an impact on each classification task. If there is a dedicated network structure for each classification task, in addition to the weight parameters of the shared network, the output result of each classification task may also be affected by the weight parameters in the dedicated network structure of that classification task.
[0070] The electronic device can pre-construct an optimization problem to dynamically adjust the weight coefficients of the first-branch loss and the weight coefficients of each second-branch loss, so as to optimize the weight parameters of the shared network in the convolutional neural network, balance the training processes of each classification task, and promote the generalization of the space group recognition model. According to the weight parameters of the shared network in this iteration and the first loss output in this iteration, based on the objective function and the constraint conditions in the optimization problem, the electronic device can update the weight coefficient of the first-branch loss and the weight coefficients of each second-branch loss; the shared network is the network structure shared by each classification task in the convolutional neural network, so as to slow down the loss of the classification task with a faster decline and accelerate the loss of the classification task with a slower decline.
[0071] Based on the above solution, the objective function is:
[0072]
[0073] The constraint conditions include:
[0074] Among them, n represents the number of superclasses, i represents the identifier of each classification task, classification tasks 1, 2... n are respectively used to output the predicted types of each superclass, and classification task n + 1 is used to output the predicted type of the space group, α1, α2,..., α n respectively represent the weight coefficients matched by each superclass, α n+1 represents the weight coefficient matched by the space group, w enc represents the weight parameters of the shared structure of each classification task in the convolutional neural network, L i (·) represents the loss function of classification task i.
[0075] It is easy to understand that the loss function of each classification task is a function Li(wenc) of the weight parameters of the shared network. When the partial derivative of Li(wenc) with respect to w enc and α i change according to a negative correlation relationship, the Q value is the smallest. Therefore, the larger the gradient norm of classification task i, the faster the loss decreases. The electronic device can set α within the value range of the weight coefficient iSet a smaller value. Conversely, when the gradient norm of classification task i is smaller, the loss decreases more slowly, and the electronic device can set α within the value range of the weight coefficient i Set a larger value.
[0076] It should be noted that classification task i may have a dedicated network structure. If classification task i does not have a dedicated network structure, the loss function is a function of the weight parameters of the shared network; if classification task i has a dedicated network structure, the loss function is a function of the weight parameters of the shared network and the weight parameters of the dedicated network. When classification task i has a dedicated network structure, L i (w enc ) can be expressed as L i (w enc ,w i ), where w i represents the weight parameters of the dedicated network matched by classification task i.
[0077] This solution constructs a multi-objective optimization problem and dynamically adjusts the weight coefficients of the losses corresponding to each classification task, which is beneficial to optimizing the weight parameters of the shared network in the convolutional neural network, balancing the training processes of each classification task, and ensuring the reliability of the space group recognition model.
[0078] S260. Obtain the spectral data of the target crystal material.
[0079] S270. Based on the spectral data of the target crystal material and the pre-trained space group recognition model, determine the space group recognition result of the target crystal material.
[0080] This technical solution solves the problem of low accuracy in crystal space group recognition. By using the superclass information of the crystal structure as supervision to train the space group recognition model, the space group recognition model can learn chemical theories, improve the accuracy of space group recognition, and avoid confusion in space group recognition.
[0081] Embodiment III
[0082] Figure 5 It is a schematic structural diagram of a space group recognition device for a crystal provided in Embodiment III of the present invention. As Figure 5 shown, the device includes:
[0083] A spectral data acquisition module 310, configured to obtain the spectral data of the target crystal material;
[0084] An identification result determination module 320, configured to determine the space group recognition result of the target crystal material based on the spectral data of the target crystal material and the pre-trained space group recognition model;
[0085] Among them, the space group recognition model is obtained by training a pre-constructed convolutional neural network based on the spectral data of crystal material samples and the reference structure types of crystal material samples; the reference structure types include the reference types of space groups and the reference types of superclasses; the superclasses include at least one superclass of space groups.
[0086] In this solution, the convolutional neural network includes a first network unit and a second network unit;
[0087] The device further includes a model training module, including:
[0088] A first feature determination unit, configured to determine the first sequence data of the crystal material sample according to the spectral data of the crystal material sample, and determine the first feature of the crystal material sample based on the first sequence data of the crystal material sample and the first network unit; the first network unit is constructed based on a residual convolutional network;
[0089] A second feature determination unit, configured to split the first sequence data of the crystal material sample to generate at least two second sequence data, and determine the second features of the respective second sequence data; the second features include a first sub-feature, a second sub-feature, a third sub-feature, and a fourth sub-feature; the first sub-feature is used to represent the crystal plane spacing feature matched by the second sequence data, the second sub-feature is used to represent the crystal plane number feature matched by the second sequence data, the third sub-feature is used to characterize the position of the second sequence data in the first sequence data, and the fourth sub-feature is used to characterize the information value of the second sequence data;
[0090] A third feature determination unit, configured to determine the third feature of the crystal material sample based on the second features of the respective second sequence data and the second network unit; the second network unit is constructed based on an attention mechanism network;
[0091] A prediction type determination unit, configured to determine the predicted structure type of the crystal material sample according to the first feature and the third feature of the crystal material sample; the predicted structure type includes a space group prediction type and a superclass prediction type;
[0092] An identification model determination unit, configured to perform at least one iterative training on the convolutional neural network according to the predicted structure type and the reference structure type of the crystal material sample, and determine the space group recognition model.
[0093] Based on the above solution, the identification model determination unit is specifically configured to:
[0094] Determine a first loss according to the predicted structure type and the reference structure type of the crystal material sample;
[0095] Perform at least one iteration of training on the convolutional neural network according to the first loss to determine the space group recognition model.
[0096] In a feasible solution, the superclass prediction types include the prediction types of each superclass of the space group;
[0097] The recognition model determination unit is specifically configured to:
[0098] Determine the first branch loss according to the space group prediction type and the space group reference type of the crystal material sample, and determine the second branch loss matching each superclass according to the prediction type of each superclass and the reference type of each superclass;
[0099] Determine the first loss according to the first branch loss, the weight coefficient of the first branch loss, the second branch loss matching each superclass, and the weight coefficient of each second branch loss.
[0100] In a preferred solution, the recognition model determination unit is further configured to:
[0101] After each iteration of training of the convolutional neural network ends, obtain the weight parameters of the shared network in this iteration, and based on the weight parameters of the shared network in this iteration and the first loss output in this iteration, update the weight coefficient of the first branch loss and the weight coefficients of each second branch loss according to the preset objective function and constraint conditions; the shared network is the network structure shared by each classification task in the convolutional neural network.
[0102] Based on the above solution, the objective function is:
[0103]
[0104] The constraint conditions include:
[0105] Among them, n represents the number of superclasses, i represents the identifier of each classification task. Classification tasks 1, 2... n are respectively used to output the prediction types of each superclass, and classification task n + 1 is used to output the prediction type of the space group. α1, α2,..., α n respectively represent the weight coefficients matching each superclass, and α n+1 represents the weight coefficient matching the space group, w enc represents the weight parameters of the shared structure of each classification task in the convolutional neural network, and L i (·) represents the loss function of classification task i.
[0106] The crystal space group recognition device provided by the embodiments of the present invention can execute the crystal space group recognition method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0107] Embodiment Four
[0108] Figure 6 FIG. 3 shows a schematic structural diagram of an electronic device 410 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0109] As Figure 6 shown, the electronic device 410 includes at least one processor 411, and a memory communicatively connected to the at least one processor 411, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc. The memory stores a computer program executable by the at least one processor. The processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 into the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. The input / output (I / O) interface 415 is also connected to the bus 414.
[0110] A plurality of components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a magnetic disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0111] The processor 411 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 411 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as the method for identifying the space group of a crystal.
[0112] In some embodiments, the method for identifying the space group of a crystal can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the method for identifying the space group of a crystal described above can be performed. Alternatively, in other embodiments, the processor 411 can be configured to perform the method for identifying the space group of a crystal by any other suitable means (e.g., by means of firmware).
[0113] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a dedicated computer, or other programmable device for identifying the space group of a crystal, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0115] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0119] It should be understood that various forms of processes shown above can be used, with steps reordered, added or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0120] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for identifying the space group of a crystal, characterized in that: The method comprises: Acquiring spectral data of target crystal materials; According to the spectral data of the target crystal material, based on the pre-trained space group identification model, determining the space group identification result of the target crystal material; Wherein, the space group recognition model is obtained by training a pre-constructed convolutional neural network based on the spectral data of the crystal material sample and the reference structure type of the crystal material sample; the reference structure type includes the reference type of the space group and the reference type of the superclass; the superclass includes at least one superclass of the space group.
2. The method according to claim 1, characterized in that: The convolutional neural network includes a first network unit and a second network unit; The training process of the space group recognition model includes: Determine a first sequence of data of the crystal material sample according to the spectral data of the crystal material sample, and determine a first feature of the crystal material sample based on a first network unit according to the first sequence of data of the crystal material sample; the first network unit is constructed based on a residual convolutional network; Splitting the first sequence data of the crystal material sample to generate at least two second sequence data, and determining the second feature of each second sequence data; the second feature includes a first sub-feature, a second sub-feature, a third sub-feature and a fourth sub-feature; the first sub-feature is used to represent the crystal plane spacing feature matched by the second sequence data, the second sub-feature is used to represent the crystal plane quantity feature matched by the second sequence data, the third sub-feature is used to characterize the position of the second sequence data in the first sequence data, and the fourth sub-feature is used to characterize the information value of the second sequence data; According to the second feature of each second sequence data, based on the second network unit, determining the third feature of the crystal material sample; the second network unit is constructed based on the attention mechanism network; Determining a predicted structure type of the crystal material sample according to the first feature and the third feature of the crystal material sample; the predicted structure type includes a space group prediction type and a superclass prediction type; According to the predicted structure type of the crystal material sample and the reference structure type, the convolutional neural network is iteratively trained at least once to determine the space group recognition model.
3. The method according to claim 2, characterized in that The method further comprises: performing at least one iterative training on the convolutional neural network according to the predicted structure type and the reference structure type of the crystal material sample to determine the space group recognition model, including: determining a first loss based on a predicted structure type of the crystalline material sample and a reference structure type; According to the first loss, the convolutional neural network is trained for at least one iteration to determine a spatial group recognition model.
4. The method according to claim 3, characterized in that The superclass prediction type includes the prediction type of each superclass of the space group; The step of determining the first loss according to the predicted structure type and the reference structure type of the crystal material sample comprises: Determine a first branch loss according to a predicted space group type and a reference space group type of the crystal material sample, and determine a second branch loss for each superclass match according to a predicted type of each superclass and a reference type of each superclass; The first loss is determined according to the first branch loss, the weight coefficient of the first branch loss, the second branch losses of each superclass match, and the weight coefficient of each second branch loss.
5. The method according to claim 4, characterized in that After each iteration of training of the convolutional neural network is completed, the method further includes: Obtain the weight parameters of the shared network for this iteration, and update the weight coefficient of the first branch loss and the weight coefficient of each second branch loss based on the weight parameters of the shared network for this iteration and the first loss output for this iteration, based on the preset objective function and constraints; the shared network is a network structure shared by each classification task in the convolutional neural network.
6. The method according to claim 5, characterized in that The objective function is: The constraints include: Among them, n represents the number of superclasses, i represents the identifier of each classification task, classification tasks 1, 2…n are used to output the prediction type of each superclass respectively, and classification task n+1 is used to output the prediction type of the space group. α1, α2,…, α n Respectively represent the weight coefficient of each superclass matching, α n+1 represents the weight coefficient of space group matching, w enc Represents the weight parameter of the common structure of each classification task in the convolutional neural network, L i (·) represents the loss function of classification task i.
7. A device for identifying a space group of a crystal, characterized in that: The device comprises: A spectral data acquisition module, used to acquire spectral data of a target crystal material; An identification result determination module is used to determine the space group identification result of the target crystal material based on the spectral data of the target crystal material and the pre-trained space group identification model; Wherein, the space group recognition model is obtained by training a pre-constructed convolutional neural network based on the spectral data of the crystal material sample and the reference structure type of the crystal material sample; the reference structure type includes the reference type of the space group and the reference type of the superclass; the superclass includes at least one superclass of the space group.
8. An electronic device, characterized in that: The electronic device comprises: At least one processor; and a memory in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the space group identification method of the crystal according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for identifying the space group of a crystal according to any one of claims 1 to 6 when executed.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for identifying the space group of a crystal according to any one of claims 1 to 6.