Form display method and device, electronic equipment and readable storage medium
By updating the state transition rules of the form in real time and responding to user interactions, dynamically adjusting the form display, solving the problem that traditional form display cannot adapt to real-time business needs, and improving management efficiency and user experience.
Patent Information
- Application Number
- CN202411510153.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional forms display cannot be adjusted according to real-time business needs, resulting in low efficiency in managing forms.
By obtaining the form's status conversion rules, update the form display in real time, respond to user interaction, perform form conversion when the conversion condition is triggered, and send the conversion form to the terminal device to display.
It realizes dynamic adjustment of forms, adapts to changing business needs, and improves the efficiency and user experience of form management.
Smart Images

Figure CN119473475A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a form display method, a form display device, an electronic device, and a computer-readable storage medium. Background Art
[0002] At present, information management systems have been widely used in various enterprises and institutions. Among them, forms, as the core tool for data processing and collection, are becoming increasingly important in information management systems.
[0003] However, traditional form display often relies on static rules and fixed state management mode, which shows obvious limitations when facing complex and changing business needs. For example, form display cannot be adjusted according to real-time business needs. When business rule processes change or new needs are added based on business needs, the information management system usually needs to recode and deploy forms, resulting in increased maintenance costs and increased operational complexity, making form management inefficient. Summary of the invention
[0004] The embodiment of the present invention provides a form display method, device, electronic device and computer-readable storage medium to solve the problem that form display cannot be adjusted according to real-time business needs, resulting in low efficiency in managing forms.
[0005] An embodiment of the present invention discloses a form display method, which is applied to a server, the server and a terminal device, the terminal device provides a graphical user interface, the graphical user interface at least includes a form, and the method includes:
[0006] Acquire the state transition rule of the form; the state transition rule includes a transition condition and form transition logic, and the state transition rule is updated in real time based on the business rule flow corresponding to the form;
[0007] In response to a user's form interaction operation on the form, determining a current form state of the form;
[0008] When a target conversion condition in the conversion condition is triggered, the form is converted according to the form conversion logic corresponding to the target conversion condition and the current form state to obtain a converted form;
[0009] The conversion form is sent to the terminal device so as to display the conversion form in the graphical user interface of the terminal device.
[0010] Optionally, the state transition rule further includes the state of the form, and the form state includes at least the initial state of the form.
[0011] Optionally, in response to a form interaction operation of the user on the form, before determining a current form state of the form, the method further includes:
[0012] According to the initial state of the form in the state transition rule, generating a form according to the initial state;
[0013] The form is sent to the terminal device so as to be displayed in the graphical user interface of the terminal device.
[0014] Optionally, before determining the current form state of the form in response to a form interaction operation of the user on the form, the method further includes:
[0015] Provide state machine management interface;
[0016] In response to a configuration operation of the form by a user through a state machine management interface, a state transition rule of the form is determined.
[0017] Optionally, in response to a form interaction operation of the user on the form, after determining a current form state of the form, the method further comprises:
[0018] Feedback prompt information is provided in the graphical user interface according to the form interaction operation of the user on the form.
[0019] Optionally, the conversion condition is a preset condition or a preset event.
[0020] Optionally, converting the form to obtain a converted form according to the form conversion logic corresponding to the target conversion condition and the current form state includes:
[0021] According to the form conversion logic corresponding to the target conversion condition and the current form state, the form components of the form are converted to obtain a converted form.
[0022] Optionally, converting the form component of the form includes:
[0023] Hide or show the specified form component in the form.
[0024] Optionally, the server includes a dynamic rule engine and a state machine, and the dynamic rule engine displays the form according to the state transition rule defined by the state machine.
[0025] The embodiment of the present invention further discloses a form display device, which is applied to a server, the server and a terminal device, the terminal device includes a graphical user interface, the graphical user interface includes a form, and the device includes:
[0026] A state conversion rule acquisition module is used to acquire the state conversion rule of the form; the state conversion rule includes a conversion condition and a form conversion logic, and the state conversion rule is updated in real time based on the business rule process corresponding to the form;
[0027] A current form state determination module, used to determine the current form state of the form in response to a form interaction operation performed by a user on the form;
[0028] A conversion form generating module, configured to convert the form to obtain a conversion form according to the form conversion logic corresponding to the target conversion condition and the current form state when a target conversion condition in the conversion condition is triggered;
[0029] The conversion form display module is used to send the conversion form to the terminal device so as to display the conversion form in the graphical user interface of the terminal device.
[0030] Optionally, the state transition rule further includes the state of the form, and the form state includes at least the initial state of the form.
[0031] Optionally, the device further comprises: an initial display module, configured to:
[0032] According to the initial state of the form in the state transition rule, generating a form according to the initial state;
[0033] The form is sent to the terminal device so as to be displayed in the graphical user interface of the terminal device.
[0034] Optionally, the device further includes: a configuration module, configured to:
[0035] Provide state machine management interface;
[0036] In response to a configuration operation of the form by a user through a state machine management interface, a state transition rule of the form is determined.
[0037] Optionally, the device further comprises: a feedback module, configured to:
[0038] Feedback prompt information is provided in the graphical user interface according to the form interaction operation of the user on the form.
[0039] Optionally, the conversion condition is a preset condition or a preset event.
[0040] Optionally, a conversion form generation module is specifically used to:
[0041] According to the form conversion logic corresponding to the target conversion condition and the current form state, the form components of the form are converted to obtain a converted form.
[0042] Optionally, a conversion form generation module is specifically used to:
[0043] Hide or show the specified form component in the form.
[0044] Optionally, the server includes a dynamic rule engine and a state machine, and the dynamic rule engine displays the form according to the state transition rule defined by the state machine.
[0045] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0046] The memory is used to store computer programs;
[0047] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.
[0048] The embodiment of the present invention further discloses a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the embodiment of the present invention.
[0049] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.
[0050] The embodiments of the present invention include the following advantages:
[0051] In an embodiment of the present invention, a server is applied, the server is connected to a terminal device, the terminal device provides a graphical user interface, the graphical user interface includes at least a form, and a state conversion rule of the form is obtained; the state conversion rule includes a conversion condition and a form conversion logic, and the state conversion rule is updated in real time based on the business rule process corresponding to the form; in response to the user's form interaction operation on the form, the current form state of the form is determined; when the target conversion condition in the conversion condition is triggered, the form is converted according to the form conversion logic corresponding to the target conversion condition and the current form state to obtain a conversion form; the conversion form is sent to the terminal device to display the conversion form in the graphical user interface of the terminal device. In an embodiment of the present invention, the form is converted according to the current form state of the form after the user performs the form interaction operation and the real-time form state conversion rule to obtain a conversion form and display it, so that the form can adapt to the ever-changing business needs, improve the management efficiency of the form, and improve the user's form usage experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flowchart of a form display method provided in an embodiment of the present invention;
[0053] Figure 2 is a schematic diagram of an application environment provided in an embodiment of the present invention;
[0054] Figure 3 It is a schematic diagram of the overall architecture of a dynamic rule engine and a state machine provided in an embodiment of the present invention;
[0055] Figure 4 is a structural block diagram of a form display device provided in an embodiment of the present invention;
[0056] Figure 5 It is a schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention. DETAILED DESCRIPTION
[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] At present, the state management mechanism of traditional information management systems (systems) lacks flexibility and cannot dynamically adapt to changes in different business processes, such as the need to simplify business processes such as leave and reimbursement. Although the back-end of the information management system has usually introduced a process engine to handle complex business processes and rule adjustments, the front-end form display still relies on static configuration and fixed logic, lacking the ability to dynamically adjust, making the form display unable to effectively respond to real-time changing business needs.
[0059] In order to solve the above problems, there is an urgent need for a solution that can dynamically adjust the form display. Therefore, the embodiment of the present invention aims to improve the flexibility and real-time performance of form management by introducing a dynamic rule engine and a state machine, so as to better adapt to changing business needs and ultimately improve the overall efficiency of the system and user experience.
[0060] Reference Figure 1 , shows a flowchart of the steps of a form display method provided in an embodiment of the present invention, which is applied to a server, the server and a terminal device, the terminal device provides a graphical user interface, the graphical user interface includes at least a form, and specifically may include the following steps:
[0061] Step 101, obtaining the state transition rule of the form; the state transition rule includes a transition condition and form transition logic, and the state transition rule is updated in real time based on the business rule flow corresponding to the form.
[0062] Reference Figure 2 , is a schematic diagram of an application environment provided by an embodiment of the present invention. The embodiment of the present invention can be applied to various information management systems involving forms. The figure may include a server 201 and a terminal device 202, wherein the terminal device 202 may be one, or usually multiple. Specifically, a form (form interface) is a graphical user interface (GUI) component for collecting, inputting and submitting data, and may include various form components, such as input boxes, radio buttons, check boxes, drop-down selection boxes, time selectors, buttons, etc. Of course, which form components are specifically involved depends on the UI framework used by the information management system. Users can input data through the form components of the form, and send the data to the server or other processing programs for further processing through buttons such as submit buttons.
[0063] In an embodiment of the present invention, the server may store state transition rules (dynamic rules / display rules) of the form, and the state transition rules involve content related to form display and conversion. Specifically, the state transition rules define the state of the form, the transition conditions between different states, the form conversion logic, etc.
[0064] The status refers to the stage that a form is in at a certain moment. For example, some of the statuses of a form are as follows: Initial status: the initial stage after the form is created and no content is filled in. Writing status: the stage where the user is filling in the form content. Waiting for review status: the stage where the form is completed and waiting for review by the reviewer. Review passed status: the stage where the form has passed the review and the content meets the requirements. Review rejected status: the form content does not meet the requirements and is rejected by the reviewer. Completed status: the stage where the form has gone through all processes and is finally completed.
[0065] A transition condition refers to a preset condition or preset event that triggers a state transition. These conditions or events can be based on one or more factors such as time, user operation, data validation results, etc. For example, some of the conditions are as follows: Time condition: If the form is not reviewed within 24 hours after submission, the form will automatically be converted to the 'pending' state. User operation: After the user clicks the 'Submit' button, the form's status changes from 'being written' to 'pending review'. Data validation result: After the form content passes all validation rules, the form's status changes from 'being written' to 'pending review'; otherwise, the form's status remains 'being written' and an error message is displayed. External event: After receiving a notification from a third-party system, the form status is updated according to the notification content.
[0066] Form conversion logic refers to a set of rules that determine the next operation or state transition based on the conversion conditions and the current form state of the form. For example, when a user interacts with a form, such as clicking the 'Submit' button, if the conversion conditions are met, the form state changes from the 'being written' state to the 'pending review' state according to the corresponding form conversion logic.
[0067] Step 102: In response to a user's form interaction operation on the form, determine a current form state of the form.
[0068] In an embodiment of the present invention, a form can be displayed in a graphical user interface of a terminal device, and the user can perform form interaction operations on the form as needed. For example, after the user completes input in a form-based input box, the user can click the 'Submit' button of the form to submit the data entered in the input box to the server or other processing program for further processing. At this time, the form will change from the 'writing' state to the 'pending review' state, that is, at this time, the current form state of the form is the 'pending review' state.
[0069] Step 103: when a target conversion condition in the conversion conditions is triggered, the form is converted according to the form conversion logic corresponding to the target conversion condition and the current form state to obtain a converted form.
[0070] In an embodiment of the present invention, after determining the current form state of the form, it can be determined whether the form meets the triggering conditions of the form's conversion conditions, for example, whether the form's state changes from the 'being written' state to the 'pending review' state, whether the data input and submitted based on the form has passed the verification, whether the data input and submitted based on the form has passed the verification within a preset time, etc. If it is determined that the form meets the target conversion conditions of the form's conversion conditions, the form can be further converted and adjusted based on the form conversion logic corresponding to the target conversion conditions and the current form state to obtain a converted form, so that the form complies with the current business rule process of the information management system.
[0071] Step 104: Send the conversion form to the terminal device so as to display the conversion form in the graphical user interface of the terminal device.
[0072] In an embodiment of the present invention, after the conversion form is obtained, the conversion form can be sent to a corresponding terminal device, and the terminal device can display the conversion form for the user in a graphical user interface, and the user can continue to perform input operations or end operations based on the conversion form.
[0073] In one embodiment of the present invention, the server may include a dynamic rule engine and a state machine. The dynamic rule engine displays the form according to the state transition rule defined by the state machine. The server can be used to run software such as the dynamic rule engine, the state machine management module, and the database management system to provide services for terminal devices. The terminal devices may include computers, tablet computers, smart phones, etc. The terminal devices may install browsers or specific client software through channels to communicate and exchange data with the server. The terminal devices dynamically generate and update forms based on the status and rule information transmitted by the server, provide user interaction functions, and transmit user data to the server or other applications in real time for processing.
[0074] Among them, the state machine is a model for managing object states and their transitions. For example, the state machine of the embodiment of the present invention defines the initial state of the form, various states, and state transition rules between states. The dynamic rule engine is a software component for defining, managing and adjusting rules. For example, the dynamic rule engine of the embodiment of the present invention can adjust and display the form accordingly according to the state transition rules defined by the state machine. The dynamic rule engine allows users to dynamically define and update the business rules of the system without modifying the code. The embodiment of the present invention implements real-time adjustment of form display based on the dynamic rule engine and the state machine, without the need to redeploy or modify the system code, thereby significantly reducing the system maintenance cost and improving the system response speed. In addition, the embodiment of the present invention combines the dynamic rule engine with the state machine to automatically process the form display logic, which can reduce manual intervention and improve the operational efficiency and accuracy of the form.
[0075] In an embodiment of the present invention, a server is applied, the server is connected to a terminal device, the terminal device provides a graphical user interface, the graphical user interface includes at least a form, and a state conversion rule of the form is obtained; the state conversion rule includes a conversion condition and a form conversion logic, and the state conversion rule is updated in real time based on the business rule process corresponding to the form; in response to the user's form interaction operation on the form, the current form state of the form is determined; when the target conversion condition in the conversion condition is triggered, the form is converted according to the form conversion logic corresponding to the target conversion condition and the current form state to obtain a conversion form; the conversion form is sent to the terminal device to display the conversion form in the graphical user interface of the terminal device. In an embodiment of the present invention, the form is converted according to the current form state of the form after the user performs the form interaction operation and the real-time form state conversion rule to obtain a conversion form and display it, so that the form can adapt to the ever-changing business needs, improve the management efficiency of the form, and improve the user's form usage experience.
[0076] In an embodiment of the present invention, the state transition rule may include the state of the form, and the form state includes at least the initial state of the form; in response to a form interaction operation of the user on the form, before determining the current form state of the form, the method may further include:
[0077] According to the initial state of the form in the state transition rule, generating a form according to the initial state;
[0078] The form is sent to the terminal device so as to be displayed in the graphical user interface of the terminal device.
[0079] The state transition rule may include the state of the form, and the state of the form at least includes the initial state of the form, wherein the initial state of the form refers to the initial stage when no content is filled in after the form is created.
[0080] In an embodiment of the present invention, when a user just logs into the information management system, the server can obtain the initial state of the form in the state transition rule, and after generating a form based on the initial state of the form, send it to the terminal device, so that the terminal device can display the form in the initial state. In some embodiments, the user may exit due to various reasons when the user is halfway through the form interaction operation. In this case, when the user logs into the information management system again, the embodiment of the present invention can obtain the user's historical form information. The historical form information may include the form previously operated by the user and the operation information on the form. Then, the form before exiting can be restored based on the operation information on the form. For example, after the user fills in some information through the input box of the form, the filled-in information can be displayed in the input box of the form again. In this way, the user can continue to input based on the information already filled in, which can improve the user's input efficiency and improve the user's experience.
[0081] In one embodiment of the present invention, before determining the current form state of the form in response to a form interaction operation of the user on the form, the method may further include:
[0082] Provide state machine management interface;
[0083] In response to a configuration operation of the form by a user through a state machine management interface, a state transition rule of the form is determined.
[0084] In an embodiment of the present invention, a state machine management interface can be provided for the user, based on which the user can define and configure the state of the form, configure state transition rules, modify existing state transition rules or add new state transition rules, etc.
[0085] For example, when the business process changes, users can add new states or modify the state transition rules of existing states in the state machine management interface. The system will apply the changed state transition rules in real time to ensure that the state of the form can flexibly adapt to new business needs. For example, when there is a need to simplify, reorganize, add new links or remove unnecessary steps in the process, the state transition rules can be modified according to business needs to modify, optimize or reconstruct the form review process to adapt to the latest business processes. For example, if a company expands in size and increases business trips, it needs to add a new set of business trip application form review processes. In this way, new state transition rules can be added through the state machine management interface. In this way, employees can fill out and submit electronic forms online, and the human resources department approvers will approve them online. After approval, attendance exceptions will be automatically processed and archived.
[0086] In an optional solution of the present invention, when the user configures the state transition rules of the form through the state machine management interface, the management requirements of the company or organization using the form can be obtained, such as the company's articles of association, etc. If it is detected that the state transition rules configured by the user do not comply with the company's articles of association, the user can be reminded that the state transition rules do not comply with the company's articles of association, and the state transition rules that do not comply with the requirements specifically configured by the user can also be displayed in the state machine management interface, so that the user can adjust the configuration of the state transition rules accordingly to improve the configuration efficiency of the state transition rules. For example, the company's articles of association stipulate that all approval processes must go through four stages of "submitting an application", "department approval", "financial approval" and "final approval", and the form state of the form corresponding to each stage cannot be reversed. If the user configures the state transition rules of the form through the state machine management interface and reverses the "department approval" and "financial approval", it is determined to be inconsistent with the company's articles of association, and the user will be reminded that the configuration of the state transition rules does not comply with the requirements and please reconfigure, thereby helping the user to quickly adjust the configuration content of the state transition rules and improve the configuration efficiency of the state transition rules.
[0087] In one embodiment of the present invention, in response to a user's form interaction operation on the form, after determining the current form state of the form, the method further includes:
[0088] Feedback prompt information is provided in the graphical user interface according to the form interaction operation of the user on the form.
[0089] In an embodiment of the present invention, in order to improve the operating efficiency of the user's form, corresponding feedback prompt information can be provided in the graphical user interface of the terminal device in real time according to the user's form interaction operation on the form. For example, when the user enters data in the form, it is necessary to verify the format, required items, length, etc., and the verification result is displayed immediately when the user completes the input or loses the focus. For example, in the "budget amount" field, after the user enters the amount, the system checks in real time whether it is a number and meets the specified budget range. If it does not meet the requirements, the feedback prompt information "The budget amount should be a number and not exceed XX million yuan" is displayed in the form, so that the user can adjust the input content based on the feedback prompt information, thereby improving the efficiency of data input through the form.
[0090] In an embodiment of the present invention, converting the form to obtain a converted form according to the form conversion logic corresponding to the target conversion condition and the current form state includes:
[0091] According to the form conversion logic corresponding to the target conversion condition and the current form state, the form components of the form are converted to obtain a conversion form. Wherein, converting the form components of the form to obtain a conversion form at least includes hiding or displaying a specified form component in the form.
[0092] For example, assuming that the target conversion condition is: the user fills in the leave application and clicks the "Submit" button, the current form status is: the leave application has been filled in, and the form conversion logic corresponding to the target conversion condition and the current form status is: display the leave application and hide the "Submit" button. After the user fills in the leave application "going out for a trip" through the form and clicks the "Submit" button, when the target conversion condition is triggered, the current form status of the form is converted from the state of the leave application to be filled in to the state of the leave application having been filled in. At this time, the corresponding form conversion logic can be determined according to the target conversion condition and the current form status: display the leave application field and hide the "Submit" button. Then the converted conversion form hides the "Submit" button in the form and displays the leave application "going out for a trip" filled in by the user.
[0093] The embodiment of the present invention aims to achieve real-time management of form display through a dynamic rule engine and a state machine, thereby improving the flexibility and responsiveness of the system. In order to enable those skilled in the art to better understand the embodiment of the present invention, a specific example is used below to illustrate. Figure 3 , is a schematic diagram of the overall architecture of a dynamic rule engine and a state machine provided in an embodiment of the present invention. The overall architecture is as follows Figure 1 As shown, it is mainly composed of a dynamic rule engine and a state machine. The dynamic rule engine is responsible for defining, managing and adjusting the form display rules. Among them, the state machine can include a state machine management module, a state and rule mapping module and a front-end form display module. Specifically:
[0094] State machine management module: The state machine management module is used to dynamically manage the state of the form and its transition. The specific implementation steps are as follows: (1) State definition and configuration: Users define state transition rules through the state machine management interface. The state transition rules can include the initial state of the form, various possible states, transition conditions between different states, and form transition logic, etc. The state machine management module manages the current form state of the form based on these definitions and adjusts the state transition rules according to changes in business processes. (2) State transition rules: The state transition rules define the transition conditions and form transition logic between different states. For example, when a form is converted from the "pending approval" state to the "approved" state, the system will automatically convert according to the defined rules, obtain the converted form and display it. (3) Dynamic adjustment: When the business process changes, users can add new state transition rules or modify existing state transition rules in the state machine management interface. The system will apply these changes in real time to ensure that the form state can flexibly adapt to new business needs.
[0095] Dynamic rule engine: (1) Rule definition and management: Users define form display rules (state transition rules) online, including form transition logic such as conditional judgment and display logic. The defined state transition rules will be stored in the database. State transition rules can be edited and updated in real time according to needs without recoding or deploying the system. (2) Rule update mechanism: When the state transition rules change, users can modify them through the configuration interface. The dynamic rule engine will process these changes in real time and adjust the relevant form display logic to achieve dynamic updates. For example, changes in state transition rules refer to situations where business rules or form display rules are modified or updated during the operation of the system. Taking the reimbursement approval process rules of a company as an example, in order to improve the efficiency of reimbursement approval and simplify small reimbursement applications, the company set a new rule through the dynamic rule engine: for reimbursement applications with an amount below 1,000 yuan, only the department manager needs to approve them, and they do not need to be submitted to the financial director. This rule adjustment can be completed through the management interface and applied to the reimbursement system immediately.
[0096] State and rule mapping module: responsible for combining the state machine with the state transition rules (dynamic rules) so that the form state and display can be synchronized in real time. The specific implementation steps are as follows: (1) State and rule mapping: This module ensures that the state in the state machine is consistent with the display rules under the state. Through the state and rule synchronization mechanism, when the state of the form changes, the system will automatically load the associated form display rules and adjust the form display according to the rules. (2) Configuration: Provide a centralized configuration interface, such as the state machine management interface, through which users can view and manage the mapping relationship between the current form state and the state transition rules to ensure the consistency and accuracy of the system configuration.
[0097] Front-end form display module: responsible for dynamically generating conversion forms based on the real-time updated status (i.e., current form status) and dynamic rules. The specific implementation steps are as follows: (1) Dynamic form generation: Based on the current form status and state transition rules obtained from the state machine management module and the dynamic rule engine, the front-end module generates and updates the form interface in real time. For example, based on the definition of the current form status and state transition rules, specific form components in the form are hidden or displayed. (2) User interaction: The data entered by the user in the form will be verified and processed based on the current form status and state transition rules. The front-end module responds to the user's form interaction operations on the form in real time, provides immediate feedback and prompts, and optimizes the user experience.
[0098] In summary, the embodiment of the present invention proposes a method combining a dynamic rule engine and a state machine to realize form display, which makes up for the lack of flexibility and automation in traditional systems in form management and display. 2. Dynamic rule generation and application: A mechanism for dynamic rule generation and application is designed to automatically adjust the display format of the form according to the current form status and dynamic rules to obtain a converted form, and can support complex business needs. 3. State machine-driven form management: State machine-based form state management and state transition are implemented to ensure that the display of the form at different stages meets expectations, and process related logic to improve the flexibility, response speed and user experience of the system.
[0099] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0100] Reference Figure 4 , shows a structural block diagram of a form display device provided in an embodiment of the present invention, which is applied to a server, the server and a terminal device, the terminal device includes a graphical user interface, the graphical user interface includes a form, and the device may specifically include the following modules:
[0101] The state transition rule acquisition module 401 is used to acquire the state transition rule of the form; the state transition rule includes a transition condition and form transition logic, and the state transition rule is updated in real time based on the business rule process corresponding to the form;
[0102] A current form state determination module 402, configured to determine the current form state of the form in response to a form interaction operation performed by a user on the form;
[0103] A conversion form generating module 403 is used to convert the form to obtain a conversion form according to the form conversion logic corresponding to the target conversion condition and the current form state when a target conversion condition in the conversion condition is triggered;
[0104] The conversion form display module 404 is used to send the conversion form to the terminal device so as to display the conversion form in the graphical user interface of the terminal device.
[0105] In an embodiment of the present invention, the state transition rule further includes the state of the form, and the form state includes at least the initial state of the form.
[0106] In one embodiment of the present invention, the device further comprises: an initial display module, configured to:
[0107] According to the initial state of the form in the state transition rule, generating a form according to the initial state;
[0108] The form is sent to the terminal device so as to be displayed in the graphical user interface of the terminal device.
[0109] In one embodiment of the present invention, the device further includes: a configuration module, configured to:
[0110] Provide state machine management interface;
[0111] In response to a configuration operation of the form by a user through a state machine management interface, a state transition rule of the form is determined.
[0112] In one embodiment of the present invention, the device further comprises: a feedback module, configured to:
[0113] Feedback prompt information is provided in the graphical user interface according to the form interaction operation of the user on the form.
[0114] In an embodiment of the present invention, the conversion condition is a preset condition or a preset event.
[0115] In one embodiment of the present invention, the conversion form generation module is specifically used to:
[0116] According to the form conversion logic corresponding to the target conversion condition and the current form state, the form components of the form are converted to obtain a converted form.
[0117] In one embodiment of the present invention, the conversion form generation module is specifically used to:
[0118] Hide or show the specified form component in the form.
[0119] In one embodiment of the present invention, the server includes a dynamic rule engine and a state machine, and the dynamic rule engine displays the form according to the state transition rule defined by the state machine.
[0120] In an embodiment of the present invention, a server is applied, the server is connected to a terminal device, the terminal device provides a graphical user interface, the graphical user interface includes at least a form, and a state conversion rule of the form is obtained; the state conversion rule includes a conversion condition and a form conversion logic, and the state conversion rule is updated in real time based on the business rule process corresponding to the form; in response to the user's form interaction operation on the form, the current form state of the form is determined; when the target conversion condition in the conversion condition is triggered, the form is converted according to the form conversion logic corresponding to the target conversion condition and the current form state to obtain a conversion form; the conversion form is sent to the terminal device to display the conversion form in the graphical user interface of the terminal device. In an embodiment of the present invention, the form is converted according to the current form state of the form after the user performs the form interaction operation and the real-time form state conversion rule to obtain a conversion form and display it, so that the form can adapt to the ever-changing business needs, improve the management efficiency of the form, and improve the user's form usage experience.
[0121] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0122] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned form display method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0123] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned form display method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0124] An embodiment of the present invention further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the various processes of the above-mentioned form display method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0125] Figure 5 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0126] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.
[0127] It should be understood that in the embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 510 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 501 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.
[0128] The electronic device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0129] The audio output unit 503 can convert the audio data received by the RF unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 can also provide audio output related to a specific function performed by the electronic device 500 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, etc.
[0130] The input unit 504 is used to receive audio or video signals. The input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 506. The image frame processed by the graphics processor 5041 can be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502. The microphone 5042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 501 in the case of a telephone call mode.
[0131] The electronic device 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and / or the backlight when the electronic device 500 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 505 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0132] The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0133] The user input unit 507 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 5071 or near the touch panel 5071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 5071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 510, receives the command sent by the processor 510 and executes it. In addition, the touch panel 5071 can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 5071, the user input unit 507 may also include other input devices 5072. Specifically, other input devices 5072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.
[0134] Furthermore, the touch panel 5071 may be overlaid on the display panel 5061. When the touch panel 5071 detects a touch operation on or near it, it transmits the information to the processor 510 to determine the type of the touch event. Then, the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Figure 5 In the figure, the touch panel 5071 and the display panel 5061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.
[0135] The interface unit 508 is an interface for connecting an external device to the electronic device 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 500 or may be used to transmit data between the electronic device 500 and an external device.
[0136] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 509 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0137] The processor 510 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 509 and calling data stored in the memory 509, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.
[0138] The electronic device 500 may also include a power supply 511 (such as a battery) for supplying power to each component. Preferably, the power supply 511 may be logically connected to the processor 510 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0139] In addition, the electronic device 500 includes some functional modules not shown, which will not be described in detail here.
[0140] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0142] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0143] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0144] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0145] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0146] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0147] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0148] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0149] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A form display method, characterized in that: Applied to a server, the server and a terminal device, the terminal device providing a graphical user interface, the graphical user interface at least including a form, the method comprising: Acquire the state transition rule of the form; the state transition rule includes a transition condition and form transition logic, and the state transition rule is updated in real time based on the business rule flow corresponding to the form; In response to a user's form interaction operation on the form, determining a current form state of the form; When a target conversion condition in the conversion condition is triggered, the form is converted according to the form conversion logic corresponding to the target conversion condition and the current form state to obtain a converted form; The conversion form is sent to the terminal device so as to display the conversion form in the graphical user interface of the terminal device.
2. The method according to claim 1, characterized in that The state transition rule also includes the state of the form, and the state of the form at least includes the initial state of the form.
3. The method according to claim 2, characterized in that In response to a form interaction operation of the user on the form, before determining a current form state of the form, the method further includes: According to the initial state of the form in the state transition rule, generating a form according to the initial state; The form is sent to the terminal device so as to be displayed in the graphical user interface of the terminal device.
4. The method according to claim 1, characterized in that: Before determining the current form state of the form in response to a form interaction operation of the user on the form, the method further includes: Provide state machine management interface; In response to a configuration operation of the form by a user through a state machine management interface, a state transition rule of the form is determined.
5. The method according to claim 1, characterized in that After determining the current form state of the form in response to the user's form interaction operation on the form, the method further includes: Feedback prompt information is provided in the graphical user interface according to the form interaction operation of the user on the form.
6. The method according to claim 1, characterized in that The conversion condition is a preset condition or a preset event.
7. The method according to claim 1, characterized in that Converting the form to obtain a converted form according to the form conversion logic corresponding to the target conversion condition and the current form state includes: According to the form conversion logic corresponding to the target conversion condition and the current form state, the form components of the form are converted to obtain a converted form.
8. The method according to claim 7, characterized in that Converting the form components of the form includes: Hide or show the specified form component in the form.
9. The method according to claim 7, characterized in that: The server includes a dynamic rule engine and a state machine, and the dynamic rule engine displays the form according to the state transition rule defined by the state machine.
10. A form display device, characterized in that: Applied to a server, the server and a terminal device, the terminal device includes a graphical user interface, the graphical user interface includes a form, and the device includes: A state conversion rule acquisition module is used to acquire the state conversion rule of the form; the state conversion rule includes a conversion condition and a form conversion logic, and the state conversion rule is updated in real time based on the business rule process corresponding to the form; A current form state determination module, used to determine the current form state of the form in response to a form interaction operation performed by a user on the form; A conversion form generating module, configured to convert the form to obtain a conversion form according to the form conversion logic corresponding to the target conversion condition and the current form state when a target conversion condition in the conversion condition is triggered; The conversion form display module is used to send the conversion form to the terminal device so as to display the conversion form in the graphical user interface of the terminal device.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 9 when executing the program stored in the memory.
12. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 9.