Form generation method, device, storage medium and electronic device

By integrating permission information into the table form source code, the method addresses slow access speeds and security risks in existing table form generation by enabling direct retrieval and asynchronous rendering, thereby improving performance and security.

CN111966352BActive Publication Date: 2025-07-15NEUSOFT CORP +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010773819.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-04
Publication Date
2025-07-15
Estimated Expiration
2040-08-04

AI Technical Summary

Technical Problem

The prior art shows that the access speed and security risks caused by permission control are significantly reduced during form generation, especially when large concurrent requests are performed.

Method used

By saving permission information in the form source code, a set of permission codes for the control is generated, and permission information is directly obtained from the source code according to the identity of the target object, the control is rendered asynchronously to generate a form with permission restriction.

Benefits of technology

Improves the speed of form generation access, reduces data interaction with background databases, reduces security risks, and improves rendering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111966352B_ABST
    Figure CN111966352B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a form generation method, apparatus, storage medium, and electronic device. The method includes: in response to a form generation instruction of a target object, obtaining target permission information of a control in a to-be-generated form corresponding to the target object from form source code; and generating a form with permission restrictions for the control according to the form source code and the target permission information. By adopting the above technical solution, a large amount of data interaction with a background database is not required when generating the form, so that the form generation access speed can be improved. Moreover, since the permission information can be obtained from the source code, the form can be generated at one time according to the form source code and the permission information, thereby further improving the form generation access speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a form generation method, apparatus, storage medium, and electronic device. Background Art

[0002] A form is a common user interface element that provides a simple and intuitive way for data input and output. With the development of artificial intelligence technologies and mobile information systems, forms can be used to complete functions such as data display and collection in many scenarios.

[0003] Generally, when defining a form, permission control can also be performed on it. For example, only approvers can fill in the approval opinion column, and confidential information is only displayed to relevant personnel, etc. In related technologies, in order to implement permission control for forms, a large amount of authorization data is generated, and such a method may cause a decrease in the form generation access speed in some scenarios. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a form generation method, apparatus, storage medium, and electronic device to solve the above-mentioned related technical problems.

[0005] To achieve the above purpose, according to the first aspect of the embodiments of the present disclosure, a form generation method is provided, including:

[0006] In response to a form generation instruction of a target object, obtain target permission information of a control in a to-be-generated form corresponding to the target object from form source code;

[0007] Generate a form with permission restrictions for the control according to the form source code and the target permission information.

[0008] Optionally, the permission information in the form source code is obtained by the following method:

[0009] Obtain permission configuration information of a control in a to-be-generated form for different objects;

[0010] For each control, encode all permission configuration information corresponding to the control to obtain a permission encoding set for each control;

[0011] Generate the permission information in matrix form according to the permission encoding sets corresponding to all the controls, and add the permission information to the form source code.

[0012] Optionally, the obtaining target permission information of a control in a to-be-generated form corresponding to the target object from the form source code includes:

[0013] For each of the said controls, determine the position of the set of permission codes corresponding to the control in the matrix-form permission information;

[0014] According to the position, obtain the target permission information corresponding to the target object from the set of permission codes corresponding to the control.

[0015] Optionally, the processing flow of the form includes multiple transfer objects. For each of the said controls, encoding all the permission configuration information corresponding to the control to obtain the set of permission codes for each control, including:

[0016] For each of the said controls, encoding all the permission configuration information corresponding to the control according to the order of each transfer object corresponding to the control in the processing flow to obtain the set of permission codes for each control;

[0017] The obtaining the target permission information corresponding to the target object from the set of permission codes corresponding to the control according to the position includes:

[0018] According to the position and the target order of the target object in the processing flow, obtain the target permission information corresponding to the target object from the set of permission codes corresponding to the control.

[0019] Optionally, the generating the form with permission restrictions for the control according to the form source code and the target permission information includes:

[0020] According to the form source code and the permission information of each control corresponding to the target object, asynchronously render each control to generate a form with permission restrictions for the control.

[0021] In a second aspect of the embodiments of the present disclosure, there is provided a form generation device, including:

[0022] A first obtaining module, configured to obtain, in response to a form generation instruction of a target object, the target permission information corresponding to the control in the form to be generated from the form source code;

[0023] A generating module, configured to generate a form with permission restrictions for the control according to the form source code and the target permission information.

[0024] Optionally, the device further includes:

[0025] A second obtaining module, configured to obtain the permission information in the form source code, and the second obtaining module includes:

[0026] A first obtaining sub-module, configured to obtain the permission configuration information of the control in the form to be generated for different objects;

[0027] An encoding sub-module, configured to encode all the permission configuration information corresponding to each of the controls to obtain a permission encoding set for each of the controls;

[0028] An execution sub-module, configured to generate the permission information in matrix form according to the permission encoding sets corresponding to all the controls, and add the permission information to the form source code.

[0029] Optionally, the first acquisition module includes:

[0030] A determination sub-module, configured to determine, for each of the controls, the position of the permission encoding set corresponding to the control in the permission information in matrix form;

[0031] A second acquisition sub-module, configured to acquire, according to the position, the target permission information corresponding to the target object from the permission encoding set corresponding to the control.

[0032] Optionally, the processing flow of the form includes multiple transfer objects, and the encoding sub-module includes:

[0033] An encoding sub-unit, configured to encode, for each of the controls, all the permission configuration information corresponding to the control according to the order of each transfer object corresponding to the control in the processing flow to obtain a permission encoding set for each of the controls;

[0034] The second acquisition sub-module includes:

[0035] An acquisition sub-unit, configured to acquire, according to the position and the target order of the target object in the processing flow, the target permission information corresponding to the target object from the permission encoding set corresponding to the control.

[0036] Optionally, the generation module includes:

[0037] A generation sub-module, configured to perform asynchronous rendering on each of the controls according to the form source code and the permission information of each control corresponding to the target object, and generate a form with permission restrictions for the controls.

[0038] In a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method according to any one of the first aspects are implemented.

[0039] In a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0040] A memory, on which a computer program is stored;

[0041] A processor for executing the computer program in the memory to implement the steps of the method according to any one of the above first aspects.

[0042] In the above technical solution, the form source code includes the permission information of the corresponding controls. In this way, when receiving a form generation instruction of a target object, the target permission information corresponding to the target object and related controls can be obtained from the form source code according to the identity of the target object. And, according to the form source code and the target permission information, a form with permission restrictions for the controls is generated. That is to say, by adopting the above technical solution, the form does not need to perform a large amount of data interaction with the background database during generation, so the generation access speed of the form can be improved. And, since the permission information can be obtained from the source code, the form can be generated at one time according to the form source code and the permission information, thereby further improving the generation access speed of the form.

[0043] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification, and are used to explain the present disclosure together with the following specific implementation manners, but do not constitute a limitation to the present disclosure. In the accompanying drawings:

[0045] Figure 1 is a flowchart of a form generation method shown in an exemplary embodiment of the present disclosure.

[0046] Figure 2 is a flowchart of generating permission information shown in an exemplary embodiment of the present disclosure.

[0047] Figure 3 is a schematic diagram of a form processing flow shown in an exemplary embodiment of the present disclosure.

[0048] Figure 4 is a block diagram of a form generation device shown in an exemplary embodiment of the present disclosure.

[0049] Figure 5 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] The following details the specific implementation manners of the present disclosure with reference to the accompanying drawings. It should be understood that the specific implementation manners described herein are only for explaining and understanding the present disclosure, and are not used to limit the present disclosure.

[0051] Before introducing the form generation method, apparatus, storage medium, and electronic device provided by the present disclosure, the application scenarios of the present disclosure will be introduced first. Each embodiment of the present disclosure can be applied to various form generation scenarios. Among them, as a common user interface element, a form can provide a simple and intuitive representation for data input and output.

[0052] In related scenarios, when generating a form, permission control can also be performed on the form. These permissions can include, for example, viewing permissions, editing permissions, printing permissions, and so on. In some embodiments, in order to perform permission control on the form, corresponding authorization data can be generated for the form. These data can be stored in a database. When a user accesses the form, the system can generate the form according to the form source code of the form. And, according to the user's identity ID and form information, the corresponding authorization data for the user can be found from the database. In this way, after obtaining the authorization data, the system can perform permission settings on each control in the form in sequence, and finally generate a form with permission restrictions for the controls.

[0053] The applicant has found that since the above technical solution generates a large amount of authorization data for the form during implementation, there are many background data interaction processes during form generation. In this way, when the server faces a large number of concurrent requests, the above technical solution may result in a low form access speed. And, since the above technical solution can include two steps of rendering the form and setting permissions when generating the form, in some implementation scenarios, invisible form controls may be displayed during front-end rendering and then hidden after permission setting, so there is a certain security risk.

[0054] For this reason, the present disclosure provides a form generation method. Referring to Figure 1 the flowchart of a form generation method shown, the method includes:

[0055] S11, in response to a form generation instruction of a target object, obtain target permission information corresponding to the target object for the controls in the form to be generated from the form source code;

[0056] S12, generate a form with permission restrictions for the controls according to the form source code and the target permission information.

[0057] Specifically, the method can be applied to terminal devices such as computers and tablet computers. In step S11, the target object can be a user, and the form generation instruction can be generated according to the operation of the user to view the form. In this way, the terminal can respond to the form generation instruction to obtain the target permission information. Of course, the target object can also be a device. Correspondingly, the terminal can also respond to the form generation instruction sent by the device to obtain the target permission information. The present disclosure does not limit this.

[0058] Regarding the target permission information, the permission information of each control in the form can be saved in the form source code. For example, for the permission information of a target control, in specific implementation, the permission information status options of the target control can be encoded, and the mapping relationship between the encoding and the corresponding permission can be set. In this way, when the terminal obtains the permission encoding of the target control from the form source code, it can determine the permission of the corresponding target control through the mapping relationship between the encoding and the corresponding permission.

[0059] Name Age ID Number Gender

[0060] Table 1

[0061] Taking Table 1 as an example for illustration, the permissions of a control can include viewing, modifying, and printing. Among them, each permission can include two results: allowed and prohibited. That is to say, each control can include 8 permission status combinations. In this way, in specific implementation, for each control, the 8 permission status combinations can be encoded, and the mapping relationship between the encoding and the corresponding permission status can be set. Exemplarily, the 8 permission status combinations can be encoded as A, B, C, D, E, F, G and stored in the form source code. Among them, encoding A can represent prohibited viewing, prohibited modification, and prohibited printing, and encoding B can represent prohibited viewing, prohibited modification, and allowed printing. Of course, the above encoding is only an example. In specific implementation, the encoding can also include identity identifiers set for different objects and / or controls, and the encoding can also be presented in digital form, for example. The present disclosure does not limit this.

[0062] In this way, after obtaining the target permission information, in step S12, a form with permission restrictions for the control can be generated according to the form source code and the target permission information.

[0063] Continuing with the above example, when it is determined from the form source code that the code corresponding to the target object for the target control "Name" is A, the permissions of the target object for the "Name" control can be determined based on the code A as prohibited from viewing, prohibited from modifying, and prohibited from printing. In this way, when generating a form based on the form source code and the target permission information, the "Name" control may not be displayed in the form.

[0064] Adopting the above technical solution, by storing the permission information of the corresponding control in the form source code, when a form generation instruction for a target object is received, the target permission information corresponding to the target object and related controls can be obtained from the form source code according to the identity of the target object. And, based on the form source code and the target permission information, a form with permission restrictions for the controls is generated. That is to say, adopting the above technical solution, the form does not need to perform a large amount of data interaction with the background database when being generated, so the generation access speed of the form can be improved. And, since the permission information can be obtained from the source code, the form can be generated at one time according to the form source code and the permission information, thereby further improving the generation access speed of the form.

[0065] In a possible implementation manner, referring to Figure 2 a flowchart of generating permission information as shown, the permission information in the form source code is obtained in the following way:

[0066] S21, obtain the permission configuration information of the controls in the form to be generated for different objects.

[0067]

[0068] Table 2

[0069] Among them, the permission configuration information of the controls for different objects can be set when the form is defined. Referring to Table 1, Table 2 is a schematic table of the permission configuration information of an object, which includes the permission configurations of Object 1 and Object 2 for the 4 controls shown in Table 1.

[0070] In this way, in step S22, for each of the controls, all the permission configuration information corresponding to the control can be encoded to obtain the permission code set of each of the controls.

[0071] It should be understood that the permission configuration of each control can include two states: allowed and prohibited. Therefore, in some embodiments, a one-bit binary number can be used to represent the permission configuration state of the control. Referring to Table 2, taking the control "Name" as an example, in specific implementation, the permission options view, modify, and print can be encoded using a three-bit binary number in sequence. For example, for a certain permission option, the allowed permission can be encoded as 1, and the prohibited permission can be encoded as 0. In this way, the "Name" control of Object 1 can be encoded as 111, and the "Name" control of Object 2 can be encoded as 011. Thus, the encodings of different objects for the control "Name" can form a permission encoding set corresponding to this control.

[0072] Of course, the above encoding method is still an example, and in specific implementation, other number systems can also be used to encode the permission configuration information. For example, two digits can be selected from octal numbers to represent the allowed or prohibited state of the permission item. Or, in some embodiments, after encoding the permission configuration information using a multi-bit binary number, the binary permission encoding can be converted into a decimal number for easy storage, and the present disclosure does not limit this.

[0073] In addition, in step S23, the permission information in matrix form can also be generated according to the permission encoding sets corresponding to all the controls, and the permission information can be added to the form source code.

[0074] Continuing with the above example, for the encoding set of the name control, it can include the encoding 111 of Object 1 and the encoding 011 of Object 2. In some embodiments, the encodings of Object 1 and 2 can be converted into decimal numbers and represented by a matrix. For example, the encoding of Object 1 converted into a decimal number can be 7, and the encoding of Object 2 converted into a decimal number can be 3. Therefore, the encoding set of the name control can be represented as the matrix [7, 3]. In addition, the matrix representation form of the encoding set of each control can be used as an element of another matrix, so as to obtain the permission information in matrix form.

[0075] In this way, by adding the permission information in matrix form to the form source code, when generating the form, the permission of the control under the corresponding object can be found through the permission matrix according to the position information of the control, thus avoiding generating a large amount of authorization data. And since the permission information is saved in the form source code, the data interaction with the background database can be reduced when generating the form, thereby improving the form generation speed.

[0076] Optionally, the obtaining the target permission information of the control corresponding to the target object in the form to be generated from the form source code includes:

[0077] For each of the said controls, determine the position of the set of permission codes corresponding to the control in the permission information in matrix form;

[0078] According to the position, obtain the target permission information corresponding to the target object from the set of permission codes corresponding to the control.

[0079] For example, in some embodiments, the rendering source code of each control may also store the position information of the control in the form. The position information may be represented, for example, by the row and column numbers of the control in the form. In this way, the matrix representation of the set of codes of the control can be used as an element of the permission matrix according to the position information of different controls, so as to obtain the permission information in matrix form. Continuing with the examples in Table 1 and Table 2, the position of the name control in Table 1 is the first row and the first column. Therefore, the matrix representation [7, 3] of its set of codes can be used as the element in the first row and the first column of the permission matrix. Thus, the permission matrix corresponding to Table 2 can be

[0080] In this way, when searching for the permission information of the corresponding control, the element with the corresponding row and column labels can be searched in the permission matrix according to the row and column labels of the control, so as to obtain the matrix representation of the set of codes of the control, and then the permission information of the control corresponding to the target object can be determined from the matrix representation of the set of codes of the control according to the information of the target object.

[0081] Refer to Figure 3 As shown in the schematic diagram of a form processing flow, in a possible implementation manner, the processing flow of the form includes multiple transfer objects. In this case, for each of the said controls, all the permission configuration information corresponding to the control is encoded to obtain the set of permission codes for each said control, including:

[0082] For each of the said controls, all the permission configuration information corresponding to the control is encoded according to the order of each transfer object corresponding to the control in the processing flow to obtain the set of permission codes for each said control.

[0083] Illustrated with reference to Table 2, the transfer object 1 shown may be object 1 in Table 2, and the transfer object 2 shown may be object 2 in Table 2. In this way, when encoding the permission configuration information corresponding to the control "age", the permission information of object 1 is encoded as 6, and the permission information of object 2 is encoded as 2. Refer to Figure 3It can be seen that Object 1 is in front of Object 2 in the processing flow of the form. Therefore, when encoding the permission configuration information corresponding to the control "Age", the permission information of Object 1 can be in front of the encoded permission information of Object 2, that is, the permission configuration information corresponding to the control "Age" can be encoded as [6, 2]. Similarly, the encoding of the form shown in Table 2 can be

[0084] In this way, obtaining the target permission information corresponding to the target object from the permission encoding set corresponding to the control according to the position includes:

[0085] Obtaining the target permission information corresponding to the target object from the permission encoding set corresponding to the control according to the position and the target order of the target object in the processing flow.

[0086] Taking the form generation of Object 2 as an example, in the form processing flow, the terminal can respond to the form generation instruction of Object 2 and obtain the permission information of each control through the source code of the form. When searching for the permission of the control "ID number" corresponding to Object 2, the position of the control "ID number" in the form is the first column of the second row. Therefore, it can be determined from the permission information in the matrix form in the form source code that the element in the first column of the second row is the permission encoding set corresponding to the control, that is, the permission encoding set [4, 5]. Further, the terminal can also obtain the identity information of the current object through the front-end page, so as to determine that the current object is Object 2. Refer to Figure 3 It can be seen that Object 2 is behind Object 1 in the processing flow. Therefore, the permission encoding of Object 2 can be determined as 5 through the permission encoding set [4, 5]. That is, the permission encoding of Object 2 is 101, and the corresponding permissions are allow display, prohibit editing, and allow printing.

[0087] Adopting the above technical solution, it is possible to obtain the permissions of the target control corresponding to the object through the position information of the space and the order of the object in the processing flow, improving the acquisition speed of permission data.

[0088] It should be noted that since the permission information of the control is saved in the form source code, the above permission acquisition process can be carried out synchronously. That is to say, when generating the form, each control in the form can synchronously obtain its own permission information.

[0089] In this way, since the control can synchronously obtain its own permission information, when rendering the form, each control can also be asynchronously rendered. In this case, generating a form with permission restrictions for the control according to the form source code and the target permission information includes:

[0090] According to the form source code and the permission information of each control corresponding to the target object, each control is asynchronously rendered to generate a form with permission restrictions for the control. For example, the permission control engine can read the relevant controls and call back the rendering method of the current control according to the permission encoding value of the corresponding control in the current link, so as to asynchronously render each control, and then generate a form with permission restrictions for the control, realizing the control of form permissions. By adopting such a rendering method, each control can be self-rendered asynchronously, thus improving the rendering speed of the form and the form generation speed.

[0091] The present disclosure also provides a form generation device. Referring to Figure 4 the block diagram of a form generation device shown, the form generation device 400 includes:

[0092] A first acquisition module 401, configured to, in response to a form generation instruction of a target object, acquire the target permission information of the control in the form to be generated corresponding to the target object from the form source code;

[0093] A generation module 402, configured to generate a form with permission restrictions for the control according to the form source code and the target permission information.

[0094] By adopting the above technical solution, by storing the permission information of the corresponding control in the form source code, in this way, when receiving a form generation instruction of a target object, the target permission information corresponding to the target object and the relevant control can be acquired from the form source code according to the identity of the target object. And, according to the form source code and the target permission information, a form with permission restrictions for the control is generated. That is to say, by adopting the above technical solution, the form does not need to perform a large amount of data interaction with the background database during generation, thus improving the generation access speed of the form. And, since the permission information can be obtained from the source code, the form can be generated at one time according to the form source code and the permission information, thereby further improving the generation access speed of the form.

[0095] Optionally, the device 400 further includes:

[0096] A second acquisition module, configured to acquire the permission information in the form source code. The second acquisition module includes:

[0097] A first acquisition sub-module, configured to acquire the permission configuration information of the control in the form to be generated for different objects;

[0098] An encoding sub-module, configured to encode all the permission configuration information corresponding to each control to obtain a permission encoding set for each control;

[0099] An execution sub-module, configured to generate the permission information in matrix form according to the set of permission codes corresponding to all the controls, and add the permission information to the form source code.

[0100] In this way, by adding the permission information in matrix form to the form source code, when generating the form, the permissions of the controls under the corresponding object can be found through the permission matrix according to the position information of the controls, thus avoiding the generation of a large amount of authorization data. And since the permission information is saved in the form source code, the data interaction with the background database can be reduced when generating the form, thereby improving the form generation speed.

[0101] Optionally, the first acquisition module 401 includes:

[0102] A determination sub-module, configured to determine, for each of the controls, the position of the set of permission codes corresponding to the control in the permission information in matrix form;

[0103] A second acquisition sub-module, configured to acquire, according to the position, the target permission information corresponding to the target object from the set of permission codes corresponding to the control.

[0104] In this way, when looking up the permission information of the corresponding control, the element with the corresponding row and column labels can be found in the permission matrix according to the row and column labels of the control, so as to obtain the matrix representation form of the set of codes of the control, and then determine the permission information of the control corresponding to the target object from the matrix representation form of the set of codes of the control according to the information of the target object.

[0105] Optionally, the processing flow of the form includes multiple transfer objects, and the encoding sub-module includes:

[0106] An encoding sub-unit, configured to encode, for each of the controls, all the permission configuration information corresponding to the control according to the order of each transfer object corresponding to the control in the processing flow, to obtain the set of permission codes of each control;

[0107] The second acquisition sub-module includes:

[0108] An acquisition sub-unit, configured to acquire, according to the position and the target order of the target object in the processing flow, the target permission information corresponding to the target object from the set of permission codes corresponding to the control.

[0109] Adopting the above technical solution, the permissions of the target control corresponding to the object can be acquired through the position information in space and the order of the object in the processing flow, improving the acquisition speed of the permission data.

[0110] Optionally, the generating module 402 includes:

[0111] A generating sub-module, configured to asynchronously render each of the controls according to the form source code and the permission information of each control corresponding to the target object, so as to generate a form with permission restrictions for the controls.

[0112] With such a rendering method, each control can perform self-rendering asynchronously, so that the rendering speed of the form can be improved, and the form generation speed can be improved.

[0113] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the above embodiments are implemented.

[0114] The present disclosure also provides an electronic device, including:

[0115] A memory, on which a computer program is stored;

[0116] A processor, configured to execute the computer program in the memory to implement the steps of the method described in the above embodiments.

[0117] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0118] In addition, it should be noted that for the convenience and conciseness of description, the embodiments described in the specification are all preferred embodiments, and the parts involved therein are not necessarily essential to the present invention. For example, the first acquisition module 401 and the second acquisition module may be independent devices or the same device in specific implementations, and the present disclosure does not make any limitations thereto.

[0119] Figure 5 It is a block diagram of an electronic device 500 shown according to an exemplary embodiment. As Figure 5 shown, the electronic device 500 may include: a processor 501, a memory 502. The electronic device 500 may further include one or more of a multimedia component 503, an input / output (I / O) interface 504, and a communication component 505.

[0120] Among them, the processor 501 is used to control the overall operation of the electronic device 500 to complete all or part of the steps in the above form generation method. The memory 502 is used to store various types of data to support the operation of the electronic device 500. These data may include, for example, instructions for any application or method operating on the electronic device 500, as well as application-related data, such as object data, form data, pictures, audio, video, and so on. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The multimedia component 503 may include a screen and an audio component. The screen may be a touch screen, for example, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 502 or sent through the communication component 505. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 504 provides an interface between the processor 501 and other interface modules, and the above other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Accordingly, the communication component 505 may include: a Wi-Fi module, a Bluetooth module, an NFC module, and so on.

[0121] In an exemplary embodiment, the electronic device 500 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above-mentioned form generation method.

[0122] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above-mentioned form generation method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 502 including program instructions, and the above-mentioned program instructions can be executed by the processor 501 of the electronic device 500 to complete the above-mentioned form generation method.

[0123] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code part for executing the above-mentioned form generation method when executed by the programmable device.

[0124] The preferred embodiments of the present disclosure have been described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0125] In addition, it should be noted that, in the above specific embodiments, the various specific technical features described can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the present disclosure will not separately describe various possible combination methods.

[0126] Furthermore, any combination can be made between various different embodiments of the present disclosure as long as it does not violate the idea of the present disclosure, and it should also be regarded as the content disclosed by the present disclosure.

Claims

1. A form generation method, characterized in that, Including: In response to a form generation instruction of a target object, obtaining target permission information of a control in a form to be generated corresponding to the target object from form source code; Generating a form with permission restrictions for the control according to the form source code and the target permission information; The permission information in the form source code is obtained through the following method: Obtaining permission configuration information of a control in a form to be generated for different objects; For each control, encoding all the permission configuration information corresponding to the control to obtain a permission encoding set for each control; Generating the permission information in matrix form according to the permission encoding sets corresponding to all the controls, and adding the permission information to the form source code.

2. The method according to claim 1, characterized in that, The obtaining target permission information of a control in a form to be generated corresponding to the target object from form source code includes: For each control, determining the position of the permission encoding set corresponding to the control in the permission information in matrix form; According to the position, obtaining the target permission information corresponding to the target object from the permission encoding set corresponding to the control.

3. The method according to claim 2, characterized in that, The processing flow of the form includes multiple transfer objects. For each control, encoding all the permission configuration information corresponding to the control to obtain a permission encoding set for each control, including: For each control, encoding all the permission configuration information corresponding to the control according to the order of each transfer object corresponding to the control in the processing flow to obtain a permission encoding set for each control; The obtaining the target permission information corresponding to the target object from the permission encoding set corresponding to the control according to the position includes: According to the position and the target order of the target object in the processing flow, obtaining the target permission information corresponding to the target object from the permission encoding set corresponding to the control.

4. The method according to any one of claims 1 to 3, characterized in that, The generating a form with permission restrictions for the control according to the form source code and the target permission information includes: Asynchronously rendering each control according to the form source code and the permission information of each control corresponding to the target object to generate a form with permission restrictions for the control.

5. A form generation device, characterized in that, Including: A first obtaining module, configured to obtain target permission information of a control in a form to be generated corresponding to the target object from form source code in response to a form generation instruction of the target object; A generating module, configured to generate a form with permission restrictions for the control according to the form source code and the target permission information; A second obtaining module, configured to obtain the permission information in the form source code. The second obtaining module includes: A first obtaining sub-module, configured to obtain permission configuration information of a control in a form to be generated for different objects; An encoding sub-module, configured to encode all the permission configuration information corresponding to each control to obtain a permission encoding set for each control; An execution sub-module, configured to generate the permission information in matrix form according to the permission encoding sets corresponding to all the controls, and add the permission information to the form source code.

6. The device according to claim 5, characterized in that The generating module includes: A generation sub-module, configured to perform asynchronous rendering on each of the controls according to the form source code and the permission information of each control corresponding to the target object, so as to generate a form with permission restrictions for the controls.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method according to any one of claims 1-4.

8. An electronic device, characterized in that, Comprising: A memory, on which a computer program is stored; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Device and method for fast developing and testing

    CN103309806A

  • Form permission setting and form generating methods and devices, medium and electronic device

    CN107895112A

  • Form display method and device, storage medium and electronic equipment

    CN110362672A