Form enumeration field synchronization method and device, medium and product
By comparing and identifying the updated items of enumeration fields, using value objects and distinguishing synchronization types, the problems of wasted computing resources and poor user experience in enumeration field updates are solved, and efficient and real-time enumeration field synchronization is achieved.
Patent Information
- Application Number
- CN202510722040.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The existing technology has problems of wasting computing resources and poor user experience when updating enumeration fields, especially when there are many enumeration items, especially unnecessary replacement and disabled attribute settings of newly added enumeration items.
By comparing and identifying the enumeration items that need to be updated, targeted synchronization operations are performed to avoid unnecessary waste of computing resources. Value objects are used as an intermediate bridge to ensure the consistency of front-end forms and back-end data, and different synchronization types are distinguished to optimize synchronization strategies.
It improves the efficiency of enumeration field synchronization, reduces the waste of computing resources, enhances the user experience, and ensures the real-time and accuracy of enumeration field information in the form.
Smart Images

Figure CN120632235A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electronic forms, and in particular relates to a form enumeration field synchronization method, device, medium and product. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] When using low-code or no-code to develop web forms, different entity type fields will be created according to the data requirements, and then the entity fields will be bound using controls of the specified type in the form designer. After the form is created, if the information in the entity is subsequently modified, data synchronization operations will be involved. In addition to the name of the enumeration field itself, changes to its enumeration items also require change detection and information synchronization. However, for updates to enumeration items, it can be to add or delete enumeration items, change the disabled attributes of one or more enumeration items, adjust the order of some or all of the enumeration items, etc., or perform at least two of the above update operations at the same time. Updates to existing enumeration fields usually replace all current enumeration fields and their attributes with new ones. However, for enumeration fields with more enumeration items, there are a lot of duplications between the old and new enumeration items. If they are replaced directly, it will cause unnecessary waste of computing resources. Moreover, for newly added enumeration items, if they are not required by the user, the disabled attributes need to be set again after direct replacement, resulting in a poor user experience. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, the present invention provides a form enumeration field synchronization method, device, medium, and product. When a front-end web form is opened, it can identify the enumeration items that need to be updated through comparison, and then perform targeted synchronization operations, avoiding unnecessary waste of computing resources.
[0005] To achieve the above objectives, a first aspect of the present invention provides a form enumeration field synchronization method, which is applied to a client and includes the following steps:
[0006] In response to a form open operation, the latest form schema is obtained from the server;
[0007] Compare the current form schema with the latest form schema. If there is an enumeration field change, determine the enumeration items to be synchronized in the enumeration field and their synchronization information, where the synchronization information is order change and / or disabled attribute change.
[0008] Performs enumeration field synchronization operations based on the enumeration items to be synchronized and their synchronization information.
[0009] In some embodiments, the enumeration items to be synchronized and their synchronization information in the enumeration field are determined according to a synchronization type, and the synchronization type is distinguished according to the size relationship between the current enumeration item and the number of enumeration items to be synchronized;
[0010] If the number of current enumeration items is the same as the number of the latest enumeration items, the enumeration items with order changes and / or disabled attribute changes will be treated as enumeration items to be synchronized;
[0011] The synchronization type is that when the number of current enumeration items is less than the number of latest enumeration items, newly added enumeration items and the same enumeration items between the two with order changes and / or disabled attribute changes are used as enumeration items to be synchronized;
[0012] The synchronization type is that when the number of current enumeration items is greater than the number of latest enumeration items, all latest enumeration items are used as enumeration items to be synchronized.
[0013] In some embodiments, after determining the enumeration items to be synchronized and their synchronization information in the enumeration field according to the synchronization type, a change object array is generated, wherein the change object array includes the synchronization type, the enumeration field to be synchronized, the sequential index value of the enumeration items to be synchronized in the enumeration field to be synchronized, and the disabled attribute; the enumeration field synchronization operation is performed according to the change object array.
[0014] In some embodiments, performing an enumeration field synchronization operation according to a change object array includes: obtaining a synchronization type, changing the order of some or all of the enumeration items of the enumeration field and / or disabling property changes.
[0015] In some embodiments, the synchronization type is that when the number of current enumeration items is less than the number of enumeration items to be synchronized, newly added enumeration items in the enumeration items to be synchronized are synchronized to the enumeration field control properties.
[0016] In some embodiments, after executing the enumeration field synchronization operation, the form interface rendering and refresh operation is also executed; before executing the form interface rendering and refresh operation, it is determined whether the user executes the control selection operation. If so, after executing the form interface rendering and refresh operation, the action of simulating clicking the control is executed.
[0017] A second aspect of the present invention provides a form enumeration field synchronization method, which is applied to a server connected to the above-mentioned client, and the method comprises the following steps:
[0018] Create value objects in response to property change requests for enumerated fields in entities;
[0019] Synchronize all the changed enumeration field information to the value object;
[0020] Synchronize the changed enumeration field information from the value object to the form schema.
[0021] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method described.
[0022] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the method described above when the program is executed by a processor.
[0023] A fifth aspect of the present invention provides a computer program product, comprising a computer program, and when the computer program is executed by a processor, the method described is implemented.
[0024] In one or more of the above technical solutions, the client obtains the latest form schema from the server in response to the form open operation, determines the enumeration items that need to be updated by comparing the new and old schemas, and then performs the update operation in a targeted manner, avoiding unnecessary waste of computing resources and improving synchronization efficiency.
[0025] Specifically, different synchronization types are divided according to the size relationship between the numbers of new and old enumeration items, and then it is distinguished whether to synchronize some enumeration items or all enumeration items, which can improve the synchronization efficiency while ensuring the correctness of information synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0027] Figure 1 This is an overall flow chart of a form enumeration field synchronization method in one or more embodiments of the present invention;
[0028] Figure 2 This is a schematic diagram of determining synchronization strategies based on synchronization types for form enumeration fields in one or more embodiments of the present invention. DETAILED DESCRIPTION
[0029] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.
[0030] In the description of the embodiments of the present application, the term “including” and similar terms should be understood as open inclusion, that is, “including but not limited to.” The term “based on” should be understood as “at least partially based on.”
[0031] Low-code platforms provide a wealth of preset components (such as text boxes, drop-down boxes, radio buttons, checkboxes, etc.), allowing developers to directly modify the form layout, field properties, etc. through a visual interface. If you need to adjust the order of the form fields or modify the display method of a certain field, you can simply drag and drop or configure the properties in the design interface without rewriting the code. Specifically, developers select the required field components (such as text boxes, drop-down boxes, date pickers, etc.) from the component library provided by the low-code platform and drag them into the form layout. At the same time, set properties for each field, such as field name, data type, whether it is required, default value, etc. Then, bind the form fields to the data source (such as a database table, API interface, etc.) by selecting the data source and field mapping relationship. Common field component types include text fields, enumeration fields, date / time fields, etc. Among them, enumeration fields are used to store a predefined, limited set of values. These values are usually called enumeration items and are used to support single-select or multiple-select functions. For example: the enumeration field "gender" has enumeration item values including "male" and "female".
[0032] As described in the background technology, there are various ways to update enumeration fields. If all enumeration items are directly replaced, the synchronization efficiency may be affected due to the replacement of a large number of repeated enumeration items, and computing resources may be wasted. In addition, if there are new enumeration items, it cannot be guaranteed that the new enumeration items are what the user needs, which affects the user experience. In order to solve the above problems, one or more embodiments of the present invention provide a form enumeration field synchronization method, such as Figure 1 As shown, the following steps are included:
[0033] S101: The server creates a value object in response to a property change request for an enumeration field in an entity;
[0034] S102: Synchronize all the changed enumeration field information to the value object;
[0035] S103: Synchronize the changed enumeration field information from the value object to the form schema.
[0036] S104: In response to the form opening operation, the client obtains the latest form schema from the server;
[0037] S105: Compare the current form schema with the latest form schema. If there is an enumeration field change, determine the enumeration items to be synchronized in the enumeration field and their synchronization information. The synchronization information is the order change and / or the disabled attribute change.
[0038] The server uses value objects as an intermediate bridge for synchronization, which can effectively avoid data inconsistency between actual changes and system records, and ensure that the front-end form can accurately display the latest enumeration field information.
[0039] When synchronizing enumeration fields, the client first determines the enumeration items to be synchronized by comparison, and then synchronizes them in a targeted manner instead of replacing them all indiscriminately, thereby improving synchronization efficiency and thus improving user experience.
[0040] In step S101, attribute changes include adding or deleting enumeration items, changing the order of enumeration items, or disabling attributes. In response to a user's action to save attribute changes to an enumeration field in an entity, an attribute change request is generated, triggering the creation of a value object (VO). This trigger synchronization mechanism ensures that the enumeration items in the enumeration field in the form reflect backend changes in real time, ensuring the real-time nature of form updates.
[0041] In steps S102 and S103, the latest enumeration field information is synchronized to the form schema via the value object. As an intermediate layer, the value object can accurately transmit data changes and avoid data inconsistency problems. Specifically, when the attributes of the enumeration field change, by creating a value object (VO) and synchronizing the changed enumeration field information to the value object in full, it can be ensured that the data in the value object is consistent with the latest state of the enumeration field. Further synchronizing the changed enumeration field information from the value object to the form schema (form definition) can ensure that the enumeration field options displayed in the form are consistent with the definition in the back-end database or business logic. In addition, using value objects to encapsulate the change information of the enumeration field can decouple the change logic of the enumeration field from the display logic of the form. The change of the enumeration field will not directly affect the implementation of the form, but will be transmitted through the value object, the intermediate layer. In step S104, the client obtains the latest form schema from the server in response to the form (form designer) opening operation. That is, each time the user opens the form, the latest form schema is obtained to determine whether it needs to be updated, thereby avoiding affecting the user's form operation.
[0042] In step S105, the current form schema is compared with the latest form schema. If there is an enumeration field change, the synchronization type for the enumeration field is first determined, and then the synchronization strategy is determined. The enumeration items to be synchronized in the enumeration field and their synchronization information are determined according to the synchronization strategy.
[0043] It's important to note that enumeration fields, as a primary field type, have enumeration items that are closely tied to the data in the database. Therefore, editing enumeration field properties requires certain restrictions to ensure data consistency and business logic stability. For example, if an enumeration item is deleted while data records corresponding to that item already exist in the database, data inconsistency will occur. For example, an order status field may have enumeration items such as "Ordered," "Shipped," and "Completed." If the "Shipped" status is deleted, all order records in the database with the "Shipped" status will not be displayed or processed correctly. In some cases, deleting an enumeration item may cause related data to be accidentally deleted or unable to be read correctly. For example, if a low-code platform deletes an enumeration item without performing data migration or compatibility processing, it may directly delete data records related to the enumeration item, or cause queries to fail to execute correctly, resulting in data loss. Furthermore, if certain enumeration items are deleted, if a user subsequently submits a form containing values for the deleted enumeration item, the system will fail validation. This can also impact normal business processes if the enumeration field has dependencies on other fields or business modules. Based on this, in some embodiments, the client restricts the user's editing operations on the enumeration items and does not allow the deletion operation on the enumeration items. If the enumeration item is not needed, the deletion operation is replaced by a disabling operation.
[0044] By disabling operations instead of deleting operations, changes to enumeration items are restricted, and only additions, order changes, or changes to disabled status can be made. Based on this, changes can be distinguished from the changes in quantity, and different synchronization strategies can be executed. For example, if the current number of enumeration items is the same as the latest number of enumeration items, it means that only order changes or disabled attribute changes may have been made; if the current number of enumeration items is less than the latest number of enumeration items, it means that the server has added new enumeration items. At the same time, other enumeration items may have order changes or disabled attribute changes. If the current number of enumeration items is greater than the latest number of enumeration items, it means that the developer has added other enumeration items that are not allowed. Based on this, by comparing the number of enumeration items, the synchronization type can be quickly distinguished, and the corresponding synchronization operation can be performed.
[0045] As a specific implementation method, Figure 2 As shown, the synchronization type is distinguished according to the size relationship between the current enumeration items and the latest enumeration items. The synchronization types include the current enumeration items and the latest enumeration items are the same, the current enumeration items are less than the latest enumeration items, and the current enumeration items are greater than the latest enumeration items. To simplify the description, they are respectively recorded as the first type of synchronization type, the second type of synchronization type, and the third type of synchronization type. The synchronization strategies are as follows:
[0046] (1) The first type of synchronization: the number of current enumeration items is the same as the number of the latest enumeration items
[0047] When the number of enumeration items remains unchanged, synchronization only affects the order of the enumeration items and their disabled attributes. Therefore, the enumeration items with order changes and / or disabled attribute changes are considered to be synchronized. It is understood that when synchronization is performed, only the order changes and / or disabled attribute changes are made to the enumeration items to be synchronized.
[0048] (2) The second type of synchronization: the number of current enumeration items is less than the number of the latest enumeration items
[0049] When the number of new enumeration items is greater than or equal to the number of old version enumeration items recorded in the form schema, the enumeration item information recorded in the form is filtered out from the new enumeration item data to identify whether the enumeration items recorded in the form have any changes in order or disabled attributes in the new enumeration item data. That is, the newly added enumeration items and the enumeration items with order changes and / or disabled attribute changes in the same enumeration items between the two are regarded as enumeration items to be synchronized. As an example, the old version enumeration items can be filtered out from the new version enumeration items, and when subsequently replaced, only the filtered data will replace the node information in the metadata of the form. It can be understood that when synchronization is performed, the newly added enumeration items are added after the corresponding order changes and / or disabled attribute changes are made to the enumeration items to be synchronized.
[0050] (3) The third type of synchronization: the number of current enumeration items is greater than the number of latest enumeration items
[0051] If the number of old enumeration items in a form record is greater than the latest enumeration items, the old data in the form will be reset and the new enumeration item data will completely replace the old enumeration item data. In other words, all the latest enumeration items will be treated as enumeration items to be synchronized and replaced completely.
[0052] If we follow the operating ideas of the first and second types of synchronization, for the third type of synchronization, we need to first identify the enumeration items illegally added by the user in the current enumeration items, and then identify whether the remaining enumeration items have order changes and / or disabled attribute changes. It can be understood that the above process of identifying illegally added enumeration items requires multiple loop comparisons, which wastes computing resources. Therefore, all the latest enumeration items are treated as enumeration items to be synchronized and all are replaced.
[0053] And other enumeration items may have order changes or disabled attribute changes. In this case, if you follow the above idea, you need to first delete the newly added enumeration items on the client side and the order changes or disabled attribute changes in the existing enumeration items.
[0054] When determining the enumeration items to be synchronized and their synchronization information in the enumeration field according to the synchronization type, the enumeration field name, synchronization type and synchronization information are stored to obtain a change object array, wherein the change object array includes the type to be synchronized, the synchronization enumeration field, the sequential index value of the enumeration items to be synchronized in the enumeration field to be synchronized and the disabled attribute; the enumeration field synchronization operation is performed according to the change object array.
[0055] The following table shows an example of the structure of the change object array:
[0056] Example of changing the object array structure
[0057] Parameter name Parameter Description diffType Synchronization Type schemaField Schema node information viewmodelField ViewModel node information componentsField Component node information
[0058] By traversing the array, different synchronization operations are performed according to the synchronization type recorded by each object. Specifically, the synchronization operations under different synchronization types are as follows:
[0059] (1) If the synchronization type is the first type or the second type, the change object array only includes the synchronization information of the enumeration items to be synchronized. According to the sequential index value of the enumeration items to be synchronized, the corresponding enumeration items are synchronized in sequence. As an example, the current and new enumeration items of the education field include high school and below, college, undergraduate, master, and doctor. Assuming that the server has changed the disabled attribute of the doctoral field, the generated change object array is: [first type synchronization type, education field (field to be synchronized), 5 (sequential index value of the enumeration item to be synchronized), disabled (disabled attribute change value)].
[0060] (2) If the synchronization type is the third type, the change object array includes the synchronization information of all new enumeration items. When performing synchronization, first delete all current enumeration items of the enumeration field, and then synchronize the corresponding enumeration items in sequence according to the sequential index value of the enumeration item to be synchronized.
[0061] Based on this, the synchronization method can provide different synchronization strategies for the diverse update situations of enumeration fields, making the update more efficient. At the same time, since the changes made in the server are used as the basis during synchronization, if there are non-compliant enumeration items added by client users in the form, they will be automatically cleared when synchronization is triggered.
[0062] As you can understand, after synchronizing the form schema, the viewmodel and component are synchronized sequentially, transferring the node information synchronized in the schema to the viewmodel and component nodes. At this point, the enumeration item editor for the bound enumeration field control displays the same order and disabled status as configured in the entity.
[0063] For the second type of synchronization, when a new enumeration item is added to an enumeration field in an entity, since it is impossible to determine whether the enumeration item is required by the user, the new enumeration item is not directly synchronized to the form. Therefore, the new enumeration item in the latest enumeration item is synchronized to the enumeration field control properties, and its disabled property is set to disabled. The user can select the control properties of the bound enumeration field in the form designer and add the enumeration item in the enumeration field editor. Specifically, the enumeration field editor will display other enumeration items except those already existing in the form metadata. The user can add them by checking to ensure that there are no form operation problems caused by the enumeration item not existing in the newly added entity.
[0064] When the synchronization is completed, the form designer will trigger a synchronization success prompt and trigger an interface change refresh event to render and refresh the form interface.
[0065] Since synchronization operations take a certain amount of time, the user may have already performed operations such as clicking on controls before executing interface rendering and refresh operations. In order to ensure the continuity of user operations and not affect user operations, before executing form interface rendering and refresh operations, determine whether the user has performed the control selection operation. If so, after executing form interface rendering and refresh operations, perform a simulated click on the control.
[0066] In one or more of the above technical solutions, enumeration field change information is encapsulated through value objects and automatically synchronized, making system maintenance easier. Developers only need to focus on the definition of the enumeration field without worrying about the synchronization of the form schema, and can respond more flexibly to changes in business needs. Changes to enumeration fields can be quickly reflected in the form without requiring a large amount of code modification or redeployment. The enumeration field options that users see in the form are always the latest, avoiding user confusion or erroneous operations due to data inconsistencies. This is especially practical for systems that require frequent adjustments to business logic (such as product classification in e-commerce systems).
[0067] Based on the above method, one or more embodiments of the present invention further provide an electronic device that can be used to implement the form enumeration field synchronization method in the above embodiment. The electronic device includes one or more processors, one or more memories coupled to the processors, and a communication module coupled to the processors.
[0068] The memory may include one or more non-volatile memories and one or more volatile memories. Examples of non-volatile memories include, but are not limited to, at least one of the following: read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, hard disk, compact disc (CD), digital video disc (DVD), or other magnetic storage and / or optical storage. Examples of volatile memories include, but are not limited to, at least one of the following: random access memory (RAM), or other volatile memories that do not persist during a power outage. The computer program may be stored in the ROM. When the processor executes the computer program, the above-mentioned form enumeration field synchronization method is implemented.
[0069] Exemplarily, the electronic device serves as a client for developers, and the processor implements the following method steps when executing the computer program: in response to a form opening operation, obtaining the latest form schema from the server; comparing the current form schema with the latest form schema, and if there is an enumeration field change, determining the enumeration items to be synchronized in the enumeration field and their synchronization information, wherein the synchronization information is an order change and / or a disabled attribute change; and performing an enumeration field synchronization operation based on the enumeration items to be synchronized and their synchronization information.
[0070] Among them, the enumeration items to be synchronized and their synchronization information in the enumeration field are determined according to the synchronization type, and the synchronization type is distinguished according to the size relationship between the current enumeration items and the number of enumeration items to be synchronized: if the current enumeration items are the same as the number of the latest enumeration items to be synchronized, the enumeration items with order changes and / or disabled attribute changes will be used as the enumeration items to be synchronized; when the synchronization type is that the number of current enumeration items is less than the number of the latest enumeration items to be synchronized, the newly added enumeration items and the enumeration items with order changes and / or disabled attribute changes in the same enumeration items between the two will be used as the enumeration items to be synchronized; when the synchronization type is that the number of current enumeration items is greater than the number of the latest enumeration items to be synchronized, all the latest enumeration items to be synchronized will be used as the enumeration items to be synchronized.
[0071] After determining the enumeration items to be synchronized and their synchronization information in the enumeration field according to the synchronization type, a change object array is generated, wherein the change object array includes the synchronization type, the enumeration field to be synchronized, the sequential index value of the enumeration items to be synchronized in the enumeration field to be synchronized, and the disabled attribute; the enumeration field synchronization operation is performed according to the change object array.
[0072] Performing the enumeration field synchronization operation according to the change object array includes: obtaining a synchronization type, and performing sequence changes and / or disabling property changes on part or all of the enumeration items of the enumeration field.
[0073] The synchronization type is that when the number of current enumeration items is less than the number of enumeration items to be synchronized, newly added enumeration items in the enumeration items to be synchronized are synchronized to the enumeration field control properties.
[0074] After executing the enumeration field synchronization operation, the form interface rendering and refresh operation is also executed; before executing the form interface rendering and refresh operation, it is determined whether the user has executed the control selection operation. If so, after executing the form interface rendering and refresh operation, the action of simulating clicking the control is executed.
[0075] Exemplarily, the electronic device is used as a server, the server is connected to the client, and the processor implements the following method steps when executing the computer program: creating a value object in response to a property change request of an enumeration field in an entity; synchronizing the entire amount of the changed enumeration field information to the value object; and synchronizing the changed enumeration field information from the value object to the form schema.
[0076] In some embodiments, the program may be tangibly contained in a computer-readable medium, which may be included in the device (such as in a memory) or other storage device accessible by the device. The program may be loaded from the computer-readable medium to RAM for execution. The computer-readable medium may include any type of tangible non-volatile memory, such as ROM, EPROM, flash memory, hard disk, and the computer-readable storage medium stores a computer program that, when executed by a processor, implements the above-mentioned form enumeration field synchronization method.
[0077] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a server or terminal, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a server or terminal or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, and a tape, etc.), an optical medium (e.g., a digital video disk (DVD), etc.), or a semiconductor medium (e.g., a solid-state drive, etc.).
[0078] In addition, although adopting specific order to describe each operation, this should be understood as requiring such operation to be carried out with shown specific order or with sequential order, or requiring all illustrated operations to be carried out to obtain desired result.Under certain environment, multitasking and parallel processing may be advantageous.Similarly, although comprising some specific implementation details in the above discussion, these should not be interpreted as limiting the scope of the application.Some features described in the context of independent embodiment can also be implemented in a single implementation in combination.On the contrary, the various features described in the context of independent implementation also can be implemented in a plurality of implementations individually or in the mode of any suitable subcombination.
[0079] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A form enumeration field synchronization method, applied to the client, characterized in that: The following steps are involved: In response to the form open operation, the latest form schema is obtained from the server; Compare the current form schema with the latest form schema. If there is an enumeration field change, determine the enumeration items to be synchronized in the enumeration field and their synchronization information, where the synchronization information is order change and / or disabled attribute change. Performs enumeration field synchronization operations based on the enumeration items to be synchronized and their synchronization information.
2. The form enumeration field synchronization method according to claim 1, characterized in that: Determining the enumeration items to be synchronized and their synchronization information in the enumeration field according to the synchronization type, wherein the synchronization type is distinguished according to the size relationship between the current enumeration item and the number of enumeration items to be synchronized; If the number of current enumeration items is the same as the number of the latest enumeration items, the enumeration items with order changes and / or disabled attribute changes will be treated as enumeration items to be synchronized; The synchronization type is that when the number of current enumeration items is less than the number of latest enumeration items, newly added enumeration items and the same enumeration items between the two with order changes and / or disabled attribute changes are used as enumeration items to be synchronized; The synchronization type is that when the number of current enumeration items is greater than the number of latest enumeration items, all latest enumeration items are used as enumeration items to be synchronized.
3. The form enumeration field synchronization method according to claim 2, characterized in that: After determining the enumeration items to be synchronized and their synchronization information in the enumeration field according to the synchronization type, a change object array is generated, wherein the change object array includes the synchronization type, the enumeration field to be synchronized, the sequential index value of the enumeration items to be synchronized in the enumeration field to be synchronized, and the disabled attribute; the enumeration field synchronization operation is performed according to the change object array.
4. The form enumeration field synchronization method according to claim 3, characterized in that: Performing the enumeration field synchronization operation according to the change object array includes: obtaining a synchronization type, and performing sequence changes and / or disabling property changes on part or all of the enumeration items of the enumeration field.
5. The form enumeration field synchronization method according to claim 2, characterized in that: The synchronization type is that when the number of current enumeration items is less than the number of enumeration items to be synchronized, newly added enumeration items in the enumeration items to be synchronized are synchronized to the enumeration field control properties.
6. The form enumeration field synchronization method according to claim 1, characterized in that: After executing the enumeration field synchronization operation, the form interface rendering and refresh operation is also executed; before executing the form interface rendering and refresh operation, it is determined whether the user has executed the control selection operation. If so, after executing the form interface rendering and refresh operation, the action of simulating clicking the control is executed.
7. A form enumeration field synchronization method, applied to a server, the server being connected to a client, the client being configured to execute the method according to any one of claims 1 to 6, characterized in that: The method comprises the following steps: Create value objects in response to property change requests for enumerated fields in entities; Synchronize all the changed enumeration field information to the value object; Synchronize the changed enumeration field information from the value object to the form schema.
8. An electronic device comprising a processor and a memory, wherein the memory stores computer instructions, characterized in that: When the computer instructions are executed by the processor, the electronic device is caused to perform the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Exchange of syncronization data and metadata
CN101809561A
Data synchronization method, terminal, data synchronization equipment, computer device and readable storage medium
CN107508924A
Incremental updating method and device, and programmable device
CN108089879A
Method and device for web form data updating, equipment and storage medium
CN111191163A
Data environment switching method and device of application program, electronic equipment and medium
CN116225576A