New psychoactive substance identification and rapid comparison method and system based on big data
Through a new psychoactive substance recognition and rapid comparison system based on big data, the problem of time-consuming and highly dependable traditional detection methods is solved, and fast and efficient NPS recognition and comparison is achieved, and the challenge of the surge in NPS types is met. Improved the response capabilities of public safety supervision.
Patent Information
- Application Number
- CN202510097608.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2045-01-22
AI Technical Summary
Traditional new psychoactive substances (NPS) detection and identification methods rely on laboratory precision instruments and manual comparisons, which makes the detection process take a long time, rely on professional knowledge and difficult to quickly deal with the complexity and diversity of new NPS, resulting in the regulatory authorities being passive. situation.
A new method and system for identification and rapid comparison of psychoactive substances based on big data is adopted, and the rapid, efficient and automated identification and comparison of NPS is achieved through the automatic data acquisition module, HBase-based data storage module, NPS molecular structure analysis module, NPS intelligent comparison module and NPS result feedback and early warning module.
It significantly shortens the time from preliminary detection to final confirmation, improves the speed and accuracy of NPS recognition, reduces artificial errors, can cope with the geometric growth of NPS types, improves the response speed and processing capabilities of regulatory authorities, and ensures public Safety.
Smart Images

Figure CN119517223A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of novel addictive chemical substance identification, and in particular to a method and system for identifying and quickly comparing novel psychoactive substances based on big data. Background Art
[0002] With the rapid increase in the types of new psychoactive substances (NPS), the global drug market has become more complex and diverse than ever before. These substances usually circumvent existing legal controls and detection technologies by changing their chemical structures, allowing them to circulate in the market without being discovered in time. Traditional NPS detection and identification methods mainly rely on laboratory precision instrument detection. After the detection, the results are compared with the substances already listed in the control list to determine whether they match. However, the structural analysis step in this process is highly dependent on manual experience analysis, especially when the test results do not completely match the known substances in the control list. Identifiers need to perform manual comparisons based on the similarity of chemical structures to determine whether the substance is related to certain listed substances. This manual analysis process is not only time-consuming, but also requires a high level of professional knowledge from the identification personnel, and is often difficult to complete quickly.
[0003] The current manual comparison process takes hours or even days to analyze each sample due to the complex chemical structure and a large number of possible combinations. This means that a long period of time is required from preliminary testing to final confirmation and submission to regulatory authorities. During this period of time, the detected new psychoactive substances may have already entered the market, posing serious hazards to public health and social security. Faced with these problems, the lag and dependence of traditional detection methods put regulatory authorities in a passive situation when dealing with NPS, making it difficult to respond quickly to emergencies and reduce public risks.
[0004] Finally, due to the complex chemical structure of new psychoactive substances (NPS) and the ease of generating a large number of new derivatives through minor modifications, the types of new psychoactive substances show a geometric growth trend. Manufacturers often circumvent existing legal supervision by fine-tuning the molecular structure. This flexibility means that each chemical variation may form a new substance, increasing the difficulty of detection and the need for listing. However, the traditional database architecture relies on the concept of regular updates and linear expansion, which is difficult to keep up with the rapid increase in the types of NPS. As the amount of data increases, the query speed and processing efficiency of traditional databases in structural similarity comparisons will also decrease significantly, and cannot meet the needs of fast and efficient identification. Therefore, a new database concept that can adapt to the explosive growth of data, support efficient horizontal expansion, and complete the comparison and query of massive substances in seconds is needed to cope with the increasingly complex chemical changes and growth trends of NPS, and help laboratories and regulatory authorities to promptly discover and deal with potential new addictive substances. Summary of the invention
[0005] In view of the shortcomings of the above-mentioned prior art, the present invention proposes a method and system for identifying and quickly comparing new psychoactive substances based on big data, which can realize fast, efficient and automated identification and comparison of new psychoactive substances, and can cope with the possibility of geometric growth of new psychoactive substances in the future.
[0006] The new psychoactive substance identification and rapid comparison system based on big data disclosed in the present invention comprises an automatic data acquisition module, an NPS data storage module based on HBase, an NPS molecular structure analysis module, an NPS intelligent comparison module, an NPS result feedback and early warning module and an application terminal; The automatic data collection module, HBase-based NPS data storage module, NPS molecular structure analysis module, NPS intelligent comparison module, NPS result feedback and early warning module are all deployed on a distributed server using a microservice architecture, and data interaction is achieved between the modules through an API interface; in: Automatic data collection module, used to collect the result data detected by laboratory instruments and equipment and the updated data in the designated network control list in real time; The HBase-based NPS data storage module is used to receive data sent by the automatic data collection module, clean the data and convert it into a key-value pair format containing a molecular structure, and store it in the Hbase database; The NPS molecular structure analysis module is used to convert and analyze the data in the key-value pair format containing the molecular structure, obtain the molecular fingerprint of the new psychoactive substance, and return it to the NPS data storage module based on HBase; NPS intelligent comparison module, which is used to compare the molecular fingerprint of the substance to be tested with the listed molecular fingerprint data stored in the MySQL database, and send the comparison results to the NPS result feedback and early warning module; The NPS result feedback and warning module is used to generate warning information for comparison results that exceed the threshold through threshold comparison, and send it to the application terminal for user judgment. At the same time, it receives the judgment result of the application terminal on the warning information and dynamically adjusts the threshold according to the judgment result; The application terminal is used to provide users with a graphical interface to facilitate users to initiate comparison requests to the NPS intelligent comparison module and to display and feedback the user's judgment results.
[0007] Furthermore, the automatic data collection module includes: Instrument and equipment data acquisition unit, used to automatically collect the test result data newly generated by laboratory instruments and equipment; The network data collection unit is used to automatically obtain the updated NPS data in the control list published on the Internet through a network crawler. The collected NPS data flows unidirectionally into the distributed server through the border platform.
[0008] Furthermore, during the storage process, the HBase-based NPS data storage module first parses the data in the key-value pair format containing the molecular structure through the NPS molecular structure parsing module, and determines whether the parsed data is in the listed directory; If yes, the parsed data is assigned a flag of “1”, indicating “confirmed as a new psychoactive substance”, and is transferred to the MySQL database; If not, the parsed data will be sent to the NPS intelligent comparison module, and the feedback results of the NPS intelligent comparison module and the NPS result feedback and early warning module will be used to determine whether the parsed data should be subject to listing application; if so, the parsed data will be assigned a mark of "1" and transferred to the MySQL database; if not, it will be assigned a mark of "0", indicating "not confirmed as a new psychoactive substance", and stored in the Hbase database.
[0009] Furthermore, the NPS molecular structure analysis module includes: A molecular structure conversion unit is used to convert the key-value pair data containing the molecular structure into a SMILES structure, then extract the structural features of the molecule from the SMILES structure, and perform hash processing on the structural features to generate a bit vector, and use the bit vector as the molecular fingerprint; A new key-value pair generation unit is used to generate a new key-value pair according to the SMILES structure, and return the new key-value pair to the HBase-based NPS data storage module and store it in the HBase database; The key is the molecular fingerprint, and the value is a byte array of unique two-dimensional matrix characters that describe the structural characteristics of the molecule.
[0010] Furthermore, the NPS intelligent comparison module includes: A request data format determination unit, used for receiving a comparison request sent by an application terminal, and determining whether the data format in the comparison request is a molecular fingerprint format; If yes, it is sent to the comparison unit; if no, the comparison request is forwarded to the NPS molecular structure analysis module, which converts the data in the comparison request into a molecular fingerprint and returns it to the NPS intelligent comparison module; The comparison unit, based on the Tanimoto coefficient, compares the received molecular fingerprint with the data stored in the MySQL database one by one, outputs a value between 0 and 1, and sends the value as the comparison result to the NPS result feedback and early warning module.
[0011] Furthermore, the NPS result feedback and early warning module includes: A comparison result receiving unit receives the comparison result sent by the NPS intelligent comparison module; A threshold comparison unit compares the value of the comparison result with a preset threshold, generates warning information for comparison results that are greater than or equal to the threshold, and sends the warning information to the application terminal; The threshold self-adjusting unit receives the judgment result of the application terminal on the warning information, and learns according to the judgment result to automatically adjust the preset threshold.
[0012] The method for identifying and quickly comparing new psychoactive substances based on big data is implemented according to the system for identifying and quickly comparing new psychoactive substances based on big data, and includes the following implementation steps: Step 1: Build a distributed server; Step 2: The user configures the basic parameters of each microservice; Step 3: Automatically obtain the test result data of laboratory instruments and equipment and the updated data in the designated network control list through the data automatic acquisition module, and then parse these data into molecular fingerprint format through the NPS molecular structure analysis module, and store the data through the HBase-based data storage module; Step 4: The user initiates a comparison request through the application terminal. The NPS intelligent comparison module receives the comparison request, performs a similarity comparison on the molecular fingerprints in the comparison request data, and sends the comparison result to the NPS result feedback and warning module; The NPS result feedback and warning module compares the comparison results with the preset threshold, and generates warning information for the comparison results that are greater than or equal to the threshold, and sends it to the application terminal; After receiving the warning information, the user makes a judgment on the application terminal and returns the judgment result to the NPS result feedback and warning module to readjust the threshold.
[0013] Furthermore, the specific steps of step 3 include: Step 3.1: The network data collection unit monitors the designated network control list on the Internet in real time. If any data update is found, the latest data is crawled and uploaded to the NPS data storage module based on HBase; When the HBase-based NPS data storage module stores data, if the column family of the current data already exists, the current data is updated and the original data is stored as the old version; if the column family of the current data does not exist, a new row is added and the data is marked; then the new data containing the molecular structure is passed to the NPS molecular structure analysis module; Step 3.2: After receiving the data containing the molecular structure, the NPS molecular structure analysis module converts it into a SMILES structure, extracts the structural features of the molecule through the SMILES structure, performs hash processing on the structural features of the molecule to obtain the molecular fingerprint, and then returns the molecular fingerprint to the NPS data storage module based on HBase.
[0014] Furthermore, the specific steps of step 4 include: Step 4.1: The user logs in to the system through the application terminal. If the current molecular fingerprint is a new substance, a comparison request is initiated; Step 4.2: The application terminal sends the comparison request to the NPS intelligent comparison module. After receiving the comparison request, the NPS intelligent comparison module determines the data format of the comparison request. If the format is a non-molecular fingerprint format, the comparison request is forwarded to the NPS molecular structure analysis module. The NPS molecular structure analysis module converts the comparison request into a molecular fingerprint format and returns it to the NPS intelligent comparison module. After receiving the molecular fingerprint, the NPS intelligent comparison module compares the structural features of the vector string molecules one by one with the bit vectors already existing in the MySQL database, and sends the comparison results to the NPS result feedback and warning module; Step 4.3: The NPS result feedback and warning module compares the received comparison result with the preset threshold, generates warning information for the result greater than or equal to the threshold, and sends the warning information to the application terminal; Step 4.4: The user views the warning information through the application terminal, and at the same time initiates a three-dimensional molecular formula viewing request to the HBase-based NPS data storage module according to the relevant substance ID in the warning information. The user again determines whether the new substance needs to be listed based on the three-dimensional molecular formula viewing result, and feeds back the judgment result to the NPS result feedback and warning module. The NPS result feedback and warning module learns according to the user's judgment result and automatically adjusts the preset threshold; Step 4.5: The NPS result feedback and early warning module generates a corresponding application report based on the application listing information determined by the user, and sends the relevant information of the new substance to the NPS data storage module based on HBase, and modifies the corresponding column attributes in the Hbase database according to the relevant substance ID, changing its identifier to "1".
[0015] Furthermore, in step 4.4, the specific steps of automatically adjusting the threshold include: Step 4.4.1: Set the threshold; Step 4.4.2: Calculate the similarity between compound pairs using molecular fingerprints; Step 4.4.3: Use cross validation to test the accuracy and recall under different thresholds and select the optimal threshold; Step 4.4.4: During the comparison process of the NPS intelligent comparison module, the threshold is dynamically adjusted according to the judgment result fed back by the application terminal to ensure the comparison quality; Step 4.4.5: Verify whether the adjusted threshold can improve the comparison accuracy and obtain the verification result; Step 4.4.6: Finalize the adjusted threshold value based on the verification results.
[0016] Therefore, the present invention adopts the above-mentioned method and system for identifying and quickly comparing new psychoactive substances based on big data, which has the following beneficial effects: First, the present invention can significantly improve the speed and accuracy of identifying new psychoactive substances (NPS). Unlike traditional detection methods that rely on manual comparison, the system compares the test results with a large number of known substances through an automated process. It can greatly shorten the time from preliminary detection to final confirmation, avoid the risk of new drugs circulating in the market, and thus effectively protect public safety; Second, based on the multi-version feature of HBase, this system can provide accurate decision support based on historical data, chemical structure and similarity analysis. Whenever a new test result enters the system, the system will automatically analyze the molecular structure of the substance, compare it with the existing data, and generate a label. This data-driven approach not only reduces human error, but also can discover potential similarities that are difficult to detect manually, thereby helping testers to more accurately identify new drugs; Third, the present invention uses HBase as the basic architecture for data storage, which can effectively cope with the continuous increase in NPS types and support horizontal expansion. This means that as the number of NPS material types surges, the system can handle larger amounts of data by simply adding column families and columns without the need for large-scale reconstruction of the system; Fourth, when a new substance is identified and marked as a potential new psychoactive substance, the system will automatically generate early warning information to remind regulatory authorities to take appropriate measures. The early warning mechanism can effectively improve response speed and processing capabilities by linking with the information systems of other regulatory authorities to prevent new drugs from entering the market and causing harm.
[0017] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The figure is an architecture diagram of the system proposed by the present invention.
[0019] Figure 2 These are the reference EI mass spectrum and characteristic mass spectrum fragments of etomidate.
[0020] Figure 3 The reference EI mass spectrum and characteristic mass spectrum fragments of Metomidate.
[0021] Figure 4 The reference EI mass spectrum and characteristic mass spectrum fragments of Isopropoxate.
[0022] Figure 5 The MACCS molecular fingerprint was used for medetomide to compare the similarity with etomidate.
[0023] Figure 6 The MACCS molecular fingerprint was used for ipropagate to compare the similarity with etomidate.
[0024] Figure 7 This is a two-dimensional structure comparison diagram of medetomidine and etomidate.
[0025] Figure 8 This is a comparison diagram of the three-dimensional structures of medetomidine and etomidate.
[0026] Fig. 9 The similarity results and frequency distribution histograms of the 46 NPS in 2024 and controlled drugs in previous years (except Kratom). DETAILED DESCRIPTION
[0027] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the claims attached to the application.
[0028] The present invention proposes a method and system for identifying and quickly comparing new psychoactive substances based on big data. Based on advanced chemical informatics and data science technology, the data obtained by precision detection instruments are directly compared with a continuously updated NPS database, and the closest matching results are quickly screened out through the NPS intelligent comparison module, and similarity analysis and detailed chemical structure information are provided within a few seconds. This can not only significantly reduce the time of manual intervention, but also discover some potential similarities that are difficult to identify manually through the application of machine learning and big data analysis, and accelerate the identification and supervision process of suspected substances. At the same time, the automation characteristics of the system can greatly improve processing efficiency, cope with the challenge of the continued surge in NPS types in the future, and provide solid technical support for public safety supervision.
[0029] 1. New psychoactive substance identification and rapid comparison system based on big data: like Figure 1 As shown, the system includes an automatic data acquisition module, an NPS data storage module based on HBase, an NPS molecular structure analysis module, an NPS intelligent comparison module, an NPS result feedback and early warning module, and an application terminal; the automatic data acquisition module, the NPS data storage module based on HBase, the NPS molecular structure analysis module, the NPS intelligent comparison module, the NPS result feedback and early warning module are all deployed on a distributed server with a microservice architecture, and each service communicates through a local area network, and data interaction between modules is realized through an API interface; The distributed server uses any version of Nginx; the listed molecular fingerprint data is stored in the Mysql 5.7 library, the overall database uses HBase2.4.9, the file storage system uses Hadoop3.3.0, and the backend programming language selects JAVA and python. The system architecture uses Spring Boot 2 and Vue 2.0.
[0030] The following is an introduction to each module in the system: (1) Automatic data collection module: This module is used to collect test result data of experimental instruments and equipment and network control list data in real time; it includes: Instrument data acquisition unit, used to automatically collect newly generated mass spectrometry fragments and test result data of experimental instruments and equipment; A network data collection unit is used to automatically obtain updated NPS data in the control list published on the Internet through a network crawler, and the collected NPS data flows into the distributed server in a unidirectional manner through the border platform of the public security network to ensure the security and consistency of the data; the control list is specified by configuring the website address; Specifically, the experimental instrument is mainly a liquid chromatography-mass spectrometer or a gas chromatography-mass spectrometer. The detection data format of different instrument manufacturers is different, but the data contains information on ion characteristic fragments, retention time and peak area. Generally, the values of 4 characteristic ion fragments are extracted as representatives to form a data format as shown in Table 1: Table 1 Experimental instrument and equipment test data format: ; After processing the data in Table 1, the data format as shown in Table 2 is obtained.
[0031] Table 2 Format of processed experimental instrument and equipment test data: ; The data structure of Table 2 is stored in Hbase database, and three column families are defined, namely mz_info, area_info, and rt_info. These three column families are defined as basic column families, namely mass-to-charge ratio, peak area, and retention time. If other attributes are needed later, only new column families need to be added. This can fully adapt to the expansion needs of subsequent data changes and give full play to the flexible expansion characteristics of HBase.
[0032] When the experimental instrument equipment detection is completed, data files of the specified file format will be generated. These data files are stored in the corresponding storage directory, and the directory is synchronized to the distributed server. The instrument equipment data acquisition unit obtains new data in the directory in real time through the Server Message Block (SMB) protocol.
[0033] From the above, we can see that through this module, the system can not only obtain experimental data in real time, but also dynamically update the control list information, providing complete data support for subsequent comparison and analysis.
[0034] (2) NPS data storage module based on HBase: This module is used to receive data sent by the automatic data collection module, clean and convert it, convert the data into key-value pair format, and store it in the preset column family of HBase or the added column family.
[0035] During the storage process, the converted data is first parsed by the NPS molecular structure parsing module, and then it is determined whether the parsed data is in the listed directory. If so, the data is assigned a mark of "1", indicating "confirmed as a new psychoactive substance", and is transferred to the MySQL database; if not, the parsed data is sent to the NPS intelligent comparison module, and the user determines whether it is a new psychoactive substance based on the feedback results of the NPS intelligent comparison module and the NPS result feedback and early warning module. If so, the data is assigned a mark of "1", otherwise it is assigned a mark of "0", indicating "not confirmed as a new psychoactive substance", and is stored in the Hbase database; Since HBase's column family supports unlimited expansion, the system can flexibly adapt to different data formats without paying attention to the specific structure of the data. At the same time, it reserves expansion space for tag types that may be added in the future, ensuring that the system can achieve horizontal expansion by adding columns to meet ever-changing data needs.
[0036] In summary, the present invention is based on Hase data for storage, which is a data storage method based on the concept of big data. It can process structured and unstructured data at the same time, and can be horizontally expanded to cope with future data growth and adapt to ever-changing data needs.
[0037] (3) NPS molecular structure analysis module: This module is used to analyze the molecular formula of new psychoactive substances and obtain the molecular fingerprint of the new psychoactive substances; It includes the following units: The molecular structure conversion unit is used to convert the key-value pairs containing the molecular structure collected by the automatic data collection module into a SMILES (Simplified Molecular Input Linear Representation) structure, then extract the structural features of the molecule from the SMILES structure, and perform hashing on the structural features to generate a bit vector, which is used as the molecular fingerprint; The new key-value pair generation unit is used to generate a new key-value pair according to the SMILES structure, where the key is the molecular fingerprint and the value is a byte array of a unique two-dimensional matrix character describing the structural characteristics of the molecule. The new key-value pair is returned to the HBase-based NPS data storage module and stored in the Hbase database.
[0038] (4) NPS intelligent comparison module: This module is used to compare molecular fingerprints with the data stored in MySQL one by one, and send the comparison results to the NPS result feedback and early warning module; it includes the following units: The request data format determination unit is used to determine whether the format of the request data is a molecular fingerprint format after receiving the comparison request sent by the application terminal. If not, the request data is forwarded to the NPS molecular structure analysis module, and the NPS molecular structure analysis module converts the request data into a molecular fingerprint and then returns it to the NPS intelligent comparison module; The comparison unit compares the received molecular fingerprint value with the listed molecular fingerprint data stored in MySQL based on the Tanimoto coefficient, and finally outputs a value between 0 and 1, and sends the result to the NPS result feedback and early warning module; The working principle of the comparison unit is: each bit corresponds to a molecular fragment. Assuming that similar molecules must have many common fragments, molecules with similar fingerprints are likely to be similar in 2D structure. Therefore, the Tanimoto coefficient is used in the present invention to evaluate the bit string quantization comparison result, and finally a value between 0 and 1 is obtained.
[0039] (5) NPS result feedback and early warning module: This module is used to receive the comparison results sent by the NPS intelligent comparison module in real time, compare the comparison results with the preset threshold, generate warning information for the comparison results that exceed the threshold, and send the warning information to the application terminal. At the same time, it receives the judgment results of the application terminal on the warning, and can learn according to the judgment results and automatically adjust the threshold; The warning information at least includes relevant substance IDs, such as substances to be detected, existing substances, etc. After receiving the warning information, the application terminal searches the MySQL database through the relevant substance IDs in the warning information, and generates a three-dimensional molecular structure in a visual way for the staff to further analyze and judge.
[0040] (6) Application terminal: Application terminals include all-in-one touch computers, tablet computers, laptops, desktop computers, etc., and must have network connection functions. They are mainly used to provide users with a graphical interface to facilitate users to initiate comparison requests to the NPS intelligent comparison module and display processing results.
[0041] 2. Identification and rapid comparison method of new psychoactive substances based on big data: Based on the new psychoactive substance identification and rapid comparison system based on big data, the present invention realizes a new psychoactive substance identification and rapid comparison method based on big data, which includes the following implementation steps: Step 1: Build a distributed server; Step 1.1: Design the roles and number of nodes of the distributed storage file system according to the amount of data. The present invention sets two NameNode nodes, one of which is Active and the other is StandBy. According to the current amount of data, 5 DataNodes are designed; Step 1.2: Install Hbase, place the HMaster role and NameNode on the same node, and the HRegionServer role and DataNode on the same node; Step 1.3: Install Zookeeper to elect the master and slave of NameNode and HMaster, and store the metadata of HregionServer of HBase; Step 1.4: Install MySQL database; Step 1.5: Install the automatic data collection module, HBase-based NPS data storage module, NPS molecular structure analysis module, NPS intelligent comparison module, and NPS result feedback and warning module as microservices and configure the environment.
[0042] Step 2: Initialization; Step 2.1: The user sets the number of versions to be saved according to the actual application; Step 2.2: The user sets the Internet website address to be automatically obtained; Step 2.3: The user sets the IP address of the instrument to be automatically obtained and the storage directory corresponding to the experimental test data.
[0043] Step 2.4: The user sets the threshold in the NPS result feedback and warning module; Step 3: Automatically acquire NPS data and analyze NPS data through the automatic data acquisition module and the NPS molecular structure analysis module respectively; Step 3.1: The network data collection unit monitors the designated websites on the Internet in real time and compares the update date of the captured data with the last version date of the system. If an update is found, the latest data is crawled and uploaded to the HBase-based NPS data storage module for storage; when storing, if the column family of the current data already exists, the current data is updated and the original data is stored as the old version; if the current data column family does not exist, a new row is added and the data is marked according to the identifier of the automatic collection end; finally, the new version of the data containing the molecular formula is passed to the NPS molecular structure analysis module; Step 3.2: After receiving the data, the NPS molecular structure analysis module judges it. If it is a molecular formula, it converts it into a SMILES structure according to the molecular formula, and then abstracts the molecular features through the SMILES structure to obtain the molecular fingerprint, and then returns the molecular fingerprint to the NPS data storage module based on HBase; Step 4: Use the NPS intelligent comparison module to compare the similarity of molecular fingerprints; Step 4.1: The user logs in to the system through the application terminal. If the current molecular fingerprint is a new substance, a similarity comparison request is initiated; Step 4.2: The application terminal sends the comparison request to the NPS intelligent comparison module. After receiving the comparison request, the NPS intelligent comparison module determines the data format of the request. If the format is a non-molecular fingerprint format, the request is forwarded to the NPS molecular structure analysis module. The NPS molecular structure analysis module converts the molecular structure into a molecular fingerprint format and returns it to the NPS intelligent comparison module. After receiving the molecular fingerprint, the NPS intelligent comparison module connects to MySQL and compares the vector string molecular features one by one with the existing bit vectors in MySQL, and sends the comparison results to the NPS result feedback and early warning module. Step 4.3: After receiving the comparison result, the NPS result feedback and warning module compares the received comparison result with the preset threshold, generates warning information for the result greater than or equal to the threshold, and feeds back the warning information to the application terminal; Step 4.4: The user views the warning information through the application terminal, and at the same time initiates a three-dimensional molecular formula viewing request to the HBase-based data storage module according to the relevant substance ID in the warning information. The user again determines whether the substance needs to be listed based on the three-dimensional molecular formula viewing result, and feeds back the judgment result to the NPS result feedback and warning module, and learns based on the user's judgment result to automatically adjust the preset threshold; Step 4.5: The NPS result feedback and early warning module generates a corresponding application report based on the application listing information determined by the user, and sends the information of the substance to the HBase-based data storage module. The HBase-based data storage module changes the data identifier to "1" by modifying its corresponding column attributes, and stores various versions of the application report.
[0044] Specifically, the specific steps for automatically adjusting the threshold in step 4.4 are: Step 1: Based on experience or literature, set an initial threshold (for example, Tanimoto coefficient > 0.7 is considered similar compounds), which refers to the preset threshold; Step 2: Calculate the similarity between compound pairs using molecular fingerprints (such as MACCS, ECFP) or other descriptors (the present invention uses the Tanimoto coefficient); Step 3: Use cross-validation to test the accuracy and recall under different thresholds and select the optimal threshold; Step 4: During the comparison process of the NPS intelligent comparison module, the threshold is dynamically adjusted using the reward mechanism in the prior art according to the judgment result fed back by the application terminal to ensure the comparison quality; Step 5: Use standard data sets or manual annotation results to verify whether the adjusted threshold can improve the comparison accuracy; Step 6: Determine the optimal threshold based on the verification results of step 5.
[0045] The specific process of dynamically adjusting the threshold using the reward mechanism is as follows: First, all judgment results (approval or disapproval) of users within one day are collected from the application terminal and the confidence of the corresponding judgment results is recorded; Secondly, the judgment results are analyzed based on the confidence level, and the recognition rate and error rate of the judgment results are counted; Finally, determine whether there are too many false positives based on the approval rate. If so, increase the threshold; if not, reduce the threshold; determine whether there are too many missed positives based on the error rate. If so, reduce the threshold; if not, increase the threshold; The specific threshold adjustment formula is: New threshold = current threshold Δ; Where Δ represents the threshold increment
[0046] Example: The present invention proposes a method and system for identifying and quickly comparing new psychoactive substances based on big data. In this embodiment, the performance of the present invention is verified by quickly comparing the controlled narcotic drugs medetomide and iproparatate with etomidate.
[0047] The standard EI mass spectrum of the controlled narcotic drug etomidate and the characteristic fragments 244, 105, 79, and 77 correspond to specific chemical structure fragments (such as Figure 2 ) are preset in the system.
[0048] When judging an unknown new imidate substitute (such as medetomidine and isopamidate controlled on July 1, 2024), you first need to collect the EI mass spectrum of the sample. This system will automatically output the possible structural fragments ( Figure 3 , Figure 4 ) and prompts the closest substance structure, i.e. the preset spectrum of etomidate ( Figure 2). Researchers can quickly infer and troubleshoot the structure based on the system-assisted output results combined with the original EI mass spectrum of the sample. Although the EI mass spectra of both medetomide and ipropagate can both reveal structural fragments such as 198, 105, 77, and 79, the molecular ion peaks at the high-mass end are quite different: medetomide is 230, etomidate is 244, and ipropagate is 258, with a fixed difference between the two. , that is (CH2)n, where n is a positive integer. The system will prompt that it may be a homologue. Researchers can easily infer the preliminary structure of the suspicious substance based on the prompted homologue information. At this time, other analytical methods need to be combined to further verify and confirm the results.
[0049] After confirming the structure of the suspicious substance, the system can convert the chemical structure into a SMILES structural expression that the computer can quickly identify and compare similarities through the NPS molecular structure analysis module. The system then uses this system to compare the similarity of the suspicious substances (SMILES structures of medetomidine and ipropafenac) with the previously controlled drug library in SMILES format, and quantitatively evaluates the similarity of new abuse substances from the perspective of chemical structure through different molecular fingerprints, thereby assessing the risk of abuse.
[0050] Taking the most commonly used MACCS molecular fingerprint as an example, the similarities between medetomidine and ipropamate and etomidate are 86.11% and 81.58%, respectively ( Figure 5 , Figure 6 ), the system can simultaneously output two-dimensional and three-dimensional structure comparison diagrams ( Figure 7 , Figure 8 ) Assist researchers to further confirm. The NPS result feedback and early warning module compares the current similarity recognition result with the preset threshold. In this example, the threshold is determined based on the lowest value of the similarity comparison between the 46 newly listed NPS on July 1, 2024 and the controlled drug catalogs of previous years, which is 72% ( Fig. 9 ), medetomidine and ipropagate have a high similarity with etomidate, which is higher than the preset threshold, indicating that there is a risk of substitution abuse and requires further attention. The NPS result feedback and early warning module will feed back the identification results to the application terminal. The researchers will determine again whether the substance should be applied for listing through the prompt information on the application terminal, and return the judgment result to the NPS result feedback and early warning module. In this module, the original preset threshold is adjusted (increased or decreased) based on the reward mechanism to achieve dynamic adjustment of the threshold.
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A new psychoactive substance identification and rapid comparison system based on big data, characterized in that: It includes automatic data collection module, HBase-based NPS data storage module, NPS molecular structure analysis module, NPS intelligent comparison module, NPS result feedback and early warning module and application terminal; The automatic data collection module, HBase-based NPS data storage module, NPS molecular structure analysis module, NPS intelligent comparison module, NPS result feedback and early warning module are all deployed on a distributed server using a microservice architecture, and data interaction is achieved between the modules through an API interface; in: Automatic data collection module, used to collect the result data detected by laboratory instruments and equipment and the updated data in the designated network control list in real time; The HBase-based NPS data storage module is used to receive data sent by the automatic data collection module, clean the data and convert it into a key-value pair format containing a molecular structure, and store it in the Hbase database; The NPS molecular structure analysis module is used to convert and analyze the data in the key-value pair format containing the molecular structure, obtain the molecular fingerprint of the new psychoactive substance, and return it to the NPS data storage module based on HBase; NPS intelligent comparison module, which is used to compare the molecular fingerprint of the substance to be tested with the listed molecular fingerprint data stored in the MySQL database, and send the comparison results to the NPS result feedback and early warning module; The NPS result feedback and warning module is used to generate warning information for comparison results that exceed the threshold through threshold comparison, and send it to the application terminal for user judgment. At the same time, it receives the judgment result of the application terminal on the warning information and dynamically adjusts the threshold according to the judgment result; The application terminal is used to provide users with a graphical interface to facilitate users to initiate comparison requests to the NPS intelligent comparison module and to display and feedback the user's judgment results.
2. The new psychoactive substance identification and rapid comparison system based on big data as claimed in claim 1, characterized in that: The automatic data collection module comprises: Instrument and equipment data acquisition unit, used to automatically collect the test result data newly generated by laboratory instruments and equipment; The network data collection unit is used to automatically obtain the updated NPS data in the control list published on the Internet through a network crawler. The collected NPS data flows unidirectionally into the distributed server through the border platform.
3. The new psychoactive substance identification and rapid comparison system based on big data as claimed in claim 1, characterized in that: During the storage process, the HBase-based NPS data storage module first parses the data in the key-value pair format containing the molecular structure through the NPS molecular structure parsing module, and determines whether the parsed data is in the listed directory; If yes, the parsed data is assigned a flag "1" to indicate "confirmed as a new psychoactive substance" and is transferred to the MySQL database; If not, the parsed data will be sent to the NPS intelligent comparison module, and the feedback results of the NPS intelligent comparison module and the NPS result feedback and early warning module will be used to determine whether the parsed data should be subject to listing application; if so, the parsed data will be assigned a mark of "1" and transferred to the MySQL database; if not, it will be assigned a mark of "0", indicating "not confirmed as a new psychoactive substance", and stored in the Hbase database.
4. The new psychoactive substance identification and rapid comparison system based on big data as claimed in claim 3, characterized in that: The NPS molecular structure analysis module includes: A molecular structure conversion unit is used to convert the key-value pair data containing the molecular structure into a SMILES structure, then extract the structural features of the molecule from the SMILES structure, and perform hash processing on the structural features to generate a bit vector, and use the bit vector as the molecular fingerprint; A new key-value pair generation unit is used to generate a new key-value pair according to the SMILES structure, and return the new key-value pair to the HBase-based NPS data storage module and store it in the HBase database; The key is the molecular fingerprint, and the value is a byte array of unique two-dimensional matrix characters that describe the structural characteristics of the molecule.
5. The new psychoactive substance identification and rapid comparison system based on big data as claimed in claim 4, characterized in that: The NPS intelligent comparison module includes: A request data format determination unit, used for receiving a comparison request sent by an application terminal, and determining whether the data format in the comparison request is a molecular fingerprint format; If yes, it is sent to the comparison unit; if no, the comparison request is forwarded to the NPS molecular structure analysis module, which converts the data in the comparison request into a molecular fingerprint and returns it to the NPS intelligent comparison module; The comparison unit, based on the Tanimoto coefficient, compares the received molecular fingerprint with the data stored in the MySQL database one by one, outputs a value between 0 and 1, and sends the value as the comparison result to the NPS result feedback and early warning module.
6. The new psychoactive substance identification and rapid comparison system based on big data as claimed in claim 5, characterized in that: The NPS result feedback and early warning module includes: A comparison result receiving unit receives the comparison result sent by the NPS intelligent comparison module; A threshold comparison unit compares the value of the comparison result with a preset threshold, generates warning information for comparison results that are greater than or equal to the threshold, and sends the warning information to the application terminal; The threshold self-adjusting unit receives the judgment result of the application terminal on the warning information, and learns according to the judgment result to automatically adjust the preset threshold.
7. A method for identifying and quickly comparing new psychoactive substances based on big data, characterized in that: The system according to any one of claims 1 to 6 is implemented, comprising the following implementation steps: Step 1: Build a distributed server; Step 2: The user configures the basic parameters of each microservice; Step 3: Automatically obtain the test result data of laboratory instruments and equipment and the updated data in the designated network control list through the data automatic acquisition module, and then parse these data into molecular fingerprint format through the NPS molecular structure analysis module, and store the data through the HBase-based data storage module; Step 4: The user initiates a comparison request through the application terminal. The NPS intelligent comparison module receives the comparison request, performs a similarity comparison on the molecular fingerprints in the comparison request data, and sends the comparison result to the NPS result feedback and warning module; The NPS result feedback and warning module compares the comparison results with the preset threshold, and generates warning information for the comparison results that are greater than or equal to the threshold, and sends it to the application terminal; After receiving the warning information, the user makes a judgment on the application terminal and returns the judgment result to the NPS result feedback and warning module to readjust the threshold.
8. The method for identifying and quickly comparing new psychoactive substances based on big data as claimed in claim 7, characterized in that: The specific steps of step 3 include: Step 3.1: The network data collection unit monitors the designated network control list on the Internet in real time. If any data update is found, the latest data is crawled and uploaded to the NPS data storage module based on HBase; When the HBase-based NPS data storage module stores data, if the column family of the current data already exists, the current data is updated and the original data is stored as the old version; if the column family of the current data does not exist, a new row is added and the data is marked; then the new data containing the molecular structure is passed to the NPS molecular structure analysis module; Step 3.2: After receiving the data containing the molecular structure, the NPS molecular structure analysis module converts it into a SMILES structure, extracts the structural features of the molecule through the SMILES structure, performs hash processing on the structural features of the molecule to obtain the molecular fingerprint, and then returns the molecular fingerprint to the NPS data storage module based on HBase.
9. The method for identifying and quickly comparing new psychoactive substances based on big data as claimed in claim 7, characterized in that: The specific steps of step 4 include: Step 4.1: The user logs in to the system through the application terminal. If the current molecular fingerprint is a new substance, a comparison request is initiated; Step 4.2: The application terminal sends the comparison request to the NPS intelligent comparison module. After receiving the comparison request, the NPS intelligent comparison module determines the data format of the comparison request. If the format is a non-molecular fingerprint format, the comparison request is forwarded to the NPS molecular structure analysis module. The NPS molecular structure analysis module converts the comparison request into a molecular fingerprint format and returns it to the NPS intelligent comparison module. After receiving the molecular fingerprint, the NPS intelligent comparison module compares the structural features of the vector string molecules one by one with the bit vectors already existing in the MySQL database, and sends the comparison results to the NPS result feedback and warning module; Step 4.3: The NPS result feedback and warning module compares the received comparison result with the preset threshold, generates warning information for the result greater than or equal to the threshold, and sends the warning information to the application terminal; Step 4.4: The user views the warning information through the application terminal, and at the same time initiates a three-dimensional molecular formula viewing request to the HBase-based NPS data storage module according to the relevant substance ID in the warning information. The user again determines whether the new substance needs to be listed based on the three-dimensional molecular formula viewing result, and feeds back the judgment result to the NPS result feedback and warning module. The NPS result feedback and warning module learns according to the user's judgment result and automatically adjusts the preset threshold; Step 4.5: The NPS result feedback and early warning module generates a corresponding application report based on the application listing information determined by the user, and sends the relevant information of the new substance to the NPS data storage module based on HBase, and modifies the corresponding column attributes in the Hbase database according to the relevant substance ID, changing its identifier to "1".
10. The method for identifying and quickly comparing new psychoactive substances based on big data as claimed in claim 9, characterized in that: In step 4.4, the specific steps of automatically adjusting the threshold include: Step 4.4.1: Set the threshold; Step 4.4.2: Calculate the similarity between compound pairs using molecular fingerprints; Step 4.4.3: Use cross-validation to test the accuracy and recall under different thresholds and select the optimal threshold; Step 4.4.4: During the comparison process of the NPS intelligent comparison module, the threshold is dynamically adjusted according to the judgment result fed back by the application terminal to ensure the comparison quality; Step 4.4.5: Verify whether the adjusted threshold can improve the comparison accuracy and obtain the verification result; Step 4.4.6: Finalize the adjusted threshold value based on the verification results.
Citation Information
Patent Citations
Portable drug field identification equipment and method
CN108072692A
Law enforcement site drug rapid detection system and drug detector thereof
CN114544581A
Method for amplificating LIBS signal using electric field for concrete chloride analysis and device using the same
KR1020230049960A
Raman spectroscopy detection method for checking goods, and electronic device
WO2018121122A1