Method, device and storage medium for obtaining molecular properties
Through the entry, calculation and exit functions of the serverless architecture, the high cost and non-scalability problems of molecular property calculation in computer-aided drug design are solved, and pay-per-volume billing, on-demand scaling and mirror deployment are realized, improving system scalability. and computational efficiency.
Patent Information
- Application Number
- CN202111635352.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In the computer-aided drug design process, the existing technology using commercial software or traditional network services to calculate molecular properties has problems such as high cost, unscalability, and inability to meet customization requirements.
Adopting a serverless architecture, it receives client service requests through the entry function, triggers the calculation function to calculate molecular properties, and returns the results through the exit function, realizing pay-per-volume billing, on-demand scaling and mirror deployment, and simplifying the software release process.
It reduces the cost of molecular property calculations, improves system scalability, saves idle time resources, ensures availability during busy periods, and shortens calculation time.
Smart Images

Figure CN114300063B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer-aided pharmaceutical manufacturing, and in particular to a method, device and storage medium for obtaining molecular properties. Background Art
[0002] In the process of computer-aided drug design, it is often necessary to calculate or predict the physical, chemical or ADMET properties of candidate drug molecules, and analyze and screen them accordingly. In the related art, the method for predicting molecular properties mainly includes using commercial software or accessing public or private traditional network services that provide property calculations. However, commercial software licensing fees are expensive, and general users are usually unable to participate in development work. Complete software packages often cannot meet the user's customized needs, and the use of traditional network services requires the service to be deployed on an actual server, which will result in waste of resources and poor scalability. Summary of the invention
[0003] In order to solve or partially solve the problems existing in the related art, the present application provides a method, device and storage medium for obtaining molecular properties. This technical solution can reduce the various costs of obtaining molecular properties and enhance the scalability of the system.
[0004] The first aspect of the present application provides a method for obtaining molecular properties, comprising:
[0005] Using an entry function to receive a service request from a client, and triggering a calculation function according to the service request; wherein the service request includes at least one target molecule to be calculated;
[0006] Utilizing the calculation function to perform a preset operation to calculate the properties of the at least one target molecule to obtain a calculation result, wherein the calculation result includes the properties of each of the target molecules;
[0007] The calculation result is returned to the client by using an export function.
[0008] A second aspect of the present application provides a device for obtaining molecular properties, comprising:
[0009] A receiving module, used to receive a service request from a client using an entry function, and trigger a calculation function according to the service request; wherein the service request includes at least one target molecule to be calculated;
[0010] an execution module, configured to use the calculation function to execute a preset operation to calculate the properties of the at least one target molecule, and obtain a calculation result, wherein the calculation result includes the properties of each of the target molecules;
[0011] The return module returns the calculation result to the client using the export function.
[0012] A third aspect of the present application provides an electronic device, including:
[0013] Processor; and
[0014] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0015] A fourth aspect of the present application provides a storage medium having executable code stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.
[0016] From the technical solution provided in the present application, it can be seen that since the entry function and the calculation function are functions deployed in a serverless manner, the calculation results of the properties of the target molecule are finally obtained by triggering the entry function and the calculation function. For users, it is not only possible to effectively realize pay-as-you-go billing and on-demand scaling capabilities, save idle time costs and ensure availability during busy periods, but the calculation function can usually be deployed in a mirrored manner, which means that the release process of the corresponding software can be simplified and the time spent on calculating the properties of the target molecule can be shortened.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other objects, features and advantages of the present application will become more apparent through a more detailed description of exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0019] Figure 1 is a schematic diagram of an application scenario of the method for obtaining molecular properties shown in an embodiment of the present application;
[0020] Figure 2 is a schematic flow chart of a method for obtaining molecular properties shown in an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of the structure of a device for obtaining molecular properties shown in an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0024] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0025] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0026] In the process of computer-aided drug design, it is often necessary to calculate or predict the physical, chemical or ADMET properties of candidate drug molecules. The related technology mainly includes the use of commercial software or access to public or private traditional network services that provide property calculations. However, commercial software licensing fees are expensive, and general users are usually unable to intervene in development work, and complete software packages often cannot meet the customized needs of users. When using traditional network services, the service needs to be deployed on an actual server. Since the access frequency of the molecular property calculation service depends on the user's design and the progress of the work of generating the molecules to be evaluated, it has a high degree of uncertainty. Deploying the service on an actual server often results in a waste of idle resources and limited availability during busy hours. In addition, the server needs to be compatible with different algorithms with complex operating environments, which is difficult to deploy, and has poor scalability and maintainability.
[0027] In view of the above problems, an embodiment of the present application provides a method for obtaining molecular properties, which can reduce the various costs of obtaining molecular properties and enhance the scalability of the system.
[0028] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0029] See also Figure 1 , is a schematic diagram of the application scenario of the method for obtaining molecular properties shown in the embodiment of the present application. The application scenario is based on a serverless architecture, and its basic features are function as a service (FaaS) and event-driven, specifically referring to abstracting the function as a service and providing it to developers, so that developers can implement functions such as function development, testing, and online deployment on the Internet. Event-driven means that the function in the Serverless architecture is executed by event-driven, and the event is published by the event source. Its essence is a business request for requesting the completion of the corresponding business. In the Serverless architecture, one of the main functions of the API Gateway is to provide a central interface to clients using microservices. The central interface means that these interfaces have a unified address. In other words, when the client needs to call any microservice on the back end, it only needs to send a service request to the central interface with a unified address. The API gateway triggers the corresponding cloud function on the back end according to the service request. After the cloud function is executed, the API gateway returns the result of the cloud function execution to the client through the central interface.
[0030] See also Figure 2 , is a flow chart of a method for obtaining molecular properties shown in an embodiment of the present application, the method mainly includes steps S201 to S203, which are described in detail as follows:
[0031] Step S201: using an entry function to receive a service request from a client, and triggering a calculation function according to the service request, wherein the service request includes at least one target molecule to be calculated.
[0032] In an embodiment of the present application, the service request of the client is a service request sent by the user to the API gateway through the client, and the service request indicates the business requested to be completed by the user. As mentioned above, the API gateway can provide a central interface to the client. Specifically, in an embodiment of the present application, the API gateway can provide an entry cloud function to the client. Therefore, the service request sent by the client to the API gateway is essentially a service request sent to the entry cloud function, and the entry function receives this service request from the client. It should be noted that the entry function can be a serverless function deployed in a lightweight manner. Therefore, in addition to having all the properties of a serverless function, it also means that the entry function has minimal dependence on resources such as third-party libraries and components.
[0033] In addition, the service request sent by the user through the client should contain at least one target molecule, while the service request ID and the molecular properties to be calculated are optional, that is, the user can fill in the service request ID and / or the molecular properties to be calculated when operating. In this case, the service request sent includes not only at least one target molecule but also the service request ID and / or the molecular properties to be calculated; the user can also not fill in the service request ID and / or the molecular properties to be calculated when operating. In this case, the service request sent only includes the ID of at least one target molecule, but does not include the service request ID and / or the molecular properties to be calculated. In this case, the service request ID and the molecular properties to be calculated can both be generated by the entry function.
[0034] In the embodiment of the present application, the computing function is a serverless function deployed as a container image or code archive, which means that the specific algorithm of the computing function is not affected by the deployment environment or has a high tolerance for the deployment environment. When a new service needs to be added, the algorithm researchers only need to package the implemented scientific algorithm into a computing function and add new event topics and triggers accordingly. The serverless function means that the pay-as-you-go and on-demand scaling capabilities can be effectively realized, saving idle time costs and ensuring availability during busy periods. It should be noted that the specific functions of the computing function will be different according to different requirements or algorithms, and the actual executed code and the dependent third-party libraries, components and other resources are different. The sequential triggering of the entry function and the computing function means that the triggering of the entry function and the computing function has a strict order, that is, the entry function is triggered first, and then the computing function is triggered.
[0035] As an embodiment of the present application, a service request from a client may trigger a calculation function by: using an entry function to generate and save a corresponding relationship for the service request; issuing a request calculation event through the entry function to trigger the calculation function, wherein the request calculation event carries the ID of the service request, and the corresponding relationship includes the mapping of the service request ID, at least one target molecule, and the properties of the molecule to be calculated. Here, the mapping of the service request ID, at least one target molecule, and the properties of the molecule to be calculated means that one service request ID may correspond to multiple target molecules. In other words, the properties of multiple target molecules may be obtained by sending one or more service requests (corresponding to one service request ID).
[0036] As mentioned above, the service request from the client may include at least one target molecule, the ID of the service request and the properties of the molecule to be calculated, or only include at least one target molecule without the ID of the service request and the properties of the molecule to be calculated, or include at least one target molecule and the ID of the service request without the properties of the molecule to be calculated, or include at least one target molecule and the properties of the molecule to be calculated without the ID of the service request; the following is an explanation of the following cases:
[0037] When a service request from a client includes at least one target molecule, an ID of the service request and properties of the molecule to be calculated, as an embodiment of the present application, the above-mentioned generation of a corresponding relationship for the service request using an entry function and saving the corresponding relationship may be: using the entry function to parse the service request, obtaining the ID of the service request, at least one target molecule and the properties of the molecule to be calculated, and establishing a corresponding relationship with the ID of the service request as an index and with at least one target molecule and the properties of the molecule to be calculated as index values, and then saving the corresponding relationship in the storage system; here, using the entry function to parse the service request specifically means passing the ID of the service request, at least one target molecule and the properties of the molecule to be calculated into the entry function, thereby triggering the entry function to parse the service request from the client.
[0038] When the service request from the client only contains at least one target molecule but does not contain the ID of the service request and the molecular properties to be calculated, as another embodiment of the present application, the above-mentioned use of the entry function to generate and save the corresponding relationship for the service request can be: using the entry function to parse the service request, obtaining at least one target molecule, generating the ID of the service request and the molecular properties to be calculated for the at least one target molecule, and establishing a corresponding relationship with the ID of the service request generated by the entry function as the index and with at least one target molecule and the molecular properties to be calculated generated by the entry function as the index value, and then saving it in the storage system; here, using the entry function to parse the service request is specifically by passing at least one target molecule into the entry function, thereby triggering the entry function to parse the service request from the client.
[0039] When a service request from a client contains at least one target molecule and an ID of a service request but does not contain the molecular properties to be calculated, as another embodiment of the present application, the above-mentioned generation and storage of a corresponding relationship for a service request using an entry function may be: the service request is parsed using an entry function to obtain the ID of the service request and at least one target molecule, the molecular properties to be calculated for at least one target molecule are generated, and a corresponding relationship is established with the ID of the service request as an index and with at least one target molecule and the molecular properties to be calculated generated by the entry function as index values and then stored in a storage system; here, the service request is parsed using an entry function, specifically by passing at least one target molecule and the ID of a service request into the entry function, thereby triggering the entry function to parse the service request from the client.
[0040] When the service request from the client contains at least one target molecule and a property of the molecule to be calculated but does not contain an ID of the service request, as another embodiment of the present application, the above-mentioned generation and storage of a corresponding relationship for the service request using an entry function may be: using the entry function to parse the service request, obtaining at least one target molecule and a property of the molecule to be calculated, generating an ID of the service request, and establishing a corresponding relationship with the ID of the service request generated by the entry function as an index and with at least one target molecule and a property of the molecule to be calculated as an index value, and then saving it in a storage system; here, using the entry function to parse the service request specifically means passing at least one target molecule and a property of the molecule to be calculated into the entry function, thereby triggering the entry function to parse the service request from the client.
[0041] The storage system of the above embodiment may be a structured database, an unstructured database, or an object storage-based storage unit, etc. Since the corresponding relationship is established by using the service request ID as the index and at least one target molecule and the molecule property to be calculated as the index value when the data is stored in these storage systems, the service request ID can be used as the index when the calculation result needs to be read later.
[0042] Corresponding to the service request from the client, the trigger calculation function is to use the entry function to generate and save the corresponding relationship for the service request; the request calculation event is issued through the entry function to trigger the calculation function, wherein the request calculation event carries the ID of the service request, and the corresponding relationship includes the ID of the service request, at least one target molecule and the mapping of the molecular properties to be calculated.
[0043] Step S202: using the calculation function to execute a preset operation to calculate the properties of at least one target molecule to obtain a calculation result, wherein the calculation result includes the properties of each target molecule.
[0044] In one embodiment of the present application, a calculation function is used to execute a preset operation to calculate properties of at least one target molecule, and the calculation result obtained can be: using the calculation function to obtain at least one target molecule and the property to be calculated of the molecule from the corresponding relationship according to the ID of the service request, and executing the preset operation corresponding to the property to be calculated of the molecule to calculate the property of at least one target molecule to obtain the calculation result.
[0045] Specifically, the ID of the service request may be passed to the calculation function, and the calculation function may be triggered to read at least one target molecule and the property of the molecule to be calculated from the storage system with the ID of the service request as the index, and the code corresponding to the property of the molecule to be calculated in the calculation function is used as the input parameter to calculate the property of the at least one target molecule, so as to obtain the calculation result of the property of the target molecule. Since when the entry function is triggered, the storage system establishes a corresponding relationship with the ID of the service request as the index and the at least one target molecule and the property of the molecule to be calculated as the index value and then saves it in the storage system, therefore, when the ID of the service request is passed to the calculation function, the calculation function may be triggered to read the target molecule and the property of the molecule to be calculated from the storage system with the ID of the service request as the index, and the code corresponding to the property of the molecule to be calculated in the calculation function is used as the input parameter to calculate the property of the at least one target molecule to obtain the calculation result of the property of the target molecule.
[0046] In the above embodiment, the property calculation of at least one target molecule is performed by using a calculation function to execute a preset operation, and after obtaining the calculation result, the calculation result is also saved in the corresponding relationship to update the corresponding relationship. The calculation result can be saved to a storage system such as a structured database, an unstructured database, or an object-based storage unit mentioned in the above embodiment. When saving, a corresponding relationship can be established with the ID of the service request as an index and at least one target molecule and the property of the molecule to be calculated as an index value, so as to facilitate indexing when the calculation result needs to be read later.
[0047] Step S203: Use the export function to return the calculation result to the client.
[0048] First of all, it is explained that, similar to the entry function of the aforementioned embodiment, the export function of the embodiment of the present application is also a serverless function deployed in a lightweight manner, that is, a code archive. Therefore, in addition to having all the properties of a serverless function, it also means that the export function has minimal dependence on resources such as third-party libraries and components. As an embodiment of the present application, using the export function to return the calculation result to the client can be: using the export function to receive a query request from the client, wherein the query request contains the ID of the service request; using the export function and according to the ID of the service request, reading the calculation result corresponding to the ID of the service request and returning the calculation result to the client. It should be noted that since the ID of the service request received through the query request is still the entry cloud function provided by the client through calling the API gateway, it is passed in by the entry cloud function. Therefore, when the service request carries the ID of the service request, it is directly passed in by the entry cloud function. When the service request does not contain the ID of the service request, the entry cloud function can parse the service request and generate the parameter of the ID of the service request and then pass it in. Then, using the service request ID as an index, the calculation result is read from a storage system such as a structured database, an unstructured database, or an object storage-based storage unit, and then returned to the client.
[0049] In one embodiment of the present application, when a service request from a client contains the address of a callback interface, before using the export function to return the calculation result corresponding to the ID of the service request to the client, the method of the above embodiment also includes publishing a completion calculation event through the calculation function to trigger the export function, wherein the completion calculation event carries the ID of the service request.
[0050] Specifically, after the calculation function completes the calculation of the properties of the target molecule, it publishes a calculation completion event, which includes the ID of the service request. The export function subscribes to the theme of "Complete Calculation Event", and its trigger takes out the completed corresponding calculation event, passes the ID of the service request to the export function, and the export function is triggered. It should be noted that in the above embodiment, the address of the callback interface is filled in by the user when sending a service request through the client. Since the address of the callback interface is an optional option for the user when sending a service request, that is, the user may not fill in the address of the callback interface when sending a service request. When the user does not fill in the address of the callback interface when sending a service request through the client, returning the saved calculation result to the client can be achieved by the method of the aforementioned embodiment, that is, receiving a query request from the client (including the ID of the service request), according to the ID of the service request, reading the saved calculation result and returning the calculation result to the client.
[0051] Corresponding to when the service request from the client includes the address of the callback interface, before the calculation result corresponding to the ID of the service request is returned to the client using the export function, the method of the above embodiment also includes publishing a calculation completion event through the calculation function to trigger the export function. As another embodiment of the present application, returning the calculation result to the client using the export function can be: using the export function to read the calculation result corresponding to the ID of the service request, and calling the callback interface according to the address of the callback interface to return the calculation result to the client. Specifically, the calculation result of the property of at least one target molecule is read from a storage system such as a structured database, an unstructured database, or an object-based storage unit based on the ID of the service request and the integrity of the calculation result is checked. Finally, the callback interface is called according to the address of the callback interface to return the calculation result to the client.
[0052] From the above Figure 2 From the technical solution of the example, it can be seen that since the entry function and the calculation function are functions deployed in a serverless manner, the calculation results of the properties of the target molecule are finally obtained by triggering the entry function and the calculation function. For users, it can not only effectively realize the pay-as-you-go billing and on-demand scaling capabilities, save idle time costs and ensure availability during busy periods, but also the calculation function can usually be deployed in a mirrored manner, which means that the release process of the corresponding software can be simplified and the time spent on calculating the properties of the target molecule can be shortened.
[0053] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a device for obtaining molecular properties, an electronic device and corresponding embodiments.
[0054] See also Figure 3 Schematic diagram of the structure of the device for obtaining molecular properties shown in the embodiment of the present application. For the convenience of explanation, only the part related to the embodiment of the present application is shown. Figure 3 The exemplary apparatus may include a receiving module 301, an executing module 302, and a returning module 303, as described below:
[0055] The receiving module 301 is used to receive a service request from a client using an entry function, and trigger a calculation function according to the service request, wherein the service request includes at least one target molecule to be calculated;
[0056] An execution module 302 is used to perform a property calculation on at least one target molecule by using a calculation function to execute a preset operation to obtain a calculation result, wherein the calculation result includes the property of each target molecule;
[0057] The return module 303 is used to return the calculation result to the client by using the export function.
[0058] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0059] from Figure 3 It can be seen from the example device that since the entry function and the calculation function are functions deployed in a serverless manner, the calculation results of the properties of the target molecule are finally obtained by triggering the entry function and the calculation function. For users, not only can the pay-as-you-go billing and on-demand scaling capabilities be effectively realized, the idle time cost can be saved and the availability during the busy period can be ensured, but the calculation function can usually be deployed in a mirrored manner, which means that the release process of the corresponding software can be simplified and the time spent on calculating the properties of the target molecule can be shortened.
[0060] Optionally, Figure 3 The exemplary receiving module 301 may include a generating unit and a triggering unit, and the executing module 302 may include a first calculating unit, wherein:
[0061] A generating unit, used to generate and save a corresponding relationship for a service request using an entry function, wherein the corresponding relationship includes a mapping of an ID of the service request, at least one target molecule and a property to be calculated of the molecule;
[0062] A trigger unit, used to publish a request computing event through an entry function to trigger a computing function, wherein the request computing event carries an ID of a service request;
[0063] The first calculation unit is used to obtain at least one target molecule and the molecular property to be calculated from the corresponding relationship according to the service request ID using a calculation function, and execute a preset operation corresponding to the molecular property to be calculated to calculate the property of the at least one target molecule to obtain a calculation result.
[0064] Optionally, the above-mentioned service request may also include the ID of the service request and the properties of the molecule to be calculated. The generation unit may include a first establishment unit, which is used to parse the service request using an entry function, obtain the ID of the service request, at least one target molecule and the properties of the molecule to be calculated, and establish a corresponding relationship with the ID of the service request as the index and the at least one target molecule and the properties of the molecule to be calculated as the index value, and then save it in the storage system.
[0065] Optionally, the above-mentioned generation unit may include a second establishment unit, which is used to parse the service request using the entry function, obtain at least one target molecule, generate an ID of the service request and the molecular properties to be calculated for the at least one target molecule, and establish a correspondence with the ID of the service request generated by the entry function as an index and the at least one target molecule and the molecular properties to be calculated generated by the entry function as index values, and then save it in the storage system.
[0066] Optionally, the above-mentioned service request may also include an ID of the service request, and the generating unit may include a third establishing unit, which is used to parse the service request using an entry function, obtain the ID of the service request and at least one target molecule, generate a molecular property to be calculated for the at least one target molecule, and establish a correspondence with the ID of the service request as an index and the at least one target molecule and the molecular property to be calculated generated by the entry function as an index value, and then save it in the storage system.
[0067] Optionally, the above-mentioned service request may also include molecular properties to be calculated, and the generation unit may include a fourth establishment unit, which is used to parse the service request using an entry function, obtain at least one target molecule and molecular properties to be calculated, generate an ID of the service request, and establish a correspondence between the ID of the service request generated by the entry function as an index and the at least one target molecule and the molecular property to be calculated as an index value, and then save it in the storage system.
[0068] Optionally, Figure 3 The exemplary device may further include a saving module, which is used for executing module 302 to perform a preset operation using a calculation function to calculate the properties of at least one target molecule, and after obtaining the calculation result, save the calculation result in the corresponding relationship to update the corresponding relationship.
[0069] Optionally, the returning module 303 may include a query request receiving unit and a reading unit, wherein:
[0070] A query request receiving unit, used for receiving a query request from a client using an export function, wherein the query request includes an ID of a service request;
[0071] The reading unit is used to use the export function and read the calculation result corresponding to the service request ID according to the service request ID, and then return the calculation result to the client.
[0072] Optionally, the service request may also include the address of the callback interface. Figure 3 The exemplary apparatus may further include a trigger module, and the return module 303 may include a calling unit, wherein:
[0073] The trigger module is used to publish a calculation completion event through the calculation function before the return module 303 uses the export function to return the calculation result to the client, triggering the export function, and the calculation completion event carries the ID of the service request;
[0074] The calling unit is used to read the calculation result corresponding to the ID of the service request by using the export function, and call the callback interface according to the address of the callback interface to return the calculation result to the client.
[0075] Optionally, the computing function is deployed via a container image or a code archive, and the entry function or the exit function is deployed in a lightweight manner or as a code archive.
[0076] See also Figure 4 , is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. The electronic device 400 includes a memory 410 and a processor 420.
[0077] The processor 420 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0078] The memory 410 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 420 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 410 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 410 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0079] The memory 410 stores executable codes, and when the executable codes are processed by the processor 420 , the processor 420 can execute part or all of the methods described above.
[0080] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0081] Alternatively, the present application can also be implemented as a storage medium, including a non-temporary machine-readable storage medium, a computer-readable storage medium or a machine-readable storage medium, on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or electronic device, server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0082] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for obtaining molecular properties, It is characterized in that The method comprises: Using an entry function to receive a service request from a client, and triggering a calculation function according to the service request; wherein the service request includes at least one target molecule to be calculated; Utilizing the calculation function to perform a preset operation to calculate the properties of the at least one target molecule to obtain a calculation result, wherein the calculation result includes the properties of each of the target molecules; Returning the calculation result to the client using an export function; The triggering of a calculation function according to the service request includes: Generate and save a corresponding relationship for the service request using the entry function, wherein the corresponding relationship includes an ID of the service request, a mapping between the at least one target molecule and a property to be calculated of the molecule; Publishing a request calculation event through the entry function to trigger the calculation function, wherein the request calculation event carries the ID of the service request; The using of the calculation function to execute a preset operation to calculate the properties of the at least one target molecule to obtain a calculation result includes: using the calculation function to obtain the at least one target molecule and the property to be calculated of the molecule from the corresponding relationship according to the ID of the service request, and executing a preset operation corresponding to the property to be calculated of the molecule to calculate the property of the at least one target molecule to obtain a calculation result.
2. The method for obtaining molecular properties according to claim 1, It is characterized in that The service request also includes an ID of the service request and the property of the molecule to be calculated, and the generating and saving of a corresponding relationship for the service request using the entry function includes: The service request is parsed using the entry function to obtain the ID of the service request, the at least one target molecule and the property to be calculated of the molecule, and a corresponding relationship is established with the ID of the service request as the index and the at least one target molecule and the property to be calculated of the molecule as the index value and then saved in the storage system.
3. The method for obtaining molecular properties according to claim 1, It is characterized in that The generating and saving the corresponding relationship for the service request by using the entry function includes: The service request is parsed using the entry function to obtain the at least one target molecule, generate an ID for the service request and a molecular property to be calculated for the at least one target molecule, and establish a corresponding relationship with the ID of the service request generated by the entry function as an index and the at least one target molecule and the molecular property to be calculated generated by the entry function as index values, and then save it in a storage system.
4. The method for obtaining molecular properties according to claim 1, It is characterized in that The service request also includes an ID of the service request, and the generating and saving a corresponding relationship for the service request using the entry function includes: The service request is parsed using the entry function to obtain the ID of the service request and the at least one target molecule, a molecular property to be calculated for the at least one target molecule is generated, and a corresponding relationship is established with the ID of the service request as an index and the at least one target molecule and the molecular property to be calculated generated by the entry function as index values, and then saved in a storage system.
5. The method for obtaining molecular properties according to claim 1, It is characterized in that The service request also includes the property of the molecule to be calculated, and the generating and saving of the corresponding relationship for the service request using the entry function includes: The service request is parsed using the entry function to obtain the at least one target molecule and the property to be calculated of the molecule, generate an ID for the service request, and establish a corresponding relationship with the ID of the service request generated by the entry function as an index and the at least one target molecule and the property to be calculated of the molecule as an index value, and then saved in a storage system.
6. The method for obtaining molecular properties according to claim 1, It is characterized in that After the calculation function is used to perform a preset operation to calculate the properties of the at least one target molecule and a calculation result is obtained, the method further includes: The calculation result is stored in the corresponding relationship to update the corresponding relationship.
7. The method for obtaining molecular properties according to any one of claims 1 to 6, It is characterized in that The using the export function to return the calculation result to the client includes: Using an export function to receive a query request from the client, the query request includes an ID of the service request; The export function is used to read the calculation result corresponding to the ID of the service request according to the ID of the service request, and then the calculation result is returned to the client.
8. The method for obtaining molecular properties according to any one of claims 1 to 6, It is characterized in that The service request also includes the address of the callback interface. Before returning the calculation result to the client using the export function, the method also includes: The calculation function publishes a calculation completion event to trigger an exit function, wherein the calculation completion event carries the ID of the service request; The using the export function to return the calculation result to the client includes: The calculation result corresponding to the ID of the service request is read by using the export function, and the callback interface is called according to the address of the callback interface to return the calculation result to the client.
9. The method for obtaining molecular properties according to any one of claims 1 to 6, It is characterized in that The computing function is deployed through a container image or a code archive; the entry function or the exit function is deployed in a lightweight manner or a code archive.
10. A device for obtaining molecular properties, It is characterized in that The device comprises: A receiving module, used to receive a service request from a client using an entry function, and trigger a calculation function according to the service request, wherein the service request includes at least one target molecule to be calculated; an execution module, configured to use the calculation function to execute a preset operation to calculate the properties of the at least one target molecule, and obtain a calculation result, wherein the calculation result includes the properties of each of the target molecules; A return module returns the calculation result to the client using an export function; The receiving module includes a generating unit and a triggering unit, and the executing module includes a first calculating unit, wherein: The generating unit is used to generate and save a corresponding relationship for the service request using the entry function, wherein the corresponding relationship includes an ID of the service request, a mapping between the at least one target molecule and a property to be calculated of the molecule; The trigger unit is used to issue a request calculation event through the entry function to trigger the calculation function, wherein the request calculation event carries the ID of the service request; The first calculation unit is used to obtain the at least one target molecule and the property to be calculated of the molecule from the corresponding relationship according to the ID of the service request using the calculation function, and execute a preset operation corresponding to the property to be calculated of the molecule to calculate the property of the at least one target molecule to obtain a calculation result.
11. An electronic device, It is characterized in that include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 9.
12. A storage medium having executable codes stored thereon, wherein when the executable codes are executed by a processor of an electronic device, the processor is caused to execute the method according to any one of claims 1 to 9.
