Component-based data interaction method and device, computer equipment and storage medium
By using event bus in the Kanban designer of low-code platform, data interaction requests are processed between user interface components and text box display components, the problem of inefficient data interaction between components in the prior art is solved, and efficient data interaction and performance improvement is achieved.
Patent Information
- Application Number
- CN202411884388.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-15
AI Technical Summary
The existing method of using the browser's localStorage or sessionStorage for data interaction between components has inefficient processing and affects the overall performance of the page.
By judging the user-triggered component interaction request, displaying the target board, receiving user operations, obtaining target events and data, and sending them to the text box display components through the event bus, data interaction between components is realized.
It improves the processing efficiency of data interaction between components, improves page performance, and realizes automatic intelligent data interaction between user interface components and text box display components.
Smart Images

Figure CN119829180A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of data processing technology, financial technology, and digital medicine, and in particular to component-based data interaction methods, devices, computer equipment, and storage media. Background Art
[0002] In the field of information technology, as digital transformation accelerates, low-code platforms, as an efficient and flexible development tool, are gradually becoming an important choice for enterprises, such as financial enterprises and medical enterprises, to build business applications. Low-code platforms provide a visual operation interface, allowing non-professional developers to easily drag and drop various visual components into the dashboard and bind the corresponding data sources, thereby quickly displaying and analyzing data. This development model greatly reduces the threshold for application development and improves development efficiency.
[0003] However, in the design and implementation process of the low-code platform dashboard, although the component-based development approach brings great flexibility and scalability, it also brings new challenges in the interaction and linkage between components. Since each component is logically independent and has no direct connection, additional technical means are needed to ensure the correct transmission and response of data when implementing cross-component interaction.
[0004] The existing data interaction method used between components usually uses the browser's localStorage or sessionStorage for data storage and interaction. Although it can achieve cross-component data sharing to a certain extent, this method has obvious limitations. First, the reading and writing speed of localStorage and sessionStorage is relatively slow, and the processing efficiency is low, especially when processing large amounts of data, which will significantly affect the overall performance of the page. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose a component-based data interaction method, apparatus, computer device and storage medium to solve the technical problem that the existing method of using the browser's localStorage or sessionStorage to interact with data between components has low processing efficiency and affects the overall performance of the page.
[0006] In order to solve the above technical problems, the embodiment of the present application provides a component-based data interaction method, which adopts the following technical solution:
[0007] Determine whether a component interaction request corresponding to the target dashboard is received;
[0008] If yes, display the target dashboard; wherein the target dashboard includes the user interface component and text box display component pre-selected and configured by the user;
[0009] receiving a click operation on a target label item in the user interface component triggered by the user in the target dashboard;
[0010] Acquire a target event corresponding to the target tag item, and acquire target data corresponding to the target event;
[0011] Calling a target event bus corresponding to the user interface component;
[0012] Based on the target event bus, the target event and the target data are sent to the text box display component, so that the text box display component displays the target data after receiving the target event.
[0013] Furthermore, before the step of displaying the target signboard, the method further includes:
[0014] Receiving a first setting request for the user interface component triggered by the user;
[0015] Displaying a first interaction setting interface corresponding to the user interface component;
[0016] Receiving the event triggering condition selected by the user in the first interactive setting interface, and receiving the configuration event sending information input by the user;
[0017] Verifying the configuration event sending information based on a preset verification strategy;
[0018] If the configuration event sending information passes the verification, a configuration process of a sending event corresponding to the user interface component is performed based on the event triggering condition and the configuration event sending information.
[0019] Furthermore, the step of verifying the configuration event sending information based on a preset verification strategy specifically includes:
[0020] Obtaining the event name of the sending event included in the configuration event sending information;
[0021] Determine whether there is a specified event name matching the event name in a preset event name library;
[0022] If there is no specified event name matching the event name, then the event name is checked for standardization;
[0023] If the event name passes the normative check, then it is determined that the configuration event sending information passes the check; otherwise, it is determined that the configuration event sending information fails the check.
[0024] Furthermore, before the step of displaying the target signboard, the method further includes:
[0025] Receiving a second setting request for the text box display component triggered by the user;
[0026] Displaying a second interactive setting interface corresponding to the text box display component;
[0027] Receiving a receiving event script selected by the user in the second interaction setting interface, and receiving configuration event receiving information input by the user in a script editing box corresponding to the receiving event script;
[0028] Configuration processing of the received event corresponding to the text box display component is performed based on the received event script and the configured event received information.
[0029] Furthermore, the component interaction request also carries the user information of the user; and the step of displaying the target dashboard specifically includes:
[0030] extracting the user information from the component interaction request;
[0031] Collecting a preset number of target biometric information corresponding to the user;
[0032] authenticating the user based on all of the target biometric information;
[0033] If the user passes the identity authentication, then the user's authority is verified based on the user information;
[0034] If the user passes the authority verification, the step of displaying the target signboard is performed.
[0035] Furthermore, the step of verifying the authority of the user based on the user information specifically includes:
[0036] Acquire a target permission level corresponding to the user information based on a preset permission verification model;
[0037] Call the preset operation permission data table;
[0038] Querying the specified permission level interval corresponding to the component interaction operation from the operation permission data table;
[0039] Determining whether the target permission level is within the specified permission level range;
[0040] If so, it is determined that the user has passed the authority verification; otherwise, it is determined that the user has not passed the authority verification.
[0041] Further, after the step of sending the target event and the target data to the text box display component based on the target event bus, so that the text box display component displays the target data after receiving the target event, the method further includes:
[0042] Determining whether the user interface component is in a preset idle state;
[0043] If so, call the preset logout method;
[0044] The target event bus is deregistered based on the deregistration method.
[0045] In order to solve the above technical problems, the embodiment of the present application further provides a component-based data interaction device, which adopts the following technical solution:
[0046] A first judgment module is used to judge whether a component interaction request corresponding to a target dashboard triggered by a user is received;
[0047] A first display module, for displaying the target signboard, wherein the target signboard includes a user interface component and a text box display component pre-selected and configured by the user;
[0048] A first receiving module is used to receive a click operation on a target label item in the user interface component triggered by the user in the target dashboard;
[0049] An acquisition module, used to acquire a target event corresponding to the target tag item, and acquire target data corresponding to the target event;
[0050] A first calling module, used for calling a target event bus corresponding to the user interface component;
[0051] The sending module is used to send the target event and the target data to the text box display component based on the target event bus, so that the text box display component displays the target data after receiving the target event.
[0052] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0053] Determine whether a component interaction request corresponding to the target dashboard is received;
[0054] If yes, display the target dashboard; wherein the target dashboard includes the user interface component and text box display component pre-selected and configured by the user;
[0055] receiving a click operation on a target label item in the user interface component triggered by the user in the target dashboard;
[0056] Acquire a target event corresponding to the target tag item, and acquire target data corresponding to the target event;
[0057] Calling a target event bus corresponding to the user interface component;
[0058] Based on the target event bus, the target event and the target data are sent to the text box display component, so that the text box display component displays the target data after receiving the target event.
[0059] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0060] Determine whether a component interaction request corresponding to the target dashboard is received;
[0061] If yes, display the target dashboard; wherein the target dashboard includes the user interface component and text box display component pre-selected and configured by the user;
[0062] receiving a click operation on a target label item in the user interface component triggered by the user in the target dashboard;
[0063] Acquire a target event corresponding to the target tag item, and acquire target data corresponding to the target event;
[0064] Calling a target event bus corresponding to the user interface component;
[0065] Based on the target event bus, the target event and the target data are sent to the text box display component, so that the text box display component displays the target data after receiving the target event.
[0066] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0067] The present application first determines whether a component interaction request corresponding to a target dashboard triggered by a user is received; if so, the target dashboard is displayed; wherein the target dashboard includes a user interface component and a text box display component pre-selected and configured by the user; then a click operation on a target label item in the user interface component triggered by the user in the target dashboard is received; then a target event corresponding to the target label item is obtained, and target data corresponding to the target event is obtained; subsequently a target event bus corresponding to the user interface component is called; and finally, based on the target event bus, the target event and the target data are sent to the text box display component, so that the target data is displayed after the text box display component receives the target event. After receiving a component interaction request triggered by a user corresponding to a target board, the present application displays the target board and receives a click operation on a target label item in a user interface component triggered by the user in the target board, and then obtains a target event corresponding to the target label item, and obtains target data corresponding to the target event, and then calls a target event bus corresponding to the user interface component to send the target event and the target data to a text box display component, so that the text box display component displays the target data after receiving the target event, thereby automatically and intelligently realizing data interaction processing between the user interface component and the text box display component, without the need to frequently operate the browser's localStorage or sessionStorage, effectively improving the processing efficiency of data interaction, and improving page performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0069] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0070] Figure 2 A flowchart of an embodiment of a component-based data interaction method according to the present application;
[0071] Figure 3 is a structural schematic diagram of an embodiment of a component-based data interaction device according to the present application;
[0072] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0073] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0074] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0075] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0076] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0077] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0078] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0079] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0080] It should be noted that the component-based data interaction method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the component-based data interaction device is generally arranged in the server / terminal device.
[0081] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0082] Continue to refer Figure 2 , showing a flowchart of an embodiment of a component-based data interaction method according to the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. The component-based data interaction method provided in the embodiment of the present application can be applied to any scenario where product recommendations are required, and the component-based data interaction method can be applied to products in these scenarios, for example, product recommendations in the financial insurance field. The component-based data interaction method comprises the following steps:
[0083] Step S201 , determining whether a component interaction request corresponding to a target dashboard is received.
[0084] In this embodiment, the component-based data interaction method is executed on the electronic device (eg Figure 1The server / terminal device shown in the figure) can obtain component interaction requests through wired connection or wireless connection. It should be pointed out that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future. The executor of this application may be a system installed with a low-code platform, which may be a business system applied in the field of financial technology or digital medicine. The low-code platform is a design platform developed based on vue2. During the design stage of the kanban board, custom functions and effects can be implemented based on the original characteristics of vue. Among them, the above-mentioned target kanban refers to the kanban of the low-code platform. The above-mentioned component interaction request is a request triggered by the user for data interaction processing between components that meets personal business needs on the target kanban.
[0085] Step S202: If yes, display the target dashboard; wherein the target dashboard includes the user interface components and text box display components pre-selected and configured by the user.
[0086] In this embodiment, after the user logs in to the system, the dashboard designer of the low-code platform can be opened. According to business needs, select and drag the required components from the component library to the target dashboard. Specifically, a user interface component for switching labels and a text box display component for displaying information can be added to the target dashboard. In addition, the configuration processing process of sending events corresponding to the above-mentioned user interface components and the configuration processing process of receiving events corresponding to the above-mentioned text box display components will be further described in detail in the subsequent specific embodiments of this application.
[0087] Step S203: receiving a click operation on a target label item in the user interface component triggered by the user in the target dashboard.
[0088] In this embodiment, a plurality of label items, or options (such as option 1, option 2, and option 3) are pre-set in the user interface component. The user can select a target label item from all label items corresponding to all user interface components according to personal needs, and perform a click operation corresponding to the target label item.
[0089] Step S204, obtaining a target event corresponding to the target tag item, and obtaining target data corresponding to the target event.
[0090] In this embodiment, for each label item corresponding to the user interface component, an event corresponding to the label item and data corresponding to the event that needs to be transmitted are pre-configured. Specifically, a label item is pre-set for the user interface component, and a sending event is set for the label item and the event name is named, and data that needs to be transmitted as event data is set.
[0091] Step S205: calling the target event bus corresponding to the user interface component.
[0092] In this embodiment, the target event bus is specifically EventBus. The event bus is an event-based asynchronous distribution processing system based on the subscription / publishing mode, which can register to send events or receive events to achieve data interaction.
[0093] Step S206: Based on the target event bus, the target event and the target data are sent to the text box display component, so that the text box display component displays the target data after receiving the target event.
[0094] In this embodiment, the target event and the target data can be sent to the text box display component by using the target event bus. At the same time, when the text box display component is initialized, it will listen to the event corresponding to the event name of the target event, and after receiving the target event, it will execute the preset callback function and use the received target data to update the content of the text box display component, that is, display the target data in the text box display component.
[0095] Specifically, in the low-code platform's dashboard designer, the component's [Interaction] script edit box has some basic syntax checking and code completion functions built in. In this technology, the pn keyword can be used to use the code completion unique to the low-code platform. Enter the keyword pn in the editor to display these code completion prompts. The event bus can only be applied in the same dashboard, and data interaction across pages cannot be performed.
[0096] The core code includes:
[0097] Send event bus: EventBus.send("clickTab",value)
[0098] Receive event bus: EventBus.receive(["clickTab"], (params)=>{})
[0099] Note: clickTab is the custom event name, value is the parameter when the event is triggered, receive is receiving the event, and params is the received parameters.
[0100] When interacting with data through the event bus, first add the tab (user interface) component A and the text box display component B to the corresponding positions in the Kanban board designer. Component A defines the parameters of each tab. Use the send event bus in component A [Interaction] - [Trigger when clicking a tab item], define a variable value in the interaction edit box, and send it through EventBus.send('tab',value), where tab is the event name and value is the data to be sent. In this way, the value will be sent out when the component is clicked.
[0101] Component B receives the event bus. Use the receive event bus in the edit box of [Interaction] - [Initialize Run Script] of component B. EventBus.receive(["tab"],(params)=>{}). Through this code, during the initialization phase of component B, the event bus with the event name tab is monitored through EventBus.receive. In the receive event bus, params is read to get the value data of the sender.
[0102] By defining and monitoring the sending and receiving events in component A and component B, data interaction and event monitoring between component A and component B can be achieved.
[0103] After receiving a component interaction request triggered by a user corresponding to a target board, the present application displays the target board and receives a click operation on a target label item in a user interface component triggered by the user in the target board, and then obtains a target event corresponding to the target label item, and obtains target data corresponding to the target event, and then calls a target event bus corresponding to the user interface component to send the target event and the target data to a text box display component, so that the text box display component displays the target data after receiving the target event, thereby automatically and intelligently realizing data interaction processing between the user interface component and the text box display component, without the need to frequently operate the browser's localStorage or sessionStorage, effectively improving the processing efficiency of data interaction, and improving page performance.
[0104] In some optional implementations, before step S202, the electronic device may further perform the following steps:
[0105] A first setting request for the user interface component is received, which is triggered by the user.
[0106] In this embodiment, the first setting request is a request triggered by a user for customizing the configuration processing of the user interface component. The user can find and click "Interaction" or a similar option in the settings of the user interface component (Tab component) to enter the corresponding first interaction setting interface.
[0107] A first interaction setting interface corresponding to the user interface component is displayed.
[0108] In this embodiment, the first interaction setting interface is a pre-built interface for assisting the user to complete the configuration processing of the sending event corresponding to the user interface component.
[0109] The event triggering condition selected by the user in the first interaction setting interface is received, and the configuration event sending information input by the user is received.
[0110] In this embodiment, the user can find "trigger when clicking on a tab item" or other similar event triggering conditions and make a selection according to the actual needs of the individual in the above-mentioned first interactive setting interface. In addition, in the configuration of the event triggering conditions, choose to use the event bus to send events. In the configuration box that pops up, the user can enter the event name of the event to be sent (such as "clickTab") according to actual personal needs and select the data to be transferred (i.e., the pre-set Tab parameters). Among them, the configuration event sending information includes the event name of the above-mentioned sending event and the corresponding transfer data. In addition, the user can set the parameters of each Tab in the user interface component as needed. These parameters can be text, numbers or other types of data, which are used to pass as event data in subsequent steps. And the event to be sent can be named as needed, such as "clickTab". This name will be used when sending and receiving events to ensure a match between them.
[0111] The configuration event sending information is verified based on a preset verification strategy.
[0112] In this embodiment, the specific implementation process will be further described in detail in the subsequent specific embodiments of the present application, and will not be elaborated in detail here.
[0113] If the configuration event sending information passes the verification, a configuration process of a sending event corresponding to the user interface component is performed based on the event triggering condition and the configuration event sending information.
[0114] In this embodiment, the configuration processing of the sending event corresponding to the user interface component that adapts to the user's personal needs can be achieved based on the event triggering conditions input by the user and the configuration event sending information.
[0115] The present application receives a first setting request for the user interface component triggered by the user; then displays a first interactive setting interface corresponding to the user interface component; then receives an event trigger condition selected by the user in the first interactive setting interface, and receives configuration event sending information input by the user; subsequently verifies the configuration event sending information based on a preset verification strategy; if the configuration event sending information passes the verification, the configuration processing of the sending event corresponding to the user interface component is performed based on the event trigger condition and the configuration event sending information. After receiving the first setting request for the user interface component triggered by the user, the present application intelligently displays the first interactive setting interface corresponding to the user interface component, then receives the event trigger condition selected by the user in the first interactive setting interface, and receives the configuration event sending information input by the user, and after detecting that the configuration event sending information passes the verification based on the use of the verification strategy, it automatically completes the configuration processing of the sending event corresponding to the user interface component according to the event trigger condition and the configuration event sending information input by the user, thereby improving the processing intelligence and processing standardization of the data configuration processing of the user interface component.
[0116] In some optional implementations of this embodiment, the verifying the configuration event sending information based on a preset verification strategy includes the following steps:
[0117] The event name of the sending event included in the configuration event sending information is obtained.
[0118] In this embodiment, the configuration event sending information includes the event name of the sending event and the corresponding transfer data.
[0119] It is determined whether there is a specified event name matching the event name in a preset event name library.
[0120] In this embodiment, the above-mentioned event name library is a pre-built event name storing a plurality of pre-built sending events. The above-mentioned event name can be matched with the event names of all pre-built sending events contained in the above-mentioned event name library (such as similarity comparison). If there is a specific event name in the event name library whose similarity with the above-mentioned event name is greater than a specified similarity threshold, it is determined that there is a specified event name matching the event name in the event name library, otherwise it is determined that there is no specified event name matching the event name in the event name library. Among them, by ensuring that the event name of the sending event is unique, event coverage or processing exceptions caused by repeated event names can be avoided.
[0121] If there is no specified event name matching the event name, a standardization check is performed on the event name.
[0122] In this embodiment, a naming convention for event names is pre-set, and the event name can be checked for standardization by using the naming convention. If the event name complies with the above naming convention, it is determined that the event name has passed the standardization check; if the event name does not comply with the above naming convention, it is determined that the event name has failed the standardization check.
[0123] If the event name passes the normative check, then it is determined that the configuration event sending information passes the check; otherwise, it is determined that the configuration event sending information fails the check.
[0124] In this embodiment, only when it is detected that the event names of the sending events included in the configuration event sending information are not repeated and pass the standardization check, the configuration event sending information is determined to have passed the check; otherwise, the configuration event sending information is determined to have failed the check.
[0125] The present application obtains the event name of the sending event included in the configuration event sending information; then determines whether there is a specified event name matching the event name in the preset event name library; if there is no specified event name matching the event name, then the event name is checked for standardization; if the event name passes the standardization check, then it is determined that the configuration event sending information has passed the check, otherwise it is determined that the configuration event sending information has not passed the check. The present application obtains the event name of the sending event included in the configuration event sending information, and then performs a repeatability check on the event name of the sending event based on the use of the event name library, and performs a standardization check on the event name of the sending event, thereby combining the use of the obtained repeatability check result with the standardization check result, so as to realize efficient and accurate completion of the verification processing of the configuration event sending information, improve the processing accuracy of the verification processing of the configuration event sending information, and ensure the accuracy of the obtained verification result of the configuration event sending information.
[0126] In some optional implementations, before step S202, the electronic device may further perform the following steps:
[0127] A second setting request for the text box presentation component triggered by the user is received.
[0128] In this embodiment, the second setting request is a request triggered by the user for customizing the configuration processing of the text box display component. The user can find and click "interaction" or a similar option in the settings of the text box display component to enter the corresponding second interaction setting interface.
[0129] A second interactive setting interface corresponding to the text box display component is displayed.
[0130] In this embodiment, the second interaction setting interface is a pre-built interface for assisting the user to complete the configuration processing of the receiving event corresponding to the text box display component.
[0131] The receiving event script selected by the user in the second interaction setting interface is received, and the configuration event receiving information input by the user in the script editing box corresponding to the receiving event script is received.
[0132] In this embodiment, in the above-mentioned second interaction setting interface, the user can select "Initialize Run Script" or "Any Event Trigger Script" as the above-mentioned receiving event script according to personal needs, depending on when the user wants to start listening for events. And in the script editing box corresponding to the receiving event script, configure the use of the event bus to receive events. This usually involves selecting an event name (such as "clickTab") and defining a callback function to process the received data. Among them, in the callback function of the text box display component, the corresponding business logic can be designed according to the received data. For example, if the received data is the parameters of the user interface component, these parameters can be displayed in the text box.
[0133] Configuration processing of the received event corresponding to the text box display component is performed based on the received event script and the configured event received information.
[0134] In this embodiment, the configuration processing of the reception event corresponding to the text box display component can be performed by using the above reception event script and the above configuration event reception information, including configuring event reception and processing logic. After completing the configuration, the target dashboard can be further previewed or tested to ensure that when the user interface component is clicked, the text box display component can correctly display the corresponding information.
[0135] The present application receives the second setting request for the text box display component triggered by the user; then displays the second interactive setting interface corresponding to the text box display component; then receives the receiving event script selected by the user in the second interactive setting interface, and receives the configuration event receiving information entered by the user in the script editing box corresponding to the receiving event script; and subsequently performs configuration processing of the receiving event corresponding to the text box display component based on the receiving event script and the configuration event receiving information. After receiving the second setting request for the text box display component triggered by the user, the present application will intelligently display the second interactive setting interface corresponding to the text box display component, then receive the receiving event script selected by the user in the second interactive setting interface, and receive the configuration event receiving information entered by the user in the script editing box corresponding to the receiving event script, and will automatically and accurately complete the configuration processing of the receiving event corresponding to the text box display component based on the receiving event script and the configuration event receiving information, thereby improving the processing intelligence and processing standardization of the data configuration processing of the text box display component.
[0136] In some optional implementations, the component interaction request also carries the user information of the user; step S202 includes the following steps:
[0137] The user information is extracted from the component interaction request.
[0138] In this embodiment, the corresponding user information may be extracted by parsing the above component interaction request, wherein the user information may include the user's name.
[0139] Collect a preset amount of target biometric information corresponding to the user.
[0140] In this embodiment, the number of target biometric information collected, that is, the value of the preset number is not specifically limited, and can be randomly set according to actual business usage requirements. Exemplarily, the specified biometric information may include any of fingerprints, faces, irises, eyebrows, lips, etc.
[0141] The user is authenticated based on all of the target biometric information.
[0142] In this embodiment, all biometric information corresponding to the user information can be first obtained from a pre-constructed biometric database, and then based on the feature type corresponding to the preset number of target biometric information, specific biometric information matching the feature type is screened out from all biometric information. Then, the target biometric information is verified one by one using the feature biometric information. Specifically, if the target biometric information includes iris feature information and eyebrow feature information, the specific biometric information includes standard iris feature information and standard eyebrow feature information. Then, the iris feature information is used to perform a similarity comparison with the corresponding standard iris feature information, and the eyebrow feature information is used to perform a similarity comparison with the corresponding standard eyebrow feature information. If all the calculated similarities are greater than the preset similarity threshold, it is determined that all the target biometric information has passed the verification, and then it is determined that the user has passed the identity authentication. If there is a situation where all the calculated similarities are less than the corresponding similarity threshold, it is determined that all the target biometric information has not passed the verification, and then it is determined that the user has not passed the identity authentication. The value of the similarity threshold is not specifically limited and can be set according to actual business usage requirements, for example, 0.86. In addition, if the user fails identity authentication, it is determined that the user is not a legitimate user, and the response to the component interaction request is directly rejected.
[0143] If the user passes the identity authentication, the user's authority is verified based on the user information.
[0144] In this embodiment, the specific implementation process of the above-mentioned authorization verification of the user based on the user information will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.
[0145] If the user passes the authority verification, the step of displaying the target signboard is performed.
[0146] In this embodiment, if the user passes identity authentication and authority verification, it is determined that the user has authority to perform component interaction operations, and then the component interaction request is responded to and the corresponding subsequent processing flow is executed.
[0147] This application extracts the user information from the component interaction request; then collects a preset number of target biometric information corresponding to the user; then authenticates the user based on all the target biometric information; if the user passes the identity authentication, then the user's permission is verified based on the user information; if the user passes the permission verification, the step of displaying the target dashboard is executed. When receiving a component interaction request triggered by a user, this application will also intelligently extract user information from the component interaction request, and obtain a preset number of target biometric information corresponding to the user, and then authenticate the user based on the use of the target biometric information, and verify the user's permission based on the use of the user information. Only when it is detected that the user has passed both the identity authentication and permission verification, will the component interaction request be responded to and processed later, which effectively improves the standardization of the processing of component interaction requests and ensures the security of the response to component interaction requests.
[0148] In some optional implementations of this embodiment, the performing authority verification on the user based on the user information includes the following steps:
[0149] A target permission level corresponding to the user information is obtained based on a preset permission verification model.
[0150] In this embodiment, the permission verification model is a pre-built big data model that stores a one-to-one mapping relationship between the name information of each business person and the permission level. The permission verification model can be queried using the user information to obtain the target permission level corresponding to the user information.
[0151] Call the preset operation permission data table.
[0152] In this embodiment, the operation authority data table is a pre-constructed data table storing operation identifiers of various business processing operations and authority level intervals corresponding to the operation identifiers of various business processing operations. For each business processing operation, an operation identifier matching the business processing operation is pre-set, and the operation identifier is unique, and one business processing operation corresponds to one operation identifier.
[0153] The specified permission level interval corresponding to the component interaction operation is queried from the operation permission data table.
[0154] In this embodiment, the designated operation identifier corresponding to the component interaction operation can be obtained, and then the designated operation identifier can be used to query the operation permission data table to obtain the designated permission level range corresponding to the component interaction operation.
[0155] Determine whether the target permission level is within the specified permission level range.
[0156] In this embodiment, the target permission level can be compared with the two endpoint values included in the specified permission level range to obtain a corresponding numerical comparison result, and based on the numerical comparison result, it can be identified whether the target permission level is within the specified permission level range.
[0157] If so, it is determined that the user has passed the authority verification; otherwise, it is determined that the user has not passed the authority verification.
[0158] In this embodiment, if the target permission level is within the specified permission level range, it indicates that the user has the permission to perform the component interaction operation corresponding to the component interaction request, and the user is determined to have passed the permission verification. If the target permission level is not within the specified permission level range, it indicates that the user does not have the permission to perform the component interaction operation corresponding to the component interaction request, and the user is determined to have failed the permission verification.
[0159] This application obtains the target permission level corresponding to the user information based on a preset permission verification model; then calls the preset operation permission data table; then queries the specified permission level interval corresponding to the component interaction operation from the operation permission data table; subsequently determines whether the target permission level is within the specified permission level interval; only when it is detected that the specified permission level is within the specified permission level range, it indicates that the user has the permission to perform the component interaction operation corresponding to the above-mentioned component interaction request, thereby determining that the user has passed the permission verification, effectively improving the processing intelligence and processing accuracy of the user's permission verification, and ensuring the accuracy of the obtained user's permission verification results. In addition, only after it is determined that the user has passed the permission verification, will the component interaction request be responded to and processed later, which effectively improves the processing standardization of the component interaction request and ensures the response security of the component interaction request.
[0160] In some optional implementations of this embodiment, after step S206, the electronic device may further perform the following steps:
[0161] Determine whether the user interface component is in a preset idle state.
[0162] In this embodiment, since the event bus is monitored by the event receiving listener, when a large number of listeners are created or called, the page performance will be affected. Events that are not needed must be destroyed in time through the off method to release resources. The idle state refers to the state where the user interface component is hidden or destroyed, or it can also be the state when the business process corresponding to the user interface component ends.
[0163] If so, call the default logout method.
[0164] In this embodiment, the deregistration method specifically includes the off method of the event bus.
[0165] The target event bus is deregistered based on the deregistration method.
[0166] In this embodiment, the deregistration process for the target event bus is implemented by running the deregistration method, so as to release resources and avoid performance problems.
[0167] This application determines whether the user interface component is in a preset idle state; if so, calls a preset deregistration method; and then deregisters the target event bus based on the deregistration method. After sending the target event and target data to the text box display component based on the target event bus, if it detects that the user interface component is in a preset idle state, it will automatically and intelligently deregister the target event bus based on the use of the deregistration method, thereby releasing resources and avoiding performance issues, thereby ensuring the performance and stability of the system.
[0168] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.
[0169] In addition, the non-Company software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.
[0170] In addition, this application can realize complex data interaction and event interaction through the event bus. When data interacts across components, the event bus based on vue realizes event monitoring, and can trigger events on the text box display component in real time when operating the user interface component. It can also transfer data and realize the linkage of the text box display component. Data interaction through the event bus can avoid frequent operation of the browser's localStorage or sessionStorage, and has good performance.
[0171] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0172] It should be emphasized that in order to further ensure the privacy and security of the above target data, the above target data can also be stored in a node of a blockchain.
[0173] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0175] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0176] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a component-based data interaction device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0177] like Figure 3 As shown, the component-based data interaction device 300 described in this embodiment includes: a first judgment module 301, a first display module 302, a first receiving module 303, an acquisition module 304, a first calling module 305 and a sending module 306. Among them:
[0178] The first judgment module 301 is used to judge whether a component interaction request corresponding to a target dashboard triggered by a user is received;
[0179] The first display module 302 is used to display the target signboard, wherein the target signboard includes the user interface component and the text box display component pre-selected and configured by the user;
[0180] A first receiving module 303 is used to receive a click operation on a target label item in the user interface component triggered by the user in the target dashboard;
[0181] The acquisition module 304 is used to acquire the target event corresponding to the target tag item, and acquire the target data corresponding to the target event;
[0182] A first calling module 305, used to call a target event bus corresponding to the user interface component;
[0183] The sending module 306 is used to send the target event and the target data to the text box display component based on the target event bus, so that the text box display component displays the target data after receiving the target event.
[0184] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the component-based data interaction method in the aforementioned implementation mode, and are not described in detail here.
[0185] In some optional implementations of this embodiment, the component-based data interaction device further includes:
[0186] A second receiving module, configured to receive a first setting request for the user interface component triggered by the user;
[0187] A second display module, used to display a first interactive setting interface corresponding to the user interface component;
[0188] A third receiving module, used to receive the event triggering condition selected by the user in the first interactive setting interface, and receive the configuration event sending information input by the user;
[0189] A verification module, used to verify the configuration event sending information based on a preset verification strategy;
[0190] The first configuration module is used to perform configuration processing of a sending event corresponding to the user interface component based on the event triggering condition and the configuration event sending information if the configuration event sending information passes verification.
[0191] In some optional implementations of this embodiment, the verification module includes:
[0192] An acquisition submodule, used for acquiring the event name of the sending event included in the configuration event sending information;
[0193] A first judgment submodule is used to judge whether there is a specified event name matching the event name in a preset event name library;
[0194] A check submodule, configured to perform a standard check on the event name if there is no specified event name matching the event name;
[0195] The determination submodule is used to determine that the configuration event sending information has passed the verification if the event name has passed the normative verification, otherwise, determine that the configuration event sending information has not passed the verification.
[0196] In some optional implementations of this embodiment, the component-based data interaction device further includes:
[0197] A fourth receiving module, configured to receive a second setting request for the text box display component triggered by the user;
[0198] A third display module, used to display a second interactive setting interface corresponding to the text box display component;
[0199] A fifth receiving module, configured to receive a receiving event script selected by the user in the second interactive setting interface, and receive configuration event receiving information input by the user in a script editing box corresponding to the receiving event script;
[0200] The second configuration module is used to perform configuration processing of the reception event corresponding to the text box display component based on the reception event script and the configuration event reception information.
[0201] In some optional implementations of this embodiment, the component interaction request also carries user information of the user; the first display module 302 includes:
[0202] An extraction submodule, used to extract the user information from the component interaction request;
[0203] A collection submodule, used to collect a preset number of target biometric information corresponding to the user;
[0204] A first verification submodule, configured to authenticate the user based on all the target biometric information;
[0205] A second verification submodule, configured to verify the authority of the user based on the user information if the user passes the identity authentication;
[0206] The execution submodule is used to execute the step of displaying the target dashboard if the user passes the authority verification.
[0207] In some optional implementations of this embodiment, the second verification submodule includes:
[0208] An acquisition unit, configured to acquire a target authority level corresponding to the user information based on a preset authority verification model;
[0209] A calling unit, used for calling a preset operation authority data table;
[0210] A query unit, used to query the specified permission level interval corresponding to the component interaction operation from the operation permission data table;
[0211] A determination unit, configured to determine whether the target permission level is within the specified permission level range;
[0212] The determination unit is used to determine that if yes, the user has passed the authority verification; otherwise, determine that the user has not passed the authority verification.
[0213] In some optional implementations of this embodiment, the component-based data interaction device further includes:
[0214] A determination module, used to determine whether the user interface component is in a preset idle state;
[0215] The second calling module is used to call a preset logout method if yes;
[0216] A deregistration module is used to perform deregistration processing on the target event bus based on the deregistration method.
[0217] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0218] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital processors (DSP), embedded devices, etc.
[0219] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0220] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a component-based data interaction method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0221] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the component-based data interaction method.
[0222] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0223] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the component-based data interaction method as described above.
[0224] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0225] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A component-based data interaction method, characterized in that: The steps include: Determine whether a component interaction request corresponding to the target dashboard is received; If yes, display the target dashboard; wherein the target dashboard includes the user interface component and text box display component pre-selected and configured by the user; receiving a click operation on a target label item in the user interface component triggered by the user in the target dashboard; Acquire a target event corresponding to the target tag item, and acquire target data corresponding to the target event; Calling a target event bus corresponding to the user interface component; Based on the target event bus, the target event and the target data are sent to the text box display component, so that the text box display component displays the target data after receiving the target event.
2. The component-based data interaction method according to claim 1, characterized in that: Before the step of displaying the target signboard, the method further includes: Receiving a first setting request for the user interface component triggered by the user; Displaying a first interaction setting interface corresponding to the user interface component; Receiving the event triggering condition selected by the user in the first interactive setting interface, and receiving the configuration event sending information input by the user; Verifying the configuration event sending information based on a preset verification strategy; If the configuration event sending information passes the verification, a configuration process of a sending event corresponding to the user interface component is performed based on the event triggering condition and the configuration event sending information.
3. The component-based data interaction method according to claim 2, characterized in that: The step of verifying the configuration event sending information based on a preset verification strategy specifically includes: Obtaining the event name of the sending event included in the configuration event sending information; Determine whether there is a specified event name matching the event name in a preset event name library; If there is no specified event name matching the event name, then the event name is checked for standardization; If the event name passes the normative check, then it is determined that the configuration event sending information passes the check; otherwise, it is determined that the configuration event sending information fails the check.
4. The component-based data interaction method according to claim 1, characterized in that: Before the step of displaying the target signboard, the method further includes: Receiving a second setting request for the text box display component triggered by the user; Displaying a second interactive setting interface corresponding to the text box display component; Receiving a receiving event script selected by the user in the second interaction setting interface, and receiving configuration event receiving information input by the user in a script editing box corresponding to the receiving event script; Configuration processing of the received event corresponding to the text box display component is performed based on the received event script and the configured event received information.
5. The component-based data interaction method according to claim 1, characterized in that: The component interaction request also carries user information of the user; The step of displaying the target signboard specifically includes: extracting the user information from the component interaction request; Collecting a preset number of target biometric information corresponding to the user; authenticating the user based on all of the target biometric information; If the user passes the identity authentication, then the user's authority is verified based on the user information; If the user passes the authority verification, the step of displaying the target dashboard is performed.
6. The component-based data interaction method according to claim 5, characterized in that: The step of verifying the authority of the user based on the user information specifically includes: Acquire a target permission level corresponding to the user information based on a preset permission verification model; Call the preset operation permission data table; Querying the specified permission level interval corresponding to the component interaction operation from the operation permission data table; Determining whether the target permission level is within the specified permission level range; If so, it is determined that the user has passed the authority verification; otherwise, it is determined that the user has not passed the authority verification.
7. The component-based data interaction method according to claim 1, characterized in that: After the step of sending the target event and the target data to the text box display component based on the target event bus, so that the text box display component displays the target data after receiving the target event, the step further includes: Determining whether the user interface component is in a preset idle state; If so, call the preset logout method; The target event bus is deregistered based on the deregistration method.
8. A component-based data interaction device, characterized in that: include: A first judgment module is used to judge whether a component interaction request corresponding to a target dashboard triggered by a user is received; A first display module, for displaying the target signboard, wherein the target signboard includes a user interface component and a text box display component pre-selected and configured by the user; A first receiving module is used to receive a click operation on a target label item in the user interface component triggered by the user in the target dashboard; An acquisition module, used to acquire a target event corresponding to the target tag item, and acquire target data corresponding to the target event; A first calling module, used for calling a target event bus corresponding to the user interface component; The sending module is used to send the target event and the target data to the text box display component based on the target event bus, so that the text box display component displays the target data after receiving the target event.
9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the component-based data interaction method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the component-based data interaction method according to any one of claims 1 to 7.