Web end primitive event attribute decoupling binding method
By determining the event types that trigger and bear primitives in web-side graphics applications, an executable file is generated and event attribute objects are formed, which solves the problem of high coupling between primitives and event attributes, and improves configuration and development efficiency.
Patent Information
- Application Number
- CN202510962571.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-14
AI Technical Summary
In web-side graphics applications, the coupling between primitives and event attributes is high, resulting in low configuration efficiency of event attributes.
By determining the triggering element and the bearing element, the corresponding event type is determined according to the type of element, and an executable file is generated to form an event attribute object to achieve the decoupling of element and event attributes.
It improves the configuration efficiency of element event attributes, supports personalized configuration and flexibility, reduces repeated configuration time, and improves development efficiency and team collaborative development efficiency.
Smart Images

Figure CN120447878A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of software development technology, and in particular to a method for decoupling and binding attributes of graphic element events on a Web side. Background Art
[0002] In web-based graphics applications, binding the attributes of primitives is crucial. These primitives include nodes, links, graphic elements, images, videos, buttons, input boxes, text, audio, charts, and more. Based on object-oriented design principles, these attributes can be categorized into state attributes and event attributes (event attributes can be used to describe operations related to the primitive). Binding state attributes to primitives can be achieved through direct assignment, while binding event attributes to primitives is more complex. For example, large code blocks can be directly injected into primitives to bind event attributes.
[0003] In this way, the coupling between the primitives and event attributes is high, resulting in low configuration efficiency of the event attributes of the primitives. Summary of the Invention
[0004] The present disclosure aims to solve one of the technical problems in the related art at least to a certain extent.
[0005] To this end, the purpose of the present disclosure is to propose a Web-side primitive event attribute decoupling and binding method, which can decouple primitives and event attributes and improve the configuration efficiency of primitive event attributes.
[0006] The present invention proposes a method for decoupling and binding attributes of Web-side graphic element events, including: determining a triggering graphic element and a bearing graphic element; determining a triggering event type corresponding to the triggering graphic element according to the type of the triggering graphic element, and determining a bearing event type corresponding to the bearing graphic element according to the type of the bearing graphic element; generating a first executable file corresponding to the triggering graphic element according to the type of the triggering graphic element and the triggering event type, and generating a second executable file corresponding to the bearing graphic element according to the type of the bearing graphic element and the bearing event type; generating an event attribute object according to the type of the triggering graphic element, the triggering event type, the first executable file, the type of the bearing graphic element, the bearing event type and the second executable file.
[0007] The present disclosure provides a Web-side primitive event attribute decoupling and binding method, which determines a triggering primitive and a receiving primitive, and determines the triggering event type corresponding to the triggering primitive based on the type of the triggering primitive, determines the receiving event type corresponding to the receiving primitive based on the type of the receiving primitive, generates a first executable file corresponding to the triggering primitive based on the type of the triggering primitive and the triggering event type, generates a second executable file corresponding to the receiving primitive based on the type of the receiving primitive and the receiving event type, and generates an event attribute object based on the type of the triggering primitive, the triggering event type, the first executable file, the type of the receiving primitive, the receiving event type, and the second executable file. Since the event attributes of the primitives are uniformly managed in the form of event attribute objects, the primitives and event attributes can be decoupled, thereby improving the configuration efficiency of the event attributes of the primitives.
[0008] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and / or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 This is a flowchart of a method for decoupling and binding attributes of graphic element events on a Web side proposed in one embodiment of the present disclosure; Figure 2 is a schematic diagram of an event attribute editor in an embodiment of the present disclosure; Figure 3 It is a flowchart of a method for decoupling and binding attributes of graphic element events on the Web side proposed in another embodiment of the present disclosure. DETAILED DESCRIPTION
[0010] The following describes in detail embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present disclosure and are not to be construed as limiting the present disclosure. On the contrary, the embodiments of the present disclosure include all variations, modifications, and equivalents that fall within the spirit and scope of the appended claims.
[0011] Figure 1 It is a flowchart of a method for decoupling and binding attributes of graphic element events on the Web side proposed in one embodiment of the present disclosure.
[0012] like Figure 1 As shown, the Web-side primitive event attribute decoupling and binding method includes: S101: Determine the triggering element and the bearing element.
[0013] A triggering primitive is a primitive used to trigger an event (e.g., an operation method), while a sustaining primitive is a primitive that sustains the triggered event. For example, a primitive that triggers an event can be called a triggering primitive, while a primitive that is affected by the triggered event can be called a sustaining primitive. This is not a limitation.
[0014] Optionally, in some embodiments, the triggering primitive and the suffering primitive may be determined based on user selection.
[0015] Optionally, in some embodiments, an event attribute editor may be provided on the Web side, and the user may select the triggering element and the bearing element in the event attribute editor.
[0016] Optionally, in some embodiments, during the process of determining the triggering element and the receiving element, an event property editor may be provided (on the web side). The event property editor includes at least a first selection control (e.g., a drop-down control) and a second selection control. The first selection control is used to select the triggering element, and the second selection control is used to select the receiving element. The triggering element is selected using the first selection control, and the receiving element is selected using the second selection control. This allows for personalized configuration of the triggering element and the receiving element, improving configuration flexibility and efficiency.
[0017] Optionally, in some embodiments, the event attribute editor further includes a display area; during the process of selecting a triggering element through the first selection control and selecting a receiving element through the second selection control, the triggering element, the receiving element, the triggering event type, and the receiving event type can be dynamically displayed in the display area. This enables visual configuration of the triggering element and the receiving element, improving configuration efficiency and accuracy.
[0018] Optionally, in some embodiments, whether a primitive is a primitive that triggers an event or a primitive that undergoes an event, such properties of the primitive may also be referred to as primitive properties. The primitive properties may be defined for an event property object.
[0019] Optionally, in some embodiments, an event attribute structure can be pre-defined for an event attribute object. The event attribute structure can include the following fields: unique ID, name, description, creation date (create_time), update time (update_time), triggering element type (trigger_cell), triggering element event type (trigger_event_type), triggering element executable code block (trigger_code), receiving element type (act_cell), receiving element event type (act_event_type), receiving element executable code block (act_code), and notes. This enables unified storage and management of event attribute objects.
[0020] The meaning and description of the above fields are as follows: The unique code id represents the unique code of the event attribute object. The backend generates the unique code id after successfully adding the event attribute object. The name name represents the event attribute name and can be entered by the user. If not, it can be set to a default value. The description describes the event attribute and can be entered by the user. If not, it can be left blank. The create_time represents the event creation time and can be obtained when the backend first receives an automatic creation request. The update_time represents the event update time and can be automatically obtained when the backend receives an update request. The trigger_cell represents the trigger element (referred to as the trigger element for short). It can be selected using the drop-down box (an optional example of the first selection control mentioned above). The trigger_event_type represents the trigger event type and can be selected using the drop-down box (an optional example of the third selection control mentioned above). The drop-down box displays a value and can be filtered using the trigger-cell. Different trigger-cells support different event sources (see Table 1 below for event sources and event types). The trigger_code represents the executable code block of the trigger element (an optional example of the first executable file mentioned above) and can be generated based on user needs. act_cell represents the subject element (referred to as the subject element for short), which can be selected through the drop-down box (an optional example of the second selection control mentioned above). act_event_type represents the subject event type, which can be selected through the drop-down box (an optional example of the fourth selection control mentioned above). The drop-down box displays the value, which can be filtered through act-cell. Different act-cells support different event sources (for event sources and event types, please refer to Table 1 below). act_code represents the executable code block of the subject element (an optional example of the second executable file mentioned above), which can be generated according to user needs. Note represents event remarks, which can be entered by the user as a supplementary explanation of the event.
[0021] Table 1
[0022] For example, you can use the graphics engine to build an event attribute editor on the Web side (such as the Web configuration page). The event attribute editor can provide the add, delete, modify and query functions for event attribute objects. The functional modules and processes are as follows: Figure 2 shown. Figure 2It is a schematic diagram of the event attribute editor in the embodiment of the present disclosure. Take the first selection control and the second selection control as drop-down boxes for example. The event attribute object's graphic elements (such as triggering graphic elements and / or bearing graphic elements) can be generated through the event attribute editor. In the event attribute editor, the user is prompted to select the triggering graphic element trigger_cell and the bearing graphic element act_cell in the drop-down box. After the user selects, the selected graphic elements are displayed in real time on the page (an optional example of the display area of the event attribute editor), supporting convenient one-to-one event binding. At the same time, it also supports dragging one or more graphic elements from the graphic element list provided on the side of the event attribute editor to the page, and then, the graphic element and the bearing graphic element can be triggered from the graphic elements displayed on the page, thereby being effectively applicable to the processing of complex events in batches.
[0023] Optionally, in some embodiments, the triggering graphic element may be a global graphic element of the page (for example, for events originating from the keyboard, events originating from the right key, etc.), or a triggering graphic element may be a single graphic element, such as a graphic box, button, text, input box, picture, voice, video, etc.
[0024] S102: Determine the type of triggering event corresponding to the triggering primitive according to the type of the triggering primitive, and determine the type of bearing event corresponding to the bearing primitive according to the type of the bearing primitive.
[0025] The triggering element type refers to the element type of the triggering element, such as a graphic box or a button. The receiving element type refers to the element type of the receiving element, such as an input box or an image, and there is no limitation on this.
[0026] Optionally, in some embodiments, after determining the triggering primitive, the triggering event type corresponding to the triggering primitive (such as the trigger_event_type mentioned above) can be determined based on the type of the triggering primitive, and after determining the bearing primitive, the bearing event type corresponding to the bearing primitive (such as the act_event_type mentioned above) can be determined based on the type of the bearing primitive.
[0027] Optionally, in some embodiments, the type of triggering primitive, the type of triggering event, the type of receiving primitive, and the type of receiving event may be used together to form an event attribute object. For details, please refer to subsequent embodiments.
[0028] Optionally, in some embodiments, in the process of determining the trigger event type corresponding to the triggering primitive based on the type of the triggering primitive, the user may be prompted to configure the trigger event type for the triggering primitive, and the configured trigger event type may be determined as the trigger event type corresponding to the triggering primitive. In the process of determining the bearing event type corresponding to the bearing primitive based on the type of the bearing primitive, the user may be prompted to configure the bearing event type for the bearing primitive, and the configured bearing event type may be determined as the bearing event type corresponding to the bearing primitive; or the determination of the trigger event type corresponding to the triggering primitive and the bearing event type corresponding to the bearing primitive may be implemented in combination with artificial intelligence; or the determination of the trigger event type corresponding to the triggering primitive and the bearing event type corresponding to the bearing primitive may be implemented based on any other possible method, and there is no limitation on this.
[0029] Optionally, in some embodiments, configuring a triggering event type for a triggering element may be implemented through visual configuration, and configuring a sustaining event type for a sustaining element may be implemented through visual configuration.
[0030] Optionally, in some embodiments, the above-mentioned event attribute editor may further include a third selection control and a fourth selection control, wherein the third selection control is used to select the trigger event type, and the fourth selection control is used to select the withstand event type.
[0031] Therefore, in the process of configuring the trigger event type for the triggering primitive through the event property editor, the trigger event type can be selected through the third selection control, and the selected trigger event type can be determined as the trigger event type corresponding to the triggering primitive. And in the process of configuring the bearing event type for the bearing primitive through the event property editor, the bearing event type can be selected through the fourth selection control, and the selected bearing event type can be determined as the bearing event type corresponding to the bearing primitive. As a result, the flexibility and accuracy of the configuration of the trigger event type and the bearing event type can be greatly improved, not only supporting the personalized configuration of the trigger event type and the bearing event type, but also greatly improving the configuration efficiency of the trigger event type and the bearing event type, and supporting the improvement of development efficiency.
[0032] That is to say, the above-mentioned determination of the trigger event type corresponding to the triggering element and the bearing event type corresponding to the bearing element through the event attribute editor can be an event screening based on the type of the triggering element - the type of the bearing element. Through event screening, the user can be prompted to select the trigger event type trigger_event_type corresponding to the triggering element, and the bearing event type act_event_type corresponding to the bearing element.
[0033] Optionally, in some embodiments, in order to reduce the coupling of each event and comply with the linear unified binding mechanism of event triggering-bearing, the number of triggering elements can be one, and the number of bearing elements can be multiple. If there are multiple triggering elements, the events corresponding to the multiple triggering elements can be split into multiple independent events. For example, if the event is: based on the values of the first two text boxes, the running status is reflected in the third text box, then the first text box can be set as the triggering element (value change event), the second text box can be set as the bearing element (listening), and then the second text box can be set as the triggering element (value change event), and the third text box can be set as the bearing element (listening). One triggering element corresponds to multiple bearing elements. For example, you can click the start button (triggering element) to control the startup of multiple devices (achieved through multiple independent bearing elements).
[0034] S103: Generate a first executable file corresponding to the triggering primitive according to the type of the triggering primitive and the type of the triggering event, and generate a second executable file corresponding to the sustaining primitive according to the type of the sustaining primitive and the type of the sustaining event.
[0035] Optionally, the first executable file may be, for example, an executable program code file corresponding to a triggering graphic element. When the first executable file is executed, a triggering event corresponding to the triggering graphic element may be implemented. The first executable file may include logic code for implementing the corresponding triggering event, which may also be referred to as logic code for the triggering graphic element.
[0036] Optionally, in some embodiments, the pseudo code of the trigger event may be dynamically added according to the selected trigger cell trigger_cell and the trigger event type trigger_event_type, and the first executable file may be formed based on the pseudo code of the trigger event.
[0037] Optionally, in some embodiments, the first executable file can be, for example, the trigger_code described above. The first executable file can include relevant code blocks (or trigger primitive program code) generated based on user needs to assist in the determination and execution of trigger events. Optionally, in some embodiments, the information transfer involved in the code blocks can uniformly utilize the third-party dependency library mitt for cross-page (component) communication, with actual parameters uniformly passed in the form {oldVal, newVal}. The third-party dependency library mitt is a lightweight event bus library used to implement cross-component communication.
[0038] Optionally, the second executable file may be, for example, an executable program code file corresponding to the bearing primitive. When the second executable file is executed, the bearing event corresponding to the bearing diagram may be implemented. The second executable file may include logic code for implementing the corresponding bearing event, which may also be referred to as the logic code of the bearing primitive.
[0039] Optionally, in some embodiments, a pseudo code of the withstand event may be dynamically added according to the selected withstand cell act_cell and the withstand event type act_event_type, and a second executable file may be formed based on the pseudo code of the withstand event.
[0040] Optionally, in some embodiments, the second executable file may be, for example, the aforementioned act_code. The second executable file may include: relevant code blocks (or referred to as: bearer element program code) generated according to user needs and assisting in the determination and execution of the bearer event.
[0041] Optionally, in some embodiments, the first executable file and / or the second executable file may be dynamically added. Furthermore, after the first executable file and / or the second executable file are dynamically added, if the component containing the triggering primitive is uninstalled, the first executable file and / or the second executable file may be dynamically uninstalled.
[0042] S104: Generate an event attribute object according to the type of the triggering graphic element, the type of the triggering event, the first executable file, the type of the receiving graphic element, the type of the receiving event, and the second executable file.
[0043] After the triggering primitive type, the triggering event type, the first executable file, the receiving primitive type, the receiving event type and the second executable file are determined, an event attribute object may be generated based on the foregoing contents.
[0044] Alternatively, in some embodiments, an event attribute object may refer to a special object that encapsulates event-related data and functions. An event attribute object may also be referred to as an event attribute instance object.
[0045] Optionally, in some embodiments, the aforementioned triggering primitive type, triggering event type, first executable file, receiving primitive type, receiving event type and second executable file can be encapsulated through a predefined event attribute structure to obtain an event attribute object, or the aforementioned various contents can be processed using artificial intelligence to obtain an event attribute object; or any other possible method can be used to process the aforementioned various contents to obtain an event attribute object, and there is no limitation on this.
[0046] In this embodiment, a triggering primitive and a receiving primitive are determined, and based on the type of the triggering primitive, a triggering event type corresponding to the triggering primitive is determined, based on the type of the receiving primitive, a receiving event type corresponding to the receiving primitive is determined, a first executable file corresponding to the triggering primitive is generated based on the type of the triggering primitive and the triggering event type, a second executable file corresponding to the receiving primitive is generated based on the type of the receiving primitive and the receiving event type, and an event attribute object is generated based on the type of the triggering primitive, the triggering event type, the first executable file, the type of the receiving primitive, the receiving event type, and the second executable file. Since the event attributes of the primitives are uniformly managed in the form of event attribute objects, the primitives and event attributes can be decoupled, thereby improving the configuration efficiency of the event attributes of the primitives.
[0047] Optionally, in some embodiments, the triggering primitive program code in a first executable file corresponding to the triggering primitive can be encapsulated and parsed, and the sustaining primitive program code in a second executable file corresponding to the sustaining primitive can be encapsulated and parsed. This can support subsequent development processes related to the triggering primitive and the sustaining primitive, and can greatly improve development efficiency.
[0048] For example, the encapsulation and parsing of the triggering element program code (such as the operation function) are described as follows: For the encapsulation of the triggering element program code: the operation function can be directly mounted to the triggering element through the value of trigger_event_type, and the internal judgment and specific execution-related code of the operation function can be dynamically encapsulated, and the encapsulation can be in the form of a string. Among them, the incoming parameters need to be uniformly named, and the naming format can be, for example, params1, params2, and so on. For the parsing of the triggering element program code: it can be directly parsed through the Web-side Function class, and the incoming actual parameter format of the constructor can be: new Function ('params1', 'params2', ..., '${trigger_code}'), and the returned object is the executable function (another optional example of the first executable file mentioned above).
[0049] For example, the following instructions describe how to encapsulate and parse the code for a cell: To encapsulate the code for a cell, first dynamically construct a mitt event listener in the initialization function of the page (component) containing the cell act_cell. Then, using the parameters passed in trigger_code, construct the executable function functionA, which can be directly stored as a string in act_code. To parse the code for a cell, first determine its specificity based on act_event_type, then encapsulate the function using new Function.
[0050] Figure 3 It is a flowchart of a method for decoupling and binding attributes of graphic element events on the Web side proposed in another embodiment of the present disclosure.
[0051] like Figure 3 As shown, the Web-side primitive event attribute decoupling and binding method includes: S301: Determine the triggering element and the receiving element.
[0052] S302: Determine the type of triggering event corresponding to the triggering primitive according to the type of the triggering primitive, and determine the type of bearing event corresponding to the bearing primitive according to the type of the bearing primitive.
[0053] S303: Generate a first executable file corresponding to the triggering primitive according to the type of the triggering primitive and the type of the triggering event, and generate a second executable file corresponding to the sustaining primitive according to the type of the sustaining primitive and the type of the sustaining event.
[0054] S304: Generate an event attribute object according to the type of the triggering graphic element, the type of the triggering event, the first executable file, the type of the receiving graphic element, the type of the receiving event, and the second executable file.
[0055] For the description of S301 - S304 , please refer to the above embodiment for details, which will not be repeated here.
[0056] S305: Determine description information related to the triggering element and the receiving element, wherein the description information includes at least one of the following: coding information, name information, sub-description information, and remark information.
[0057] Optionally, in some embodiments, the coding information may be, for example, the unique coding ID mentioned above. The name information may be, for example, the name mentioned above. The sub-description information may be, for example, the “description” mentioned above. The remark information may be, for example, the “remark” mentioned above.
[0058] Optionally, in some embodiments, in the process of determining the descriptive information related to the triggering element and the bearing element, the coding information related to the triggering element and the bearing element may be obtained from the server, and the name information input by the user may be obtained through the first interface in the event attribute editor, wherein the first interface is used to obtain the name information, the sub-descriptive information input by the user may be obtained through the second interface in the event attribute editor, wherein the second interface is used to obtain the sub-descriptive information, and the remark information input by the user may be obtained through the third interface in the event attribute editor, wherein the third interface is used to obtain the remark information. In this way, the descriptive information related to the triggering element and the bearing element can be accurately obtained, and personalized configuration of the descriptive information can be supported, so that the generated event attribute object can meet the needs of personalized development scenarios.
[0059] S306: Associate the description information with the event attribute object.
[0060] Optionally, in some embodiments, after determining the description information related to the triggering element and the receiving element, the description information and the event attribute object may be associated, that is, an association relationship between the description information and the event attribute object may be established.
[0061] S307: The description information and event attribute object are stored in a table of the database through the gateway interface with the database.
[0062] Optionally, in some embodiments, the gateway interface may be, for example, the above Figure 2 After associating the description information with the event attribute object, the description information and the event attribute object may be associated and stored in a table in a database.
[0063] Optionally, in some embodiments, when a trigger instruction is received, an event attribute editor is started, wherein the trigger instruction is used to select descriptive information from a table or select an event attribute object, and the triggering element, the bearing element, the triggering event type, and the bearing event type are displayed in the display area of the event attribute editor.
[0064] For example, in the event attribute editor, when the user decides to create an event attribute object, a piece of data will be stored in the backend event attribute table (an optional example of the "database table" mentioned above) (the stored data includes: description information, and the event attribute object associated with the description information). At the same time, it supports launching the event attribute editor through the stored data. After the event attribute editor is launched, the graphics elements and / or events of the event attribute object can be previewed, edited, and saved. Since the data format of event attributes is fixed, it can effectively support batch import, export, and data sharing of event attribute objects, and support cross-platform and cross-device data management.
[0065] In this embodiment, a triggering primitive and a receiving primitive are determined, and based on the type of the triggering primitive, a triggering event type corresponding to the triggering primitive is determined, based on the type of the receiving primitive, a receiving event type corresponding to the receiving primitive is determined, based on the type of the triggering primitive and the triggering event type, a first executable file corresponding to the triggering primitive is generated, based on the type of the receiving primitive and the receiving event type, a second executable file corresponding to the receiving primitive is generated, and based on the type of the triggering primitive, the triggering event type, the first executable file, the type of the receiving primitive, the receiving event type, and the second executable file, an event attribute object is generated. Since the event attributes of the primitives are uniformly managed in the form of event attribute objects, the primitives and event attributes can be decoupled, thereby improving the configuration efficiency of the primitives' event attributes. In this disclosed embodiment, the decoupling of primitives and events is supported, and events can be reused by different primitives. Moreover, by independently storing event attribute objects, the reuse rate of event attribute objects can be greatly improved. Furthermore, a single event can be bound to multiple different primitives, thereby effectively reducing the time required for repeated event configuration and saving time costs. Furthermore, the visual configuration and real-time preview of event attribute objects can support event configuration for complex businesses, greatly improving the efficiency of business function development and reducing development time. Furthermore, through a unified event attribute management mechanism, repetitive development workload can be effectively reduced, improving the efficiency of team collaborative development.
[0066] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0067] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0068] It should be noted that, in the description of this disclosure, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, in the description of this disclosure, unless otherwise specified, "plurality" means two or more.
[0069] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.
[0070] It should be understood that various parts of the present disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
[0071] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0072] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
[0073] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0074] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0075] Although the embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are illustrative and are not to be construed as limitations on the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.
Claims
1. A method for decoupling and binding attributes of graphic element events on a Web side, characterized in that: include: Determine the triggering element and the receiving element; Determining the type of triggering event corresponding to the triggering primitive according to the type of the triggering primitive, and determining the type of bearing event corresponding to the bearing primitive according to the type of the bearing primitive; Generate a first executable file corresponding to the triggering primitive according to the type of the triggering primitive and the type of the triggering event, and generate a second executable file corresponding to the sustaining primitive according to the type of the sustaining primitive and the type of the sustaining event; An event attribute object is generated according to the type of the triggering primitive, the type of the triggering event, the first executable file, the type of the receiving primitive, the type of the receiving event, and the second executable file.
2. The method according to claim 1, wherein The determining of the triggering primitive and the bearing primitive includes: An event attribute editor is provided, wherein the event attribute editor comprises at least a first selection control and a second selection control, the first selection control is used to select the triggering element, and the second selection control is used to select the receiving element; The triggering element is selected through the first selection control, and the bearing element is selected through the second selection control.
3. The method according to claim 2, wherein The event attribute editor further includes: a display area; the method further includes: The triggering graphic element, the receiving graphic element, the triggering event type, and the receiving event type are dynamically displayed in the display area.
4. The method according to claim 2, wherein The event attribute editor further includes a third selection control and a fourth selection control, wherein the third selection control is used to select the trigger event type, and the fourth selection control is used to select the withstand event type; The step of determining the trigger event type corresponding to the triggering primitive according to the type of the triggering primitive, and determining the bearing event type corresponding to the bearing primitive according to the type of the bearing primitive includes: Selecting a trigger event type through the third selection control, and determining the selected trigger event type as the trigger event type corresponding to the trigger primitive; A bearing event type is selected through the fourth selection control, and the selected bearing event type is determined as the bearing event type corresponding to the bearing graphic element.
5. The method according to claim 2, wherein The method further comprises: Determining description information related to the triggering element and the receiving element, wherein the description information includes at least one of the following: coding information, name information, sub-description information, and remark information; Associating the description information with the event attribute object; The description information and the event attribute object are stored in a table of the database through a gateway interface with the database.
6. The method according to claim 5, wherein The method further comprises: In case of receiving a trigger instruction, starting the event attribute editor, wherein the trigger instruction is used to select the description information or the event attribute object from the table; The triggering graphic element, the receiving graphic element, the triggering event type, and the receiving event type are displayed in the display area of the event attribute editor.
7. The method according to claim 5, wherein The determining of description information related to the triggering primitive and the receiving primitive includes: Obtaining coding information related to the triggering graphic element and the receiving graphic element from a server; Acquire the name information input by the user through a first interface in the event attribute editor, wherein the first interface is used to acquire the name information; Acquire the sub-description information input by the user through a second interface in the event attribute editor, wherein the second interface is used to acquire the sub-description information; The remark information input by the user is obtained through a third interface in the event attribute editor, wherein the third interface is used to obtain the remark information.
8. The method according to claim 1, wherein The method further comprises: Encapsulating and parsing the triggering graphic element program code in the first executable file corresponding to the triggering graphic element; The receiving graphic element program code in the second executable file corresponding to the receiving graphic element is encapsulated and parsed.
Citation Information
Patent Citations
UI control generating and triggering method and terminal
CN113590001A
View generation method and related equipment
CN114281335A
Configuration type report development method and system
CN116956843A
Event processing method and device, electronic equipment, chip and medium
CN117539454A
Custom textual domain specific language describing an HMI application
US20240345809A1