Form data processing method and device, equipment, medium and program product

By obtaining and merging form editing data, adjusting the data structure to include multimedia type comparison components, and performing data comparison, the problem of poor generality of form comparison in the prior art is solved, and efficient form data comparison and cost reduction are achieved.

CN119917164APending Publication Date: 2025-05-02TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411960803.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-02

Smart Images

  • Figure CN119917164A_ABST
    Figure CN119917164A_ABST
Patent Text Reader

Abstract

The invention relates to a form data processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of merging initial form data before a target form is edited and edited form data after the target form is edited to obtain multiple pieces of merged data of different multimedia types; modifying a form control in the editable data structure description data into a plurality of comparison components for processing a plurality of data of different multimedia types; transmitting the merged data into a comparison component for processing the data of the corresponding multimedia type; the form data before editing and the form data after editing in the merged data of the corresponding multimedia type are compared and displayed through the comparison component, the data comparison content of the target form is obtained, and the universality during form data comparison is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a form data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of computer technology, form rendering has become a crucial link in user interface interaction. In scenarios with frequent data interactions and complex form logic, form comparison is particularly important, which helps to improve user experience and ensure data accuracy.

[0003] In the related art, front-end developers are usually required to write corresponding data comparison logic codes according to different business scenarios, and perform form comparison according to the data comparison logic. However, the form comparison method of the related art has poor versatility, and as the form data increases, the development cost of developers will gradually increase. Summary of the invention

[0004] Based on this, it is necessary to provide a form data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve versatility and reduce development costs in response to the above technical problems.

[0005] In a first aspect, the present application provides a form data processing method, comprising:

[0006] Acquire form editing data of a target form, wherein the form editing data includes editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form; the form data includes a plurality of data of different multimedia types;

[0007] Merging the initial form data with the edited form data to obtain a plurality of merged data of different multimedia types;

[0008] Modifying the form controls in the editable data structure description data into multiple comparison components for processing the multiple data of different multimedia types;

[0009] passing the combined data into a comparison component that processes data of the corresponding multimedia type;

[0010] The comparison component compares and displays the form data before editing and the form data after editing in the merged data of the corresponding multimedia type respectively, and obtains the data comparison content of the target form.

[0011] In a second aspect, the present application also provides a form data processing device, comprising:

[0012] An acquisition module, used for acquiring form editing data of a target form, wherein the form editing data includes editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form; the form data includes a plurality of data of different multimedia types;

[0013] A merging module, used for merging the initial form data with the edited form data to obtain a plurality of merged data of different multimedia types;

[0014] A modification module, used for modifying the form controls in the editable data structure description data into a plurality of comparison components for processing the plurality of data of different multimedia types;

[0015] An input module, used for inputting the combined data into a comparison component that processes data of a corresponding multimedia type;

[0016] The comparison module is used to compare and display the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type through the comparison component to obtain the data comparison content of the target form.

[0017] In some embodiments, the acquisition module is used to acquire the form editing data of the target form in response to the edit confirmation operation on the target form through the button factory component; and receive the form editing data of the target form transmitted by the button factory component.

[0018] In some embodiments, the acquisition module is also used to acquire editable data structure description data and initial form data through a control component, and render form controls related to the target form on a page according to the editable data structure description data; and call a write data interface through the control component to input data of each multimedia type in the initial form data into a corresponding form control to obtain a target form.

[0019] In some embodiments, the input module is used to obtain a mapping relationship between multimedia types and comparison components; for each multimedia type, the comparison component corresponding to the multimedia type is determined according to the mapping relationship, and the merged data belonging to the multimedia type is input into the corresponding comparison component.

[0020] In some embodiments, the input module is also used to obtain the mapping relationship between multimedia types and form controls from the editable data structure description data; modify the form control corresponding to each multimedia type in the mapping relationship between multimedia types and form controls to a comparison component corresponding to the form control, and obtain the mapping relationship between multimedia types and comparison components.

[0021] In some embodiments, the comparison module is used to compare and display the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type through the comparison component for each comparison component, so as to obtain the comparison content of the corresponding multimedia type; and combine the comparison contents of each multimedia type to obtain the data comparison content of the target form.

[0022] In some embodiments, the comparison module is used to compare and display the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type according to the comparison logic and style rules in the comparison component to obtain the comparison content of the corresponding multimedia type.

[0023] In some embodiments, the device also includes a generation module, which is used to obtain a form markup language text of a target form containing the data comparison content; for each element in the target form, traverse the page style rule table of the page where the target form is located according to the class name of the element to determine the form style rule text; based on the form markup language text and the form style rule text, generate a form text corresponding to the target form containing the data comparison content, and the form text is used to display the target form containing the data comparison content.

[0024] In some embodiments, the generation module is also used to traverse the page style rule table of the page where the target form is located according to the class name of the element for each element in the target form, and determine the style rule text of the element; obtain the style rule global variable of the page, and obtain the form style rule text by adding the style rule global variable to the style rule text of each element respectively.

[0025] In some embodiments, the device further includes a storage module for determining an editor identifier and storing the form text and the editor identifier in a database in correspondence thereto.

[0026] In some embodiments, the device also includes a sending module for sending the form text to a form reviewer to instruct the form reviewer to display a target form containing the data comparison content according to the form text, and to perform a form review on the target form containing the data comparison content.

[0027] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned form data processing method when executing the computer program.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned form data processing method are implemented.

[0029] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned form data processing method when executed by a processor.

[0030] The above-mentioned form data processing method, device, computer equipment, computer-readable storage medium and computer program product can obtain editable data structure description data, initial form data before editing the target form and edited form data after editing the target form by acquiring the form editing data of the target form; the form data includes multiple data of different multimedia types. The initial form data and the edited form data are merged to obtain multiple merged data of different multimedia types, so as to facilitate the subsequent data comparison of the merged data of the same multimedia type, and the form control in the editable data structure description data is modified into multiple comparison components for processing multiple data of different multimedia types, and the form control can be adjusted to a comparison component capable of data comparison. In this way, after the merged data is passed into the comparison component for processing the data of the corresponding multimedia type, the form data before editing and the form data after editing in the merged data of the corresponding multimedia type can be compared and displayed respectively through the comparison component, so as to realize the data comparison of the form data and obtain the data comparison content of the target form. Therefore, when processing different form data, data comparison can be achieved for each form data by adjusting the editable data structure description data, without the need to develop corresponding comparison codes according to the business scenario to which each form belongs, thereby improving the versatility of form data comparison and reducing development costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 An application environment diagram of a form data processing method in one embodiment;

[0033] Figure 2 A schematic diagram of a flow chart of a form data processing method in one embodiment;

[0034] Figure 3 A schematic diagram of data comparison in an embodiment;

[0035] Figure 4 A schematic diagram of rich text comparison display in one embodiment;

[0036] Figure 5 A schematic diagram of a comparison display of image links in an embodiment;

[0037] Figure 6 A schematic diagram of a form review process in one embodiment;

[0038] Figure 7 A schematic diagram of a generation process of each component in an embodiment;

[0039] Figure 8 A schematic diagram of a form data processing process in one embodiment;

[0040] Fig. 9 A schematic diagram of a data comparison component structure in one embodiment;

[0041] Fig.10 A schematic diagram of a flow chart of form data processing in one embodiment;

[0042] Fig.11 is a structural block diagram of a form data processing device in one embodiment;

[0043] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] In order to clearly describe the technical solution of the present application and facilitate understanding of the technical solution of the present application, the key concepts involved in the present application are explained below:

[0046] JSON: is a lightweight data exchange format.

[0047] JSON schema: A declarative language used to annotate the structure, constraints, and data types of JSON data (for example, form data can be JSON data). It provides a standardized description protocol for JSON data.

[0048] Formily: A framework for dynamic form scenarios in the WEB front-end field. This framework extends the UI (User Interface) related information to the JSONschema protocol to form the Formily JSON schema, maintains the correspondence between the form data nodes and the UI view, and allows developers to decide which form controls to use to render the corresponding data nodes through configuration.

[0049] Form: In the WEB front-end field, forms are used to collect data that web page users need to submit to the server, for example, to collect fields filled in by users in the form (such as text boxes, check boxes, radio buttons, drop-down lists, etc.). Usually submitted to the server in JSON data format, each key-value pair of JSON data represents the field name and data submitted to the server.

[0050] Dynamic form: A form that can change its structure, behavior, and content at runtime based on user interaction or system rules. The technical implementation of dynamic forms usually relies on the web front-end framework and form descriptions (such as JSON schema), and the front-end dynamically generates forms based on these form descriptions.

[0051] Multimedia form data: Form data of multimedia forms, where multimedia forms refer to a front-end form containing various media data. The media data can be text data, image links, video links, rich text, nested lists, etc.

[0052] HTML: A markup language used to create web pages. It uses a series of tags to describe the structure and content of a web page so that the browser can understand and display the web page information.

[0053] CSS: A computer language used to describe HTML styles. It allows developers to precisely control the layout, color, fonts, and other visual elements of a web page through selectors. Common selectors include tag selectors, class name selectors, etc.

[0054] DOM: It is a programming interface for HTML documents, which parses the document into a structured collection consisting of nodes and objects (objects containing properties and methods).

[0055] SVG: A vector image format used to describe two-dimensional graphics.

[0056] In the related art, the tree structure of the JSON data of a form is traversed, and the type of each node is judged. For example, a regular expression is used to determine whether the data of the current node is a picture link or rich text, and the data comparison code written by the developer for the business scenario of the form is used for rendering to achieve data comparison. However, when faced with multiple different business scenarios, the front-end developer needs to write corresponding data comparison codes according to different business scenarios, which has poor versatility. Once the form data increases, the number of data comparison codes that the front-end developer needs to develop increases, increasing the development cost.

[0057] The form data processing method provided by the embodiment of the present application can obtain editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form by acquiring the form editing data of the target form; the form data includes multiple data of different multimedia types. The initial form data and the edited form data are merged to obtain multiple merged data of different multimedia types, so as to facilitate the subsequent data comparison of the merged data of the same multimedia type, and the form control in the editable data structure description data is modified to multiple comparison components for processing multiple data of different multimedia types, and the form control can be adjusted to a comparison component capable of data comparison. In this way, after the merged data is passed into the comparison component for processing the data of the corresponding multimedia type, the form data before editing and the form data after editing in the merged data of the corresponding multimedia type can be compared and displayed by the comparison component, so as to realize the data comparison of the form data, so as to obtain the data comparison content of the target form. Therefore, when processing different form data, the data comparison of each form data can be realized by adjusting the editable data structure description data, without the need to develop corresponding comparison codes according to the business scenarios to which each form belongs, thereby improving the versatility of form data comparison and reducing the development cost.

[0058] The form data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0059] In an exemplary embodiment, the terminal 102 performs the form data processing method alone as an example for explanation. The terminal 102 displays the target form, wherein the target form includes the initial form data. In response to the editing completion operation of the target form, the terminal 102 obtains the form editing data of the target form, the form editing data includes the editable data structure description data, the initial form data before the target form is edited, and the edited form data after the target form is edited; the form data includes multiple data of different multimedia types. The terminal 102 merges the initial form data with the edited form data to obtain multiple merged data of different multimedia types; the terminal 102 modifies the form control in the editable data structure description data into multiple comparison components for processing multiple data of different multimedia types; the terminal 102 transfers the merged data to the comparison component for processing the data of the corresponding multimedia type; the form data before editing and the form data after editing in the merged data of the corresponding multimedia type are compared and displayed by the comparison component, respectively, to obtain the data comparison content of the target form.

[0060] In an exemplary embodiment, after acquiring the data comparison content, the terminal 102 may also send the data comparison content to the server 104 for storage.

[0061] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0062] In an exemplary embodiment, Figure 2 As shown, a form data processing method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, including the following steps 202 to 210. Among them:

[0063] Step 202, obtaining form editing data of the target form, the form editing data including editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form; the form data includes multiple data of different multimedia types.

[0064] Among them, the target form is a multimedia form that allows editing. The target form is a dynamic form. The initial form data is the form data of the target form before the target form is edited, which can be understood as the form data before editing. The edited form data refers to the form data of the target form after the target form is edited. The form data contains data of multiple multimedia types. For example, the multimedia types involved in the form data can be text type, picture type, video type, rich text type, list type, etc. Exemplarily, the form data can be JSON data, that is, the initial form data and the edited form data can be regarded as multimedia JSON data. The editable data structure description data is the data structure description data in an editable state. The data structure description data (JSON schema data, or JSON schema protocol) is a standard for describing JSON data structures. The editable data structure description data is used to render the form controls of the target form (which are the basic elements constituting the form and are used to collect information input by the user), such as rendering the input box, rich text edit box, drop-down option box, image link input box, etc. involved in the target form.

[0065] In one embodiment, the terminal displays the target form before editing, and the target form before editing includes initial form data. In response to the editing completion operation on the target form, the terminal obtains the edited form data, and determines the form editing data of the target form according to the initial form data and the edited form data, and the editable data structure description data corresponding to the target form. Exemplarily, in response to at least one editing operation on the target form before editing, the edited form data obtained after at least one editing operation is completed is obtained. The editing operation can be at least one of a data editing operation and a form control editing operation. The data editing operation is an editing operation on the form data, and does not involve an editing operation on the form control in the target form. For example, the data editing operation can be a data adding operation, for example, an operation of first inputting form data in a form control that is not filled with any form data. For another example, the data editing operation can also be a data deleting operation, for example, an operation of deleting form data in a form control. For another example, the data editing operation can also perform a data deleting operation first and then a data adding operation. For example, for a form control filled with form data, the data editing operation can be an operation of filling new form data into the form control after deleting the form data. A form control edit operation is an edit operation for a form control. For example, a form control edit operation can be a form control add operation. For example, a form control add operation is an operation of adding a new form control to a target form and filling the new form control with form data. For another example, a form control edit operation can also be a form control delete operation. For example, a form control delete operation is an operation of deleting a form control on a target form.

[0066] Exemplarily, when the editing operation is a data editing operation, in response to the data editing operation on the data of at least one form control in the target form before editing, the edited form data of at least one form control is determined, and in response to the editing completion operation on the target form, the terminal obtains the edited form data of at least one form control.

[0067] In one embodiment, the terminal is pre-configured with a front-end component related to form editing, wherein the front-end component includes a data comparison component (Diff component), which is a code for performing data comparison, that is, performing data comparison between the initial form data and the edited form data. Exemplarily, step 202 is performed by the data comparison component in the terminal. Exemplarily, the front-end component is a component under a preset form framework, and the preset form framework refers to a framework with dynamic form capabilities and capable of achieving mapping effects between data and UI components, for example, the preset form framework is Formily.

[0068] In an exemplary embodiment, obtaining the form editing data of the target form includes: obtaining the form editing data of the target form in response to an edit confirmation operation on the target form through a button factory component; and receiving the form editing data of the target form transmitted by the button factory component.

[0069] Among them, the edit confirmation operation is an operation to confirm that the editing of the target form is completed. The ButtonFactory component is also a front-end component related to form editing. The ButtonFactory component is a code with distribution and interaction functions. The distribution function refers to the ability to distribute data to the data comparison component. The interaction function refers to the ability to provide a variety of interactive buttons. An interactive button is a button that can respond to the user's trigger operation (such as click operation, confirmation operation, hover operation, etc.).

[0070] To this end, in one embodiment, the button factory component responds to the edit confirmation operation on the target form, uses the form data in the target form after editing as the edited form data, and generates a form editing operation based on the initial form data, the edited form data, and the editable data structure description data. The button factory component distributes the form editing data to the data comparison component to instruct the data comparison component to perform a data comparison process based on the form editing data. In this way, the form editing data can be obtained in a timely manner with the help of the interaction and distribution functions of the button factory component.

[0071] It should be noted that the button factory component packages various conventional form interaction logics (such as initiating verification requests, submitting forms, and resetting form data) provided by the function factory component (Function Component Factory) and the data comparison capabilities provided by the data comparison component into different buttons, and provides them to other components in the form of interactive buttons. The button factory component also provides a mapping table of internal button names and corresponding buttons, so that other components can use these buttons in the form of configuration.

[0072] In this embodiment, after it is determined that the editing of the target form is completed, the form data before and after the editing of the target form and the editable data structure description data are transmitted to the data comparison component in real time with the help of the interaction and distribution functions of the button factory component to efficiently perform data comparison.

[0073] In an exemplary embodiment, the method also includes: obtaining editable data structure description data and initial form data through a control component, and rendering form controls related to the target form on the page according to the editable data structure description data; calling a write data interface through the control component to input data of each multimedia type in the initial form data into a corresponding form control to obtain a target form.

[0074] Among them, the controller component (also called the controller component) is also a front-end component related to form editing. The controller component is the code for rendering editable forms. The button factory component is also a front-end component related to form editing.

[0075] In one embodiment, in response to the selection operation of the target form, the terminal queries the initial form data and the associated editable data structure description data of the target form, and passes them to the control component in the terminal. The control component renders the form control related to the target form on the page according to the editable data structure description data, and calls the write data interface provided by the preset form framework internally by the control component, and sequentially inputs the data of each form attribute name under each multimedia type in the initial form data into the form control corresponding to the form attribute name, so as to obtain an editable target form. Among them, the form attribute name defines the identifier or name of each field in the target form, for example, the "attribute ID (Identity Document, identity identification)" in the target form is a form attribute name belonging to the text type. For example, the target form involves two multimedia types, text type and picture type. There are multiple form attribute names such as "attribute ID", "class name ID", "attribute Chinese name" under the text type. The form control corresponding to the text type is a text input box, and there is a form attribute name of "picture link" under the picture type, and the form control corresponding to the picture type is a picture link input box. The control component calls Fomily's data writing interface, writes the data corresponding to the "attribute ID", "class name ID", and "attribute Chinese name" in the initial form data into the text input box, and writes the data corresponding to the "image link" in the initial form data into the image link input box to obtain an editable target form.

[0076] In this embodiment, the control component renders the initial form data according to the editable data structure description data, thereby realizing the display process of the editable target form. Thus, the user can edit the data of the form controls in the target form according to the needs, thereby realizing the editing process of the target form.

[0077] Step 204: merge the initial form data with the edited form data to obtain a plurality of merged data of different multimedia types.

[0078] The merging is to summarize the data before and after editing that belong to the same multimedia type, that is, for each multimedia type involved in the target form, the form data belonging to the multimedia type before editing is merged with the form data belonging to the multimedia type after editing.

[0079] In one embodiment, the terminal determines multiple multimedia types that need to be merged. For each multimedia type, the terminal obtains data belonging to the multimedia type from the initial form data before editing the target form, which is regarded as the pre-editing form data corresponding to the multimedia type, and obtains data belonging to the multimedia type from the post-editing form data after editing the target form, which is regarded as the post-editing form data corresponding to the multimedia type. The terminal merges the pre-editing form data and the post-editing form data belonging to the multimedia type to obtain the merged data of the multimedia type. Exemplarily, in this embodiment, it can be specifically performed by the data comparison component of the terminal.

[0080] It should be noted that the data comparison logic and display of the same multimedia type are consistent, and the data comparison logic and display of different multimedia types may be different. Therefore, through the merging process, the form data before and after editing of the same multimedia type are gathered together in advance, so that it can be compared according to the data comparison logic matched by the multimedia type and displayed according to the matched display mode, thereby enhancing the data comparison effect and improving the data readability.

[0081] In one embodiment, the step of determining the multimedia type to be merged includes: identifying at least one multimedia type involved in the initial form data, and if the editing operation is a data editing operation, or a form control deletion operation, obtaining a multimedia type set based on at least one multimedia type. If the editing operation is a form control addition operation, determining whether the multimedia type corresponding to the newly added form control belongs to any one of the at least one multimedia type, if neither belongs to, generating a multimedia type set based on the multimedia type corresponding to the newly added form control and at least one multimedia type. If it does, generating a multimedia type set based on at least one multimedia type. Then, for each multimedia type in the multimedia type set, returning to the above step of obtaining data belonging to the multimedia type from the initial form data before editing the target form, and continuing to execute. For example, before editing, the target form involves form controls C1-C5, which respectively involve 3 multimedia types, namely L1-L3. If it is a data editing operation, before and after editing, the form controls remain unchanged, and the multimedia types remain unchanged, that is, the multimedia type set includes L1-L3. If it is a form control deletion operation, the remaining form controls only involve L1 and L2. When comparing data, you still need to compare L1-L3, that is, the multimedia type set includes L1-L3, and the form data after editing in the merged data corresponding to L3 is empty. The remaining form controls involve L1-L3, and the multimedia type set includes L1-L3. If it is a form control addition operation, such as adding C6, if C6 belongs to L1, the multimedia type set includes L1-L3. If C6 belongs to L4, then when comparing data, you need to additionally compare L4. The multimedia type set includes L1-L4, and the form data before editing in the merged data corresponding to L4 is empty.

[0082] Step 206: modify the form controls in the editable data structure description data into multiple comparison components for processing multiple data of different multimedia types.

[0083] The editable data structure description data includes multiple form controls that are allowed to be set in the target form, and mapping relationships between multiple form controls and various multimedia types. Each multimedia type has a corresponding comparison component, which is used to compare the form data of the multimedia type. The comparison component is a part of the data comparison component, that is, the data comparison component includes comparison components corresponding to multiple multimedia types.

[0084] In one embodiment, after obtaining each merged data, the data comparison component determines multiple form controls involved in the multiple merged data, and for each form control in the multiple form controls involved, determines the comparison component corresponding to the UI component according to the UI component corresponding to the form control and the correspondence between the UI component and the comparison component, and modifies the form control in the editable data structure description data to a comparison component for processing data comparison of the corresponding multimedia type. The UI component is a higher level of abstraction, which contains the code of the executed function, and each UI component corresponds to one or more form controls.

[0085] In one embodiment, the method further includes: obtaining a mapping relationship between multimedia types and comparison components, including: obtaining a mapping relationship between multimedia types and form controls from editable data structure description data; modifying the form control corresponding to each multimedia type in the mapping relationship between multimedia types and form controls to a comparison component corresponding to the form control, to obtain a mapping relationship between multimedia types and comparison components.

[0086] It should be noted that the mapping relationship between multimedia types and form controls is pre-set in the editable data structure description data. In the process of performing step 204, it is also necessary to execute this embodiment to adjust the mapping relationship to the mapping relationship between the comparison component and the multimedia type. Exemplarily, the data comparison component obtains the corresponding relationship between the pre-set UI component and the comparison component, and for each form control corresponding to the multimedia type in the mapping relationship between the multimedia type and the form control, the comparison component corresponding to the form control is determined according to the corresponding relationship, and the form control corresponding to each multimedia type in the mapping relationship between the multimedia type and the form control is modified to the comparison component, and the mapping relationship between the multimedia type and the comparison component is obtained. In other words, there is a corresponding comparison component for each multimedia type.

[0087] It should be noted that in the process of merging data, the editable data structure description data needs to be adjusted, and the adjustment content is divided into two parts, namely: modifying the form controls in the editable data structure description data into corresponding comparison components, and modifying the mapping relationship between the multimedia type and the form controls in the editable data structure description data into the mapping relationship between the multimedia type and the comparison component. After the adjustment is completed, the editable data structure description data becomes the reading state data structure description data, that is, the adjusted reading state data structure description data is in an uneditable state.

[0088] In this embodiment, when adjusting the editable data structure description data, by modifying the mapping relationship between the multimedia type and the form control in the editable data structure description data to a mapping relationship between the multimedia type and the comparison component, the corresponding multimedia type data can be subsequently passed into the corresponding comparison component for matching data comparison, thereby enhancing the data comparison effect and improving data readability.

[0089] In one embodiment, after completing step 206, the editable data structure description data is changed into the reading state data structure description data, and the method further includes: the data comparison component is rendered according to the reading state data structure description data to display each comparison component.

[0090] Step 208: passing the merged data to a comparison component that processes data of the corresponding multimedia type.

[0091] In one embodiment, after the data comparison component obtains the merged data of different multimedia types, the merged data of different multimedia types are respectively transmitted to the corresponding comparison components.

[0092] In one embodiment, the merged data is passed into a comparison component that processes data of the corresponding multimedia type, including: obtaining a mapping relationship between the multimedia type and the comparison component; for each multimedia type, determining the comparison component corresponding to the multimedia type based on the mapping relationship, and passing the merged data belonging to the multimedia type into the corresponding comparison component.

[0093] It should be noted that the mapping relationship between multimedia types and form controls mentioned above is essentially the corresponding relationship between the nodes of the form data maintained by the preset form framework and the UI view. This corresponding relationship is used to generate dynamic forms, and the mapping relationship between multimedia types and form controls is modified to the mapping relationship between multimedia types and comparison components. In essence, it is to transplant the preset form framework protocol driving capability into the form data comparison application. Taking the preset form framework as Formily as an example, when generating dynamic forms, the mapping relationship between multimedia types and form controls in the Formily protocol (that is, data described based on the data structure of Formily) is used. On this basis, after the mapping relationship between multimedia types and form controls in the Formily protocol is modified to the mapping relationship between multimedia types and comparison components, in the form data comparison application scenario, the comparison component adapted for each multimedia type is determined according to the modified mapping relationship, and the data comparison is realized with the help of the comparison logic of the adapted comparison component. Moreover, when facing data comparison of different forms, it is only necessary to adjust the mapping relationship in the Formily protocol corresponding to the different forms. There is no need to develop corresponding comparison code for each business scenario to which each form belongs. That is, the form data processing method provided in this application is more universal and can reduce development costs.

[0094] In this embodiment, according to the mapping relationship between multimedia types and comparison components, it is possible to transfer the corresponding multimedia type data to the corresponding comparison component for matching data comparison, so that each comparison component can subsequently display the transferred merged data accordingly, and different comparison effects are used for merged data of different multimedia types, thereby enhancing the data comparison effect and improving data readability. In addition, it is also possible to disperse the data comparison logic into each comparison component belonging to the front-end component, solving the problem of increasing development costs for developers as the number of data types increases.

[0095] Step 210: using a comparison component, the form data before editing and the form data after editing in the merged data of the corresponding multimedia type are compared and displayed to obtain data comparison content of the target form.

[0096] For each multimedia type, the corresponding merged data includes the pre-editing form data belonging to the multimedia type and the post-editing form data belonging to the multimedia type.

[0097] In one embodiment, the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type are compared and displayed respectively by the comparison component to obtain the data comparison content of the target form, including: for each comparison component, the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type are compared and displayed respectively by the comparison component to obtain the comparison content of the corresponding multimedia type; and the comparison contents of each multimedia type are combined to obtain the data comparison content of the target form.

[0098] For example, before editing the target form, the initial form data D1 includes pre-editing form data D11-D13 corresponding to multimedia types L1-L3 respectively; after editing the target form, the edited form data D2 includes edited form data D21-D23 corresponding to L1-L3 respectively. For L1, D11 and D21 are compared and displayed according to the corresponding comparison component 1 to obtain the comparison content of L1; for L2, D12 and D22 are compared and displayed according to the corresponding comparison component 2 to obtain the comparison content of L2; for L3, D13 and D23 are compared and displayed according to the corresponding comparison component 3 to obtain the comparison content of L3.

[0099] In this embodiment, each comparison component is used to realize comparison display of the merged data of the corresponding multimedia type, so that it can be ensured that each merged data can be displayed in an adaptive comparison display mode, thereby enhancing the comparison effect.

[0100] In one embodiment, the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type are compared and displayed respectively through a comparison component to obtain comparison content of the corresponding multimedia type, including: according to the comparison logic and style rules in the comparison component, the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type are compared and displayed to obtain comparison content of the corresponding multimedia type.

[0101] Among them, the comparison logic indicates how to compare the data before and after editing, and the style rules (CSS rules) define the display style of the area where the merged data of the corresponding multimedia type is located. For example, the style rules of the comparison component of the text type define the color, font, size, thickness, etc. of the text, and also define the style of the border where the merged data is located, and define the position and background of the area where the merged data is located in the target form, etc. In one embodiment, each comparison component pre-defines its own comparison logic and style rules. The comparison logic of different comparison components is different. For example, the comparison logic of the comparison component that processes the rich text type requires additional comparison format, and the comparison logic of the comparison component that processes the picture type is to display the picture before and after editing at the same time. The style rules of different comparison components can be the same or different. In one embodiment, for each comparison component, according to the comparison logic in the comparison component, the form data before and after editing in the merged data of the corresponding multimedia type are compared to obtain the comparison result, and according to the style rules in the comparison component, the comparison result is rendered and displayed to obtain the comparison content of the corresponding multimedia type.

[0102] In this embodiment, through the comparison logic and style rules of the comparison component, the merged data of the corresponding multimedia type can be displayed in an adaptive comparison display mode to enhance the comparison effect.

[0103] The following is a detailed description of the data comparison content generation process. Figure 3 FIG. 1 is a schematic diagram of data comparison in an embodiment. Figure 3The flowcharts are all executed by the data comparison component as the implementation subject, and the data comparison component includes a data processing unit, a rendering unit, a capture unit and multiple comparison components. First, the data comparison component obtains the initial form data before editing the target form and the edited form data after editing the target form, as well as the edited JSON schema data (the editable data structure description data mentioned above). The data processing unit merges the initial form data and the edited form data to obtain the merged data of each multimedia type (refer to the aforementioned step 202). The data processing unit adjusts the protocol of the edited JSON schema data, that is, the form controls in the edited JSON schema data are modified to the corresponding comparison components, the mapping relationship between the multimedia type and the form control in the edited JSON schema data is modified to the mapping relationship between the multimedia type and the comparison component, and the features that are only available in the edited state (such as grayed out state, linkage logic) in the edited JSON schema data are removed to obtain the reading state JSON schema data. Then, the rendering unit renders the reading state Fomily form (the target form built based on Fomily and in the reading state) according to the reading state JSON schema data. Then, the Fomily form will map the merged data of different multimedia types to the corresponding comparison components for comparison according to the mapping relationship between multimedia types and comparison components. For example, Figure 3 , the merged data of rich text type is mapped to the rich text comparison component for rich text comparison display, and the corresponding comparison content is obtained. The merged data of image link type is mapped to the image comparison component for image comparison display, and the corresponding comparison content is obtained. Finally, the rendering unit combines the various comparison contents to obtain the data comparison content.

[0104] In the above form data processing method, by acquiring the form editing data of the target form, editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form can be obtained; the form data includes multiple data of different multimedia types. The initial form data and the edited form data are merged to obtain multiple merged data of different multimedia types, so as to facilitate the subsequent data comparison of the merged data of the same multimedia type, and the form control in the editable data structure description data is modified to multiple comparison components for processing multiple data of different multimedia types, and the form control can be adjusted to a comparison component capable of data comparison. In this way, after the merged data is passed into the comparison component for processing the data of the corresponding multimedia type, the form data before editing and the form data after editing in the merged data of the corresponding multimedia type can be compared and displayed by the comparison component, so as to realize the data comparison of the form data, so as to obtain the data comparison content of the target form. Therefore, when processing different form data, by adjusting the editable data structure description data, the data comparison of each form data can be realized, without the need to develop corresponding comparison codes according to the business scenarios to which each form belongs, thereby improving the versatility of form data comparison and reducing the development cost.

[0105] After determining the data comparison content, in order to facilitate other devices to quickly obtain the target form containing the data comparison content without configuring any components, a form text corresponding to the target form containing the data comparison content can be generated, and other devices can directly render and display the target form containing the data comparison content based on the form text. To this end, in one embodiment, the method also includes: obtaining the form markup language text of the target form containing the data comparison content; for each element in the target form, traversing the page style rule table of the page where the target form is located according to the class name of the element, and determining the form style rule text; based on the form markup language text and the form style rule text, generating a form text corresponding to the target form containing the data comparison content, and the form text is used to display the target form containing the data comparison content.

[0106] Among them, the form style rule text specifies the form style rule information (i.e., information about CSS rules) of the target form containing data comparison content. The form markup language text specifies the form markup language information (i.e., information about the structure of HTML) of the target form containing data comparison content. There are form style rule information and form markup language information in the form text. Since the form style rule text can be regarded as the CSS text of the target form and the form markup language text can be regarded as the HTML text of the target form, the form text is a text containing HTML and CSS. Therefore, after obtaining the form text, other devices can automatically display the target form containing data comparison content according to the form text without configuring data comparison components, control components, and button factory components. The target form containing data comparison content can be understood as the edited target form. The elements in the target form can be understood as the markup language elements of the target form, i.e., HTML elements.

[0107] In one embodiment, the data comparison component intercepts the form markup language text of the target form containing the data comparison content from the markup language text of the page. Exemplarily, the data comparison component also includes an interception unit, which obtains the region class name of the region where the target form is located in the page through the interception unit, and intercepts the markup language text corresponding to the region class name from the markup language text of the page according to the region class name, and uses the intercepted markup language text as the form markup language text of the target form of the data comparison content.

[0108] In one embodiment, for each element in the target form, the page style rule table of the page where the target form is located is traversed according to the class name of the element to determine the style rule text of the element, including: for each element in the target form, the page style rule table of the page where the target form is located is traversed according to the class name of the element to determine the style rule text of the element; the style rule global variable of the page is obtained, and the form style rule text is obtained by adding the style rule global variable to the style rule text of each element respectively.

[0109] Among them, the page style rule table can be obtained by obtaining the HTML document of the page. The style rule text of each element contains the style rules of the element. The style rule global variable of the page can be regarded as the CSS global variable on the page. The style rule global variable specifies the variable style in the form. Based on this, the style rule text of each element in the target form and the style rule global variable are combined to fully display the form. The style rule global variable can be understood as all the CSS variables under the root element in the HTML document of the page. Therefore, after obtaining the style rule text of each element, the interception unit in the data comparison component adds all the CSS variables (CSS global variables) under the root element to each style rule text to obtain the style rule text after each addition, and combines the style rule text after each addition to obtain the form style rule text.

[0110] It should be noted that when the content of a page is intercepted in the related art, the corresponding relationship between the CSS selector and the HTML element of the page is usually used. By traversing the CSS style rules of the entire page, the target element is matched with the selector of each style rule. After the traversal is completed, the CSS style of the target element can be obtained. Finally, the intercepted rich text content is obtained by combining the style tag (used to define the internal style sheet) and the HTML text of the target element. In other words, the interception of the related art is based on the interception method of the CSS style of a single element. However, the related art only obtains the CSS style of the target element without considering the CSS global variables, which will cause the intercepted CSS style to be unable to reference the value of the variable, thereby failing to correctly display the intercepted content. In the interception method provided in the embodiment of the present application, when obtaining the CSS style, the class name matching method is used to collect the CSS style, and the CSS global variables are taken into account. Compared with the method of intercepting the CSS style of a single element in the related art, the web page content intercepted by the embodiment of the present application is more comprehensive and the algorithm performance is better.

[0111] In this embodiment, style rules are collected through the class names of elements, and style rule global variables are added to the style rule text of each element to ensure that the intercepted form style rule text is more comprehensive and can correctly reference the values ​​of variables to ensure that the subsequent form text can fully display the target form, thereby ensuring the effectiveness and accuracy of the interception process.

[0112] In one embodiment, the interception unit of the data comparison component combines the form markup language text and the form style rule text to generate the form text.

[0113] In one embodiment, the method further includes: according to the image receiving requirements of the text acquiring party, the form text can also be processed to generate an image to obtain a corresponding form image. The form image is used to display the target form containing the data comparison content. In this way, the versatility can be further improved.

[0114] In this embodiment, after the data comparison content of the target form is determined, the form text for directly displaying the target form containing the data comparison content can be generated through the form markup language text and form style rule text of the target form. In this way, when other devices have the need to obtain the target form, they can quickly obtain the target form containing the data comparison content without configuring any components. In addition, the volume occupied by the generated form text is updated relative to the form image in the form of a picture, which is more convenient to transmit in network communication, will not have the problem of image clarity, and is also easier to save.

[0115] In one embodiment, the method further includes: determining an editor identifier, and storing the form text and the editor identifier in a database in correspondence.

[0116] The editor identifier is the identifier of the user who edits the target form. Exemplarily, the editing time can also be obtained, and the editor identifier, the editing time and the form text are correspondingly stored in the database.

[0117] For example, take rich text comparison as an example, Figure 4 Shown is a schematic diagram of rich text comparison display in an embodiment. Figure 4 In the area where the detailed product rules are located on the page, a form form1 with rich text content is displayed. Before editing, form1 involves picture P1, rule information 1 to rule information 2. According to the needs, picture P1 in form1 is modified to picture P2, and rule information 1 and rule information 2 of the active rule are deleted, and rule information 3-rule information 4 are added. In response to the triggering operation of the save control, it is determined that the editing is completed, and a form text text1 of form form1 containing data comparison content context1 is generated. Text1 and the editor identifier are stored in the database accordingly. At the same time, a form comparison pop-up window is displayed, in which context1 is displayed, wherein context1 is compared and displayed according to the rich text comparison logic, that is, the final effect of the rich text and the details of the rich text changes are displayed respectively. The final effect of the rich text displays the edited picture P2 and rule information 3-4, and the rich text change details display the pictures P1 and P2 before and after editing, and a delete icon is superimposed on the picture P1 (i.e. Figure 4 ), and displays the rule information before editing, and superimposes a delete icon on the rule information before editing.

[0118] For example, take the comparison of picture links as an example. Figure 5 , which is a schematic diagram of the comparative display of picture links in an embodiment. Figure 5 For the form form2 of the product information with the product ID of ltzx, the valid operator in the form2 before editing is changed from "select all" to "operator 1", the product status is changed from "off-shelf status" to "on-shelf status", and the image link is changed from "url1" to "url2". In response to the triggering operation of the save control, it is determined that the editing is completed, and the form text text2 of the form form2 containing the data comparison content context2 is generated, and the text2 and the editor identifier are stored in the database accordingly. At the same time, the form comparison pop-up window is displayed, and the form comparison pop-up window displays context2, wherein context2 is displayed according to the comparison logic of the corresponding multimedia type. For example, for the valid operators and product status belonging to the text type, the corresponding comparison logic is to display the data before editing and the data after editing at the same time, and superimpose the deletion icon in the data before editing. For the image link belonging to the image link type, the corresponding comparison logic is to display the image of the url before editing and the image of the url after editing, that is, to display the image of url1 and the image of url2 at the same time. In this way, it is convenient for users to know more intuitively what kind of image is modified, which is conducive to subsequent review.

[0119] In this embodiment, by storing the editor identifier and the form text in a database in correspondence, data traceability is achieved, which facilitates subsequent review of the editing process of the target form.

[0120] In one embodiment, the method further includes: sending the form text to a form reviewer to instruct the form reviewer to display a target form containing data comparison content according to the form text, and perform a form review on the target form containing data comparison content.

[0121] For example, let's take a text comparison as an example. Figure 6 FIG. 1 is a schematic diagram of a form review process in an embodiment. Figure 6 The form form3 is edited and sent to the form reviewer for review. form3 involves attribute ID, class name ID, attribute Chinese name, attribute description, and attribute value type. After changing the Chinese name from "Ordering Process 11" to "Ordering Process 22", and changing the attribute description from "New Office 1111" to "New Office 2222", click Save to display the form comparison pop-up window. The form comparison pop-up window contains the edited form3 with data comparison content. The Chinese name and attribute description in the data comparison content are displayed with the comparison logic of the text comparison component, that is, the data before deletion and the data after deletion are displayed side by side, and the delete icon is superimposed on the data before deletion (that is, Figure 6). Then, generate the form text text3 of the edited form3, and store text3 and the editor identifier in correspondence. The form comparison pop-up window also includes an audit control. In response to the triggering operation of the audit control, text3 is sent to the form auditor. In this way, the form auditor can directly display the edited form3 based on the text3. Specifically, after the form auditor initiates the audit, the audit page of the process audit system is displayed. In the audit details area of ​​the audit page, the edited form3 obtained based on text3 is displayed, and the edited form3 contains data comparison content.

[0122] In this embodiment, when performing a form review scenario, the form reviewer can quickly and intuitively display a target form containing data comparison content based on the form text without configuring any components, thereby improving the convenience of form review.

[0123] As mentioned above, the generation of a target form (a dynamic form) with data comparison capabilities is implemented based on at least a data comparison component, a control component, and a button factory component. Specifically, the terminal constructs an integrated component (Main component) for users to interact with, and the integrated component can be regarded as an entry component for data comparison of the target form. Based on the integrated component, data comparison processing for the target form can be enabled. Next, it is necessary to obtain the form data and editable data structure description data of the target form before editing based on the control component, so as to display the editable target form to instruct the user to edit the editable target form. After the editing is completed, the form editing data is obtained through the button factory component and distributed to the data comparison component, and the data comparison process is performed by the data comparison component. For details, see the previous text. In this process, it is necessary to pre-generate the control component and the button factory component, and then generate the control component and the integrated component, such as Figure 7As shown, it is a schematic diagram of the generation process of each component in an embodiment. In one embodiment, the control component generation step includes: the terminal obtains the framework component corresponding to the preset preset form framework (form component for providing the preset form framework), if fomily is used, the fomily component is obtained. The terminal obtains the pre-set UI factory component, and the terminal uses the UI factory component and the fomily component to generate the control component. Specifically, the UI factory component is used to provide a form control for the formily component. On the basis of the UI factory component and the formily component, multiple Formily interfaces are encapsulated to expose more aggregated interfaces to other components, such as modifying the mode of the Formily dynamic form according to the external state, verifying the form data, etc., to generate the control component. In one embodiment, the button factory component generation step includes: the terminal obtains the function factory component, wherein the function factory component provides various conventional form interaction logics (such as initiating a verification request, submitting a form, resetting the form data). The terminal uses the function factory component to generate a button factory component that matches the interaction requirements and distribution requirements according to the interaction requirements and distribution requirements of the target form. In one embodiment, the data comparison component generation step includes: using the button factory component and the control component to generate. In one embodiment, the integration component can be generated using the button factory component and the control component exposure method. The integration component is an entry component exposed to users. The integration component provides users with form editing capabilities, button interaction capabilities, and data comparison content generation capabilities. The form editing capability is provided by the control component, and the button interaction capability and data comparison capability are provided by the button factory component.

[0124] In a specific embodiment, Figure 8 FIG. 1 is a schematic diagram of a form data processing process in an embodiment. Figure 8 This embodiment involves three components pre-set in the form editing terminal, namely, a control component, a button factory component and a data comparison component. Fig. 9 FIG. 1 is a schematic diagram of a data comparison component structure in an embodiment. Fig. 9 The data comparison component includes a data processing unit, a rendering unit, a capture unit, and comparison components corresponding to different multimedia types. The data processing unit can be regarded as a code for implementing form data merging and protocol adjustment. The rendering unit can be regarded as a code for rendering. The capture unit can be regarded as a code for generating form text. Each comparison component is used to perform the comparison and display of data of the corresponding multimedia type. For the specific interaction process, see Fig. 9 For example, the data processing unit interacts with the rendering unit and the comparison component, and the rendering unit and the comparison component interact with the interception unit. Fig.10 The above is a schematic diagram of the flow chart of form data processing in one embodiment. Figure 8-Figure 10 To explain:

[0125] Step 1002: The control component obtains editable data structure description data and initial form data.

[0126] Step 1004: The control component performs protocol-driven view according to the editable data structure description data, and renders form controls related to the target form on the page.

[0127] Step 1006: The control component receives the initial form data and inputs the initial form data into the form controls to obtain an editable target form.

[0128] Specifically, after rendering the form control, the control component calls the data writing interface to input the data of each multimedia type in the initial form data into the corresponding form control to obtain an editable target form.

[0129] Step 1008: The button factory component determines the form editing data according to the editable target form, and distributes the editable data structure description data, initial form data and edited form data in the form editing data to the data comparison component through the function button.

[0130] Specifically, the button factory component obtains the form editing data of the target form in response to the edit confirmation operation on the target form, and transmits the form editing data to the data comparison component.

[0131] Step 1010: The data comparison component performs protocol adjustment on the editable data structure description data to obtain the reading state data structure description data, and merges the initial form data and the edited form data to obtain each merged data, and transmits it to the corresponding comparison component. Specifically, refer to the following steps 1010a to 1010c:

[0132] Step 1010a: After receiving the form editing component, the data processing unit in the data comparison component performs protocol adjustment on the editable data structure description data to obtain the reading state data structure description data.

[0133] The specific steps of adjusting the protocol include: obtaining the mapping relationship between the multimedia type and the form control from the editable data structure description data. After the form control corresponding to each multimedia type in the mapping relationship between the multimedia type and the form control is modified into a comparison component corresponding to the form control, the mapping relationship between the multimedia type and the comparison component is obtained, and the form control in the editable data structure description data is modified into a plurality of comparison components for processing a plurality of data of different multimedia types, it is determined that the editable data structure description data is converted into the reading state data structure description data.

[0134] Step 1010b: The data processing unit merges the initial form data with the edited form data to obtain a plurality of merged data of different multimedia types.

[0135] Step 1010c: For each multimedia type, the data processing unit determines the comparison component corresponding to the multimedia type according to the mapping relationship between the multimedia type and the comparison component, and transfers the merged data belonging to the multimedia type to the corresponding comparison component.

[0136] Step 1012: The data comparison component performs a protocol-driven view based on the read-state data structure description data, and performs data comparison based on the received merged data to obtain data comparison content.

[0137] Specifically, the data processing unit sends the reading state data structure description data content to the rendering unit for rendering to display each comparison component, and the data processing unit sends each merged data to the corresponding comparison component respectively, and for each comparison component, according to the comparison logic and style rules in the comparison component, the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type are compared and displayed to obtain the comparison content of the corresponding multimedia type. The rendering unit renders each comparison content to generate data comparison content.

[0138] Step 1014: The data comparison component intercepts the target form on the page containing the data comparison content to obtain the form text. Specifically, refer to the following steps 1014a to 1014d:

[0139] Step 1014a: The interception unit in the data comparison component obtains the form markup language text of the target form containing the data comparison content.

[0140] Step 1014b: For each element in the target form, the interception unit traverses the page style rule table of the page where the target form is located according to the class name of the element to determine the style rule text of the element.

[0141] Step 1014c: The interception unit obtains the style rule global variable of the page, and obtains the form style rule text by adding the style rule global variable to the style rule text of each element.

[0142] Step 1014d: The interception unit generates a form text corresponding to the target form containing the data comparison content based on the form markup language text and the form style rule text, and the form text is used to display the target form containing the data comparison content.

[0143] Step 1016a: The data comparison component determines the editor ID and stores the form text and the editor ID in the database accordingly. In this way, when the subsequent form editing terminal receives a viewing request for the target form, it obtains the form text of the target form from the database and sends the form text to the request initiator who initiated the viewing request, so as to instruct the request initiator to display the target form containing the data comparison content according to the form text.

[0144] Alternatively, step 1016b: in response to a trigger operation on the review control, the form text is sent to the form reviewer to instruct the form reviewer to display a target form containing data comparison content according to the form text, and to perform a form review on the target form containing data comparison content.

[0145] In this embodiment, by acquiring the form editing data of the target form, editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form can be obtained; the form data includes multiple data of different multimedia types. The initial form data and the edited form data are merged to obtain multiple merged data of different multimedia types, so as to facilitate the subsequent data comparison of the merged data of the same multimedia type. The form control in the editable data structure description data is modified to multiple comparison components for processing multiple data of different multimedia types, and the form control can be adjusted to a comparison component capable of data comparison. In this way, after the merged data is passed into the comparison component for processing the data of the corresponding multimedia type, the form data before editing and the form data after editing in the merged data of the corresponding multimedia type can be compared and displayed by the comparison component, so as to realize the data comparison of the form data, so as to obtain the data comparison content of the target form. Therefore, when processing different form data, the data comparison of each form data can be realized by adjusting the editable data structure description data, without the need to develop corresponding comparison codes according to the business scenarios to which each form belongs, thereby improving the versatility of form data comparison and reducing the development cost.

[0146] The form data processing method provided by the present application can be applied in any form processing scenario, for example, in a form editing scenario, a scenario of confirming the edited form, a scenario of leaving data traces for the processed form, a form review scenario, etc. Taking the scenario of editing a dynamic form as an example, the form editing terminal obtains the form editing data of the dynamic form, and the form editing data includes editable data structure description data, initial form data before editing the dynamic form, and edited form data after editing the dynamic form; the form data includes multiple data of different multimedia types; the initial form data and the edited form data are merged to obtain multiple merged data of different multimedia types; the form controls in the editable data structure description data are modified to multiple comparison components for processing multiple data of different multimedia types; the merged data is passed into the comparison component for processing the data of the corresponding multimedia type; the form data before editing and the form data after editing in the merged data of the corresponding multimedia type are compared and displayed by the comparison component, and the data comparison content of the dynamic form is obtained.

[0147] After completing the editing of the dynamic form and obtaining the data comparison content according to the above process, it can be applied to other scenarios. For example, in the scenario of confirming the edited form, the editor can confirm the edited form by comparing the data comparison content obtained by the display.

[0148] Next, in order to facilitate the subsequent review of the data comparison content of the dynamic form, the form text of the dynamic form can be generated. Specifically, the form markup language text of the dynamic form containing the data comparison content is obtained; for each element in the dynamic form, the page style rule table of the page where the dynamic form is located is traversed according to the class name of the element to determine the form style rule text; based on the form markup language text and the form style rule text, a form text corresponding to the dynamic form containing the data comparison content is generated, and the form text is used to display the dynamic form containing the data comparison content. In this way, in the scenario of leaving data traces on the processed form, the editor identification and the form text can be stored in the database accordingly to leave data traces on the edited dynamic form, which can be viewed in real time based on demand later. Alternatively, in the form review scenario, after the editor completes the editing of the dynamic form, click the review control on the page where the dynamic form is located to send the generated form text to the form reviewer, so that the target form containing the data comparison content is displayed by the form reviewer according to the form text for review.

[0149] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0150] Based on the same inventive concept, the embodiment of the present application also provides a form data processing device for implementing the form data processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more form data processing device embodiments provided below can refer to the limitations of the form data processing method above, and will not be repeated here.

[0151] In an exemplary embodiment, Fig.11 As shown, a form data processing device 1100 is provided, comprising: an acquisition module 1102, a merging module 1104, a modification module 1106, an input module 1108 and a comparison module 1110, wherein:

[0152] The acquisition module 1102 is used to acquire the form editing data of the target form, the form editing data includes editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form; the form data includes multiple data of different multimedia types;

[0153] A merging module 1104, used to merge the initial form data with the edited form data to obtain a plurality of merged data of different multimedia types;

[0154] A modification module 1106, for modifying the form control in the editable data structure description data into a plurality of comparison components for processing a plurality of data of different multimedia types;

[0155] An input module 1108, for inputting the merged data into a comparison component that processes data of a corresponding multimedia type;

[0156] The comparison module 1110 is used to compare and display the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type through the comparison component, so as to obtain the data comparison content of the target form.

[0157] In some embodiments, the acquisition module 1102 is used to acquire the form editing data of the target form in response to the edit confirmation operation on the target form through the button factory component; and receive the form editing data of the target form transmitted by the button factory component.

[0158] In some embodiments, the acquisition module 1102 is also used to obtain editable data structure description data and initial form data through the control component, and render form controls related to the target form on the page according to the editable data structure description data; call the write data interface through the control component to input the data of each multimedia type in the initial form data into the corresponding form control to obtain the target form.

[0159] In some embodiments, the input module 1108 is used to obtain the mapping relationship between the multimedia type and the comparison component; for each multimedia type, the comparison component corresponding to the multimedia type is determined according to the mapping relationship, and the merged data belonging to the multimedia type is input into the corresponding comparison component.

[0160] In some embodiments, the input module 1108 is also used to obtain the mapping relationship between multimedia types and form controls from the editable data structure description data; modify the form control corresponding to each multimedia type in the mapping relationship between multimedia types and form controls to a comparison component corresponding to the form control, and obtain the mapping relationship between the multimedia type and the comparison component.

[0161] In some embodiments, the comparison module 1110 is used to compare and display the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type through the comparison component for each comparison component, so as to obtain the comparison content of the corresponding multimedia type; and combine the comparison contents of each multimedia type to obtain the data comparison content of the target form.

[0162] In some embodiments, the comparison module 1110 is used to compare and display the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type according to the comparison logic and style rules in the comparison component to obtain the comparison content of the corresponding multimedia type.

[0163] In some embodiments, the device also includes a generation module, which is used to obtain the form markup language text of the target form containing data comparison content; for each element in the target form, traverse the page style rule table of the page where the target form is located according to the class name of the element to determine the form style rule text; based on the form markup language text and the form style rule text, generate a form text corresponding to the target form containing data comparison content, and the form text is used to display the target form containing data comparison content.

[0164] In some embodiments, the generation module is also used to traverse the page style rule table of the page where the target form is located according to the class name of the element for each element in the target form, and determine the style rule text of the element; obtain the style rule global variable of the page, and obtain the form style rule text by adding the style rule global variable to the style rule text of each element respectively.

[0165] In some embodiments, the device also includes a storage module for determining an editor identifier and storing the form text and the editor identifier in a database in correspondence.

[0166] In some embodiments, the device also includes a sending module for sending the form text to the form reviewer to instruct the form reviewer to display the target form containing the data comparison content according to the form text and perform a form review on the target form containing the data comparison content.

[0167] Each module in the above-mentioned form data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0168] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a form data processing method is implemented.

[0169] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0170] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0171] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0172] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0174] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0175] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.

[0176] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A form data processing method, characterized in that: The method comprises: Acquire form editing data of a target form, wherein the form editing data includes editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form; the form data includes a plurality of data of different multimedia types; Merging the initial form data with the edited form data to obtain a plurality of merged data of different multimedia types; Modifying the form controls in the editable data structure description data into multiple comparison components for processing the multiple data of different multimedia types; passing the combined data into a comparison component that processes data of the corresponding multimedia type; The comparison component compares and displays the form data before editing and the form data after editing in the merged data of the corresponding multimedia type respectively, and obtains the data comparison content of the target form.

2. The method according to claim 1, characterized in that The step of obtaining the form editing data of the target form includes: In response to the edit confirmation operation on the target form, the button factory component obtains the form edit data of the target form; Receive the form editing data of the target form passed by the button factory component.

3. The method according to claim 2, characterized in that The method further comprises: Obtain editable data structure description data and initial form data through a control component, and render form controls related to the target form on a page according to the editable data structure description data; The control component calls the write data interface to input each multimedia type of data in the initial form data into the corresponding form control to obtain the target form.

4. The method according to claim 1, characterized in that: The step of transferring the combined data to a comparison component that processes data of a corresponding multimedia type includes: Obtaining a mapping relationship between multimedia types and comparison components; For each multimedia type, a comparison component corresponding to the multimedia type is determined according to the mapping relationship, and the merged data belonging to the multimedia type is transferred to the corresponding comparison component.

5. The method according to claim 4, characterized in that The obtaining of the mapping relationship between the multimedia type and the comparison component includes: Acquire a mapping relationship between multimedia types and form controls from the editable data structure description data; The form control corresponding to each multimedia type in the mapping relationship between the multimedia type and the form control is modified into a comparison component corresponding to the form control, so as to obtain a mapping relationship between the multimedia type and the comparison component.

6. The method according to claim 1, characterized in that The comparing component compares and displays the form data before editing and the form data after editing in the merged data of the corresponding multimedia type, respectively, to obtain the data comparison content of the target form, including: For each comparison component, the form data before editing and the form data after editing in the merged data of the corresponding multimedia type are compared and displayed by the comparison component to obtain the comparison content of the corresponding multimedia type; The comparison contents of various multimedia types are combined to obtain the data comparison contents of the target form.

7. The method according to claim 6, characterized in that The comparison component compares and displays the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type, respectively, to obtain the comparison content of the corresponding multimedia type, including: According to the comparison logic and style rules in the comparison component, the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type are compared and displayed to obtain the comparison content of the corresponding multimedia type.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Obtaining a form markup language text of a target form containing the data comparison content; For each element in the target form, traverse the page style rule table of the page where the target form is located according to the class name of the element to determine the form style rule text; Based on the form markup language text and the form style rule text, a form text corresponding to a target form including the data comparison content is generated, and the form text is used to display the target form including the data comparison content.

9. The method according to claim 8, characterized in that For each element in the target form, traversing the page style rule table of the page where the target form is located according to the class name of the element to determine the form style rule text includes: For each element in the target form, traverse the page style rule table of the page where the target form is located according to the class name of the element to determine the style rule text of the element; The style rule global variable of the page is obtained, and the form style rule text is obtained by adding the style rule global variable to the style rule text of each element respectively.

10. The method according to claim 8, characterized in that The method further comprises: The editor identification is determined, and the form text and the editor identification are stored in a database correspondingly.

11. The method according to claim 8, characterized in that The method further comprises: The form text is sent to a form reviewer to instruct the form reviewer to display a target form containing the data comparison content according to the form text, and to perform a form review on the target form containing the data comparison content.

12. A form data processing device, characterized in that: The device comprises: An acquisition module, used for acquiring form editing data of a target form, wherein the form editing data includes editable data structure description data, initial form data before editing the target form, and edited form data after editing the target form; the form data includes a plurality of data of different multimedia types; A merging module, used for merging the initial form data with the edited form data to obtain a plurality of merged data of different multimedia types; A modification module, used for modifying the form controls in the editable data structure description data into a plurality of comparison components for processing the plurality of data of different multimedia types; An input module, used for inputting the combined data into a comparison component that processes data of a corresponding multimedia type; The comparison module is used to compare and display the pre-editing form data and the post-editing form data in the merged data of the corresponding multimedia type through the comparison component to obtain the data comparison content of the target form.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.