Code generation method and device, equipment and medium

By adjusting the code text using an abstract syntax tree, the problems of low code generation efficiency and high error rate in existing technologies are solved, achieving efficient and accurate automated code generation.

CN119597262APending Publication Date: 2025-03-11BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411436003.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Existing code generation methods are inefficient, have low code reuse rates, and are prone to errors due to changes in code location caused by manual modifications. They also require repeated execution of the generation steps, resulting in high costs.

Method used

By modifying and updating the code text through an abstract syntax tree, and adjusting the abstract syntax tree using target node identifiers and parameters, the target code text is generated, avoiding direct modification of the lines, columns, and placeholders of the code text and reducing repetitive operations.

Benefits of technology

It improves the efficiency and accuracy of code generation, reduces code generation costs, and enables dynamic updates and automated code generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597262A_ABST
    Figure CN119597262A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a code generation method and device, equipment and a medium, and the method comprises the steps: responding to a code generation instruction, and analyzing the code generation instruction to obtain a code text identifier, a target node identifier and a target parameter; obtaining an initial abstract syntax tree corresponding to the code text identifier; traversing the initial abstract syntax tree, determining a target node corresponding to the target node identifier, and adjusting the target node according to the target parameter to obtain a target abstract syntax tree; and converting the target abstract syntax tree into a target code text based on a preset compiling tool. According to the embodiment of the invention, code modification and other updating operations are performed on the code text based on the abstract syntax tree, code dynamic updating is realized, and the automatic generation efficiency of codes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a code generation method, device, equipment and medium. Background Art

[0002] Currently, the main methods of generating code include creating templates, injecting code into the templates through text replacement, and manually modifying the code text according to business needs and other tuning operations.

[0003] In actual applications, code generation is an iterative process. It is necessary to execute the above code generation steps multiple times, which will cause the previously optimized code text to be overwritten, and multiple code texts obtained by repeated execution need to be directly merged to obtain the final code text. Since the code positions such as rows and columns of the text code change during the manual modification process, the code text based on row merging may also have errors. There is a technical problem that the code reuse rate is relatively low during the code generation process, resulting in low code generation efficiency. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a code generation method, apparatus, device and medium.

[0005] The present disclosure provides a code generation method, comprising: in response to a code generation instruction, parsing the code generation instruction to obtain a code text identifier, a target node identifier and a target parameter; wherein the target node identifier is used to identify a node in an abstract syntax tree, and the target parameter is used to adjust the node corresponding to the target node identifier; obtaining an initial abstract syntax tree corresponding to the code text identifier; wherein the initial abstract syntax tree includes at least one node, each of which represents a data structure in the initial code text; traversing the initial abstract syntax tree, determining a target node corresponding to the target node identifier, and adjusting the target node according to the target parameter to obtain a target abstract syntax tree; and converting the target abstract syntax tree into a target code text based on a preset compilation tool.

[0006] Optionally, the target parameters include a target data structure and an adjustment identifier corresponding to the target node, the adjustment identifier is used to indicate an adjustment to the target node, and the target node is adjusted according to the target parameters to obtain a target abstract syntax tree, including: obtaining an initial data structure corresponding to the target node; adjusting the initial data structure based on the target data structure according to the adjustment identifier to obtain the target abstract syntax tree.

[0007] Optionally, the initial data structure is adjusted based on the target data structure according to the adjustment identifier to obtain the target abstract syntax tree, including: updating the initial data structure at the target node to the target data structure to obtain the target abstract syntax tree; and / or taking the target node as the parent node and generating a child node connected to the target node, and taking the target data structure as the data structure corresponding to the child node to obtain the target abstract syntax tree.

[0008] Optionally, the method further includes: in response to a code deletion instruction, parsing the code deletion instruction to obtain a node identifier to be deleted; traversing the initial abstract syntax tree or the target abstract syntax tree to determine the node to be deleted corresponding to the node identifier to be deleted; when the node to be deleted is a child node, deleting the node to be deleted and the node information at the node to be deleted; when the node to be deleted is a parent node and not a root node, deleting the node to be deleted and the node information of the node to be deleted, and connecting the parent node and one or more child nodes of the node to be deleted; when the node to be deleted is a root node, deleting the node to be deleted and the node information of the node to be deleted, and when the node to be deleted has one child node, the child node of the node to be deleted is used as the root node, and when the node to be deleted has multiple child nodes, one of the multiple child nodes of the node to be deleted is used as the root node according to a preset node rule.

[0009] Optionally, obtaining an initial abstract syntax tree corresponding to a code text identifier includes: obtaining an initial code text corresponding to the code text identifier; and converting the initial code text into the initial abstract syntax tree based on the compilation tool.

[0010] Optionally, the method further includes: obtaining a target control strategy, and obtaining multiple sub-control strategies corresponding to the target control strategy; obtaining control parameters corresponding to each of the sub-control strategies; wherein the control parameters include at least a control object and a control purpose; comparing the control parameters corresponding to each of the sub-control strategies, and determining at least two of the sub-control strategies having the same control parameters; creating the initial abstract syntax tree corresponding to the at least two sub-control strategies, and determining the code text identifiers corresponding to the at least two sub-control strategies, and associating the code text identifiers with the initial abstract syntax tree.

[0011] Optionally, the method further includes: traversing all nodes in the initial abstract syntax tree and the target abstract syntax, obtaining initial node information and target node information of the same nodes in the initial abstract syntax tree and the target abstract syntax; and comparing based on the initial node information and the target node information, obtaining comparison results of the same nodes in the initial abstract syntax tree and the target abstract syntax.

[0012] Optionally, after obtaining the target code text, the method further includes: receiving a code update instruction and a code text to be updated; determining a code position corresponding to the target code text in response to the code update instruction; and updating the target code text at the code position based on the code text to be updated to obtain an updated code text.

[0013] The disclosed embodiment also provides a code generation device, including: a response acquisition module, used to respond to the code generation instruction, parse the code generation instruction to obtain a code text identifier, a target node identifier and a target parameter; wherein the target node identifier is used to identify a node in an abstract syntax tree, and the target parameter is used to adjust the node corresponding to the target node identifier; an acquisition module, used to obtain an initial abstract syntax tree corresponding to the code text identifier; wherein the initial abstract syntax tree includes at least one node, each of which represents a data structure in the initial code text; a determination module, used to traverse the initial abstract syntax tree and determine the target node corresponding to the target node identifier; an adjustment module, used to adjust the target node according to the target parameter to obtain a target abstract syntax tree; a conversion module, used to convert the target abstract syntax tree into a target code text based on a preset compilation tool.

[0014] An embodiment of the present disclosure also provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the code generation method provided in the embodiment of the present disclosure.

[0015] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the code generation method provided by the embodiment of the present disclosure.

[0016] The embodiments of the present disclosure also provide a computer program product, including a computer program, wherein the computer program is executed by a processor as the code generation method provided in the embodiments of the present application.

[0017] The above-mentioned technical scheme provided by the embodiment of the present disclosure performs update operations such as code modification on the code text based on the abstract syntax tree, without repeatedly executing operations such as creating a template and injecting the code into the template for manual modification, and avoids the existing method of generating the target code text based on code text rows, columns and placeholders for code modification and other update operations, which leads to code text overwriting and code text errors caused by merging code texts obtained by repeated execution. It can greatly reduce the cost of code generation, realize dynamic code update, and improve the efficiency of automatic code generation.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 A flowchart of a code generation method provided by an embodiment of the present disclosure;

[0022] Figure 2 A flowchart of a code generation method provided by an embodiment of the present disclosure;

[0023] Figure 3 A schematic diagram of the structure of a code generation device provided by an embodiment of the present disclosure;

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0027] In the existing code generation scenario, code generation is divided into three steps: 1) Create a template; 2) Complete code injection based on the template; 3) Perform manual modification based on business needs or tuning purposes. The above processes are all based on code text, and usually rely on special marking symbols to complete code injection. For example, a placeholder such as {{x}} is defined in the template. When injecting code, {{x}} is replaced as needed, such as replacing it with a=a*2; when manually optimizing the code, it is changed to a*=2. At this time, based on business needs, step 2 needs to be executed again, which will overwrite the code a*=2 with a=a*2, and the manually optimized code will be lost. That is to say, if step 3 is executed, step 2 cannot be executed again. However, during the project development process, steps 2 and 3 need to be repeated alternately to meet business needs and improve code development efficiency.

[0028] Specifically, in the process of manual modification, there may be changes in the code position, etc. Therefore, if manual modification is continued based on the code text after the last optimization, code errors will occur, and steps 1-3 need to be repeated; in addition, if multiple code texts obtained by repeatedly executing steps 1-3 are directly merged, since the code positions such as rows and columns of the text code change during the manual modification process, the code text based on line merging will also have errors, and the above method has the problems of high cost and low efficiency.

[0029] In view of the above problems, the present disclosure proposes a code generation method, which performs code modification and other update operations on the code text based on the abstract syntax tree according to actual business needs. Based on the abstract syntax tree, one or more code nodes (variables, functions, classes, etc.) can be modified at the same time, thereby improving the efficiency of code generation while ensuring the accuracy of code generation and meeting the code generation requirements. The following is a detailed explanation:

[0030] Figure 1 The present invention provides a flowchart of a code generation method according to an embodiment of the present invention. The method can be applied to electronic devices, such as computers, mobile phones, tablet computers, servers, etc., without limitation. Figure 1 As shown, the method mainly includes the following steps S102 to S108:

[0031] Step S102, in response to the code generation instruction, the code generation instruction is parsed to obtain a code text identifier, a target node identifier and a target parameter; wherein the target node identifier is used to identify a node in an abstract syntax tree, and the target parameter is used to adjust the node corresponding to the target node identifier.

[0032] In the disclosed embodiment, code generation instructions can be input according to actual business needs, such as inputting code generation instructions for generating a low-price control strategy, thereby obtaining code generation instructions for generating a low-price control strategy, that is, the generated target code text can be used for low-price control, and the specific input can be selected according to actual business needs.

[0033] In an embodiment of the present disclosure, after obtaining the code generation instruction, the code generation instruction is parsed by a preset instruction parsing algorithm (such as an orthogonal method, a holistic method, etc.) to obtain a code text identifier. It can be understood that the code text identifier is used to uniquely identify an initial abstract syntax tree, wherein the initial code text is compiled based on a compilation tool such as a dynamic language "python", "js", etc. to obtain an initial abstract syntax tree. In other words, a code text identifier can uniquely identify an initial code text, thereby uniquely identifying an initial abstract syntax tree.

[0034] It should be noted that the target node identifier and target parameters can also be obtained by parsing the code generation instruction; wherein the target node identifier is used to identify a node in the abstract syntax tree, and the target parameter is used to adjust the node corresponding to the target node identifier.

[0035] Step 104, obtaining an initial abstract syntax tree corresponding to the code text identifier; wherein the initial abstract syntax tree includes at least one node, and each node represents a data structure in the initial code text.

[0036] In the disclosed embodiment, the initial code text corresponding to the code text identifier can be obtained, and after the initial code text is converted into an initial abstract syntax tree based on a compilation tool, the code text identifier is associated with the initial abstract syntax tree, so that after the code text identifier is obtained, the corresponding initial abstract syntax tree can be quickly obtained based on the code text identifier. Among them, the initial code text refers to the general code text, which can be understood as written according to the target control strategy (which can be different target control strategies with the same control object and control purpose), and then the initial code text is instantiated as a specific type provided as a parameter when needed, such as the initial code text generated for the pricing factor and pricing coefficient for the target control strategy, and the initial code text generated for the low-price control for the target control strategy.

[0037] In the embodiment of the present disclosure, the initial abstract syntax tree includes at least one node, and each node represents a data structure in the initial code text, such as an expression, a statement, or a declaration.

[0038] It can be understood that the initial abstract syntax tree can be understood as representing the grammatical structure of the code in a tree form, and the abstract syntax tree includes multiple nodes, and the nodes can be, for example, function names, function types, function expressions, etc., and can also be variable names, etc.; in addition, the multiple nodes include a starting node (root node), a parent node, and a child node, etc., and the root node is connected to at least one parent node, and each parent node is connected to at least one child node, so that the initial abstract syntax tree can represent the logical relationship and connection order between the data results in the initial code text, so that the initial abstract syntax tree is adjusted to achieve the adjustment of the initial code text.

[0039] Specifically, the abstract syntax tree is a structured code. The abstract syntax tree is very different from the code text. For example, an expression in the code text may be just a line of text, but in the abstract syntax tree it is a structured data containing several flags, operators, and operands.

[0040] Step 106, traverse the initial abstract syntax tree, determine the target node corresponding to the target node identifier, and adjust the target node according to the target parameter to obtain the target abstract syntax tree.

[0041] Step 108: Convert the target abstract syntax tree into target code text based on a preset compilation tool.

[0042] In the disclosed embodiment, the target node identifier and the target parameter corresponding to the target node identifier can be obtained, the target node corresponding to the target node identifier can be located in the abstract syntax tree, and the target node can be adjusted according to the target parameter to obtain the target abstract syntax tree.

[0043] Specifically, by traversing the initial abstract syntax tree, determining the target node corresponding to the target node identifier, and adjusting the target node according to the target parameters, the target abstract syntax tree is obtained. As an example, the target parameters include a target data structure and an adjustment identifier corresponding to the target node, the adjustment identifier is used to indicate adjustment to the target node, the initial data structure corresponding to the target node is obtained, the initial data structure is adjusted based on the target data structure according to the adjustment identifier, and the target abstract syntax tree is obtained.

[0044] As another example, the initial data structure at the target node is updated to the target data structure to obtain a target abstract syntax tree; and / or, the target node is used as a parent node, and a child node connected to the target node is generated, and the target data structure is used as a data structure corresponding to the child node to obtain a target abstract syntax tree. The above two methods are only examples of adjusting the target node according to the target parameters to obtain a target abstract syntax tree. The embodiments of the present disclosure do not limit the specific implementation method of adjusting the target node according to the target parameters to obtain a target abstract syntax tree.

[0045] In the embodiments of the present disclosure, the initial syntax tree can be adjusted according to business needs, business functions, etc. For example, in a video business, it is necessary to add a function of playing video covers in turn at a preset frequency; for example, in a video business, it is necessary to increase the demand for advertising playback, etc., so as to finally adjust the code text by adjusting the abstract syntax tree to meet the application needs of the business.

[0046] It is understandable that different services require different nodes to be updated, and the code update operations corresponding to the updated nodes are also different. In the embodiments of the present disclosure, the target nodes of the services in the initial abstract syntax tree can be determined in advance for different services as needed, and corresponding adjustment operations and adjustment parameters can be configured for the target nodes. For example, the aforementioned video service needs to add a function of playing video covers in turn at a preset frequency, thereby determining that the target nodes in the initial abstract syntax tree are S1 and S2, and configuring the target nodes S1 and S2 to have corresponding adjustment operations T1 and T2, and adjustment parameters R1 and R2.

[0047] Specifically, adjusting the initial abstract syntax tree can actually be understood as updating the nodes on the initial abstract syntax tree, which may include replacing, modifying or adding new nodes to the initial abstract syntax tree. For example, data replacement can flexibly replace an expression, operator, operand, update list or dictionary structure and other operations. This replacement does not depend on the rows, columns and placeholders of the code text, but is directly based on the variables, functions, classes and other tags of the code to locate and replace, thereby improving the efficiency of code generation while ensuring the accuracy of code generation.

[0048] In the embodiments of the present disclosure, the target abstract syntax tree can be converted by using relevant compilation tools such as dynamic languages ​​"python", "js", etc. to obtain the target code text.

[0049] In the disclosed embodiments, the target abstract syntax tree may be one or more. When there are multiple target abstract syntax trees, the multiple target abstract syntax trees may be merged according to the nodes in the target abstract syntax tree, i.e., unique node identifiers such as variables, functions, and classes, and the merged abstract syntax trees may be converted into code texts, so that the same code node or different code nodes in the same abstract syntax tree may be updated in real time, thereby avoiding errors in the merging of multiple code texts in the prior art and further improving the accuracy of code generation.

[0050] In the above embodiment, code text is updated based on an abstract syntax tree, and there is no need to repeatedly perform operations such as creating a template and injecting the code into the template for manual modification. This avoids the problem of code text overwriting and code text errors caused by merging code texts obtained by repeated executions in the existing method of generating the target code text based on code text rows, columns, and placeholders. This can greatly reduce the cost of code generation, achieve dynamic code update, and improve the efficiency of automatic code generation.

[0051] In some embodiments, the target parameters include a target data structure and an adjustment identifier corresponding to the target node, the adjustment identifier is used to indicate adjustment to the target node, the target node is adjusted according to the target parameters to obtain a target abstract syntax tree, including: obtaining an initial data structure corresponding to the target node, adjusting the initial data structure based on the target data structure according to the adjustment identifier, and obtaining the target abstract syntax tree.

[0052] In the embodiments of the present disclosure, the target parameters are used to adjust the node corresponding to the target node identifier. Different adjustment scenarios have different target parameters. Specifically, the target parameters include a target data structure and an adjustment identifier corresponding to the target node. The target data structure may be a target expression, a target statement, or a target declaration, etc. The adjustment identifier may replace the identifier, add the identifier, etc.

[0053] In some embodiments, the initial data structure is adjusted based on the target data structure according to the adjustment identifier to obtain a target abstract syntax tree, including: updating the initial data structure at the target node to the target data structure to obtain the target abstract syntax tree; and / or taking the target node as the parent node, and generating a child node connected to the target node, and taking the target data structure as the data structure corresponding to the child node to obtain the target abstract syntax tree.

[0054] In an embodiment of the present disclosure, the initial abstract syntax tree is traversed to locate the target node, the initial data structure corresponding to the target node is obtained, and the initial data structure is adjusted based on the target data structure according to the adjustment identifier to obtain the target abstract syntax tree. For example, the initial data structure of the target node is replaced with the target data structure. For example, the target node is used as the parent node, a child node is added to connect to the target node, and the target data structure is used as the data result of the child node, etc.

[0055] For example, if you determine that you want to adjust an expression or function in the initial text code to a desired value, both the expression and the function are a node on the initial abstract syntax tree (the initial abstract syntax tree usually contains several nodes); the adjustment can be a replacement operation, such as re-defining a function, replacing the existing definition on the initial abstract syntax tree with the new definition, so as to locate the position of the expression, function, or variable you want to modify in the initial abstract syntax tree, and then perform the replacement operation, etc. In addition, you can also add new functions, define new variables, etc., that is, first determine the parent node, then append the child node, and determine the data structure corresponding to the child node.

[0056] In the embodiments of the present disclosure, the target node in the abstract syntax tree can be determined according to the business, such as business functions, business requirements, etc. For example, if the business function A1 needs to be added, it is possible to determine in the abstract syntax tree which nodes (as target nodes) need to be updated to add the business function A1, thereby determining the target node, such as S3, and inputting the target parameter T3 corresponding to the target node S3 to add the business function A1.

[0057] Specifically, the target nodes in the abstract syntax tree can be defined according to business needs, and the target parameters corresponding to the target nodes can be configured so that the target nodes can be updated later according to actual business needs, and the updated abstract syntax tree can be converted into target code text to meet actual business needs, further improving the flexibility and efficiency of code generation.

[0058] For example, the target node is an expression, a dictionary, a function, etc., and the target parameters include adjustment operations such as expression replacement, dictionary update, and function renaming, as well as target data structures such as target expression, target dictionary, and target function name. For example, the expression of the target node is located on the initial abstract syntax tree and replaced with the target expression, the dictionary of the target node is located on the initial abstract syntax tree and updated to the target dictionary, and the function of the target node is located on the initial abstract syntax tree and renamed to the target function name, etc.

[0059] It should be noted that the method of locating the target node in the initial abstract syntax tree can be flexibly selected according to application needs. The target node can be searched and located by traversing from the root in sequence, thereby further improving the code generation efficiency.

[0060] Therefore, by adjusting the data information at the nodes in the initial abstract syntax tree, such as replacing the expressions of the nodes or adding variables, etc., to obtain new data information at the nodes, or adjusting the nodes in the initial abstract syntax tree, such as adding nodes and setting the data structures corresponding to the nodes, etc., the initial code text can be adjusted to avoid text coverage problems caused by changes in code positions such as rows and columns caused by directly adjusting the initial code text, as well as text errors in subsequent merges, thereby improving code generation efficiency and effectiveness.

[0061] In some embodiments, the method further includes: in response to a code deletion instruction, parsing the code deletion instruction, obtaining a node identifier to be deleted, traversing the target abstract syntax tree, determining a node to be deleted corresponding to the node identifier to be deleted, and when the node to be deleted is a child node, deleting the node to be deleted and the node information at the node to be deleted; when the node to be deleted is a parent node and not a root node, deleting the node to be deleted and the node information of the node to be deleted, and connecting the parent node and one or more child nodes of the node to be deleted; when the node to be deleted is a root node, deleting the node to be deleted and the node information of the node to be deleted; when the node to be deleted has one child node, using the child node of the node to be deleted as the root node; when the node to be deleted has multiple child nodes, using one of the multiple child nodes of the node to be deleted as the root node according to a preset node rule.

[0062] In the disclosed embodiment, after the target code text is generated, the target code text can also be adjusted according to real-time usage requirements, such as deleting some functions. Therefore, a code deletion instruction is input, and after obtaining the code deletion instruction, the code deletion instruction is parsed to obtain the identifier of the node to be deleted. The identifier of the node to be deleted can uniquely identify a node to be deleted on the target abstract syntax tree.

[0063] Furthermore, the target abstract syntax tree is traversed to determine the node to be deleted corresponding to the node identifier to be deleted, and the node to be deleted is processed according to the node attribute information of the node to be deleted (such as the attribute information of the root node, parent node and child node) to meet the requirements of different usage scenarios.

[0064] Among them, processing the node to be deleted according to the node attribute information of the node to be deleted (such as attribute information of the root node, parent node and child node, etc.) includes deleting the node to be deleted and the node information at the node to be deleted when the node to be deleted is a child node, deleting the node to be deleted and the node information at the node to be deleted when the node to be deleted is a parent node but not a root node, and connecting the parent node and one or more child nodes of the node to be deleted, and deleting the node to be deleted and the node information of the node to be deleted when the node to be deleted is a root node, when the node to be deleted has one child node, using the child node of the node to be deleted as the root node, and when the node to be deleted has multiple child nodes, using one of the multiple child nodes of the node to be deleted as the root node according to the preset node rule.

[0065] Therefore, for the scenario of deleting nodes (expressions, etc.), this deletion method based on the abstract syntax tree can avoid the problem of merging errors caused by directly deleting the target code text due to changes in code rows and columns, improve the efficiency and efficiency of code generation, and meet the needs of different usage scenarios.

[0066] In some embodiments, obtaining an initial abstract syntax tree corresponding to a code text identifier includes: obtaining an initial code text corresponding to the code text identifier, and converting the initial code text into an initial abstract syntax tree based on a compilation tool.

[0067] In the disclosed embodiment, the initial code text refers to a universal code text. For example, the pricing factor and the pricing coefficient are the same initial code text. By adjusting the initial code text, a target code text corresponding to the pricing factor and a target code text corresponding to the pricing coefficient can be generated.

[0068] In the disclosed embodiment, the initial code text may be converted by a related compilation tool such as a dynamic language "python", "js", etc. to obtain an abstract syntax tree. Specifically, a tag sequence is obtained by performing lexical analysis on the initial code text, and each tag in the tag sequence is subjected to grammatical analysis to obtain multiple phrases, and the multiple phrases are parsed according to a preset configuration file to obtain multiple code nodes and code node association information, and the multiple code nodes are associated according to the code node association information to construct an abstract syntax tree.

[0069] Specifically, the code text can be lexically analyzed by a lexical analyzer, that is, the code text can be split to obtain various labels such as keywords, identifiers, symbols and comments, and then the various labels can be parsed by a syntax analyzer to obtain multiple phrases, and the preset configuration file such as the grammar rules of the language can be used to parse the multiple phrases to obtain multiple code nodes and code node association information (the association relationship between code nodes), so as to associate the multiple code nodes according to the code node association information and construct an abstract syntax tree.

[0070] In this way, the abstract syntax tree corresponding to the initial code text can be quickly and accurately obtained, thereby improving the efficiency and effect of subsequent code generation.

[0071] In some embodiments, the method further includes: obtaining a target control strategy, and obtaining multiple sub-control strategies corresponding to the target control strategy; obtaining control parameters corresponding to each sub-control strategy; wherein the control parameters include at least a control object and a control purpose; comparing the control parameters corresponding to each sub-control strategy, and determining at least two sub-control strategies with the same control parameters; creating an initial abstract syntax tree corresponding to at least two sub-control strategies, and determining code text identifiers corresponding to at least two of the sub-control strategies, and associating the code text identifiers with the initial abstract syntax tree.

[0072] In the disclosed embodiments, target control strategies such as ECPM (Effective Cost Per Mille) calculation strategy and floor price control strategy can be determined according to business needs. Each target control strategy usually includes multiple sub-control strategies. For example, the ECPM calculation strategy includes pricing factors, pricing coefficients, policy routing, etc. Usually, different control parameters such as different control objects and control purposes determine different sub-control strategies. In order to improve the efficiency of code generation, sub-control strategies with the same control parameters share an initial code text, that is, have the same initial abstract syntax tree. For example, pricing factors and pricing coefficients can share an initial code text.

[0073] In the above embodiment, by allowing sub-control strategies with the same control parameters to share an initial code text, that is, to have the same initial abstract syntax tree, multiple target code texts with different control parameters can be generated for one initial code text, thereby improving code generation efficiency.

[0074] In some embodiments, all nodes in the initial abstract syntax tree and the target abstract syntax are traversed to obtain initial node information and target node information of the same nodes in the initial abstract syntax tree and the target abstract syntax tree; based on the comparison between the initial node information and the target node information, a comparison result of the same nodes in the initial abstract syntax tree and the target abstract syntax is obtained.

[0075] Specifically, node information of the same node in the initial abstract syntax tree and the target abstract syntax tree is compared, and inconsistent node information is obtained as a comparison result.

[0076] In the disclosed embodiment, by comparing the initial abstract syntax tree with the target abstract syntax tree, the specific change locations of all specific variables, functions, etc. in the entire code generation process can be obtained, which can help understand the specific update information of all the codes as a whole, so as to subsequently understand the differences between each generated code and the last initial code, and meet the needs of users in different scenarios.

[0077] In some embodiments, after obtaining the target code text, the method further includes: receiving a code update instruction and a code text to be updated, determining a code position corresponding to the target code text in response to the code update instruction, and updating the target code text at the code position based on the code text to be updated to obtain an updated code text.

[0078] In the disclosed embodiment, after the target code text is generated, further adjustments can be made based on the user's personalized needs, so that the user can input a code update instruction and the corresponding code text to be updated, thereby determining the code position corresponding to the target code text according to the code update instruction, and updating the target code text based on the code text to be updated at the code position to obtain the updated code text. In this way, the user's personalized code generation needs are further met and the user experience is improved.

[0079] Based on the description of the aforementioned embodiment, the initial code text is converted into an initial abstract syntax tree, the code is adjusted based on the initial abstract syntax tree, and then the adjusted abstract syntax tree is converted into a target code text, so that the result of the adjustment operation can be retained on the abstract syntax tree, thereby avoiding the situation in the aforementioned prior art where the code is lost due to repeated execution of step 2, and eliminating the problem of errors caused by manual modification, thereby improving the efficiency and effect of automatic code generation. Figure 2 Describe in detail.

[0080] Figure 2 A schematic diagram of a code generation method provided in an embodiment of the present disclosure, the method mainly includes the following steps S202 to S208:

[0081] Step S202, in response to the code generation instruction, the code generation instruction is parsed to obtain a code text identifier, a target node identifier and a target parameter; wherein the target node identifier is used to identify a node in an abstract syntax tree, and the target parameter is used to adjust the node corresponding to the target node identifier.

[0082] It should be noted that step S202 is the same as step S102. For details, please refer to the detailed description of step S102, which will not be described in detail here.

[0083] Step S204: obtaining an initial code text corresponding to the code text identifier, and converting the initial code text into an initial abstract syntax tree based on a compilation tool.

[0084] In the disclosed embodiment, the initial code text may be converted by a related compilation tool such as a dynamic language "python", "js", etc. to obtain an abstract syntax tree. Specifically, a tag sequence is obtained by performing lexical analysis on the initial code text, and each tag in the tag sequence is subjected to grammatical analysis to obtain multiple phrases, and the multiple phrases are parsed according to a preset configuration file to obtain multiple code nodes and code node association information, and the multiple code nodes are associated according to the code node association information to construct an abstract syntax tree.

[0085] Step S206, traverse the initial abstract syntax tree, determine the target node corresponding to the target node identifier, obtain the initial data structure corresponding to the target node, adjust the initial data structure based on the target data structure in the target parameter according to the adjustment identifier in the target parameter, and obtain the target abstract syntax tree.

[0086] In an embodiment of the present disclosure, the initial data structure is adjusted based on the target data structure according to the adjustment identifier to obtain a target abstract syntax tree, including: updating the initial data structure at the target node to the target data structure to obtain a target abstract syntax tree; and / or taking the target node as a parent node, generating a child node connected to the target node, and taking the target data structure as a data structure corresponding to the child node to obtain a target abstract syntax tree.

[0087] By adjusting the data information at the nodes in the initial abstract syntax tree, such as replacing the node expressions or adding variables to obtain new data information at the nodes, or adjusting the nodes in the initial abstract syntax tree, such as adding nodes and setting the data structures corresponding to the nodes, the initial code text can be adjusted to avoid text coverage problems caused by changes in code positions such as rows and columns caused by direct adjustments to the initial code text, as well as text errors in subsequent merges, thereby improving code generation efficiency and effectiveness.

[0088] Step S208: converting the target abstract syntax tree into target code text based on a preset compilation tool.

[0089] In the embodiments of the present disclosure, the target abstract syntax tree can be converted by using relevant compilation tools such as dynamic languages ​​"python", "js", etc. to obtain the target code text.

[0090] Specifically, the initial code text is read, and the initial code text is converted into an initial abstract syntax tree through a compilation tool to obtain the target nodes and target parameters that need to be updated, such as initial data structures such as variables, expressions, dictionaries, classes, functions, and adjustment identifiers such as expression replacement, list append, dictionary update, and function renaming, as well as target data structures such as target expressions and target function names; the target node is located on the initial abstract syntax tree, and the target parameters are obtained to perform adjustment operations, and finally the updated target abstract syntax tree is converted into a target code text through a compilation tool.

[0091] As a result, the code positioning method based on code text rows, columns and placeholders is changed to positioning based on variables, expressions, classes, functions, etc. on the abstract syntax tree, and the code-based text update is changed to code update operations such as expression replacement, list append, dictionary update, etc. based on the abstract syntax tree. This realizes a hybrid method of positioning and modifying by converting the initial code text into the initial abstract syntax tree, which can improve the efficiency of automatic code generation and cover some features that cannot be achieved through code templates, thereby improving code reuse rate and development efficiency and realizing dynamic code modification.

[0092] Corresponding to the aforementioned code generation method, the embodiment of the present disclosure further provides a code generation device, Figure 3 This is a schematic diagram of the structure of a code generation device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware and applied to an electronic device. The device includes:

[0093] A response acquisition module 302 is used to respond to the code generation instruction and parse the code generation instruction to obtain a code text identifier, a target node identifier and a target parameter; wherein the target node identifier is used to identify a node in an abstract syntax tree, and the target parameter is used to adjust the node corresponding to the target node identifier;

[0094] The acquisition module 304 is used to acquire an initial abstract syntax tree corresponding to the code text identifier; wherein the initial abstract syntax tree includes at least one node, and each node represents a data structure in the initial code text;

[0095] A determination module 306, configured to traverse the initial abstract syntax tree and determine a target node corresponding to the target node identifier;

[0096] An adjustment module 308, configured to adjust the target node according to the target parameter to obtain a target abstract syntax tree;

[0097] The conversion module 310 is used to convert the target abstract syntax tree into a target code text based on a preset compilation tool.

[0098] The above-mentioned device provided by the embodiment of the present disclosure performs update operations such as code modification on the code text based on the abstract syntax tree, without repeatedly executing operations such as creating a template and injecting the code into the template for manual modification, and avoids the existing method of generating the target code text based on code text rows, columns and placeholders for code modification and other update operations, which leads to code text overwriting and code text errors caused by merging code texts obtained by repeated execution. The code generation cost can be greatly reduced, the dynamic update of the code can be realized, and the efficiency of automatic code generation can be improved.

[0099] In some embodiments, the target parameters include a target data structure and an adjustment identifier corresponding to the target node, and the adjustment identifier is used to indicate adjustment to the target node. The adjustment module 308 includes: an acquisition unit, used to acquire the initial data structure corresponding to the target node; and an adjustment unit, used to adjust the initial data structure based on the target data structure according to the adjustment identifier to obtain the target abstract syntax tree.

[0100] In some embodiments, the adjustment unit is specifically used to: update the initial data structure at the target node to the target data structure to obtain the target abstract syntax tree; and / or, take the target node as the parent node, generate a child node connected to the target node, and use the target data structure as the data structure corresponding to the child node to obtain the target abstract syntax tree.

[0101] In some embodiments, the device further includes: a parsing module, which is used to parse the code deletion instruction in response to the code deletion instruction and obtain the identifier of the node to be deleted; a traversal determination module, which is used to traverse the initial abstract syntax tree or the target abstract syntax tree to determine the node to be deleted corresponding to the identifier of the node to be deleted; a deletion module, which is used to delete the node to be deleted and the node information at the node to be deleted when the node to be deleted is a child node; the deletion module is also used to delete the node to be deleted and the node information of the node to be deleted when the node to be deleted is a parent node and not a root node, and connect the parent node of the node to be deleted and one or more child nodes; the deletion module is also used to delete the node to be deleted and the node information of the node to be deleted when the node to be deleted is a root node, and when the node to be deleted has one child node, use the child node of the node to be deleted as the root node, and when the node to be deleted has multiple child nodes, use one of the multiple child nodes of the node to be deleted as the root node according to a preset node rule.

[0102] In some implementations, the acquisition module 304 is specifically used to: acquire the initial code text corresponding to the code text identifier; and convert the initial code text into the initial abstract syntax tree based on the compilation tool.

[0103] In some embodiments, the device also includes: a strategy acquisition module, which is used to acquire a target control strategy and acquire multiple sub-control strategies corresponding to the target control strategy; a parameter acquisition module, which is used to acquire control parameters corresponding to each of the sub-control strategies; wherein the control parameters include at least a control object and a control purpose; a comparison module, which is used to compare the control parameters corresponding to each of the sub-control strategies, and determine at least two sub-control strategies with the same control parameters; a processing module, which is used to create the initial abstract syntax tree corresponding to the at least two sub-control strategies, and determine the code text identifiers corresponding to the at least two sub-control strategies, and associate the code text identifiers with the initial abstract syntax tree.

[0104] In some embodiments, the device also includes: a traversal acquisition module, which is used to traverse all nodes in the initial abstract syntax tree and the target abstract syntax, and obtain the initial node information and target node information of the same node in the initial abstract syntax tree and the target abstract syntax; a comparison module, which is used to compare based on the initial node information and the target node information to obtain the comparison results of the same nodes in the initial abstract syntax tree and the target abstract syntax.

[0105] In some embodiments, after obtaining the target code text, the device also includes: a receiving module for receiving a code update instruction and a code text to be updated; a response determination module for determining a code position corresponding to the target code text in response to the code update instruction; and an update module for updating the target code text at the code position based on the code text to be updated to obtain an updated code text.

[0106] The code generation device provided in the embodiments of the present disclosure can execute the code generation method provided in any embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method.

[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device embodiment can refer to the corresponding process in the method embodiment, and will not be repeated here.

[0108] An embodiment of the present disclosure provides an electronic device, which includes: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any method in the present disclosure.

[0109] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0110] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0111] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0112] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0113] In addition to the above-mentioned methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, cause the processor to perform the image processing method provided by the embodiments of the present disclosure. The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present disclosure, the programming languages ​​including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0114] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the code generation method provided by the embodiment of the present disclosure.

[0115] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0116] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which implements the code generation method in the embodiments of the present disclosure when the computer program / instruction is executed by a processor.

[0117] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0118] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0119] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0120] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0121] It should be noted that, in this article, relational terms such as "first" and "second" are only used 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", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0122] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A code generation method, characterized in that: include: In response to the code generation instruction, the code generation instruction is parsed to obtain a code text identifier, a target node identifier and a target parameter; wherein the target node identifier is used to identify a node in an abstract syntax tree, and the target parameter is used to adjust a node corresponding to the target node identifier; Obtaining an initial abstract syntax tree corresponding to the code text identifier; wherein the initial abstract syntax tree includes at least one node, each of which represents a data structure in the initial code text; Traversing the initial abstract syntax tree, determining a target node corresponding to the target node identifier, and adjusting the target node according to the target parameter to obtain a target abstract syntax tree; The target abstract syntax tree is converted into a target code text based on a preset compilation tool.

2. The method according to claim 1, characterized in that The target parameter includes a target data structure and an adjustment identifier corresponding to the target node, the adjustment identifier is used to indicate that the target node is to be adjusted, and the target node is adjusted according to the target parameter to obtain a target abstract syntax tree, including: Obtaining an initial data structure corresponding to the target node; The initial data structure is adjusted based on the target data structure according to the adjustment identifier to obtain the target abstract syntax tree.

3. The method according to claim 2, characterized in that The initial data structure is adjusted based on the target data structure according to the adjustment identifier to obtain the target abstract syntax tree, including: Updating the initial data structure at the target node to the target data structure to obtain the target abstract syntax tree; and / or, The target node is used as a parent node, and a child node connected to the target node is generated. The target data structure is used as a data structure corresponding to the child node to obtain the target abstract syntax tree.

4. The method according to claim 1, characterized in that The method further comprises: In response to the code deletion instruction, the code deletion instruction is parsed to obtain an identifier of a node to be deleted; Traversing the initial abstract syntax tree or the target abstract syntax tree to determine the node to be deleted corresponding to the node to be deleted identifier; When the node to be deleted is a child node, deleting the node to be deleted and the node information at the node to be deleted; When the node to be deleted is a parent node and not a root node, the node to be deleted and the node information of the node to be deleted are deleted, and the parent node of the node to be deleted and one or more child nodes are connected; When the node to be deleted is a root node, the node to be deleted and the node information of the node to be deleted will be deleted. When the node to be deleted has one child node, the child node of the node to be deleted will be used as the root node. When the node to be deleted has multiple child nodes, one of the multiple child nodes of the node to be deleted will be used as the root node according to the preset node rules.

5. The method according to claim 1, characterized in that The step of obtaining an initial abstract syntax tree corresponding to the code text identifier includes: Obtaining an initial code text corresponding to the code text identifier; The initial code text is converted into the initial abstract syntax tree based on the compilation tool.

6. The method according to claim 1, characterized in that The method further comprises: Obtain a target control strategy, and obtain multiple sub-control strategies corresponding to the target control strategy; Obtaining control parameters corresponding to each of the sub-control strategies; wherein the control parameters at least include a control object and a control purpose; Comparing the control parameters corresponding to the sub-control strategies, and determining at least two sub-control strategies having the same control parameters; The initial abstract syntax tree corresponding to the at least two sub-control strategies is created, and the code text identifiers corresponding to the at least two sub-control strategies are determined, and the code text identifiers are associated with the initial abstract syntax tree.

7. The method according to claim 1, characterized in that The method further comprises: Traversing all nodes in the initial abstract syntax tree and the target abstract syntax tree, and acquiring initial node information and target node information of the same node in the initial abstract syntax tree and the target abstract syntax tree; Based on the comparison between the initial node information and the target node information, a comparison result of the same nodes in the initial abstract syntax tree and the target abstract syntax is obtained.

8. The method according to claim 1, characterized in that After obtaining the target code text, the method further includes: Receive code update instructions and code text to be updated; Determining a code position corresponding to the target code text in response to the code update instruction; The target code text is updated at the code position based on the code text to be updated to obtain an updated code text.

9. A code generating device, characterized in that: The device comprises: A response acquisition module, configured to respond to a code generation instruction and parse the code generation instruction to obtain a code text identifier, a target node identifier, and a target parameter; wherein the target node identifier is used to identify a node in an abstract syntax tree, and the target parameter is used to adjust a node corresponding to the target node identifier; An acquisition module, used to acquire an initial abstract syntax tree corresponding to the code text identifier; wherein the initial abstract syntax tree includes at least one node, each of which represents a data structure in the initial code text; A determination module, configured to traverse the initial abstract syntax tree and determine a target node corresponding to the target node identifier; An adjustment module, used for adjusting the target node according to the target parameter to obtain a target abstract syntax tree; The conversion module is used to convert the target abstract syntax tree into a target code text based on a preset compilation tool.

10. An electronic device, characterized in that: The electronic device comprises: a storage device having a computer program stored thereon; A processing device, used to execute the computer program in the storage device to implement the steps of the code generation method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the code generation method described in any one of claims 1 to 8.

Citation Information

Cited By

  • Parameterization unit generation method and system and medium

    CN120278091A

  • SQL (Structured Query Language) reconstruction method and device, equipment and storage medium

    CN120508568A

  • Code incremental injection method and device, electronic equipment and storage medium

    CN122086461A

  • A code increment injection method and device, electronic equipment and storage medium

    CN122086461B