Form creation method, system, and storage medium
By generating a form relationship diagram and template information to create or update the form and its association and inheritance relationships on the second platform, the problem of incomplete form data in the prior art is solved, and fast and complete form creation is achieved.
Patent Information
- Application Number
- CN202210848011.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-07-19
AI Technical Summary
Existing form creation methods cannot effectively handle forms with inheritance and association relationships, resulting in incomplete and unusable form data generated on other platforms.
By generating a form relationship diagram, obtaining the form template information and creating or updating the form and its association and inheritance relationships on the second platform, data integrity is ensured.
It enables the rapid creation of forms on the second platform that are consistent with the first platform, ensuring data integrity and consistency and reducing manpower and time consumption.
Smart Images

Figure CN115328907B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a form creating method, system and storage medium. BACKGROUND
[0002] With the continuous development of computer technology, various industries are developing towards informatization, and need to use network equipment, server equipment, operating system and other hardware and software resources to build a business system with personalized needs to provide industry services. In order to ensure the stable operation of the business system, during the use of the business system, in order to timely discover and solve problems, technical personnel need to manage through the IT operation and maintenance system in an efficient, timely and controllable manner. Among the capabilities of a complete operation and maintenance system, a large number of forms are used to collect information and database tables are used to store data persistently. Traditional forms are customized and developed by developers through code, and after device upgrade or demand change, they often cannot meet the business needs. Therefore, at present, for the application scenario of forms, users can customize forms according to needs, and no longer limited to fixed patterns, and adapt to various changes in needs flexibly; since the application scenario of forms is the statistics of resource information, and resources are not completely independent of each other, resources under the same category may have some same attributes, and a type of resource may need to rely on other types of resource data to maintain the integrity of information, therefore, there are two kinds of inheritance and association between forms, which reduces data redundancy and improves reusability to a certain extent, but at the same time increases the coupling between data, and once the relationship is incomplete, the problem of data loss is caused.
[0003] With the operation and maintenance platform put into operation, in the use process, a complete resource management system will be formed in the platform to meet the changing needs, and a series of functional complete forms are stored in the platform, at this time, if other platforms need to build an operation and maintenance system by referring to the platform, forms and database tables need to be created again. Although the method of creating forms and database tables is simple, the workload is large and mechanical, therefore, in order to save human and time resources, an automatic method is needed to quickly create forms and database tables. However, the commonly used form creating method can only be applied to relatively independent forms, and for forms with inheritance relationship and association relationship, the existing form creating method has the problem of incomplete data and relationship, which leads to that the forms generated on other platforms cannot be used. Therefore, how to automatically generate forms with inheritance relationship and association relationship is a technical problem to be solved urgently. SUMMARY
[0004] Therefore, the present application provides a form creating method, system and storage medium to solve one or more problems in the prior art.
[0005] According to one aspect of the present invention, the present invention discloses a form creation method, the method comprising:
[0006] The first platform obtains form information of a first form stored thereon, determines a first inherited form having an inheritance relationship with the first form and a first associated form having an association relationship with the first form based on the form information of the first form, and generates a form relationship graph based on the obtained form information of the first form, the first inherited form, and the first associated form; nodes in the form relationship graph are form IDs, edges are associations or inheritance relationships between forms, and the form information includes basic form information and form version information;
[0007] Acquire template information of each form in the form relationship diagram, wherein the template information includes table creation information, structure information, and table creation statement information corresponding to the form;
[0008] Obtaining a first associated database table of each form based on form version information of each form in the form relationship diagram, obtaining field information of the first associated database table and field information of its first database sub-table based on the first associated database table, and concatenating the obtained field information of the first associated database table and the obtained field information of the first database sub-table of the first associated database table with corresponding SQL statements to obtain a concatenated statement;
[0009] The second platform imports the template information of each form in the form relationship diagram obtained by the first platform, and creates or updates a second form, a second inherited form having an inheritance relationship with the second form, and a second associated form having an associated relationship with the second form based on the obtained template information;
[0010] The second platform executes the concatenation statement to establish or update a second associated database table and a second database sub-table associated with the second form.
[0011] In some embodiments of the present invention, the second platform imports the template information of each form in the form relationship diagram obtained by the first platform, and creates or updates a second form, a second inherited form having an inheritance relationship with the second form, and a second associated form having an association relationship with the second form based on the obtained template information, including:
[0012] The second platform imports the template information of each form in the form relationship diagram obtained by the first platform;
[0013] Determining whether a form corresponding to the template information is stored on the second platform;
[0014] If no form corresponding to the template information is stored on the second platform, creating a second form, a second inherited form having an inheritance relationship with the second form, and a second associated form having an associated relationship with the second form on the second platform based on the template information;
[0015] If a form corresponding to the template information is stored on the second platform, a second form stored on the second platform, a second inherited form having an inheritance relationship with the second form, and a second associated form having an associated relationship with the second form are updated based on the template information.
[0016] In some embodiments of the present invention, the second platform executes the concatenation statement to establish or update a second associated database table and a second database sub-table associated with the second form, including:
[0017] Determining whether a database table corresponding to the concatenated statement is stored on the second platform;
[0018] If the database table corresponding to the concatenation statement is not stored on the second platform, creating a second associated database table and a second database sub-table associated with the second form based on the concatenation statement;
[0019] If a database table corresponding to the concatenation statement is stored on the second platform, the second database table and the second database sub-table associated with the second form are updated based on the concatenation statement.
[0020] In some embodiments of the present invention, the method further comprises:
[0021] The second platform receives a modification operation on the second form, the second inherited form and / or the second associated form;
[0022] Obtaining form information of the modified form and database table information associated with the modified form, and obtaining platform configuration information of the second platform;
[0023] Adding a modification identifier to the form information of the modified form;
[0024] A feedback file is generated based on the form information with the modification identifier added and the platform configuration information of the second platform and fed back to the first platform.
[0025] In some embodiments of the present invention, the method further comprises:
[0026] After receiving the feedback file, the first platform creates a new version form based on the feedback file.
[0027] In some embodiments of the present application, determining the first inheritance form having an inheritance relationship with the first form and the first association form having an association relationship with the first form based on form information of the first form comprises:
[0028] storing the ID information of the first form into an array and a queue;
[0029] obtaining the first inheritance form inherited by the form stored in the queue based on form basic information of the form stored in the queue, judging whether the array stores the ID information of the first inheritance form, and storing the ID information of the first inheritance form into the array and the queue in the case that the array does not store the ID information of the first inheritance form;
[0030] obtaining the first association form associated with the form stored in the queue based on form version information of the form stored in the queue, judging whether the array stores the ID information of the first association form, and storing the ID information of the first association form into the array and the queue in the case that the array does not store the ID information of the first association form;
[0031] in the case that the queue is empty, taking the form corresponding to the ID information in the array as all forms having an inheritance relationship and an association relationship with the first form.
[0032] In some embodiments of the present application, the form basic information comprises form ID, form name, form description information, creation time, creator, creation type, inheritance form ID; and the form version information comprises version ID, form basic information ID, form name, form version number, version state, version description information, form structure, creation time, creator, and associated database table.
[0033] In some embodiments of the present application, the first platform is a central platform, and the second platform is a project-level platform supervised by the first platform.
[0034] According to another aspect of the present application, a form creation system is also disclosed, which comprises a processor and a memory, the memory storing computer instructions, and the processor being configured to execute the computer instructions stored in the memory, so that the system implements the steps of the method according to any one of the above embodiments.
[0035] According to still another aspect of the present application, a computer readable storage medium is also disclosed, which stores a computer program, and the program is executed by a processor to implement the steps of the method according to any one of the above embodiments.
[0036] The form creation method, system and storage medium disclosed in the present invention first generate a form relationship diagram before obtaining form template information. The form relationship diagram includes a first associated form that has an associated relationship with the first form and a first inherited form that has an inheritance relationship with the first form, and the obtained form template information includes form template information of the inherited form and the associated form; thus, the form created by the second platform based on the obtained form template information takes into account the inheritance relationship and the associated relationship between the forms, thereby ensuring the integrity of the form data and relationships, not only making the second form created by the second platform usable, but also ensuring the consistency of the second form on the second platform with the first form on the first platform, and further realizing the rapid creation of the second form.
[0037] Additional advantages, objects, and features of the present invention will be set forth in part in the following description and will in part become apparent to those skilled in the art upon examination of the following or may be learned by practice of the present invention. The objects and other advantages of the present invention may be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as in the accompanying drawings.
[0038] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present invention are not limited to the above specific descriptions, and the above and other purposes that can be achieved by the present invention will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are intended to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention. The components in the drawings are not drawn to scale, but are merely for the purpose of illustrating the principles of the present invention. To facilitate the illustration and description of certain portions of the present invention, corresponding portions in the drawings may be exaggerated, that is, may be larger than other components in an exemplary device actually manufactured according to the present invention. In the drawings:
[0040] Figure 1 The figure is a flowchart of a form creation method according to an embodiment of the present invention.
[0041] Figure 2 This is a form relationship diagram according to an embodiment of the present invention.
[0042] Figure 3 A schematic diagram of a process for generating a form template on a first platform according to an embodiment of the present invention.
[0043] Figure 4 A schematic diagram of a process for creating a second form on a second platform according to an embodiment of the present invention.
[0044] Figure 5 The figure is a flow chart of establishing a form relationship diagram according to an embodiment of the present invention.
[0045] Figure 6 A schematic diagram of a process for generating a feedback file on a second platform according to an embodiment of the present invention.
[0046] Figure 7 The figure is a flowchart of a first platform processing a feedback file according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] To make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0048] It should be noted here that, in order to avoid obscuring the present invention due to unnecessary details, the accompanying drawings only show structures and / or processing steps closely related to the solutions according to the present invention, while other details that are not closely related to the present invention are omitted.
[0049] It should be emphasized that the terms “include / comprises / has” when used herein refer to the existence of features, elements, steps or components, but do not exclude the existence or addition of one or more other features, elements, steps or components.
[0050] As the central platform performs resource maintenance, its functionality gradually becomes more complete, and a large number of resource forms have already been created. If a similar project-level operation and maintenance platform needs to be built, creating these resource forms is a repetitive and time-consuming task, even with the existing central platform as a reference. Therefore, the present invention provides a form creation method that automates the form creation process by introducing a form template file. The template information in the template file records the information, structure, and table creation statements required to create a resource form.
[0051] The form creation method of the present invention can be used to build an operations and maintenance platform, that is, to quickly establish a new operations and maintenance platform using existing resource forms in a complete operations and maintenance platform. This method primarily involves a central platform and a project-level platform. The central platform is a platform with comprehensive operations and maintenance capabilities, with a large number of resource forms and database tables already created on it. The project-level platform is a new operations and maintenance platform that needs to be established. In the following embodiments of the present invention, the central platform may be the first platform, while the project-level platform may be the second platform.
[0052] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0053] Figure 1 FIG. 1 is a flow chart of a form creation method according to an embodiment of the present invention. Figure 1 As shown, the form creation method at least includes steps S10 to S50.
[0054] Step S10: The first platform obtains form information of the first form stored thereon, determines a first inheritance form having an inheritance relationship with the first form and a first association form having an association relationship with the first form based on the form information of the first form, and generates a form relationship graph based on the obtained form information of the first form, the first inheritance form, and the first association form; the nodes in the form relationship graph are form IDs, the edges are associations or inheritance relationships between forms, and the form information includes basic form information and form version information.
[0055] Since the resource forms stored on the first platform are mounted under the resources, the resources can be divided into different categories according to the resource categories and resource types, thereby forming a tree-structured resource directory. Resources belonging to the same category may have some common attributes, so a form can be established to be responsible for collecting these common attribute data, and the form can be mounted under the resource category. The form associated with the specific resource can inherit the fields in the resource category associated form, thereby forming an inheritance relationship between the forms. The data of a field in a form can be obtained by relying on the data in other forms, so an association relationship is formed between the forms. In order to ensure the integrity of the fields and data of the second form subsequently established by the second platform after importing the template information, this application uses a form integrity verification algorithm to search for all first associated forms or first inherited forms that have inheritance and association relationships with the first form that currently needs to be exported.
[0056] Specifically, the first platform is a platform that already has complete operation and maintenance capabilities, that is, it stores a large number of resource forms and database tables. In this case, the first form on the first platform is a form to be constructed on the second platform. Because the first inherited form or the first associated form that has an inheritance and association relationship with the first form may further have forms that have inheritance and association relationships with them, the nodes in the form relationship graph illustratively include the first form ID, the first inherited form ID that has an inheritance relationship with the first form, the first associated form ID that has an association relationship with the first form, the form ID that has an inheritance relationship or an association relationship with the first associated form, and the form ID that has an inheritance relationship or an association relationship with the first inherited form.
[0057] The form information includes basic form information and form version information. The basic form information further includes the following information: form ID, form name, form description information, creation time, creator, creation type, and inherited form ID. The form version information further includes the following information: version ID, basic form information ID, form name, form version number, version status, version description information, form structure, creation time, creator, and associated database table. It should be understood that the above information types included in the basic form information and form version information are merely examples. In other embodiments, the basic form information and form version information may also include other information or less information than the above-listed types.
[0058] For example, the basic information of the form is as follows:
[0059]
[0060]
[0061] In one embodiment, determining a first inherited form having an inheritance relationship with the first form and a first associated form having an association relationship with the first form based on form information of the first form specifically includes the following steps: storing ID information of the first form in an array and a queue; obtaining a first inherited form inherited by the form stored in the queue based on basic form information of the form stored in the queue, determining whether the ID information of the first inherited form is stored in the array; if the ID information of the first inherited form is not stored in the array, storing the ID information of the first inherited form in the array and the queue; obtaining a first associated form associated with the form stored in the queue based on form version information of the form stored in the queue, determining whether the ID information of the first associated form is stored in the array; if the ID information of the first associated form is not stored in the array, storing the ID information of the first associated form in the array and the queue; and if the queue is empty, treating the forms corresponding to the ID information in the array as all forms having an inheritance relationship and an association relationship with the first form.
[0062] Step S20: Acquire template information of each form in the form relationship diagram, wherein the template information includes table creation information, structure information, and table creation statement information corresponding to the form.
[0063] This step is for the first platform to generate template information for the form. Each form in the form relationship diagram includes the first form, the first inherited form that has an inheritance relationship with the first form, and the first associated form that has an association relationship with the first form. In addition, the first associated form and the first inherited form also have forms that have an association relationship and an inheritance relationship with each other. Since the form relationship diagram includes all forms that have an association relationship and an inheritance relationship with the first form, the template information generated by the first platform includes template information for all forms that have an association relationship and an inheritance relationship with the first form. Exemplarily, the information structure stored in the template information is as follows:
[0064]
[0065] The detailed description of the information structure stored in the template information is shown in the following table:
[0066] Key Value type illustrate form JSON object Form Information version JSON object Information about the currently enabled version of the form insertSql Array of Strings SQL statements to create database tables and fields fileType String Identifier, temp indicates that the file is a template file
[0067] Step S30: Based on the form version information of each form in the form relationship diagram, the first associated database table of each form is obtained; based on the first associated database table, its field information and the field information of its first database sub-table are obtained; the obtained field information of the first associated database table and the field information of the first database sub-table of the first associated database table are respectively spliced with corresponding SQL statements to obtain a spliced statement.
[0068] The form version information includes an associated database table information field. Therefore, based on the associated database table information field corresponding to each form, the associated first associated database table and the field information of the first associated database table can be determined. In addition, since some first associated database tables also have sub-tables, in order to ensure data integrity, the field information of the first database sub-table under the first associated database table is further obtained at this time, and the obtained field information of the first associated database table and the field information of the first database sub-table are further spliced into the corresponding SQL statement.
[0069] For example, the database table information is as follows:
[0070]
[0071] Specifically, all fields in a data table can be queried based on the data table's ID information. Furthermore, for a first associated database table associated with a first database sub-table, its database table information also includes database table association information, such as {mainTabId / / main table ID subTabId / / sub-table ID}. When querying associated database tables, all sub-tables associated with the first associated database table (main table) can be queried based on its ID information.
[0072] Step S40: The second platform imports the template information of each form in the form relationship graph obtained by the first platform, and creates or updates the second form, the second inherited form having an inheritance relationship with the second form, and the second associated form having an association relationship with the second form based on the obtained template information.
[0073] In this step, the second platform establishes the second form based on the template information generated by the first platform, and the established second form is consistent with the first form. The second platform establishes the form based on the form template information generated by the first platform, so that not only the second form consistent with the first form saved on the first platform can be quickly created on the project-level platform, but also the data integrity of the created form is ensured, and the data of the newly created second form on the second platform is ensured to be available.
[0074] For example, step S40 specifically includes the following steps: the second platform imports the template information of each form in the form relationship graph obtained by the first platform; it is judged whether the form corresponding to the template information is stored on the second platform; if the form corresponding to the template information is not stored on the second platform, the second form, the second inherited form having an inheritance relationship with the second form, and the second associated form having an association relationship with the second form are created on the second platform based on the template information; if the form corresponding to the template information is stored on the second platform, the second form, the second inherited form having an inheritance relationship with the second form, and the second associated form having an association relationship with the second form stored on the second platform are updated based on the template information.
[0075] Step S50: The second platform executes the splicing statement to establish or update the second associated database table and the second database sub-table associated with the second form.
[0076] In this step, the second platform establishes the second associated database table and the second database sub-table. Specifically, when the second platform saves the database table with the same ID as the first associated database table and the first database sub-table, the second platform does not need to be newly established at this time, and only information updating or version updating is performed on the second associated database table and the second database sub-table already saved thereon. If the second platform does not save the database table with the same ID as the first associated database table and the first database sub-table, the second platform newly establishes the corresponding database table based on the splicing statement at this time.
[0077] Exemplarily, step S50 specifically includes: determining whether a database table corresponding to the concatenation statement is stored on the second platform; if the database table corresponding to the concatenation statement is not stored on the second platform, establishing a second associated database table and a second database sub-table associated with the second form based on the concatenation statement; if the database table corresponding to the concatenation statement is stored on the second platform, updating the second database table and the second database sub-table associated with the second form based on the concatenation statement.
[0078] Figure 4 This is a flow chart of creating a second form on the second platform of an embodiment of the present invention. In this case, the second platform serves as a project-level platform, and the corresponding first platform serves as a central platform for supervising the project-level platform. Figure 4 As shown, when the project-level platform imports the resource template information corresponding to the first form, it first imports the resource template file provided by the central platform; then reads the data of the form field in the template file to determine whether the form exists in the project-level platform; if the form exists, the basic information data of the form is updated according to the value of form, the value of version in the template file is read, a version is created and set as the currently enabled version; if the form does not exist, a form is created according to form, a version is created according to version and set as the currently enabled version of the form; finally, the insertSql in the template information file is read, and the SQL statement is executed to create or update the database table associated with the form and the fields of the database table.
[0079] In some embodiments of the present invention, the form creation method also includes the following steps: the second platform receives the modification operation on the second form, the second inherited form and / or the second associated form; obtains the form information of the modified form and the database table information associated with the modified form, and obtains the platform configuration information of the second platform; adds a modification identifier to the form information of the modified form; generates a feedback file based on the form information with the added modification identifier and the platform configuration information of the second platform and feeds it back to the first platform.
[0080] In this embodiment, when the second form created by the second platform is modified by the user, the second platform further generates a feedback file and provides feedback to the first platform. Figure 6The flowchart of the second platform generating the feedback file of an embodiment of the present invention is shown in this figure. In the figure, the central platform is the first platform, and the project-level platform is the second platform. After the project-level platform imports the template provided by the central platform to establish the form and database table, if there is any modification to it, it records whether the form has been modified by setting a field in the form information. In the corresponding system, the user can choose whether the feedback file generated by the second platform is exported. When export is selected, the second platform filters all modified form IDs by modifying the record field, and obtains the basic information of the form and the currently enabled version information of the form through the form ID; obtains the information of the associated database table and the field information of the table through the relationCSTable field in the form version information, and splices the SQL statement that establishes the database table field during import; further, the project-level platform determines whether the table is associated with a sub-table based on the database table ID. If it is associated with a sub-table, it obtains the information of the sub-table and the field information of the sub-table and splices the SQL statement; further, it obtains the configuration information of the project-level platform, and resets the value of the modified record field in the form information to prepare for the next generation of the feedback file. Exemplarily, the information structure stored in the feedback file is as follows:
[0081]
[0082] The detailed description of the information structure stored in the feedback file is shown in the following table:
[0083]
[0084]
[0085] In another embodiment, the form creation method further includes: after the first platform receives the feedback file, creating a new version of the form based on the feedback file. Figure 7As shown, at this time, the central platform imports the feedback file of the project-level platform, adds a record of the feedback file to the database, and adds a file processing status field; further, the central platform compares the form corresponding to the feedback file with the existing form of the central platform to determine whether the corresponding form in the feedback file can be stored in the central platform database; if it needs to be stored in the central library, determine whether the form already exists in the central library; if it already exists in the central library, create a new version for the form based on the version information in the feedback file; if it does not exist in the central library, read the form and version from the feedback file, create the form and establish the version, and establish the corresponding template and set the properties of the project-level platform in the template information data. In addition, if the central platform determines that the form corresponding to the feedback file does not need to be stored in the central library, the feedback file is directly discarded; after the file processing status field is added, when the central platform has processed the feedback file, it further modifies or updates the information corresponding to the file processing status field.
[0086] In this embodiment, when the form in the feedback file is not saved on the central platform, the central platform can create a corresponding form based on the received feedback file. At this time, the central platform can also be regarded as the second platform, and the project-level platform can be regarded as the first platform for generating template files.
[0087] In another embodiment, before the first platform generates the template file, the user can select one or more resource template files to be generated or exported, such as Figure 3As shown, the IDs of all resource templates selected by the user are obtained, resulting in a first array (template ID array) that is sent to the server. Upon receiving the first array, the server traverses it, obtaining all information about the corresponding resource template using the resource template ID. The template information includes the form ID of the form corresponding to the template. The form ID is used to obtain basic form information and detailed information about the currently active version of the form. Further form integrity verification is performed. If forms have relationships, the templates associated with the associated forms must be exported simultaneously during export. Otherwise, the form integrity will be incorrect, resulting in unusable forms. By parsing the form structure field data in the form information, information about the associated forms can be queried for each form. If forms have an inheritance relationship, templates associated with the inherited form must also be exported during export. Information about the inherited forms can be recursively queried using the form inheritance ID field in the form information. Once all form IDs to be exported have been obtained, a formFile object is created to store the relevant information about the exported forms and generate a form array. Traverse the form array and obtain basic form information, the current version of the form, and the database associated with the form using the form ID. Furthermore, obtain information about the associated database table and its fields based on the associated database table fields, and assemble the SQL statements used to create the database table fields during import. Furthermore, determine whether the database table is associated with a sub-table based on the database table ID. If so, obtain the sub-table information and field information, and assemble the SQL statements.
[0088] Through the above embodiments, it can be found that there will be an inheritance relationship between forms, that is, the child form has all or part of the fields of the parent form, and has some fields unique to it; there will also be an association relationship between forms, that is, the data of a certain field in one form will be obtained by relying on another form. When the second platform of the present invention imports the template file corresponding to the form, if there is an inheritance relationship, the template file corresponding to its parent form will be imported; if there is an association relationship, the template file corresponding to the associated form will be imported, thereby ensuring the normal use of the second form created by the second platform. At the same time, a form that has an inheritance and association relationship with a form may also have a form that has an inheritance and association relationship with itself. In order to facilitate the search for associated forms and inherited forms through a directed graph search algorithm, the present invention describes the inheritance and association relationship in the form through a directed form relationship graph with a data structure. As Figure 2 As shown in the figure, the vertices of the form relationship graph are forms, and the edge between two vertices indicates that there is an inheritance or association relationship between the corresponding two forms. The edge points from the child form to the parent form, and from the current form to the form associated with a field in the current form.
[0089] In order to ensure the integrity of the form created by the second platform, when the first platform generates the template information of the form, all the forms having inheritance relationship and association relationship with the first form need to be searched from the directed form relationship graph. At this time, the first form which needs to be exported is taken as the initial point, the forms to be searched are maintained by storing the form IDs in a queue, and the forms which have been searched are maintained by storing the form IDs in an array. The uniqueness of the form IDs stored in the array should be ensured so that the form IDs stored in the array are not repeated.
[0090] Figure 5 The flowchart for establishing the form relationship graph in an embodiment of the present application is shown in FIG. 1. In this embodiment, the ID of the first form of the initial point is added to the array and the queue first; the form basic information of the head form in the queue is obtained, the form inherited by the head form is obtained based on the inheritance form information in the form basic information, and it is verified whether the form exists in the array. If not, it is added to the array and the queue; the fields corresponding to the form structure information in the form version information of the head form are parsed, the forms associated with the head form are obtained, and it is verified whether the associated forms exist in the array. If not, they are added to the array and the queue; it is judged whether the queue is empty. When the queue still has unexecuted form elements, the above two steps of determining the inherited forms and the associated forms are repeated; until the queue is empty, the forms stored in the array at this time are all the forms having inheritance and association relationship with the current form. Figure 5
[0091] Correspondingly, the present application also discloses a form creating system, which comprises a processor and a memory. The memory stores computer instructions. The processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps of the method according to any one of the above embodiments.
[0092] It can be found from the above embodiments that the central platform can generate templates according to existing resource forms and provide the templates to the project-level platform in the form of offline files. When the project-level platform is built, the templates are directly imported to achieve the effect of quickly creating resource forms. If the project-level platform modifies the resource forms, the modified forms are returned to the central platform in the form of feedback files to ensure that the central platform has the highest level of management on the resource forms and the templates. Thus, the form creating method and system disclosed by the present application realize the quick creation of forms and ensure the integrity of newly created form data and relationships. Not only can the second form created by the project-level platform be used, but also the consistency of the second form on the project-level platform and the first form on the central platform is ensured.
[0093] In addition, the present application also discloses a computer readable storage medium, which stores a computer program. When the program is executed by a processor, the steps of the method according to any one of the above embodiments are implemented.
[0094] Those skilled in the art will appreciate that the various exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether hardware or software is used depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the present invention. When implemented in hardware, it may be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment may be stored in a machine-readable medium or transmitted over a transmission medium or communication link via a data signal carried in a carrier wave. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. The code segments may be downloaded via a computer network such as the Internet or an intranet.
[0095] It should also be noted that the exemplary embodiments described herein describe methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the steps described above. In other words, the steps may be performed in the order described in the embodiments, or in a different order, or several steps may be performed simultaneously.
[0096] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or replace features of other embodiments.
[0097] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A form creation method, characterized in that: The method comprises: The first platform obtains form information of a first form stored thereon, determines a first inherited form having an inheritance relationship with the first form and a first associated form having an association relationship with the first form based on the form information of the first form, and generates a form relationship graph based on the obtained form information of the first form, the first inherited form, and the first associated form; nodes in the form relationship graph are form IDs, edges are associations or inheritance relationships between forms, and the form information includes basic form information and form version information; Acquire template information of each form in the form relationship diagram, wherein the template information includes table creation information, structure information, and table creation statement information corresponding to the form; Obtaining a first associated database table of each form based on form version information of each form in the form relationship diagram, obtaining field information of the first associated database table and field information of its first database sub-table based on the first associated database table, and concatenating the obtained field information of the first associated database table and the obtained field information of the first database sub-table of the first associated database table with corresponding SQL statements to obtain a concatenated statement; The second platform imports the template information of each form in the form relationship diagram obtained by the first platform, and creates or updates a second form, a second inherited form having an inheritance relationship with the second form, and a second associated form having an associated relationship with the second form based on the obtained template information; The second platform executes the concatenation statement to establish or update a second associated database table and a second database sub-table associated with the second form.
2. The form creation method according to claim 1, characterized in that: The second platform imports the template information of each form in the form relationship diagram obtained by the first platform, and creates or updates a second form, a second inherited form having an inheritance relationship with the second form, and a second associated form having an associated relationship with the second form based on the obtained template information, including: The second platform imports the template information of each form in the form relationship diagram obtained by the first platform; Determining whether a form corresponding to the template information is stored on the second platform; If no form corresponding to the template information is stored on the second platform, creating a second form, a second inherited form having an inheritance relationship with the second form, and a second associated form having an associated relationship with the second form on the second platform based on the template information; If a form corresponding to the template information is stored on the second platform, a second form stored on the second platform, a second inherited form having an inheritance relationship with the second form, and a second associated form having an associated relationship with the second form are updated based on the template information.
3. The form creation method according to claim 1, wherein: The second platform executes the concatenation statement to establish or update a second associated database table and a second database sub-table associated with the second form, including: Determining whether a database table corresponding to the concatenated statement is stored on the second platform; If the database table corresponding to the concatenation statement is not stored on the second platform, creating a second associated database table and a second database sub-table associated with the second form based on the concatenation statement; If a database table corresponding to the concatenation statement is stored on the second platform, the second database table and the second database sub-table associated with the second form are updated based on the concatenation statement.
4. The form creation method according to claim 1, wherein: The method further comprises: The second platform receives a modification operation on the second form, the second inherited form and / or the second associated form; Obtaining form information of the modified form and database table information associated with the modified form, and obtaining platform configuration information of the second platform; Adding a modification identifier to the form information of the modified form; A feedback file is generated based on the form information with the modification identifier added and the platform configuration information of the second platform and fed back to the first platform.
5. The form creation method according to claim 4, characterized in that: The method further comprises: After receiving the feedback file, the first platform creates a new version form based on the feedback file.
6. The form creation method according to claim 1, wherein: Determining, based on the form information of the first form, a first inherited form having an inheritance relationship with the first form and a first associated form having an associated relationship with the first form, includes: Store the ID information of the first form into arrays and queues; obtaining a first inherited form inherited by the form stored in the queue based on basic form information of the form stored in the queue, determining whether the array stores ID information of the first inherited form; and if the array does not store the ID information of the first inherited form, storing the ID information of the first inherited form in the array and the queue; obtaining, based on form version information of the form stored in the queue, a first associated form associated with the form stored in the queue, determining whether ID information of the first associated form is stored in the array; and if the ID information of the first associated form is not stored in the array, storing the ID information of the first associated form in the array and the queue; When the queue is empty, the forms corresponding to the ID information in the array are regarded as all forms having inheritance and association relationships with the first form.
7. The form creation method according to claim 1, characterized in that: The basic form information includes form ID, form name, form description information, creation time, creator, creation type, and inherited form ID; the form version information includes version ID, form basic information ID, form name, form version number, version status, version description information, form structure, creation time, creator, and associated database table.
8. The form creation method according to any one of claims 1 to 7, characterized in that: The first platform is a central platform, and the second platform is a project-level platform supervised by the first platform.
9. A form creation system, comprising a processor and a memory, characterized in that: The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Structured automatic storage method based on IFC mode and mapping model thereof
CN110059086A
Method for creating data table and computing equipment
CN110909003A