Form modification method and device, computer device and computer readable storage medium
By directly modifying the table of the second form in the first form and sending a save command, the cumbersome operation of exiting the current form for form modification in the existing technology is solved, and a more efficient form modification process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KINGDEE SOFTWARE(CHINA) CO LTD
- Filing Date
- 2024-12-17
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, modifying a form requires exiting the current form before modifications can be made, which is cumbersome.
The first form displays the table of the second form, responds to the user's field modification operation, generates the second form, and sends the modified table metadata to the server to update the metadata of the second form through the save command.
It simplifies form modification, reduces the steps users need to switch between different forms, and improves operational efficiency and user experience.
Smart Images

Figure CN119903825B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a form modification method, apparatus, computer device, and computer-readable storage medium. Background Technology
[0002] If you reference another form within a form, and need to modify the other form, you must first exit the current form, then open the other form, make the changes, save them, and then return to the original form to refresh it before the modified form becomes available. Clearly, modifying a referenced form requires exiting the current form and then accessing the referenced form, which is quite cumbersome. Summary of the Invention
[0003] Therefore, it is necessary to provide a form modification method, apparatus, computer device, and computer-readable storage medium that simplifies form modification operations to address the aforementioned technical problems.
[0004] Firstly, this application provides a form modification method applied to a client, the method comprising:
[0005] The first form displays the first table, which is a table of the second form, and the second form is any form referenced by the first form;
[0006] In response to the user's modification operation on the fields of the first table, the fields in the first table are modified to obtain the second table;
[0007] In response to a user's first save operation on the first form, a first save instruction is sent to the server. The first save instruction includes the metadata of the first form, and the metadata of the first form includes the metadata of the second form. The first save instruction is used by the server to update the metadata of the second form based on the metadata of the second form.
[0008] In one embodiment, the step of modifying the fields in the first table to obtain the second table in response to a user's modification operation on a field of the first table includes:
[0009] If the client has permission to modify the second form, in response to the user's modification operation on the fields of the first form, the fields in the first form are modified to obtain the second form.
[0010] In one embodiment, the method further includes:
[0011] Display the second form within the first form;
[0012] In response to the user's data entry operation on the first field of the second table, the entered data in the first field is determined, and the first field is any field in the second table;
[0013] In response to the user's second save operation on the first form, a second save instruction is sent to the server. The second save instruction includes the input data of the first form, which includes the input data of the second form. The second save instruction is used by the server to determine the input data of the second form based on the input data of the second form.
[0014] In one embodiment, the client includes an associated form component, and the method further includes:
[0015] In response to the user's operation on the associated form component in the first form, a list of associated forms is displayed;
[0016] In response to the user's selection of the second form in the associated form list, the second form is displayed in the first form;
[0017] The display of the first form in the first form includes:
[0018] In response to the user's operation to display the second form, the first form is displayed in the first form.
[0019] Secondly, this application provides a form modification method applied to a server, the method comprising:
[0020] Receive a first save instruction from the client, the first save instruction including metadata of the first form;
[0021] If it is determined from the metadata of the first form that the first form references the second form, the second form is determined from the metadata of the first form, wherein the second form is any form referenced by the first form, and the second form is a table form of the second form included in the metadata of the first form;
[0022] If the metadata of the second table differs from the metadata of the second form, update the metadata of the second form according to the second table.
[0023] In one embodiment, updating the metadata of the second form according to the second form includes:
[0024] If the metadata of the second form does not include the first field, add the first field to the metadata of the second form;
[0025] If the metadata of the second form includes a first field, but the attributes of the first field are different in the metadata of the second table and the second form, then update the attributes of the first field in the metadata of the second form according to the attributes of the first field in the second table;
[0026] If the second field exists, delete the second field from the metadata of the second form;
[0027] The first field is any field in the second table, and the second field is a field that exists in the metadata of the second form but does not exist in the second table.
[0028] In one embodiment, updating the attribute of the first field in the metadata of the second form according to the attribute of the first field in the second form includes:
[0029] If the second form does not isolate the attributes of the first field, update the attributes of the first field in the metadata of the second form according to the attributes of the first field in the second form.
[0030] In one embodiment, determining the second form based on the metadata of the first form includes:
[0031] If the client has permission to modify the second form, the second form is determined based on the metadata of the first form.
[0032] In one embodiment, the method further includes:
[0033] Identify the form that references the second form to obtain the first form set;
[0034] Update the data of the second form in the forms included in the first form set based on the updated metadata of the second form;
[0035] If a first form is stored, update the stored metadata of the first form based on the metadata of the first form;
[0036] Identify the form that references the first form to obtain the second form set;
[0037] Update the data of the second form in the forms included in the second form set based on the updated metadata of the second form.
[0038] In one embodiment, the method further includes:
[0039] If the first form is not stored, the first form is generated based on the metadata of the first form.
[0040] In one embodiment, the method further includes:
[0041] Receive a second save instruction from the client, the second save instruction including the data entered in the first form;
[0042] If the data entered in the first form includes the data entered in the second form, and there is a data entry process for the second form, the data entry process for the second form is started based on the data entered in the second form.
[0043] When the data entry process is completed and the result of the data entry process is "pass", the data entered in the second table is determined as the data entered in the second form.
[0044] Thirdly, this application also provides a form modification device for use on a client side, the device comprising:
[0045] The display unit is used to display a first table in a first form, wherein the first table is a table of a second form, and the second form is any form referenced by the first form;
[0046] The modification unit is used to modify the fields in the first table in response to the user's modification operation on the fields of the first table, so as to obtain the second table;
[0047] A communication unit is configured to send a first save instruction to a server in response to a user's first save operation on the first form. The first save instruction includes metadata of the first form, and the metadata of the first form includes metadata of the second form. The first save instruction is used by the server to update the metadata of the second form based on the metadata of the second form.
[0048] Fourthly, this application also provides a form modification device applied to a server, the device comprising:
[0049] A communication unit is configured to receive a first save instruction from a client, the first save instruction including metadata of a first form;
[0050] The determining unit is configured to determine a second form based on the metadata of the first form when it is determined from the metadata of the first form that the first form references a second form, wherein the second form is any form referenced by the first form, and the second form is a table form of the second form included in the metadata of the first form;
[0051] An update unit is used to update the metadata of the second form according to the second form when the metadata of the second table is different from the metadata of the second form.
[0052] Fifthly, this application also provides a computer device having a client installed thereon, including a memory, a transceiver, and a processor:
[0053] The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations:
[0054] The first form displays the first table, which is a table of the second form, and the second form is any form referenced by the first form;
[0055] In response to the user's modification operation on the fields of the first table, the fields in the first table are modified to obtain the second table;
[0056] In response to a user's first save operation on the first form, a first save instruction is sent to the server. The first save instruction includes the metadata of the first form, and the metadata of the first form includes the metadata of the second form. The first save instruction is used by the server to update the metadata of the second form based on the metadata of the second form.
[0057] Sixthly, this application also provides a computer device, which is a server, including a memory, a transceiver, and a processor:
[0058] The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations:
[0059] Receive a first save instruction from the client, the first save instruction including metadata of the first form;
[0060] If it is determined from the metadata of the first form that the first form references the second form, the second form is determined from the metadata of the first form, wherein the second form is any form referenced by the first form, and the second form is a table form of the second form included in the metadata of the first form;
[0061] If the metadata of the second table differs from the metadata of the second form, update the metadata of the second form according to the second table.
[0062] In a seventh aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0063] Eighthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0064] In this embodiment, the client displays a first table of a second form within a first form. In response to a user's modification of fields in the first table, the client modifies the fields in the first table to obtain the second table. In response to a user's first save operation on the first form, the client sends a first save command to the server. If the server determines that the first form references the second form based on the metadata of the first form, it determines the second table based on the metadata of the first form. If the metadata of the second table differs from the metadata of the second form, the server updates the metadata of the second form based on the metadata of the second form. Therefore, when one form references another form, if a user needs to modify the other form, they can directly modify the table of the other form within this first form and then save the form. The backend server can then directly update the stored metadata of the other form based on the modified table. Since there is no need to exit the first form to modify the second form, user operations are reduced, thus simplifying form modification operations. Attached Figure Description
[0065] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0066] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application;
[0067] Figure 2 This is a flowchart illustrating a form modification method provided in an embodiment of this application;
[0068] Figure 3 This is a schematic diagram illustrating how a client displays a first form in a first form, as provided in an embodiment of this application.
[0069] Figure 4 This is a schematic diagram illustrating how a client displays a second form within a first form, as provided in an embodiment of this application.
[0070] Figure 5 This is an illustration of updated metadata for a second form provided in an embodiment of this application;
[0071] Figure 6This is a flowchart illustrating another form modification method provided in an embodiment of this application;
[0072] Figure 7 This is a schematic diagram of data entry in the second table of a first form provided in an embodiment of this application;
[0073] Figure 8 This is a schematic diagram of the structure of a form modification device provided in an embodiment of this application;
[0074] Figure 9 This is a schematic diagram of another form modification device provided in an embodiment of this application;
[0075] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0077] To better understand the embodiments of this application, the network architecture of this application will be introduced first.
[0078] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application. Figure 1 As shown, the network architecture may include a server 101 and multiple clients 102.
[0079] Server 101 is connected to multiple clients 102 via a network. This network can be a local area network (LAN) or a wide area network (WAN).
[0080] Client 102 is a client of server 101.
[0081] When a user needs to use client 102, the user can enter username and password information on the login interface of client 102. After detecting the login request, client 102 can send a login request to server 101. The login request includes username and password information. After receiving the login request, server 101 can verify the username and password information. If both the username and password information are correct, server 101 can send a verification success message to client 102, after which client 102 can communicate with server 101.
[0082] After successfully logging in via client 102, users can perform operations such as form creation, form modification, data entry, and data modification through client 102. Correspondingly, server 102 can store created forms, modified forms, entered data, and modified data.
[0083] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms. Servers can be connected directly or indirectly via wired or wireless communication, and this application embodiment does not impose any restrictions.
[0084] It should be understood that Figure 1 This is an exemplary illustration of the network architecture of this application and does not limit the network architecture of this application.
[0085] Based on the above network architecture Figure 2 This is a flowchart illustrating a form modification method provided in an embodiment of this application. Figure 2 As shown, the form modification method may include the following steps.
[0086] 201. The client displays the first form in the first form.
[0087] The first form is the form that is currently in edit mode. The first form can be an existing form or a newly created form.
[0088] The first form is a table of the second form, meaning it's a table format of the second form, or simply the second form displayed in tabular form. The second form can be any form referenced by the first form. The first form can reference one or more forms.
[0089] If a user needs to modify a referenced second form while creating or modifying the first form, the client can first display the second form in a table format within the first form, that is, display the first table within the first form.
[0090] 202. The client responds to the user's modification operation on the fields of the first table, modifies the fields in the first table, and obtains the second table.
[0091] After the client displays the first form in the first form, if the user needs to modify the second form, the user can modify the fields in the first form. Correspondingly, the client can detect the user's field modification operation in the first form and then modify the fields in the first form to obtain the second form.
[0092] A field modification operation can include one or more modification operations. Modification operations can be field addition, field deletion, field attribute modification, or field order adjustment. Therefore, a field modification operation can include one or more of the following: field addition, field deletion, field attribute modification, and field order adjustment.
[0093] The field add operation is used to add, supplement, or create new fields in the first table. The field delete operation is used to delete fields from the first table. The field order adjustment operation is used to adjust the order of fields in the first table. The field attribute modification operation is used to modify the attributes of fields in the first table. Field attributes are information describing the characteristics of a field. Field attributes can include the field name, field type, field format, field length, required / optional fields, default value, etc.
[0094] Users can modify fields in the first table through one or more modification operations to obtain the second table.
[0095] For example, Figure 3 This is a schematic diagram of a client displaying a first form in a first form according to an embodiment of this application. Figure 4 This is a schematic diagram illustrating how a client displays a second form within a first form, as provided in an embodiment of this application. Figure 3 and Figure 4 As shown, the second table adds a field for developers compared to the first table.
[0096] 203. In response to the user's first save operation on the first form, the client sends a first save command to the server.
[0097] Accordingly, the server receives the first save command from the client.
[0098] After a user modifies the first form to the second form via the client, if the user needs to save the second form, the user can save the first form. Correspondingly, the client can detect the user's first save operation on the first form, and then respond to the first save operation by generating a first save command, which can then be sent to the server.
[0099] The first save instruction may include metadata from the first form. The metadata from the first form may include metadata from the second form.
[0100] 204. If the server determines that the first form references the second form based on the metadata of the first form, the server determines the second form based on the metadata of the first form.
[0101] After receiving the first save command, the server can parse it to obtain the metadata of the first form. Then, based on this metadata, it can determine whether the first form references the second form. If the first form references the second form, the server can determine the second form based on its metadata. The server can extract the data from the second form's metadata and then generate the second form based on that data. The second form is a table format of the second form included in the metadata of the first form.
[0102] When a first form references a second form, the metadata of the first form may also include the identifier of the second form. The server can first determine whether the metadata of the first form includes the identifier of the second form. If the first form's metadata includes the identifier of the second form, it can be determined that the first form references the second form. If the first form's metadata does not include the identifier of the second form, it can be determined that the first form does not reference any other form. The identifier of the second form can be the name of the second form, or it can be any other information that uniquely represents the second form.
[0103] 205. If the metadata of the second table differs from the metadata of the second form, the server updates the metadata of the second form based on the second table.
[0104] After the server identifies the second table, it can determine whether the metadata of the second table is the same as the metadata of the second form. Specifically, it checks if the metadata of the second table is identical to the stored metadata of the second form. If the metadata of the second table is different, it indicates that the user has modified the referenced second form in the first form, and the metadata of the second form can be updated accordingly. This allows modification of one form within another, simplifying form modification operations. If the metadata of the second table is identical, it indicates that the user has not modified the referenced second form in the first form, and the metadata of the second form does not need to be updated.
[0105] For example, Figure 5 This is a schematic diagram of the metadata of an updated second form provided in an embodiment of this application. For example... Figure 5 As shown, the server automatically added the developer field to the metadata of the second form.
[0106] exist Figure 2 In the form modification method shown, the client displays the first table of the second form within the first form. In response to the user's modification operation on a field in the first table, the client modifies the fields in the first table to obtain the second table. In response to the user's first save operation on the first form, the client sends a first save command to the server. If the server determines that the first form references the second form based on the metadata of the first form, it determines the second table based on the metadata of the first form. If the metadata of the second table differs from that of the first form, the server updates the metadata of the second form based on the metadata of the second form. Therefore, when one form references another form, if the user needs to modify the other form, they can directly modify the table of the other form within the first form and then save the form. The backend server can then directly update the stored metadata of the other form based on the modified table. Since there is no need to exit the first form to modify the second form, user operations are reduced, thus simplifying form modification operations.
[0107] Based on the above network architecture Figure 6 This is a flowchart illustrating another form modification method provided in an embodiment of this application. For example... Figure 6 As shown, the form modification method may include the following steps.
[0108] 601. The client displays the first form in the first form.
[0109] The first form is the form that is currently in edit mode. The first form can be an existing form or a newly created form.
[0110] The first form is a table of the second form, meaning it is in the tabular form format of the second form. The second form can be any form referenced by the first form. The first form can reference one or more forms.
[0111] If a user needs to modify a referenced second form while creating or modifying the first form, the client can first display the second form in a table format within the first form, that is, display the first table within the first form.
[0112] In some embodiments, the client may include an associated form component. In response to a user's operation on the associated form component in a first form, the client displays a list of associated forms. In response to a user's selection of a second form in the list of associated forms, the client displays the second form in the first form. In response to a user's operation on displaying the second form, the client displays the first form in the first form.
[0113] During the creation or modification of the first form, if a user needs to reference a second form that is not included in the first form, the user can first interact with the associated form component displayed on the client interface. The client can detect this interaction and respond by displaying a list of associated forms. This list consists of forms that can be referenced by the first form. The client can display the associated form list as a dropdown, in a table, or in other formats. The associated forms included in the list may be the same or different depending on the user using the client.
[0114] If a user needs to associate a form with a second form in the associated form list, the user can select that form. Accordingly, the client can detect this selection and then display the second form within the first form list in response.
[0115] The client can respond to the selection action by displaying the first form in the first form, i.e., displaying the second form in tabular form; or it can respond to the selection action by displaying the second form in the first form as a drop-down menu.
[0116] If the second form referenced by the user does not meet the user's needs, the user can modify the referenced second form. Since it is difficult or impossible for the user to modify the second form when it is displayed as a dropdown, it can be initially displayed as a table. The user can perform a table display operation on the second form, and the client can detect this operation and then respond by displaying the first table within the first form.
[0117] As you can see, users can first select the forms they want to reference, and then switch the referenced forms to a table format for display. Because the table format is more intuitive and displays more information, users can easily understand the form's information, thus improving the user experience.
[0118] 602. If the client has permission to modify the second form, the client responds to the user's modification operation on the fields of the first form by modifying the fields in the first form to obtain the second form.
[0119] Different users may have different permissions. Therefore, some users may have permission to modify certain forms, while others may not.
[0120] After the client displays the first form in the first form, if the user needs to modify the second form, the user can modify fields in the first form. Correspondingly, the client can detect the user's field modification operation in the first form, and then determine whether the client has permission to modify the second form. If the client determines that the client has permission to modify the second form, it can respond to the user's field modification operation in the first form and modify the fields in the first form to obtain the second form. If the client determines that the client does not have permission to modify the second form, the client can choose not to respond to the user's field modification operation in the first form. The client can output a prompt message to inform the user that they do not have the necessary permission, so that the user is clearly aware of the reason why they cannot modify the form.
[0121] Different users have different account information. Therefore, the client can first obtain the current account information, that is, the information of the account currently in use, and then determine whether the user corresponding to the current account information has the permission to modify the second form. If it is determined that the user corresponding to the current account information has the permission to modify the second form, it can be determined that the client has the permission to modify the second form; if it is determined that the user corresponding to the current account information does not have the permission to modify the second form, it can be determined that the client does not have the permission to modify the second form.
[0122] It is evident that users can only modify referenced forms when they have the necessary permissions, and cannot modify them when they do not. This improves the flexibility, efficiency, and security of data management.
[0123] For further detailed description of step 602, please refer to the description of step 202.
[0124] 603. In response to the user's first save operation on the first form, the client sends a first save command to the server.
[0125] Accordingly, the server receives the first save command from the client.
[0126] For a detailed description of step 603, please refer to the description of step 203.
[0127] 604. If the server determines that the first form references the second form based on the metadata of the first form, and the client has the permission to modify the second form, the server determines the second form based on the metadata of the first form.
[0128] After receiving the first save command, the server can parse it to obtain the metadata of the first form. Then, based on this metadata, it can determine whether the first form references the second form. If the first form references the second form, it can determine whether the client has permission to modify the second form. If the client has permission, the server can determine the second form based on the metadata of the first form. If the client does not have permission to modify the second form, steps 604-606 can be skipped, reducing unnecessary processing and saving resources and power consumption. The server's method of determining whether the client has permission to modify the second form is the same as the client's method of determining whether the client has permission to modify the second form; a detailed description can be found below section 602.
[0129] For further detailed description of step 604, please refer to the description of step 204.
[0130] 605. If the metadata of the second form differs from the metadata of the second table, the server updates the metadata of the second form based on the second table.
[0131] After the server identifies the second table, it can determine whether the metadata of the second table is the same as the metadata of the second form. Specifically, it checks if the metadata of the second table is identical to the stored metadata of the second form. If the metadata of the second table is different, it indicates that the user has modified the referenced second form in the first form, and the metadata of the second form can be updated accordingly. This allows modification of one form within another, simplifying form modification operations. If the metadata of the second table is identical, it indicates that the user has not modified the referenced second form in the first form, and the metadata of the second form does not need to be updated.
[0132] The second form can include multiple fields. If the metadata of the second form does not include the first field, the server can add the first field to the metadata of the second form, that is, synchronize the first field from the second form to the metadata of the second form. If the metadata of the second form includes the first field, but the attributes of the first field differ between the metadata of the second form and the second form, the server can update the attributes of the first field in the metadata of the second form based on the attributes of the first field in the second form. If the second field exists, the server can delete the second field from the metadata of the second form. The first field is any field in the second form. The second field is a field that exists in the metadata of the second form but does not exist in the second form.
[0133] The server can determine whether the stored metadata of the second form includes the first field. If it determines that the metadata of the second form does not include the first field, it indicates that the first field is a newly added field, and the first field can be added to the metadata of the second form. Therefore, the server can synchronize all fields added by the user to the second form.
[0134] If the server determines that the metadata of the second form includes the first field, it can check if the attribute of the first field is the same in the metadata of the second form and the second form. If the attribute of the first field is different in the metadata of the second form and the second form, it indicates that the user has modified the attribute of the first field, and the server can update the attribute of the first field in the metadata of the second form based on the attribute of the first field in the second form. If the attribute of the first field is the same in the metadata of the second form and the second form, it indicates that the user has not modified the attribute of the first field, and the server does not need to update the attribute of the first field in the metadata of the second form. Therefore, the server can synchronize the attributes of all fields modified by the user to the second form.
[0135] The server can also determine the existence of a second field; that is, whether there is a field that exists in the metadata of the second form but not in the second form. If the server determines that the second field does not exist, it means the user has not deleted the field from the second form. If the server determines that the second field exists, it means the user has deleted the second field from the second form, and the server can delete the second field from the metadata of the second form. Therefore, the server can delete all fields deleted by the user.
[0136] As can be seen, all modifications made by the user to the second form in the first form that references the second form can be synchronized to the second form, enabling cross-form modifications, simplifying form modification operations, improving form modification efficiency, and enhancing user experience.
[0137] If the second form does not isolate the attributes of the first field, the server can update the attributes of the first field in the metadata of the second form based on the attributes of the first field in the second form.
[0138] If a user doesn't want a specific field's attribute in a form to be modified by other users, they can set attribute isolation for that field. Therefore, if the server determines that the attribute of the first field differs from the metadata of the second form and the second form, it can check if the second form has implemented attribute isolation for the first field. If the second form has implemented attribute isolation, it means that modifications to the first field's attribute in the first form cannot be synchronized to the second form, and the server will not update the attribute of the first field in the second form's metadata. If the second form has not implemented attribute isolation for the first field, it means that modifications to the first field's attribute in the first form can be synchronized to the second form, and the server can update the attribute of the first field in the second form's metadata based on the attribute in the second form.
[0139] Because users can isolate the attributes of a field in a form, different users can set different attributes for this field in different forms that reference this form, which can meet the personalized settings in different scenarios, thereby improving the flexibility of attribute settings, enhancing user experience, and improving the stability and adaptability of the system.
[0140] 606. The server determines the form that references the second form and obtains the first form set. Based on the updated metadata of the second form, the server updates the data of the second form in the forms included in the first form set.
[0141] After the server updates the metadata of the second form, it can determine the first form set from all the forms in the stored database that reference the second form. Then, it can update the data of the second form within the forms included in the first form set, that is, update the data of the second form in the forms that reference the second form. The first form set consists of all forms stored on the server that reference the second form, excluding the first form itself.
[0142] Steps 604 and 606 can be executed sequentially or in parallel.
[0143] 607. The server determines whether the first form is stored. If the first form is not stored, proceed to step 608. If the first form is stored, proceed to step 609.
[0144] After receiving the first save command, the server can parse the first save command to obtain the metadata of the first form. Then it can determine whether the first form is stored. If it is determined that the first form is not stored, it means that the first form is a newly created form, and step 608 can be executed. If it is determined that the first form is stored, it means that the server has already stored the first form, and step 609 can be executed.
[0145] 608. The server generates the first form based on the metadata of the first form.
[0146] If the first form is not stored, the server can generate and store the first form based on its metadata.
[0147] 609. The server updates the stored metadata of the first form based on the metadata of the first form.
[0148] If a first form is stored, the server can update the stored metadata of the first form based on its metadata. The server can add first data to the stored metadata of the first form, delete second data from the stored metadata of the first form, and modify third data from the stored metadata of the first form. The first data is data that exists in the received metadata of the first form but does not exist in the stored metadata of the first form. The second data is data that exists in the stored metadata of the first form but does not exist in the received metadata of the first form. The third data is data that differs between the stored metadata of the first form and the received metadata of the first form.
[0149] 610. The server determines the form that references the first form and obtains the second form set. Based on the updated metadata of the first form, the server updates the data of the first form in the forms included in the second form set.
[0150] After the server updates the metadata of the first form in the storage, it can determine the forms that reference the first form, that is, determine the forms that reference the first form among all the stored forms, and obtain the second form set. Then, based on the updated metadata of the first form, it can update the data of the first form in the forms included in the second form set, that is, update the data of the first form in the forms that reference the first form.
[0151] Steps 601-610 constitute the form design process, while the following process is the form data entry process. It should be understood that the following process is executed after step 610, and the user using the client in the following process may or may not be the same as the user using the client in steps 601-610.
[0152] 611. The client displays the second form in the first form.
[0153] When a user enters data into the first form, and the user needs to enter data into the second form referenced by the first form, the client can display the second form within the first form.
[0154] 612. The client responds to the user's data entry operation in the first field of the second table and determines the entered data in the first field.
[0155] When a user needs to enter data into the first field of the second table, they can perform a data entry operation on the first field of the second table. Accordingly, the client can detect the user's data entry operation on the first field of the second table, and then respond to the data entry operation to determine the entered data in the first field, that is, to determine the data entered by the user as the entered data in the first field.
[0156] The data entered in the first field can include one or more data points.
[0157] For example, Figure 7 This is a schematic diagram illustrating the data entry in the second table of a first form provided in an embodiment of this application. For example... Figure 7 As shown, the user entered data for each field in the second table included in the first form.
[0158] 613. In response to the user's second save operation on the first form, the client sends a second save instruction to the server.
[0159] Accordingly, the server receives a second save operation from the client.
[0160] After the data entry for the first form is complete, the user can save the first form. Correspondingly, the client can detect the user's second save operation on the first form and then send a second save command to the server in response. The second save command can include the data entered in the first form. The data entered in the first form can include the data entered in the second form.
[0161] 614. If the data entered in the first form includes the data entered in the second form, the server determines the data entered in the second form based on the data entered in the second form.
[0162] After receiving the second save command, the server can parse it to obtain the data entered in the first form. It can then determine whether the data entered in the first form includes the data entered in the second form. If the data in the first form includes the data in the second form, the server can use the data from the second form. If the server determines that the data entered in the first form does not include the data from the second form, the server may choose not to process the data entered in the second form.
[0163] The server can first determine whether the client has permission to modify the second form. If the client does have permission, the server can then determine whether the data entered in the first form includes the data entered in the second form. If the server determines that the client has permission to modify the second form, it can skip step 614, avoiding unnecessary operations and thus saving processing resources and reducing power consumption.
[0164] If no data is entered in the second form, the server can recognize the data entered in the second form as the data entered in the second form and save it. If data has already been entered in the second form, the server can update the data entered in the second form based on the data entered in the second form.
[0165] Some forms have a specific data entry process. For example, some forms require an approval process after data entry; the data entry is only complete if the approval is granted, otherwise it needs to be modified or re-entered.
[0166] Therefore, if the data entered in the first form includes data entered in the second form, the server can first determine whether a data entry process for the second form exists. If a data entry process for the second form exists, it can initiate the data entry process for the second form based on the data entered in the second form. If the data entry process ends and the result is successful, the data entered in the second form can be identified as the data entered in the second form. If a data entry process for the second form does not exist, the server can directly identify the data entered in the second form as the data entered in the second form.
[0167] As can be seen, after the data from the second form is entered into the first form, the server can trigger the corresponding process, which can ensure the integrity of the business.
[0168] After the server updates the data in the second form based on the data entered in the second form, it can then update the data in the second form within the first set of forms based on the data entered in the second form. The server can update the data in the second form in all forms that reference it, ensuring data consistency within the system and improving form modification efficiency.
[0169] If no data is entered in the first form, the server can store the data entered in the first form in the first form. If data is entered in the first form, the server can update the stored data of the first form based on the data entered in the first form.
[0170] The server can update the data entered in the first form within the second set of forms based on the data entered in the first form.
[0171] exist Figure 6 In the form modification method shown, when one form references another, if a user needs to modify the other form and has the necessary permissions, they can directly modify the table of the other form within the first form. Afterwards, this form can be saved, allowing the backend server to directly update the stored metadata of the other form based on the modified table. Since there's no need to exit the first form to modify the second, user operations are reduced, simplifying form modification and ensuring data security. Furthermore, the server can synchronously modify the data in the referenced form, enabling modifications to multiple forms simultaneously. This improves form modification efficiency, system stability and applicability, and data consistency and integrity. Moreover, users can enter data into another form within the first form and then save this form. The backend server can then directly verify the entered data in the stored second form based on the data entered in the first form, ensuring business integrity.
[0172] It should be understood that some steps in the above embodiments may be omitted (i.e., not performed). For example, step 606 may be omitted. For example, step 610 may be omitted. For example, steps 611-614 may be omitted.
[0173] It should be understood that the same or corresponding content in different embodiments can be referenced to each other.
[0174] 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.
[0175] Based on the same inventive concept, this application also provides a form modification apparatus for implementing the form modification method described above. The solution provided by this form modification apparatus is similar to the implementation scheme described in the form modification method above. Therefore, the specific limitations in one or more form modification apparatus embodiments provided below can be found in the limitations of the form modification method described above, and will not be repeated here.
[0176] Based on the above network architecture Figure 8 This is a schematic diagram of a form modification device provided in an embodiment of this application. The form modification device can be applied to a client. The form modification device may include:
[0177] Display unit 801 is used to display a first table in a first form, wherein the first table is a table of a second form, and the second form is any form referenced by the first form;
[0178] Modification unit 802 is used to modify the fields in the first table in response to the user's modification operation on the fields of the first table, so as to obtain the second table;
[0179] The communication unit 803 is configured to send a first save instruction to the server in response to a user's first save operation on the first form. The first save instruction includes the metadata of the first form, which includes the metadata of the second form. The first save instruction is used by the server to update the metadata of the second form based on the metadata of the second form.
[0180] In some embodiments, the modification unit 802 is specifically used to modify the fields in the first table in response to the user's modification operation on the fields of the first table, when the client has the permission to modify the second form, so as to obtain the second table.
[0181] In some embodiments, the display unit 801 is further configured to display a second form in the first form;
[0182] The form editing device may also include:
[0183] The determining unit is used to determine the entered data in the first field in response to the user's data entry operation in the second table. The first field is any field in the second table.
[0184] The communication unit 803 is also configured to send a second save instruction to the server in response to the user's second save operation on the first form. The second save instruction includes the input data of the first form, and the input data of the first form includes the input data of the second form. The second save instruction is used by the server to determine the input data of the second form based on the input data of the second form.
[0185] In some embodiments, the client includes an associated form component;
[0186] Display unit 801 is also used to display a list of associated forms in response to user operations on associated form components in the first form;
[0187] The display unit 801 is also used to display the second form in the first form in response to the user's selection operation on the second form in the associated form list;
[0188] Display unit 801 displays the first table in the first form, including:
[0189] In response to the user's action to display the second form, the first form is displayed within the first form.
[0190] Based on the above network architecture Figure 9 This is a schematic diagram of another form modification device provided in an embodiment of this application. This form modification device can be applied to a server. The form modification device may include:
[0191] The communication unit 901 is used to receive a first save instruction from the client, the first save instruction including metadata of the first form;
[0192] The determining unit 902 is used to determine a second form based on the metadata of the first form when it is determined that the first form references a second form based on the metadata of the first form. The second form is any form referenced by the first form, and the second form is a table form of the second form included in the metadata of the first form.
[0193] Update unit 903 is used to update the metadata of the second form according to the second form when the metadata of the second form is different from the metadata of the second form.
[0194] In some embodiments, the updating unit 903 is specifically used for:
[0195] If the metadata of the second form does not include the first field, add the first field to the metadata of the second form;
[0196] If the metadata of the second form includes the first field, but the attributes of the first field are different in the metadata of the second form and the second form, update the attributes of the first field in the metadata of the second form according to the attributes of the first field in the second form;
[0197] If a second field exists, delete the second field from the metadata of the second form;
[0198] The first field is any field in the second table, and the second field is a field that exists in the metadata of the second form but does not exist in the second table.
[0199] In some embodiments, the updating unit 903 updates the attributes of the first field in the metadata of the second form according to the attributes of the first field in the second form, including:
[0200] If the second form does not isolate the attributes of the first field, update the attributes of the first field in the metadata of the second form according to the attributes of the first field in the second form.
[0201] In some embodiments, the determining unit 902 is specifically configured to determine the second form based on the metadata of the first form, provided that the client has permission to modify the second form.
[0202] In some embodiments, the determining unit 902 is further configured to determine the form that references the second form to obtain the first form set;
[0203] The update unit 903 is also used to update the data of the second form in the forms included in the first form set based on the updated metadata of the second form;
[0204] The update unit 903 is also used to update the stored metadata of the first form based on the metadata of the first form if the first form is stored.
[0205] Unit 902 is also used to determine the form that references the first form, thereby obtaining the second form set;
[0206] The update unit 903 is also used to update the data of the second form in the forms included in the second form set based on the updated metadata of the second form.
[0207] In some embodiments, the form editing device may further include:
[0208] The generation unit is used to generate the first form based on the metadata of the first form when the first form is not stored.
[0209] In some embodiments, the communication unit 901 is further configured to receive a second save instruction from a client, the second save instruction including the data entered in the first form;
[0210] The determining unit 902 is also used to start the data entry process of the second form based on the data of the second form when the data entered in the first form includes the data entered in the second form and there is a data entry process for the second form.
[0211] Once the data entry process is completed and the result of the data entry process is "passed", the data entered in the second table will be determined as the data entered in the second form.
[0212] Each unit in the aforementioned form modification device can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.
[0213] Based on the above network architecture Figure 10 This is a schematic diagram of a computer device provided in an embodiment of this application. The computer device can be a computer device with a client installed, or it can be a server. The computer device may include a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores historical demand values, dangerous periods, and safe periods for a first energy storage device. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communication with an external EMS via a network connection. When the computer program is executed by the processor, it implements a form modification method.
[0214] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0215] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the form modification method described above.
[0216] It should be noted that the information on energy storage devices involved in this application (including but not limited to the demand value of energy storage devices) is all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations.
[0217] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0218] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0219] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A form modification method characterized by, Applied to a client, the method includes: The first form displays the first table, which is a table form of the second form. The second form is any form referenced by the first form. The first form is a form that is currently in edit mode. In response to the user's modification operation on the fields of the first table, the fields in the first table are modified to obtain the second table; In response to the user's first save operation on the first form, a first save instruction is sent to the server. The first save instruction includes the metadata of the first form, and the metadata of the first form includes the metadata of the second form. The first save instruction is used by the server to update the metadata of the second form according to the metadata of the second form, determine the form that references the second form, obtain a first form set, and update the data of the second form in the forms included in the first form set according to the updated metadata of the second form. When the field modification operation includes a field attribute modification operation, updating the metadata of the second form according to the second table includes: If the metadata of the second form includes a first field, and the attributes of the first field are different in the metadata of the second table and the second form, and the second form does not isolate the attributes of the first field, then update the attributes of the first field in the metadata of the second form according to the attributes of the first field in the second table; The client includes an associated form component, and the method further includes: In response to the user's operation on the associated form component in the first form, a list of associated forms is displayed; In response to the user's selection of the second form in the associated form list, the second form is displayed in the first form; The display of the first form in the first form includes: In response to the user's operation to display the second form, the first form is displayed in the first form.
2. The method of claim 1, wherein, The step of modifying the fields in the first table in response to a user's modification operation on a field of the first table to obtain a second table includes: If the client has permission to modify the second form, in response to the user's modification operation on the fields of the first form, the fields in the first form are modified to obtain the second form.
3. The method of claim 1, wherein, The method further includes: Display the second form within the first form; In response to the user's data entry operation on the first field of the second table, the entered data in the first field is determined, and the first field is any field in the second table; In response to the user's second save operation on the first form, a second save instruction is sent to the server. The second save instruction includes the input data of the first form, which includes the input data of the second form. The second save instruction is used by the server to determine the input data of the second form based on the input data of the second form.
4. A form modification method characterized by, Applied to a server, the method includes: Receive a first save instruction from the client, the first save instruction including metadata of a first form, the first form being a form that is currently in an edit state; If it is determined from the metadata of the first form that the first form references the second form, the second form is determined from the metadata of the first form, wherein the second form is any form referenced by the first form, and the second form is a table form of the second form included in the metadata of the first form; If the metadata of the second table differs from the metadata of the second form, update the metadata of the second form according to the second table; The step of updating the metadata of the second form according to the second form includes: If the metadata of the second form includes a first field, and the attributes of the first field differ between the metadata of the second table and the second form, and the second form does not isolate the attributes of the first field, then update the attributes of the first field in the metadata of the second form according to the attributes of the first field in the second table: Identify the form that references the second form to obtain the first form set; Update the data of the second form in the forms included in the first form set based on the updated metadata of the second form.
5. The method of claim 4, wherein, The step of updating the metadata of the second form according to the second form also includes: If the metadata of the second form does not include the first field, add the first field to the metadata of the second form; If the second field exists, delete the second field from the metadata of the second form; The first field is any field in the second table, and the second field is a field that exists in the metadata of the second form but does not exist in the second table.
6. The method of claim 5, wherein, Determining the second table based on the metadata of the first form includes: Extract data from the metadata of the first form to retrieve data from the second form; A second table is generated based on the data in the second form.
7. The method according to claim 4, characterized in that, The method further includes: If a first form is stored, update the stored metadata of the first form based on the metadata of the first form; Identify the form that references the first form to obtain the second form set; Update the data of the first form in the forms included in the second form set based on the updated metadata of the first form.
8. The method according to any one of claims 4-7, characterized in that, The method further includes: Receive a second save instruction from the client, the second save instruction including the data entered in the first form; If the data entered in the first form includes the data entered in the second form, and there is a data entry process for the second form, the data entry process for the second form is started based on the data entered in the second form. When the data entry process is completed and the result of the data entry process is "pass", the data entered in the second table is determined as the data entered in the second form.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it 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 computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.