A method, apparatus, medium, and electronic device for constructing a page of an event
Through the use of event control information tables, decoupling of page display and interactive operations, the poor flexibility caused by hard coding is solved, and a more flexible and efficient page interaction logic implementation is achieved.
Patent Information
- Application Number
- CN202110341497.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-03-30
AI Technical Summary
When dealing with the interaction needs of front-end pages of different provident fund management centers, the existing technology mainly relies on hard coding, resulting in poor flexibility, scattered parameter maintenance, and many code branches are not conducive to later understanding and maintenance.
By setting up an event control information table, sorting out and integrating the page interaction logic needs of the Provident Fund Center, and selecting the corresponding event control information table based on the target page construction instructions, adding the target page control function to the to-mount control, and building a page for the Provident Fund Center to process the transaction.
It realizes the interaction operation and decoupling of page display elements from page, simplifies the implementation process of page interaction logic, improves the flexibility of page interaction logic implementation, and supports interactive logic reuse.
Smart Images

Figure CN112925602B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of automatic programming, and in particular, to a method, device, medium, and electronic device for constructing a page of an event. Background Art
[0002] The provident fund management center is an institution for the management and operation of provident funds. The front-end page interaction requirements of different provident fund management centers may vary in terms of effective time, implementation effects, etc. Specifically, there are those triggered by changes in field values and those triggered during interface initialization, and there are mandatory input controls and hidden controls. Exemplarily, for the same input field on the same interface, some interactions are not required by every provident fund management center. For example, when making deposits in different places, some provident fund management centers require the personal account number to be a mandatory item, while some provident fund management centers require the personal account number to be a non-mandatory item. There may be conflicts between the front-end page setting requirements of different provident fund management centers, which increases the difficulty of handling the front-end page setting requirements of different provident fund management centers.
[0003] Generally, when dealing with the front-end page interaction requirements of different provident fund management centers, developers directly provide corresponding interaction logics for the provident fund management centers in the code in a hard-coded manner according to different user identifiers. However, when using the hard-coded method, when a user wants to change and select other existing interaction logics, developers need to modify the code and republish the version, resulting in poor flexibility. In addition, in the hard-coded method, parameters are applied separately by each module, and numerous parameters are introduced, making maintenance very scattered. Both hard coding and parameter maintenance result in many code branches, which is not conducive to later understanding and maintenance. Summary of the Invention
[0004] Embodiments of the present application provide a method, device, medium, and electronic device for constructing a page of an event, which can decouple page display elements from page interaction operations, simplify the implementation process of page interaction logic, and achieve the purpose of improving the flexibility of page interaction logic implementation.
[0005] In a first aspect, embodiments of the present application provide a method for constructing a page of an event, the method including:
[0006] Obtain a construction instruction for a target page; wherein, the target page is a page for a target provident fund center to process a target transaction;
[0007] According to the identifiers of the target provident fund center and the target transaction, select a target event control information table from a candidate event control information table; wherein, the candidate event control information table is used to construct a page for a candidate provident fund center to process a candidate transaction;
[0008] Determine a target page control function in the target page control file according to the target page control file address in the target event control information table;
[0009] Add the target page control function to the control to be mounted on the target page according to the identification information of the control to be mounted in the target event control information table and the page control information of the control to be mounted;
[0010] In a second aspect, an embodiment of the present application provides a page construction device for an event, the device includes:
[0011] A construction instruction acquisition module, configured to acquire a construction instruction for a target page; wherein, the target page is a page for a target provident fund center to process a target transaction;
[0012] A target event control information table determination module, configured to select a target event control information table from a candidate event control information table according to the identifications of the target provident fund center and the target transaction; wherein, the candidate event control information table is used to construct a page for a candidate provident fund center to process a candidate transaction;
[0013] A target page control function determination module, configured to determine a target page control function in the target page control file according to the target page control file address in the target event control information table;
[0014] A target page control function addition module, configured to add the target page control function to the control to be mounted on the target page according to the identification information of the control to be mounted in the target event control information table and the page control information of the control to be mounted;
[0015] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements an event page construction method as described in the embodiment of the present application.
[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements an event page construction method as described in the embodiment of the present application.
[0017] In the embodiment of the present application, by setting event control information, the page interaction logic requirements of the provident fund center are sorted out and integrated. Then, according to the construction instructions of the target page, the corresponding event control information table is selected, and according to the information in the target event control information table, the target page control function is added to the control to be mounted, and the page for the provident fund center to process transactions is constructed, thereby realizing the interaction logic required by the provident fund center. In the embodiment of the present application, the page interaction logic required by the provident fund center is included in the event control information table, which supports the reuse of interaction logic, realizes the decoupling of page display elements and page interaction operations, simplifies the implementation process of page interaction logic, and improves the flexibility of page interaction logic implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 FIG. is a flowchart of a method for constructing a page of an event provided in Embodiment 1 of the present application;
[0019] Figure 2 FIG. is a flowchart of another method for constructing a page of an event provided in Embodiment 2 of the present application;
[0020] Figure 3 FIG. is a flowchart of yet another method for constructing a page of an event provided in Embodiment 3 of the present application;
[0021] Figure 4 FIG. is a flowchart of yet another method for constructing a page of an event provided in Embodiment 4 of the present application;
[0022] Figure 5 FIG. is a schematic structural diagram of a device for constructing a page of an event provided in Embodiment 5 of the present application;
[0023] Figure 6 FIG. is a schematic structural diagram of an electronic device provided in Embodiment 7 of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] The present application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only for explaining the present application, rather than limiting the present application. Additionally, it should be noted that for the sake of description, only parts related to the present application rather than all structures are shown in the drawings.
[0025] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts depict the steps as sequential processes, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0026] Example 1
[0027] Figure 1 The figure is a flowchart of a method for constructing a page of an event provided in Example 1 of this application. This example is applicable to the situation of constructing a page according to the front-end page interaction requirements of different housing provident fund management centers and providing corresponding interaction logics for different housing provident fund management centers. This method can be executed by a page construction device for an event provided in the embodiments of this application. This device can be implemented in a software and / or hardware manner and can be integrated into an electronic device running this system.
[0028] As Figure 1 shown, the method for constructing a page of an event includes:
[0029] S110. Obtain a construction instruction for a target page; wherein, the target page is a page for a target housing provident fund center to process a target transaction.
[0030] Among them, the construction instruction for the target page refers to an instruction for indicating the construction of the target page. The construction instruction for the target page includes identification information of the target housing provident fund center and the target transaction. Optionally, the construction instruction for the target page is generated before the user enters the transaction page after selecting the target housing provident fund center and the target transaction. The target page is a page for a target housing provident fund center to process a target transaction. Among them, the housing provident fund center refers to a housing provident fund management and operation institution established in municipalities directly under the central government, cities where the provincial and autonomous region people's governments are located, and other cities (prefectures, leagues). The target transaction can be services that the housing provident fund center can provide to customers, such as housing provident fund deposit and loan.
[0031] S120. Select a target event control information table from the candidate event control information tables according to the identifications of the target housing provident fund center and the target transaction; wherein, the candidate event control information tables are used to construct pages for candidate housing provident fund centers to process candidate transactions.
[0032] Among them, the candidate housing provident fund center can be any housing provident fund center, and the target housing provident fund center is generated from the candidate housing provident fund centers. Specifically, the target housing provident fund center refers to the housing provident fund center that processes the target transaction initiated by the target customer. Among them, the housing provident fund center identification refers to information for distinguishing different housing provident fund centers, and the target housing provident fund center identification can uniquely represent the target housing provident fund center. The transaction identification refers to information for distinguishing different transactions in the same housing provident fund center. The transaction identifications of different housing provident fund centers may be the same, and the transaction identification can also uniquely represent the target transaction after the target housing provident fund center is selected.
[0033] Among them, the candidate event control information table is used to construct a page for a candidate provident fund center to process a candidate transaction. The candidate event control information table is generated according to the page interaction requirements provided by the candidate provident fund center according to preset rules.
[0034] In an optional embodiment, the candidate event control information table includes the identification information of the controls to be mounted on the page and the page control information of the controls to be mounted; the page control information includes at least one of the following: trigger mode, identification of the event to be mounted, and page control file address.
[0035] When a customer conducts a transaction at a provident fund center, in fact, the customer accesses the page for the provident fund center to process the corresponding transaction and completes the business handling by operating the controls on the page. Exemplarily, when a customer conducts a loan transaction, the customer needs to input corresponding personal information and housing information in a text box, and after clicking a button to confirm that the information input is completed, the loan amount calculation logic is triggered. Therefore, as an indispensable element on the page, constructing a page according to the page interaction requirements is actually to add events to the controls to implement the page interaction logic required by the provident fund center. The candidate event control information table serves as the basis for constructing a page for a candidate provident fund center to process a candidate transaction. The candidate event control information table includes the identification information of the controls to be mounted on the page and the page control information of the controls to be mounted. Among them, the identification information of the controls to be mounted refers to the information used to distinguish different controls on the candidate page. Among them, the page control information of the controls to be mounted includes the information used to configure the attributes of the controls to be mounted. Among them, the attributes of the controls to be mounted include the trigger mode, hidden implementation, and whether it is required, etc.
[0036] The page control information includes at least one of the following: trigger mode, identification of the event to be mounted, and page control file address. The trigger mode is used to indicate by what means the event added to the control to be mounted is triggered. Optionally, the trigger modes include: triggered by a numerical change, triggered by losing focus, triggered by gaining focus, and triggered at page initialization. The identification of the event to be mounted is the information used to distinguish different events to be mounted. The event to be mounted is the event that needs to be added to the control. The specific mounted event is a page control function. Optionally, the identification of the event to be mounted is the name of the page control function. Adding the page control function to the control can complete the configuration of the control attributes by executing the function, and thus implement the page interaction logic required by the provident fund center. The page control file address refers to the address where the page control file is stored. Among them, the event control file refers to the file used to implement the page interaction logic required by the candidate provident fund center. The event control file includes page control functions.
[0037] There is a corresponding relationship between the candidate event control information table and the candidate provident fund center. Specifically, there may be multiple candidate event control information tables corresponding to one candidate provident fund center, and one candidate event control information table uniquely corresponds to one candidate provident fund center. The candidate information table includes the candidate provident fund center identifier. Specifically, the number of candidate event control information tables corresponding to a candidate provident fund center is determined by the number of candidate transactions in the candidate provident fund center, and one candidate information table corresponds to one candidate transaction of the candidate provident fund center.
[0038] The candidate event control table includes the candidate provident fund center identifier and the candidate transaction identifier. According to the target provident fund center identifier and the target transaction identifier in the construction instruction of the target page, select the target event control information table in the candidate event control information table. Then, according to the candidate event control information table, a page that meets the page interaction requirements of the candidate provident fund center can be constructed for the target transaction.
[0039] S130. Determine the target page control function in the target page control file according to the target page control file address in the target event control information table.
[0040] Among them, the target page control file address refers to the address where the target page control file is stored. Among them, the target event control file is a file used to implement the page interaction logic required by the candidate provident fund center. Optionally, the target page control file is a js file. The target event control file includes the target page control function, and the page interaction logic required by the candidate provident fund center can be implemented by executing the target page control function.
[0041] S140. Add the target page control function to the control to be mounted on the target page according to the identification information of the control to be mounted and the page control information of the control to be mounted in the target event control information table.
[0042] Among them, the control to be mounted refers to the control on the target page that needs to mount an event, such as a text box, a button, and a drop-down box. The identification information of the control to be mounted refers to the information used to distinguish different controls on the target page. Among them, the page control information of the control to be mounted refers to the information used to configure the attributes of the control to be mounted. The attributes of the control to be mounted include the triggering method, the hiding implementation, and whether it is required, etc. The interaction requirements of the target provident fund center include the page interaction logic required by the target provident fund center, and the page interaction logic is implemented by configuring the control attributes. Specifically, add the target page control function to the control to be mounted on the target page.
[0043] In the embodiment of the present application, by setting event control information, the page interaction logic requirements of the provident fund center are sorted out and integrated. Then, according to the construction instructions of the target page, the corresponding event control information table is selected, and according to the information in the target event control information table, the target page control function is added to the control to be mounted, and the page for the provident fund center to process transactions is constructed, so as to implement the interaction logic required by the provident fund center. In the embodiment of the present application, the page interaction logic required by the provident fund center is included in the event control information table, which supports the reuse of interaction logic, realizes the decoupling of page display elements and page interaction operations, simplifies the implementation process of page interaction logic, and improves the flexibility of page interaction logic implementation.
[0044] Embodiment 2
[0045] Figure 2 It is a flowchart of another page construction method for an event provided by Embodiment 2 of the present application. This embodiment is further optimized on the basis of the above embodiment. Specifically, the optimization is that before selecting the target event control information table from the candidate event control information tables according to the identifiers of the target provident fund center and the target transaction, the method further includes: in response to a request for adding a candidate event control information table, obtaining the page interaction requirements of the candidate provident fund center; judging whether the candidate provident fund center identifier, the candidate transaction identifier, and the identifier of the control to be mounted in the page interaction requirements already exist; if not, verifying the page interaction requirements according to the preset verification rules; if the verification passes, generating an event control information table according to the page interaction requirements as the candidate event control information table.
[0046] As Figure 2 shown, the page construction method for an event includes:
[0047] S210. In response to a request for adding a candidate event control information table, obtain the page interaction requirements of the candidate provident fund center.
[0048] In response to a request for adding a candidate event control information table, complete the operation of adding a candidate event control information table. Among them, the request for adding a candidate event control information table refers to the information used to indicate the addition of a candidate event control information table. Optionally, the request for adding a candidate event control information table is generated when the add button on the event control information table management page is clicked. Among them, the page interaction requirements include the page interaction logic required by the candidate provident fund center. Exemplarily, the page interaction requirements may involve multiple aspects such as mandatory field control, field visibility control, field default value control, label display control, certain verification rule control, verification rule control, drop-down selection control, calculated value control, or call to background service control.
[0049] In an optional embodiment, the page interaction requirements include at least one of the following: provident fund center identifier, transaction identifier, identifier information of the control to be mounted, and page control information of the control to be mounted; the page control information includes at least one of the following: trigger mode, identifier of the event to be mounted, and page control file address. The event control information table is generated according to the page interaction requirements. According to the above content in the page interaction requirements, the event control information table can be generated, and the event control information table corresponds to the page interaction requirements.
[0050] S220. Determine whether the candidate provident fund center identifier, the candidate transaction identifier, and the identifier of the event to be mounted in the page interaction requirements already exist.
[0051] To save computing resources and ensure that there is no redundancy in the candidate event control information table, a candidate event control information table is generated for the event to be mounted in the candidate transaction of the candidate provident fund center only when the event to be mounted does not exist in the candidate transaction of the candidate provident fund center. Specifically, by determining whether the candidate provident fund center identifier, the candidate transaction identifier, and the identifier of the event to be mounted in the page interaction requirements already exist, it is determined whether there is already a corresponding candidate event control information table for this page interaction requirement. If it exists, an error is reported.
[0052] S230. If not, verify the page interaction requirements according to the preset verification rules; if the verification passes, generate an event control information table according to the page interaction requirements as the candidate event control information table.
[0053] To achieve the reuse of page interaction logic, that is, to achieve the reuse of the event control information table, it is necessary to generate the event control information table according to a same standard, that is, the event control information table should include the same required data items, and the data formats accepted by the data items need to be uniformly specified. Table 1 is an example of the event control information table.
[0054] Table 1
[0055]
[0056] Among them, the positions marked with the letter Y indicate that the key attribute of this item is a required item. Both the primary key and the non-null corresponding columns are marked with Y, indicating the uniqueness of this item, that is, both the event control information table identifier and the provident fund center identifier are unique. The field names in Table 1 correspond to the requirement items of the page interaction requirements. Among them, the customization identifier is used as a custom condition to query which page control functions need to be mounted on the current page.
[0057] Therefore, it is necessary to verify the page interaction requirements provided by different candidate provident fund centers so that the page interaction requirements meet the generation requirements of the event control information table. Specifically, the page interaction requirements are verified according to the preset verification rules. Among them, the preset verification rules are pre-configured by relevant technical personnel according to the generation standards of the event control information table. In an optional embodiment, the preset verification rules include a preset key attribute verification rule and a preset content verification rule.
[0058] Verifying the page interaction requirements according to the preset verification rules includes: according to the preset key attribute rule, determining whether there is corresponding data for the requirement items whose attributes in the page interaction requirements are key attributes; according to the preset content check rule, determining whether the corresponding data of the requirement items in the page interaction requirements is a preset field.
[0059] Among them, the preset key attribute rule stipulates the requirement items that must be included in the page interaction requirements, that is, the required data items corresponding to the candidate event control information table. Exemplarily, the requirement items whose attributes in the page interaction requirements are key attributes include: transaction identifier, page control file address, event identifier to be mounted, whether to enable, trigger type, and control identifier to be mounted.
[0060] Among them, the preset content check rule stipulates whether the corresponding data of the requirement items in the page interaction requirements is a preset field. Exemplarily, the trigger method in the page interaction requirements provided by the candidate provident fund center must be any one of value change, focus loss trigger, or focus gain trigger, otherwise an error is reported. The corresponding data of the requirement items cannot be the custom content of the candidate provident fund center.
[0061] For the page interaction requirements that meet the generation requirements of the event control information table, the candidate page control information table is reserved according to the page interaction requirements.
[0062] S240. Obtain the construction instruction of the target page; wherein, the target page is a page for the target provident fund center to process the target transaction.
[0063] S250. Select the target event control information table from the candidate event control information tables according to the identifiers of the target provident fund center and the target transaction; wherein, the candidate event control information tables are used to construct the pages for the candidate provident fund centers to process the candidate transactions.
[0064] S260. Determine the target page control function in the target page control file according to the target page control file address in the target event control information table.
[0065] S270. Add the target page control function to the control to be mounted on the target page according to the identification information of the control to be mounted in the target event control information table and the page control information of the control to be mounted.
[0066] To improve the generation efficiency of the candidate event control information table, the embodiments of the present application also support batch import of the candidate event control information table.
[0067] In an optional embodiment, before selecting the target event control information table from the candidate event control information table according to the target provident fund center and the identification of the target transaction, the method further includes: in response to a batch import request for the candidate event control information table, obtain a list of page interaction requirements; traverse the list of page interaction requirements, and respectively determine whether the provident fund center identification, the transaction identification, and the identification of the event to be mounted in each page interaction requirement in the list of page interaction requirements already exist; if not, respectively verify each page interaction requirement in the list of page interaction requirements; if the verification passes, generate an event control information table in batches according to the page interaction requirements as the candidate event control information table.
[0068] Similar to the operation of adding a new candidate event control information table, the operation of batch importing the candidate event control information table is to summarize the page interaction requirements of each candidate provident fund center in the list of page interaction requirements, and then traverse the list of page interaction requirements to perform the operation of adding a new candidate event control information table for each page interaction requirement in the list of page interaction requirements one by one. This will not be elaborated here, and for details, please refer to steps S220 and S230 in the embodiments of the present application.
[0069] The embodiments of the present application obtain the page interaction requirements of the candidate provident fund center, and determine whether the candidate provident fund center identification, the candidate transaction identification, and the identification of the event to be mounted in the page interaction requirements already exist. If not, verify the page interaction requirements according to the preset verification rules; if the verification passes, generate an event control information table according to the page interaction requirements as the candidate event control information table. A method for adding a new candidate event control information table is provided. By adding a new candidate event control information table to summarize the page interaction requirements of the candidate provident fund center as an alternative, when the provident fund center needs to implement the page interaction requirements, the corresponding event control information table can be selected. This improves the efficiency of implementing the page interaction logic.
[0070] Embodiment III
[0071] Figure 3It is a flowchart of another method for constructing a page of an event provided in Embodiment 3 of the present application. This embodiment is further optimized on the basis of the above embodiment. Specifically, the optimization is that before selecting the target event control information table in the candidate event control information table according to the target provident fund center and the identifier of the target transaction, the method further includes: in response to a candidate event control information table update request, obtaining page interaction requirement change information; determining whether the provident fund center identifier, transaction identifier, and event identifier to be mounted already exist in the page interaction requirement change information; if they exist, determining the event control information table to be updated in the candidate event control information table according to the provident fund center identifier and the transaction identifier; updating the event control information table to be updated with the page interaction requirement change information, and using the obtained latest event control information table as the candidate event control information table.
[0072] As Figure 3 shown, the method for constructing a page of an event includes:
[0073] S310. In response to a candidate event control information table update request, obtain page interaction requirement change information.
[0074] In response to a candidate event control information table update request, complete the candidate event control information table update operation. Among them, the candidate event control information table update request refers to information used to indicate an update request for the candidate event control information table when the interaction logic of a certain transaction of the candidate provident fund center changes. Optionally, the candidate event control information table addition request is generated by clicking the update button on the event control information table management page. Among them, the page interaction requirement change information includes: provident fund center identifier, transaction identifier, and information to be changed. Among them, the information to be changed can be the identifier information of the control to be mounted or the page control information of the control to be mounted.
[0075] S320. Determine whether the provident fund center identifier, transaction identifier, and event identifier to be mounted already exist in the page interaction requirement change information.
[0076] Only when there is a corresponding event control information table for the page interaction requirement before the change can the data items in the event control information table be changed. Specifically, by determining whether the candidate provident fund center identifier, candidate transaction identifier, and event identifier to be mounted already exist in the page interaction requirement change information, it is determined whether there is a corresponding candidate event control information table for this page interaction requirement. If not, an error is reported.
[0077] S330. If they exist, determine the event control information table to be updated in the candidate event control information table according to the provident fund center identifier and the transaction identifier.
[0078] S340. Update the to-be-updated event control information table by using the page interaction requirement change information, and use the obtained latest event control information table as the candidate event control information table.
[0079] The page interaction requirement change information includes the requirement items to be changed. Specifically, the requirement items to be changed can be any one of the following: transaction identifier, page control file address, to-be-mounted event identifier, whether to enable, trigger type, and to-be-mounted control identifier.
[0080] In an optional embodiment, updating the to-be-updated event control information table by using the page interaction requirement change information includes: verifying the page interaction requirement change information; if the verification passes, update the to-be-updated event control information table by using the page interaction requirement change information to obtain the latest event control information table.
[0081] To ensure the normal generation of the event control information table, similar to the operation of adding a new candidate event control information, it is also necessary to verify the page interaction requirement change information, which will not be elaborated here. For details, refer to step S230 in the embodiments of this application.
[0082] S350. Obtain the construction instruction of the target page; wherein, the target page is the page for the target provident fund center to process the target transaction.
[0083] S360. Select the target event control information table from the candidate event control information table according to the identifiers of the target provident fund center and the target transaction; wherein, the candidate event control information table is used to construct the page for the candidate provident fund center to process the candidate transaction.
[0084] S370. Determine the target page control function in the target page control file according to the target page control file address in the target event control information table.
[0085] S380. Add the target page control function to the to-be-mounted control of the target page according to the identifier information of the to-be-mounted control in the target event control information table and the page control information of the to-be-mounted control.
[0086] In an embodiment of the present application, in response to a candidate event control information table update request, page interaction requirement change information is obtained, and it is determined whether the provident fund center identifier, transaction identifier, and event identifier to be mounted already exist in the page interaction requirement change information. If they exist, the event control information table to be updated is determined in the candidate event control information table according to the provident fund center identifier and the transaction identifier, the event control information table to be updated is updated using the page interaction requirement change information, and the obtained latest event control information table is used as the candidate event control information table. A method for updating the candidate event control information table is provided. When the interaction logic of a certain transaction in the provident fund center changes, by updating the candidate event control information table and then constructing a page for the provident fund center to process the transaction according to the updated candidate event control information table, the update of the interaction logic required by the provident fund center is realized, the implementation process of page interaction logic change is simplified, and work efficiency is improved.
[0087] Embodiment 4
[0088] Figure 4 It is a flowchart of another page construction method for an event provided by Embodiment 4 of the present application. This embodiment is further optimized on the basis of the above embodiment. Specifically, the optimization is that according to the identifier information of the control to be mounted in the target event control information table and the page control information of the control to be mounted, the target page control function is added to the control to be mounted on the target page, including: determining the control to be mounted according to the identifier information of the control to be mounted; determining the target page control function in the page control file according to the event identifier information to be mounted; adding the target page control function to the control to be mounted.
[0089] As Figure 4 shown, the page construction method for an event includes:
[0090] S410. Obtain a construction instruction for the target page; where the target page is a page for a target provident fund center to process a target transaction.
[0091] S420. Select a target event control information table in the candidate event control information table according to the identifiers of the target provident fund center and the target transaction; where the candidate event control information table is used to construct a page for a candidate provident fund center to process a candidate transaction.
[0092] S430. Determine a target page control function in the target page control file according to the target page control file address in the target event control information table.
[0093] In an optional embodiment, the target page control file includes at least one of the following target page control functions: page initialization function, control to be mounted import function, default configuration information acquisition function, function identifier to be mounted acquisition function, startup item information acquisition function, trigger event type acquisition function, trigger event object acquisition function, and event annotation acquisition function.
[0094] Among them, the page initialization function is used to initialize the target page; the control to be mounted import function is used to import the controls included in the target page; the default configuration information acquisition function is used to acquire the default configuration information for use when initializing the target page; the function identifier to be mounted acquisition function is used to acquire the function identifier to be mounted; the startup item information acquisition function is used to acquire whether to start the process of adding the target page control function to the control to be mounted; the trigger event type acquisition function is used to acquire the trigger mode information; the trigger event object acquisition function is used to determine the object of the trigger event; the event annotation acquisition function is used to acquire the annotation of the event.
[0095] In an optional embodiment, before determining the target page control function in the page control file according to the identifier information of the event to be mounted, the method further includes: introducing the target page control file according to the target page control file address.
[0096] S440. Determine the control to be mounted according to the identifier information of the control to be mounted.
[0097] The identifier information of the control to be mounted can uniquely identify a control to be mounted. According to the identifier information of the control to be mounted, the control that needs to add an event can be determined among the controls on the page as the control to be mounted.
[0098] S450. Determine the target page control function in the page control file according to the identifier information of the event to be mounted.
[0099] Among them, the identifier information of the event to be mounted can uniquely identify an event to be mounted, and the event to be mounted includes the page interaction logic that the provident fund center needs to implement. Optionally, the event to be mounted is a page control function, and the identifier information of the event to be mounted is the name of the target page control function. The page control file includes multiple page control functions. The page interaction logic can be implemented by executing the page control function. The target page control function can be determined among the page control functions included in the page control file according to the identifier information of the event to be mounted.
[0100] Optionally, an event control information table includes an identifier of the control to be mounted and an identifier information of the event to be mounted, and the event to be mounted in the event control information table is added to the control to be mounted.
[0101] To achieve the reuse of page interaction logic, in an optional embodiment, the target page control function has a parameter return interface that conforms to a preset standard. Exemplarily, the page control function is defined using the define / return method to implement the getAppTradeScope method, which returns a list of applicable transaction codes in the method: [tradecode1, tradecode2...]; the getDefaultConfig method is implemented, and the default configuration information is returned in the method: [{'eventid': '...', 'isused': '....', 'eventtype': '.....', 'loadeventobjid': '.....'}]. Unifying the interfaces of page control functions facilitates the invocation of page control functions. The page control function can be added to different to-be-mounted controls on the same page, or it can be added to different to-be-mounted controls on different pages.
[0102] S460. Add the target page control function to the to-be-mounted control.
[0103] In the embodiment of the present application, by setting event control information, the page interaction logic requirements of the provident fund center are sorted out and integrated. Then, according to the construction instruction of the target page, the corresponding event control information table is selected, and according to the information in the target event control information table, the target page control function is added to the to-be-mounted control to construct a page for the provident fund center to process transactions, thereby implementing the interaction logic required by the provident fund center. In the embodiment of the present application, the page interaction logic required by the provident fund center is included in the event control information table, which supports the reuse of interaction logic, realizes the decoupling of page display elements and page interaction operations, simplifies the implementation process of page interaction logic, and improves the flexibility of page interaction logic implementation.
[0104] Embodiment Five
[0105] Figure 5 This is a page construction device for an event provided in Embodiment Five of the present application. This embodiment is applicable to the situation of constructing pages according to the front-end page interaction requirements of different provident fund management centers and providing corresponding interaction logics for different provident fund management centers. The device can be implemented by software and / or hardware and can be integrated into electronic devices such as intelligent terminals.
[0106] As Figure 5 shown, the device may include: a construction instruction acquisition module 510, a target event control information table determination module 520, a target page control function determination module 530, and a target page control function addition module 540.
[0107] Construct an instruction acquisition module 510 for acquiring construction instructions for a target page; wherein, the target page is a page for a target provident fund center to process a target transaction;
[0108] A target event control information table determination module 520 for selecting a target event control information table from candidate event control information tables according to the identifiers of the target provident fund center and the target transaction; wherein, the candidate event control information tables are used to construct pages for candidate provident fund centers to process candidate transactions;
[0109] A target page control function determination module 530 for determining a target page control function in a target page control file according to the target page control file address in the target event control information table;
[0110] A target page control function addition module 540 for adding the target page control function to a control to be mounted on the target page according to the identifier information of the control to be mounted on the target page and the page control information of the control to be mounted in the target event control information table.
[0111] In the embodiment of the present application, by setting event control information, the page interaction logic requirements of the provident fund center are sorted out and integrated. Then, according to the construction instructions of the target page, the corresponding event control information table is selected, and according to the information in the target event control information table, the target page control function is added to the control to be mounted, so as to construct a page for the provident fund center to process transactions, thereby realizing the interaction logic required by the provident fund center. In the embodiment of the present application, the page interaction logic required by the provident fund center is included in the event control information table, which supports the reuse of the interaction logic, realizes the decoupling of the page display elements and the page interaction operations, simplifies the implementation process of the page interaction logic, and improves the flexibility of the implementation of the page interaction logic.
[0112] Optionally, the candidate event control information table includes the identifier information of the control to be mounted on the page and the page control information of the control to be mounted; the page control information includes at least one of the following: whether to mount, trigger mode, identifier of the event to be mounted, and page control file address.
[0113] Optionally, the device further includes: a page interaction requirement acquisition module, configured to, before selecting a target event control information table from the candidate event control information tables according to the identifiers of the target provident fund center and the target transaction, acquire the page interaction requirements of the candidate provident fund center in response to a candidate event control information table addition request; a page interaction requirement existence determination module, configured to determine whether the candidate provident fund center identifier, the candidate transaction identifier, and the to-be-mounted event identifier in the page interaction requirements already exist; a page interaction requirement verification module, configured to, if not, verify the page interaction requirements according to a preset verification rule; a candidate event control information table generation module, configured to, if the verification is passed, generate an event control information table according to the page interaction requirements as the candidate event control information table.
[0114] Optionally, the page interaction requirements include at least one of the following: a provident fund center identifier, a transaction identifier, an identifier information of a to-be-mounted control, and page control information of the to-be-mounted control; the page control information includes at least one of the following: a trigger mode, a to-be-mounted event identifier, and a page control file address.
[0115] Optionally, the preset verification rule includes a preset key attribute verification rule and a preset content verification rule; the page interaction requirement verification module includes: a first interaction requirement verification sub-module, configured to determine whether there is corresponding data for a requirement item whose attribute is a key attribute in the page interaction requirements according to the preset key attribute rule; a second interaction requirement verification sub-module, configured to determine whether the data corresponding to the requirement item in the page interaction requirements is a preset field according to the preset content check rule.
[0116] Optionally, the device further includes: a page interaction requirement list acquisition module, configured to, before selecting a target event control information table from the candidate event control information tables according to the identifiers of the target provident fund center and the target transaction, acquire a page interaction requirement list in response to a candidate event control information table batch import request; a list page interaction requirement existence determination module, configured to traverse the page interaction requirement list and respectively determine whether the provident fund center identifier, the transaction identifier, and the to-be-mounted event identifier in each page interaction requirement in the page interaction requirement list already exist; a list page interaction requirement verification module, configured to, if not, verify each page interaction requirement in the page interaction requirement list respectively; a candidate event control information table batch generation module, configured to, if the verification is passed, generate event control information tables in batches according to the page interaction requirements as candidate event control information tables.
[0117] Optionally, the device further includes: a page interaction requirement change information acquisition module, configured to acquire page interaction requirement change information in response to a candidate event control information table update request before selecting a target event control information table from the candidate event control information tables according to the target provident fund center and the identifier of the target transaction; a page interaction requirement change information existence determination module, configured to determine whether the provident fund center identifier, the transaction identifier, and the event identifier to be mounted already exist in the page interaction requirement change information; a to-be-updated event control information table determination module, configured to, if they exist, determine a to-be-updated event control information table from the candidate event control information tables according to the provident fund center identifier and the transaction identifier; and a to-be-updated event control information table update module, configured to update the to-be-updated event control information table with the page interaction requirement change information, and use the obtained latest event control information table as the candidate event control information table.
[0118] Optionally, the to-be-updated event control information table update module includes: an interaction requirement change information verification module, configured to verify the page interaction requirement change information; and a to-be-updated event control information table update sub-module, configured to, if the verification is passed, update the to-be-updated event control information table with the page interaction requirement change information to obtain a latest event control information table.
[0119] Optionally, the target page control function addition module 540 includes: a to-be-mounted control determination sub-module, configured to determine a to-be-mounted control according to the identifier information of the to-be-mounted control; a target page control function determination sub-module, configured to determine a target page control function from the page control file according to the to-be-mounted event identifier information; and a target page control function addition sub-module, configured to add the target page control function to the to-be-mounted control.
[0120] Optionally, the target page control function has a parameter return interface that conforms to a preset standard.
[0121] Optionally, the device further includes: a target page control file introduction module, configured to introduce the target page control file according to the target page control file address before determining a target page control function from the page control file according to the to-be-mounted event identifier information.
[0122] Optionally, the target page control file includes at least one of the following target page control functions: a page initialization function, a to-be-mounted control import function, a default configuration information acquisition function, a to-be-mounted function identifier acquisition function, a startup item information acquisition function, a trigger event type acquisition function, a trigger event object acquisition function, and an event annotation acquisition function.
[0123] The page construction device for an event provided by an embodiment of the present invention can execute the page construction method for an event provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the page construction method for an event.
[0124] Embodiment Six
[0125] Embodiment Six of the present application further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a page construction method for an event when executed by a computer processor. The method includes:
[0126] Obtain a construction instruction for a target page; wherein, the target page is a page for a target provident fund center to process a target transaction;
[0127] According to the identifiers of the target provident fund center and the target transaction, select a target event control information table from the candidate event control information tables; wherein, the candidate event control information tables are used to construct pages for candidate provident fund centers to process candidate transactions;
[0128] Determine a target page control function in the target page control file according to the target page control file address in the target event control information table;
[0129] Add the target page control function to the controls to be mounted on the target page according to the identifier information of the controls to be mounted in the target event control information table and the page control information of the controls to be mounted.
[0130] A storage medium refers to any various types of memory electronic devices or storage electronic devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks or magnetic tape devices; computer system memories or random access memories, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memories, such as flash memories, magnetic media (such as hard disks or optical storage); register or other similar types of memory elements, etc. The storage medium may also include other types of memories or combinations thereof. Additionally, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system, and the second computer system is connected to the computer system through a network (such as the Internet). The second computer system may provide program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (such as in different computer systems connected through a network). The storage medium may store program instructions (such as specifically implemented as a computer program) executable by one or more processors.
[0131] Of course, the storage medium containing computer-executable instructions provided by the embodiments of the present application is not limited to the page construction operation of only one type of event as described above, and can also execute the related operations in the page construction method of one type of event provided by any embodiment of the present application.
[0132] Embodiment Seven
[0133] Embodiment Seven of the present application provides an electronic device. The page construction device provided by the embodiments of the present application can be integrated in this electronic device. This electronic device can be configured within the system or can be a device that executes some or all of the functions within the system. Figure 6 It is a schematic structural diagram of an electronic device provided by Embodiment Six of the present application. As Figure 6 shown, this embodiment provides an electronic device 600, which includes: one or more processors 620; a storage device 610 for storing one or more programs. When the one or more programs are executed by the one or more processors 620, the one or more processors 620 implement the page construction method provided by the embodiments of the present application. This method includes:
[0134] Obtain a construction instruction for a target page; wherein, the target page is a page for a target provident fund center to process a target transaction;
[0135] According to the identifiers of the target provident fund center and the target transaction, select a target event control information table from the candidate event control information tables; wherein, the candidate event control information tables are used to construct pages for candidate provident fund centers to process candidate transactions;
[0136] According to the target page control file address in the target event control information table, determine a target page control function in the target page control file;
[0137] According to the identifier information of the control to be mounted in the target event control information table and the page control information of the control to be mounted, add the target page control function to the control to be mounted on the target page.
[0138] Of course, those skilled in the art can understand that the processor 620 also implements the technical solutions of the page construction method provided by any embodiment of the present application.
[0139] Figure 6 The shown electronic device 600 is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0140] As Figure 6As shown, the electronic device 600 includes a processor 620, a storage device 610, an input device 630, and an output device 640; the number of processors 620 in the electronic device can be one or more, Figure 6 Taking one processor 620 as an example; the processor 620, the storage device 610, the input device 630, and the output device 640 in the electronic device can be connected through a bus or other means, Figure 6 Taking the connection through the bus 650 as an example.
[0141] The storage device 610, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as the program instructions corresponding to a page construction method for an event in an embodiment of the present application.
[0142] The storage device 610 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal, etc. In addition, the storage device 610 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the storage device 610 can further include a memory remotely set relative to the processor 620, and these remote memories can be connected through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0143] The input device 630 can be used to receive input digital, character information, or voice information, and generate key signal inputs related to the user settings and function control of the electronic device. The output device 640 can include electronic devices such as a display screen and a speaker.
[0144] The electronic device provided by the embodiment of the present application can construct a page according to the front-end page interaction requirements of different provident fund management centers, provide corresponding interaction logics for different provident fund management centers, and by determining the event control information table corresponding to the target provident fund center, and according to the information in the event control information table, determine the controls to be mounted on the target page and the target page control function, and add the target page control function to the controls to be mounted, so as to decouple the page display elements from the page interaction operations, simplify the implementation process of the page interaction logic, and improve the flexibility of the implementation of the page interaction logic.
[0145] The page construction device, medium, and electronic device for an event provided in the above embodiments can execute the page construction method for an event provided in any embodiment of the present application, and have the corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in the above embodiments, reference can be made to the page construction method for an event provided in any embodiment of the present application.
[0146] Note that the above is only the preferred embodiment of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments. Without departing from the concept of the present application, more other equivalent embodiments can be included, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for constructing a page of an event, characterized in that, The method includes: Obtaining a construction instruction for a target page; wherein, the target page is a page for a target provident fund center to process a target transaction; Selecting a target event control information table from candidate event control information tables according to the identifiers of the target provident fund center and the target transaction; wherein, the candidate event control information tables are used to construct pages for candidate provident fund centers to process candidate transactions; the candidate event control information tables include identifier information of controls to be mounted on the page and page control information of the controls to be mounted; the page control information includes at least one of the following: triggering method, identifier of the event to be mounted, and page control file address; Introducing a target page control file according to the target page control file address; Determining the controls to be mounted according to the identifier information of the controls to be mounted; Determining a target page control function in the page control file according to the identifier information of the event to be mounted; Adding the target page control function to the controls to be mounted.
2. The method according to claim 1, wherein Before selecting a target event control information table from candidate event control information tables according to the identifiers of the target provident fund center and the target transaction, the method further includes: Responding to a request for adding a candidate event control information table, and obtaining the page interaction requirements of the candidate provident fund center; Judging whether the identifiers of the candidate provident fund center, the identifier of the candidate transaction, and the identifier of the event to be mounted in the page interaction requirements exist; If not, verifying the page interaction requirements according to preset verification rules; If the verification passes, generating an event control information table according to the page interaction requirements as the candidate event control information table.
3. The method according to claim 2, wherein The page interaction requirements include at least one of the following: provident fund center identifier, transaction identifier, identifier information of the control to be mounted, and page control information of the control to be mounted; the page control information includes at least one of the following: triggering method, identifier of the event to be mounted, and page control file address.
4. The method according to claim 2, characterized in that, Wherein, The preset verification rules include preset key attribute verification rules and preset content verification rules; Verifying the page interaction requirements according to the preset verification rules includes: Judging whether there is corresponding data for the requirement items with key attributes in the page interaction requirements according to the preset key attribute verification rules; Judging whether the data corresponding to the requirement items in the page interaction requirements is a preset field according to the preset content verification rules.
5. The method according to claim 3, characterized in that Before selecting a target event control information table from candidate event control information tables according to the identifiers of the target provident fund center and the target transaction, the method further includes: Responding to a request for batch import of candidate event control information tables, and obtaining a list of page interaction requirements; Traversing the list of page interaction requirements, and respectively judging whether the identifiers of the provident fund center, the transaction identifier, and the identifier of the event to be mounted in each page interaction requirement in the list of page interaction requirements exist; If not, respectively verifying each page interaction requirement in the list of page interaction requirements; If the verification passes, batch generating an event control information table according to the list of page interaction requirements as the candidate event control information table.
6. The method according to claim 1, wherein Before selecting the target event control information table from the candidate event control information table according to the identification of the target provident fund center and the target transaction, the method further includes: In response to a candidate event control information table update request, obtain page interaction requirement change information; Determine whether the provident fund center identification, transaction identification, and event identification to be mounted already exist in the page interaction requirement change information; If they exist, determine the event control information table to be updated in the candidate event control information table according to the provident fund center identification and the transaction identification; Update the event control information table to be updated with the page interaction requirement change information, and use the obtained latest event control information table as the candidate event control information table.
7. The method according to claim 6, wherein Updating the event control information table to be updated with the page interaction requirement change information includes: Verify the page interaction requirement change information; If the verification passes, update the event control information table to be updated with the page interaction requirement change information to obtain the latest event control information table.
8. The method according to claim 1, wherein The target page control function has a parameter return interface that meets the preset standard.
9. The method according to claim 1, wherein The target page control file includes at least one of the following target page control functions: page initialization function, function for importing controls to be mounted, function for obtaining default configuration information, function for obtaining the identification of the function to be mounted, function for obtaining startup item information, function for obtaining the type of trigger event, function for obtaining the object of the trigger event, and function for obtaining event annotations.
10. A page construction device for an event, characterized in that, The device includes: a construction instruction acquisition module for acquiring a construction instruction for a target page; wherein the target page is a page for a target provident fund center to process a target transaction; A target event control information table determination module for selecting a target event control information table from the candidate event control information table according to the identification of the target provident fund center and the target transaction; wherein the candidate event control information table is used to construct a page for a candidate provident fund center to process a candidate transaction; the candidate event control information table includes the identification information of the controls to be mounted on the page and the page control information of the controls to be mounted; the page control information includes at least one of the following: trigger mode, event identification to be mounted, and page control file address; A target page control file introduction module for introducing a target page control file according to the target page control file address; A target page control function addition module, specifically for determining the control to be mounted according to the identification information of the control to be mounted; determining the target page control function in the page control file according to the event identification information to be mounted; adding the target page control function to the control to be mounted.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements a method for constructing a page of an event according to any one of claims 1-9.
12. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a method for constructing a page of an event according to any one of claims 1-9.
Citation Information
Patent Citations
Page data processing method and device, electronic equipment and storage medium
CN111767111A