Method and device for processing compound data element access interface

By constructing compound storage relationship mapping tables and field data format rulesets, the data element access interface of compound databases is improved, and the problems of creating incomplete data elements, SMILES sequence standardization and data format review are solved, and more efficient data element creation and query are achieved, and data error rate is reduced.

CN119646072AActive Publication Date: 2025-03-18BEIJING DP TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411650108.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-18
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

The data element access interface of the existing compound database has defects in creating compound data elements, including the inability to process incomplete data element information, insufficient standardization of SMILES sequences, missing data format review, etc., resulting in waste of data storage resources and reduced accuracy of data query.

Method used

By constructing a compound storage relationship mapping table and a field data format rule set, we can improve the functions of creating compound data elements, attribute calculation, review and deletion. Specifically, it includes supporting the processing of incomplete data element information and SMILES sequence standardization in the data element creation interface, adding data element attribute calculation and review interfaces, and providing mapping table export and batch deletion interfaces.

Benefits of technology

It improves the efficiency of creating compound data elements, reduces waste of data storage resources, improves the accuracy of data queries, and reduces the data error rate of the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646072A_ABST
    Figure CN119646072A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a method and a device for processing a compound data element access interface. The method comprises the following steps: firstly, constructing a compound storage relation mapping table based on a compound database design scheme; customizing a field data format rule for each data element field of the mapping table to form a corresponding data rule set; the data rule set is updated in time when the field data format requirement of any type of data element fields is changed; extracting a corresponding access interface type and interface parameters from an access application input by a user; when the access interface type is mapping table export / data element creation / data element attribute calculation / data element review / mapping table review / data element batch interface deletion; and performing corresponding mapping table export / data element creation / data element attribute calculation / data element review / mapping table review / data element batch deletion processing based on the interface parameters and the mapping table and / or the data rule set. The creation efficiency can be improved, and waste of storage resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for processing a compound data element access interface. Background Art

[0002] In many scientific and technological fields (such as semiconductors, new energy, nanotechnology, etc.), it is necessary to build a compound database for scientific and technological workers to improve research and development efficiency; the compounds mentioned here include compounds such as solvents, solutions, electrolytes of battery electrolytes, positive / negative electrode material compounds of batteries, crystal material compounds, etc. This type of compound database is usually based on a single compound as the basic data unit (referred to as compound data element), and stores all the properties of the corresponding compound based on each compound data element. The compound properties mentioned here should at least include the simplified molecular input line entry system (SMILES) sequence of the compound, the molecular chemical formula of the compound, all physical / chemical properties of the compound (such as melting point, boiling point, mass, number of atoms, effective charge, volume, density, oxidation-reduction energy, etc.), the molecular fingerprint of the compound (such as the compound molecular fingerprint calculated based on the torsionbv algorithm, the compound molecular fingerprint calculated based on the mfp2 algorithm, and the compound molecular fingerprint calculated based on the ffp2 algorithm) and other attribute information.

[0003] Currently, all compound databases provide some common data element access interfaces: such as data element creation interface and data element query interface. However, in actual applications, we found that these conventional access interfaces still have some shortcomings: 1) The conventional data element creation interface can only receive compound data element information without missing items, that is, when a user creates a compound data element, he needs to prepare all the corresponding attributes in advance to complete the data element creation, which will undoubtedly increase the creator's attribute calculation workload and reduce the efficiency of data element creation; 2) The conventional data element creation interface does not standardize the SMILES sequence when creating a compound data element. We know that the SMILES sequence of the same compound may produce different sequence expressions based on different processing methods. If the current input SMILES sequence is not standardized when creating a data element, it is possible that the database creates two data elements for the same compound, which will not only waste data storage resources, but also reduce the accuracy of data query; 3) Although the conventional data element creation interface will perform compliance checks on the data formats of all field data of the current data element based on a set of preset data element field data format requirements when creating a data element, the conventional compound database does not provide a data element access interface for data format review of the stored compound data element after the data format requirements of any type of field data change, which will also increase the data error rate of the database. Summary of the invention

[0004] The purpose of the present invention is to provide a processing method, device, electronic device and computer-readable storage medium for a compound data element access interface in response to the defects of the prior art. The present invention pre-constructs a compound storage relationship mapping table based on the database design scheme of any compound database, which is recorded as the first mapping table; and customizes a corresponding field data format rule for each type of data element field in the first mapping table; and all the obtained field data format rules form a first data rule set; and when the field data format requirements of any type of data element field change, the corresponding field data format rules in the first data rule set are updated in real time; and after receiving the first access application input by the receiving user, the corresponding first access interface type (mapping table export interface, data element creation interface, data element attribute calculation interface, data element review interface, mapping table review interface and data element batch deletion interface) and first interface parameters are extracted therefrom; and when the first access interface type is a mapping table export interface, based on Perform mapping table export processing according to the first interface parameters and the first mapping table; when the first access interface type is a data element creation interface, perform data element addition or update processing according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a data element attribute calculation interface, perform data element attribute calculation processing according to the first interface parameters and the first mapping table; when the first access interface type is a data element review interface, perform data element review processing according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a mapping table review interface, perform mapping table review processing according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a data element batch deletion interface, perform data element batch deletion processing according to the first interface parameters and the first mapping table. On the one hand, the present invention has functionally transformed the data element creation interface, so that it can complete the compound data element creation based on incomplete compound data element information and can standardize the SMILES sequence when creating the compound data element; on the other hand, it has also added a data element attribute calculation interface to automatically complete the compound data element that is missing when creating, and automatically update the compound data element with aged field data; on the other hand, it has also added a data element review interface and a mapping table review interface to review the data format of a single or multiple or even all compound data elements; in addition, it has also added a mapping table export interface to obtain the complete information of a single or multiple or even all compound data elements, and added a data element batch deletion interface to centrally delete the single or multiple compound data elements that have been reviewed for errors. Combining the present invention with a conventional data element access interface can not only reduce the attribute calculation workload of the creator and improve the creation efficiency of the data element, but also reduce the waste of data storage resources, improve the accuracy of data query, and reduce the data error rate of the database.

[0005] To achieve the above object, a first aspect of an embodiment of the present invention provides a method for processing a compound data element access interface, the method comprising:

[0006] A compound storage relationship mapping table is constructed in advance based on the database design scheme of the compound database, which is recorded as the corresponding first mapping table; and a corresponding field data format rule is customized for each type of data element field of the first mapping table; and all the obtained field data format rules form a corresponding first data rule set; and when the field data format requirements of any type of data element field change, the corresponding field data format rule in the first data rule set is updated in real time; each row of the first mapping table corresponds to a compound data element, and each column corresponds to a type of data element field, and each mapping table unit of the first mapping table corresponds to a set of database read / write interfaces in the compound database corresponding to the field data of a data element field of a compound data element; the data element field includes at least a SMILES sequence field, a molecular formula field, a type I molecular fingerprint field, a type II molecular fingerprint field, a type III molecular fingerprint field, multiple types of physical property fields, and multiple types of chemical property fields;

[0007] Receive a first access application input by a user; extract a corresponding first access interface type and a first interface parameter from the first access application; the first access application includes the first access interface type and the first interface parameter; the first access interface type includes at least a mapping table export interface, a data element creation interface, a data element attribute calculation interface, a data element review interface, a mapping table review interface and a data element batch deletion interface;

[0008] If the first access interface type is a mapping table export interface, performing corresponding mapping table export processing according to the first interface parameter and the first mapping table;

[0009] If the first access interface type is a data element creation interface, performing corresponding data element addition or update processing according to the first interface parameter, the first mapping table and the first data rule set;

[0010] If the first access interface type is a data element attribute calculation interface, performing corresponding data element attribute calculation processing according to the first interface parameter and the first mapping table;

[0011] If the first access interface type is a data element review interface, performing corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set;

[0012] If the first access interface type is a mapping table review interface, performing corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set;

[0013] If the first access interface type is a data element batch deletion interface, corresponding data element batch deletion processing is performed according to the first interface parameters and the first mapping table.

[0014] Preferably, when the first access interface type is a mapping table export interface, the first interface parameter includes a first export mode and a first row identification sequence; the first export mode includes a full table export mode and a partial export mode; when the first export mode is a full table export mode, the first row identification sequence is empty; when the first export mode is a partial export mode, the first row identification sequence consists of one or more first row identifications;

[0015] When the first access interface type is a data element creation interface, the first interface parameters include multiple first field items; among all the first field items, only the first field data of the first field item whose first field name is SMILES sequence cannot be empty; the first field item includes the first field name and the first field data; the first field name includes SMILES sequence, molecular chemical formula, first class molecular fingerprint, second class molecular fingerprint, third class molecular fingerprint, multiple classes of physical property names and multiple classes of chemical property names; the first class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the torsionbv algorithm; the second class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the mfp2 algorithm; the third class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the ffp2 algorithm;

[0016] When the first access interface type is a data element attribute calculation interface, the first interface parameters include a first SMILES sequence and a second field name sequence; the second field name sequence is composed of one or more second field names; the second field names include molecular chemical formulas, first-class molecular fingerprints, second-class molecular fingerprints, third-class molecular fingerprints, multiple types of physical property names, and multiple types of chemical property names;

[0017] When the first access interface type is a data element review interface, the first interface parameter includes a second SMILES sequence;

[0018] When the first access interface type is a mapping table review interface, the first interface parameter includes a first review mode and a second row identification sequence; the first review mode includes a full table review mode and a partial review mode; when the first review mode is a full table review mode, the second row identification sequence is empty; when the first review mode is a partial review mode, the second row identification sequence consists of one or more second row identifications;

[0019] When the first access interface type is a data element batch deletion interface, the first interface parameter includes a third row identifier sequence; the third row identifier sequence is composed of one or more third row identifiers.

[0020] Preferably, the performing corresponding mapping table export processing according to the first interface parameter and the first mapping table specifically includes:

[0021] Step 31, extracting the corresponding first export mode and the first row identification sequence from the first interface parameters;

[0022] Step 32, identifying the first export mode; if the first export mode is a full-table export mode, all rows of the first mapping table form a corresponding first target row set; if the first export mode is a partial export mode, all rows corresponding to the first row identifiers of the first row identifier sequence in the first mapping table form a corresponding first target row set;

[0023] Step 33, perform a round of traversal on all rows of the first target row set; and in this round of traversal, use the current traversal row as the corresponding current mapping row; and use each of the mapping table units of the current mapping row as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database read interface corresponding to the current mapping table unit as the corresponding current field data, and form a corresponding derived field item by the data element field corresponding to the current mapping table unit and the current field data; and form a corresponding derived compound data element by all the derived field items corresponding to the current mapping row; and at the end of this round of traversal, form a corresponding first processing result by all the derived compound data elements obtained;

[0024] Step 34: Feedback the first processing result obtained to the current user.

[0025] Preferably, performing corresponding data element adding or updating processing according to the first interface parameter, the first mapping table and the first data rule set specifically includes:

[0026] Step 41, identifying whether the first field data of the first field item whose first field name in the first interface parameter is a SMILES sequence is empty; if so, setting the corresponding second processing result to failure, and going to step 47; if not, going to step 42;

[0027] Step 42, record the first field items in the first interface parameter whose first field data is not empty as the corresponding current field items; and perform field data compliance check on the first field data of the current field item based on the field data format rule corresponding to the current field item in the first data rule set to obtain a corresponding first check result; and identify whether all the first check results obtained are compliant; if so, go to step 43; if not, set the corresponding second processing result to failure, and go to step 47;

[0028] Wherein, the first inspection result includes compliance and non-compliance;

[0029] Step 43, taking the first field data of the first field item whose first field name is SMILES sequence in the first interface parameter as the corresponding current SMILES sequence; inputting the current SMILES sequence into the preset SMILES sequence standardization processing interface for processing to obtain the corresponding current standard sequence; recording the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and taking each of the mapping table units of the current mapping column as the corresponding current mapping table unit, and reading the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding first inventory SMILES sequence, and forming a corresponding first inventory sequence set from all the obtained first inventory SMILES sequences; and recording the first inventory SMILES sequence in the first inventory sequence set that matches the current standard sequence as the corresponding first matching inventory sequence; and identifying whether the first matching inventory sequence is empty; if so, going to step 44; if not, going to step 45;

[0030] Wherein, the SMILES sequence standardization processing interface at least includes a standardized SMILES sequence processing interface provided by the RDKit tool;

[0031] Step 44, based on the database design scheme of the compound database, perform the corresponding compound data element addition processing in the compound database according to the first interface parameters; and when the addition processing is successful, obtain the database read / write interface corresponding to all the data element fields of the compound data element added this time; and add a new row to the first mapping table as the corresponding current added row; and create a correspondence between each mapping table unit of the current added row and a set of database read / write interfaces of the corresponding data element fields; and after the corresponding relationship is successfully created, set the corresponding second processing result to success, and go to step 47;

[0032] Step 45, extracting all the first field items in the first interface parameter whose first field names are not SMILES sequences and whose first field data are not empty to form a corresponding first field item set; and identifying whether the first field item set is empty; if so, setting the corresponding second processing result to failure, and going to step 47; if not, going to step 46;

[0033] Step 46, taking the corresponding row of the first matching inventory sequence in the first mapping table as the corresponding current mapping row; taking each of the first field items of the first field item set as the corresponding current field item, taking the mapping table unit corresponding to the data element field in the current mapping row and the first field name of the current field item as the corresponding current mapping table unit, and updating the database data corresponding to the current mapping table unit in the compound database to the first field data of the current field item through the database write interface corresponding to the current mapping table unit; and after the database data corresponding to all the first field items of the first field item set are successfully updated, setting the corresponding second processing result to success;

[0034] Step 47: Feedback the obtained second processing result to the current user.

[0035] Preferably, the performing corresponding data element attribute calculation processing according to the first interface parameter and the first mapping table specifically includes:

[0036] Step 51, extracting the corresponding first SMILES sequence and the second field name sequence from the first interface parameters;

[0037] Step 52, input the first SMILES sequence into a preset SMILES sequence standardization processing interface for processing to obtain a corresponding current standard sequence; and record the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and use each of the mapping table units of the current mapping column as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding second inventory SMILES sequence, and form a corresponding second inventory sequence set from all the obtained second inventory SMILES sequences; and record the second inventory SMILES sequence in the second inventory sequence set that matches the current standard sequence as the corresponding second matching inventory sequence; and identify whether the second matching inventory sequence is empty; if so, set the corresponding third processing result to failure, and go to step 54; if not, use the corresponding row of the second matching inventory sequence in the first mapping table as the corresponding current mapping row, and go to step 53;

[0038] Step 53, taking each of the second field names of the second field name sequence as the corresponding current field name; taking the processing interface corresponding to the current field name provided by the preset attribute calculation tool as the corresponding current processing interface; inputting the first SMILES sequence into the current processing interface for processing and taking the processed data returned by the interface as the corresponding current field data; taking the mapping table unit corresponding to the data element field in the current mapping row and the current field name as the corresponding current mapping table unit; and updating the database data corresponding to the current mapping table unit in the compound database as the corresponding current field data through the database write interface corresponding to the current mapping table unit; and after the database data corresponding to all the second field names of the second field name sequence are successfully updated, setting the corresponding third processing result as success;

[0039] Wherein, the attribute calculation tool at least includes RDKit tool;

[0040] Step 54: Feedback the third processing result to the current user.

[0041] Preferably, the performing corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set specifically includes:

[0042] Step 61, extracting the corresponding second SMILES sequence from the first interface parameters;

[0043] Step 62, input the second SMILES sequence into a preset SMILES sequence standardization processing interface for processing to obtain a corresponding current standard sequence; and record the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and use each of the mapping table units of the current mapping column as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding third inventory SMILES sequence, and form a corresponding third inventory sequence set from all the obtained third inventory SMILES sequences; and record the third inventory SMILES sequence in the third inventory sequence set that matches the current standard sequence as the corresponding third matching inventory sequence; and identify whether the third matching inventory sequence is empty; if so, set the corresponding fourth processing result to failure, and go to step 65; if not, use the corresponding row of the third matching inventory sequence in the first mapping table as the corresponding current mapping row, and go to step 63;

[0044] Step 63, taking each of the mapping table units of the current mapping row as the corresponding current mapping table unit; and reading the database data corresponding to the current mapping table unit in the compound database as the corresponding current field data through the database read interface corresponding to the current mapping table unit; and taking the field data format rule corresponding to the data element field corresponding to the current mapping table unit in the first data rule set as the corresponding current field data format rule; and performing a field data compliance check on the current field data based on the current field data format rule to obtain a corresponding second check result;

[0045] Wherein, the second inspection result includes compliance and non-compliance;

[0046] Step 64, identifying whether all the obtained second inspection results are compliant; if so, setting the corresponding fourth processing result as no exception; if not, using the row identifier corresponding to the current mapping row in the first mapping table as the corresponding first error row identifier, and using the column identifier corresponding to each of the data element fields corresponding to the second inspection results that are specifically non-compliant in the first mapping table as the corresponding first error column identifier, and forming a corresponding first error column identifier sequence from all the obtained first error column identifiers, and forming a corresponding fourth processing result from the first error row identifier and the first error column identifier sequence;

[0047] Step 65: Feedback the fourth processing result obtained to the current user.

[0048] Preferably, the performing corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set specifically includes:

[0049] Step 71, extracting the corresponding first review mode and the second row identification sequence from the first interface parameters;

[0050] Step 72, identifying the first review mode; if the first review mode is a full-table review mode, all rows of the first mapping table form a corresponding second target row set; if the first review mode is a partial review mode, all rows corresponding to the second row identifiers of the second row identifier sequence in the first mapping table form a corresponding second target row set;

[0051] Step 73, perform a round of traversal on all rows of the second target row set; and in this round of traversal, take the currently traversed row as the corresponding current mapping row; and take each of the mapping table units of the currently mapped row as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database read interface corresponding to the current mapping table unit as the corresponding current field data, and take the field data format rule corresponding to the data element field corresponding to the current mapping table unit in the first data rule set as the corresponding current field data format rule, and perform a field data compliance check on the current field data based on the current field data format rule to obtain a corresponding third check result; and as the corresponding current row identifier; and identify whether all the third check results corresponding to the current mapping row are compliant; if so, set the corresponding current row review result to no exception, and form a corresponding first row review result with the current row identifier and the current row review result; if not, use the column identifier corresponding to the data element field corresponding to each of the third check results that are specifically non-compliant corresponding to the current mapping row in the first mapping table as the corresponding second error column identifier, and form a corresponding second error column identifier sequence with all the second error column identifiers obtained, and form a corresponding first row review result with the current row identifier and the second error column identifier sequence; and at the end of this round of traversal, form a corresponding fifth processing result with all the first row review results obtained;

[0052] Step 74: Feedback the fifth processing result to the current user.

[0053] Preferably, the performing corresponding batch deletion processing of data elements according to the first interface parameter and the first mapping table specifically includes:

[0054] Step 81, extracting the corresponding third row identification sequence from the first interface parameter;

[0055] Step 82, forming a corresponding third target row set from the rows corresponding to all the third row identifiers of the third row identifier sequence in the first mapping table;

[0056] Step 83, perform a round of traversal on all rows of the third target row set; and in this round of traversal, take the current traversal row as the corresponding current mapping row; and take the mapping table unit corresponding to the SMILES sequence field in the current mapping row as the corresponding current SMILES sequence unit, and read the database data corresponding to the current SMILES sequence unit in the compound database through the database read interface corresponding to the current SMILES sequence unit as the corresponding current SMILES sequence; and perform corresponding compound data element deletion processing in the compound database according to the current SMILES sequence based on the database design scheme of the compound database; and when the deletion processing is successful, the database read / write interface corresponding to the mapping table unit of the current mapping row is invalidated, and the current mapping row is recorded as the corresponding row to be deleted; and at the end of this round of traversal, batch deletion processing is performed on all the rows to be deleted in the first mapping table; and after the batch deletion is successful, the corresponding sixth processing result is set to success;

[0057] Step 84: Feedback the obtained sixth processing result to the current user.

[0058] A second aspect of an embodiment of the present invention provides a device for implementing the processing method of the compound data element access interface described in the first aspect, the device comprising: a preprocessing module, an access application receiving module, a mapping table exporting module, a data element creating module, a data element attribute calculating module, a data element reviewing module, a mapping table reviewing module and a data element batch deleting module;

[0059] The preprocessing module is used to construct a compound storage relationship mapping table based on the database design scheme of the compound database in advance, which is recorded as the corresponding first mapping table; and customize a corresponding field data format rule for each type of data element field of the first mapping table; and form a corresponding first data rule set by all the obtained field data format rules; and update the corresponding field data format rule in the first data rule set in real time when the field data format requirement of any type of data element field changes; each row of the first mapping table corresponds to a compound data element, and each column corresponds to a type of data element field, and each mapping table unit of the first mapping table corresponds to a set of database read / write interfaces in the compound database corresponding to the field data of a data element field of a compound data element; the data element field includes at least SMILES sequence field, molecular chemical formula field, type I molecular fingerprint field, type II molecular fingerprint field, type III molecular fingerprint field, multiple types of physical property fields and multiple types of chemical property fields;

[0060] The access application receiving module is used to receive a first access application input by a user; and extract the corresponding first access interface type and first interface parameter from the first access application; the first access application includes the first access interface type and the first interface parameter; the first access interface type includes at least a mapping table export interface, a data element creation interface, a data element attribute calculation interface, a data element review interface, a mapping table review interface and a data element batch deletion interface;

[0061] The mapping table export module is used for performing corresponding mapping table export processing according to the first interface parameter and the first mapping table when the first access interface type is a mapping table export interface;

[0062] The data element creation module is used for performing corresponding data element addition or update processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a data element creation interface;

[0063] The data element attribute calculation module is used for performing corresponding data element attribute calculation processing according to the first interface parameter and the first mapping table when the first access interface type is a data element attribute calculation interface;

[0064] The data element review module is used for performing corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a data element review interface;

[0065] The mapping table review module is used for performing corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a mapping table review interface;

[0066] The data element batch deletion module is used to perform corresponding data element batch deletion processing according to the first interface parameters and the first mapping table when the first access interface type is a data element batch deletion interface.

[0067] A third aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;

[0068] The processor is used to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps described in the first aspect above;

[0069] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

[0070] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed by a computer, the computer executes the instructions of the method described in the first aspect above.

[0071] The embodiment of the present invention provides a processing method, device, electronic device and computer-readable storage medium for a compound data element access interface. As can be seen from the above content, the embodiment of the present invention pre-builds a compound storage relationship mapping table based on the database design scheme of any compound database, which is recorded as the first mapping table; and customizes a corresponding field data format rule for each type of data element field in the first mapping table; and all the obtained field data format rules form a first data rule set; and when the field data format requirements of any type of data element field change, the corresponding field data format rules in the first data rule set are updated in real time; and after receiving the first access application input by the receiving user, the corresponding first access interface type (mapping table export interface, data element creation interface, data element attribute calculation interface, data element review interface, mapping table review interface and data element batch deletion interface) and the first interface parameter are extracted from it; and when the first access interface type is a mapping table When exporting the interface, a mapping table export process is performed according to the first interface parameters and the first mapping table; when the first access interface type is a data element creation interface, a data element addition or update process is performed according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a data element attribute calculation interface, a data element attribute calculation process is performed according to the first interface parameters and the first mapping table; when the first access interface type is a data element review interface, a data element review process is performed according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a mapping table review interface, a mapping table review process is performed according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a data element batch deletion interface, a data element batch deletion process is performed according to the first interface parameters and the first mapping table. On the one hand, the embodiment of the present invention has functionally modified the data element creation interface, so that it can complete the compound data element creation based on incomplete compound data element information and can standardize the SMILES sequence when creating the compound data element; on the other hand, it has also added a data element attribute calculation interface to automatically complete the compound data element that is missing when creating, and automatically update the compound data element with aged field data; on the other hand, it has also added a data element review interface and a mapping table review interface to review the data format of a single or multiple or even all compound data elements; in addition, it has also added a mapping table export interface to obtain the complete information of a single or multiple or even all compound data elements, and added a data element batch deletion interface to centrally delete the single or multiple compound data elements that have been reviewed for errors. Combining the embodiment of the present invention with the conventional data element access interface not only reduces the attribute calculation workload of the creator and improves the creation efficiency of the data element, but also reduces the waste of data storage resources, reduces the data error rate of the database, and improves the accuracy of data query. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1A schematic diagram of a method for processing a compound data element access interface provided in Example 1 of the present invention;

[0073] Figure 2 A module structure diagram of a processing device for a compound data element access interface provided in Embodiment 2 of the present invention;

[0074] Figure 3 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0076] Embodiment 1 of the present invention provides a method for processing a compound data element access interface, such as Figure 1 As shown in the schematic diagram of a processing method of a compound data element access interface provided in the first embodiment of the present invention, the method mainly comprises the following steps:

[0077] Step 1, pre-build a compound storage relationship mapping table based on the database design plan of the compound database, record it as the corresponding first mapping table; and customize a corresponding field data format rule for each type of data element field of the first mapping table; and form a corresponding first data rule set by all the obtained field data format rules; and update the corresponding field data format rules in the first data rule set in real time when the field data format requirements of any type of data element field change.

[0078] Here, the compound database in the embodiment of the present invention is any type of compound database, and the database design scheme of the compound database is known by default, that is, a series of data management methods such as data creation, update, and deletion corresponding to each compound data element within the database are known by default. The present invention does not make specific technical limitations on the database design scheme of the compound database.

[0079] The first mapping table of the embodiment of the present invention is a logical relationship mapping table, each row of the first mapping table corresponds to a compound data element, each column corresponds to a type of data element field, and each mapping table unit of the first mapping table corresponds to a set of database read / write interfaces in the compound database for field data corresponding to a data element field of a compound data element. Here, the data element fields of the first mapping table at least include a SMILES sequence field, a molecular chemical formula field, a type I molecular fingerprint field, a type II molecular fingerprint field, a type III molecular fingerprint field, multiple types of physical property fields, and multiple types of chemical property fields.

[0080] The first data rule set of an embodiment of the present invention is composed of multiple field data format rules. The field data format rules of the first data rule set correspond one-to-one to the data element fields of the first mapping table. Each field data format rule will be used to perform compliance checks on the field data of the corresponding data element field; and the specific rule content of each field data format rule can be customized based on the application requirements of the corresponding field data. The present invention does not make specific technical limitations on the field data format rules.

[0081] Step 2: receiving a first access application input by a user; and extracting a corresponding first access interface type and a first interface parameter from the first access application.

[0082] Here, the first access application of an embodiment of the present invention includes a first access interface type and a first interface parameter; wherein the first access interface type includes at least a mapping table export interface, a data element creation interface, a data element attribute calculation interface, a data element review interface, a mapping table review interface and a data element batch deletion interface; the specific content of the first interface parameter corresponds to the first access interface type.

[0083] When the first access interface type is a mapping table export interface, the first interface parameters include a first export mode and a first row identifier sequence; wherein the first export mode includes a full table export mode and a local export mode; when the first export mode is a full table export mode, the first row identifier sequence is empty; when the first export mode is a local export mode, the first row identifier sequence consists of one or more first row identifiers.

[0084] When the first access interface type is a data element creation interface, the first interface parameters include multiple first field items; among all the first field items, only the first field item whose first field name is a SMILES sequence cannot have its first field data empty; the first field item includes a first field name and a first field data; the first field name includes a SMILES sequence, a molecular chemical formula, a first class molecular fingerprint, a second class molecular fingerprint, a third class molecular fingerprint, multiple classes of physical property names, and multiple classes of chemical property names; the first class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the torsionbv (Topological-Torsion Bit Fingerprint) algorithm; the second class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the mfp2 (Morgan Bit Fingerprint with Default Radius 2) algorithm; the third class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the ffp2 (Morgan FCFP Bit Fingerprint with Default Radius 2) algorithm.

[0085] When the first access interface type is a data element attribute calculation interface, the first interface parameters include a first SMILES sequence and a second field name sequence; wherein the second field name sequence is composed of one or more second field names; the second field names include molecular chemical formulas, first-class molecular fingerprints, second-class molecular fingerprints, third-class molecular fingerprints, multiple types of physical property names, and multiple types of chemical property names.

[0086] When the first access interface type is a data element review interface, the first interface parameter includes a second SMILES sequence.

[0087] When the first access interface type is a mapping table review interface, the first interface parameters include a first review mode and a second row identification sequence; wherein, the first review mode includes a full table review mode and a partial review mode; when the first review mode is a full table review mode, the second row identification sequence is empty; when the first review mode is a partial review mode, the second row identification sequence consists of one or more second row identifications.

[0088] When the first access interface type is a data element batch deletion interface, the first interface parameter includes a third row identifier sequence; wherein the third row identifier sequence is composed of one or more third row identifiers.

[0089] Step 3: If the first access interface type is a mapping table export interface, then corresponding mapping table export processing is performed according to the first interface parameters and the first mapping table;

[0090] Specifically comprising: step 31, extracting a corresponding first export mode and a first row identification sequence from a first interface parameter;

[0091] Step 32, identifying the first export mode; if the first export mode is the full table export mode, all rows of the first mapping table form a corresponding first target row set; if the first export mode is the partial export mode, all rows corresponding to the first row identifiers of the first row identifier sequence in the first mapping table form a corresponding first target row set;

[0092] Step 33, perform a round of traversal on all rows of the first target row set; and in this round of traversal, use the current traversal row as the corresponding current mapping row; and use each mapping table unit of the current mapping row as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database read interface corresponding to the current mapping table unit as the corresponding current field data, and form a corresponding derived field item by the data element field corresponding to the current mapping table unit and the current field data; and form a corresponding derived compound data element by all the derived field items corresponding to the current mapping row; and at the end of this round of traversal, form a corresponding first processing result by all the derived compound data elements obtained;

[0093] Step 34: Feedback the obtained first processing result to the current user.

[0094] Step 4: If the first access interface type is a data element creation interface, then corresponding data element addition or update processing is performed according to the first interface parameter, the first mapping table and the first data rule set;

[0095] Specifically, the method comprises: step 41, identifying whether the first field data of the first field item of the first field name of the SMILES sequence in the first interface parameter is empty; if so, setting the corresponding second processing result as failure, and turning to step 47; if not, turning to step 42;

[0096] Step 42, record the first field items whose first field data in the first interface parameter is not empty as the corresponding current field items; and perform field data compliance check on the first field data of the current field item based on the field data format rule corresponding to the current field item in the first data rule set to obtain the corresponding first check result; and identify whether all the obtained first check results are compliant; if so, go to step 43; if not, set the corresponding second processing result to failure, and go to step 47;

[0097] Among them, the first inspection results include compliance and non-compliance;

[0098] Step 43, taking the first field data of the first field item of the first field name of the SMILES sequence in the first interface parameter as the corresponding current SMILES sequence; inputting the current SMILES sequence into the preset SMILES sequence standardization processing interface for processing to obtain the corresponding current standard sequence; recording the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; taking each mapping table unit of the current mapping column as the corresponding current mapping table unit, and reading the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding first inventory SMILES sequence, and forming the corresponding first inventory sequence set from all the obtained first inventory SMILES sequences; recording the first inventory SMILES sequence in the first inventory sequence set that matches the current standard sequence as the corresponding first matching inventory sequence; and identifying whether the first matching inventory sequence is empty; if so, going to step 44; if not, going to step 45;

[0099] The SMILES sequence standardization processing interface at least includes the standardized SMILES sequence processing interface provided by the RDKit tool;

[0100] Step 44, based on the database design scheme of the compound database, the corresponding compound data element is added in the compound database according to the first interface parameter; and when the addition process is successful, the database read / write interface corresponding to all the data element fields of the compound data element added this time is obtained; and a new row is added in the first mapping table as the corresponding current added row; and a correspondence relationship between each mapping table unit of the current added row and a set of database read / write interfaces of the corresponding data element field is created; and after the corresponding relationship is successfully created, the corresponding second processing result is set to success, and the process goes to step 47;

[0101] Step 45, extract all first field items in the first interface parameter whose first field names are not SMILES sequences and whose first field data are not empty to form a corresponding first field item set; and identify whether the first field item set is empty; if so, set the corresponding second processing result to failure, and go to step 47; if not, go to step 46;

[0102] Step 46, taking the corresponding row of the first matching inventory sequence in the first mapping table as the corresponding current mapping row; taking each first field item of the first field item set as the corresponding current field item, taking the mapping table unit corresponding to the data element field in the current mapping row and the first field name of the current field item as the corresponding current mapping table unit, and updating the database data corresponding to the current mapping table unit in the compound database as the first field data of the current field item through the database write interface corresponding to the current mapping table unit; and after the database data corresponding to all the first field items of the first field item set are updated successfully, setting the corresponding second processing result as success;

[0103] Step 47: Feedback the obtained second processing result to the current user.

[0104] Step 5: If the first access interface type is a data element attribute calculation interface, then corresponding data element attribute calculation processing is performed according to the first interface parameter and the first mapping table;

[0105] Specifically comprising: step 51, extracting a corresponding first SMILES sequence and a second field name sequence from a first interface parameter;

[0106] Step 52, input the first SMILES sequence into the SMILES sequence standardization processing interface for processing to obtain the corresponding current standard sequence; and record the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and use each mapping table unit of the current mapping column as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding second inventory SMILES sequence, and form a corresponding second inventory sequence set from all the obtained second inventory SMILES sequences; and record the second inventory SMILES sequence matching the current standard sequence in the second inventory sequence set as the corresponding second matching inventory sequence; and identify whether the second matching inventory sequence is empty; if so, set the corresponding third processing result as failure, and go to step 54; if not, use the corresponding row of the second matching inventory sequence in the first mapping table as the corresponding current mapping row, and go to step 53;

[0107] Step 53, taking each second field name of the second field name sequence as the corresponding current field name; taking the processing interface corresponding to the current field name provided by the preset attribute calculation tool as the corresponding current processing interface; inputting the first SMILES sequence into the current processing interface for processing and taking the processed data returned by the interface as the corresponding current field data; taking the mapping table unit corresponding to the data element field in the current mapping row and the current field name as the corresponding current mapping table unit; and updating the database data corresponding to the current mapping table unit in the compound database as the corresponding current field data through the database write interface corresponding to the current mapping table unit; and after the database data corresponding to all the second field names of the second field name sequence are successfully updated, setting the corresponding third processing result as success;

[0108] Among them, the attribute calculation tool includes at least the RDKit tool;

[0109] Step 54: Feedback the third processing result to the current user.

[0110] Step 6: If the first access interface type is a data element review interface, perform corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set;

[0111] Specifically comprising: step 61, extracting a corresponding second SMILES sequence from the first interface parameter;

[0112] Step 62, input the second SMILES sequence into the SMILES sequence standardization processing interface for processing to obtain the corresponding current standard sequence; and record the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and use each mapping table unit of the current mapping column as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding third inventory SMILES sequence, and form a corresponding third inventory sequence set from all the obtained third inventory SMILES sequences; and record the third inventory SMILES sequence matching the current standard sequence in the third inventory sequence set as the corresponding third matching inventory sequence; and identify whether the third matching inventory sequence is empty; if so, set the corresponding fourth processing result as failure, and go to step 65; if not, use the corresponding row of the third matching inventory sequence in the first mapping table as the corresponding current mapping row, and go to step 63;

[0113] Step 63, taking each mapping table unit of the current mapping row as the corresponding current mapping table unit; and reading the database data corresponding to the current mapping table unit in the compound database as the corresponding current field data through the database read interface corresponding to the current mapping table unit; and taking the field data format rule corresponding to the data element field corresponding to the current mapping table unit in the first data rule set as the corresponding current field data format rule; and performing a field data compliance check on the current field data based on the current field data format rule to obtain a corresponding second check result;

[0114] Among them, the second inspection results include compliance and non-compliance;

[0115] Step 64, identifying whether all the obtained second inspection results are compliant; if so, setting the corresponding fourth processing result to no exception; if not, using the row identifier corresponding to the current mapping row in the first mapping table as the corresponding first error row identifier, and using the column identifier corresponding to each data element field corresponding to the second inspection result that is specifically non-compliant in the first mapping table as the corresponding first error column identifier, and forming a corresponding first error column identifier sequence from all the obtained first error column identifiers, and forming a corresponding fourth processing result from the first error row identifier and the first error column identifier sequence;

[0116] Step 65: Feedback the fourth processing result to the current user.

[0117] Step 7: If the first access interface type is a mapping table review interface, performing corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set;

[0118] Specifically comprising: step 71, extracting the corresponding first review mode and second row identification sequence from the first interface parameter;

[0119] Step 72, identifying the first review mode; if the first review mode is a full-table review mode, all rows of the first mapping table form a corresponding second target row set; if the first review mode is a partial review mode, all rows corresponding to the second row identifiers of the second row identifier sequence in the first mapping table form a corresponding second target row set;

[0120] Step 73, perform a round of traversal on all rows of the second target row set; and in this round of traversal, take the current traversal row as the corresponding current mapping row; and take each mapping table unit of the current mapping row as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database read interface corresponding to the current mapping table unit as the corresponding current field data, and take the field data format rule corresponding to the data element field corresponding to the current mapping table unit in the first data rule set as the corresponding current field data format rule, and perform a field data compliance check on the current field data based on the current field data format rule to obtain a corresponding third check result; and take the corresponding third check result of the current mapping row in the first mapping table The row identifier is used as the corresponding current row identifier; and whether all the third check results corresponding to the current mapping row are compliant are identified; if so, the corresponding current row review result is set to no exception, and the current row identifier and the current row review result constitute a corresponding first row review result; if not, the column identifier corresponding to the data element field corresponding to each specific non-compliant third check result corresponding to the current mapping row in the first mapping table is used as the corresponding second error column identifier, and all the obtained second error column identifiers constitute a corresponding second error column identifier sequence, and the current row identifier and the second error column identifier sequence constitute a corresponding first row review result; and at the end of this round of traversal, all the obtained first row review results constitute the corresponding fifth processing result;

[0121] Step 74: Feedback the fifth processing result to the current user.

[0122] Step 8: If the first access interface type is a data element batch deletion interface, corresponding data element batch deletion processing is performed according to the first interface parameters and the first mapping table;

[0123] Specifically comprising: step 81, extracting the corresponding third row identification sequence from the first interface parameter;

[0124] Step 82, forming a corresponding third target row set from the corresponding rows of all third row identifiers of the third row identifier sequence in the first mapping table;

[0125] Step 83, perform a round of traversal on all rows of the third target row set; and in this round of traversal, use the current traversal row as the corresponding current mapping row; and use the mapping table unit corresponding to the SMILES sequence field in the current mapping row as the corresponding current SMILES sequence unit, and read the database data corresponding to the current SMILES sequence unit in the compound database through the database read interface corresponding to the current SMILES sequence unit as the corresponding current SMILES sequence; and perform corresponding compound data element deletion processing in the compound database according to the current SMILES sequence based on the database design scheme of the compound database; and when the deletion processing is successful, the database read / write interface corresponding to the mapping table unit of the current mapping row is invalidated, and the current mapping row is recorded as the corresponding row to be deleted; and at the end of this round of traversal, batch deletion processing is performed on all rows to be deleted in the first mapping table; and after the batch deletion is successful, the corresponding sixth processing result is set to success;

[0126] Step 84: Feedback the obtained sixth processing result to the current user.

[0127] Figure 2 The module structure diagram of a processing device for a compound data element access interface provided in the second embodiment of the present invention is a terminal device or server that implements the aforementioned method embodiment, and can also be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiment. For example, the device can be a device or chip system of the aforementioned terminal device or server. Figure 2 As shown, the device includes: a preprocessing module 201, an access application receiving module 202, a mapping table exporting module 203, a data element creating module 204, a data element attribute calculating module 205, a data element reviewing module 206, a mapping table reviewing module 207 and a data element batch deleting module 208.

[0128] The preprocessing module 201 is used to construct a compound storage relationship mapping table based on the database design scheme of the compound database in advance, which is recorded as the corresponding first mapping table; and customize a corresponding field data format rule for each type of data element field of the first mapping table; and form a corresponding first data rule set by all the obtained field data format rules; and update the corresponding field data format rules in the first data rule set in real time when the field data format requirements of any type of data element field change; each row of the first mapping table corresponds to a compound data element, and each column corresponds to a type of data element field. Each mapping table unit of the first mapping table corresponds to a set of database read / write interfaces in the compound database corresponding to the field data of a data element field of a compound data element; the data element field includes at least a SMILES sequence field, a molecular chemical formula field, a type I molecular fingerprint field, a type II molecular fingerprint field, a type III molecular fingerprint field, multiple types of physical property fields, and multiple types of chemical property fields.

[0129] The access application receiving module 202 is used to receive a first access application input by a user; and extract the corresponding first access interface type and first interface parameters from the first access application; the first access application includes the first access interface type and the first interface parameters; the first access interface type includes at least a mapping table export interface, a data element creation interface, a data element attribute calculation interface, a data element review interface, a mapping table review interface and a data element batch deletion interface.

[0130] The mapping table export module 203 is used to perform corresponding mapping table export processing according to the first interface parameter and the first mapping table when the first access interface type is a mapping table export interface.

[0131] The data element creation module 204 is used to perform corresponding data element addition or update processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a data element creation interface.

[0132] The data element attribute calculation module 205 is used to perform corresponding data element attribute calculation processing according to the first interface parameter and the first mapping table when the first access interface type is a data element attribute calculation interface.

[0133] The data element review module 206 is used to perform corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a data element review interface.

[0134] The mapping table review module 207 is used to perform corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a mapping table review interface.

[0135] The data element batch deletion module 208 is used to perform corresponding data element batch deletion processing according to the first interface parameters and the first mapping table when the first access interface type is a data element batch deletion interface.

[0136] A processing device for a compound data element access interface provided in an embodiment of the present invention can execute the method steps in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.

[0137] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the preprocessing module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above-mentioned module is determined. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0138] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0139] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the above method embodiments are generated. The above computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) methods. The above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The above-mentioned available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0140] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. The electronic device may be a terminal device or a server for implementing the method of the aforementioned embodiment, or may be a terminal device or a server for implementing the method of the aforementioned embodiment connected to the aforementioned terminal device or server. Figure 3 As shown, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver 303. Various instructions may be stored in the memory 302 to complete various processing functions and implement the processing steps described in the aforementioned embodiment method. Preferably, the electronic device involved in the embodiment of the present invention also includes: a power supply 304, a system bus 305 and a communication port 306. The system bus 305 is used to realize the communication connection between components. The above-mentioned communication port 306 is used for connecting and communicating between the electronic device and other peripherals.

[0141] exist Figure 3The system bus 305 mentioned in the figure can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM), and may also include non-volatile memory (Non-Volatile Memory), such as at least one disk storage.

[0142] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (Network Processor, NP), a graphics processing unit (Graphics Processing Unit, GPU), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0143] It should be noted that an embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the method and processing process provided in the above embodiments.

[0144] The embodiment of the present invention provides a processing method, device, electronic device and computer-readable storage medium for a compound data element access interface. As can be seen from the above content, the embodiment of the present invention pre-builds a compound storage relationship mapping table based on the database design scheme of any compound database, which is recorded as the first mapping table; and customizes a corresponding field data format rule for each type of data element field in the first mapping table; and all the obtained field data format rules form a first data rule set; and when the field data format requirements of any type of data element field change, the corresponding field data format rules in the first data rule set are updated in real time; and after receiving the first access application input by the receiving user, the corresponding first access interface type (mapping table export interface, data element creation interface, data element attribute calculation interface, data element review interface, mapping table review interface and data element batch deletion interface) and the first interface parameter are extracted from it; and when the first access interface type is a mapping table When exporting the interface, a mapping table export process is performed according to the first interface parameters and the first mapping table; when the first access interface type is a data element creation interface, a data element addition or update process is performed according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a data element attribute calculation interface, a data element attribute calculation process is performed according to the first interface parameters and the first mapping table; when the first access interface type is a data element review interface, a data element review process is performed according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a mapping table review interface, a mapping table review process is performed according to the first interface parameters, the first mapping table and the first data rule set; when the first access interface type is a data element batch deletion interface, a data element batch deletion process is performed according to the first interface parameters and the first mapping table. On the one hand, the embodiment of the present invention has functionally modified the data element creation interface, so that it can complete the compound data element creation based on incomplete compound data element information and can standardize the SMILES sequence when creating the compound data element; on the other hand, it has also added a data element attribute calculation interface to automatically complete the compound data element that is missing when creating, and automatically update the compound data element with aged field data; on the other hand, it has also added a data element review interface and a mapping table review interface to review the data format of a single or multiple or even all compound data elements; in addition, it has also added a mapping table export interface to obtain the complete information of a single or multiple or even all compound data elements, and added a data element batch deletion interface to centrally delete the single or multiple compound data elements that have been reviewed for errors. Combining the embodiment of the present invention with the conventional data element access interface not only reduces the attribute calculation workload of the creator and improves the creation efficiency of the data element, but also reduces the waste of data storage resources, reduces the data error rate of the database, and improves the accuracy of data query.

[0145] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0146] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for processing a compound data element access interface, characterized in that: The method comprises: A compound storage relationship mapping table is constructed in advance based on the database design scheme of the compound database, which is recorded as the corresponding first mapping table; and a corresponding field data format rule is customized for each type of data element field of the first mapping table; and all the obtained field data format rules form a corresponding first data rule set; and when the field data format requirements of any type of data element field change, the corresponding field data format rule in the first data rule set is updated in real time; each row of the first mapping table corresponds to a compound data element, and each column corresponds to a type of data element field, and each mapping table unit of the first mapping table corresponds to a set of database read / write interfaces in the compound database corresponding to the field data of a data element field of a compound data element; the data element field includes at least a SMILES sequence field, a molecular formula field, a type I molecular fingerprint field, a type II molecular fingerprint field, a type III molecular fingerprint field, multiple types of physical property fields, and multiple types of chemical property fields; Receive a first access application input by a user; extract a corresponding first access interface type and a first interface parameter from the first access application; the first access application includes the first access interface type and the first interface parameter; the first access interface type includes at least a mapping table export interface, a data element creation interface, a data element attribute calculation interface, a data element review interface, a mapping table review interface and a data element batch deletion interface; If the first access interface type is a mapping table export interface, performing corresponding mapping table export processing according to the first interface parameter and the first mapping table; If the first access interface type is a data element creation interface, performing corresponding data element addition or update processing according to the first interface parameter, the first mapping table and the first data rule set; If the first access interface type is a data element attribute calculation interface, performing corresponding data element attribute calculation processing according to the first interface parameter and the first mapping table; If the first access interface type is a data element review interface, performing corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set; If the first access interface type is a mapping table review interface, performing corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set; If the first access interface type is a data element batch deletion interface, corresponding data element batch deletion processing is performed according to the first interface parameters and the first mapping table.

2. The method for processing a compound data element access interface according to claim 1, characterized in that: When the first access interface type is a mapping table export interface, the first interface parameter includes a first export mode and a first row identifier sequence; the first export mode includes a full table export mode and a partial export mode; when the first export mode is a full table export mode, the first row identifier sequence is empty; when the first export mode is a partial export mode, the first row identifier sequence consists of one or more first row identifiers; When the first access interface type is a data element creation interface, the first interface parameters include multiple first field items; among all the first field items, only the first field data of the first field item whose first field name is SMILES sequence cannot be empty; the first field item includes the first field name and the first field data; the first field name includes SMILES sequence, molecular chemical formula, first class molecular fingerprint, second class molecular fingerprint, third class molecular fingerprint, multiple classes of physical property names and multiple classes of chemical property names; the first class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the tors i onbv algorithm; the second class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the mfp2 algorithm; the third class molecular fingerprint corresponds to the compound molecular fingerprint type calculated based on the ffp2 algorithm; When the first access interface type is a data element attribute calculation interface, the first interface parameters include a first SMILES sequence and a second field name sequence; the second field name sequence is composed of one or more second field names; the second field names include molecular chemical formulas, first-class molecular fingerprints, second-class molecular fingerprints, third-class molecular fingerprints, multiple types of physical property names, and multiple types of chemical property names; When the first access interface type is a data element review interface, the first interface parameter includes a second SM I LES sequence; When the first access interface type is a mapping table review interface, the first interface parameter includes a first review mode and a second row identification sequence; the first review mode includes a full table review mode and a partial review mode; when the first review mode is a full table review mode, the second row identification sequence is empty; when the first review mode is a partial review mode, the second row identification sequence consists of one or more second row identifications; When the first access interface type is a data element batch deletion interface, the first interface parameter includes a third row identifier sequence; the third row identifier sequence is composed of one or more third row identifiers.

3. The method for processing a compound data element access interface according to claim 2, characterized in that: The performing corresponding mapping table export processing according to the first interface parameter and the first mapping table specifically includes: Step 31, extracting the corresponding first export mode and the first row identification sequence from the first interface parameters; Step 32, identifying the first export mode; if the first export mode is a full-table export mode, all rows of the first mapping table form a corresponding first target row set; if the first export mode is a partial export mode, all rows corresponding to the first row identifiers of the first row identifier sequence in the first mapping table form a corresponding first target row set; Step 33, perform a round of traversal on all rows of the first target row set; and in this round of traversal, use the current traversal row as the corresponding current mapping row; and use each of the mapping table units of the current mapping row as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database read interface corresponding to the current mapping table unit as the corresponding current field data, and form a corresponding derived field item by the data element field corresponding to the current mapping table unit and the current field data; and form a corresponding derived compound data element by all the derived field items corresponding to the current mapping row; and at the end of this round of traversal, form a corresponding first processing result by all the derived compound data elements obtained; Step 34: Feedback the first processing result obtained to the current user.

4. The method for processing a compound data element access interface according to claim 2, characterized in that: The performing corresponding data element adding or updating processing according to the first interface parameter, the first mapping table and the first data rule set specifically includes: Step 41, identifying whether the first field data of the first field item whose first field name in the first interface parameter is a SMILES sequence is empty; if so, setting the corresponding second processing result to failure, and going to step 47; if not, going to step 42; Step 42, record the first field items in the first interface parameter whose first field data is not empty as the corresponding current field items; and perform field data compliance check on the first field data of the current field item based on the field data format rule corresponding to the current field item in the first data rule set to obtain a corresponding first check result; and identify whether all the first check results obtained are compliant; if so, go to step 43; if not, set the corresponding second processing result to failure, and go to step 47; Wherein, the first inspection result includes compliance and non-compliance; Step 43, taking the first field data of the first field item whose first field name is SMILES sequence in the first interface parameter as the corresponding current SMILES sequence; inputting the current SMILES sequence into the preset SMILES sequence standardization processing interface for processing to obtain the corresponding current standard sequence; recording the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and taking each of the mapping table units of the current mapping column as the corresponding current mapping table unit, and reading the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding first inventory SMILES sequence, and forming a corresponding first inventory sequence set from all the obtained first inventory SMILES sequences; and recording the first inventory SMILES sequence in the first inventory sequence set that matches the current standard sequence as the corresponding first matching inventory sequence; and identifying whether the first matching inventory sequence is empty; if so, going to step 44; if not, going to step 45; Wherein, the SMILES sequence standardization processing interface at least includes the standardized SMILES sequence processing interface provided by the RDKit tool; Step 44, based on the database design scheme of the compound database, perform the corresponding compound data element addition processing in the compound database according to the first interface parameters; and when the addition processing is successful, obtain the database read / write interface corresponding to all the data element fields of the compound data element added this time; and add a new row to the first mapping table as the corresponding current added row; and create a correspondence between each mapping table unit of the current added row and a set of database read / write interfaces of the corresponding data element fields; and after the corresponding relationship is successfully created, set the corresponding second processing result to success, and go to step 47; Step 45, extracting all the first field items in the first interface parameter whose first field names are not SMILES sequences and whose first field data are not empty to form a corresponding first field item set; and identifying whether the first field item set is empty; if so, setting the corresponding second processing result to failure, and going to step 47; if not, going to step 46; Step 46, taking the corresponding row of the first matching inventory sequence in the first mapping table as the corresponding current mapping row; taking each of the first field items of the first field item set as the corresponding current field item, taking the mapping table unit corresponding to the data element field in the current mapping row and the first field name of the current field item as the corresponding current mapping table unit, and updating the database data corresponding to the current mapping table unit in the compound database to the first field data of the current field item through the database write interface corresponding to the current mapping table unit; and after the database data corresponding to all the first field items of the first field item set are successfully updated, setting the corresponding second processing result to success; Step 47: Feedback the obtained second processing result to the current user.

5. The method for processing a compound data element access interface according to claim 2, characterized in that: The performing corresponding data element attribute calculation processing according to the first interface parameter and the first mapping table specifically includes: Step 51, extracting the corresponding first SM I LES sequence and the second field name sequence from the first interface parameters; Step 52, input the first SMILES sequence into a preset SMILES sequence standardization processing interface for processing to obtain a corresponding current standard sequence; and record the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and use each of the mapping table units of the current mapping column as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding second inventory SMILES sequence, and form a corresponding second inventory sequence set from all the obtained second inventory SMILES sequences; and record the second inventory SMILES sequence in the second inventory sequence set that matches the current standard sequence as the corresponding second matching inventory sequence; and identify whether the second matching inventory sequence is empty; if so, set the corresponding third processing result to failure, and go to step 54; if not, use the corresponding row of the second matching inventory sequence in the first mapping table as the corresponding current mapping row, and go to step 53; Step 53, taking each of the second field names of the second field name sequence as the corresponding current field name; taking the processing interface corresponding to the current field name provided by the preset attribute calculation tool as the corresponding current processing interface; inputting the first SMILES sequence into the current processing interface for processing and taking the processed data returned by the interface as the corresponding current field data; taking the mapping table unit corresponding to the data element field in the current mapping row and the current field name as the corresponding current mapping table unit; and updating the database data corresponding to the current mapping table unit in the compound database as the corresponding current field data through the database write interface corresponding to the current mapping table unit; and after the database data corresponding to all the second field names of the second field name sequence are successfully updated, setting the corresponding third processing result as success; Wherein, the attribute calculation tool at least includes RDK it tool; Step 54: Feedback the third processing result to the current user.

6. The method for processing a compound data element access interface according to claim 2, characterized in that: The performing corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set specifically includes: Step 61, extracting the corresponding second SMILES sequence from the first interface parameters; Step 62, input the second SMILES sequence into a preset SMILES sequence standardization processing interface for processing to obtain a corresponding current standard sequence; and record the corresponding column of the SMILES sequence field in the first mapping table as the corresponding current mapping column; and use each of the mapping table units of the current mapping column as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database reading interface corresponding to the current mapping table unit as the corresponding third inventory SMILES sequence, and form a corresponding third inventory sequence set from all the obtained third inventory SMILES sequences; and record the third inventory SMILES sequence in the third inventory sequence set that matches the current standard sequence as the corresponding third matching inventory sequence; and identify whether the third matching inventory sequence is empty; if so, set the corresponding fourth processing result to failure, and go to step 65; if not, use the corresponding row of the third matching inventory sequence in the first mapping table as the corresponding current mapping row, and go to step 63; Step 63, taking each of the mapping table units of the current mapping row as the corresponding current mapping table unit; and reading the database data corresponding to the current mapping table unit in the compound database as the corresponding current field data through the database read interface corresponding to the current mapping table unit; and taking the field data format rule corresponding to the data element field corresponding to the current mapping table unit in the first data rule set as the corresponding current field data format rule; and performing a field data compliance check on the current field data based on the current field data format rule to obtain a corresponding second check result; Wherein, the second inspection result includes compliance and non-compliance; Step 64, identifying whether all the obtained second inspection results are compliant; if so, setting the corresponding fourth processing result as no exception; if not, using the row identifier corresponding to the current mapping row in the first mapping table as the corresponding first error row identifier, and using the column identifier corresponding to each of the data element fields corresponding to the second inspection results that are specifically non-compliant in the first mapping table as the corresponding first error column identifier, and forming a corresponding first error column identifier sequence from all the obtained first error column identifiers, and forming a corresponding fourth processing result from the first error row identifier and the first error column identifier sequence; Step 65: Feedback the fourth processing result obtained to the current user.

7. The method for processing a compound data element access interface according to claim 2, characterized in that: The performing corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set specifically includes: Step 71, extracting the corresponding first review mode and the second row identification sequence from the first interface parameters; Step 72, identifying the first review mode; if the first review mode is a full-table review mode, all rows of the first mapping table form a corresponding second target row set; if the first review mode is a partial review mode, all rows corresponding to the second row identifiers of the second row identifier sequence in the first mapping table form a corresponding second target row set; Step 73, perform a round of traversal on all rows of the second target row set; and in this round of traversal, take the currently traversed row as the corresponding current mapping row; and take each of the mapping table units of the currently mapped row as the corresponding current mapping table unit, and read the database data corresponding to the current mapping table unit in the compound database through the database read interface corresponding to the current mapping table unit as the corresponding current field data, and take the field data format rule corresponding to the data element field corresponding to the current mapping table unit in the first data rule set as the corresponding current field data format rule, and perform a field data compliance check on the current field data based on the current field data format rule to obtain a corresponding third check result; and as the corresponding current row identifier; and identify whether all the third check results corresponding to the current mapping row are compliant; if so, set the corresponding current row review result to no exception, and form a corresponding first row review result with the current row identifier and the current row review result; if not, use the column identifier corresponding to the data element field corresponding to each of the third check results that are specifically non-compliant corresponding to the current mapping row in the first mapping table as the corresponding second error column identifier, and form a corresponding second error column identifier sequence with all the second error column identifiers obtained, and form a corresponding first row review result with the current row identifier and the second error column identifier sequence; and at the end of this round of traversal, form a corresponding fifth processing result with all the first row review results obtained; Step 74: Feedback the fifth processing result to the current user.

8. The method for processing a compound data element access interface according to claim 2, characterized in that: The performing corresponding batch deletion processing of data elements according to the first interface parameter and the first mapping table specifically includes: Step 81, extracting the corresponding third row identification sequence from the first interface parameter; Step 82, forming a corresponding third target row set from the rows corresponding to all the third row identifiers of the third row identifier sequence in the first mapping table; Step 83, perform a round of traversal on all rows of the third target row set; and in this round of traversal, take the current traversal row as the corresponding current mapping row; and take the mapping table unit corresponding to the SMILES sequence field in the current mapping row as the corresponding current SMILES sequence unit, and read the database data corresponding to the current SMILES sequence unit in the compound database through the database read interface corresponding to the current SMILES sequence unit as the corresponding current SMILES sequence; and perform corresponding compound data element deletion processing in the compound database according to the current SMILES sequence based on the database design scheme of the compound database; and when the deletion processing is successful, the database read / write interface corresponding to the mapping table unit of the current mapping row is invalidated, and the current mapping row is recorded as the corresponding row to be deleted; and at the end of this round of traversal, batch deletion processing is performed on all the rows to be deleted in the first mapping table; and after the batch deletion is successful, the corresponding sixth processing result is set to success; Step 84: Feedback the obtained sixth processing result to the current user.

9. A device for executing the method for processing the compound data element access interface according to any one of claims 1 to 8, characterized in that: The device comprises: a pre-processing module, an access application receiving module, a mapping table exporting module, a data element creating module, a data element attribute calculating module, a data element reviewing module, a mapping table reviewing module and a data element batch deleting module; The preprocessing module is used to construct a compound storage relationship mapping table based on the database design scheme of the compound database in advance, which is recorded as the corresponding first mapping table; and customize a corresponding field data format rule for each type of data element field of the first mapping table; and form a corresponding first data rule set by all the obtained field data format rules; and update the corresponding field data format rule in the first data rule set in real time when the field data format requirement of any type of data element field changes; each row of the first mapping table corresponds to a compound data element, and each column corresponds to a type of data element field, and each mapping table unit of the first mapping table corresponds to a set of database read / write interfaces in the compound database corresponding to the field data of a data element field of a compound data element; the data element field includes at least SMILES sequence field, molecular chemical formula field, type I molecular fingerprint field, type II molecular fingerprint field, type III molecular fingerprint field, multiple types of physical property fields and multiple types of chemical property fields; The access application receiving module is used to receive a first access application input by a user; and extract the corresponding first access interface type and first interface parameter from the first access application; the first access application includes the first access interface type and the first interface parameter; the first access interface type includes at least a mapping table export interface, a data element creation interface, a data element attribute calculation interface, a data element review interface, a mapping table review interface and a data element batch deletion interface; The mapping table export module is used for performing corresponding mapping table export processing according to the first interface parameters and the first mapping table when the first access interface type is a mapping table export interface; The data element creation module is used for performing corresponding data element addition or update processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a data element creation interface; The data element attribute calculation module is used for performing corresponding data element attribute calculation processing according to the first interface parameter and the first mapping table when the first access interface type is a data element attribute calculation interface; The data element review module is used for performing corresponding data element review processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a data element review interface; The mapping table review module is used for performing corresponding mapping table review processing according to the first interface parameter, the first mapping table and the first data rule set when the first access interface type is a mapping table review interface; The data element batch deletion module is used to perform corresponding data element batch deletion processing according to the first interface parameters and the first mapping table when the first access interface type is a data element batch deletion interface.

10. An electronic device, characterized in that: include: memory, processors, and transceivers; The processor is used to couple with the memory, read and execute instructions in the memory, so as to implement the method according to any one of claims 1 to 8; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is enabled to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data processing method and system for drug research and development

    CN112164430A

  • Interface generation method, database, electronic equipment and storage medium

    CN116048496A