A model reasoning service system and method for self-collection of data
Through the asynchronous inference server deployment model environment and adaptive selection of model dependency library files, the problems of low efficiency and poor real-time performance of data acquisition and model inference in the existing technology are solved, and efficient and real-time data self-acquisition and inference services are realized to ensure data Consistency and reliability to meet the needs of large-scale data and high concurrent requests.
Patent Information
- Application Number
- CN202311496254.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-11-10
AI Technical Summary
The prior art has problems of low efficiency, poor real-time and data consistency in data acquisition and model inference, especially when processing multiple real-time or asynchronous interfaces and multiple database tables, which cannot meet the needs of large-scale data and high concurrent requests. .
Provide a model inference service system for self-gathering of data. It deploys the model environment through an asynchronous inference server, adaptively selects the model dependency library files, sets the asynchronous inference input interface source and database table data input, automatically determines the connection test results, and selects container resources. Quota and number of deployed nodes, perform data self-collection and asynchronous inference services.
提高了数据获取和组合的效率和准确性,支持异步数据采集和推理,增强了系统的实时性和并发性能,确保数据一致性和可靠性,具备良好的扩展性和并发处理能力,满足大规模 Data and high concurrent request requirements.
Smart Images

Figure CN117472964B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer science artificial intelligence model reasoning technology, and more specifically, to a model reasoning service system and method for self-collecting data. Background Art
[0002] At present, in the current data analysis and machine learning fields, the demand for real-time data collection and model reasoning is increasing; traditional methods have some challenges in data acquisition and combination, especially when it comes to acquiring and combining data from multiple real-time or asynchronous interfaces and multiple database tables; traditional methods usually require independent calls to each interface and queries to each database table, and then manual data combination, which may lead to the following problems: Low efficiency: In traditional methods, independent calls and queries to each interface and database table will result in high network latency and resource consumption, thereby reducing the efficiency of data collection and combination; Poor real-time performance: Due to the sequential calls and queries in traditional methods, the process of data collection and combination may take a lot of time, resulting in poor real-time performance and cannot meet the needs of instant data analysis and model reasoning; Data consistency issues: In traditional methods, due to the decentralization of the data acquisition and combination process, data consistency issues may occur, and the data between different data sources are inconsistent or incomplete, affecting the accuracy and reliability of model reasoning;
[0003] To solve these problems, existing technologies have proposed some solutions, such as using asynchronous task scheduling, message queues, parallel computing, and distributed systems to improve the efficiency of data collection and processing; however, these technologies usually only solve part of the problem and lack a comprehensive solution for multiple real-time or asynchronous interfaces and multiple database tables; therefore, it is necessary to provide a new model reasoning service for data self-collection to overcome the limitations of traditional methods; in the current field of data collection and model reasoning, there are challenges and problems that hinder the efficiency and accuracy of data processing and model reasoning; the following is an overview of some major problems: Inefficient data collection: Traditional data collection methods usually require independent calls to each interface and queries to each database table, which makes the data collection process time-consuming and inefficient; at the same time, network delays and data transmission bottlenecks will also reduce the speed and efficiency of data collection; heterogeneity of data sources: data sources in the real world are usually heterogeneous, involving multiple real-time or asynchronous interfaces and multiple database tables; the format, structure, and interface access method of the data may not be unified, making the acquisition and combination of data complicated and difficult; data consistency and integrity issues: in traditional methods, data obtained from multiple interfaces and database tables may have Consistency and integrity issues; Due to the asynchronous acquisition and combination of data, inconsistent or incomplete data between different data sources may affect the accuracy of subsequent model reasoning; Real-time requirements: With the increase in real-time data analysis and decision-making needs, the real-time requirements for data acquisition and model reasoning are also increasing; However, the serial data acquisition and processing process in traditional methods often cannot meet the real-time requirements, resulting in delays in decision-making and feedback; Scalability and concurrency: With the increase in data volume and the increase in user requests, the system needs to have good scalability and concurrent processing capabilities; The serial processing method in traditional methods limits the scalability and concurrency of the system, and cannot meet the needs of large-scale data and high concurrent requests. These issues remain to be resolved; How to obtain the post-training persistent storage model, how to choose to call the setting format specification to formulate the model basic description file, how to set the corresponding parameters of the asynchronous reasoning input interface source configuration interface, how to configure the database and interface source to be connected for asynchronous reasoning database table data input, how to perform data self-collection model deployment asynchronous reasoning service for multiple post-training persistent storage models, etc., remain to be resolved; Therefore, it is necessary to propose a data self-collection model reasoning service system and method to at least partially solve the problems existing in the prior art. Summary of the invention
[0004] A series of simplified concepts are introduced in the content of the invention, which will be further described in detail in the specific implementation method section; the content of the invention of the present invention does not mean to attempt to limit the key features and essential technical features of the technical solution claimed for protection, nor does it mean to attempt to determine the scope of protection of the technical solution claimed for protection.
[0005] In order to at least partially solve the above problems, the present invention provides a model reasoning service system for self-collection of data, comprising:
[0006] The persistent model creation subsystem deploys the model environment scenario according to the asynchronous inference server, adaptively selects the model dependency library files that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training; selects the call setting format specification according to the inference task, and formulates the model basic description file according to the setting format specification;
[0007] Asynchronous reasoning interface data input subsystem, setting asynchronous reasoning input interface source, configuring corresponding interface parameters, and performing asynchronous reasoning interface data input;
[0008] The asynchronous reasoning database table data input subsystem configures the database and interface source to be connected, and performs a connection test after entering the database connection information; automatically determines the connection test result and performs asynchronous reasoning database table data input;
[0009] The quota deployment asynchronous reasoning subsystem selects the container resource quota where multiple trained persistent storage models are located and the number of deployment nodes for each model based on the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, determines whether there are duplicate data fields, and deploys asynchronous reasoning services for data self-collection models.
[0010] Preferably, the persistent model creation subsystem includes:
[0011] The host network determination subsystem determines whether the service host is connected to the external network and obtains the determination information of the service host being connected to the external network;
[0012] The persistent model creates a storage subsystem, determines the information about the service host connecting to the external network, deploys the model environment scenario according to the asynchronous inference server, adaptively selects the model dependency library files that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training;
[0013] The model description file formulation subsystem stores the model persistently after training, selects and calls the set format specification according to the reasoning task, and formulates the basic model description file according to the set format specification.
[0014] Preferably, the asynchronous reasoning interface data input subsystem includes:
[0015] The asynchronous reasoning input interface source subsystem sets the asynchronous reasoning input interface source according to the basic description file of the model; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction;
[0016] The interface corresponding parameter configuration subsystem obtains the interface corresponding parameters according to the asynchronous reasoning input interface source and the model interface requirements; configures the interface corresponding parameters; the interface corresponding parameters include: interface request parameters, interface request header and interface identity authentication credentials; among which, identity authentication determines whether input is required based on the interface requirements, and when the interface requires identity authentication, the identity authentication information is input in the form of interface parameters;
[0017] The asynchronous reasoning interface data subsystem configures the corresponding interface parameters and performs asynchronous reasoning interface data input. When the system receives the interface message input by the user in the parsing setting, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list. The permission logic of the interface source is consistent with the permission logic of the database, and the interactive operations are consistent.
[0018] Execute the backend data splicing logic steps, obtain data from the real-time interface, obtain data from the database, and obtain data from the asynchronous data acquisition platform, and send requests to the model prediction platform to merge and preprocess the data, and execute the model deployment asynchronous inference service;
[0019] Acquiring data from the real-time interface includes: building a request: the application uses an HTTP request library or framework to build an HTTP request containing task parameters and request parameters; sending a request: sending the built HTTP request to the URL of the real-time interface, while waiting for the response of the interface; waiting for a response: the application waits for the response of the real-time interface, and the response of the real-time interface includes an immediate HTTP response, which contains the required data; receiving a response: when receiving the response of the real-time interface, the application parses the response and extracts the required data; data processing: performing data processing on the acquired data; extracting the required fields and adding the data to the intermediate data structure;
[0020] Acquiring data from a database includes: connecting to a database: the application uses a database connection library to establish a connection with the target database and provide connection information; the connection information includes: database server address and credentials; building a query: building an SQL query based on task parameters and request parameters to retrieve database data; the query information includes: selection table information, condition information, sorting information, and projection information; executing a query: the application uses a database connection to execute the constructed query; obtaining a query result data set: when the query is completed, the application obtains a query result data set from the database connection, and the query result data set includes data rows; data processing: converting the query result data set into a data structure to be inferred;
[0021] Acquiring data from the asynchronous data acquisition platform and sending a request to the model prediction platform includes: sending an asynchronous request to the asynchronous data acquisition platform: the application constructs an asynchronous request containing task parameters and sends it to the URL of the asynchronous data acquisition platform; the asynchronous request contains the information required to obtain data; the information required to obtain data includes: data source identifier and request parameters; the asynchronous data acquisition platform processes the request: after receiving the request, the asynchronous data acquisition platform starts a background task to obtain data; waiting for data acquisition to be completed: the application waits for notification or callback from the asynchronous data acquisition platform to determine whether the data acquisition task has been completed; obtaining data acquisition results: when the data acquisition task is completed, the asynchronous data acquisition platform triggers a notification mechanism to notify the application that the task has been completed and returns the data acquisition results; building a request to the model prediction platform: the application uses the data acquisition result to build a request containing data and sends the request containing data to the URL of the model prediction platform; processing the request through the model prediction platform: after receiving the request, the model prediction platform starts processing the data, extracts the required fields, and adds the data to the intermediate data structure; processing data includes: parsing JSON or XML responses.
[0022] Preferably, the asynchronous reasoning database table data input subsystem includes:
[0023] The database and interface source test subsystem configures the database and interface source to be connected, and performs a connection test after entering the database connection information;
[0024] The connection test automatic determination subsystem automatically determines the connection test result and performs asynchronous reasoning database table data input; automatically determining the connection test result and performing asynchronous reasoning database table data input include: automatically determining the connection test result. If the connection test result fails, the database and interface source to be connected are reconfigured; if the connection test is successful, the data acquisition logic starts to run normally; and asynchronous reasoning database table data is input.
[0025] Preferably, the quota deployment asynchronous reasoning subsystem includes:
[0026] The traffic allocation resource quota subsystem sets the traffic allocation method between multiple post-training persistent storage models based on the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, and selects the container resource quotas for multiple post-training persistent storage models;
[0027] The node number deployment parameter mapping subsystem selects the number of deployment nodes for each model; selects asynchronous reasoning interface data input and asynchronous reasoning database table data input according to the data source; sets parameter mapping for asynchronous reasoning interface data input and asynchronous reasoning database table data input to obtain corresponding data through primary keys, and selects whether to output parameters in the results;
[0028] Collect and deploy the asynchronous reasoning subsystem, select the required data in the output card, and determine whether there are duplicate data fields; if there are no duplicate data fields, directly perform model reasoning output; if there are duplicate data fields, select one of the data fields as the final output of model reasoning; perform data self-collection model deployment asynchronous reasoning service;
[0029] Traffic distribution methods include: random distribution by probability or specified distribution according to interface request header information; resource quotas of the container where the asynchronous model is located include: number of CPU cores and memory usage.
[0030] The present invention provides a model reasoning service method for self-collection of data, comprising:
[0031] S100, according to the asynchronous reasoning server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, perform persistent storage after model training, and obtain the persistent storage model after training; select and call the setting format specification according to the reasoning task, and formulate the model basic description file according to the setting format specification;
[0032] S200, setting the asynchronous reasoning input interface source, configuring the corresponding interface parameters, and performing asynchronous reasoning interface data input;
[0033] S300, configuring the database and interface source to be connected, and performing a connection test after inputting the database connection information; automatically determining the connection test result, and performing asynchronous reasoning database table data input;
[0034] S400, according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, selects the container resource quota where multiple trained persistent storage models are located and the number of deployment nodes for each model, determines whether there are repeated data fields, and performs data self-collection model deployment asynchronous reasoning service.
[0035] Preferably, S100 includes:
[0036] S101, determining whether the service host is connected to an external network, and obtaining determination information of the service host being connected to the external network;
[0037] S102, according to the service host machine connection external network determination information, according to the asynchronous inference server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, perform persistent storage after model training, and obtain the persistent storage model after training;
[0038] S103, based on the trained persistent storage model, select and call the set format specification according to the reasoning task, and formulate the model basic description file according to the set format specification.
[0039] Preferably, S200 includes:
[0040] S201, according to the basic description file of the model, set the asynchronous reasoning input interface source; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction;
[0041] S202, according to the asynchronous reasoning input interface source and the model interface requirements, obtain the corresponding interface parameters; configure the corresponding interface parameters; the corresponding interface parameters include: interface request parameters, interface request header and interface identity authentication credentials; wherein, the identity authentication determines whether it needs to be input according to the interface requirements, and when the interface requires identity authentication, the identity authentication information is input in the form of interface parameters;
[0042] S203, configure the corresponding parameters of the interface and input the asynchronous reasoning interface data; when the system receives the interface message input by the user in the parsing setting, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list; the permission logic of the interface source is consistent with the permission logic of the database, and the interactive operation is consistent;
[0043] Execute the backend data splicing logic steps, obtain data from the real-time interface, obtain data from the database, and obtain data from the asynchronous data acquisition platform, and send requests to the model prediction platform to merge and preprocess the data, and execute the model deployment asynchronous inference service;
[0044] Acquiring data from the real-time interface includes: building a request: the application uses an HTTP request library or framework to build an HTTP request containing task parameters and request parameters; sending a request: sending the built HTTP request to the URL of the real-time interface, while waiting for the response of the interface; waiting for a response: the application waits for the response of the real-time interface, and the response of the real-time interface includes an immediate HTTP response, which contains the required data; receiving a response: when receiving the response of the real-time interface, the application parses the response and extracts the required data; data processing: performing data processing on the acquired data; extracting the required fields and adding the data to the intermediate data structure;
[0045] Acquiring data from a database includes: connecting to a database: the application uses a database connection library to establish a connection with the target database and provide connection information; the connection information includes: database server address and credentials; building a query: building an SQL query based on task parameters and request parameters to retrieve database data; the query information includes: selection table information, condition information, sorting information, and projection information; executing a query: the application uses a database connection to execute the constructed query; obtaining a query result data set: when the query is completed, the application obtains a query result data set from the database connection, and the query result data set includes data rows; data processing: converting the query result data set into a data structure to be inferred;
[0046] Acquiring data from the asynchronous data acquisition platform and sending a request to the model prediction platform includes: sending an asynchronous request to the asynchronous data acquisition platform: the application constructs an asynchronous request containing task parameters and sends it to the URL of the asynchronous data acquisition platform; the asynchronous request contains the information required to obtain data; the information required to obtain data includes: data source identifier and request parameters; the asynchronous data acquisition platform processes the request: after receiving the request, the asynchronous data acquisition platform starts a background task to obtain data; waiting for data acquisition to be completed: the application waits for notification or callback from the asynchronous data acquisition platform to determine whether the data acquisition task has been completed; obtaining data acquisition results: when the data acquisition task is completed, the asynchronous data acquisition platform triggers a notification mechanism to notify the application that the task has been completed and returns the data acquisition results; building a request to the model prediction platform: the application uses the data acquisition result to build a request containing data and sends the request containing data to the URL of the model prediction platform; processing the request through the model prediction platform: after receiving the request, the model prediction platform starts processing the data, extracts the required fields, and adds the data to the intermediate data structure; processing data includes: parsing JSON or XML responses.
[0047] Preferably, S300 includes:
[0048] S301, configure the database and interface source to be accessed, and perform a connection test after entering the database connection information;
[0049] S302, automatically determine the connection test result, and perform asynchronous reasoning database table data input; automatically determine the connection test result, and perform asynchronous reasoning database table data input, including: automatically determine the connection test result, if the connection test result fails, reconfigure the database and interface source to be connected; if the connection test is successful, the data acquisition logic starts to run normally; perform asynchronous reasoning database table data input.
[0050] Preferably, S400 includes:
[0051] S401, according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, set the traffic distribution method between multiple trained persistent storage models, and select the container resource quota where the multiple trained persistent storage models are located;
[0052] S402, select the number of deployment nodes for each model; select asynchronous reasoning interface data input and asynchronous reasoning database table data input according to the data source; set parameter mapping for the asynchronous reasoning interface data input and the asynchronous reasoning database table data input to obtain corresponding data through the primary key, and select whether to output the parameters in the result;
[0053] S403, select the required data in the output card and determine whether there are repeated data fields; if there are no repeated data fields, directly perform model inference output; if there are repeated data fields, select one of the data fields as the final output of model inference; perform data self-collection model deployment asynchronous inference service;
[0054] Traffic distribution methods include: random distribution by probability or specified distribution according to interface request header information; resource quotas of the container where the asynchronous model is located include: number of CPU cores and memory usage.
[0055] Compared with the prior art, the present invention has at least the following beneficial effects:
[0056] The present invention provides a model reasoning service system and method for self-collection of data, including: a persistent model creation subsystem, which deploys the model environment scenario according to the asynchronous reasoning server, adaptively selects the model dependency library file that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training; selects and calls the setting format specification according to the reasoning task, and formulates the model basic description file according to the setting format specification; an asynchronous reasoning interface data input subsystem, which sets the asynchronous reasoning input interface source, configures the corresponding parameters of the interface, and performs asynchronous reasoning interface data input; an asynchronous reasoning database table data input subsystem, which configures the database and interface source to be connected, and performs a connection test after inputting the database connection information; automatically determines the connection test result, and performs Asynchronous reasoning database table data input; quota deployment asynchronous reasoning subsystem, according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, select the container resource quota where multiple trained persistent storage models are located and the number of deployment nodes for each model, determine whether there are repeated data fields, and perform data self-collection model deployment asynchronous reasoning service; the present invention can perform data self-collection and combination: the present invention innovatively obtains and combines data from multiple real-time or asynchronous interfaces and data from multiple database tables asynchronously; it solves the problem that data acquisition and combination in traditional methods usually require independent calls to each interface and queries to each database table and then manual data combination; the present invention greatly improves the efficiency of data acquisition through automated data collection and combination processes and accuracy; processing data from different data sources at the same time, overcoming the problem of data source heterogeneity in traditional methods; the present invention can perform asynchronous reasoning: the present invention not only supports asynchronous data collection and combination, but also introduces asynchronous model reasoning capabilities; overcoming the problem that model reasoning in traditional methods is usually performed synchronously, that is, waiting for data acquisition and combination to be completed before reasoning; the present invention can process multiple reasoning tasks concurrently by making the data collection, combination and reasoning processes asynchronous, thereby improving the real-time and concurrent performance of the system; enabling the system to process model reasoning tasks more efficiently in high-load and large-scale data scenarios; the present invention can perform unified interface access and data processing: the present invention realizes the Unified access and data processing of different interfaces and database tables; interface adapters are responsible for processing the differences of different interfaces and converting them into unified data formats and input parameters; data standardization ensures that data obtained from different data sources can be consistently processed by the system; this unified interface access and data processing method simplifies the complexity of the system and greatly improves the consistency and reliability of data; the present invention can perform data preprocessing and optimization: after data collection, the data preprocessing module is used to clean, convert and optimize the data to meet the input requirements of the model; data preprocessing can include data cleaning, missing value processing and feature engineering; it helps to improve the accuracy and efficiency of model reasoning, so that the system can better utilize the original data obtained from the data source;The present invention supports large-scale processing and high-concurrency processing, has good scalability and concurrent processing capabilities, and can process large-scale data and high-concurrency requests; through the use of parallel computing and distributed systems, it can efficiently process multiple asynchronous data acquisition and reasoning tasks; it can meet the needs of large-scale data processing and high-concurrency requests, and maintain efficient and stable performance; the present invention supports asynchronous calls to multiple real-time or asynchronous interfaces, and simultaneously obtains data from multiple database tables and combines them into input data; by adopting asynchronous task management and message proxy mechanisms, and using parallel computing and distributed systems, it can improve and maintain data consistency and integrity, and can achieve efficient data acquisition and real-time reasoning. ;
[0057] The model reasoning service system and method for self-data collection described in the present invention, other advantages, objectives and features of the present invention will be reflected in part through the following description, and in part will be understood by technical personnel in the field through research and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0059] Figure 1 This is a diagram of an implementation scheme of a model reasoning service system for self-data collection described in the present invention.
[0060] Figure 2 This is a diagram of an implementation example of a subsystem of a model reasoning service system for self-data collection described in the present invention.
[0061] Figure 3 This is a diagram of an embodiment of an interface of a model reasoning service system for self-data collection described in the present invention. DETAILED DESCRIPTION
[0062] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments so that those skilled in the art can implement the invention according to the instructions. Figure 1-Figure 3 As shown, the present invention provides a model reasoning service system for self-collection of data, comprising:
[0063] The persistent model creation subsystem deploys the model environment scenario according to the asynchronous inference server, adaptively selects the model dependency library files that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training; selects the call setting format specification according to the inference task, and formulates the model basic description file according to the setting format specification;
[0064] Asynchronous reasoning interface data input subsystem, setting asynchronous reasoning input interface source, configuring corresponding interface parameters, and performing asynchronous reasoning interface data input;
[0065] The asynchronous reasoning database table data input subsystem configures the database and interface source to be connected, and performs a connection test after entering the database connection information; automatically determines the connection test result and performs asynchronous reasoning database table data input;
[0066] The quota deployment asynchronous reasoning subsystem selects the container resource quota where multiple trained persistent storage models are located and the number of deployment nodes for each model based on the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, determines whether there are duplicate data fields, and deploys asynchronous reasoning services for data self-collection models.
[0067] The principle and effect of the above technical solution are as follows: the present invention provides a model reasoning service system for self-collection of data, including: a persistent model creation subsystem, which adaptively selects the model dependency library file that the system can identify according to the asynchronous reasoning server deployment model environment scenario, performs persistent storage after model training, and obtains the persistent storage model after training; selects the call setting format specification according to the reasoning task, and formulates the model basic description file according to the set format specification; an asynchronous reasoning interface data input subsystem, which sets the asynchronous reasoning input interface source, configures the corresponding parameters of the interface, and performs asynchronous reasoning interface data input; an asynchronous reasoning database table data input subsystem, which configures the database and interface source to be connected, and performs a connection test after entering the database connection information; automatically determines the connection test result, and performs asynchronous reasoning database table data input; a quota deployment asynchronous reasoning subsystem, which selects the container resource quota where multiple persistent storage models are located after training and the number of deployment nodes of each model according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, determines whether there are repeated data fields, and performs data self-collection model deployment asynchronous reasoning service;
[0068] Add model asynchronous reasoning service to the ME model application layer; the business system layer sends the id to the ME model application layer; the ME model application layer returns the model reasoning serial number to the business system layer; the ME model application layer sends the id to the interface; the interface returns the data serial number; after the data processing is completed, the data serial number and the processed data are returned to the ME model application layer; after receiving the processed data, the ME model application layer performs reasoning; after the reasoning is completed, the reasoning serial number and reasoning result are returned to the business system layer; the efficiency of multi-model asynchronous reasoning is greatly improved;
[0069] The data self-collection model deployment asynchronous inference service includes: executing the back-end data splicing logic steps, obtaining data from the real-time interface, obtaining data from the database, and obtaining data from the asynchronous data acquisition platform, and sending requests to the model prediction platform, performing data merging and preprocessing, and executing the model deployment asynchronous inference service;
[0070] Acquiring data from the real-time interface includes: building a request: the application uses an HTTP request library or framework to build an HTTP request containing task parameters and request parameters; sending a request: sending the built HTTP request to the URL of the real-time interface, while waiting for the response of the interface; waiting for a response: the application waits for the response of the real-time interface, and the response of the real-time interface includes an immediate HTTP response, which contains the required data; receiving a response: when receiving the response of the real-time interface, the application parses the response and extracts the required data; data processing: performing data processing on the acquired data; extracting the required fields and adding the data to the intermediate data structure;
[0071] Acquiring data from a database includes: connecting to a database: the application uses a database connection library to establish a connection with the target database and provide connection information; the connection information includes: database server address and credentials; building a query: building an SQL query based on task parameters and request parameters to retrieve database data; the query information includes: selection table information, condition information, sorting information, and projection information; executing a query: the application uses a database connection to execute the built query; obtaining a query result dataset: when the query is completed, the application queries the result dataset from the database connection to obtain the query result dataset, which includes data rows; data processing: querying the result dataset converts the query result dataset into a data structure to be inferred;
[0072] Acquiring data from the asynchronous data acquisition platform and sending a request to the model prediction platform includes: sending an asynchronous request to the asynchronous data acquisition platform: the application constructs an asynchronous request containing task parameters and sends it to the URL of the asynchronous data acquisition platform; the asynchronous request contains the information required to obtain data; the information required to obtain data includes: data source identifier and request parameters; the asynchronous data acquisition platform processes the request: after receiving the request, the asynchronous data acquisition platform starts a background task to obtain data; waiting for data acquisition to be completed: the application waits for notification or callback from the asynchronous data acquisition platform to determine whether the data acquisition task has been completed; obtaining data acquisition results: when the data acquisition task is completed, the asynchronous data acquisition platform triggers a notification mechanism to notify the application that the task has been completed and returns the data acquisition result; building a request to the model prediction platform: the application uses the data acquisition result to build a request containing data and sends the request containing data to the URL of the model prediction platform; processing the request through the model prediction platform: after receiving the request, the model prediction platform starts processing the data, extracts the required fields, and adds the data to the intermediate data structure; processing data includes: parsing JSON or XML responses;
[0073] The present invention can perform self-collection and combination of data: the present invention innovatively acquires and combines data from multiple real-time or asynchronous interfaces and data from multiple database tables asynchronously; it solves the problem that data acquisition and combination in traditional methods usually require independent calling of each interface and query of each database table and then manual data combination; the present invention greatly improves the efficiency and accuracy of data acquisition through automated data acquisition and combination processes; it simultaneously processes data from different data sources, overcoming the problem of heterogeneity of data sources in traditional methods; the present invention can perform asynchronous reasoning: the present invention not only supports asynchronous data acquisition and combination, but also introduces asynchronous model reasoning capabilities; it overcomes the problem that model reasoning in traditional methods is usually performed synchronously, that is, reasoning is performed only after data acquisition and combination are completed; the present invention asynchronously processes data acquisition, combination and reasoning processes, and can concurrently process multiple reasoning tasks, thereby improving the real-time and concurrent performance of the system; it enables the system to process model reasoning tasks more efficiently in high-load and large-scale data scenarios; the present invention can perform unified interface access and data processing: the present invention realizes unified access and data processing of different interfaces and database tables through interface adapters and data standardization; the interface adapter is responsible for processing the differences between different interfaces and converting them into a unified data format formula and input parameters; data standardization ensures that data obtained from different data sources can be processed by the system consistently; this unified interface access and data processing method simplifies the complexity of the system and greatly improves the consistency and reliability of data; the present invention can perform data preprocessing and optimization: after data collection, the data is cleaned, converted and optimized through the data preprocessing module to meet the input requirements of the model; data preprocessing may include data cleaning, missing value processing and feature engineering; it helps to improve the accuracy and efficiency of model reasoning, so that the system can better utilize the original data obtained from the data source; the present invention supports large-scale processing and high-concurrency processing, has good scalability and concurrent processing capabilities, and can handle large-scale data and high-concurrency requests; through the use of parallel computing and distributed systems, it can efficiently process multiple asynchronous data collection and reasoning tasks; it can meet the needs of large-scale data processing and high-concurrency requests, and maintain efficient and stable performance; the present invention supports asynchronous calls to multiple real-time or asynchronous interfaces, and simultaneously obtains data from multiple database tables and combines them into model input data; by adopting asynchronous task management and message proxy mechanisms, and using parallel computing and distributed systems, it can improve and maintain data consistency and integrity, and can achieve efficient data collection and real-time reasoning.
[0074] In one embodiment, the persistence model creation subsystem includes:
[0075] The host network determination subsystem determines whether the service host is connected to the external network and obtains the determination information of the service host being connected to the external network;
[0076] The persistent model creates a storage subsystem, determines the information about the service host connecting to the external network, deploys the model environment scenario according to the asynchronous inference server, adaptively selects the model dependency library files that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training;
[0077] The model description file formulation subsystem, based on the persistent storage model after training, selects and calls the set format specification according to the inference task, and formulates the model basic description file according to the set format specification;
[0078] According to the judgment information of the service host machine connecting to the external network, according to the asynchronous inference server deployment model environment scenario, the model dependency library file that the system can identify is adaptively selected to perform persistent storage after model training. The acquisition of the persistent storage model after training includes: when the service host machine is connected to the external network, the judgment information is that the external network is connected, the training persistent storage model is obtained by applying for push from the upstream model management platform; when the service host machine is connected to the external network, the external network is not connected, and the training persistent storage model is obtained by automatically reading the model dependency library file and uploading it; the training persistent storage model includes: machine learning library training model or end-to-end custom model; the basic model description file includes: model algorithm type, model file name, serialization mode, model dependency third-party library information, model output variable information and model output variable information.
[0079] The principle and effect of the above technical solution are as follows: using the persistent model to create a host network determination subsystem, determine whether the service host is connected to the external network, and obtain the determination information of the service host connecting to the external network; the persistent model creates a storage subsystem, based on the determination information of the service host connecting to the external network, according to the asynchronous inference server deployment model environment scenario, adaptively selects the model dependency library file that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training; the model description file formulation subsystem, based on the persistent storage model after training, selects the call setting format specification according to the inference task, and formulates the model basic description file according to the setting format specification; based on the determination information of the service host connecting to the external network, according to the asynchronous inference server deployment model environment scenario, the system automatically selects the model dependency library file that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training; the model description file formulation subsystem, based on the persistent storage model after training, selects the call setting format specification according to the inference task, and formulates the model basic description file according to the set format specification; based on the determination information of the service host connecting to the external network, according to the asynchronous inference server deployment model environment scenario, the system automatically selects the model dependency library file that the system can identify, and performs persistent storage after training, according to the asynchronous inference server deployment model environment scenario, the system automatically selects the model dependency library file that the system can identify ... Adaptively select the model dependency library files that the system can identify, and perform persistent storage after model training. Obtaining the persistent storage model after training includes: when the service host is connected to the external network and the judgment information is that the external network is connected, the persistent storage model after training is obtained by applying for push from the upstream model management platform; when the service host is connected to the external network and the judgment information is that the external network is not connected, the persistent storage model after training is obtained by automatically reading the model dependency library file and uploading it; the persistent storage model after training includes: machine learning library training model or full end-to-end custom model; the basic model description file includes: model algorithm type, model file name, serialization mode, model dependency third-party library information, model output variable information and model output variable information; greatly improves the efficiency and accuracy of data acquisition.
[0080] In one embodiment, the asynchronous reasoning interface data input subsystem includes:
[0081] The asynchronous reasoning input interface source subsystem sets the asynchronous reasoning input interface source according to the basic description file of the model; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction;
[0082] The interface corresponding parameter configuration subsystem obtains the interface corresponding parameters according to the asynchronous reasoning input interface source and the model interface requirements; configures the interface corresponding parameters; the interface corresponding parameters include: interface request parameters, interface request header and interface identity authentication credentials; among which, identity authentication determines whether input is required based on the interface requirements, and when the interface requires identity authentication, the identity authentication information is input in the form of interface parameters;
[0083] The asynchronous reasoning interface data subsystem configures the corresponding interface parameters and performs asynchronous reasoning interface data input; when the system receives the interface message entered by the user in the parsing settings, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list; the permission logic of the interface source is consistent with the permission logic of the database, and the interactive operations are consistent.
[0084] The principle and effect of the above technical solution are: using asynchronous reasoning interface data input, asynchronous reasoning input interface source subsystem, according to the model basic description file, set the asynchronous reasoning input interface source; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction; the interface corresponding parameter configuration subsystem, according to the asynchronous reasoning input interface source and model interface requirements, obtains the interface corresponding parameters; configures the interface corresponding parameters; interface The corresponding parameters include: interface request parameters, interface request header and interface authentication credentials; among them, authentication is determined based on the interface requirements to determine whether input is required. When the interface requires authentication, the authentication information is entered in the form of interface parameters; the asynchronous reasoning interface data subsystem configures the corresponding interface parameters and performs asynchronous reasoning interface data input; when the system receives the interface message entered by the user in the parsing settings, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list; the permission logic of the interface source is consistent with the permission logic of the database, and the interactive operations are consistent; it can meet the needs of large-scale data processing and high-concurrency requests, and maintain efficient and stable performance.
[0085] In one embodiment, the asynchronous reasoning database table data input subsystem includes:
[0086] The database and interface source test subsystem configures the database and interface source to be connected, and performs a connection test after entering the database connection information;
[0087] The connection test automatic determination subsystem automatically determines the connection test result and performs asynchronous reasoning database table data input; automatically determining the connection test result and performing asynchronous reasoning database table data input include: automatically determining the connection test result. If the connection test result fails, the database and interface source to be connected are reconfigured; if the connection test is successful, the data acquisition logic starts to run normally; and asynchronous reasoning database table data is input.
[0088] The principle and effect of the above technical solution are: using asynchronous reasoning database table data input, the database and interface source testing subsystem is used to configure the database and interface source to be connected, and a connection test is performed after the database connection information is input; the connection test automatic determination subsystem automatically determines the connection test result, and performs asynchronous reasoning database table data input; automatically determines the connection test result, and performs asynchronous reasoning database table data input, including: automatically determining the connection test result, if the connection test result fails, reconfigure the database and interface source to be connected; if the connection test is successful, the data acquisition logic starts to run normally; perform asynchronous reasoning database table data input; can support asynchronous calls to multiple real-time or asynchronous interfaces, and obtain data from multiple database tables at the same time, and combine them into model input data.
[0089] In one embodiment, the quota deployment asynchronous reasoning subsystem includes:
[0090] The traffic allocation resource quota subsystem sets the traffic allocation method between multiple post-training persistent storage models based on the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, and selects the container resource quotas for multiple post-training persistent storage models;
[0091] The node number deployment parameter mapping subsystem selects the number of deployment nodes for each model; selects asynchronous reasoning interface data input and asynchronous reasoning database table data input according to the data source; sets parameter mapping for asynchronous reasoning interface data input and asynchronous reasoning database table data input to obtain corresponding data through primary keys, and selects whether to output parameters in the results;
[0092] Collect and deploy the asynchronous reasoning subsystem, select the required data in the output card, and determine whether there are duplicate data fields; if there are no duplicate data fields, directly perform model reasoning output; if there are duplicate data fields, select one of the data fields as the final output of model reasoning; perform data self-collection model deployment asynchronous reasoning service;
[0093] Traffic distribution methods include: random distribution by probability or specified distribution according to interface request header information; resource quotas of the container where the asynchronous model is located include: number of CPU cores and memory usage.
[0094] The principle and effect of the above technical solution are: using quota to deploy asynchronous reasoning, traffic allocation resource quota subsystem, according to the asynchronous reasoning interface data input and asynchronous reasoning database table data input, set the traffic allocation method between multiple post-training persistent storage models, and select the container resource quota where multiple post-training persistent storage models are located; node number deployment parameter mapping subsystem, select the number of deployment nodes for each model; select asynchronous reasoning interface data input and asynchronous reasoning database table data input according to the data source; set parameter mapping for asynchronous reasoning interface data input and asynchronous reasoning database table data input to obtain corresponding data through primary key, and choose whether to output parameters in the result; collect and deploy asynchronous reasoning subsystem, select required data in the output card, and determine whether there are repeated data fields; when there are no repeated data fields, directly perform model reasoning output; when there are repeated data fields, select one of the data fields as the final output of model reasoning; perform data self-collection model deployment asynchronous reasoning service; traffic allocation method includes: random allocation according to probability or specified allocation according to interface request header information; resource quota of the container where the asynchronous model is located includes: number of CPU cores and memory usage; it can improve and maintain data consistency and integrity, and can achieve efficient data collection and real-time reasoning.
[0095] The present invention provides a model reasoning service method for self-collection of data, comprising:
[0096] S100, according to the asynchronous reasoning server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, perform persistent storage after model training, and obtain the persistent storage model after training; select and call the setting format specification according to the reasoning task, and formulate the model basic description file according to the setting format specification;
[0097] S200, setting the asynchronous reasoning input interface source, configuring the corresponding interface parameters, and performing asynchronous reasoning interface data input;
[0098] S300, configuring the database and interface source to be connected, and performing a connection test after inputting the database connection information; automatically determining the connection test result, and performing asynchronous reasoning database table data input;
[0099] S400, according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, selects the container resource quota where multiple trained persistent storage models are located and the number of deployment nodes for each model, determines whether there are repeated data fields, and performs data self-collection model deployment asynchronous reasoning service.
[0100] The principle and effect of the above technical solution are as follows: the present invention provides a model reasoning service method for self-collection of data, including: according to the model environment scenario of the asynchronous reasoning server deployment, adaptively selecting the model dependency library file that the system can identify, performing persistent storage after model training, and obtaining the persistent storage model after training; selecting the call setting format specification according to the reasoning task, and formulating the basic description file of the model according to the set format specification; setting the asynchronous reasoning input interface source, configuring the corresponding parameters of the interface, and performing asynchronous reasoning interface data input; configuring the database and interface source to be accessed, and performing a connection test after entering the database connection information; automatically determining the connection test result, and performing asynchronous reasoning database table data input; according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, selecting the container resource quota where multiple persistent storage models are located after training and the number of deployment nodes for each model, determining whether there are repeated data fields, and performing data self-collection model deployment asynchronous reasoning service;
[0101] Add model asynchronous reasoning service to the ME model application layer; the business system layer sends the id to the ME model application layer; the ME model application layer returns the model reasoning serial number to the business system layer; the ME model application layer sends the id to the interface; the interface returns the data serial number; after the data processing is completed, the data serial number and the processed data are returned to the ME model application layer; after receiving the processed data, the ME model application layer performs reasoning; after the reasoning is completed, the reasoning serial number and reasoning result are returned to the business system layer; the efficiency of multi-model asynchronous reasoning is greatly improved;
[0102] The data self-collection model deployment asynchronous inference service includes: executing the back-end data splicing logic steps, obtaining data from the real-time interface, obtaining data from the database, and obtaining data from the asynchronous data acquisition platform, and sending requests to the model prediction platform, performing data merging and preprocessing, and executing the model deployment asynchronous inference service;
[0103] Acquiring data from the real-time interface includes: building a request: the application uses an HTTP request library or framework to build an HTTP request containing task parameters and request parameters; sending a request: sending the built HTTP request to the URL of the real-time interface, while waiting for the response of the interface; waiting for a response: the application waits for the response of the real-time interface, and the response of the real-time interface includes an immediate HTTP response, which contains the required data; receiving a response: when receiving the response of the real-time interface, the application parses the response and extracts the required data; data processing: performing data processing on the acquired data; extracting the required fields and adding the data to the intermediate data structure;
[0104] Acquiring data from a database includes: connecting to a database: the application uses a database connection library to establish a connection with the target database and provide connection information; the connection information includes: database server address and credentials; building a query: building an SQL query based on task parameters and request parameters to retrieve database data; the query information includes: selection table information, condition information, sorting information, and projection information; executing a query: the application uses a database connection to execute the built query; obtaining a query result dataset: when the query is completed, the application queries the result dataset from the database connection to obtain the query result dataset, which includes data rows; data processing: querying the result dataset converts the query result dataset into a data structure to be inferred;
[0105] Acquiring data from the asynchronous data acquisition platform and sending a request to the model prediction platform includes: sending an asynchronous request to the asynchronous data acquisition platform: the application constructs an asynchronous request containing task parameters and sends it to the URL of the asynchronous data acquisition platform; the asynchronous request contains the information required to obtain data; the information required to obtain data includes: data source identifier and request parameters; the asynchronous data acquisition platform processes the request: after receiving the request, the asynchronous data acquisition platform starts a background task to obtain data; waiting for data acquisition to be completed: the application waits for notification or callback from the asynchronous data acquisition platform to determine whether the data acquisition task has been completed; obtaining data acquisition results: when the data acquisition task is completed, the asynchronous data acquisition platform triggers a notification mechanism to notify the application that the task has been completed and returns the data acquisition result; building a request to the model prediction platform: the application uses the data acquisition result to build a request containing data and sends the request containing data to the URL of the model prediction platform; processing the request through the model prediction platform: after receiving the request, the model prediction platform starts processing the data, extracts the required fields, and adds the data to the intermediate data structure; processing data includes: parsing JSON or XML responses;
[0106] The present invention can perform self-collection and combination of data: the present invention innovatively acquires and combines data from multiple real-time or asynchronous interfaces and data from multiple database tables asynchronously; it solves the problem that data acquisition and combination in traditional methods usually require independent calling of each interface and query of each database table and then manual data combination; the present invention greatly improves the efficiency and accuracy of data acquisition through automated data acquisition and combination processes; it simultaneously processes data from different data sources, overcoming the problem of heterogeneity of data sources in traditional methods; the present invention can perform asynchronous reasoning: the present invention not only supports asynchronous data acquisition and combination, but also introduces asynchronous model reasoning capabilities; it overcomes the problem that model reasoning in traditional methods is usually performed synchronously, that is, reasoning is performed only after data acquisition and combination are completed; the present invention asynchronously processes data acquisition, combination and reasoning processes, and can process multiple reasoning tasks concurrently, thereby improving the real-time and concurrent performance of the system; it enables the system to process model reasoning tasks more efficiently in high-load and large-scale data scenarios; the present invention can perform unified interface access and data processing: the present invention realizes unified access and data processing of different interfaces and database tables through interface adapters and data standardization; the interface adapter is responsible for processing the differences between different interfaces, converting them into a unified data format and Input parameters; data standardization ensures that data obtained from different data sources can be processed by the system consistently; this unified interface access and data processing method simplifies the complexity of the system and greatly improves the consistency and reliability of the data; the present invention can perform data preprocessing and optimization: after data collection, the data is cleaned, converted and optimized through the data preprocessing module to meet the input requirements of the model; data preprocessing may include data cleaning, missing value processing and feature engineering; it helps to improve the accuracy and efficiency of model reasoning, so that the system can better utilize the original data obtained from the data source; the present invention supports large-scale processing and high-concurrency processing, has good scalability and concurrent processing capabilities, and can process large-scale data and high-concurrency requests; through the use of parallel computing and distributed systems, it can efficiently process multiple asynchronous data collection and reasoning tasks; it can meet the needs of large-scale data processing and high-concurrency requests, and maintain efficient and stable performance; the present invention supports asynchronous calls to multiple real-time or asynchronous interfaces, and simultaneously obtains data from multiple database tables and combines them into model input data; by adopting asynchronous task management and message proxy mechanisms, and utilizing parallel computing and distributed systems, the present invention can improve and maintain data consistency and integrity, and can achieve efficient data collection and real-time reasoning.
[0107] In one embodiment, S100 includes:
[0108] S101, determining whether the service host is connected to an external network, and obtaining determination information of the service host being connected to the external network;
[0109] S102, according to the service host machine connection external network determination information, according to the asynchronous inference server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, perform persistent storage after model training, and obtain the persistent storage model after training;
[0110] S103, according to the trained persistent storage model, select and call the set format specification according to the reasoning task, and formulate the model basic description file according to the set format specification;
[0111] According to the judgment information of the service host machine connecting to the external network, according to the asynchronous inference server deployment model environment scenario, the model dependency library file that the system can identify is adaptively selected to perform persistent storage after model training. The acquisition of the persistent storage model after training includes: when the service host machine is connected to the external network, the judgment information is that the external network is connected, the training persistent storage model is obtained by applying for push from the upstream model management platform; when the service host machine is connected to the external network, the external network is not connected, and the training persistent storage model is obtained by automatically reading the model dependency library file and uploading it; the training persistent storage model includes: machine learning library training model or end-to-end custom model; the basic model description file includes: model algorithm type, model file name, serialization mode, model dependency third-party library information, model output variable information and model output variable information.
[0112] The principle and effect of the above technical solution are as follows: determine whether the service host is connected to the external network, and obtain the judgment information of the service host being connected to the external network; according to the judgment information of the service host being connected to the external network, according to the asynchronous inference server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, perform persistent storage after model training, and obtain the trained persistent storage model; according to the trained persistent storage model, select the call setting format specification according to the inference task, and formulate the model basic description file according to the setting format specification; according to the judgment information of the service host being connected to the external network, according to the asynchronous inference server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, and perform model training. Post-training persistent storage, obtaining the post-training persistent storage model includes: when the service host is connected to the external network and the judgment information is that the external network is connected, the post-training persistent storage model is obtained by applying for the upstream model management platform to push; when the service host is connected to the external network and the judgment information is that the external network is not connected, the post-training persistent storage model is obtained by automatically reading the model dependency library file and uploading it; the post-training persistent storage model includes: machine learning library training model or full end-to-end custom model; the model basic description file includes: model algorithm type, model file name, serialization mode, model dependency third-party library information, model output variable information and model output variable information; greatly improves the efficiency and accuracy of data acquisition.
[0113] In one embodiment, S200 includes:
[0114] S201, according to the basic description file of the model, set the asynchronous reasoning input interface source; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction;
[0115] S202, according to the asynchronous reasoning input interface source and the model interface requirements, obtain the corresponding interface parameters; configure the corresponding interface parameters; the corresponding interface parameters include: interface request parameters, interface request header and interface identity authentication credentials; wherein, the identity authentication determines whether it needs to be input according to the interface requirements, and when the interface requires identity authentication, the identity authentication information is input in the form of interface parameters;
[0116] S203, configure the corresponding parameters of the interface and input the asynchronous reasoning interface data; when the system receives the interface message entered by the user in the parsing setting, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list; the permission logic of the interface source is consistent with the permission logic of the database, and the interactive operations are consistent.
[0117] The principle and effect of the above technical solution are as follows: according to the basic description file of the model, the asynchronous reasoning input interface source is set; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction; according to the asynchronous reasoning input interface source and the model interface requirements, the corresponding parameters of the interface are obtained; the corresponding parameters of the interface are configured; the corresponding parameters of the interface include: interface request parameters, interface request header and interface identity authentication credentials; wherein, the identity authentication determines whether input is required based on the interface requirements, and when the interface requires identity authentication, the identity authentication information is input in the form of interface parameters;
[0118] Configure the corresponding parameters of the interface and input the asynchronous reasoning interface data; when the system receives the interface message entered by the user in the parsing settings, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list; the permission logic of the interface source is consistent with the permission logic of the database, and the interactive operations are consistent; it can meet the needs of large-scale data processing and high-concurrency requests, and maintain efficient and stable performance.
[0119] In one embodiment, S300 includes:
[0120] S301, configure the database and interface source to be accessed, and perform a connection test after entering the database connection information;
[0121] S302, automatically determine the connection test result, and perform asynchronous reasoning database table data input; automatically determine the connection test result, and perform asynchronous reasoning database table data input, including: automatically determine the connection test result, if the connection test result fails, reconfigure the database and interface source to be connected; if the connection test is successful, the data acquisition logic starts to run normally; perform asynchronous reasoning database table data input.
[0122] The principle and effect of the above technical solution are: configure the database and interface source to be accessed, and perform a connection test after entering the database connection information; automatically determine the connection test result, and perform asynchronous reasoning database table data input; automatically determine the connection test result, and perform asynchronous reasoning database table data input, including: automatically determine the connection test result, if the connection test result fails, reconfigure the database and interface source to be accessed; if the connection test is successful, the data acquisition logic starts to run normally; perform asynchronous reasoning database table data input; can support asynchronous calls to multiple real-time or asynchronous interfaces, and obtain data from multiple database tables at the same time, and combine them into model input data.
[0123] In one embodiment, S400 includes:
[0124] S401, according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, set the traffic distribution method between multiple trained persistent storage models, and select the container resource quota where the multiple trained persistent storage models are located;
[0125] S402, select the number of deployment nodes for each model; select asynchronous reasoning interface data input and asynchronous reasoning database table data input according to the data source; set parameter mapping for the asynchronous reasoning interface data input and the asynchronous reasoning database table data input to obtain corresponding data through the primary key, and select whether to output the parameters in the result;
[0126] S403, select the required data in the output card and determine whether there are repeated data fields; if there are no repeated data fields, directly perform model inference output; if there are repeated data fields, select one of the data fields as the final output of model inference; perform data self-collection model deployment asynchronous inference service;
[0127] Traffic distribution methods include: random distribution by probability or specified distribution according to interface request header information; resource quotas of the container where the asynchronous model is located include: number of CPU cores and memory usage.
[0128] The principle and effect of the above technical solution are: according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, set the traffic distribution method between multiple post-training persistent storage models, and select the container resource quota where the multiple post-training persistent storage models are located; select the number of deployment nodes for each model; select the asynchronous reasoning interface data input and the asynchronous reasoning database table data input according to the data source; set parameter mapping for the asynchronous reasoning interface data input and the asynchronous reasoning database table data input to obtain the corresponding data through the primary key, and choose whether to output the parameters in the result; select the required data in the output card to determine whether there are repeated data fields; when there are no repeated data fields, directly perform model reasoning output; when there are repeated data fields, select one of the data fields as the final output of model reasoning; deploy asynchronous reasoning service for data self-collection model; traffic distribution methods include: random distribution by probability or specified distribution according to interface request header information; resource quotas of the container where the asynchronous model is located include: number of CPU cores and memory usage; it can improve and maintain data consistency and integrity, and can achieve efficient data collection and real-time reasoning.
[0129] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.
Claims
1. A model inference service system with self-collected data, It is characterized in that include: The persistent model creation subsystem deploys the model environment scenario according to the asynchronous inference server, adaptively selects the model dependency library files that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training; selects the call setting format specification according to the inference task, and formulates the model basic description file according to the setting format specification; Asynchronous reasoning interface data input subsystem, set asynchronous reasoning input interface source, configure corresponding interface parameters, and input asynchronous reasoning interface data of the model; The asynchronous reasoning database table data input subsystem configures the database and interface source to be connected, and performs a connection test after entering the database connection information; automatically determines the connection test result, and performs asynchronous reasoning database table data input for the model; The quota deployment asynchronous reasoning subsystem selects the resource quota of the container where multiple trained persistent storage models are located and the number of deployment nodes for each model based on the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, determines whether there are duplicate data fields, and performs data self-collection model deployment asynchronous reasoning service; The asynchronous reasoning interface data input subsystem includes: The asynchronous reasoning input interface source subsystem sets the asynchronous reasoning input interface source according to the basic description file of the model; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction; The interface corresponding parameter configuration subsystem obtains the interface corresponding parameters according to the asynchronous reasoning input interface source and the model interface requirements; configures the interface corresponding parameters; the interface corresponding parameters include: interface request parameters, interface request header and interface authentication credentials; The asynchronous reasoning interface data subsystem configures the corresponding interface parameters and performs asynchronous reasoning interface data input. When the system receives the interface message input by the user in the parsing setting, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list. The permission logic of the interface source is consistent with the permission logic of the database, and the interactive operations are consistent. Execute the backend data splicing logic steps, obtain data from the real-time interface, obtain data from the database, and obtain data from the asynchronous data acquisition platform, and send requests to the model prediction platform to merge and preprocess the data, and execute the model deployment asynchronous inference service; Obtaining data from a real-time interface includes: building a request; sending a request while waiting for a response from the interface; waiting for a response; receiving a response; the application parses the response and extracts the required data; data processing: performing data processing on the acquired data; extracting the required fields and adding the data to an intermediate data structure; Acquiring data from a database includes: connecting to the database; building a query; executing the query; obtaining a query result data set; data processing: converting the query result data set data into a data structure to be inferred; Obtaining data from the asynchronous data acquisition platform and sending a request to the model prediction platform includes: sending an asynchronous request to the asynchronous data acquisition platform; the asynchronous data acquisition platform processes the request; waiting for data acquisition to be completed; obtaining the data acquisition result; constructing a request to the model prediction platform; processing the request through the model prediction platform, after the model prediction platform receives the request, it starts processing the data, extracts the required fields, and adds the data to the intermediate data structure; processing the data includes: parsing the JSON or XML response; The quota deployment asynchronous reasoning subsystem includes: The traffic allocation resource quota subsystem sets the traffic allocation method between multiple post-training persistent storage models based on the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, and selects the container resource quotas for multiple post-training persistent storage models; The node number deployment parameter mapping subsystem selects the number of deployment nodes for each model; selects asynchronous reasoning interface data input and asynchronous reasoning database table data input according to the data source; sets parameter mapping for asynchronous reasoning interface data input and asynchronous reasoning database table data input to obtain corresponding data through primary keys, and selects whether to output parameters in the results; Collect and deploy the asynchronous reasoning subsystem, select the required data in the output card, and determine whether there are duplicate data fields; when there are no duplicate data fields, directly perform model reasoning output; when there are duplicate data fields, select one of the data fields as the final output of model reasoning; perform data self-collection model deployment asynchronous reasoning service; traffic distribution methods include: random distribution by probability or specified distribution according to interface request header information; resource quotas of the container where the asynchronous model is located include: number of CPU cores and memory usage.
2. A model reasoning service system for self-collection of data according to claim 1, It is characterized in that The persistence model creation subsystem includes: The host network determination subsystem determines whether the service host is connected to the external network and obtains the determination information of the service host being connected to the external network; The persistent model creates a storage subsystem, determines the information about the service host connecting to the external network, deploys the model environment scenario according to the asynchronous inference server, adaptively selects the model dependency library files that the system can identify, performs persistent storage after model training, and obtains the persistent storage model after training; The model description file formulation subsystem stores the model persistently after training, selects and calls the set format specification according to the reasoning task, and formulates the basic model description file according to the set format specification.
3. A model reasoning service system for self-collection of data according to claim 1, It is characterized in that The asynchronous reasoning database table data input subsystem includes: The database and interface source test subsystem configures the database and interface source to be connected, and performs a connection test after entering the database connection information; The connection test automatic determination subsystem automatically determines the connection test result and performs asynchronous reasoning database table data input; automatically determining the connection test result and performing asynchronous reasoning database table data input include: automatically determining the connection test result. If the connection test result fails, the database and interface source to be connected are reconfigured; if the connection test is successful, the data acquisition logic starts to run normally; and asynchronous reasoning database table data is input.
4. A model reasoning service method for self-collection of data, It is characterized in that include: S100, according to the asynchronous reasoning server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, perform persistent storage after model training, and obtain the persistent storage model after training; select and call the setting format specification according to the reasoning task, and formulate the model basic description file according to the setting format specification; S200, setting the asynchronous reasoning input interface source, configuring the corresponding interface parameters, and performing asynchronous reasoning interface data input; S300, configuring the database and interface source to be connected, and performing a connection test after inputting the database connection information; automatically determining the connection test result, and performing asynchronous reasoning database table data input; S400, according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, select the container resource quota where multiple trained persistent storage models are located and the number of deployment nodes for each model, determine whether there are repeated data fields, and perform data self-collection model deployment asynchronous reasoning service; S200 includes: S201, according to the basic description file of the model, set the asynchronous reasoning input interface source; the asynchronous reasoning input interface source includes: real-time interface and asynchronous interface; setting the asynchronous reasoning input interface source includes: for the real-time interface, providing the data demo returned by the synchronous interface for system platform analysis; for the asynchronous interface, providing the data demo returned by the asynchronous interface for system platform analysis, adding an ID column, and specifying the ID column for the reasoning service to determine the data direction; S202, according to the asynchronous reasoning input interface source and the model interface requirements, obtain interface corresponding parameters; configure interface corresponding parameters; the interface corresponding parameters include: interface request parameters, interface request header and interface identity authentication credentials; S203, configure the corresponding parameters of the interface and input the asynchronous reasoning interface data; when the system receives the interface message input by the user in the parsing setting, the system will directly parse all the messages and list the fields that the user needs to delete and modify in the data structure list; the permission logic of the interface source is consistent with the permission logic of the database, and the interactive operation is consistent; Execute the backend data splicing logic steps, obtain data from the real-time interface, obtain data from the database, and obtain data from the asynchronous data acquisition platform, and send requests to the model prediction platform to merge and preprocess the data, and execute the model deployment asynchronous inference service; Obtaining data from a real-time interface includes: building a request; sending a request while waiting for a response from the interface; waiting for a response; receiving a response; the application parses the response and extracts the required data; data processing: performing data processing on the acquired data; extracting the required fields and adding the data to an intermediate data structure; Acquiring data from a database includes: connecting to the database; building a query; executing the query; obtaining a query result data set; data processing: converting the query result data set data into a data structure to be inferred; Obtaining data from the asynchronous data acquisition platform and sending a request to the model prediction platform includes: sending an asynchronous request to the asynchronous data acquisition platform; the asynchronous data acquisition platform processes the request; waiting for data acquisition to be completed; obtaining the data acquisition result; constructing a request to the model prediction platform; processing the request through the model prediction platform, after the model prediction platform receives the request, it starts processing the data, extracts the required fields, and adds the data to the intermediate data structure; processing the data includes: parsing the JSON or XML response; S400 includes: S401, according to the asynchronous reasoning interface data input and the asynchronous reasoning database table data input, set the traffic distribution method between multiple trained persistent storage models, and select the container resource quota where the multiple trained persistent storage models are located; S402, select the number of deployment nodes for each model; select asynchronous reasoning interface data input and asynchronous reasoning database table data input according to the data source; set parameter mapping for the asynchronous reasoning interface data input and the asynchronous reasoning database table data input to obtain corresponding data through the primary key, and select whether to output the parameters in the result; S403, select the required data in the output card and determine whether there are repeated data fields; when there are no repeated data fields, directly perform model inference output; when there are repeated data fields, select one of the data fields as the final output of model inference; deploy asynchronous inference service for data self-collection model; traffic distribution methods include: random distribution by probability or specified distribution according to interface request header information; resource quotas of the container where the asynchronous model is located include: number of CPU cores and memory usage.
5. According to the data self-collection model reasoning service method of claim 4, It is characterized in that S100 includes: S101, determining whether the service host is connected to an external network, and obtaining determination information of the service host being connected to the external network; S102, according to the service host machine connection external network determination information, according to the asynchronous inference server deployment model environment scenario, adaptively select the model dependency library file that the system can identify, perform persistent storage after model training, and obtain the persistent storage model after training; S103, based on the trained persistent storage model, select and call the set format specification according to the reasoning task, and formulate the model basic description file according to the set format specification.
6. A model reasoning service method for self-collection of data according to claim 4, It is characterized in that S300 includes: S301, configure the database and interface source to be accessed, and perform a connection test after entering the database connection information; S302, automatically determine the connection test result, and perform asynchronous reasoning database table data input; automatically determine the connection test result, and perform asynchronous reasoning database table data input, including: automatically determine the connection test result, if the connection test result fails, reconfigure the database and interface source to be connected; if the connection test is successful, the data acquisition logic starts to run normally; perform asynchronous reasoning database table data input.
