A method, device, computer equipment and storage medium for component linkage configuration
By obtaining and configuring the component's demand data and processing its attributes and events, the constraint problem in component configuration in the existing technology is solved, the open and intelligent configuration of the component is realized, and the effect is displayed instantly based on the configuration.
Patent Information
- Application Number
- CN202011499476.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-12-17
AI Technical Summary
The existing visualization construction platform lacks an open component construction method, which makes the complexity of component properties and events difficult to handle, resulting in constraint issues in component configuration.
By obtaining the demand data of the component to be configured, create multiple attributes and events, generate attribute data and event data, configure the linkage configuration data between attributes, use preset rule matching to obtain effective associated data, and perform linkage rendering to generate the target component. .
It solves the problem of constraints between attributes and attributes and between attributes and events in component configuration, realizes the open and intelligent configuration capabilities of components, and instantly displays effects based on the configuration.
Smart Images

Figure CN112487112B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of configuration technology, and in particular to a method, device, computer equipment and storage medium for component linkage configuration. Background Art
[0002] In the current visualization building platform, the building components provided are basically customized development, lacking open component building. The difficulty of open component building lies in the complexity of component attributes and events. The attributes of a component can be combined in any way, and the values assigned to the attributes will result in different associated attributes and events, so it is necessary to handle the constraints between different attribute events and the linkage constraints between infinite levels.
[0003] Therefore, it is urgent to propose a new component linkage configuration method to solve the above problems. Summary of the invention
[0004] In order to solve the problems of the prior art, an embodiment of the present invention provides a method, apparatus, computer device and storage medium for component linkage configuration to overcome the problems of constraints between attributes and attributes in component configuration and constraints between attributes and events in the prior art.
[0005] In order to solve one or more of the above technical problems, the technical solution adopted by the present invention is:
[0006] In a first aspect, a method for component linkage configuration is provided, the method comprising the following steps:
[0007] Acquire demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data;
[0008] Configure linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships;
[0009] Matching the linkage configuration data with the attribute data according to preset rules to obtain valid association data;
[0010] Calculate and obtain the associated data object to be processed according to the valid associated data and the linkage data;
[0011] The associated data objects to be processed are linked and rendered using a preset rendering mechanism to generate a target component.
[0012] Further, configuring linkage configuration data among the multiple attributes according to the demand data includes:
[0013] The linkage data between the multiple attributes are configured according to the demand data, and the linkage relationship between the multiple attributes is determined according to the linkage data.
[0014] Furthermore, matching the linkage configuration data with the attribute data according to a preset rule to obtain valid association data includes:
[0015] Acquire a data type of the linkage configuration data, and match a corresponding target preset rule from the preset rules according to the data type;
[0016] The linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid association data.
[0017] Furthermore, the data types include single element type and list element type.
[0018] Further, when the data type is a list element type, matching the linkage configuration data with the attribute data according to the target preset rule to obtain valid associated data includes:
[0019] After converting the attribute fields in the linkage configuration data from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, the converted linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid associated data.
[0020] Furthermore, the method further comprises:
[0021] An event of the component to be configured is created according to the demand data, and event data of the event and a binding relationship between the event and corresponding attributes are configured according to the attribute data.
[0022] Furthermore, the method further comprises:
[0023] The event configuration information associated with the attribute is determined according to the attribute data, the event data, and the binding relationship, and the event is rendered according to the event configuration information.
[0024] In a second aspect, a device is provided, the device comprising:
[0025] The attribute creation module is used to obtain the requirement data of the component to be configured, create multiple attributes of the component to be configured according to the requirement data, and generate attribute data;
[0026] A linkage configuration module, configured to configure linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships;
[0027] A data matching module, used to match the linkage configuration data with the attribute data according to preset rules to obtain valid associated data;
[0028] An object acquisition module, used for calculating and acquiring the associated data object to be processed according to the valid associated data and the linkage data;
[0029] The linkage rendering module is used to perform linkage rendering on the associated data objects to be processed by using a preset rendering mechanism to generate a target component.
[0030] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0031] Acquire demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data;
[0032] Configure linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships;
[0033] Matching the linkage configuration data with the attribute data according to preset rules to obtain valid association data;
[0034] Calculate and obtain the associated data object to be processed according to the valid associated data and the linkage data;
[0035] The associated data objects to be processed are linked and rendered using a preset rendering mechanism to generate a target component.
[0036] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Acquire demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data;
[0038] Configure linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships;
[0039] Matching the linkage configuration data with the attribute data according to preset rules to obtain valid association data;
[0040] Calculate and obtain the associated data object to be processed according to the valid associated data and the linkage data;
[0041] The associated data objects to be processed are linked and rendered using a preset rendering mechanism to generate a target component.
[0042] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0043] The component linkage configuration method, device, computer equipment and storage medium provided by the embodiments of the present invention obtain demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data, configure the linkage configuration data between the multiple attributes according to the demand data, the linkage configuration data includes linkage data and linkage relationship, match the linkage configuration data with the attribute data according to preset rules to obtain valid association data, calculate and obtain the association data object to be processed according to the valid association data and the linkage data, and use the preset rendering mechanism to perform linkage rendering on the association data object to be processed to generate a target component, thereby solving the constraints between attributes and attributes and between attributes and events in component configuration, thereby realizing the configuration capability that the component itself can provide, and instantly displaying the configuration effect based on the configuration and the component itself, so as to make the auxiliary application product more open and intelligent. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 is an architectural diagram of a component configuration system according to an exemplary embodiment;
[0046] Figure 2 is a schematic diagram of a component configuration process according to an exemplary embodiment;
[0047] Figure 3 is a schematic diagram of a component rendering process according to an exemplary embodiment;
[0048] Figure 4 is a flowchart of a method for configuring component linkage according to an exemplary embodiment;
[0049] Figure 5 is a structural diagram of a device for component linkage configuration according to an exemplary embodiment;
[0050] Figure 6 The figure is a schematic diagram showing the internal structure of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0052] As described in the background technology, due to factors such as component attributes and event complexity in open component construction, the component construction functions provided by some visualization construction platforms in the existing technology generally support customized development and cannot support open component construction.
[0053] To solve the above problems, the embodiment of the present invention creatively proposes a method for component linkage configuration. This method combines the individuality and commonality of each technology stack, loads components, treats components as independent modules, configures and renders linkage input data into them, thereby adapting to components output by different technology stacks, and realizes the configuration linkage of inherent attributes such as attributes, events, slots, etc. of components in multiple forms and dimensions, thereby presenting a tightly integrated attribute and event configuration to users. The system architecture for implementing the above method is as follows: Figure 1 As shown, it is mainly composed of an application layer, a logic layer and basic support, wherein the application layer includes a configuration end and a rendering end, which are used to provide users with component configuration and rendering; the logic layer includes data and a processor, which are used to store and process related data; the basic support includes data types and control types, which are used to define the data types and control types supported by the system.
[0054] Embodiment 1
[0055] Specifically, the above system mainly includes the following two parts when executing the component linkage configuration method:
[0056] 1. Component Configuration
[0057] Specifically, Figure 2As shown, first, multiple attributes are created on the configuration end according to the needs of the user, and the attribute data is stored in a preset format. As a preferred example, it can be stored in JSON format. Then the linkage between the configuration attributes, that is, the linkage configuration data between the configuration attributes, is also stored in a preset format. As a preferred example, the linkage configuration data can be stored in JSON Schema format. Among them, the linkage configuration data includes linkage data and linkage relationship. During specific implementation, the linkage data can be divided into simple structures (including but not limited to numerical values, strings, Boolean values, etc.) and complex structures (including but not limited to objects, arrays, etc.) in terms of data types according to the attributes and their control types, and the linkage relationship can be divided into string matching, numerical interval matching, Boolean matching, etc. It should be noted here that in the embodiment of the present invention, based on the JavaScript data type, the binding force of the configuration linkage under different data types can be realized in combination with the JSON schema specification. In order to improve the execution efficiency of the matching algorithm in the future, the attributes can be converted from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes.
[0058] If the components to be configured in the user's requirements also include events, it is also necessary to create events, and configure the binding relationship between each event and the corresponding attribute and the event data of each event according to the stored attribute data, and store the binding relationship and event data in a preset format. As a preferred example, the binding relationship and event data can also be stored in JSON format.
[0059] 2. Component Rendering
[0060] Specifically, refer to Figure 3 As shown, in the embodiment of the present invention, component rendering takes into account the page rendering performance issue and reduces the thread occupancy waste caused by triggering multiple component renderings due to sequential data processing. Therefore, it will first process the linkage data matching problem, and finally output the intersection of the data to render the component.
[0061] In specific implementation, the rendering end first parses the configuration data structure obtained from the configuration end, and separates at least three pieces of data from the configuration data structure: attribute data, event data, and linkage configuration data.
[0062] First, match the linkage configuration data with the attribute data according to the preset rules to obtain valid associated data. In order to improve the execution efficiency of the matching algorithm, the linkage configuration data can be divided into a single element type (such as data that is a numerical value, a string, a Boolean value, an object that cannot add elements) and a list element type (such as an object that can add elements, an array object, etc.) according to the element data type in the linkage configuration data list. Different matching rules are set for different types of linkage configuration data. As a preferred example, for linkage configuration data of a single element type, it can be directly matched with the attribute data value to output valid associated data. For linkage configuration data of the list element type, it is necessary to first convert the attributes from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, that is, convert its attribute fields from multi-dimensional to one-dimensional, and then recursively process each element value, match according to the attribute data value to output valid associated data.
[0063] Specifically, since the attribute data configured by the configuration end in the embodiment of the present invention is a tree structure with infinite levels, the technical processing of this data has a high time complexity and requires recursive level search, which is inefficient. Therefore, by converting it from a multi-dimensional to a one-dimensional array (that is, all attributes are at the same level), the data object can be quickly searched and processed. In the specific implementation, since the multi-dimensional array implements the hierarchical relationship based on the children field in each attribute object data, and each attribute has a corresponding key at its current level, a temporary index field is added to each attribute object through children and key recursion once, which firstly ensures the uniqueness of each attribute object, and secondly, the field can be used to quickly locate its position in the multi-dimensional array for convenient logical processing.
[0064] The following example illustrates the process of matching list element type linkage configuration data with the attribute data according to preset rules to obtain valid associated data:
[0065] Assume that component attribute A is a numeric value, attribute B is a Boolean value, and attribute C is a string. The configured linkage data is that when the value of attribute A is equal to 0, the content of attribute C is cleared, and when the value of attribute B is false, the configuration control of attribute C is hidden and the value of attribute C is removed. Through the attribute value data matching, the value of A is 0 and the value of B is false. The intersection of the two is taken and the configuration control of attribute C is hidden and the value of C is removed according to the weight.
[0066] Finally, the associated data objects to be processed are distributed to each of their corresponding attribute controls, and attribute linkage rendering is achieved through the rendering mechanism.
[0067] For components that contain events, event logic processing is also required. In specific implementation, the attribute data and event data obtained through analysis are combined, and the event data is used as the starting point. The value of the attribute is matched according to the attribute bound to the event (including attributes with array or object data types), and finally the associated event configuration list information is output. The event configuration is rendered through the event configuration list information, and the event code can be output based on the combination of event template, slot, event type, etc.
[0068] Embodiment 2
[0069] Figure 4 is a flowchart of a method for configuring component linkage according to an exemplary embodiment, referring to Figure 4 As shown, the method comprises the following steps:
[0070] S1: Obtaining requirement data of a component to be configured, creating multiple attributes of the component to be configured according to the requirement data, and generating attribute data.
[0071] Specifically, in the embodiment of the present invention, the components to be configured include but are not limited to pages, etc. A plurality of attributes are pre-created according to the required data proposed by the user, and corresponding attribute data are generated, wherein the attributes are divided into string, numerical value, Boolean value, object, array, etc. according to the data type, and the generated attribute data has different data structures according to different data types, for example, the array also includes corresponding list data and default values, etc. The attribute data is stored in a preset format, such as JSON format, for subsequent loading and use.
[0072] S2: configuring linkage configuration data among the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships.
[0073] Specifically, after creating the attributes, the linkage configuration data between the attributes needs to be configured according to the user's demand data. The linkage configuration data includes linkage data and linkage relationships. The linkage data includes but is not limited to the optional values of the configured attributes. When the value assigned to an attribute changes between attributes with linkage relationships, the values of other attributes and events associated with the attribute will also change accordingly.
[0074] S3: Match the linkage configuration data with the attribute data according to preset rules to obtain valid association data.
[0075] Specifically, when rendering, the configuration data obtained from the configuration end is first parsed by the rendering end to extract attribute data, linkage configuration data, etc. If the component includes an event, the event data must also be extracted. Then the linkage configuration data is matched with the attribute data according to the preset rules to obtain valid associated data. It should be noted here that in the embodiment of the present invention, a component may have a lot of associated data configured, and in the rendering process, the actual attribute data and event data are combined, and the data that actually triggers the associated conditions is called valid associated data. For example, in the associated data and association relationship configured by attribute A, attribute B is hidden when the value is true, and attribute C is hidden when the value is false. At this time, the value of A in the actual attribute data is false, and the hidden attribute C when false is valid associated data.
[0076] S4: Calculate and obtain the associated data object to be processed according to the valid associated data and the linkage data.
[0077] Specifically, after obtaining valid associated data, the key in the associated data is assigned a value in combination with the type of the associated attribute and the hierarchical relationship with the associated attribute. If the associated data includes an event, the associated data object corresponding to the event is extracted in combination with the event data. Finally, these associated data objects are injected into the corresponding attributes in the attribute configuration data and the corresponding events in the event data.
[0078] S5: Utilize a preset rendering mechanism to perform linkage rendering on the associated data objects to be processed to generate a target component.
[0079] As a preferred implementation, in an embodiment of the present invention, configuring linkage configuration data between the multiple attributes according to the demand data includes:
[0080] The linkage data between the multiple attributes are configured according to the demand data, and the linkage relationship between the multiple attributes is determined according to the linkage data.
[0081] As a preferred implementation manner, in an embodiment of the present invention, matching the linkage configuration data with the attribute data according to a preset rule to obtain valid association data includes:
[0082] Acquire a data type of the linkage configuration data, and match a corresponding target preset rule from the preset rules according to the data type;
[0083] The linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid association data.
[0084] As a preferred implementation, in the embodiment of the present invention, the data type includes a single element type and a list element type.
[0085] As a preferred implementation, in an embodiment of the present invention, when the data type is a list element type, matching the linkage configuration data with the attribute data according to the target preset rule to obtain valid associated data includes:
[0086] After converting the attribute fields in the linkage configuration data from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, the converted linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid associated data.
[0087] As a preferred implementation, in an embodiment of the present invention, the method further includes:
[0088] An event of the component to be configured is created according to the demand data, and event data of the event and a binding relationship between the event and corresponding attributes are configured according to the attribute data.
[0089] As a preferred implementation, in an embodiment of the present invention, the method further includes:
[0090] The event configuration information associated with the attribute is determined according to the attribute data, the event data, and the binding relationship, and the event is rendered according to the event configuration information.
[0091] As a preferred implementation, in an embodiment of the present invention, the method further includes:
[0092] The attribute value of the attribute is monitored, and if the attribute value changes, the rendering data is re-output according to the corresponding data, and the component is reloaded.
[0093] Embodiment 3
[0094] Figure 5 is a schematic diagram of the structure of a user portrait construction device according to an exemplary embodiment, the device comprising:
[0095] The attribute creation module is used to obtain the requirement data of the component to be configured, create multiple attributes of the component to be configured according to the requirement data, and generate attribute data;
[0096] A linkage configuration module, configured to configure linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships;
[0097] A data matching module, used to match the linkage configuration data with the attribute data according to preset rules to obtain valid associated data;
[0098] An object acquisition module, used for calculating and acquiring the associated data object to be processed according to the valid associated data and the linkage data;
[0099] The linkage rendering module is used to perform linkage rendering on the associated data objects to be processed by using a preset rendering mechanism to generate a target component.
[0100] As a preferred implementation, in the embodiment of the present invention, the linkage configuration module is specifically used for:
[0101] The linkage data between the multiple attributes are configured according to the demand data, and the linkage relationship between the multiple attributes is determined according to the linkage data.
[0102] As a preferred implementation, in the embodiment of the present invention, the data matching module is specifically used for:
[0103] Acquire a data type of the linkage configuration data, and match a corresponding target preset rule from the preset rules according to the data type;
[0104] The linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid association data.
[0105] As a preferred implementation, in the embodiment of the present invention, the data type includes a single element type and a list element type.
[0106] As a preferred implementation, in the embodiment of the present invention, the data matching module is further used for:
[0107] After converting the attribute fields in the linkage configuration data from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, the converted linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid associated data.
[0108] As a preferred implementation, in the embodiment of the present invention, the device further includes:
[0109] An event creation module is used to create an event of the component to be configured according to the demand data, and configure event data of the event and a binding relationship between the event and corresponding attributes according to the attribute data.
[0110] As a preferred implementation, in the embodiment of the present invention, the device further includes:
[0111] An event rendering module is used to determine event configuration information associated with the attribute according to the attribute data, the event data and the binding relationship, and render the event according to the event configuration information.
[0112] Figure 6 is a schematic diagram of the internal structure of a computer device according to an exemplary embodiment. Figure 6 As shown, the computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an optimization method for an execution plan is implemented.
[0113] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] As a preferred implementation, in an embodiment of the present invention, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0115] Acquire demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data;
[0116] Configure linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships;
[0117] Matching the linkage configuration data with the attribute data according to preset rules to obtain valid association data;
[0118] Calculate and obtain the associated data object to be processed according to the valid associated data and the linkage data;
[0119] The associated data objects to be processed are linked and rendered using a preset rendering mechanism to generate a target component.
[0120] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
[0121] The linkage data between the multiple attributes are configured according to the demand data, and the linkage relationship between the multiple attributes is determined according to the linkage data.
[0122] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
[0123] Acquire a data type of the linkage configuration data, and match a corresponding target preset rule from the preset rules according to the data type;
[0124] The linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid association data.
[0125] As a preferred implementation, in the embodiment of the present invention, the data type includes a single element type and a list element type.
[0126] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
[0127] After converting the attribute fields in the linkage configuration data from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, the converted linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid associated data.
[0128] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
[0129] An event of the component to be configured is created according to the demand data, and event data of the event and a binding relationship between the event and corresponding attributes are configured according to the attribute data.
[0130] As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
[0131] The event configuration information associated with the attribute is determined according to the attribute data, the event data, and the binding relationship, and the event is rendered according to the event configuration information.
[0132] In an embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0133] Acquire demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data;
[0134] Configure linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships;
[0135] Matching the linkage configuration data with the attribute data according to preset rules to obtain valid association data;
[0136] Calculate and obtain the associated data object to be processed according to the valid associated data and the linkage data;
[0137] The associated data objects to be processed are linked and rendered using a preset rendering mechanism to generate a target component.
[0138] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
[0139] The linkage data between the multiple attributes are configured according to the demand data, and the linkage relationship between the multiple attributes is determined according to the linkage data.
[0140] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
[0141] Acquire a data type of the linkage configuration data, and match a corresponding target preset rule from the preset rules according to the data type;
[0142] The linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid association data.
[0143] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
[0144] After converting the attribute fields in the linkage configuration data from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, the converted linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid associated data.
[0145] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
[0146] An event of the component to be configured is created according to the demand data, and event data of the event and a binding relationship between the event and corresponding attributes are configured according to the attribute data.
[0147] As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
[0148] The event configuration information associated with the attribute is determined according to the attribute data, the event data, and the binding relationship, and the event is rendered according to the event configuration information.
[0149] In summary, the technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0150] The component linkage configuration method, device, computer equipment and storage medium provided by the embodiments of the present invention obtain demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data, configure the linkage configuration data between the multiple attributes according to the demand data, the linkage configuration data includes linkage data and linkage relationship, match the linkage configuration data with the attribute data according to preset rules to obtain valid association data, calculate and obtain the association data object to be processed according to the valid association data and the linkage data, and use the preset rendering mechanism to perform linkage rendering on the association data object to be processed to generate a target component, thereby solving the constraints between attributes and attributes and between attributes and events in component configuration, thereby realizing the configuration capability that the component itself can provide, and instantly displaying the configuration effect based on the configuration and the component itself, so as to make the auxiliary application product more open and intelligent.
[0151] It should be noted that: the device for component linkage configuration provided in the above embodiment only uses the division of the above functional modules as an example when triggering the configuration service. In actual applications, the above functional allocation can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for component linkage configuration provided in the above embodiment and the method embodiment of component linkage configuration belong to the same concept, that is, the device is based on the method of component linkage configuration. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0152] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0153] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for component linkage configuration, characterized in that: The method comprises the following steps: Acquire demand data of the component to be configured, create multiple attributes of the component to be configured according to the demand data, and generate attribute data; According to the demand data, the linkage configuration data between the multiple attributes are configured, and the linkage configuration data includes linkage data and linkage relationship; according to the attribute and its control type, the linkage data is divided into a simple structure and a complex structure in terms of data type, the simple structure includes a numerical value, a string, and a Boolean value, and the complex structure includes an object and an array, and the linkage relationship is divided into a string match, a numerical interval match, and a Boolean value match; according to the hierarchical relationship of the attribute, the attribute is converted from multi-dimensional to one-dimensional; Matching the linkage configuration data with the attribute data according to preset rules to obtain valid association data; Calculate and obtain the associated data object to be processed according to the valid associated data and the linkage data; Utilizing a preset rendering mechanism to perform linkage rendering on the associated data objects to be processed to generate a target component; The step of matching the linkage configuration data with the attribute data according to a preset rule to obtain valid associated data includes: obtaining a data type of the linkage configuration data, and matching a corresponding target preset rule from the preset rule according to the data type; matching the linkage configuration data with the attribute data according to the target preset rule to obtain valid associated data; the data type includes a single element type and a list element type; the linkage configuration data of the single element type is a numerical value, a string, a Boolean value, or an object that cannot add elements, and the linkage configuration data of the list element type is an object that can add elements or an array object; When the data type is a list element type, matching the linkage configuration data with the attribute data according to the target preset rules to obtain valid associated data includes: converting the attribute fields in the linkage configuration data from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, and matching the converted linkage configuration data with the attribute data according to the target preset rules to obtain valid associated data.
2. The method for component linkage configuration according to claim 1, characterized in that: Configuring linkage configuration data among the multiple attributes according to the demand data includes: The linkage data between the multiple attributes are configured according to the demand data, and the linkage relationship between the multiple attributes is determined according to the linkage data.
3. The method for component linkage configuration according to claim 1 or 2, characterized in that: The method further comprises: An event of the component to be configured is created according to the demand data, and event data of the event and a binding relationship between the event and corresponding attributes are configured according to the attribute data.
4. The method for component linkage configuration according to claim 3, characterized in that: The method further comprises: The event configuration information associated with the attribute is determined according to the attribute data, the event data, and the binding relationship, and the event is rendered according to the event configuration information.
5. A device for component linkage configuration, characterized in that: The device comprises: The attribute creation module is used to obtain the requirement data of the component to be configured, create multiple attributes of the component to be configured according to the requirement data, and generate attribute data; A linkage configuration module is used to configure the linkage configuration data between the multiple attributes according to the demand data, wherein the linkage configuration data includes linkage data and linkage relationships; according to the attributes and their control types, the linkage data is divided into simple structures and complex structures in terms of data type, wherein the simple structures include numerical values, strings, and Boolean values, and the complex structures include objects and arrays; the linkage relationships are divided into string matching, numerical interval matching, and Boolean matching; and the attributes are converted from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes; A data matching module, used to match the linkage configuration data with the attribute data according to preset rules to obtain valid associated data; An object acquisition module, used for calculating and acquiring the associated data object to be processed according to the valid associated data and the linkage data; A linkage rendering module, used for linkage rendering the associated data objects to be processed by using a preset rendering mechanism to generate a target component; The data matching module is specifically used for: Acquire a data type of the linkage configuration data, and match a corresponding target preset rule from the preset rules according to the data type; Match the linkage configuration data with the attribute data according to the target preset rule to obtain valid associated data; the data types include single element type and list element type; the linkage configuration data of the single element type is a numerical value, a string, a Boolean value, or an object that cannot add elements, and the linkage configuration data of the list element type is an object that can add elements or an array object; After converting the attribute fields in the linkage configuration data from multi-dimensional to one-dimensional according to the hierarchical relationship of the attributes, the converted linkage configuration data is matched with the attribute data according to the target preset rule to obtain valid associated data.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
