Code text generation method and related equipment
By dividing material attributes into common and unique attributes and using a common attribute parsing module for unified processing, the problem of repetitive development of material attributes in low-code platforms is solved, and the efficiency and reusability of code text generation are improved.
Patent Information
- Application Number
- CN202510985098.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-28
AI Technical Summary
In existing technologies, the attributes of each material in a low-code platform need to be processed individually, causing developers to repeatedly process the same common attribute logic, resulting in low efficiency.
Material attributes are divided into common attributes and unique attributes. Common attributes are processed uniformly through the common attribute parsing module, while unique attributes are processed separately to generate front-end code text.
It improves the efficiency of code text generation, reduces development workload, enhances code reusability and development efficiency, and facilitates team collaboration and maintenance.
Smart Images

Figure CN120848949A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of code text generation, and more specifically, to code text generation methods, code text generation apparatus, code text generation devices, computer-readable storage media, and computer program products containing instructions. Background Art
[0002] With the continuous development of low-code platforms and the increasing variety of business scenarios, the number of materials and the types of attributes are increasing dramatically, thus creating an urgent need for a code text generation method.
[0003] The existing code generation method involves low-code application platforms where the front-end UI design interface typically provides material libraries for various terminal devices, such as PC and mobile devices. Users assemble and arrange these materials by dragging and dropping them when designing the front-end page. Each material in a low-code project is a large metadata (JSON schema) composed of multiple smaller metadata. When users drag and drop materials into the design area, they can configure multiple material attributes, each described by a piece of JSON data, which is then saved in the material's metadata. Developers then generate front-end code based on this metadata.
[0004] However, in existing technologies, developers need to process the attributes of each material individually to generate front-end code. For example, when developing "buttons with icons" or other materials, developers need to handle the background color, text color, icon size, icon color, and other attributes of each material separately. For complex attributes, additional processing or generation of specific logic code is required. In other words, the processing logic for the same common attributes (such as background color, text color, icon size, and icon color) needs to be repeatedly developed for each material, resulting in a large workload and low efficiency in code text generation. Summary of the Invention
[0005] This application provides a code text generation method, a code text generation apparatus, a code text generation device, a computer-readable storage medium, and a computer program product containing instructions, for generating code text while improving code text generation efficiency.
[0006] In a first aspect, embodiments of this application provide a code text generation method, including:
[0007] Obtain the attribute setting information for multiple target attributes of the target material;
[0008] The multiple target attributes are matched with the preset target common attributes in the target common attribute set to obtain the common attributes among the multiple target attributes, and the remaining attributes among the multiple target attributes other than the common attributes are taken as the unique attributes among the multiple target attributes.
[0009] The public attribute parsing module is invoked to parse the attribute setting information of the public attributes among the multiple target attributes, and the parsed attribute values of the public attributes among the multiple target attributes are obtained. The attribute setting information of the public attributes includes setting description fields or attribute setting values.
[0010] The unique attribute parsing module is invoked to parse the attribute setting information of the unique attributes among the multiple target attributes, and the parsed attribute value of the unique attributes among the multiple target attributes is obtained. The attribute setting information of the unique attributes includes setting function code.
[0011] The material generation module is invoked to generate the front-end code text of the target material based on the parsed attribute values of the multiple target attributes.
[0012] Secondly, embodiments of this application provide a code text generation apparatus, including:
[0013] The acquisition unit is used to acquire attribute setting information for multiple target attributes of the target material;
[0014] The determining unit is used to match the plurality of target attributes with a preset target common attribute in the target common attribute set to obtain the common attribute among the plurality of target attributes, and to take the remaining attributes among the plurality of target attributes other than the common attribute as the unique attribute among the plurality of target attributes;
[0015] The parsing unit is used to call the public attribute parsing module to parse the attribute setting information of the public attribute among the multiple target attributes, and obtain the parsed attribute value of the public attribute among the multiple target attributes. The attribute setting information of the public attribute includes a setting description field or an attribute setting value.
[0016] The parsing unit is further configured to call the unique attribute parsing module to parse the attribute setting information of the unique attribute among the plurality of target attributes, and obtain the parsed attribute value of the unique attribute among the plurality of target attributes, wherein the attribute setting information of the unique attribute includes setting function code;
[0017] The generation unit is used to call the material generation module to generate the front-end code text of the target material based on the parsed attribute values of the multiple target attributes.
[0018] Thirdly, embodiments of this application provide a code text generation device, including:
[0019] Central processing unit, memory, input / output interfaces, wired or wireless network interfaces, and power supply;
[0020] The memory is either a short-term storage memory or a persistent storage memory;
[0021] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the aforementioned code text generation method.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the aforementioned code text generation method.
[0023] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute the aforementioned code text generation method.
[0024] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: This application divides the target attributes into public attributes and unique attributes, and calls the public attribute parsing module to uniformly process the public attributes. This can avoid the repeated development of the same public attribute processing logic for each material, thereby improving code reusability, reducing development workload, and thus improving the efficiency of code text generation.
[0025] Accordingly, the code text generation apparatus, code text generation device, computer-readable storage medium, and computer program product containing instructions provided in this application also have the aforementioned technical effects. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating a code text generation method disclosed in an embodiment of this application;
[0027] Figure 2 This is a schematic diagram of another code text generation method disclosed in an embodiment of this application;
[0028] Figure 3 This is a schematic diagram of the structure of a code text generation device disclosed in an embodiment of this application;
[0029] Figure 4 This is a schematic diagram of the structure of a code text generation device disclosed in an embodiment of this application. Detailed Implementation
[0030] This application provides a code text generation method, a code text generation apparatus, a code text generation device, a computer-readable storage medium, and a computer program product containing instructions, for generating code text while improving code text generation efficiency.
[0031] Please see Figure 1 , Figure 1 This is a flowchart illustrating a code text generation method disclosed in an embodiment of this application. The method includes:
[0032] 101. Obtain the attribute setting information of multiple target attributes of the target material.
[0033] In one alternative implementation, the attribute setting information specifically represents data that characterizes how the target attribute is set. This data can be numerical values, descriptive text, or code, and is used to guide the parsing and generation of attributes.
[0034] 102. Match multiple target attributes with preset target common attributes in the target common attribute set to obtain common attributes among multiple target attributes, and take the remaining attributes of multiple target attributes other than common attributes as unique attributes among multiple target attributes.
[0035] In one alternative implementation, the target common attribute set represents a set containing multiple common attributes that are common across multiple materials and have the same parsing logic or setting method.
[0036] 103. Call the public attribute parsing module to parse the attribute setting information of the public attributes among multiple target attributes, and obtain the parsed attribute values of the public attributes among multiple target attributes. The attribute setting information of the public attributes includes setting description fields or attribute setting values.
[0037] In one alternative implementation, the attribute setting information of a public attribute represents the specific setting information constituting the public attribute, which can be a numerical value of a public ordinary attribute or a descriptive field of a public special attribute. The description field represents descriptive text about the attribute setting and is used for public special attributes, such as "mouse hover icon turns gray". The attribute setting value represents the numerical value directly used to set the attribute and is typically used for public ordinary attributes, such as "button width: 200px".
[0038] 104. Call the unique attribute parsing module to parse the attribute setting information of the unique attributes among multiple target attributes, and obtain the parsed attribute values of the unique attributes among multiple target attributes. The attribute setting information of the unique attributes includes the setting function code.
[0039] In one alternative implementation, unique attributes represent properties that exist only in a specific material, possessing unique parsing logic or functionality that requires special handling. Functional codes are set to represent the code used to implement the unique attribute's functionality; these are typically user-defined code snippets.
[0040] 105. Call the material generation module to generate the front-end code text of the target material based on the parsed attribute values of multiple target attributes.
[0041] In one alternative implementation, all parsed attribute values can be integrated to generate the final front-end code, thus completing the code text generation process for the target material.
[0042] For example, suppose the target material is a "user information card," whose attributes include "username (common attribute)," "avatar position (common special attribute, described as 'avatar on the left')," and "personal signature display logic (unique attribute, the function code is a piece of JavaScript logic)." After obtaining the settings information of these attributes, they are compared with the set of common attributes. The "username" and "avatar position" attributes are classified as common attributes, and the "personal signature display logic" is classified as a unique attribute. The common attribute parsing module and the unique attribute parsing module are called respectively to process these attributes, and finally, the complete front-end code of the "user information card" is generated.
[0043] By dividing target attributes into common and unique attributes and uniformly processing common attributes through the common attribute parsing module, the repetitive development of the same common attribute processing logic for each material is avoided. This improves code reusability, reduces development workload, and increases code generation efficiency, while also facilitating subsequent maintenance and updates. Furthermore, when multiple developers are involved, the common attribute parsing module ensures consistent code implementation for attributes with the same business logic, allowing developers to focus on developing the material's unique attributes, thereby improving development efficiency and code quality and facilitating team collaboration. Moreover, by standardizing the process and dividing material attributes into common and unique attributes for separate processing, code generation efficiency and flexibility are improved, while development costs are reduced.
[0044] In one optional implementation, the common attributes among the multiple target attributes include common special attributes and / or common general attributes. The attribute setting information of the common special attributes is the setting description field of the common special attributes, and the attribute setting information of the common general attributes is the attribute setting value of the common general attributes. Accordingly, the common attribute parsing module is invoked to parse the attribute setting information of the common attributes among the multiple target attributes to obtain the parsed attribute values of the common attributes. This includes: invoking the common attribute parsing module to parse the setting description field of the common special attributes to obtain the parsed attribute values of the common special attributes; and / or invoking the common attribute parsing module to use the attribute setting value of the common general attributes as the parsed attribute value of the common general attributes, and obtaining the parsed attribute values of the common attributes among the multiple target attributes based on the parsed attribute values of the common special attributes and / or the parsed attribute values of the common general attributes.
[0045] Specifically, for example: a public special attribute could be "button hover effect," whose description field could be "the button enlarges when the mouse hovers over it" (input by the user); a public ordinary attribute could be "button width," whose value could be "200px" (input by the user). When the public attribute parsing module is called, the description of "button hover effect" is parsed, generating the corresponding function logic and the corresponding parsed attribute value (e.g., function name (method name)), and "200px" is directly used as the parsed attribute value for "button width."
[0046] This further categorizes public attributes, making the parsing process more targeted, improving parsing efficiency and accuracy, while also facilitating maintenance and expansion.
[0047] In one optional implementation, the attribute setting information of the unique attributes among the multiple target attributes is the setting function code of the unique attributes. Correspondingly, the unique attribute parsing module is invoked to parse the attribute setting information of the unique attributes among the multiple target attributes to obtain the parsed attribute values of the unique attributes among the multiple target attributes. This includes: invoking the unique attribute parsing module to parse the attribute setting function code of the unique attributes among the multiple target attributes to obtain the parsed attribute values of the unique attributes among the multiple target attributes.
[0048] Specifically, for example, the setting code corresponding to the unique attribute "file upload limit" is a piece of JavaScript code used to limit the type and size of uploaded files. When the unique attribute parsing module is called, this code is directly parsed to obtain parsed attribute values that can be used to generate front-end code, such as function names (method names), etc.
[0049] This clarifies the handling of unique attributes, supports user-defined function code, and enhances the system's flexibility and customizability.
[0050] In an optional implementation, before matching multiple target attributes with preset target common attributes in a set of target common attributes to obtain common attributes among multiple target attributes, the method further includes: determining multiple initial common attributes of each material by comparing the generation logic of multiple attributes of each material, obtaining multiple target common attributes of each material based on the multiple initial common attributes of each material, and obtaining a set of target common attributes based on the multiple target common attributes of each material.
[0051] Specifically, by analyzing the attributes and generation logic of different materials, common attributes with the same logic are identified as initial common attributes, laying the foundation for constructing the target common attribute set. For example, comparing multiple button materials (such as "login button," "register button," etc.), it is found that they all have attributes such as "button text" and "button color," and the generation logic of these attributes is the same (e.g., they all set the text and color by simple assignment). Therefore, "button text" and "button color" are determined as initial common attributes, and then the target common attribute set is constructed.
[0052] In this way, determining the initial common attributes through comparison provides a foundation for constructing the target set of common attributes, which helps to improve the universality and reusability of common attributes.
[0053] In one optional implementation, multiple target common attributes of each material are obtained based on multiple initial common attributes of each material, including: standardizing and modifying the logical implementation of multiple initial common attributes corresponding to each material to obtain multiple target common attributes of each material.
[0054] Specifically, for example, the implementation logic of the initial public attribute "button click event" is inconsistent across different materials; some directly call a function, while others trigger a callback. To standardize this, it is uniformly modified to call a standard event handling function, ensuring that the target public attribute can be used in the same way across all materials.
[0055] In this way, the logical implementation of standardized public attributes ensures the consistency of public attribute behavior across different materials, facilitating unified maintenance and upgrades.
[0056] In one optional implementation, multiple target common attributes of each material are obtained based on multiple initial common attributes of each material, including: obtaining new common attributes of each material based on the logical implementation of new common attributes of each material, and merging the new common attributes of each material with multiple initial common attributes of each material to obtain multiple target common attributes of each material.
[0057] Specifically, for example: With the emergence of new "buttons with icons" materials, "icon position" is discovered to be a new common attribute. Based on its logical implementation (such as setting the icon to the left or right of the button), it is added to the target common attribute set.
[0058] This allows the set of target public attributes to be dynamically expanded to adapt to new development needs, thus enhancing the system's scalability.
[0059] In one optional implementation, multiple target attributes are matched with preset target common attributes in a set of target common attributes to obtain common attributes among the multiple target attributes, and the remaining attributes among the multiple target attributes other than the common attributes are taken as unique attributes among the multiple target attributes. This includes: matching multiple target attributes sequentially with preset target common attributes in a set of target common attributes in a preset order to obtain common attributes among the multiple target attributes and unique attributes among the multiple target attributes.
[0060] Specifically, for example: the preset order can be to match common special attributes first, and then match common ordinary attributes. For a target material that contains "button hover effect (common special attribute)", "button width (common ordinary attribute)" and "custom animation (unique attribute)", it will be matched in this order, accurately classifying the first two as common attributes and the last as unique attributes.
[0061] Understandably, the preset order can also be to process multiple target attributes of the target material one by one. First, determine the type of the current target attribute (common attribute or unique attribute). Then, select the appropriate parsing method (common attribute parsing module or unique attribute parsing module) based on the attribute type to parse the attribute's setting information and obtain the parsed attribute value. For example, for multiple attributes of a target material, process each attribute sequentially according to the preset order, determine whether it is a common attribute or a unique attribute, and then call the common attribute parsing module or the unique attribute parsing module respectively for parsing. Please refer to [link to details]. Figure 2 , Figure 2 This is a flowchart illustrating another code text generation method disclosed in an embodiment of this application. Figure 2 This paper presents an efficient method for material attribute parsing and code generation. By distinguishing between common and unique attributes and processing them separately, it reduces redundant development, improves code reusability, and quickly generates front-end code. The specific process includes the following steps:
[0062] Step 1: First, define a set of special attributes to determine which attributes require special parsing.
[0063] Step 2: Iterate through all the attributes of a target material and process each attribute of the target material one by one.
[0064] Step 3: Determine whether each attribute belongs to a special attribute set.
[0065] Step 4: If the current attribute is a special attribute, the common parsing template is called for special processing, and the result is stored back as the attribute value.
[0066] Step 5: If the current attribute is not a special attribute but a regular attribute, then the common parsing template is called for standard processing, and the result is output to a unified result set.
[0067] Step 6: Integrate the parsing results and integrate the parsing results of all attributes of the material into the material parsing template.
[0068] Step 7: Confirm whether all attributes of the target material have been processed. If not, return to continue the iteration.
[0069] Step 8: Process the remaining special attributes of the target material: For the unprocessed attributes in the special attribute set, parse them directly using the material template.
[0070] Step 9: After integrating all the parsing results, the material template generates the front-end code text.
[0071] It's understandable that calling the common parsing template (common attribute parsing module) for special processing refers to parsing the description fields of common special attributes to generate function names, etc. Calling the common parsing template for standard processing refers to directly using the attribute values of ordinary attributes. Material template processing is used to focus on the unique business attributes of materials to achieve personalized needs (i.e., it can call the unique attribute parsing module to parse the attribute setting information of unique attributes among multiple target attributes, and obtain the parsed attribute values of unique attributes among multiple target attributes).
[0072] It is worth mentioning that, Figure 2 This approach significantly improves development efficiency and reduces maintenance costs by reusing common parsing logic and focusing on developing material-specific attributes.
[0073] In summary, matching attributes according to a preset order ensures the accuracy of attribute classification and avoids confusion and errors in the attribute matching process.
[0074] The following section further elaborates on the comparison of the code text generation method provided in this application with existing technologies in terms of development efficiency:
[0075] In existing technologies, developers need to develop separate code for each attribute of each material. Taking 100 materials, each with an average of 50 attributes, as an example, developers would need to develop 5000 attributes (100 x 50).
[0076] In this application, attributes are divided into common attributes and unique attributes. For the 30 common attributes, since they are shared across multiple materials, they only need to be developed once and can be reused in all related materials, greatly reducing repetitive work. For the 20 unique attributes, personalized development is performed for each material. For 100 materials, the number of times the unique attributes are developed is 20 × 100 = 2000. Adding the 30 developments for the common attributes, the total number of developments is 2030.
[0077] Efficiency comparison: Existing technologies require 5,000 development iterations, while this invention only requires 2,030, reducing the number of development iterations by nearly half, significantly improving development efficiency, and reducing repetitive work and maintenance costs.
[0078] For further details, please refer to Figure 3 One embodiment of the code text generation device in this application includes:
[0079] The acquisition unit is used to acquire attribute setting information for multiple target attributes of the target material;
[0080] The determining unit is used to match the plurality of target attributes with a preset target common attribute in the target common attribute set to obtain the common attribute among the plurality of target attributes, and to take the remaining attributes among the plurality of target attributes other than the common attribute as the unique attribute among the plurality of target attributes;
[0081] The parsing unit is used to call the public attribute parsing module to parse the attribute setting information of the public attribute among the multiple target attributes, and obtain the parsed attribute value of the public attribute among the multiple target attributes. The attribute setting information of the public attribute includes a setting description field or an attribute setting value.
[0082] The parsing unit is further configured to call the unique attribute parsing module to parse the attribute setting information of the unique attribute among the plurality of target attributes, and obtain the parsed attribute value of the unique attribute among the plurality of target attributes, wherein the attribute setting information of the unique attribute includes setting function code;
[0083] The generation unit is used to call the material generation module to generate the front-end code text of the target material based on the parsed attribute values of the multiple target attributes.
[0084] In one optional implementation, the parsing unit can be configured to: call the public attribute parsing module to parse the setting description field of the public special attribute to obtain the parsed attribute value of the public special attribute; and / or call the public attribute parsing module to use the attribute setting value of the public ordinary attribute as the parsed attribute value of the public ordinary attribute; based on the parsed attribute value of the public special attribute and / or the parsed attribute value of the public ordinary attribute, obtain the parsed attribute value of the public attribute among the plurality of target attributes, wherein the public attribute among the plurality of target attributes includes public special attributes and / or public ordinary attributes, the attribute setting information of the public special attribute is the setting description field of the public special attribute, and the attribute setting information of the public ordinary attribute is the attribute setting value of the public ordinary attribute.
[0085] In one optional implementation, the parsing unit can be used to: call the unique attribute parsing module to parse the attribute setting function code of the unique attribute among the plurality of target attributes, to obtain the parsed attribute value of the unique attribute among the plurality of target attributes, wherein the attribute setting information of the unique attribute among the plurality of target attributes is the attribute setting function code.
[0086] In one optional implementation, the determining unit can be used to determine multiple initial common attributes of each material by comparing the generation logic of multiple attributes of each material, obtain multiple target common attributes of each material based on the multiple initial common attributes of each material, and obtain the target common attribute set based on the multiple target common attributes of each material.
[0087] In one optional implementation, the determining unit can be used to standardize and modify the logical implementation of multiple initial common attributes corresponding to each material to obtain multiple target common attributes of each material.
[0088] In one optional implementation, the determining unit can be used to obtain the new common attributes of each material based on the logical implementation of the new common attributes of each material, and to merge the new common attributes of each material with the multiple initial common attributes of each material to obtain multiple target common attributes of each material.
[0089] In one optional implementation, the determining unit can be used to match the plurality of target attributes sequentially with preset target common attributes in a set of target common attributes in a preset order, so as to obtain common attributes among the plurality of target attributes and unique attributes among the plurality of target attributes.
[0090] For further details, please refer to Figure 4 One embodiment of the code text generation device in this application includes:
[0091] Central processing unit 401, memory 405, input / output interface 404, wired or wireless network interface 403, and power supply 402;
[0092] Memory 405 is either a short-term storage memory or a persistent storage memory;
[0093] The central processing unit 401 is configured to communicate with the memory 405 and execute instructions stored in the memory 405 to perform the aforementioned operations. Figure 1 The method in the illustrated embodiment.
[0094] Furthermore, embodiments of this application also provide a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the aforementioned... Figure 1 The method in the illustrated embodiment.
[0095] Furthermore, embodiments of this application also provide a computer program product containing instructions, which, when run on a computer, causes the computer to perform the aforementioned... Figure 1 The method in the illustrated embodiment.
[0096] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0097] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0098] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0099] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0100] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for generating code text, characterized in that, include: Obtain the attribute setting information for multiple target attributes of the target material; The multiple target attributes are matched with the preset target common attributes in the target common attribute set to obtain the common attributes among the multiple target attributes, and the remaining attributes among the multiple target attributes other than the common attributes are taken as the unique attributes among the multiple target attributes. The public attribute parsing module is invoked to parse the attribute setting information of the public attributes among the multiple target attributes, and the parsed attribute values of the public attributes among the multiple target attributes are obtained. The attribute setting information of the public attributes includes setting description fields or attribute setting values. The unique attribute parsing module is invoked to parse the attribute setting information of the unique attributes among the multiple target attributes, and the parsed attribute value of the unique attributes among the multiple target attributes is obtained. The attribute setting information of the unique attributes includes setting function code. The material generation module is invoked to generate the front-end code text of the target material based on the parsed attribute values of the multiple target attributes.
2. The method according to claim 1, characterized in that, The common attributes among the multiple target attributes include common special attributes and / or common ordinary attributes. The attribute setting information of the common special attributes is the setting description field of the common special attributes, and the attribute setting information of the common ordinary attributes is the attribute setting value of the common ordinary attributes. The step of calling the common attribute parsing module to parse the attribute setting information of the common attributes among the multiple target attributes, and obtaining the parsed attribute values of the common attributes among the multiple target attributes, includes: The public attribute parsing module is invoked to parse the setting description field of the public special attribute to obtain the parsed attribute value of the public special attribute; and / or The public attribute parsing module is invoked to use the attribute setting value of the public ordinary attribute as the parsed attribute value of the public ordinary attribute; Based on the parsed attribute values of the common special attributes and / or the parsed attribute values of the common ordinary attributes, the parsed attribute values of the common attributes among the multiple target attributes are obtained.
3. The method according to claim 1, characterized in that, The attribute setting information for the unique attributes among the multiple target attributes is the setting function code for the unique attributes; The specific attribute parsing module is invoked to parse the attribute setting information of the specific attributes among the multiple target attributes, and obtain the parsed attribute values of the specific attributes among the multiple target attributes, including: The unique attribute parsing module is invoked to parse the attribute setting function code of the unique attributes among the multiple target attributes, and the parsed attribute values of the unique attributes among the multiple target attributes are obtained.
4. The method according to claim 1, characterized in that, Before matching the plurality of target attributes with preset target common attributes in the target common attribute set to obtain the common attributes among the plurality of target attributes, the method further includes: By comparing the generation logic of multiple attributes of each material, multiple initial common attributes of each material are determined. Based on the multiple initial common attributes of each material, multiple target common attributes of each material are obtained, and the set of target common attributes is obtained based on the multiple target common attributes of each material.
5. The method according to claim 4, characterized in that, The process of obtaining multiple target common attributes of each material based on multiple initial common attributes of each material includes: The logical implementation methods of multiple initial common attributes corresponding to each material are standardized and modified to obtain multiple target common attributes of each material.
6. The method according to claim 4, characterized in that, The process of obtaining multiple target common attributes of each material based on multiple initial common attributes of each material includes: Based on the logical implementation of the newly added common attributes of each material, the newly added common attributes of each material are obtained. By merging the newly added common attributes of each material with the multiple initial common attributes of each material, multiple target common attributes of each material are obtained.
7. The method according to any one of claims 1 to 6, characterized in that, The step of matching the plurality of target attributes with preset target common attributes in a set of target common attributes to obtain common attributes among the plurality of target attributes, and taking the remaining attributes among the plurality of target attributes other than the common attributes as unique attributes among the plurality of target attributes, includes: The multiple target attributes are matched sequentially with the preset target common attributes in the target common attribute set in a preset order to obtain the common attributes and the unique attributes among the multiple target attributes.
8. A code text generation device, characterized in that, include: The acquisition unit is used to acquire attribute setting information for multiple target attributes of the target material; The determining unit is used to match the plurality of target attributes with a preset target common attribute in the target common attribute set to obtain the common attribute among the plurality of target attributes, and to take the remaining attributes among the plurality of target attributes other than the common attribute as the unique attribute among the plurality of target attributes; The parsing unit is used to call the public attribute parsing module to parse the attribute setting information of the public attribute among the multiple target attributes, and obtain the parsed attribute value of the public attribute among the multiple target attributes. The attribute setting information of the public attribute includes a setting description field or an attribute setting value. The parsing unit is further configured to call the unique attribute parsing module to parse the attribute setting information of the unique attribute among the plurality of target attributes, and obtain the parsed attribute value of the unique attribute among the plurality of target attributes, wherein the attribute setting information of the unique attribute includes setting function code; The generation unit is used to call the material generation module to generate the front-end code text of the target material based on the parsed attribute values of the multiple target attributes.
9. A code text generation device, characterized in that, include: Central processing unit and memory; The memory is either a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 7.
11. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1 to 7.