Computation graph configuration file generation method and device and computer equipment
By configuring variable substitution and keyword type processing logic in the computation graph encoding file, a computation graph configuration file is generated, which solves the problem of low efficiency in traditional methods and realizes efficient dynamic generation of computation graphs.
Patent Information
- Application Number
- CN202411205944.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-26
AI Technical Summary
Traditional methods for generating computation graph configuration files cannot meet the dynamic generation requirements of complex computation graphs, resulting in low generation efficiency.
By obtaining each field in the computation graph encoding file, performing variable replacement for existing target variables, and configuring corresponding processing logic based on the keyword type to which the field identifier belongs, a computation graph configuration file is generated.
It improves the efficiency of generating computation graph configuration files, meets the dynamic generation requirements of different processing logics, and simplifies the hierarchical structure and condition judgment process of computation graphs.
Smart Images

Figure CN119025154A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for generating a computational graph configuration file. Background Art
[0002] In deep learning, computational graphs usually contain a large number of computing nodes and vector data. Especially in large models, the computational graph structure is complex and large in scale, making it difficult to directly express and modify it with text information. In the current traditional computational graph configuration file generation process, the process of generating the corresponding computational graph configuration file based on the computational graph encoding file cannot meet the dynamic generation requirements of complex computational graphs, resulting in low efficiency in the generation of computational graph configuration files. Summary of the invention
[0003] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for generating a computational graph configuration file, which can improve the efficiency of generating a computational graph configuration file, in order to address the above technical problems.
[0004] In a first aspect, the present application provides a method for generating a computational graph configuration file, comprising:
[0005] Get the computational graph encoding file written based on the target data format;
[0006] For each field in the computation graph encoding file, when there is a target variable in the targeted field, the target variable value is used to replace the variable for the targeted field to obtain the target field corresponding to the targeted field. The target variable value is determined based on the computation graph encoding file.
[0007] When the field identifier of the target field is a keyword, determine the keyword type to which the field identifier belongs, and perform field configuration for the target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field;
[0008] A computational graph configuration file is generated according to the configuration fields corresponding to each field in the computational graph encoding file. The computational graph configuration file is used to generate the computational graph described by the computational graph encoding file.
[0009] In one of the embodiments, the field configuration is performed on the target field according to the processing logic corresponding to the keyword type to obtain the configuration field corresponding to the targeted field, including at least one of the following: when the keyword type includes a file loading type, a specified file is determined from the computational graph encoding file, and the specified file is loaded into the target field to obtain the configuration field corresponding to the targeted field; when the keyword type includes a judgment type, a judgment is performed on the target field according to a judgment condition, and the judgment of the target field through the judgment condition is performed to obtain the configuration field corresponding to the targeted field based on the target field; when the keyword type includes a field expansion type, the field value of the target field is expanded to the upper level to obtain the configuration field corresponding to the targeted field; when the keyword type includes a loop expansion type, a loop repetition structure is generated based on the target field to obtain the configuration field corresponding to the targeted field.
[0010] In one of the embodiments, when there is a target variable in the targeted field, a variable is replaced for the targeted field by the target variable value to obtain a target field corresponding to the targeted field, including: when there is a target variable in the targeted field, a target variable value for the target variable is determined from a variable table, wherein the variable table is determined based on the computational graph encoding file; and a variable value of the target variable is replaced by the target variable value to obtain a target field corresponding to the targeted field.
[0011] In one of the embodiments, the method further includes: when at least one field of the computational graph encoding file includes a variable, determining variable definition information from the computational graph encoding file; parsing the variable definition information to obtain at least one variable value, and obtaining the variable table based on the at least one variable value.
[0012] In one of the embodiments, the method further includes: when the field identifier of the target field does not belong to a keyword, using the target field as a configuration field corresponding to the targeted field; when the target variable does not exist in the targeted field, using the targeted field as the corresponding target field.
[0013] In one of the embodiments, the method further includes: for each field in the calculation graph encoding file, performing field verification based on the targeted field to obtain a field verification result; when the field verification result indicates that the targeted field verification has passed, executing the step of replacing variables for the targeted field by the target variable value when there is a target variable in the targeted field to obtain a target field corresponding to the targeted field.
[0014] In a second aspect, the present application also provides a computational graph configuration file generating device, comprising:
[0015] The encoding file acquisition module is used to obtain the computational graph encoding file written based on the target data format;
[0016] The target field acquisition module is used to replace the target variable for each field in the computation graph encoding file by the target variable value when there is a target variable in the target field, and obtain the target field corresponding to the target field. The target variable value is determined based on the computation graph encoding file.
[0017] A configuration field acquisition module is used to determine the keyword type to which the field identifier belongs when the field identifier of the target field belongs to a keyword, and to perform field configuration for the target field according to the processing logic corresponding to the keyword type, so as to obtain a configuration field corresponding to the targeted field;
[0018] The configuration field processing module is used to generate a calculation graph configuration file according to the configuration fields corresponding to each field in the calculation graph encoding file. The calculation graph configuration file is used to generate the calculation graph described by the calculation graph encoding file.
[0019] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0020] Get the computational graph encoding file written based on the target data format;
[0021] For each field in the computation graph encoding file, when there is a target variable in the targeted field, the target variable value is used to replace the variable for the targeted field to obtain the target field corresponding to the targeted field. The target variable value is determined based on the computation graph encoding file.
[0022] When the field identifier of the target field is a keyword, determine the keyword type to which the field identifier belongs, and perform field configuration for the target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field;
[0023] A computational graph configuration file is generated according to the configuration fields corresponding to each field in the computational graph encoding file. The computational graph configuration file is used to generate the computational graph described by the computational graph encoding file.
[0024] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0025] Get the computational graph encoding file written based on the target data format;
[0026] For each field in the computation graph encoding file, when there is a target variable in the targeted field, the target variable value is used to replace the variable for the targeted field to obtain the target field corresponding to the targeted field. The target variable value is determined based on the computation graph encoding file.
[0027] When the field identifier of the target field is a keyword, determine the keyword type to which the field identifier belongs, and perform field configuration for the target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field;
[0028] A computational graph configuration file is generated according to the configuration fields corresponding to each field in the computational graph encoding file. The computational graph configuration file is used to generate the computational graph described by the computational graph encoding file.
[0029] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0030] Get the computational graph encoding file written based on the target data format;
[0031] For each field in the computation graph encoding file, when there is a target variable in the targeted field, the target variable value is used to replace the variable for the targeted field to obtain the target field corresponding to the targeted field. The target variable value is determined based on the computation graph encoding file.
[0032] When the field identifier of the target field is a keyword, determine the keyword type to which the field identifier belongs, and perform field configuration for the target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field;
[0033] A computational graph configuration file is generated according to the configuration fields corresponding to each field in the computational graph encoding file. The computational graph configuration file is used to generate the computational graph described by the computational graph encoding file.
[0034] The above-mentioned calculation graph configuration file generation method, device, computer equipment, computer-readable storage medium and computer program product, for each field in the calculation graph encoding file written based on the target data format, when there is a target variable in the targeted field, the target variable value determined based on the calculation graph encoding file is used to replace the variable for the targeted field to obtain the target field corresponding to the targeted field, when the field identifier of the target field belongs to a keyword, the field configuration is performed for the target field according to the processing logic corresponding to the keyword type to which the field identifier belongs, to obtain the configuration field corresponding to the targeted field, and according to the configuration field corresponding to each field in the calculation graph encoding file, a calculation graph configuration file for generating a calculation graph is obtained. For each field in the calculation graph encoding file, the target variable value is used to replace the variable for the field where the target variable exists to obtain the target field, and the field configuration is performed according to the processing logic corresponding to the keyword type to which the field identifier of the target field belongs, so as to generate a calculation graph configuration file according to the obtained configuration field, and the field configuration can be performed based on the variables of each field in the calculation graph encoding file and the keyword type to which the field identifier belongs, which can meet the dynamic generation requirements of different processing logics of the calculation graph, thereby improving the generation efficiency of the calculation graph configuration file. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0036] FIG1 is an application environment diagram of a method for generating a computational graph configuration file in one embodiment;
[0037] Figure 2 A schematic diagram of a flow chart of a method for generating a computational graph configuration file in one embodiment;
[0038] Figure 3 A schematic diagram of a process for obtaining a variable table in one embodiment;
[0039] Figure 4 A schematic diagram of a flow chart of a method for generating a computational graph configuration file in another embodiment;
[0040] Figure 5 It is a structural block diagram of a computing graph configuration file generating device in one embodiment;
[0041] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] The method for generating a computational graph configuration file provided in an embodiment of the present application can be applied in an application environment as shown in FIG1 . Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on a cloud or other network server. The user can write code for the computational graph through the terminal 102, and specifically can write the computational graph encoding file according to the target data format, and send the computational graph encoding file to the server 104 through the terminal 102, so that the server 104 can generate a corresponding computational graph configuration file based on the computational graph encoding file. After the server 104 receives the calculation graph encoding file sent by the terminal 102, for each field in the calculation graph encoding file, when there is a target variable in the targeted field, the server 104 replaces the variable for the targeted field by the target variable value determined based on the calculation graph encoding file, and obtains the target field corresponding to the targeted field. When the field identifier of the target field belongs to a keyword, the server 104 performs field configuration for the target field according to the processing logic corresponding to the keyword type to which the field identifier belongs, and obtains the configuration field corresponding to the targeted field. Finally, the server 104 obtains the calculation graph configuration file for generating the calculation graph according to the configuration field corresponding to each field in the calculation graph encoding file. The server 104 can send the generated calculation graph configuration file to the terminal 102, so that the terminal 102 generates the corresponding calculation graph based on the calculation graph configuration file, and renders the calculation graph to the display interface of the terminal 102 for intuitive display.
[0044] In some embodiments, the computation graph configuration file generation method may also be implemented independently by a computer device such as the terminal 102 or the server 104, that is, the terminal 102 or the server 104 generates the corresponding computation graph configuration file based on the computation graph encoding file independently.
[0045] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0046] In an exemplary embodiment, Figure 2 As shown, a method for generating a computational graph configuration file is provided, and the method is applied to a computer device such as a terminal or server in FIG. 1 as an example for description, including the following steps 202 to 208. Among them:
[0047] Step 202: Obtain a computational graph encoding file written based on the target data format.
[0048] Among them, the computation graph is a graph structure used to represent and organize the mathematical calculation process in the deep learning model. It consists of nodes and edges. Nodes represent mathematical operations (such as addition, multiplication, activation functions, etc.) or variables (such as input, weight, bias, etc.), while edges represent the flow direction of data between these operations. Usually, tensors are transferred between nodes. Solid lines indicate data transfer dependencies, and dotted lines usually indicate control dependencies (i.e., execution order). The graph structure of the computation graph can intuitively describe the entire computation process from input data through a series of layers (such as convolutional layers, activation function layers, fully connected layers, etc.) to the final output result. The computation graph configuration file is a file used to generate the computation graph. The computation graph configuration file can include the configuration information of each node in the computation graph. The computation graph configuration file can be generated based on the computation graph encoding file. The computational graph encoding file is a code file written for the computational graph, which is used to describe the corresponding computational graph. The computational graph encoding file can be written based on the target data format. The target data format can be selected according to actual needs. The target data format may include JSON (JavaScript Object Notation).
[0049] Exemplarily, the computer device can obtain a calculation graph encoding file, and the calculation graph encoding file can be written by the user according to actual needs, and specifically, the calculation graph encoding file can be written by the user according to the model to be built. The calculation graph encoding file can be written based on the target data format, and specifically can be written based on JSON. In some embodiments, the target data format may also include at least one of XML (Extensible Markup Language), CSV (Comma-Separated Values), or HCL (HashiCorp Configuration Language). By parsing and compiling the calculation graph encoding file, a calculation graph configuration file can be obtained, so that a corresponding calculation graph can be generated based on the calculation graph configuration file.
[0050] Step 204, for each field in the computation graph encoding file, when there is a target variable in the targeted field, the target variable value is used to replace the variable for the targeted field to obtain the target field corresponding to the targeted field, and the target variable value is determined based on the computation graph encoding file.
[0051] Among them, the computational graph encoding file may include multiple fields, each of which can be used to describe the computational graph, specifically describing each node and edge in the computational graph and other structural information. A variable is a container for storing data values or data references. A variable can store various types of data, such as numbers, text (strings), Boolean values (true or false), arrays, objects, etc. The specific type of the target variable can be set according to actual needs. The target variable value is the specific value that needs to be assigned to the target variable in the field. The target field is the field obtained after the variable is replaced for the target variable of the field, that is, the variable value of the target field has been replaced with the target variable value, and the target variable value is determined based on the computational graph encoding file.
[0052] Optionally, the computation graph encoding file may include at least one field, and the field may be used to describe the graph structure of the computation graph, specifically the nodes and edges of the computation graph. The computer device may traverse the various fields in the computation graph encoding file, and for each field, the computer device may detect the field to determine whether there is a target variable in the field. In a specific implementation, the target variable may be a variable of a specified type or a variable of any type. When it is determined that there is a target variable in the targeted field, it indicates that a value needs to be assigned to the target variable in the field, and the specific value to be assigned can be determined from the computation graph encoding file. Specifically, the computer device may determine the target variable value based on the computation graph encoding file, and perform variable replacement for the targeted field through the target variable value, specifically replacing the variable value of the target variable in the targeted field with the target variable value, thereby obtaining the target field after variable replacement.
[0053] In some embodiments, the computer device may determine each field in the computation graph encoding file, and perform variable replacement on the field with the target variable to obtain the corresponding target field. For the field without the target variable, it is not necessary to perform variable replacement on the field, and the computer device may directly use the field as the target field.
[0054] Step 206 , when the field identifier of the target field is a keyword, determine the keyword type to which the field identifier belongs, and perform field configuration on the target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field.
[0055] Among them, the field identifier is a string that uniquely identifies the field, which may specifically include the field name of the field, also known as the key of the field. In the JSON object, the key in the key-value pair is used to specify the name or identifier of the value, so that the corresponding value can be accessed or modified according to the key. Keywords are used to identify the processing logic for field configuration. Different keyword types may correspond to different field configuration processing logics, which may specifically include but are not limited to at least one processing logic including file loading, field judgment, field expansion or loop expansion. The configuration field is obtained by performing field configuration on the target field, and the configuration field is obtained by performing field configuration on the target field according to the processing logic corresponding to the keyword type.
[0056] Exemplarily, the computer device can determine the field identifier of the target field, the target field is obtained based on the targeted field, and the field identifier of the target field is the same as the field identifier of the targeted field, that is, the computer device can obtain the field identifier of the target field based on the field identifier of the targeted field. When the computer device determines that the field identifier of the target field belongs to a keyword, the computer device can determine the keyword type to which the field identifier belongs. The keyword type can be configured according to actual needs, such as including but not limited to at least one of a file loading type, a judgment type, a field expansion type, or a loop expansion type. The computer device can determine the processing logic corresponding to the keyword type, and perform field configuration for the target field according to the processing logic, such as loading a specified file for the target field, thereby implementing configuration processing for the field and obtaining a configuration field corresponding to the targeted field.
[0057] In some embodiments, when the computer device determines that the field identifier of the target field does not belong to a keyword, it indicates that no field configuration is required for the target field. The computer device can directly obtain the corresponding configuration field based on the target field, such as the computer device can directly use the target field as the configuration field corresponding to the targeted field.
[0058] Step 208, generating a computation graph configuration file according to the configuration fields corresponding to each field in the computation graph encoding file, where the computation graph configuration file is used to generate the computation graph described by the computation graph encoding file.
[0059] Optionally, after the computer device traverses each field in the computational graph encoding file, it can obtain the configuration fields of each field. The computer device can generate a computational graph configuration file based on each configuration field. The computational graph configuration file is used to generate a corresponding computational graph. The generated computational graph conforms to the description of the computational graph encoding file, that is, the computational graph described in the computational graph encoding file can be generated based on the computational graph configuration file. In some embodiments, the computer device can generate a computational graph based on the computational graph configuration file, and render the computational graph into a human-computer interaction interface for intuitive display.
[0060] In the above calculation graph configuration file generation method, for each field in the calculation graph encoding file written based on the target data format, when there is a target variable in the targeted field, the target variable value determined based on the calculation graph encoding file is used to replace the variable for the targeted field to obtain the target field corresponding to the targeted field. When the field identifier of the target field belongs to a keyword, the field configuration is performed for the target field according to the processing logic corresponding to the keyword type to which the field identifier belongs to obtain the configuration field corresponding to the targeted field, and the calculation graph configuration file for generating the calculation graph is obtained according to the configuration field corresponding to each field in the calculation graph encoding file. For each field in the calculation graph encoding file, the target variable value is used to replace the variable for the field where the target variable exists to obtain the target field, and the field configuration is performed according to the processing logic corresponding to the keyword type to which the field identifier of the target field belongs to generate the calculation graph configuration file according to the obtained configuration field. The field configuration can be performed based on the variables of each field in the calculation graph encoding file and the keyword type to which the field identifier belongs, which can meet the dynamic generation requirements of different processing logics of the calculation graph, thereby improving the generation efficiency of the calculation graph configuration file.
[0061] In an exemplary embodiment, field configuration is performed on the target field according to the processing logic corresponding to the keyword type to obtain the configuration field corresponding to the targeted field, including: when the keyword type includes a file loading type, determining a specified file from the computational graph encoding file, and loading the specified file into the target field to obtain the configuration field corresponding to the targeted field.
[0062] Among them, the file loading type refers to the field configuration processing logic for loading the specified file in the target field, and the specified file is determined based on the calculation graph coding file. Exemplarily, when it is determined that the keyword type includes the file loading type, such as when the field identifier includes the syntax expression of "#include", it indicates that the file needs to be loaded in the target field. The computer device can determine the specified file from the calculation graph coding file and load the specified file into the target field, thereby realizing the dynamic loading and combination of files. In some embodiments, if the specified file does not exist, the specified file cannot be loaded into the target field, and the computer device can report an error. In some embodiments, for the specified file recorded in the target field, the computer device can also use the specified file as a calculation graph coding file, that is, the computer device can also traverse each field in the specified file to obtain the respective configuration fields for each field in the specified file.
[0063] In this embodiment, for the keyword type of the file loading type, the computer device can load the specified file into the target field to obtain the configuration field corresponding to the targeted field, so as to realize dynamic loading and combination of files, which is conducive to improving the generation efficiency of the calculation graph configuration file.
[0064] In an exemplary embodiment, field configuration is performed on the target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field, including: when the keyword type includes a judgment type, a judgment is performed on the target field according to a judgment condition, and the target field is judged through the judgment condition to obtain a configuration field corresponding to the targeted field based on the target field.
[0065] Among them, the judgment type refers to the field configuration processing logic for conditional judgment on the target field, so as to determine whether the target field is retained according to whether the condition is established or not, wherein the type of the judgment condition can be set according to actual needs, such as including various judgment conditions such as variable existence and variable value comparison. Optionally, when it is determined that the keyword type includes the judgment type, such as when the field identifier includes the syntax expression of "#if", it indicates that conditional judgment needs to be performed on the target field, and the computer device can determine the judgment condition, and the judgment condition can specifically include the conditional judgment grammar. The computer device can judge the target field based on the conditional judgment grammar to obtain the conditional judgment result. When the conditional judgment result indicates that the target field passes the judgment of the judgment condition, the target field can be retained, and the configuration field corresponding to the targeted field can be obtained based on the target field. Further, the computer device can perform traversal analysis on the target field to obtain the configuration field corresponding to the targeted field. In some embodiments, when the conditional judgment result indicates that the target field does not pass the judgment of the judgment condition, the computer device can abandon the target field, and specifically delete the targeted field.
[0066] In this embodiment, for the keyword type of the judgment type, the computer device can make a judgment on the target field according to the judgment condition. When the target field passes the judgment condition, the computer device obtains the configuration field corresponding to the targeted field based on the target field, so that the field configuration can be performed on the field based on the judgment condition, which is beneficial to improving the generation efficiency of the calculation graph configuration file.
[0067] In an exemplary embodiment, field configuration is performed on the target field according to the processing logic corresponding to the keyword type to obtain the configuration field corresponding to the targeted field, including: when the keyword type includes a field expansion type, the field value of the target field is expanded to the previous level to obtain the configuration field corresponding to the targeted field.
[0068] Among them, the field expansion type refers to the field configuration processing logic for expanding the variable value of the target field. Specifically, the variable value of the target field can be expanded to the previous level, thereby promoting certain configurations to a higher level to avoid format problems caused by the same field identifier. Optionally, when it is determined that the keyword type includes the field expansion type, such as when the field identifier includes the syntax expression of "#unfold_XXX", it indicates that the target field needs to be expanded. The computer device can expand the field value of the target field to the previous level, thereby simplifying the hierarchical structure of the calculation graph and obtaining the configuration field corresponding to the targeted field.
[0069] In this embodiment, for the keyword type of the field expansion type, the computer device can expand the field value of the target field to the previous level to obtain the configuration field corresponding to the targeted field, thereby simplifying the hierarchical structure of the calculation graph and facilitating improving the generation efficiency of the calculation graph configuration file.
[0070] In an exemplary embodiment, field configuration is performed for a target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field, including: when the keyword type includes a loop expansion type, a loop repetition structure is generated based on the target field to obtain a configuration field corresponding to the targeted field.
[0071] Among them, the loop expansion type refers to the field configuration processing logic for loop expansion for the target field. Specifically, the variable of the target field can be updated, and the loop expansion can be performed to generate the fields generated by recursive traversal, so as to dynamically generate a complex loop repetition structure through variable replacement and index calculation, and obtain the configuration field corresponding to the targeted field. Exemplarily, when it is determined that the keyword type includes the loop expansion type, such as when the field identifier includes the syntax expression of "#for", it indicates that the loop expansion needs to be performed for the target field. The computer device can generate a loop repetition structure based on the target field to obtain the configuration field corresponding to the targeted field. In some embodiments, after the loop repetition structure is generated based on the target field, the computer device can perform traversal and analysis based on the generated loop repetition structure to obtain the configuration field corresponding to the targeted field.
[0072] In this embodiment, for the keyword type of loop expansion type, the computer device can generate a loop repetition structure based on the target field and obtain the configuration field corresponding to the targeted field, thereby realizing the dynamic generation of complex repetitive configurations, which is conducive to improving the generation efficiency of the computational graph configuration file.
[0073] In an exemplary embodiment, when a target variable exists in the targeted field, a variable is replaced for the targeted field by the target variable value to obtain a target field corresponding to the targeted field, including: when a target variable exists in the targeted field, a target variable value for the target variable is determined from a variable table, and the variable table is determined based on a computational graph encoding file; and a variable value of the target variable is replaced by the target variable value to obtain a target field corresponding to the targeted field.
[0074] Among them, the variable table stores the variable values corresponding to each variable defined in the calculation graph coding file, and each variable value in the variable table can be determined based on the calculation graph coding file. Exemplarily, the computer device determines whether there is a variable in the field, and specifically determines whether there is a target variable that needs to be replaced in the field. When it is determined that there is a target variable in the targeted field, the computer device can obtain the variable table determined based on the calculation graph coding file, and determine the target variable value for the target variable from the variable table, and the target variable value is used to replace the variable value of the target variable. The computer device can replace the variable value of the target variable by the target variable value, and specifically replace the variable value of the target variable with the target variable value, thereby obtaining the target field corresponding to the targeted field. In some embodiments, when the target variable existing in the targeted field is a numerical type, the computer device can perform mathematical operations based on the target variable value, and replace the variable value of the target variable by the data operation result.
[0075] In this embodiment, the computer device determines the target variable value from the variable table, and replaces the variable value of the target variable with the target variable value to obtain the target field corresponding to the targeted field. The variable replacement can be performed accurately, which is conducive to ensuring the accuracy and reliability of the calculation graph configuration file.
[0076] In an exemplary embodiment, Figure 3 As shown, the calculation graph configuration file generation method also includes a process of obtaining a variable table, specifically including steps 302 to 304. Among them:
[0077] Step 302: When at least one field of the computation graph encoding file includes a variable, variable definition information is determined from the computation graph encoding file.
[0078] The variable definition information is the information used to define variables in the computational graph encoding file, which can specifically include the "#variables" expression syntax, that is, variables are defined through the "#variables" expression syntax, and variable values are referenced through ${} in the text. The defined variables can be of any type and support mathematical operations of numerical types. Based on the variable definition information, the variable values assigned and replaced for each field can be parsed.
[0079] Exemplarily, the computer device may detect each field in the computation graph coding file to determine whether there is a field including a variable in the computation graph coding file. When there is a field including a variable in the computation graph coding file, that is, when there is at least one field including a variable in the computation graph coding file, the computer device may determine the variable definition information from the computation graph coding file. In some embodiments, the computer device may search for the expression syntax of "#variables", thereby determining the variable definition information based on the expression syntax of "#variables", and the variable definition information includes the keyword "#variables".
[0080] Step 304: parse the variable definition information to obtain at least one variable value, and obtain a variable table according to the at least one variable value.
[0081] Optionally, the computer device may parse the variable definition information to obtain at least one variable value, and the variable value obtained by the parsing is used to assign values to the variables included in each field in the computational graph encoding file, and specifically, the variables included in each field may be replaced. The computer device may construct a variable table based on the parsed variable values, so that the variable values may be stored in the variable table, so as to re-determine the target variable values corresponding to the variables in each field from the variable table.
[0082] In this embodiment, the computer device determines the variable definition information from the computational graph encoding file, and parses the variable definition information to obtain the variable value, thereby constructing a variable table, so that the variable value can be accurately determined based on the variable table, and the variable can be accurately replaced, which is conducive to ensuring the accuracy and reliability of the computational graph configuration file.
[0083] In an exemplary embodiment, the method for generating a computational graph configuration file also includes: when the field identifier of the target field does not belong to a keyword, the target field is used as the configuration field corresponding to the targeted field; when the target variable does not exist in the targeted field, the targeted field is used as the corresponding target field.
[0084] Exemplarily, when the field identifier of the target field does not belong to a keyword, it indicates that the target field does not belong to a field that needs to be processed for field configuration, and the computer device can directly retain the target field, and specifically, the target field can be directly used as the configuration field corresponding to the targeted field. Further, when there is no target variable in the targeted field, it indicates that the targeted field does not need to be processed for variable replacement, and the computer device can directly use the targeted field as the corresponding target field, thereby performing further parsing processing based on the field identifier of the target field to determine the configuration field corresponding to the targeted field.
[0085] In this embodiment, for target fields whose field identifiers do not belong to keywords, the computer device directly uses the target field as the configuration field corresponding to the targeted field. For fields that do not have target variables, the computer device can directly use the field as the corresponding target field, thereby accurately determining the configuration fields of each field, and meeting the dynamic generation requirements of different processing logics of the calculation graph, thereby improving the generation efficiency of the calculation graph configuration file.
[0086] In an exemplary embodiment, the method for generating a computational graph configuration file further includes: for each field in the computational graph encoding file, performing field verification based on the targeted field to obtain a field verification result; when the field verification result indicates that the targeted field verification has passed, executing the step of replacing variables for the targeted field by the target variable value when there is a target variable in the targeted field to obtain a target field corresponding to the targeted field.
[0087] Among them, the field verification result is the verification result obtained by verifying the fields in the calculation graph encoding file, which may specifically include various types of field verification processing such as whether the field name is repeated, whether the keyword exists, whether the variable exists, etc. Optionally, for each field in the calculation graph encoding file, the computer device can traverse each field to perform field verification, and trigger the target variable judgment and variable replacement processing when the verification is passed. In some embodiments, the computer device can perform field verification for each field in the calculation graph encoding file, which may specifically include various types of correctness verification such as whether the field name is repeated, whether the keyword exists, whether the variable exists, etc., to obtain the corresponding field verification result. When the field verification result indicates that the verification of the targeted field is passed, it can be determined that the targeted field is a valid field, and the computer device can trigger the execution when there is a target variable in the targeted field, and replace the variable for the targeted field through the target variable value to obtain the target field corresponding to the targeted field. In some embodiments, when the field verification result indicates that the verification of the targeted field fails, it indicates that the field is invalid, and the computer device can report an error.
[0088] In this embodiment, when a field in a computation graph encoding file passes field verification, a computer device triggers execution of corresponding target field determination processing, which can meet the dynamic generation requirements of different processing logics of the computation graph, thereby improving the generation efficiency of the computation graph configuration file.
[0089] The present application also provides an application scenario, which applies the above-mentioned method for generating a computational graph configuration file. Specifically, the application of the method for generating a computational graph configuration file in the application scenario is as follows:
[0090] The calculation graph configuration file generation method provided in this embodiment relates to the compilation and optimization field of deep learning models, and in particular to a dynamic calculation graph representation method based on JSON syntax. In deep learning, the calculation graph usually contains a large number of computing nodes and vector data. Especially in large models, the calculation graph structure is complex and large in scale, making it difficult to directly express and modify it with text information. At present, common calculation graph representation methods include static configuration files and hard-coding methods, but these methods show obvious limitations when facing dynamic adjustment and expansion requirements. In traditional technology, calculation graphs are usually described and stored using static configuration files (such as Protobuf) or hard-coded methods. These methods are not convenient for dynamic modification and expansion when processing large-scale deep learning models. In addition, the conditional judgment and variable replacement functions in the prior art are relatively limited and cannot meet the dynamic generation requirements of complex calculation graphs. Therefore, deep learning calculation graphs usually contain a large number of computing nodes and vector data, and static configuration files are difficult to handle the dynamic modification and expansion of large-scale calculation graphs. And the calculation graph representation method in the traditional technology lacks flexibility and is very complicated to modify when facing complex dynamic adjustment requirements. In addition, traditional conditional judgment and variable replacement functions are limited and cannot meet the dynamic generation requirements of complex computational graphs, which affects the efficiency of compilation and optimization.
[0091] To this end, this embodiment proposes a dynamic computational graph representation method based on JSON syntax, which implements dynamic generation and modification of computational graphs by defining specific JSON syntax rules, thereby improving the efficiency of compilation and optimization. The computational graph represents the structure of a neural network model, which consists of nodes (computational operations) and edges (data flows), and JSON is a lightweight data exchange format that is easy for humans to read and write, and is also easy for machines to parse and generate.
[0092] The calculation graph configuration file generation method provided in this embodiment proposes a dynamic calculation graph representation method based on JSON syntax and JSON compiler, which realizes dynamic generation and modification of calculation graphs by defining specific JSON syntax rules, thereby improving the compilation and optimization efficiency of large-scale deep learning models. The main innovations include: supporting keyword loading, variable definition and replacement, conditional judgment, field expansion, and loop expansion, making the calculation graph representation more flexible and efficient.
[0093] Specifically, the JSON syntax rules include #include, #variables, #if, #unfold_XXX, and #for. For #include, by using the "#include" keyword in the key of the JSON text, the configuration in the specified file can be loaded into the current field to achieve dynamic loading and combination of files; for #variables, it is used to define variables and reference variable values in the text through ${}. Variables can be of any type and support mathematical operations of numerical types; for #if, it is used for conditional judgment, and whether the field is retained is determined based on whether the condition is met, and it supports a variety of conditional judgment syntax; for #unfold_XXX, it is used to expand the value of the field to the previous level to simplify the hierarchical structure; for #for, it is used for loop expansion, supports list and range syntax, and generates a repeating structure.
[0094] The JSON compiler is responsible for parsing and processing the JSON text based on the above grammatical rules to generate the final computational graph configuration. The main functions and processes of the compiler are as follows:
[0095] For parsing variable definitions, the compiler first parses the #variables definition in the JSON text and stores these variables in the variable table. During the parsing process, if the variable is a numeric type, mathematical operations are supported in ${} to calculate and replace the corresponding variable value.
[0096] For traversing fields and processing keywords, the compiler traverses all fields of the JSON file. If there are variables in the field, the variable value is used to replace it. If the key of the field is a keyword, specific logical processing is performed based on the keyword.
[0097] For keyword processing logic, ${} is used to replace variables before checking whether the current field is a keyword; #include is used to load the specified file into the current file and perform recursive traversal. If the specified file does not exist, an error is reported; #if is used for conditional judgment. If the judgment is true, the field is recursively traversed. It supports multiple conditional judgment syntaxes, such as variable existence, variable value comparison, etc.; #for is used to update variables, perform loop expansion, and recursively traverse the generated fields. Through variable replacement and index calculation, complex repeated configurations can be dynamically generated; #unfold is used to expand the value of the field to the previous level and continue recursive traversal. This expansion method is suitable for situations where some configurations need to be promoted to a higher level to avoid incorrect json format due to the same name key in json; #variables is used to parse and store the variables first if the variables keyword exists at the current level. If the variable has been defined at the upper level, it will not be overwritten or replaced
[0098] For recursive parsing, the specific compiler recursively processes all fields containing keywords until all keywords are completely parsed.
[0099] For correctness checking, when parsing and processing at each stage, it is determined whether the field name is repeated, whether the keyword exists, whether the variable exists, etc. If the correctness check fails, an error is reported.
[0100] Among them, the keywords of JSON syntax rules can be expanded and adjusted according to actual needs to support more dynamic generation and modification requirements. The implementation of JSON compiler can be customized and optimized according to different application scenarios to improve the efficiency of parsing and generation.
[0101] Specifically, Figure 4 As shown, when the calculation graph configuration file is generated, the fields of the calculation graph encoding file are recursively parsed to determine whether the field includes #variables. When it is determined that #variables are included, #variables are parsed, and the variable values obtained after parsing are stored. Then, each field in the calculation graph encoding file is recursively parsed. When #variables are not included in the field, the recursive parsing field processing can be directly triggered. Determine whether there are variables in the field. When it is determined that variables are included, replace the variable value, and determine whether the field key is a keyword. If the field does not include variables, the process of determining whether the field key is a keyword is directly triggered. When the field key is not a keyword, the field is retained and the final configuration is generated. When the field key is a keyword, the keyword type can be determined. When the keyword type is #include, the specified file is loaded, and the loaded file is recursively parsed and the processing of the recursive parsing field is returned; when the keyword type is #unfold, the field is expanded and the recursive parsing processing continues; when the keyword type is #if, a conditional judgment is made to determine whether it is true. If it is true, the field is recursively parsed and the processing of the recursive parsing field is returned. If it is false, the field is deleted; when the keyword type is #for, the loop expansion is triggered after the variable update, and the fields generated by the recursive parsing are executed and the processing of the recursive parsing field is returned until the processing of all fields is traversed and the corresponding calculation graph configuration file is generated.
[0102] The calculation graph configuration file generation method provided in this embodiment can be applied to the application scenario of dynamic generation of large models. Specifically, through JSON syntax rules, the calculation graph of large-scale deep learning models can be flexibly generated and modified to meet the dynamic adjustment requirements; it can also be applied to the application scenario of model compilation and optimization. Specifically, through a unified JSON representation method, multiple models can be converted into a consistent intermediate representation, which is convenient for AI (Artificial Intelligence) compilers to optimize and convert. Among them, the AI compiler is a software tool used to compile the trained AI model into high-performance backend code to improve the reasoning performance.
[0103] The calculation graph configuration file generation method provided in this embodiment solves the problem that large-scale calculation graphs are difficult to dynamically modify and expand in traditional technologies by defining a dynamic calculation graph representation method based on JSON syntax. By supporting functions such as keyword loading, variable definition and replacement, conditional judgment, field expansion, and loop expansion, the representation of the calculation graph is made more flexible and efficient. The JSON compiler can automatically parse and generate the expected JSON structure, significantly improving the efficiency of model compilation and optimization and simplifying the complexity of development and maintenance.
[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0105] Based on the same inventive concept, the embodiment of the present application also provides a computational graph configuration file generation device for implementing the computational graph configuration file generation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the one or more computational graph configuration file generation device embodiments provided below can refer to the limitations of the computational graph configuration file generation method above, and will not be repeated here.
[0106] In an exemplary embodiment, Figure 5As shown, a computation graph configuration file generating device 500 is provided, comprising: an encoding file obtaining module 502, a target field obtaining module 504, a configuration field obtaining module 506 and a configuration field processing module 508, wherein:
[0107] The encoding file acquisition module 502 is used to obtain the computational graph encoding file written based on the target data format;
[0108] A target field obtaining module 504 is used for performing variable replacement on each field in the computation graph encoding file by using the target variable value when there is a target variable in the targeted field to obtain a target field corresponding to the targeted field, and the target variable value is determined based on the computation graph encoding file;
[0109] The configuration field obtaining module 506 is used to determine the keyword type to which the field identifier belongs when the field identifier of the target field belongs to a keyword, and to perform field configuration for the target field according to the processing logic corresponding to the keyword type, so as to obtain the configuration field corresponding to the targeted field;
[0110] The configuration field processing module 508 is used to generate a calculation graph configuration file according to the configuration fields corresponding to each field in the calculation graph encoding file. The calculation graph configuration file is used to generate the calculation graph described by the calculation graph encoding file.
[0111] In one embodiment, the configuration field acquisition module 506 is also used to determine the specified file from the calculation graph encoding file when the keyword type includes a file loading type, and load the specified file into the target field to obtain the configuration field corresponding to the targeted field.
[0112] In one embodiment, the configuration field obtaining module 506 is also used to, when the keyword type includes a judgment type, judge the target field according to the judgment condition, and obtain the configuration field corresponding to the target field based on the target field through the judgment condition.
[0113] In one embodiment, the configuration field obtaining module 506 is further used to expand the field value of the target field to the upper level to obtain the configuration field corresponding to the targeted field when the keyword type includes a field expansion type.
[0114] In one embodiment, the configuration field obtaining module 506 is further used to generate a loop repetition structure based on the target field when the keyword type includes a loop expansion type, and obtain a configuration field corresponding to the targeted field.
[0115] In one embodiment, the target field acquisition module 504 is also used to determine the target variable value for the target variable from the variable table when there is a target variable in the targeted field, and the variable table is determined based on the calculation graph encoding file; the variable value of the target variable is replaced by the target variable value to obtain the target field corresponding to the targeted field.
[0116] In one embodiment, a variable table determination module is also included, which is used to determine variable definition information from the computational graph encoding file when at least one field of the computational graph encoding file includes a variable; parse the variable definition information to obtain at least one variable value, and obtain a variable table based on the at least one variable value.
[0117] In one embodiment, the configuration field acquisition module 506 is also used to use the target field as the configuration field corresponding to the targeted field when the field identifier of the target field does not belong to a keyword; the target field acquisition module 504 is also used to use the targeted field as the corresponding target field when the target variable does not exist in the targeted field.
[0118] In one embodiment, a field verification module is also included, which is used to perform field verification on each field in the calculation graph encoding file based on the targeted field to obtain a field verification result; when the field verification result indicates that the targeted field has passed the verification, when there is a target variable in the targeted field, the step of replacing the target variable with the target variable value to obtain the target field corresponding to the targeted field is executed.
[0119] Each module in the above-mentioned computation graph configuration file generating device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0120] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 6As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store various data involved in the calculation graph configuration file generation method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a calculation graph configuration file generation method is implemented.
[0121] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0122] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0123] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0124] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0125] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0126] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0128] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating a computational graph configuration file, characterized in that: The method comprises: Get the computational graph encoding file written based on the target data format; For each field in the computation graph encoding file, when a target variable exists in the targeted field, a variable is replaced for the targeted field by the target variable value to obtain a target field corresponding to the targeted field, wherein the target variable value is determined based on the computation graph encoding file; When the field identifier of the target field belongs to a keyword, determining the keyword type to which the field identifier belongs, and performing field configuration for the target field according to the processing logic corresponding to the keyword type, to obtain a configuration field corresponding to the targeted field; A computation graph configuration file is generated according to the configuration fields corresponding to each field in the computation graph encoding file, and the computation graph configuration file is used to generate the computation graph described by the computation graph encoding file.
2. The method according to claim 1, characterized in that The performing field configuration for the target field according to the processing logic corresponding to the keyword type to obtain a configuration field corresponding to the targeted field includes at least one of the following: When the keyword type includes a file loading type, determining a specified file from the computation graph encoding file, and loading the specified file into the target field to obtain a configuration field corresponding to the targeted field; When the keyword type includes a judgment type, the target field is judged according to the judgment condition, the target field is judged by the judgment condition, and the configuration field corresponding to the targeted field is obtained based on the target field; When the keyword type includes a field expansion type, the field value of the target field is expanded to an upper level to obtain a configuration field corresponding to the targeted field; When the keyword type includes a loop expansion type, a loop repetition structure is generated based on the target field to obtain a configuration field corresponding to the targeted field.
3. The method according to claim 1, characterized in that When the target variable exists in the targeted field, performing variable replacement on the targeted field by using the target variable value to obtain the target field corresponding to the targeted field includes: When a target variable exists in the targeted field, determining a target variable value for the target variable from a variable table, wherein the variable table is determined based on the computation graph encoding file; The variable value of the target variable is replaced by the target variable value to obtain the target field corresponding to the targeted field.
4. The method according to claim 3, characterized in that The method further comprises: When at least one field of the computation graph encoding file includes a variable, determining variable definition information from the computation graph encoding file; The variable definition information is parsed to obtain at least one variable value, and the variable table is obtained according to the at least one variable value.
5. The method according to claim 1, characterized in that The method further comprises: When the field identifier of the target field does not belong to a keyword, the target field is used as a configuration field corresponding to the targeted field; When the target variable does not exist in the targeted field, the targeted field is used as the corresponding target field.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: For each field in the computation graph encoding file, performing field verification based on the field to obtain a field verification result; When the field verification result indicates that the verification of the targeted field has passed, the step of performing variable replacement for the targeted field by using the target variable value to obtain the target field corresponding to the targeted field is executed when a target variable exists in the targeted field.
7. A device for generating a computational graph configuration file, characterized in that: The device comprises: The encoding file acquisition module is used to obtain the computational graph encoding file written based on the target data format; A target field acquisition module is used for, for each field in the computation graph encoding file, when there is a target variable in the targeted field, to perform variable replacement for the targeted field by using the target variable value to obtain a target field corresponding to the targeted field, wherein the target variable value is determined based on the computation graph encoding file; A configuration field obtaining module, used for determining the keyword type to which the field identifier belongs when the field identifier of the target field belongs, and performing field configuration for the target field according to the processing logic corresponding to the keyword type, to obtain a configuration field corresponding to the targeted field; The configuration field processing module is used to generate a calculation graph configuration file according to the configuration fields corresponding to each field in the calculation graph encoding file, and the calculation graph configuration file is used to generate the calculation graph described by the calculation graph encoding file.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
