A method and device for establishing a mineral customization library, an apparatus, and a storage medium

CN123011856APending Publication Date: 2026-10-30BEIJING MINING & METALLURGICAL TECH GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611188172.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

特别是,该方法极易将一些“混谱”(混合能谱)错误地识别为某种数据库中存在、但样品中实际上并不存在的矿物,这种情况最终会导致测试结果的严重失真

Benefits of technology

(1)本申请所提供的建立方法不再仅仅依赖于“峰形相似度”这一单一标准。其创新性地引入了包括实测灰度与理论灰度差异、面积百分比、最大相面积在内的“多重匹配参数”。通过能谱和灰度信息的“双重确认”,可以有效避免因不同矿物能谱峰形相似而导致的混淆和错误辨识,显著提高了矿物种类确认的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011856A_ABST
    Figure CN123011856A_ABST
Patent Text Reader

Abstract

The application provides a method and device for establishing a mineral customization library, equipment and a storage medium, and relates to the technical field of automatic mineral testing. The method comprises the following steps: comparing a measured spectrum recorded in a measurement file with a theoretical synthetic spectrum in a standard spectrum database to obtain a preliminarily identified mineral; screening the preliminarily identified mineral to confirm the mineral type and establish a preliminary mineral customization library; analyzing an unknown mineral mixed spectrum that fails to match the preliminary mineral customization library through a mathematical model and identifying the unknown mineral mixed spectrum as a single mineral; and adding the identified single mineral to the preliminary mineral customization library to form an updated mineral customization library. The method significantly improves the accuracy and efficiency of establishing a mineral customization library by using multiple matching parameters and a mathematical model to analyze a mixed spectrum, and overcomes the defects of traditional methods, such as confusion, time consumption and dependence on experience, which are caused by only relying on peak shape similarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automatic mineral testing technology, and in particular to a method, apparatus, equipment and storage medium for establishing a customized mineral library. Background Technology

[0002] In an automated testing system for process mineralogical parameters, a crucial first step is establishing a customized mineral library suitable for parameter calculations. This library precisely identifies the mineral species present in the test sample. All subsequent calculations of process mineralogical parameters are based on this library; therefore, the accuracy and efficiency of its establishment are critical to ensuring the reliability of the entire system's test results.

[0003] Existing automated mineral testing systems primarily classify all energy spectrum lines in measurement files according to "peak shape similarity" when establishing a customized mineral library. Since a single sample often contains dozens or even hundreds of spectral types, this method requires sequentially matching each type of line against the system's built-in mineral energy spectrum database. This matching is based on the peak shape similarity between the measured spectral lines and those in the system's database, or it may allow users to name and edit the attributes of the spectral lines based on their personal experience. Only after confirming the mineral names of all classified spectral lines is the establishment of the customized mineral library for that sample considered complete.

[0004] However, this existing method has serious drawbacks. First, it is extremely inefficient. Because each type of spectral line must be matched and confirmed sequentially, building a mineral database for a sample often takes several hours, which severely impacts the overall testing progress.

[0005] More seriously, the accuracy of this method is low. Because the matching process is based entirely on the single factor of "peak shape similarity," it is inevitable that some minerals will be difficult to identify accurately due to their similar peak shapes. In particular, this method is prone to misidentifying some "mixed spectra" (mixed energy spectra) as minerals that exist in the database but are not actually present in the sample. This situation will ultimately lead to serious distortion of the test results. Summary of the Invention

[0006] In a first aspect, the present invention provides a method for establishing a customized mineral library, comprising: The measured energy spectrum recorded in the measurement file is compared with the theoretical synthesized spectrum in the standard energy spectrum database to obtain the preliminary mineral identification. Based on multiple matching parameters such as spectral matching degree, area percentage, and difference between measured and theoretical gray values ​​of the preliminarily identified minerals, the preliminarily identified minerals are screened to confirm mineral types and establish a preliminary customized mineral library. Unknown mineral mixed spectra that fail to match the preliminary mineral customization library are analyzed using a mathematical model and identified as single minerals. The single mineral is added to the initial mineral customization library to form an updated mineral customization library.

[0007] In an optional implementation, the preliminary identification of minerals is screened based on multiple matching parameters, such as spectral matching degree, area percentage, and difference between measured and theoretical gray levels, to confirm mineral types and establish a preliminary customized mineral library, including: Obtain the maximum phase area of ​​the initially identified minerals; Determine whether the preliminarily identified minerals simultaneously meet a first condition and a second condition; the first condition is: the spectral matching degree is greater than a first preset matching threshold, or the area percentage is greater than a first preset area threshold, or the maximum phase area is greater than a preset phase area threshold; and determine whether the preliminarily identified minerals meet the second condition; the second condition is: the absolute value of the difference between the measured gray value and the theoretical gray value is less than a preset gray value deviation threshold. If so, add the mineral to the initial mineral customization library.

[0008] In an optional implementation, the theoretical gray level is determined based on the average atomic number of the initially identified minerals; and / or, The theoretical gray level (y) and the average atomic number (x) are related by a function. Determine; and / or, The first preset matching threshold is 85%; and / or, The first preset area threshold is 10%; and / or, The preset phase area threshold is 5000 pixels; and / or, The preset grayscale deviation threshold is 20.

[0009] In an optional implementation, the step of analyzing and identifying unknown mineral mixtures that fail to match the initial mineral customization library as single minerals using a mathematical model includes: Construct a candidate mineral spectrum set; wherein, the candidate mineral spectrum in the candidate mineral spectrum set includes: mineral spectra with similar gray levels selected from the mineral spectrum library based on the gray level of the unknown mineral mixed spectrum, and spectral lines of known minerals around the spatial location of the unknown mineral mixed spectrum in the measurement sample; The mixed spectrum of the unknown minerals and the spectrum of the candidate minerals were normalized. The unknown mineral mixed spectrum is represented as a linear combination of multiple candidate mineral spectra in the candidate mineral spectrum set, and the linear combination has its own fitting coefficient; The fitting coefficients are adjusted by iterative calculation to reduce the fitting error between the fitted spectrum formed by the linear combination and the mixed spectrum of the unknown mineral. When the fitting error is less than or equal to a preset error threshold, the iteration stops and the final fitting coefficients are obtained. The single mineral corresponding to the unknown mineral mixed spectrum is determined based on the maximum coefficient value in the final fitting coefficients.

[0010] In an optional implementation, the step of constructing the candidate mineral spectrum set includes: determining the total number of candidate mineral spectra in the candidate mineral spectrum set to 5; wherein, priority is given to selecting spectral lines of known minerals in the vicinity of the spatial location; if there are fewer than 5, then the mineral spectrum with the closest gray level is selected from the mineral spectrum library to supplement it; and / or, The normalization process includes: processing the energy spectra of the unknown mineral mixed spectrum and the multiple candidate mineral spectra to ensure that the sum of the energy spectrum counts is 10,000; and / or, The sum of the fitting coefficients of the multiple candidate mineral spectra is 100%; and / or, The preset error threshold is 10. -3 .

[0011] In an optional implementation, adjusting the fitting coefficients through iterative calculation includes: In the (n+1)th iteration, the coefficients of the candidate mineral spectra in the nth iteration are adjusted according to the following formula: ; Where k represents the index of the candidate mineral spectrum whose coefficients are currently being adjusted; n represents the number of iterations; The fitting coefficient of the spectrum of the k-th candidate mineral in the (n+1)th iteration is represented. The value represents the fitting coefficient of the k-th candidate mineral spectrum in the nth iteration; the ± sign is determined based on whether the fitting error decreases before and after adjustment.

[0012] In an optional implementation, the fitting error is calculated as follows: ; Where n represents the number of iterations; This represents the fitting error at the (n+1)th iteration; Represents mixed spectra of unknown minerals; This represents the fitted spectrum formed by a linear combination of candidate mineral spectra at the (n+1)th iteration; Represents unknown mineral mixed spectrum The spectrum fitted with the (n+1)th iteration is: | - ∣= ; k and m represent the sequence numbers of the energy spectra of the candidate minerals; j represents the channel number of the energy spectrum. Represents unknown mineral mixed spectrum Energy spectrum count in channel j; , Representative candidate mineral spectrum or Energy spectrum count in channel j; The fitting coefficient of the spectrum of the k-th candidate mineral in the (n+1)th iteration is represented. The coefficient represents the fitting coefficient of the spectrum of the m-th candidate mineral in the (n+1)-th iteration.

[0013] Secondly, the present invention provides an apparatus for establishing a customized mineral library, comprising: The comparison module is used to compare the measured energy spectrum recorded in the measurement file with the theoretical synthesized spectrum in the standard energy spectrum database to obtain the preliminary mineral identification. The module is used to screen the preliminarily identified minerals based on multiple matching parameters such as spectral matching degree, area percentage, and difference between measured and theoretical gray values, in order to confirm the mineral types and establish a preliminary customized mineral library. The analysis module is used to analyze and identify unknown mineral mixed spectra that fail to match the preliminary mineral customization library as single minerals through mathematical models; An update module is used to add the single mineral to the initial mineral customization library to form an updated mineral customization library.

[0014] Thirdly, the present invention provides a computer device, the computer device including a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the method for establishing a mineral customization library according to any of the foregoing embodiments.

[0015] Fourthly, the present invention provides a computer storage medium storing a computer program, which, when executed on a processor, implements the method for establishing a mineral customization library according to any of the foregoing embodiments.

[0016] The embodiments of this application have the following beneficial effects: (1) The establishment method provided in this application no longer relies solely on the single criterion of "peak shape similarity". It innovatively introduces "multiple matching parameters" including the difference between measured gray value and theoretical gray value, area percentage, and maximum phase area. Through "dual confirmation" of energy spectrum and gray value information, confusion and misidentification caused by the similarity of energy spectrum peaks of different minerals can be effectively avoided, and the accuracy of mineral type identification is significantly improved.

[0017] (2) Solving the distortion problem caused by spectral mixing. To address the problem that existing methods easily misidentify "spectral mixing" as "minerals that do not actually exist," this method provides a specific solution. It first identifies the spectral lines that fail to match as spectral mixing of unknown minerals, and then analyzes them using a mathematical model to restore and identify them as real single minerals. This avoids introducing false minerals into the database, thus preventing distortion of the final test results.

[0018] (3) The method provided in this application can significantly improve the efficiency of database establishment. Through automatic screening of multiple parameters, operators can quickly select and confirm minerals that meet the conditions. This changes the cumbersome process that previously required matching and confirming dozens or even hundreds of spectral lines one by one, greatly reducing the time to establish a sample library from "several hours" and significantly improving the overall testing efficiency of the system.

[0019] (4) The method provided in this application can reduce the reliance on the operator's experience. The method provides a set of objective and quantitative screening criteria (such as energy spectrum matching degree, gray scale deviation value, etc.) and automatically analyzes mixed spectra. This replaces the previous operation of "naming and editing the attributes of a certain type of spectral line based on personal experience", so that the process of building the database is no longer "overly dependent on personnel experience" and reduces the professional skill requirements of the operator. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and therefore should not be considered as a limitation on the scope of protection of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the hardware operating environment involved in an embodiment of the method for establishing a custom mineral library of the present invention; Figure 2 This is a flowchart illustrating Embodiment 1 of the method for establishing a customized mineral library according to the present invention; Figure 3 This is a detailed flowchart of step S200 in Embodiment 2 of the method for establishing a customized mineral library of the present invention; Figure 4 The average atomic number-BSE grayscale curve of minerals in Example 2 of the method for establishing a customized mineral library of the present invention; Figure 5 This is a detailed flowchart of step S300 in embodiment 3 of the method for establishing a customized mineral library of the present invention; Figure 6 This is the measured energy spectrum of the unknown mineral mixture in Example 4 of the present invention; Figure 7 This is a schematic diagram of the module connections of the mineral customization library creation device of the present invention. Detailed Implementation

[0022] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0023] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0024] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0025] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0026] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0027] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0028] like Figure 1 The diagram shown is a structural schematic of the hardware operating environment of the terminal involved in an embodiment of the present invention.

[0029] The mineral customization library creation system (device) of this invention can be a PC, or a mobile terminal device such as a smartphone, tablet, or laptop. This visual navigation optimization system may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, an input unit such as a keyboard, or a remote control; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory, such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001. Optionally, the mineral customization library creation system may also include RF (Radio Frequency) circuitry, audio circuitry, a Wi-Fi module, etc. In addition, the visual navigation optimization system can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, which will not be described in detail here.

[0030] Those skilled in the art will understand that Figure 1 The visual navigation optimization system shown is not intended to limit it and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Figure 1 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a data interface control program, a network connection program, and a visual navigation optimization program.

[0031] In summary, the method provided by this invention significantly improves the accuracy and efficiency of establishing a customized mineral library by introducing multiple matching parameters, including energy spectrum matching and grayscale difference, and combining them with a mathematical model to analyze mixed spectra. This overcomes the problem that traditional methods, which rely solely on peak shape similarity, are prone to mineral confusion and misjudgment of mixed spectra. It also significantly reduces library construction time and decreases the reliance on the professional experience of operators.

[0032] Example 1 Reference Figure 2 This embodiment provides a method for establishing a customized mineral library, including: Step S100: Compare the measured energy spectrum recorded in the measurement file with the theoretical synthesized spectrum in the standard energy spectrum database to obtain the preliminarily identified minerals.

[0033] This step is the initial matching of the method. It refers to a large-scale automatic comparison of the raw data (i.e., the "measured energy spectrum") collected by the automated testing system when measuring the sample with a known, standardized database of "theoretical synthetic spectra". The process can be a "one-to-many" or "many-to-many" comparison. The system will extract each measured energy spectrum from the measurement file and then search for the most similar theoretical spectrum in the standard database.

[0034] The result of this step may be a list of "preliminarily identified minerals". Specifically, the system will temporarily "label" each measured energy spectrum as the mineral represented by the "theoretical synthesis spectrum with the highest matching degree". For example, if measured spectrum A has the highest matching degree with the theoretical spectrum of "chalcopyrite" in the database, then measured spectrum A is preliminarily identified as "chalcopyrite".

[0035] Specifically, this can be achieved using a spectral matching algorithm. This algorithm calculates the similarity score (i.e., "matching degree") between a measured spectrum and every theoretical spectrum in the database, and selects the one with the highest score as the matching result.

[0036] Step S200: Based on multiple matching parameters such as spectral matching degree, area percentage, and difference between measured gray level and theoretical gray level of the preliminarily identified minerals, the preliminarily identified minerals are screened to confirm the mineral types and establish a preliminary customized mineral library.

[0037] This step involves multi-parameter screening. It should be noted that relying solely on the "spectral matching degree" in step S100 for identification is unreliable. Therefore, this step utilizes multiple parameters of different dimensions to conduct rigorous "cross-validation" and "screening" on the "preliminary identified minerals" list obtained in step S100.

[0038] Specifically, parameters can be collected. The system will automatically calculate and collect the "multiple matching parameters" listed in the claim for each mineral initially identified in step one. According to the disclosure, these parameters include at least: Spectral matching degree: the similarity of energy spectrum shapes.

[0039] Area percentage: The proportion of the area occupied by this mineral in the sample.

[0040] Measured grayscale: The actual brightness of the mineral in a backscattered electron image (BSE).

[0041] Theoretical grayscale difference: refers to the difference between the "measured grayscale" and the "theoretically expected grayscale" of the mineral. This is a dual verification of "energy dispersive spectroscopy and grayscale".

[0042] Execution filtering: The system will determine whether these parameters are "trustworthy" based on a set of preset logical rules.

[0043] This step yields a "preliminary customized mineral library." This library is a list of minerals with "high reliability." Minerals that pass multiple parameter screenings (e.g., high energy spectrum matching and small grayscale differences) are "confirmed" and added to this preliminary customized library. Minerals that fail the screenings (e.g., high spectral matching but large grayscale differences, indicating a possible misjudgment) are "removed."

[0044] The advantage of this step is that it significantly improves accuracy. It no longer relies on a single "spectral peak similarity" but uses multiple pieces of information, such as "energy spectrum" and "grayscale," for double or even multiple verification, which can effectively filter out misjudgments caused by spectral peak similarity.

[0045] Step S300: The unknown mineral mixed spectrum that fails to match the preliminary mineral customization library is analyzed by a mathematical model and identified as a single mineral.

[0046] This step involves mixed spectrum analysis. It specifically addresses the "mismatched" spectral lines that were "rejected" in step S200. This method does not simply discard the aforementioned data; instead, it assumes that most of it is "unknown mineral mixed spectrum" (i.e., a mixed signal generated by the electron beam simultaneously striking the boundaries of multiple minerals). The purpose of this step is to "unravel" this mixed signal using a "mathematical model" and identify its most dominant components. Specifically, the following processing can be performed: (1) Identify the target: Identify the spectral lines that failed to match in step two (i.e., mixed spectra).

[0047] (2) Application Model: Input these mixed spectrum data into a "mathematical model" for analysis.

[0048] (3) Identification of Attribution: The model calculation results will ultimately point this "mixed spectrum" to a "single mineral" (for example, if the model calculates that 70% of the components of this mixed spectrum come from A, 20% from B, and 10% from C, then it will be identified as A).

[0049] The result of this step is a list of "restored" minerals. These minerals are the real minerals that were "remaining after screening" in step S200, but were extracted back through the mathematical model in this step.

[0050] The advantage of this step is that it improves completeness and solves the distortion problem. It addresses the industry's pain point that "mixed spectra" are easily "misidentified as a mineral that does not actually exist," restoring it to the real mineral through mathematical analysis and avoiding distortion of test results.

[0051] Step S400: Add the single mineral to the initial mineral customization library to form an updated mineral customization library.

[0052] This step is a merge and update step, which is a data merging operation. It merges the list of "single minerals" parsed and identified by the "mathematical model" in step S200 with the "preliminary customized mineral library" (high credibility list) established in step two.

[0053] This step yields the "updated custom mineral library." This is a final, accurate (screened via step S200) and complete (interpreted by the mixed spectrum in step S300) list of minerals. This "updated" library will serve as the basis for the final calculation of all process mineralogical parameters.

[0054] This step ensures that the final mineral library used for calculations includes both high-confidence minerals and minerals reconstructed through complex analytical methods (mixed-spectrum analysis), thus ensuring that the final test results are both accurate and complete.

[0055] Example 2 Reference Figure 3 Based on the foregoing embodiments, this embodiment provides a method for establishing a customized mineral library. Step S200 involves screening the preliminarily identified minerals based on multiple matching parameters, such as spectral matching degree, area percentage, and the difference between measured and theoretical grayscale, to confirm mineral types and establish a preliminary customized mineral library. This includes: Step S210: Obtain the maximum phase area of ​​the preliminarily identified minerals.

[0056] This step is a data preparation step before executing the screening logic. The methods mentioned above involve "spectral matching degree," "area percentage," "measured gray level," and "theoretical gray level difference." Building upon this, this step explicitly points out that another crucial matching parameter needs to be obtained: "maximum phase area."

[0057] The system will examine all measured energy spectra of a particular mineral (e.g., chalcopyrite) that are initially identified. Then, it will find the area value of the phase with the largest area among the phases (i.e. mineral grains) in which these spectra were collected, thus obtaining a numerical value representing the "largest single grain area" (in pixels) of that mineral observed in the sample.

[0058] Specifically, this can be achieved in an automated testing system. While acquiring the energy spectrum, the system records the image area information of the "phase" in which the energy spectrum is located. Therefore, this step can query this record.

[0059] Step S220: Determine whether the preliminarily identified minerals simultaneously meet the first condition and the second condition; the first condition is: the spectral matching degree is greater than the first preset matching threshold, or the area percentage is greater than the first preset area threshold, or the maximum phase area is greater than the preset phase area threshold; and determine whether the preliminarily identified minerals meet the second condition; the second condition is: the absolute value of the difference between the measured gray value and the theoretical gray value is less than the preset gray value deviation threshold.

[0060] The above steps constitute the core screening logic of this method, defining an AND logic gate. The system performs a logical judgment on each "preliminarily identified mineral." A mineral must simultaneously satisfy both the "first condition" and the "second condition" to be considered credible. If either condition is not met, the mineral will be eliminated in this step. Specifically, this includes: 1. The first condition is any one of the following: (1) The spectral matching degree is greater than the first preset matching threshold; (2) The area percentage is greater than the first preset area threshold; (3) The maximum phase area is greater than the preset phase area threshold.

[0061] The above section defines the content of the aforementioned "first condition" in detail. This is an OR logic gate. The purpose of the "first condition" is to determine whether the mineral is "significantly present." It is achieved through three parallel OR conditions: checking whether the mineral's "spectral matching degree" (similarity of energy spectrum shape) is high enough (greater than a threshold); or checking whether the mineral's "area percentage" (proportion in the sample) is large enough (greater than a threshold); or checking whether the mineral's "maximum phase area" (maximum particle size) is large enough (greater than a threshold).

[0062] If any one of the above three checks is "true", the "first condition" is determined to be "satisfied".

[0063] For example, in some embodiments, the first preset matching threshold is 85%. In some embodiments, the first preset area threshold is 10%. In some embodiments, the preset phase area threshold is 5000 pixels.

[0064] The advantage of this design is that as long as a mineral meets any one of the criteria of "high matching degree", "high content" or "large particle size", its "confidence of existence" is very high and it can pass the first screening barrier.

[0065] 2. The second condition is: The absolute value of the difference between the measured gray level and the theoretical gray level is less than the preset gray level deviation threshold.

[0066] In some implementations, the theoretical gray level is determined based on the average atomic number of the initially identified minerals.

[0067] This section defines the content of the aforementioned "second condition," which is a mandatory cross-validation step. The system acquires the "measured grayscale" (actual brightness on the BSE image) of the mineral. The system calculates the "theoretical grayscale" of the mineral (the brightness it should have based on its chemical composition / average atomic number). The "absolute value" of the difference between the two is calculated: |measured grayscale - theoretical grayscale|. It is determined whether this "absolute value of the difference" is less than a preset tolerance range (i.e., the "preset grayscale deviation threshold"), thus obtaining a "yes" or "no" result indicating whether the "second condition" is satisfied.

[0068] For example, the following information is calculated for each identified mineral by comparing the measured spectrum with the theoretically synthesized mineral spectrum: (1) The maximum spectral match between all measured spectra of this mineral and its theoretical synthetic spectrum; (2) The percentage of the area of ​​this mineral in the sample; (3) The average atomic number of this mineral; (4) The maximum area of ​​the phase in all measured spectra of this mineral; (5) The measured gray value of the phase in which the energy spectrum of this mineral with the maximum match is obtained; (6) The theoretical gray value of this mineral (there is a certain curvilinear relationship between the theoretical gray value of a mineral and its average atomic number, see...). Figure 4 (7) Obtain the absolute value of the difference between the measured gray value of the phase of the maximum matching spectrum of this mineral and the theoretical gray value of this mineral.

[0069] Regarding step (6), it should be noted that the curve relationship between the theoretical gray value of the mineral and the average atomic number is based on the gray values ​​of dozens of common standard minerals collected under the conditions of adjusting the brightness and contrast of the backscattered electron image of an electron microscope to make the gray value of the gold sample 255 and the gray value of the epoxy resin background 10, and fitting them with the corresponding average atomic number. The functional relationship is as follows: , where x and y represent the mineral's average atomic number and theoretical gray level, respectively.

[0070] In some implementations, the preset grayscale deviation threshold is 20.

[0071] This section provides "dual confirmation of energy spectrum and grayscale information". If a mineral has a high energy spectrum matching degree (meets the first condition) but a huge difference in grayscale (does not meet the second condition), it is likely a misjudgment caused by "similar peak shape". This step will remove it to prevent misidentification.

[0072] This step determines whether each mineral is satisfied (yes) or not (no).

[0073] Step S230: If yes, add the mineral to the initial mineral customization library.

[0074] This step is the final execution action of the screening logic. Combining the logic of step S220, this step is only executed when a mineral simultaneously meets both the "first condition" (significant existence) and the "second condition" (passes grayscale cross-validation). In this case, the mineral is "confirmed" as a real mineral and added ("checked to add") to the list of the "Preliminary Mineral Customization Library". If a mineral fails to meet the "AND" logic of step two (e.g., only meets the first condition but not the second condition), it will not be added, and its corresponding spectral lines will be processed in the next step (mixed spectrum analysis).

[0075] Furthermore, if the judgment criteria of S220 are not met, then: if not, it is considered a mixed spectrum, and it is not added to the initial customized library, but is transferred to the next step of mathematical model (iterative fitting algorithm) for analytical processing (step S300).

[0076] Example 3 Reference Figure 5 Based on the foregoing embodiments, this embodiment provides a method for establishing a customized mineral library. Step S300 involves analyzing and identifying unknown mineral spectra that fail to match the initial customized mineral library as single minerals using a mathematical model, including: Step S310: Construct a candidate mineral spectrum set; wherein, the candidate mineral spectrum in the candidate mineral spectrum set includes: mineral spectra with similar gray levels selected from the mineral spectrum library based on the gray level of the unknown mineral mixed spectrum, and spectral lines of known minerals around the spatial location of the unknown mineral mixed spectrum in the measurement sample.

[0077] This step is a preparatory step for the "mathematical model." To "analyze" the mixture, it is first necessary to determine which "components" it is most likely composed of. Since "mixture spectra" usually occur at the boundaries between different mineral grains (i.e., phase edges), the true components of the mixture spectrum are highly likely to be known minerals that are spatially adjacent to it. At the same time, to prevent omissions, it is also necessary to search for minerals with similar physical properties (grayscale / average atomic number) from the database as supplementary components.

[0078] Specifically, the system acquires the coordinate position of the unknown mineral spectral mix in the measured sample and identifies the known mineral types (e.g., chalcopyrite, quartz) in the surrounding area (e.g., adjacent pixels or phases). Simultaneously, the system acquires the backscattered electron image grayscale of the unknown mineral spectral mix and retrieves minerals with similar grayscale values ​​from a standard mineral library.

[0079] In some embodiments, the step of constructing a candidate mineral spectrum set includes: determining the total number of candidate mineral spectra in the candidate mineral spectrum set to 5; wherein, priority is given to selecting spectral lines of known minerals in the vicinity of the spatial location; if there are fewer than 5, then the mineral spectrum with the closest gray level is selected from the mineral spectrum library to supplement it.

[0080] For example, if the known minerals surrounding the unknown mixed spectrum are "chalcopyrite" and "quartz", then these two minerals are directly selected into the candidate set; if the set is still missing 3 minerals, the system selects 3 minerals with the closest gray values ​​(such as pyrite, sphalerite, etc.) from the mineral library according to the gray value difference from smallest to largest to make up the missing minerals.

[0081] If there are five or more known mineral species in the surrounding area, the top five species in the surrounding area will be selected directly as candidates, and no further selection will be made from the database.

[0082] This strategy utilizes the dual constraints of the sample's "spatial topological information" and "physical grayscale information," significantly increasing the probability of hitting candidate minerals and thus improving the accuracy of subsequent fitting calculations. Step S320 involves normalizing the mixed spectrum of the unknown mineral and the spectrum of the candidate minerals.

[0083] This step is a data preprocessing step. Before performing quantitative mathematical fitting, it is essential to ensure that all energy spectrum data involved in the calculation ("unknown spectrum" and "candidate spectrum") are on a uniform scale. This involves mathematically "normalizing" the unknown mixed spectrum and all selected candidate spectra to obtain a set of energy spectrum data with a uniform scale that can be directly used for linear combination calculations.

[0084] In some embodiments, the normalization process includes processing the energy spectra of the unknown mineral mixed spectrum and the multiple candidate mineral spectra to a total energy spectrum count of 10,000.

[0085] For example, the counts of the 1024 channels of each spectrum (whether it is an unknown spectrum or a candidate spectrum) are scaled so that the sum of the counts of the 1024 channels of each spectrum is 10000.

[0086] Step S330: The unknown mineral mixed spectrum is represented as a linear combination of multiple candidate mineral spectra in the candidate mineral spectrum set, and the linear combination has its own fitting coefficient.

[0087] This step is the core of defining the mathematical model. It establishes a mathematical assumption that the "unknown mineral mixed spectrum" S0 is not a new substance, but rather a superposition of several "candidate mineral spectra" S1, S2, ... in a certain proportion (i.e., "fitting coefficients" x1, x2, ...).

[0088] This step involves establishing a mathematical equation to describe this linear combination relationship. This results in an equation to be solved, with the goal of finding the optimal "fit coefficients".

[0089] Specifically, if five candidate spectra are selected in step S310, the linear combination can be expressed as the following formula: S0=x1S1+x2S2+x3S3+x4S4+x5S5; Where S0 is the unknown mixed spectrum; S1~S5 are 5 candidate spectra; and x1~x5 are the fitting coefficients to be solved.

[0090] Furthermore, in some embodiments, the sum of the fitting coefficients of the multiple candidate mineral spectra is 100%, which is also the constraint condition of the model.

[0091] Step S340: Adjust the fitting coefficients through iterative calculation to reduce the fitting error between the fitted spectrum formed by the linear combination and the mixed spectrum of the unknown mineral.

[0092] This step describes the specific algorithm for solving the mathematical model. Since directly solving for x1 to x5 is difficult, this method uses "iterative calculation" (i.e., trial and error and gradual approximation) to find the optimal coefficient values.

[0093] The algorithm will provide a set of initial values ​​from x1 to x5 and calculate a "fit spectrum". .

[0094] Then, calculate this. The "fitting error" P between the true mixed spectrum S0 and the actual mixed spectrum S0 n Next, the algorithm will "adjust" the coefficient values ​​(for example, make x...). k Increase by 2%) to obtain a new And calculate the new error P. n+1 .

[0095] If the new error P n+1 Error P compared to the old one n If the error has decreased, it means the adjustment direction is correct, and the algorithm will continue to adjust in that direction. If the error increases, then it stops. That is, the adjustment of x can be stopped. k The adjustment can then be made, and the focus can shift to adjusting the next variable x. k+1 The stopping condition for iteration can be achieved by reaching the total fitting error P. n+1 ≤10 -3 until.

[0096] For example, an iterative algorithm can be used for adjustment, wherein adjusting the fitting coefficients through iterative calculation includes: In the (n+1)th iteration, the coefficients of the candidate mineral spectra in the nth iteration are adjusted according to the following formula: ; Where k represents the index of the candidate mineral spectrum whose coefficients are currently being adjusted; n represents the number of iterations; The fitting coefficient of the spectrum of the k-th candidate mineral in the (n+1)th iteration is represented. The value represents the fitting coefficient of the k-th candidate mineral spectrum in the nth iteration; the ± sign is determined based on whether the fitting error decreases before and after adjustment.

[0097] Furthermore, the method for calculating the fitting error is as follows: ; Where n represents the number of iterations; This represents the fitting error at the (n+1)th iteration; Represents mixed spectra of unknown minerals; This represents the fitted spectrum formed by a linear combination of candidate mineral spectra at the (n+1)th iteration; Represents unknown mineral mixed spectrum The spectrum fitted with the (n+1)th iteration is: | - ∣= ; k and m represent the sequence numbers of the energy spectra of the candidate minerals; j represents the channel number of the energy spectrum. Represents unknown mineral mixed spectrum Energy spectrum count in channel j; , Representative candidate mineral spectrum or Energy spectrum count in channel j; The fitting coefficient of the spectrum of the k-th candidate mineral in the (n+1)th iteration is represented. The coefficient represents the fitting coefficient of the spectrum of the m-th candidate mineral in the (n+1)-th iteration.

[0098] Step S350: When the fitting error is less than or equal to a preset error threshold, stop the iteration and obtain the final fitting coefficients.

[0099] This step sets the stopping condition for the iterative algorithm. Once the fitted spectrum is sufficiently close to the true mixed spectrum (i.e., the error is small enough), there is no need to continue the calculation.

[0100] Specifically, a new fitting error is calculated at each iteration step. Then, the system will compare it with a "preset error threshold".

[0101] once If the values ​​are less than or equal to this threshold, the iterative calculation "stops". The values ​​of x1 to x5 at this point are "acquired" and considered as the "final fitting coefficients".

[0102] For example, in some implementations, the preset error threshold is 10. -3 .

[0103] That is, when The iteration is complete at that time.

[0104] Step S360: Determine the single mineral corresponding to the unknown mineral mixed spectrum based on the maximum coefficient value in the final fitting coefficients.

[0105] This step is the final decision-making step. After obtaining the "final fitting coefficients" (e.g., x1~x5), this step translates them into a "single mineral" identification result.

[0106] Specifically, the system will compare These five values ​​will be used to filter and determine the "largest" coefficient value. The candidate mineral spectrum corresponding to this largest coefficient will then be "identified" as the "single mineral" corresponding to the unknown mineral's mixed spectrum.

[0107] For example, suppose that after the iteration, the final coefficients are: x1 (chalcopyrite) = 0.7, x2 (pyrite) = 0.2, x3 (quartz) = 0.1, x4 = 0, x5 = 0. The maximum coefficient value is 0.7. The mineral corresponding to 0.7 is "chalcopyrite". Therefore, this unknown mixed spectrum is "identified" as "chalcopyrite". This "chalcopyrite" will then be added to the custom library.

[0108] To better illustrate the aforementioned method, the following example of a specific fitting process is provided: The spectrum of each mineral consists of a 1024-channel histogram, each channel recording a certain energy spectrum pulse count. Before fitting, the energy spectra of the minerals involved in the fitting and the unknown mineral being fitted are normalized. That is, the energy spectrum of each mineral is expanded proportionally to the count of each channel, so that the sum of the counts of the 1024 channels of each spectrum is 10000. Let S represent a spectrum, and Sj represent the count of the j-th channel of the spectrum. It should be noted that the spectra of each mineral mentioned below are all normalized spectra.

[0109] First, let the spectrum of the unknown mineral be S0 = x1S1 + x2S2 + x3S3 + x4S4 + x5S5; where S1, S2, S3, S4, and S5 represent the spectra of the five selected minerals, S0 represents the spectrum of the unknown mineral in the mixed spectrum, and x1, x2, x3, x4, and x5 represent the fitting coefficients of the five mineral spectra, where x1 + x2 + x3 + x4 + x5 = 100%.

[0110] (1) Let k=1; (2) =20%, They are all equal. =(100%- )* (m=1,2,3,4,5; m );in, , For the first iteration (m=1, 2, 3, 4, 5.m) The coefficient of ) (3) = + ; (4) |S0-S 01 ∣= ; (5) ; (6) = +2%; (7) =(100%- )* ; (8) = + ; (9) | - ∣= ; (10) ; (11) If | - ∣-∣ - |>0; then in equation (13), “±” takes the value “+”; (12) If | - ∣-∣ - |<0; then the “±” in equation (13) is “-”; (13) = ±2%, n>3; (14) =(100%- )* ; (15) = + ; (16) | - ∣= ; (17) ; (18) If | - ∣-∣ - | < 0; continue calculation iteration (19) If | - ∣-∣ - If | > 0, then stop.

[0111] At this point, the coefficients of S1, S2, S3, S4, and S5 are respectively , Where m = 1~5, m ≠ k (k = 1). Or y1, y2, y3, y4, y5 (20) Let k = k + 1, and retain , value; Repeat (2) to (19) iterative calculations.

[0112] When k = 5q + 1, q is a positive integer greater than 0; retain , Let k=1, and repeat calculations (1) to (20); (due to the retention of the value, let k=1, and repeat calculations (1) to (20)); , The value no longer involves the process of manually setting the value of a coefficient, such as setting... =20%); until ≤10 -3 Then the iterative fitting calculation is complete, and at this point, S0=x 1n S1+x 2n S2+x 3n S3+x 4n S4+x 5n S5. That is, continuously repeat the inner loop of 'optimizing k=1 to 5', and use the optimization result of the previous round as the starting point in each round of the outer loop, until the total error is less than 10. -3 until.

[0113] Compare x 1n ,x 2n ,x 3n ,x 4n ,x 5n The size is determined by taking the maximum coefficient. The mineral represented by the spectral line with the maximum coefficient is the mineral that should be identified by the S0 mixed spectrum line; then, the mineral is added to the mineral library.

[0114] By analogy, each unknown mineral is continuously fitted to the corresponding mineral with the highest degree of matching, and then added to the mineral customization library one by one, eventually establishing a complete mineral customization library.

[0115] Example 4 This embodiment verifies the beneficial effects of the method described in this application compared to the prior art through actual mineral sample testing.

[0116] 1. Experimental conditions setup: A typical copper-sulfur ore section was selected as the test sample. The sample has a complex mineral composition, mainly containing chalcopyrite, pyrite, sphalerite, quartz, and a small amount of calcite. Due to the fine mineral grains and numerous intergrowth relationships, "spectral mixing" is easily generated during electron beam scanning.

[0117] Two sets of experiments were set up for comparison: Comparison group (existing technology group): Using traditional automated mineral analysis systems, the measured energy spectrum is matched with the standard library based solely on "energy spectrum peak shape similarity". Spectra with a matching degree below the threshold need to be manually checked one by one.

[0118] Experimental group (method of this application): The method described in embodiments 1-3 of this application was used. The parameters were set as follows: first preset matching threshold 85%, first preset area threshold 10%, preset grayscale deviation threshold 20, and fitting error threshold 10. -3 .

[0119] 2. Comparison of test results: Statistical results from processing data from several particles collected from the same sample show that: In terms of library construction efficiency, the control group took about 180 minutes to build the library due to the large number of suspected minerals that needed to be manually checked; while the experimental group benefited from automatic screening of multiple parameters and automatic analysis of mixed spectra, and the vast majority of minerals were directly identified, with the library construction time being only 10 minutes, which is more than 18 times more efficient.

[0120] Regarding the accuracy of identification, after final review by human experts, the comparison group identified some mixed spectra of "chalcopyrite + pyrite + calcite" as "match failure"; while the experimental group correctly restored the mineral composition through mathematical model and accurately identified the minerals.

[0121] 3. Specific case analysis of mixed spectrum analysis: To further illustrate the analytical capability of the mathematical model in this application for unknown mixed spectra, a typical "difficult spectral line" captured in the experiment was selected for analysis.

[0122] The spectral line was collected at the boundary between chalcopyrite, pyrite, and quartz.

[0123] In the control group, because the spectral line simultaneously contains Cu, Fe, S, Si and O elements, traditional methods identify it as a "match failure," leading to deviations in the final mineral quantification results.

[0124] In the experimental group: Step 1 (Filtering): The system matches the spectral line with the standard library. If the mineral cannot be identified, it is marked as "unknown mineral mixed spectrum".

[0125] Step 2 (Analysis): The system automatically retrieves several minerals with similar gray values ​​(including chalcopyrite and sphalerite) and the spectral lines of known minerals surrounding the unknown mineral phase from the spectral library based on the gray value (115) as candidate minerals (pyrite and calcite), for a total of 5 types.

[0126] Step 3 (Iterative Fitting): Perform iterative calculations using the mathematical model described in Example 3. For example... Figure 6 The image shown is the measured energy spectrum of the unknown mineral mixture captured in this embodiment.

[0127] After iterative calculation using the mathematical model, the final fitting error was reduced to 0.0008 (less than 0.001). The final fitting coefficients output by the system are: chalcopyrite (0.72), calcite (0.15), pyrite (0.13), nickel pyrite (0), and sphalerite (0).

[0128] Judgment: Based on the maximum coefficient value (0.72), the system determines that the dominant mineral at this location is chalcopyrite and includes it in the database.

[0129] In summary, based on the aforementioned experimental data and spectra, this application, by introducing the mechanisms of "multiple matching parameter screening" and "mixed spectrum mathematical model analysis," not only solves the problem of "mixed spectrum misjudgment" caused by the traditional method relying on single peak shape matching, but also effectively avoids the tedious process of manually processing massive amounts of difficult spectral lines. It is sufficient to support the technical solutions in the claims and significantly improves the accuracy and efficiency of establishing the mineral customized library.

[0130] refer to Figure 7 This application provides an apparatus for establishing a customized mineral library, comprising: The comparison module 10 is used to compare the measured energy spectrum recorded in the measurement file with the theoretical synthesized spectrum in the standard energy spectrum database to obtain the preliminarily identified minerals; The construction module 20 is used to screen the preliminarily identified minerals based on multiple matching parameters such as spectral matching degree, area percentage, and difference between measured gray level and theoretical gray level, so as to confirm the mineral types and establish a preliminary customized mineral library. The analysis module 30 is used to analyze and identify unknown mineral mixed spectra that fail to match the preliminary mineral customization library as single minerals through a mathematical model; The update module 40 is used to add the single mineral to the initial mineral customization library to form an updated mineral customization library.

[0131] It is understood that the apparatus in this embodiment corresponds to the method for establishing a mineral custom library in the above embodiments, and the options in the above embodiments are also applicable to this embodiment, so they will not be described again here.

[0132] This application also provides a computer device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the method for establishing a mineral customization library as described in any of the foregoing embodiments.

[0133] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0134] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.

[0135] This application provides a computer storage medium storing a computer program, which, when executed on a processor, implements the method for establishing a mineral customization library according to any of the foregoing embodiments.

[0136] The computer storage medium can be a readable storage medium, a non-volatile storage medium, or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0138] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0139] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0140] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for establishing a customized mineral library, characterized in that, include: The measured energy spectrum recorded in the measurement file is compared with the theoretical synthesized spectrum in the standard energy spectrum database to obtain the preliminary mineral identification. Based on multiple matching parameters such as spectral matching degree, area percentage, and difference between measured and theoretical gray values ​​of the preliminarily identified minerals, the preliminarily identified minerals are screened to confirm mineral types and establish a preliminary customized mineral library. Unknown mineral mixed spectra that fail to match the preliminary mineral customization library are analyzed using a mathematical model and identified as single minerals. The single mineral is added to the initial mineral customization library to form an updated mineral customization library.

2. The method for establishing a customized mineral library as described in claim 1, characterized in that, The minerals identified in the preliminary identification are screened based on multiple matching parameters, including spectral matching degree, area percentage, and difference between measured and theoretical gray levels, to confirm mineral types and establish a preliminary customized mineral library, including: Obtain the maximum phase area of ​​the initially identified minerals; Determine whether the preliminarily identified minerals simultaneously meet a first condition and a second condition; the first condition is: the spectral matching degree is greater than a first preset matching threshold, or the area percentage is greater than a first preset area threshold, or the maximum phase area is greater than a preset phase area threshold; and determine whether the preliminarily identified minerals meet the second condition; the second condition is: the absolute value of the difference between the measured gray value and the theoretical gray value is less than a preset gray value deviation threshold. If so, add the mineral to the initial mineral customization library.

3. The method for establishing a customized mineral library as described in claim 2, characterized in that, The theoretical gray level is determined based on the average atomic number of the preliminarily identified minerals; and / or, The theoretical gray level (y) and the average atomic number (x) are related by a function. Determine; and / or, The first preset matching threshold is 85%; and / or, The first preset area threshold is 10%; and / or, The preset phase area threshold is 5000 pixels; and / or, The preset grayscale deviation threshold is 20.

4. The method for establishing a customized mineral library as described in claim 1, characterized in that, The process of analyzing and identifying unknown mineral mixtures that fail to match the initial mineral customization library as single minerals through mathematical modeling includes: Construct a candidate mineral spectrum set; wherein, the candidate mineral spectrum in the candidate mineral spectrum set includes: mineral spectra with similar gray levels selected from the mineral spectrum library based on the gray level of the unknown mineral mixed spectrum, and spectral lines of known minerals around the spatial location of the unknown mineral mixed spectrum in the measurement sample; The mixed spectrum of the unknown minerals and the spectrum of the candidate minerals were normalized. The unknown mineral mixed spectrum is represented as a linear combination of multiple candidate mineral spectra in the candidate mineral spectrum set, and the linear combination has its own fitting coefficient; The fitting coefficients are adjusted by iterative calculation to reduce the fitting error between the fitted spectrum formed by the linear combination and the mixed spectrum of the unknown mineral. When the fitting error is less than or equal to a preset error threshold, the iteration stops and the final fitting coefficients are obtained. The single mineral corresponding to the unknown mineral mixed spectrum is determined based on the maximum coefficient value in the final fitting coefficients.

5. The method for establishing a customized mineral library as described in claim 4, characterized in that, The step of constructing the candidate mineral spectrum set includes: determining the total number of candidate mineral spectra in the candidate mineral spectrum set to 5; wherein, priority is given to selecting spectral lines of known minerals in the vicinity of the spatial location; if there are fewer than 5, then the mineral spectrum with the closest gray level is selected from the mineral spectrum library to supplement the set; and / or, The normalization process includes: processing the energy spectra of the unknown mineral mixed spectrum and the multiple candidate mineral spectra to ensure that the sum of the energy spectrum counts is 10,000; and / or, The sum of the fitting coefficients of the multiple candidate mineral spectra is 100%; and / or, The preset error threshold is 10. -3 .

6. The method for establishing a customized mineral library as described in claim 4, characterized in that, The step of adjusting the fitting coefficients through iterative calculation includes: In the (n+1)th iteration, the coefficients of the candidate mineral spectra in the nth iteration are adjusted according to the following formula: ; Where k represents the index of the candidate mineral spectrum whose coefficients are currently being adjusted; n represents the number of iterations; The fitting coefficient of the spectrum of the k-th candidate mineral in the (n+1)th iteration is represented. The value represents the fitting coefficient of the k-th candidate mineral spectrum in the nth iteration; the ± sign is determined based on whether the fitting error decreases before and after adjustment.

7. The method for establishing a customized mineral library as described in claim 4, characterized in that, The method for calculating the fitting error is as follows: ; Where n represents the number of iterations; This represents the fitting error at the (n+1)th iteration; Represents mixed spectra of unknown minerals; This represents the fitted spectrum formed by a linear combination of candidate mineral spectra at the (n+1)th iteration; Represents unknown mineral mixed spectrum The spectrum fitted with the (n+1)th iteration is: ∣ - ∣= ; k and m represent the sequence numbers of the energy spectra of the candidate minerals; j represents the channel number of the energy spectrum. Represents unknown mineral mixed spectrum Energy spectrum count in channel j; , Representative candidate mineral spectrum or Energy spectrum count in channel j; The fitting coefficient of the spectrum of the k-th candidate mineral in the (n+1)th iteration is represented. The coefficient represents the fitting coefficient of the spectrum of the m-th candidate mineral in the (n+1)-th iteration.

8. An apparatus for establishing a customized mineral library, characterized in that, include: The comparison module is used to compare the measured energy spectrum recorded in the measurement file with the theoretical synthesized spectrum in the standard energy spectrum database to obtain the preliminary mineral identification. The module is used to screen the preliminarily identified minerals based on multiple matching parameters such as spectral matching degree, area percentage, and difference between measured and theoretical gray values, in order to confirm the mineral types and establish a preliminary customized mineral library. The analysis module is used to analyze and identify unknown mineral mixed spectra that fail to match the preliminary mineral customization library as single minerals through mathematical models; The update module is used to add the identified single mineral to the initial mineral customization library to form an updated mineral customization library.

9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the method for establishing a mineral custom library according to any one of claims 1-7.

10. A computer storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the method for establishing a mineral customization library according to any one of claims 1-7.