Galaxy spectrum processing method, device and equipment

By using a self-attention model in galaxy spectral processing for feature extraction, combined with the detection and classification of historical galaxy features, the problems of poor accuracy and low efficiency of galaxy spectral processing in the existing technology are solved, and more efficient feature extraction and analysis are achieved.

CN119517234BActive Publication Date: 2025-05-02NAT ASTRONOMICAL OBSERVATORIES CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510098462.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-02
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

When using artificial intelligence models to perform feature extraction on galaxy spectra, the prior art has problems such as limited feature extraction capabilities and insufficient global context capture capabilities, resulting in poor processing accuracy and low efficiency.

Method used

The self-attention model is used to extract the galaxy spectrum, and the extracted features are detected and classified based on historical galaxy features to obtain the classification results and redshift prediction values ​​of galaxy types.

Benefits of technology

Through the use of self-attention model, galaxy spectral data can be better understood and interpreted, improving the accuracy and efficiency of feature extraction, and avoiding the problems of poor accuracy and low efficiency in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119517234B_ABST
    Figure CN119517234B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and equipment for processing galaxy spectra, which can be applied to the field of data processing technology. The method includes: obtaining a galaxy spectrum to be processed; using a self-attention model to extract features of the galaxy spectrum to be processed to obtain galaxy features, the galaxy features representing the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed; detecting the galaxy features based on historical galaxy features to obtain detection results; when the detection results indicate that the galaxy features do not have abnormalities, classifying the galaxy features to obtain a classification result representing the galaxy type and a redshift prediction value corresponding to the galaxy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and more specifically to a method, device, equipment, medium and program product for processing galaxy spectra. Background Art

[0002] The galaxy is one of the basic units of the universe. The study of galaxy structure and evolution can reveal the basic characteristics of the universe. Galaxy spectra can provide information about the composition and chemical composition of different celestial bodies in the galaxy. By analyzing various spectral characteristics, researchers can study the galaxy.

[0003] In the related technology, artificial intelligence models (such as convolutional neural networks, multi-layer perceptrons or variational autoencoders) are used to extract features from galaxy spectra. However, since galaxy spectra are long sequence data, the above-mentioned artificial intelligence models have limited feature extraction capabilities and insufficient global context capture capabilities during the feature extraction process, which in turn leads to poor accuracy and low efficiency in the system's processing of galaxy spectra. Summary of the invention

[0004] In view of the above problems, the present invention provides a method, device, equipment, medium and program product for processing galaxy spectra.

[0005] According to a first aspect of the present invention, a method for processing galaxy spectra is provided, comprising: obtaining a galaxy spectrum to be processed; extracting features of the galaxy spectrum to be processed using a self-attention model to obtain galaxy features, the galaxy features characterizing the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed; detecting the galaxy features based on historical galaxy features to obtain detection results; and when the detection results characterize that the galaxy features do not contain abnormalities, classifying the galaxy features to obtain a classification result characterizing the galaxy type and a redshift prediction value corresponding to the galaxy.

[0006] According to an embodiment of the present invention, galaxy features are detected based on historical galaxy features to obtain detection results, including: taking the galaxy features as retrieval targets, performing similarity retrieval in the historical galaxy features to obtain m target historical galaxy features corresponding to the galaxy features, wherein m is a positive integer; based on an anomaly detection algorithm, the galaxy features are detected using the m target historical galaxy features to obtain detection results.

[0007] According to an embodiment of the present invention, based on an anomaly detection algorithm, galaxy features are detected using m target historical galaxy features to obtain a detection result, including: performing similarity distance calculations on each target historical galaxy feature and galaxy feature to obtain m distance values; and determining the detection result based on a comparison result between each of the m distance values ​​and a preset feature distance threshold.

[0008] According to an embodiment of the present invention, galaxy features are classified to obtain classification results characterizing galaxy types and redshift prediction values ​​corresponding to the galaxies, including: using a pre-trained classification head to classify galaxy features to obtain classification results characterizing galaxy types; performing spectral line displacement detection on spectral lines corresponding to the galaxies in a galaxy spectrum to be processed based on the galaxy features to obtain target displacement features; using a pre-trained regression head to process the target displacement features of the spectral lines to obtain a redshift prediction value corresponding to the galaxy.

[0009] According to an embodiment of the present invention, the method further comprises: performing weighted average processing on the to-be-processed galaxy spectra from multiple data sources of the same galaxy to obtain a processed to-be-processed galaxy spectrum.

[0010] According to an embodiment of the present invention, the method further includes: obtaining sky ray intensity; and when the sky ray intensity increases, masking the galaxy spectrum to be processed to obtain the masked galaxy spectrum to be processed.

[0011] According to an embodiment of the present invention, the method further includes: when the detection result indicates that the galaxy feature is abnormal, storing the galaxy feature in an abnormality database and adding an abnormality mark.

[0012] According to an embodiment of the present invention, a self-attention model is used to extract features of a galaxy spectrum to be processed to obtain galaxy features, including: extracting features of the galaxy spectrum to be processed to obtain a query vector, a key vector and a value vector; and processing the query vector, the key vector and the value vector based on an attention network algorithm to obtain galaxy features.

[0013] The second aspect of the present invention provides a galaxy spectrum processing device, including: a first acquisition module, used to acquire a galaxy spectrum to be processed; an extraction module, used to use a self-attention model to perform feature extraction on the galaxy spectrum to be processed to obtain galaxy features, and the galaxy features characterize the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed; a detection module, used to detect the galaxy features based on historical galaxy features to obtain a detection result; and a classification module, used to classify the galaxy features when the detection result characterizes that the galaxy features do not have an abnormality, and obtain a classification result characterizing the galaxy type and a redshift prediction value corresponding to the galaxy.

[0014] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0015] The fourth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0016] The fifth aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0017] According to an embodiment of the present invention, a galaxy spectrum to be processed is obtained; a self-attention model is used to extract features of the galaxy spectrum to be processed to obtain galaxy features; the galaxy features are detected based on historical galaxy features to obtain detection results; when the detection results indicate that the galaxy features do not have abnormalities, the galaxy features are classified to obtain classification results representing the galaxy type and redshift prediction values ​​corresponding to the galaxies. Since the self-attention model is used to extract features of the galaxy spectrum to be processed, the problem of difficulty in extracting features of galaxy spectra in long sequence data formats is avoided, so that the model can better understand and interpret galaxy spectrum data; in addition, the detection of galaxy features based on historical galaxy features avoids the problems of poor accuracy and low efficiency of the prior art, and improves the efficiency and flexibility of retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0019] Figure 1 An application scenario diagram showing a galaxy spectrum processing method, apparatus, device, medium, and program product according to an embodiment of the present invention;

[0020] Figure 2 A flow chart showing a method for processing galaxy spectra according to an embodiment of the present invention is shown;

[0021] Figure 3 A schematic diagram showing a method for processing galaxy spectra according to an embodiment of the present invention is shown;

[0022] Figure 4 A structural block diagram of a device for processing galaxy spectra according to an embodiment of the present invention is shown;

[0023] Figure 5 A block diagram of an electronic device suitable for implementing a method for processing galaxy spectra according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0027] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0028] In related technologies, artificial intelligence models are applied to galaxy spectral analysis systems. For example, Convolutional Neural Networks (CNN) can capture local features in galaxy spectral data through its convolutional layer, but galaxy spectral data is a one-dimensional sequence and cannot fully utilize the spatial feature extraction capability of CNN; Multilayer Perceptron (MLP) learns the nonlinear characteristics of data by stacking multiple fully connected layers, but MLP lacks the utilization of the spatial structure of the input data, which may lead to inefficiency in processing galaxy spectral data with complex structures; Variational Autoencoder (VAE) maps the input data to a low-dimensional latent space and reconstructs the input data through a decoder, but VAE may lose important detail information during dimensionality reduction and feature extraction.

[0029] In view of the above problems, an embodiment of the present invention provides a method for processing galaxy spectra, obtaining a galaxy spectrum to be processed; using a self-attention model to perform feature extraction on the galaxy spectrum to be processed to obtain galaxy features, the galaxy features characterizing the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed; detecting the galaxy features based on historical galaxy features to obtain detection results; when the detection results characterize that the galaxy features do not have abnormalities, classifying the galaxy features to obtain a classification result characterizing the galaxy type and a redshift prediction value corresponding to the galaxy.

[0030] Figure 1 An application scenario diagram of a galaxy spectrum processing method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.

[0031] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0032] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0033] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0034] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0035] It should be noted that the galaxy spectrum processing method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the galaxy spectrum processing device provided in the embodiment of the present invention can generally be set in the server 105. The galaxy spectrum processing method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the galaxy spectrum processing device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0036] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0037] The following will be based on Figure 1 The scenario described is described in detail about the method for processing the galaxy spectrum of the embodiment of the invention.

[0038] Figure 2 A flow chart of a method for processing galaxy spectra according to an embodiment of the present invention is shown.

[0039] like Figure 2 As shown, the galaxy spectrum processing method of this embodiment includes operations S210 to S240.

[0040] In operation S210, a spectrum of a galaxy to be processed is obtained.

[0041] According to an embodiment of the present invention, the galaxy spectrum to be processed may be one-dimensional sequence data acquired by an astronomical telescope and capable of providing information on the composition and chemical composition of different celestial bodies in the galaxy.

[0042] In operation S220, a self-attention model is used to extract features of the galaxy spectrum to be processed to obtain galaxy features, where the galaxy features represent the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed.

[0043] According to an embodiment of the present invention, the self-attention model can dynamically capture the dependencies between elements at different positions in a sequence. The core of the self-attention model is to calculate three key vectors: query, key, and value, and generate new sequence representations through these vectors.

[0044] According to an embodiment of the present invention, a new sequence generated based on a self-attention model is used to extract galaxy features to provide information on the physical state and chemical composition of the galaxy to assist scientific researchers in their research.

[0045] In operation S230, the galaxy features are detected based on the historical galaxy features to obtain a detection result.

[0046] According to an embodiment of the present invention, a series of open source star catalogs have been accumulated and sorted based on multiple sky survey projects to construct a feature vector library, namely, historical galaxy features, which are used to detect galaxy features to determine whether the galaxy corresponding to the galaxy feature is a common galaxy.

[0047] In operation S240, when the detection result indicates that there is no abnormality in the galaxy characteristics, the galaxy characteristics are classified to obtain a classification result indicating the type of galaxy and a redshift prediction value corresponding to the galaxy.

[0048] According to an embodiment of the present invention, galaxy characteristics are classified, which can be galaxy classification and redshift estimation, etc., to assist scientific researchers in conducting research, for example, inferring the types and abundances of gases, elements and molecules present in galaxies, understanding the evolution and formation process of galaxies, inferring the age, mass, morphology and dynamic state of galaxies to reveal the evolutionary history of galaxies, etc.

[0049] According to an embodiment of the present invention, a galaxy spectrum to be processed is obtained; a self-attention model is used to extract features of the galaxy spectrum to be processed to obtain galaxy features; the galaxy features are detected based on historical galaxy features to obtain detection results; when the detection results indicate that the galaxy features do not have abnormalities, the galaxy features are classified to obtain classification results representing the galaxy type and redshift prediction values ​​corresponding to the galaxies. Since the self-attention model is used to extract features of the galaxy spectrum to be processed, the problem of difficulty in extracting features of galaxy spectra in long sequence data formats is avoided, so that the model can better understand and interpret galaxy spectrum data; in addition, the detection of galaxy features based on historical galaxy features avoids the problems of poor accuracy and low efficiency of the prior art, and improves the efficiency and flexibility of retrieval.

[0050] According to an embodiment of the present invention, galaxy features are detected based on historical galaxy features to obtain detection results, including: taking the galaxy features as retrieval targets, performing similarity retrieval in the historical galaxy features to obtain m target historical galaxy features corresponding to the galaxy features, wherein m is a positive integer; based on an anomaly detection algorithm, the galaxy features are detected using the m target historical galaxy features to obtain detection results.

[0051] According to an embodiment of the present invention, a similarity retrieval technology is used to search in an open source star catalog database with galaxy features as the retrieval target, and m spectra are recalled as target historical galaxy features, wherein the value of m is adjusted according to actual needs.

[0052] According to an embodiment of the present invention, based on an anomaly detection algorithm, m target historical galaxy features are used for further detection to determine whether there are abnormal galaxy features caused by instrument anomalies in the above retrieval process, so as to screen out galaxy features of common galaxies without anomalies.

[0053] According to an embodiment of the present invention, based on an anomaly detection algorithm, galaxy features are detected using m target historical galaxy features to obtain a detection result, including: performing similarity distance calculations on each target historical galaxy feature and galaxy feature to obtain m distance values; and determining the detection result based on a comparison result between each of the m distance values ​​and a preset feature distance threshold.

[0054] According to an embodiment of the present invention, the calculated m distance values ​​are compared with their respective preset characteristic distance thresholds to obtain a comparison result. If at least half of the comparison results among the m distance values ​​represent that the distance values ​​reach the preset characteristic distance threshold, then the detection result represents that there is no abnormality. Otherwise, the detection result represents that there is an abnormality.

[0055] According to an embodiment of the present invention, similarity retrieval technology is used to improve the efficiency and flexibility of retrieval. The efficiency improvement comes from the fact that the use of a vector database containing historical galaxy features can significantly optimize the similarity calculation and retrieval of large-scale data, while the flexibility is reflected in the ability to adapt to different data sets and anomaly detection tasks. In addition, the above operation is highly scalable and can improve the detection capability as the historical galaxy features in the database increase, allowing the system to handle more complex galaxy spectra.

[0056] According to an embodiment of the present invention, galaxy features are classified to obtain classification results characterizing galaxy types and redshift prediction values ​​corresponding to the galaxies, including: using a pre-trained classification head to classify galaxy features to obtain classification results characterizing galaxy types; performing spectral line displacement detection on spectral lines corresponding to the galaxies in a galaxy spectrum to be processed based on the galaxy features to obtain target displacement features; using a pre-trained regression head to process the target displacement features of the spectral lines to obtain a redshift prediction value corresponding to the galaxy.

[0057] According to an embodiment of the present invention, based on a few-shot technique, historical galaxy features are used to train a classification head and a regression head respectively, to obtain a pre-trained classification head and a pre-trained regression head.

[0058] According to an embodiment of the present invention, the classification head can automatically classify galaxies based on galaxy characteristics, analyze the galaxy characteristics to distinguish between absorption line galaxies and emission line galaxies, and further subdivide them into different galaxy subtypes to obtain classification results that characterize galaxy types, wherein the classification results help to understand the physical properties and evolutionary history of galaxies.

[0059] According to an embodiment of the present invention, the galaxy feature includes an abstract representation of spectral data, and based on a spectral line shift detection operation, key information such as spectral line shift is extracted from the galaxy feature to obtain a target shift feature.

[0060] According to an embodiment of the present invention, there is a physical relationship between spectral line displacement and redshift. Redshift will cause the spectral line to move toward the long-wave direction. The pre-trained regression head predicts the redshift of the galaxy based on the mapping relationship between the displacement and the redshift value to obtain the redshift prediction value.

[0061] According to the embodiments of the present invention, the above operations realize the coordination and optimization of multiple tasks through a unified processing flow and feature extraction, overcome the problem in the prior art that the analysis system does not form a complete link, and improve the comprehensive performance and application scope of the system by integrating multiple downstream tasks (including the above-mentioned operations such as determining the classification results and the redshift prediction values), making the analysis of galaxy spectral data more comprehensive and efficient.

[0062] According to an embodiment of the present invention, the method further comprises: performing weighted average processing on the to-be-processed galaxy spectra from multiple data sources of the same galaxy to obtain a processed to-be-processed galaxy spectrum.

[0063] According to an embodiment of the present invention, for galaxy spectra to be processed from different sources, the uncertainty of the flux is expressed according to the inverse variance weight, which provides a quantitative measure for the reliability of flux measurement in the galaxy spectra to be processed. By adopting the inverse variance weight, we take into account the different noise levels in different spectral regions, so that the uncertainty associated with each flux measurement can be more accurately evaluated to obtain the processed galaxy spectrum to be processed.

[0064] According to an embodiment of the present invention, the method further includes: obtaining sky ray intensity; and when the sky ray intensity increases, masking the galaxy spectrum to be processed to obtain the masked galaxy spectrum to be processed.

[0065] According to an embodiment of the present invention, in order to finely process the sky line interference problem in the galaxy spectrum to be processed, a dynamic mask strategy is adopted, so that the mask size increases logarithmically with the increase of the sky line intensity, and the masked galaxy spectrum to be processed is obtained, so as to accurately eliminate the influence of the atmosphere on the galaxy spectrum to be processed.

[0066] According to an embodiment of the present invention, in addition to the above operations, pre-processing operations such as standardization and normalization may be performed on the galaxy spectrum to be processed.

[0067] To ensure the data consistency of the galaxy spectra to be processed, the galaxy spectra to be processed were zero-filled and the observed wavelengths were standardized to the range of 3784 to 9332 angstroms. By standardizing the wavelength scale, spectral features can be accurately aligned and compared, which is crucial for detailed spectral analysis and extraction of meaningful features.

[0068] The wavelength range of 5300 to 5850 Å was set as the normalization window because this range is relatively stable over all redshift values, thus reducing the amplitude deviation caused by the redshift effect and ensuring that the spectral analysis of the galaxy spectra to be processed will not be confounded by the redshift-dependent amplitude distortion.

[0069] According to an embodiment of the present invention, the method further includes: when the detection result indicates that the galaxy feature is abnormal, storing the galaxy feature in an abnormality database and adding an abnormality mark.

[0070] According to an embodiment of the present invention, when the detection results indicate that there are abnormalities in galaxy characteristics, corresponding abnormality identifiers are added according to the abnormality types of the galaxy characteristics, such as instrument abnormalities or unknown abnormalities, and stored in an abnormality database for manual analysis by scientific researchers.

[0071] According to an embodiment of the present invention, a self-attention model is used to extract features of a galaxy spectrum to be processed to obtain galaxy features, including: extracting features of the galaxy spectrum to be processed to obtain a query vector, a key vector and a value vector; and processing the query vector, the key vector and the value vector based on an attention network algorithm to obtain galaxy features.

[0072] According to an embodiment of the present invention, feature extraction is performed on the galaxy spectrum to be processed to obtain a query vector, a key vector and a value vector, wherein the galaxy spectrum to be processed is a long sequence data, and after being sliced, it is input into a self-attention model in the form of a slice sequence, so that the self-attention model can process all positions in the sequence at the same time and effectively capture the long-distance dependencies in the sequence.

[0073] According to an embodiment of the present invention, the dot product between the query vector and the key vector is calculated to determine the attention score, and then the attention score is converted into an attention weight through a Softmax function. According to the calculated attention weight, the value vector is weighted averaged to obtain the final attention output, which reflects the model's attention to the most relevant part of the input galaxy spectrum to be processed based on the calculated attention weight to obtain the galaxy characteristics.

[0074] According to an embodiment of the present invention, the self-attention model can model the long-distance dependencies in the galaxy spectrum through the self-attention mechanism. Compared with traditional CNN and MLP, the self-attention model is not limited by the fixed receptive field, can efficiently process the entire sequence, improve the richness and accuracy of feature representation, and thus achieve better performance in tasks such as galaxy classification and redshift estimation; the self-attention mechanism of the self-attention model allows the model to consider the entire sequence when processing any sequence element. This global information capture is crucial for understanding the characteristics and patterns of galaxy spectra, and fully makes up for the problem of insufficient global context capture capabilities of models such as CNN and MLP, so that the model can better understand and interpret galaxy spectral data, and improve the accuracy and reliability of analysis; the self-attention mechanism does not depend on the order of elements in the sequence, and can be calculated at multiple locations simultaneously. Therefore, the self-attention model supports parallel computing, overcomes the limitation that CNN needs to perform layer-by-layer calculations when processing sequence data, improves the training efficiency and processing speed of the model, and greatly reduces the analysis cost of massive galaxy spectral data.

[0075] Figure 3 A schematic diagram of a method for processing galaxy spectra according to an embodiment of the present invention is shown.

[0076] According to an embodiment of the present invention, the method for processing galaxy spectra can be as follows: Figure 3 As shown, operation S310 is performed to obtain the galaxy spectrum to be processed. Operation S320 is performed to preprocess the obtained galaxy spectrum to be processed, which can be specifically standardized, weighted averaged, masked and normalized to obtain the preprocessed galaxy spectrum to be processed. Operation S330 is performed to extract features of the galaxy spectrum to be processed using the self-attention model to obtain galaxy features. In operation S340, the galaxy features obtained in operation S330 are detected based on historical galaxy features. In operation S350, it is determined whether the above detection results are abnormal. If so, operation S360 is performed to store the galaxy features in the abnormal database and add an abnormal identification. If not, operation S370 is performed to classify the galaxy features and estimate the redshift, and obtain the classification results and redshift prediction values ​​to assist scientific researchers in their research.

[0077] Based on the above-mentioned galaxy spectrum processing method, the present invention also provides a galaxy spectrum processing device. Figure 4 The device is described in detail.

[0078] Figure 4 A structural block diagram of a device for processing galaxy spectra according to an embodiment of the present invention is shown.

[0079] like Figure 4As shown, the galaxy spectrum processing device 400 of this embodiment includes a first acquisition module 410 , an extraction module 420 , a detection module 430 and a classification module 440 .

[0080] The first acquisition module 410 is used to acquire the spectrum of the galaxy to be processed. In one embodiment, the first acquisition module 410 can be used to perform the operation S210 described above, which will not be described in detail here.

[0081] The extraction module 420 is used to extract features from the galaxy spectrum to be processed using the self-attention model to obtain galaxy features, where the galaxy features represent the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed. In one embodiment, the extraction module 420 can be used to perform the operation S220 described above, which will not be repeated here.

[0082] The detection module 430 is used to detect the galaxy features based on the historical galaxy features to obtain a detection result. In one embodiment, the detection module 430 can be used to perform the operation S230 described above, which will not be described in detail here.

[0083] The classification module 440 is used to classify the galaxy features when the detection result characterizes that there is no abnormality in the galaxy features, and obtain a classification result characterizing the galaxy type and a redshift prediction value corresponding to the galaxy. In one embodiment, the classification module 440 can be used to perform the operation S240 described above, which will not be repeated here.

[0084] According to an embodiment of the present invention, a galaxy spectrum to be processed is obtained; a self-attention model is used to extract features of the galaxy spectrum to be processed to obtain galaxy features; the galaxy features are detected based on historical galaxy features to obtain detection results; when the detection results indicate that the galaxy features do not have abnormalities, the galaxy features are classified to obtain classification results representing the galaxy type and redshift prediction values ​​corresponding to the galaxies. Since the self-attention model is used to extract features of the galaxy spectrum to be processed, the problem of difficulty in extracting features of galaxy spectra in long sequence data formats is avoided, so that the model can better understand and interpret galaxy spectrum data; in addition, the detection of galaxy features based on historical galaxy features avoids the problems of poor accuracy and low efficiency of the prior art, and improves the efficiency and flexibility of retrieval.

[0085] According to an embodiment of the present invention, any multiple modules of the first acquisition module 410, the extraction module 420, the detection module 430 and the classification module 440 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the first acquisition module 410, the extraction module 420, the detection module 430 and the classification module 440 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the first acquisition module 410, the extraction module 420, the detection module 430 and the classification module 440 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0086] According to an embodiment of the present invention, the detection module 430 includes a retrieval submodule and a first detection submodule.

[0087] The retrieval submodule is used to take the galaxy feature as the retrieval target, perform similarity retrieval in the historical galaxy features, and obtain m target historical galaxy features corresponding to the galaxy feature, where m is a positive integer.

[0088] The first detection submodule is used to detect galaxy features based on an anomaly detection algorithm using m target historical galaxy features to obtain a detection result.

[0089] According to an embodiment of the present invention, the first detection submodule includes a calculation unit and a determination unit.

[0090] The calculation unit is used to perform similarity distance calculation on each target historical galaxy feature and galaxy feature respectively to obtain m distance values.

[0091] The determination unit is used to determine the detection result according to the comparison result between each of the m distance values ​​and a preset feature distance threshold.

[0092] According to an embodiment of the present invention, the classification module 440 includes a classification submodule, a second detection submodule and a processing submodule.

[0093] The classification submodule is used to classify galaxy features using the pre-trained classification head to obtain classification results that characterize galaxy types.

[0094] The second detection submodule is used to perform spectral line displacement detection on the spectral lines corresponding to the galaxy in the galaxy spectrum to be processed based on the galaxy characteristics, and obtain the target displacement characteristics.

[0095] The processing submodule is used to process the target displacement characteristics of the spectral line using the pre-trained regression head to obtain the redshift prediction value corresponding to the galaxy.

[0096] According to an embodiment of the present invention, the galaxy spectrum processing device 400 further includes a processing module.

[0097] The processing module is used to perform weighted average processing on the galaxy spectra to be processed from multiple data sources of the same galaxy to obtain a processed galaxy spectrum to be processed.

[0098] According to an embodiment of the present invention, the galaxy spectrum processing device 400 further includes a second acquisition module and a mask module.

[0099] The second acquisition module is used to acquire the sky line strength.

[0100] The mask module is used to mask the galaxy spectrum to be processed when the sky line intensity increases, so as to obtain the masked galaxy spectrum to be processed.

[0101] According to an embodiment of the present invention, the galaxy spectrum processing device 400 further includes a storage module.

[0102] The storage module is used to store the galaxy characteristics into the anomaly database and add an anomaly mark when the detection result indicates that the galaxy characteristics are abnormal.

[0103] According to an embodiment of the present invention, the extraction module 420 includes an extraction submodule and an acquisition submodule.

[0104] The extraction submodule is used to extract features from the galaxy spectrum to be processed and obtain the query vector, key vector and value vector.

[0105] A submodule is obtained, which is used to process the query vector, key vector and value vector based on the attention network algorithm to obtain the galaxy features.

[0106] Figure 5 A block diagram of an electronic device suitable for implementing a method for processing galaxy spectra according to an embodiment of the present invention is shown.

[0107] like Figure 5As shown, the electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0108] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.

[0109] According to an embodiment of the present invention, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the input / output (I / O) interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that the computer program read therefrom is installed into the storage portion 508 as needed.

[0110] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0111] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.

[0112] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the galaxy spectrum processing method provided by the embodiment of the present invention.

[0113] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 501. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0114] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0115] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0116] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0117] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0118] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.

[0119] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A method for processing galaxy spectra, characterized in that: The method comprises: Get the galaxy spectrum to be processed; Using a self-attention model to extract features from the galaxy spectrum to be processed, to obtain galaxy features, wherein the galaxy features represent the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed; Detecting the galaxy features based on historical galaxy features to obtain a detection result; When the detection result indicates that there is no abnormality in the characteristics of the galaxy, Using a pre-trained classification head to classify the galaxy features, and obtaining a classification result representing the galaxy type; Based on the galaxy characteristics, a spectral line displacement detection is performed on the spectral line corresponding to the galaxy in the spectrum of the galaxy to be processed to obtain a target displacement characteristic; The target displacement characteristics of the spectral line are processed using a pre-trained regression head to obtain a redshift prediction value corresponding to the galaxy.

2. The method according to claim 1, characterized in that The detecting of the galaxy features based on the historical galaxy features to obtain the detection results includes: Taking the galaxy feature as a search target, performing a similarity search in the historical galaxy features to obtain m target historical galaxy features corresponding to the galaxy feature, where m is a positive integer; Based on an anomaly detection algorithm, the galaxy features are detected using the m target historical galaxy features to obtain the detection result.

3. The method according to claim 2, characterized in that The method of detecting the galaxy feature by using the m target historical galaxy features based on the anomaly detection algorithm to obtain the detection result includes: Performing similarity distance calculations on each of the target historical galaxy features and the galaxy features respectively to obtain m distance values; The detection result is determined according to a comparison result between each of the m distance values ​​and a preset feature distance threshold.

4. The method according to claim 1, characterized in that: The method further comprises: The galaxy spectra to be processed from multiple data sources of the same galaxy are subjected to weighted averaging processing to obtain a processed galaxy spectrum to be processed.

5. The method according to claim 1, characterized in that The method further comprises: Get the sky line strength; When the sky line intensity increases, the galaxy spectrum to be processed is masked to obtain a masked galaxy spectrum to be processed.

6. The method according to claim 1, characterized in that The method further comprises: When the detection result indicates that the galaxy feature is abnormal, the galaxy feature is stored in an abnormality database and an abnormality mark is added.

7. The method according to claim 1, characterized in that The self-attention model is used to extract features from the galaxy spectrum to be processed to obtain galaxy features, including: Extracting features from the galaxy spectrum to be processed to obtain a query vector, a key vector and a value vector; The query vector, the key vector and the value vector are processed based on an attention network algorithm to obtain the galaxy feature.

8. A galaxy spectrum processing device, characterized in that: The device comprises: A first acquisition module is used to acquire the galaxy spectrum to be processed; An extraction module is used to extract features of the galaxy spectrum to be processed by using a self-attention model to obtain galaxy features, wherein the galaxy features represent the physical state and chemical composition information of the galaxy corresponding to the galaxy spectrum to be processed; a detection module, configured to detect the galaxy features based on the historical galaxy features to obtain a detection result; and A classification module, for classifying the galaxy features when the detection result indicates that the galaxy features do not have any abnormality, to obtain a classification result indicating the type of galaxy and a redshift prediction value corresponding to the galaxy; The classification module comprises: A classification submodule, used for classifying the galaxy features using a pre-trained classification head to obtain a classification result representing the galaxy type; A second detection submodule is used to perform spectral line displacement detection on the spectral lines corresponding to the galaxy in the spectrum of the galaxy to be processed based on the galaxy characteristics to obtain a target displacement feature; The processing submodule is used to process the target displacement characteristics of the spectral line using the pre-trained regression head to obtain the redshift prediction value corresponding to the galaxy.

9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Radio galaxy form identification and segmentation method based on spatial feature aggregation network

    CN117830741A

  • Galaxy spectrum classification method and device

    CN118551314A