Method, device, equipment and readable storage medium for constructing artificial intelligence model
By detecting the consistency of input and output data types of algorithm components during the artificial intelligence model building process, the problem of data type errors is solved, the model building process is simplified, the learning threshold is lowered, and the accuracy and efficiency of model building are improved.
Patent Information
- Application Number
- CN202410804403.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-06-21
AI Technical Summary
In existing technologies, data type errors are prone to occur during the construction of artificial intelligence algorithm models, resulting in a high learning threshold and making it difficult to popularize them on a large scale.
By reading the attribute information of algorithm components from the algorithm library file, including the identifier, input data type, and output data type, a drag-and-drop selection service is provided in the visual interface. The drag-and-drop operation is used to determine the algorithm component, and the data type consistency is checked during connection. If they are consistent, the connection is established; otherwise, an error message is displayed to avoid data type mismatch.
It effectively avoids data type errors, simplifies the process of building artificial intelligence models, lowers the learning threshold, and improves the accuracy and efficiency of model construction.
Smart Images

Figure CN118377555B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a method, device, equipment and readable storage medium for constructing an artificial intelligence model. Background Art
[0002] The algorithm model of artificial intelligence (AI) is an important part of artificial intelligence research and application. It analyzes and models data through different algorithms, learns from the data, obtains specific structural models in the data, and uses these structures or models to predict unknown new data.
[0003] However, AI algorithm models require professional technicians to complete data processing, data analysis, model training, data prediction and other operations through code, and finally complete the algorithm model by continuously improving the accuracy of the algorithm. It contains a lot of code application, data mining technology and algorithm model knowledge, resulting in a high learning threshold for artificial intelligence technology, which is difficult to popularize on a large scale.
[0004] Although, currently, the algorithm flow can be constructed by dragging and dropping algorithm components in the interface in the form of workflow, when training models based on the algorithm flow, data type errors are prone to occur repeatedly.
[0005] In summary, how to effectively solve problems such as data management in model construction is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0006] The purpose of the present invention is to provide a method, device, equipment and readable storage medium for constructing an artificial intelligence model, which can uniformly manage and verify the data input and output of the algorithm components involved in building the model when building the model, thereby avoiding data type errors during the model training process.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] A method for constructing an artificial intelligence model, comprising:
[0009] Reading attribute information of the algorithm component from the algorithm library file; wherein the attribute information includes an identifier, an input data type, and an output data type;
[0010] Using the identifier, providing a drag and drop selection service for the algorithm component in a visual interface;
[0011] After the data set is imported into the visualization interface, in response to a drag operation, determining a selected algorithm component;
[0012] In response to the connection operation, determining a first algorithm component and a second algorithm component to be connected from the selected algorithm components;
[0013] If the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, connecting the first algorithm component and the second algorithm component;
[0014] If the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, an error prompt message indicating that the data input and output do not match is displayed;
[0015] After completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0016] Preferably, the process of obtaining the algorithm library file includes:
[0017] Componentizing the artificial intelligence algorithm to obtain the algorithm component, and storing the algorithm component in an algorithm library;
[0018] Obtaining attribute information of the algorithm component;
[0019] The attribute information is centrally recorded to obtain the algorithm library file.
[0020] Preferably, obtaining the attribute information of the algorithm component includes:
[0021] By using a network virtual table, the required input and output data types of the algorithm codes in the algorithm components under different languages and frameworks are integrated to obtain a unified data type; the data type includes a basic data type and a characteristic data type, the basic data type includes a string, a number and a floating point number, and the characteristic data type includes a characteristic value type and a characteristic vector type;
[0022] The identifier of the algorithm component, and the integrated data output type and input / output type are determined as attribute information of the algorithm component; wherein the identifier includes a name and / or an ID.
[0023] Preferably, in response to the drag operation, determining the selected algorithm component includes:
[0024] In response to the drag operation, determining the algorithm component dragged into the algorithm flow as a selected algorithm component;
[0025] Generate an algorithm component node corresponding to the selected algorithm component; wherein the algorithm component node includes a data set node, an algorithm node and a model training node, and the algorithm component node has a unique identifier;
[0026] Store the properties and parameter information of the selected algorithm component, and set the parameters and node input and output fields of the algorithm component node;
[0027] Correspondingly, after connecting the first algorithm component and the second algorithm component, the method further includes:
[0028] Displaying a connection line between a node corresponding to the first algorithm component and a node corresponding to the second algorithm component; the connection line has a connection line ID;
[0029] The identifiers of the nodes connected by the connection are stored respectively according to the connection head and the connection tail, and the connection ID is stored on the corresponding node.
[0030] Preferably, importing a data set in the visualization interface includes:
[0031] The data set is imported into the visualization interface to generate a data set node; wherein the data set node outputs corresponding data according to the imported data set.
[0032] Preferably, it also includes:
[0033] After selecting an algorithm running node on the algorithm flow, submitting the algorithm flow;
[0034] The algorithm execution node is used to execute the algorithm process and display the execution result.
[0035] Preferably, the algorithm process is run using an algorithm running node and the running result is displayed, including:
[0036] Perform algorithm model training according to the relevant input and output of each algorithm component in the algorithm process and the algorithm parameters;
[0037] According to the type of the artificial intelligence model, a model evaluation is performed using a corresponding evaluation algorithm to obtain an evaluation result;
[0038] The evaluation result is displayed.
[0039] A device for constructing an artificial intelligence model, comprising:
[0040] An information acquisition module, used to read the attribute information of the algorithm component from the algorithm library file; wherein the attribute information includes an identifier, an input data type, and an output data type;
[0041] A drag module, used to provide a drag selection service of the algorithm component in a visual interface by using the identifier;
[0042] A selection module, configured to determine a selected algorithm component in response to a drag operation after the data set is imported into the visualization interface;
[0043] a connection module, configured to, in response to a connection operation, determine, from the selected algorithm components, a first algorithm component and a second algorithm component to be connected; if the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, connect the first algorithm component with the second algorithm component; if the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, display an error prompt message indicating that the data input and output do not match;
[0044] The model determination module is used to obtain the algorithm flow of the artificial intelligence model after completing the connection between the selected algorithm components.
[0045] An electronic device, comprising:
[0046] Memory for storing computer programs;
[0047] A processor is used to implement the steps of the method for constructing the above-mentioned artificial intelligence model when executing the computer program.
[0048] A readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for constructing the above-mentioned artificial intelligence model.
[0049] Applying the method provided in the embodiment of the present invention, the attribute information of the algorithm component is read from the algorithm library file; wherein the attribute information includes an identifier, an input data type and an output data type; using the identifier, a drag and drop selection service of the algorithm component is provided in a visual interface; after the data set is imported into the visual interface, the selected algorithm component is determined in response to the drag operation; in response to the connection operation, the first algorithm component and the second algorithm component to be connected are determined from the selected algorithm components; if the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, the first algorithm component and the second algorithm component are connected; if the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, an error prompt message of data input and output mismatch is displayed; after completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0050] In the present invention, the attribute information of the algorithm component can be read through the algorithm library file, and the attribute information includes an identifier, an input data type, and an output data type. Based on the identifier of the algorithm component, the service can be selected by dragging the algorithm component in the visual interface. After the data set is imported into the visual interface, the selected algorithm component can be determined based on the drag operation. Then, based on the connection operation, the first algorithm component and the second algorithm component to be connected can be determined from the selected algorithm components. When it is necessary to connect the first algorithm component and the second algorithm component, it is necessary to detect the output data type of the first algorithm component and the input data type of the second algorithm component, that is, to detect whether the two algorithms are consistent. If they are consistent, it indicates that there is no data type problem between the first algorithm component and the second algorithm component, and the first algorithm component and the second algorithm component can be directly connected; otherwise, it indicates that there is a data type problem between the first algorithm component and the second algorithm component, and no connection is made, and an error prompt message of data input and output mismatch is displayed. After completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0051] Technical effect: When connecting algorithm components, data type matching detection is performed based on the input data type and output data type of the algorithm components, and only the algorithm components that pass the test are connected. Therefore, there will be no data type error problem within the algorithm flow of the artificial intelligence model finally constructed. It can truly and effectively simplify the construction of artificial intelligence models.
[0052] Correspondingly, the embodiments of the present invention also provide an artificial intelligence model construction device, equipment and readable storage medium corresponding to the above-mentioned artificial intelligence model construction method, which has the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] FIG1 is a flowchart of an implementation method of building an artificial intelligence model in an embodiment of the present invention;
[0055] FIG2 is a schematic diagram of the structure of a device for constructing an artificial intelligence model in an embodiment of the present invention;
[0056] FIG3 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention;
[0057] FIG. 4 is a schematic diagram of a specific structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0059] Please refer to FIG. 1 , which is a flow chart of a method for constructing an artificial intelligence model in an embodiment of the present invention. The method includes the following steps:
[0060] S101. Read attribute information of algorithm components from the algorithm library file.
[0061] The attribute information includes identification, input data type and output data type.
[0062] In this embodiment, an algorithm library may be pre-set, in which algorithm components for implementing various functions related to various artificial intelligence algorithms are stored in advance.
[0063] To facilitate the selection of algorithm components, in this embodiment, the attribute information of each algorithm component in the algorithm library is stored in the algorithm library file to avoid the problem of memory occupation caused by directly obtaining the algorithm components and the problem of algorithm component tampering.
[0064] The identifier may specifically be at least one of a unique name and a unique identifier ID.
[0065] In one embodiment of the present invention, the process of obtaining the algorithm library file includes:
[0066] Componentize the artificial intelligence algorithm to obtain algorithm components, and store the algorithm components in the algorithm library;
[0067] Get the attribute information of the algorithm component;
[0068] The attribute information is recorded centrally to obtain the algorithm library file.
[0069] For ease of description, the above steps are combined for explanation below.
[0070] In this embodiment, the artificial intelligence algorithm can be componentized to obtain various types of algorithm components, and then the algorithm components are stored in an algorithm library for backup.
[0071] Among them, the algorithm component can define the algorithm component object according to the relevant information of the artificial intelligence algorithm, and the attribute information of the algorithm component mainly includes:
[0072] Unique identifier ID: used to distinguish different algorithm components;
[0073] Component name: Named according to the algorithm type, used to distinguish algorithm components in the visual interface:
[0074] Component type: divided into data processing components, feature engineering components and model training components according to their functions. At the same time, model training components are subdivided according to the type of algorithm model (such as regression, clustering, text, etc.);
[0075] Algorithm parameters: parameter data required for the algorithm code to run;
[0076] Input data type: the data and data type required by the algorithm component;
[0077] Output data type: The data and data type output by the algorithm component.
[0078] The above attributes are used to distinguish different algorithm components, and the algorithm code is called through the corresponding calling function to complete the algorithm function. The code can be implemented in different language codes.
[0079] The attribute information of the algorithm components can be centrally recorded in the algorithm library file so that it can be displayed in the visual interface and data input and output can be verified.
[0080] In one embodiment of the present invention, obtaining attribute information of an algorithm component includes:
[0081] Using network virtual tables, the required input and output data types of algorithm codes in algorithm components under different languages and frameworks are integrated to obtain a unified data type; data types include basic data types and feature data types. Basic data types include strings, numbers, and floating-point numbers. Feature data types include feature value types and feature vector types.
[0082] The identification of the algorithm component, and the integrated data output type and input / output type are determined as the attribute information of the algorithm component; wherein the identification includes a name and / or an ID.
[0083] For ease of description, the above steps are combined for explanation below.
[0084] That is to say, different algorithm components are distinguished by algorithm attributes, and the algorithm code is called through the corresponding calling function to complete the algorithm function. The code can be implemented by codes in different languages, and the data between algorithm components is transmitted through Datatable (network virtual table) objects as carriers;
[0085] The Datatable is an abstract object that integrates and manages the required input and output data types of algorithm codes in different languages and frameworks, unifying the data types; data types can be divided into basic data types and feature data types. Among them, basic data types include commonly used string, number and floating point types; feature data types are divided into feature value type and feature vector type.
[0086] The algorithm library file is a structured data file that stores all algorithm component-related data, allowing the front-end visualization interface to obtain relevant information about the algorithm components.
[0087] In this embodiment, the algorithm used by the algorithm component can be implemented in languages such as Java, Python, and JavaScript to implement the algorithm model training process, where Python includes mainstream deep learning algorithm frameworks such as tensorflow and pytorch. Different algorithms can be used to implement different functions, including but not limited to the following functions:
[0088] 1. Analyze the imported data set to obtain the data field data type and data content distribution information;
[0089] 2. By selecting different data fields, the characteristic analysis of different data can be realized through the relevant drawing function;
[0090] 3. Preprocess the data to complete data cleaning, data conversion, data normalization, and data missing values;
[0091] 4. Perform feature engineering to complete feature extraction of data fields;
[0092] 5. Perform algorithm model training through machine learning algorithms and deep learning algorithms;
[0093] 6. Complete model prediction and evaluate the accuracy of the algorithm through the corresponding model evaluation algorithm.
[0094] S102. Using the identifier, a drag and drop selection service of the algorithm component is provided in the visual interface.
[0095] In this embodiment, based on the identification of the algorithm component, a drag and drop selection service of the algorithm component can be provided in the visualization interface. For example, the drag objects corresponding to different algorithm components are displayed in the visualization interface, and the drag objects can be specifically legends marked with the algorithm component name, ID and function.
[0096] S103 . After the data set is imported into the visualization interface, in response to the drag operation, the selected algorithm component is determined.
[0097] A data set is a data set used for training or processing of an artificial intelligence model to be constructed. In this embodiment, there is no limitation on what the data set itself involves.
[0098] In this embodiment, the specific architecture of the artificial intelligence model and the specific functions that can be achieved are not limited in this embodiment.
[0099] After the visualization interface imports the data set, the user can drag and select the displayed algorithm components. For example, a dragging block corresponding to several algorithm components is displayed in the selection area. When the user drags an algorithm component from the selection area to the selected area, the algorithm component is determined as the selected algorithm component.
[0100] In one embodiment of the present invention, importing a data set in a visualization interface includes:
[0101] Import a data set in the visual interface and generate a data set node; wherein the data set node outputs corresponding data according to the imported data set.
[0102] In this embodiment, a data set is imported into the algorithm flow, and a data set node is generated, which outputs corresponding data according to the imported data set. This allows other algorithm component nodes to input data to the node by connecting to the data set node or the node that has been connected to the data set. When there is no input data, the algorithm component node will not be able to set the node input and output fields. Therefore, it is necessary to import the data set first, then select the algorithm component, and connect the algorithm component.
[0103] It should be noted that a dataset node has no input data, and its output data is all the data in the dataset that the dataset node refers to.
[0104] S104 . In response to the connection operation, determine a first algorithm component and a second algorithm component to be connected from the selected algorithm components.
[0105] In this embodiment, the visualization interface can also be connected to the service. Specifically, in order to form a complete algorithm flow between different algorithm components, it is also necessary to connect each algorithm component. Specifically, the algorithm component needs to have input data and corresponding output data. Where the input data comes from and where the output data goes depends on the connection between the algorithm components.
[0106] In this embodiment, connection services between algorithm components can be provided. For example, configuring input and output fields for nodes corresponding to each algorithm component can be regarded as performing a connection operation; or directly establishing connections between nodes corresponding to different algorithm components.
[0107] The first algorithm component and the second algorithm component merely indicate two algorithm components that need to be connected, and the head of the connection is the first algorithm component and the tail is the second algorithm component. In addition, there is no other limiting meaning.
[0108] After determining the first algorithm node and the second algorithm node to be connected, subsequent operations need to be performed according to the algorithm matching of the output data type of the first algorithm node and the input data type of the second algorithm node. Matching can mean that the two are consistent, or adapted (such as compatible).
[0109] S105 . If the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, connect the first algorithm component and the second algorithm component.
[0110] When the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, it indicates that the data types of the first algorithm component and the second algorithm component are compatible and no data type problem will occur. Therefore, the first algorithm component and the second algorithm component can be directly connected.
[0111] S106: If the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, an error prompt message indicating that the input and output data do not match is displayed.
[0112] In the case where the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, it indicates that the data types of the first algorithm component and the second algorithm component are incompatible. If the two are forcibly connected, data type problems will arise during subsequent training or use. Therefore, in this embodiment, the first algorithm component and the second algorithm component are not connected, but an error prompt message of data input and output mismatch is output.
[0113] S107. After completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0114] Once all connections between the selected algorithm components are completed, the algorithm flow of the artificial intelligence model can be obtained.
[0115] Applying the method provided in the embodiment of the present invention, the attribute information of the algorithm component is read from the algorithm library file; wherein the attribute information includes an identifier, an input data type and an output data type; using the identifier, a drag and drop selection service of the algorithm component is provided in a visual interface; after the data set is imported into the visual interface, the selected algorithm component is determined in response to the drag operation; in response to the connection operation, the first algorithm component and the second algorithm component to be connected are determined from the selected algorithm components; if the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, the first algorithm component and the second algorithm component are connected; if the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, an error prompt message of data input and output mismatch is displayed; after completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0116] In the present invention, the attribute information of the algorithm component can be read through the algorithm library file, and the attribute information includes an identifier, an input data type, and an output data type. Based on the identifier of the algorithm component, the service can be selected by dragging the algorithm component in the visual interface. After the data set is imported into the visual interface, the selected algorithm component can be determined based on the drag operation. Then, based on the connection operation, the first algorithm component and the second algorithm component to be connected can be determined from the selected algorithm components. When it is necessary to connect the first algorithm component and the second algorithm component, it is necessary to detect the output data type of the first algorithm component and the input data type of the second algorithm component, that is, to detect whether the two algorithms are consistent. If they are consistent, it indicates that there is no data type problem between the first algorithm component and the second algorithm component, and the first algorithm component and the second algorithm component can be directly connected; otherwise, it indicates that there is a data type problem between the first algorithm component and the second algorithm component, and no connection is made, and an error prompt message of data input and output mismatch is displayed. After completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0117] Technical effect: When connecting algorithm components, data type matching detection is performed based on the input data type and output data type of the algorithm components, and only the algorithm components that pass the test are connected. Therefore, there will be no data type error problem within the algorithm flow of the artificial intelligence model finally constructed. It can truly and effectively simplify the construction of artificial intelligence models.
[0118] It should be noted that, based on the above embodiments, the embodiments of the present invention also provide corresponding improved solutions. In the preferred / improved embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be described one by one in the preferred / improved embodiments of this article.
[0119] In one embodiment of the present invention, in response to the drag operation, determining the selected algorithm component includes:
[0120] In response to the drag operation, determining the algorithm component dragged into the algorithm flow as a selected algorithm component;
[0121] Generate an algorithm component node corresponding to the selected algorithm component; wherein the algorithm component node includes a data set node, an algorithm node and a model training node, and the algorithm component node has a unique identifier;
[0122] Store the properties and parameter information of the selected algorithm component, and set the parameters and node input and output fields of the algorithm component node;
[0123] Accordingly, after connecting the first algorithm component and the second algorithm component, the method further includes:
[0124] Displaying a connection line between a node corresponding to the first algorithm component and a node corresponding to the second algorithm component; the connection line has a connection line ID;
[0125] The identifiers of the nodes connected by the connection are stored in the connection head and the connection tail respectively, and the connection ID is stored on the corresponding node.
[0126] For ease of description, the above steps are combined for explanation below.
[0127] When the algorithm component is dragged into the algorithm flow, an algorithm component node is generated at the corresponding position. In this embodiment, the nodes in the algorithm flow are divided into data set nodes, algorithm nodes, and model training nodes. Among them, the algorithm component node has a unique ID and stores the attribute and parameter information of the algorithm component dragged into it. By configuring the algorithm component node, the parameter setting of the algorithm component node and the node input and output field setting are completed.
[0128] That is, when a dataset is imported into the algorithm flow, a dataset node will be generated. This node will output the corresponding data based on the imported dataset, and other algorithm component nodes must be connected to the dataset node or to nodes that have been connected to the dataset to input data to this node. When there is no input data, the algorithm component node will not be able to set the node input and output fields.
[0129] The input and output field settings of the algorithm component node configure the input data required by the algorithm component by specifying the data field of the node input. When specifying, the selection of input data fields will be restricted according to the data type required by the algorithm component input data.
[0130] The dataset node has no input data, and its output data is all the data in the dataset that the node refers to; the output data of the algorithm node is all the input data plus the new data field output by its own algorithm component, and its input data is all the data output by the nodes connected to it; the input data of the model training node is the same as that of the algorithm node, and its output data needs to be connected to another dataset node as the prediction dataset to complete the algorithm model prediction, and then it will output all the input data plus the algorithm prediction result data field.
[0131] For example: When nodes are connected, a node connection is generated. The connection has a connection ID and stores the ID of the algorithm component node to which the connection is connected. When storing, the connection head and connection tail are stored separately. At the same time, the algorithm component node also stores the connection ID of its connection.
[0132] When nodes are connected, recursion will be performed. The connected nodes generate output data based on the input data. The algorithm component node is judged to see whether it stores the connection ID of other nodes. If so, the connection data is obtained through the connection ID and the nodes connected to the node are further obtained for data output until the final node is recursively connected to no other nodes. At the same time, when the output data of a node is set, the other nodes connected to it will be recursively updated.
[0133] When a node connection is deleted, the input data of all nodes connected to the node at the end of the connection is recursively deleted; when a node is deleted, the connection connected to the node is deleted through the connection ID stored in the node, and the input data of the node at the end of the connection is recursively deleted again.
[0134] In one embodiment of the present invention, after executing step S107, the method further includes:
[0135] After selecting the algorithm running node in the algorithm process, submit the algorithm process;
[0136] Use the algorithm run node to run the algorithm process and display the running results.
[0137] The algorithm operation node is used to run the algorithm process and display the operation results, including:
[0138] Perform algorithm model training based on the relevant input and output of each algorithm component in the algorithm process and the algorithm parameters;
[0139] According to the type of artificial intelligence model, the model is evaluated through the corresponding evaluation algorithm to obtain the evaluation results;
[0140] Displays the evaluation results.
[0141] For ease of description, the above steps are combined for explanation below.
[0142] Select the algorithm running node in the algorithm process, submit the algorithm process to the backend for relevant data processing or algorithm model training, and display the data processing results or algorithm training results on the visual interface.
[0143] That is, the algorithm model training can be completed according to the algorithm-related input and output and algorithm parameters of each part of the algorithm process, and the model evaluation can be performed through the corresponding evaluation algorithm according to the type of algorithm model.
[0144] Specifically, the algorithm model training can be completed according to the input and output of each part of the algorithm and the algorithm parameters in the algorithm process, and the model evaluation can be performed through the corresponding evaluation algorithm according to the type of the algorithm model. For example, the parameters of each part of the algorithm can be automatically adjusted, and the results after the adjustment can be evaluated separately, and all the parameter information and evaluation results after the adjustment can be returned to the front end for display.
[0145] In a specific implementation of the present invention, the algorithm process can be deployed through a cloud service cluster. After the algorithm process is completed, the algorithm is submitted to the cloud service cluster for operation. At the same time, the algorithm automatically adjusts the parameters of each part of the algorithm during operation, uploads different parameter adjustment models to the cloud service cluster, and performs algorithm training at the same time. All parameter information and evaluation results after adjustment are returned to the host server for integration, and finally returned to the front end for data display.
[0146] Corresponding to the above method embodiment, an embodiment of the present invention further provides a device for constructing an artificial intelligence model. The device for constructing an artificial intelligence model described below and the method for constructing an artificial intelligence model described above can be referenced to each other.
[0147] As shown in FIG2 , the device includes the following modules:
[0148] The information acquisition module 101 is used to read the attribute information of the algorithm component from the algorithm library file; wherein the attribute information includes an identifier, an input data type, and an output data type;
[0149] The drag module 102 is used to provide a drag selection service of the algorithm component in the visual interface by using the identifier;
[0150] A selection module 103, for determining a selected algorithm component in response to a drag operation after the data set is imported into the visualization interface;
[0151] The connection module 104 is used to determine, in response to the connection operation, a first algorithm component and a second algorithm component to be connected from the selected algorithm components; if the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, connect the first algorithm component and the second algorithm component; if the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, display an error prompt message indicating that the data input and output do not match;
[0152] The model determination module 105 is used to obtain the algorithm flow of the artificial intelligence model after completing the connection between the selected algorithm components.
[0153] The device provided by the embodiment of the present invention is used to read the attribute information of the algorithm component from the algorithm library file; wherein the attribute information includes an identifier, an input data type and an output data type; using the identifier, a drag and drop selection service of the algorithm component is provided in a visual interface; after the data set is imported into the visual interface, the selected algorithm component is determined in response to the drag operation; in response to the connection operation, the first algorithm component and the second algorithm component to be connected are determined from the selected algorithm components; if the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, the first algorithm component and the second algorithm component are connected; if the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, an error prompt message of data input and output mismatch is displayed; after completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0154] In the present invention, the attribute information of the algorithm component can be read through the algorithm library file, and the attribute information includes an identifier, an input data type, and an output data type. Based on the identifier of the algorithm component, the service can be selected by dragging the algorithm component in the visual interface. After the data set is imported into the visual interface, the selected algorithm component can be determined based on the drag operation. Then, based on the connection operation, the first algorithm component and the second algorithm component to be connected can be determined from the selected algorithm components. When it is necessary to connect the first algorithm component and the second algorithm component, it is necessary to detect the output data type of the first algorithm component and the input data type of the second algorithm component, that is, to detect whether the two algorithms are consistent. If they are consistent, it indicates that there is no data type problem between the first algorithm component and the second algorithm component, and the first algorithm component and the second algorithm component can be directly connected; otherwise, it indicates that there is a data type problem between the first algorithm component and the second algorithm component, and no connection is made, and an error prompt message of data input and output mismatch is displayed. After completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained.
[0155] Technical effect: When connecting algorithm components, data type matching detection is performed based on the input data type and output data type of the algorithm components, and only the algorithm components that pass the test are connected. Therefore, there will be no data type error problem within the algorithm flow of the artificial intelligence model finally constructed. It can truly and effectively simplify the construction of artificial intelligence models.
[0156] In a specific implementation of the present invention, the information acquisition module is specifically used to componentize the artificial intelligence algorithm, obtain the algorithm component, and store the algorithm component in the algorithm library;
[0157] Get the attribute information of the algorithm component;
[0158] The attribute information is recorded centrally to obtain the algorithm library file.
[0159] In a specific embodiment of the present invention, the information acquisition module is specifically used to integrate the required input and output data types of the algorithm code in the algorithm components under different languages and frameworks using a network virtual table to obtain a unified data type; the data type includes a basic data type and a feature data type, the basic data type includes a string, a number and a floating point number, and the feature data type includes a feature value type and a feature vector type;
[0160] The identification of the algorithm component, and the integrated data output type and input / output type are determined as the attribute information of the algorithm component; wherein the identification includes a name and / or an ID.
[0161] In a specific embodiment of the present invention, the selection module is specifically used to determine the algorithm component dragged into the algorithm flow as the selected algorithm component in response to the drag operation;
[0162] Generate an algorithm component node corresponding to the selected algorithm component; wherein the algorithm component node includes a data set node, an algorithm node and a model training node, and the algorithm component node has a unique identifier;
[0163] Store the properties and parameter information of the selected algorithm component, and set the parameters and node input and output fields of the algorithm component node;
[0164] Accordingly, it also includes:
[0165] A connection relationship storage module, used for displaying a connection line between a node corresponding to the first algorithm component and a node corresponding to the second algorithm component after connecting the first algorithm component and the second algorithm component; the connection line has a connection line ID;
[0166] The identifiers of the nodes connected by the connection are stored in the connection head and the connection tail respectively, and the connection ID is stored on the corresponding node.
[0167] In a specific implementation of the present invention, the selection module is specifically used to import a data set in a visual interface and generate a data set node; wherein the data set node outputs corresponding data according to the imported data set.
[0168] In a specific embodiment of the present invention, it also includes:
[0169] Deployment application module, which is used to submit the algorithm process after selecting the algorithm running node in the algorithm process;
[0170] Use the algorithm run node to run the algorithm process and display the running results.
[0171] In a specific embodiment of the present invention, an application module is deployed, specifically for performing algorithm model training according to the relevant input and output of each algorithm component in the algorithm flow and the algorithm parameters;
[0172] According to the type of artificial intelligence model, the model is evaluated through the corresponding evaluation algorithm to obtain the evaluation results;
[0173] Displays the evaluation results.
[0174] Corresponding to the above method embodiment, an embodiment of the present invention further provides an electronic device. The electronic device described below and the method for constructing an artificial intelligence model described above can refer to each other.
[0175] As shown in FIG3 , the electronic device includes:
[0176] A memory 332, for storing computer programs;
[0177] The processor 322 is used to implement the steps of the method for constructing the artificial intelligence model of the above method embodiment when executing the computer program.
[0178] Specifically, please refer to FIG. 4, which is a schematic diagram of the specific structure of an electronic device provided in this embodiment. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0179] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0180] The steps in the method for constructing an artificial intelligence model described above can be implemented by the structure of an electronic device.
[0181] Corresponding to the above method embodiment, an embodiment of the present invention further provides a readable storage medium. The readable storage medium described below and the method for constructing an artificial intelligence model described above can be referenced to each other.
[0182] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for constructing an artificial intelligence model of the above-mentioned method embodiment.
[0183] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0184] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0185] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0186] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0187] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0188] Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for constructing an artificial intelligence model, characterized in that: include: Reading attribute information of the algorithm component from the algorithm library file; wherein the attribute information includes an identifier, an input data type, and an output data type; Using the identifier, a drag selection service of the algorithm component is provided in a visual interface; wherein the implementation of the drag selection service includes: displaying drag objects corresponding to different algorithm components in the visual interface, wherein the drag objects are legends marked with the algorithm component name, ID and function; After the data set is imported into the visualization interface, in response to a drag operation, determining a selected algorithm component; In response to the connection operation, determining a first algorithm component and a second algorithm component to be connected from the selected algorithm components; If the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, connecting the first algorithm component and the second algorithm component; If the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, an error prompt message indicating that the data input and output do not match is displayed; After completing the connection between the selected algorithm components, the algorithm flow of the artificial intelligence model is obtained; The process of obtaining the algorithm library file includes: Componentizing the artificial intelligence algorithm to obtain the algorithm component, and storing the algorithm component in an algorithm library; Obtaining attribute information of the algorithm component; Centrally record the attribute information to obtain the algorithm library file; Wherein, obtaining the attribute information of the algorithm component includes: By using a network virtual table, the required input and output data types of the algorithm codes in the algorithm components under different languages and frameworks are integrated to obtain a unified data type; the data type includes a basic data type and a characteristic data type, the basic data type includes a string, a number and a floating point number, and the characteristic data type includes a characteristic value type and a characteristic vector type; Determine the identifier of the algorithm component, and the integrated data output type and input / output type as attribute information of the algorithm component; wherein the identifier includes a name and / or an ID; Wherein, in response to the drag operation, determining the selected algorithm component includes: In response to the drag operation, determining the algorithm component dragged into the algorithm flow as a selected algorithm component; Generate an algorithm component node corresponding to the selected algorithm component; wherein the algorithm component node includes a data set node, an algorithm node and a model training node, and the algorithm component node has a unique identifier; Store the properties and parameter information of the selected algorithm component, and set the parameters and node input and output fields of the algorithm component node; When a data set is imported into the algorithm flow, a data set node is generated. The data set node outputs corresponding data according to the imported data set. Other algorithm component nodes must be connected to the data set node or to nodes that have been connected to the data set node to input data to the node. The input and output field settings of the algorithm component nodes configure the input data required by the algorithm component by specifying the data field of the node input. When specifying, the selection of input data fields is limited according to the data type required by the algorithm component input data; A dataset node has no input data, and its output data is all the data in the dataset that the node refers to; The output data of an algorithm node is all its input data plus the new data field output by its own algorithm component, and its input data is all the data output by the nodes connected to it; The input data of the model training node is the same as that of the algorithm node. Its output data needs to be connected to another dataset node as the prediction dataset to complete the algorithm model prediction, and then output all its input data plus the algorithm prediction result data field; Correspondingly, after connecting the first algorithm component and the second algorithm component, the method further includes: Displaying a connection line between a node corresponding to the first algorithm component and a node corresponding to the second algorithm component; the connection line has a connection line ID; The identifiers of the nodes connected by the connection are stored respectively according to the connection head and the connection tail, and the connection ID is stored on the corresponding node.
2. The method according to claim 1, characterized in that Importing a data set in the visualization interface includes: The data set is imported into the visualization interface to generate a data set node; wherein the data set node outputs corresponding data according to the imported data set.
3. The method according to claim 1 or 2, characterized in that: Also includes: After selecting an algorithm running node on the algorithm flow, submitting the algorithm flow; The algorithm execution node is used to execute the algorithm process and display the execution result.
4. The method according to claim 3, characterized in that The algorithm operation node is used to run the algorithm process and display the operation results, including: Perform algorithm model training according to the relevant input and output of each algorithm component in the algorithm process and the algorithm parameters; According to the type of the artificial intelligence model, a model evaluation is performed using a corresponding evaluation algorithm to obtain an evaluation result; The evaluation result is displayed.
5. A device for constructing an artificial intelligence model, characterized in that: include: An information acquisition module, used to read the attribute information of the algorithm component from the algorithm library file; wherein the attribute information includes an identifier, an input data type, and an output data type; A drag module, used to use the identifier to provide a drag selection service of the algorithm component in a visual interface; wherein the implementation of the drag selection service includes: displaying drag objects corresponding to different algorithm components in the visual interface, wherein the drag object is a legend marked with the algorithm component name, ID and function; A selection module, configured to determine a selected algorithm component in response to a drag operation after the data set is imported into the visualization interface; a connection module, configured to, in response to a connection operation, determine, from the selected algorithm components, a first algorithm component and a second algorithm component to be connected; if the output data type of the first algorithm component is consistent with the input data type of the second algorithm component, connect the first algorithm component with the second algorithm component; if the output data type of the first algorithm component is inconsistent with the input data type of the second algorithm component, display an error prompt message indicating that the data input and output do not match; A model determination module is used to obtain the algorithm flow of the artificial intelligence model after completing the connection between the selected algorithm components; The information acquisition module is specifically used to componentize the artificial intelligence algorithm, obtain the algorithm component, and store the algorithm component in the algorithm library; obtain the attribute information of the algorithm component; and centrally record the attribute information to obtain the algorithm library file; wherein, obtaining the attribute information of the algorithm component includes: using a network virtual table to integrate the required input and output data types of the algorithm code in the algorithm component under different languages and frameworks to obtain a unified data type; the data type includes a basic data type and a feature data type, the basic data type includes a string, a number and a floating point number, and the feature data type includes a feature value type and a feature vector type; the identifier of the algorithm component, and the integrated data output type and output input type are determined as the attribute information of the algorithm component; wherein the identifier includes a name and / or an ID; Among them, the selection module is specifically used to, in response to the drag operation, determine the algorithm component dragged into the algorithm flow as the selected algorithm component; generate an algorithm component node corresponding to the selected algorithm component; wherein the algorithm component node includes a data set node, an algorithm node and a model training node, and the algorithm component node has a unique identifier; store the properties and parameter information of the selected algorithm component, and set parameters and node input and output fields for the algorithm component node; when the data set is imported into the algorithm flow, generate a data set node, and the data set node outputs corresponding data according to the imported data set, and other algorithm component nodes must be connected to the node by the data set node or the node that has been connected to the data set to input data to the node; the input and output field settings of the algorithm component node configure the input data required by the algorithm component by specifying the data field of the node input, and when specifying, according to the input data of the algorithm component The selection of input data fields is limited according to the required data type; the data set node has no input data, and its output data is all the data of the data set referred to by the node; the output data of the algorithm node is all the data of its input plus the new data field output by its own algorithm component, and its input data is all the data output by the node connected to the node; the input data of the model training node is the same as the algorithm node, and its output data needs to be connected to another data set node as the prediction data set to complete the algorithm model prediction, and then outputs all the input data plus the algorithm prediction result data field; accordingly, after connecting the first algorithm component and the second algorithm component, it also includes: displaying a connection between the node corresponding to the first algorithm component and the node corresponding to the second algorithm component; the connection has a connection ID; storing the identifier of the node connected by the connection according to the connection head and the connection tail, and storing the connection ID on the corresponding node.
6. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the method for constructing an artificial intelligence model as claimed in any one of claims 1 to 4 when executing the computer program.
7. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for constructing an artificial intelligence model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Modeling system and method for visual machine learning training model
CN107169575A
Intelligent code splicing method based on graph visualization
CN113687821A
Data stream-oriented big data processing method and device and computer equipment
CN114217785A
Construction method and device of intelligent customer service model, message processing method and device and electronic equipment
CN116466930A
Drag-based prediction model generation method, data set prediction method and device
CN116931777A
