A component generation method, device, equipment and storage medium

Through the general description model, the component description file is generated and the interface data characteristics are matched, the component generation logic is simplified, and the problem of low component generation efficiency in the prior art is solved, and efficient component display is achieved.

CN114925256BActive Publication Date: 2024-12-31GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210617256.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2024-12-31
Estimated Expiration
2042-06-01

AI Technical Summary

Technical Problem

The existing component generation method requires a large number of complex logical judgment steps in the component generation node, resulting in low component generation efficiency.

Method used

By using a general description model to generate a description file for each type of component and matching the data characteristics of the interface data with these description files, an effective description file is determined to generate components for presentation, simplifying judgment logic and improving generation efficiency.

Benefits of technology

The component generation node simplifies the relevant judgment logic, improves the component generation efficiency, and can effectively display interface data according to the target display format.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925256B_ABST
    Figure CN114925256B_ABST
Patent Text Reader

Abstract

The present application provides a component generation method, device, equipment and storage medium, the component generation method comprising: after receiving the requested interface data, generating a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model; matching the data characteristics of the interface data with the description file of each type of component, and determining a valid description file including parameter values ​​that match the data characteristics; generating a valid component for displaying the interface data according to the valid description file, the valid component being used to display the interface data in a target display format. In this way, the present application can simplify the relevant judgment logic at the component generation node and improve the component generation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a component generation method, device, equipment and storage medium. Background Art

[0002] In common information applications, the data structure in the information flow is relatively complex, and the data information in the information flow is displayed in a variety of forms on the application interface, such as graphic and text display, video display, and voice display.

[0003] At present, when displaying information, it is necessary to first parse the interface data received by the client, and then determine the components that need to be generated for each type of data based on various judgment factors such as data type, data usage, and data display scenario obtained during the parsing process, so as to realize the data display function of the interface data based on the generated components. Here, when determining the components that need to be generated, since different types of judgment factors correspond to multiple different combinations, and different combinations correspond to different component generation logics, the existing component generation method requires a large number of complex logical judgment steps at the component generation node, resulting in low component generation efficiency. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a component generation method, apparatus, device and storage medium to simplify the relevant judgment logic at the component generation node and improve the component generation efficiency.

[0005] In a first aspect, an embodiment of the present application provides a component generation method, the component generation method comprising:

[0006] After receiving the requested interface data, a description file for each type of component is generated according to parameter values ​​of multiple description parameters under different types of components in the general description model;

[0007] Matching the data characteristics of the interface data with the description files of each type of component, and determining a valid description file including parameter values ​​that match the data characteristics;

[0008] An effective component for displaying the interface data is generated according to the effective description file, and the effective component is used to display the interface data according to a target display format.

[0009] In an optional implementation, the component generation method further includes:

[0010] In response to a first display requirement for the interface data, determining a data display format that meets the first display requirement as a first display format;

[0011] When it is detected that an unknown type component needs to be generated for displaying the interface data according to the first display format, a first description file required for generating the unknown type component is determined according to the parameter values ​​of the plurality of description parameters under the unknown type component; wherein the unknown type component is used to characterize a type component that does not exist in the general description model;

[0012] Determine, according to the identification position of component identifications identifying different component types in the general description model, a first identification position of a newly added first component identification in the general description model; wherein the first component identification is used to identify the unknown type component;

[0013] The first component identifier is added at the first identifier position, and parameter values ​​of various description parameters required to generate the first description file are stored in the first parameter storage area where the first component identifier is located.

[0014] In an optional implementation, the component generation method further includes:

[0015] In response to a second display requirement for the interface data, determining a data display format that meets the second display requirement as a second display format;

[0016] When it is detected that a known type component needs to be generated for displaying the interface data according to the second display format, a second description file required for generating the known type component is determined according to the parameter values ​​of the plurality of description parameters under the known type component; wherein the known type component is used to characterize the type component existing in the general description model;

[0017] When it is detected that there is a matching difference between the parameter value of the target description parameter in the second description file and the second display format, determining the second parameter storage area of ​​the second component identifier in the general description model according to the identification position of the second component identifier in the general description model; wherein the second component identifier is used to identify the known type component; and the target description parameter belongs to the multiple description parameters;

[0018] In the second parameter storage area, the parameter value of the target description parameter under the known type component is corrected according to the matching difference.

[0019] In an optional implementation, the general description model is created by the following method:

[0020] According to the interface application scenario of the request, determine all types of components involved in displaying data in the interface application scenario;

[0021] According to the data display requirements in the interface application scenario, determine the description parameters corresponding to each type of component when meeting the data display requirements and the parameter value of each description parameter;

[0022] The general description model is created according to the component identifier of each type of component in all types of components, the description parameters corresponding to each type of component when satisfying the data display requirements, and the parameter value of each description parameter.

[0023] In an optional implementation, matching the data features of the interface data with the description file of each type of component to determine a valid description file including parameter values ​​that match the data features includes:

[0024] For the description file of each type of component, when it is detected that the interface data contains first target sub-data whose data type matches the component of the type, the description file is determined to be the first description file;

[0025] According to the data usage and data content of the first target sub-data, detecting whether the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file;

[0026] When it is detected that the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file, the first description file is determined as the valid description file.

[0027] In an optional implementation, after receiving the requested interface data, the component generation method further includes:

[0028] Parsing the interface data to determine the data type contained in the interface data;

[0029] Splitting the interface data according to the data type contained in the interface data to obtain multiple groups of sub-data belonging to the same data type;

[0030] A data calling interface is created for each group of sub-data, so as to call and manage the group of sub-data through the data calling interface.

[0031] In an optional implementation, matching the data features of the interface data with the description file of each type of component includes:

[0032] For the description file of each type of component, determine the data type matching the component of this type as the target data type;

[0033] Determine, from the data calling interfaces corresponding to each group of sub-data, a target data calling interface corresponding to the second target sub-data belonging to the target data type;

[0034] The data usage and data content of the second target sub-data are obtained from the target data calling interface, and the data usage and data content of the second target sub-data are matched with the description file of the component of this type.

[0035] In a second aspect, an embodiment of the present application provides a component generation device, the component generation device comprising:

[0036] A first generating module is used to generate a description file for each type of component according to parameter values ​​of multiple description parameters under different types of components in the general description model after receiving the requested interface data;

[0037] A matching module, used for matching the data characteristics of the interface data with the description file of each type of component, and determining a valid description file including parameter values ​​matching the data characteristics;

[0038] The second generating module is used to generate a valid component for displaying the interface data according to the valid description file, and the valid component is used to display the interface data according to a target display format.

[0039] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned component generation method when executing the computer program.

[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned component generation method are executed.

[0041] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0042] The embodiment of the present application provides a component generation method, device, equipment and storage medium. After receiving the requested interface data, the description file of each type of component is generated according to the parameter values ​​of multiple description parameters under different types of components in the general description model; the data characteristics of the interface data are matched with the description file of each type of component to determine the valid description file including parameter values ​​that match the data characteristics; and a valid component for displaying the interface data is generated according to the valid description file, and the valid component is used to display the interface data according to the target display format. In this way, the present application can simplify the relevant judgment logic at the component generation node and improve the component generation efficiency.

[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A schematic diagram of a flow chart of a component generation method provided in an embodiment of the present application is shown;

[0046] Figure 2 A schematic diagram of a process for creating a general description model provided in an embodiment of the present application is shown;

[0047] Figure 3 A schematic diagram of a flow chart of a method for classifying and managing interface data provided by an embodiment of the present application is shown;

[0048] Figure 4 A schematic flow chart of a first method for matching data features of interface data with different description files provided in an embodiment of the present application is shown;

[0049] Figure 5 A schematic flow chart of a second method for matching data features of interface data with different description files provided in an embodiment of the present application is shown;

[0050] Figure 6 A schematic flow chart of a first method for updating description parameters in a general description model provided in an embodiment of the present application is shown;

[0051] Figure 7 A schematic diagram of a second process for updating description parameters in a general description model provided by an embodiment of the present application is shown;

[0052] Figure 8 A schematic diagram of the structure of a component generation device provided in an embodiment of the present application is shown;

[0053] Fig. 9 A schematic diagram of the structure of an electronic device 900 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0055] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0056] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0057] At present, when displaying information, it is necessary to first parse the interface data received by the client, and then determine the components that need to be generated for each type of data based on various judgment factors such as data type, data usage, and data display scenario obtained during the parsing process, so as to realize the data display function of the interface data based on the generated components. Here, when determining the components that need to be generated, since different types of judgment factors correspond to multiple different combinations, and different combinations correspond to different component generation logics, the existing component generation method requires a large number of complex logical judgment steps at the component generation node, resulting in low component generation efficiency.

[0058] Based on this, the embodiments of the present application provide a component generation method, apparatus, device and storage medium to simplify the relevant judgment logic at the generation node of the component and improve the generation efficiency of the component.

[0059] To facilitate understanding of this embodiment, a component generation method, apparatus, device and storage medium provided in an embodiment of the present application are described in detail below.

[0060] Reference Figure 1 As shown, Figure 1 A schematic flow chart of a component generation method provided in an embodiment of the present application is shown, and the component generation method includes steps S101-S103; specifically:

[0061] S101, after receiving the requested interface data, generating a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model.

[0062] S102, matching the data features of the interface data with the description files of each type of component, and determining a valid description file including parameter values ​​that match the data features.

[0063] S103: Generate a valid component for displaying the interface data according to the valid description file, wherein the valid component is used to display the interface data according to a target display format.

[0064] The above-mentioned component generation method provided by the present application, after receiving the requested interface data, generates a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model; matches the data characteristics of the interface data with the description file of each type of component, and determines a valid description file including parameter values ​​that match the data characteristics; generates a valid component for displaying the interface data according to the valid description file, and the valid component is used to display the interface data according to the target display format. In this way, the present application can simplify the relevant judgment logic at the component generation node and improve the component generation efficiency.

[0065] It should be noted that, in the embodiments of the present application, the above-mentioned component generation method can be run on a local terminal device or a server. When the above-mentioned component generation method is run on a server, the above-mentioned component generation method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device (i.e., a terminal device). The embodiments of the present application do not make any restrictions on the specific application device of the above-mentioned component generation method.

[0066] The following takes running on a terminal device as an example to exemplify each step in the above component generation method provided in the embodiment of the present application:

[0067] S101, after receiving the requested interface data, generating a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model.

[0068] Here, the interface data is used to characterize the information flow that needs to be displayed to the user in the target application; wherein the target application is installed in the terminal device (the embodiment of the present application does not impose any limitation on the specific type of the target application), and the received information flow is displayed through the graphical user interface provided by the terminal device.

[0069] It should be noted that the information flow (i.e., interface data) may include multiple different types of data, such as text type data (equivalent to data including only text), graphic type data (equivalent to data including both pictures and text), audio type data, etc.; the embodiments of the present application do not impose any limitation on the specific data content of the above-mentioned interface data.

[0070] In an embodiment of the present application, the multiple description parameters in the general description model include at least: a first description parameter representing a component type (equivalent to a data type, such as an image type, a text type, etc.), a second description parameter representing a data purpose (equivalent to a component purpose, such as forwarding, normal, etc.), a third description parameter representing a data display scene (equivalent to a component display scene), and a fourth description parameter representing a spacing value for a top display (equivalent to the spacing value between the top of a component and the previous component when the component displays data).

[0071] It should be noted that, in addition to the above-mentioned first description parameter to the fourth description parameter, the general description model can also include multiple user-defined description parameters; among them, the specific types of user-defined description parameters can be determined according to the user's specific display requirements for interface data, and the embodiments of this application do not impose any restrictions on the specific types of user-defined description parameters.

[0072] Specifically, the description file is used to describe the component. One description file corresponds to describing a type of component and the corresponding usage rules of this type of component when displaying data (that is, the specific parameter values ​​of multiple description parameters under this type of component); on this basis, the embodiment of the present application places the descriptive parameters such as data display scenarios and data usage related to "determining what type of component to generate" in the description file, so that the generation of the description file is independent of the specific data content of the interface data; that is, no matter what type of data to be displayed is included in the interface data, a description file for each type of component can be generated through a pre-created general description model.

[0073] As an exemplary explanation, taking the currently known types of components including: component A, component B...component N as an example (equivalent to the description files that can be generated according to the general description model are description files a...description files n corresponding to components A, component B...component N), when the received interface data includes: text data a1, graphic data b1, and forwarding type graphic data b2, then according to the general description model, description files a...description files n corresponding to components A, component B...component N are generated; when the received interface data only includes: text data a1 and graphic data b1, according to the general description model, description files a...description files n corresponding to components A, component B...component N are still generated.

[0074] S102, matching the data features of the interface data with the description files of each type of component, and determining a valid description file including parameter values ​​that match the data features.

[0075] Here, the component is used to represent a simple encapsulation of data and methods; wherein the method is used to represent the specific function of the component; that is, in the embodiment of the present application, the component is used to represent a specific object in the development tool that can display the interface data according to the specific display requirements of the interface data; a component represents the physical part that implements the data display requirements of a type of data in the interface data, including software code (source code, binary code, executable code) or some similar content, such as scripts or command files.

[0076] Here, the data characteristics of the interface data are used to characterize the specific data content included in the interface data. For example, when the interface data includes: text data a1, graphic data b1, and forwarding type graphic data b2, the data characteristics of the interface data are: there is pure text data a1 (there is no special limitation on the use of the data), there is data b1 that includes both pictures and text (there is no special limitation on the use of the data), and there is data b2 whose data use is specified as forwarding type and the data content includes both pictures and text.

[0077] Specifically, with respect to the above steps S101-S102, it should be noted that, unlike the prior art method of parsing interface data while creating corresponding components according to the data features of the parsed interface data (equivalent to determining the components that need to be generated for each type of data one by one according to multiple judgment factors such as the data type, data usage, and data display scenario obtained during the parsing process), the embodiment of the present application places descriptive parameters such as the data display scenario and data usage related to "determining what type of component to generate" in the description file through the execution of the above step S101, so that the generation of the description file is independent of the specific data content of the interface data; and then by executing the above step S102, the valid description file related to the display of the currently received interface data is determined from all the generated description files, so that the embodiment of the present application only needs to actually generate some components corresponding to the valid description files, so as to simplify the relevant judgment logic at the component generation node and improve the component generation efficiency.

[0078] As an exemplary explanation, taking the forwarding type of graphic data b2 in the above example as an example, if the description file B1 is: component type: graphic type, component purpose: general type, data display scenario: recommended flow, top display spacing value 5cm; the description file B2 is: component type: graphic type, component purpose: forwarding type, data display scenario: recommended flow, top display spacing value 5cm; then according to the forwarding type graphic data b2 in the interface data, the description file B2 can be determined as a valid description file from the description file B1 and the description file B2.

[0079] S103: Generate a valid component for displaying the interface data according to the valid description file, wherein the valid component is used to display the interface data according to a target display format.

[0080] Specifically, in combination with the above analysis, it can be known that in the embodiment of the present application, the description file is used to describe the component, and one description file corresponds to describing a type of component, as well as the corresponding usage rules of this type of component when displaying data (that is, the specific parameter values ​​of multiple description parameters under this type of component); therefore, according to the valid description file determined in step S102, a valid component matching the valid description file can be generated according to the specific parameter value of each description parameter in the valid description file (equivalent to the corresponding usage rules of the component when displaying data).

[0081] It should be noted that the above-mentioned target display format can be determined according to the specific parameter value of each description parameter in the effective description file, that is, since the specific parameter value of each description parameter in the description file defines the corresponding usage rules of the component when displaying data (equivalent to defining the format in which the component displays data), therefore, "determining a valid description file matching the data characteristics of the interface data from all description files according to the data characteristics of the interface data" is equivalent to "determining a valid description file representing the above-mentioned target display format from description files representing multiple different display formats". Based on this, the embodiment of the present application does not impose any limitation on the specific format content of the above-mentioned target display format.

[0082] The following describes in detail the specific implementation process of each of the above steps in the embodiment of the present application:

[0083] Based on the specific implementation process of the above step S101, it can be known that the general description model includes multiple description parameters, and the process of generating the description file by the general description model is independent of the data characteristics of the interface data. Based on this, in the embodiment of the present application, as an optional embodiment, before executing the above step S101, the above general description model can be created in the following manner, specifically:

[0084] like Figure 2 As shown, Figure 2 A flow chart of a method for creating a general description model provided in an embodiment of the present application is shown, wherein before executing the above step S101, the method includes steps S201-S203; specifically:

[0085] S201, according to the interface application scenario of the request, determine all types of components involved in displaying data in the interface application scenario.

[0086] Here, based on the above step S101, it can be known that the interface data is used to characterize the information flow that needs to be displayed to the user in the target application; at this time, the above interface application scenario can be determined according to the specific application type of the target application. For example, if the target application is a news information application, the above interface application scenario can be determined as: an application scenario for displaying news information data.

[0087] In an embodiment of the present application, as an optional embodiment, when executing step S201, all data types that need to be displayed when displaying data in the interface application scenario can be first determined based on the interface application scenario of the current request, and then all types of components involved in displaying data in the interface application scenario can be determined based on the component type corresponding to each data type.

[0088] For example, take the above interface application scenario as an example: an application scenario for displaying news and information data. If all the data types that need to be displayed in the above interface application scenario are: picture type, text type, and graphic and text type; it can be determined that all types of components involved in displaying data in the above interface application scenario include 3 types (components AC); among them, component A is used to display picture type data, component B is used to display text type data, and component C is used to display graphic and text type data.

[0089] S202: According to the data display requirement in the interface application scenario, determine the description parameters corresponding to each type of component when the data display requirement is met and the parameter value of each description parameter.

[0090] Here, the data display requirements under the interface application scenario include at least: the specific data type that needs to be displayed (such as graphic type, etc.), the specific data purpose of the currently displayed data (such as forwarding type, etc.), the current specific data display scenario (such as used for topic display, etc.) and the specific format requirements of the currently displayed data (such as displaying 3 cm apart from the previous displayed data, etc.).

[0091] In an embodiment of the present application, each type of component is determined according to the specific data type in the above data display requirements, and the specific usage rules of each type of component are determined according to the specific data usage, specific data display scenario and specific format requirements in the above data display requirements.

[0092] Specifically, taking the first description parameter to the fourth description parameter and multiple user-defined description parameters included in the general description model in the above step S101 as an example, the first description parameter corresponding to when the data display requirement is met can be determined according to the specific data type in the above data display requirement; the second description parameter corresponding to when the data display requirement is met can be determined according to the specific data usage in the above data display requirement; the third description parameter corresponding to when the data display requirement is met can be determined according to the specific data display scenario in the above data display requirement; the fourth description parameter corresponding to when the data display requirement is met and multiple user-defined description parameters can be determined according to the specific format requirement in the above data display requirement.

[0093] S203: Create the general description model according to the component identifier of each type of component in all types of components, the description parameters corresponding to each type of component when satisfying the data display requirement, and the parameter value of each description parameter.

[0094] Here, for each type of component, a description file of this type of component can be generated according to the corresponding description parameters and the parameter value of each description parameter when this type of component meets the above-mentioned data display requirements; then, a mapping relationship is established between the description file of each type of component and the component identifier of each type of component, and the established mapping relationship is stored in the created general description model; thus, the above-mentioned step S101 is executed through the created general description model.

[0095] Specifically, the step of generating the description file by using the created universal description model can refer to the specific implementation process of the aforementioned step S101, and the repeated parts will not be repeated here.

[0096] With regard to the specific implementation process of the above-mentioned step S101, combined with the relevant instructions at the above-mentioned step S101, it can be known that the process of generating a description file from the general description model is independent of the data characteristics of the interface data, that is, when executing the above-mentioned step S101, the description file can be generated through the above-mentioned general description model without parsing the interface data (equivalent to without distinguishing the specific data type included in the interface data).

[0097] Here, in addition to the above-mentioned method, the embodiment of the present application takes into account that when the interface data is displayed according to the generated valid component, it is also necessary to call different types of data in the interface data. Based on this, after receiving the requested interface data, the embodiment of the present application also provides a method for classifying and managing the interface data, so as to establish a communication connection channel between the view (i.e., the visual interface) displayed to the user on the graphical user interface and the source data (i.e., the interface data) actually stored in the terminal device, so as to facilitate the calling of different types of data in the interface data during the data display process, thereby improving the management efficiency of the interface data and the generation efficiency of the dynamic card of the information flow (i.e., the data display interface that dynamically displays the interface data in the form of cards).

[0098] like Figure 3 As shown, Figure 3 A flow chart of a method for classifying and managing interface data provided by an embodiment of the present application is shown, wherein, when executing the above step S101, after receiving the requested interface data, the method further includes steps S301-S303; specifically:

[0099] S301, parsing the interface data to determine the data type contained in the interface data.

[0100] For example, if the currently received interface data is: text information b1, social news information c1 including 3 pictures, simple picture information a1, text information b2, entertainment news c2 including 6 pictures, and video data d1; then by parsing the interface data, it can be determined that the data types contained in the interface data are: text type, graphic type, picture type, and video type.

[0101] S302: split the interface data according to the data type contained in the interface data to obtain multiple groups of sub-data belonging to the same data type.

[0102] Here, as an optional embodiment, the above step S302 may be performed by parsing the interface data to generate a corresponding ViewModel array; wherein each array in the ViewModel array corresponds to a data type contained in the interface data;

[0103] For exemplary explanation, still taking the example in the above step S301 as an example, when executing the above step S302 on the interface data, by splitting the interface data, a ViewModel array including array x1-array x4 can be obtained; wherein, the data type corresponding to array x1 is text type, and the sub-data included in array x1 are: text information b1 and text information b2; the data type corresponding to array x2 is picture type, and the sub-data included in array x2 are: social news information c1 including 3 pictures and entertainment news c2 including 6 pictures; the data type corresponding to array x3 is picture type, and the sub-data included in array x3 are: simple picture information a1; the data type corresponding to array x4 is video type, and the sub-data included in array x4 are: video data d1.

[0104] S303: Create a data calling interface for each group of sub-data, so as to call and manage the group of sub-data through the data calling interface.

[0105] Specifically, when the above-mentioned interface data is classified and managed by means of a ViewModel array, each group of sub-data in the ViewModel array corresponds to an API interface (i.e., the above-mentioned data calling interface). After executing step S103 (i.e., after generating a valid component for displaying the interface data), since the component type of each valid component corresponds to the data type one-to-one, each valid component can obtain the target sub-data in the interface data that needs to be displayed by the valid component from the ViewModel array by accessing the target API interface (i.e., the data calling interface of the sub-data whose data type corresponds to the component type of the valid component).

[0106] In the embodiment of the present application, the information flow dynamic card finally generated by each effective component is equivalent to the data display result of the interface data (that is, the view that the user can actually see), and each different type of sub-data included in the interface data is equivalent to the original data that needs to be displayed; at this time, when each different type of sub-data in the interface data is classified and managed by means of the ViewModel array, the data call interface created by the ViewModel array for each group of sub-data is equivalent to establishing a communication channel between the View (view) and the Model (model data, that is, each group of sub-data), so that when generating the information flow dynamic card, it is convenient for each effective component to call the sub-data of different data types in the interface data more efficiently, thereby improving the management efficiency of the interface data and the generation efficiency of the information flow dynamic card.

[0107] Regarding the specific implementation process of the above step S102, when the interface data is not classified and managed according to the method shown in the above steps S301-S303, as an optional embodiment, the following method can be used: Figure 4 The matching method shown executes the step of determining a valid description file in the above step S102, specifically:

[0108] like Figure 4 As shown, Figure 4 A flow chart of a first method for matching data features of interface data with different description files provided in an embodiment of the present application is shown, wherein when executing the above step S102, the method further includes steps S401-S403; specifically:

[0109] S401, for a description file of each type of component, when it is detected that the interface data contains first target sub-data whose data type matches the component of this type, the description file is determined to be a first description file.

[0110] Here, combined with the above steps S101-S102, it can be seen that the description file generated in the general description model is independent of the data characteristics of the interface data (equivalent to being independent of the specific data content included in the interface data). Therefore, after generating the description file, it is also necessary to determine the effective description file actually used to generate the effective component from all the generated description files based on the data characteristics of the interface data.

[0111] Specifically, since the component type of a component is determined according to the first description parameter in the description file, and the component type of a component also corresponds to a specific data type, when the data type included in the interface data is consistent with (i.e., matches) the first description parameter used to characterize the component type in the description file, it can be determined that the description file belongs to the first description file; at this time, the first description file is equivalent to a description file in which the first description parameter is valid (equivalent to a description file in which the component type is valid).

[0112] As an exemplary explanation, taking component C for displaying graphic type data as an example, the first description parameter in the description file of component C is: graphic type; when the interface data only includes pure text information and pure image information, then based on the fact that there is no graphic type data in the interface data, it can be directly determined that the description file of component C is an invalid description file without checking other description parameters in the description file of component C (equivalent to not needing to use graphic type component C when displaying the interface data); when the interface data includes graphic information, then based on the fact that the interface data includes graphic type data, it can be determined that the description file of component C belongs to the first description file (equivalent to the component type of component C meeting the data display requirements of the interface data).

[0113] S402: Detect, based on the data usage and data content of the first target sub-data, whether the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file.

[0114] Specifically, in combination with the above step S202, it can be known that the specific usage rules of each type of component can be determined according to the specific data purpose, specific data display scenario and specific format requirements in the data display requirements; that is, after determining that the component type meets the data display requirements of the interface data (equivalent to after determining the first description file), for the component corresponding to the first description file, it is also necessary to detect whether the usage rules of the component (equivalent to other description parameters in the first description file except the first description parameter) meet the data display requirements of the first target sub-data based on the data purpose and data content of the first target sub-data.

[0115] S403: When it is detected that the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file, determine the first description file as the valid description file.

[0116] Here, the component corresponding to the valid description file is the valid component in the above step S103; that is, the valid component is used to represent the component whose component type and component usage rules meet the data display requirements of the interface data.

[0117] In the following example, the first target sub-data is a graphic type data, where the data usage of the first target sub-data is a forwarding type. If component C1 and component C2 both belong to graphic type components, the second description parameter in the description file of component C1 (i.e., the description parameter used to characterize the data usage) is a normal type; the second description parameter in the description file of component C2 (i.e., the description parameter used to characterize the data usage) is a forwarding type; then it can be determined that the description file of component C2 is a valid description file, and component C2 is a valid component. At this time, it is only necessary to generate component C2 in the graphic type component.

[0118] Regarding the specific implementation process of the above step S102, when the interface data is classified and managed according to the method shown in the above steps S301-S303, as another optional embodiment, the following can be used: Figure 5 The matching method shown executes the step of determining a valid description file in the above step S102, specifically:

[0119] like Figure 5 As shown, Figure 5 A flow chart of a second method for matching data features of interface data with different description files provided in an embodiment of the present application is shown, wherein when executing the above step S102, the method further includes steps S501-S503; specifically:

[0120] S501, for each type of component description file, determine a data type that matches the type of component as a target data type.

[0121] In an embodiment of the present application, when sub-data of different data types in the interface data are classified and managed in the manner shown in the above steps S301-S303, in addition to determining the valid description file in the manner shown in the above steps S401-S403, as an optional embodiment, the valid description file can also be determined in the manner shown in steps S501-S503.

[0122] Specifically, for the description file of each type of component, since the first description parameter in the description file is used to characterize the component type (equivalent to being used to characterize the data type), the target data type corresponding to this type of component can be directly determined based on the first description parameter in the description file.

[0123] For example, if the first description parameter in the description file of component C is: graphic type, then it can be determined that the target data type matching component C is: graphic type.

[0124] S502: Determine, from the data calling interfaces corresponding to each group of sub-data, a target data calling interface corresponding to the second target sub-data belonging to the target data type.

[0125] For example, if the target data type matching component C is a graphic type, then a data calling interface corresponding to the graphic type data can be determined from multiple data calling interfaces as the target data calling interface.

[0126] S503, obtaining the data usage and data content of the second target sub-data from the target data calling interface, and matching the data usage and data content of the second target sub-data with the description file of the component of this type.

[0127] Specifically, the execution method of the steps is the same as the above step S403, and the repeated parts are not repeated here.

[0128] Regarding the specific implementation process of the above steps S101-S103, considering that the general description model is pre-created before executing the above step S101, at this time, in the actual application process, with the dynamic changes of data in the information flow, new data types may appear in the interface data (for example, the interface data originally does not include voice data, and after the subsequent version is updated, voice data appears in the interface data, etc.), because the target data of the new data type needs to be displayed through an unknown type component (equivalent to a component that cannot generate a corresponding description file through the original general description model), based on this, Figure 6 As shown in the figure, when a new data type appears in the interface data, Figure 6 A flow chart of a first method for updating description parameters in a general description model provided by an embodiment of the present application is shown, wherein when executing the above step S101, after receiving the requested interface data, the method further includes steps S601-S604; specifically:

[0129] S601 , in response to a first display requirement for the interface data, determining a data display format that meets the first display requirement as a first display format.

[0130] Specifically, the first display requirement for the interface data may refer to the relevant interpretation of the “data display requirement” in the above step S202 , and the repeated parts will not be repeated here.

[0131] S602: When it is detected that an unknown type component needs to be generated when displaying the interface data according to the first display format, a first description file required to generate the unknown type component is determined according to parameter values ​​of the plurality of description parameters under the unknown type component.

[0132] Here, the unknown type component is used to characterize the type component that does not exist in the general description model; for example, if the first description parameter in the description file generated by the general description model can be divided into the following three categories: picture type, text type and graphic type; then when the interface data includes video data, it can be determined that it is detected that an unknown type component needs to be generated (i.e., a video type component needs to be generated) to display the interface data in the first display format.

[0133] Specifically, in combination with the relevant interpretation of "data display requirements" in the above step S202, it can be seen that the first display requirement for interface data, in addition to including specific data types, may also include other parameter information for determining the specific usage rules of the component (such as data usage, data display scenarios, data display format requirements, etc.); therefore, based on the above first display requirement, the parameter values ​​of multiple description parameters under the unknown type component (that is, the above other parameter information for determining the specific usage rules of the component) can also be determined, thereby determining the description file required to generate the unknown type component.

[0134] S603: Determine a first identification position of a newly added first component identification in the general description model according to identification positions of component identifications that identify different component types in the general description model.

[0135] Here, the first component identifier is used to identify the unknown type component.

[0136] S604: Add the first component identifier at the position of the first identifier, and store parameter values ​​of various description parameters required to generate the first description file in the first parameter storage area where the first component identifier is located.

[0137] Specifically, the mapping relationship between the component identifier and the description file in step S604 can refer to that shown in the above steps S201 to S203, and the repeated parts will not be repeated here.

[0138] Regarding the specific implementation process of the above steps S101-S103, considering that in the actual application process, the display requirements of some data in the interface data may also change (equivalent to the parameter value of a certain description parameter under this type of component needs to be changed), based on this, Figure 7 As shown, Figure 7 The second flow chart of updating the description parameters in the general description model provided by the embodiment of the present application is shown, wherein, when executing the above step S101, after receiving the requested interface data, the method further includes steps S701-S704; specifically:

[0139] S701 , in response to a second display requirement for the interface data, determining a data display format that meets the second display requirement as a second display format.

[0140] Specifically, the second display requirement for the interface data may refer to the relevant interpretation of the “data display requirement” in the above step S202 , and the repeated parts will not be repeated here.

[0141] S702: When it is detected that a known type component needs to be generated to display the interface data according to the second display format, a second description file required to generate the known type component is determined according to parameter values ​​of the multiple description parameters under the known type component.

[0142] Here, the known type components are used to characterize the type components existing in the general description model.

[0143] As an exemplary explanation, if the first description parameter in the description file generated by the general description model can be divided into the following three categories: picture type, text type and graphic type; then when the interface data includes graphic type data (equivalent to the data type including graphic type in the second display requirement), it can be determined that it is necessary to generate a known type component (equivalent to the need to generate a known type component of graphic type) to display the interface data according to the second display format.

[0144] S703: When it is detected that there is a matching difference between the parameter value of the target description parameter in the second description file and the second display format, determine the second parameter storage area of ​​the second component identifier in the general description model according to the identification position of the second component identifier in the general description model.

[0145] Here, the second component identifier is used to identify the known type component; the target description parameter belongs to the multiple description parameters; that is, the target description parameter can be used to characterize other description parameters except the first description parameter (that is, the description parameter used to characterize the data type).

[0146] Specifically, the mapping relationship between the component identifier and the description file in step S703 can refer to that shown in the above steps S201-S203, and the repeated parts are not repeated here.

[0147] S704: In the second parameter storage area, according to the matching difference, correct the parameter value of the target description parameter under the known type component.

[0148] As an exemplary explanation, taking the above-mentioned known type component as a graphic type component, if the second description parameter in the description file of the graphic type component stored in the general description model is a conventional type, then when the parameter value of the target description parameter under the graphic type component is: forwarding type, the second description parameter in the description file of the graphic type component stored in the general description model can be corrected to correct the originally stored conventional type to the forwarding type.

[0149] The above-mentioned component generation method provided by the embodiment of the present application, after receiving the requested interface data, generates a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model; matches the data characteristics of the interface data with the description file of each type of component, and determines a valid description file including parameter values ​​that match the data characteristics; generates a valid component for displaying the interface data according to the valid description file, and the valid component is used to display the interface data according to the target display format. In this way, the present application can simplify the relevant judgment logic at the component generation node and improve the component generation efficiency.

[0150] Based on the same inventive concept, the present application also provides a component generation device corresponding to the above-mentioned component generation method. Since the principle of solving the problem by the component generation device in the embodiment of the present application is similar to the above-mentioned component generation method in the embodiment of the present application, the implementation of the component generation device can refer to the implementation of the above-mentioned component generation method, and the repeated parts will not be repeated.

[0151] Reference Figure 8 As shown, Figure 8 A schematic diagram of the structure of a component generation device provided in an embodiment of the present application is shown, wherein the component generation device comprises:

[0152] The first generating module 801 is used to generate a description file for each type of component according to parameter values ​​of multiple description parameters under different types of components in the general description model after receiving the requested interface data;

[0153] A matching module 802, used to match the data features of the interface data with the description files of each type of component, and determine a valid description file including parameter values ​​that match the data features;

[0154] The second generating module 803 is used to generate a valid component for displaying the interface data according to the valid description file, and the valid component is used to display the interface data according to a target display format.

[0155] In an optional implementation manner, the component generating device further includes:

[0156] A first response module, configured to respond to a first display requirement for the interface data and determine a data display format that meets the first display requirement as a first display format;

[0157] A first determination module is used to determine, when it is detected that an unknown type component needs to be generated for displaying the interface data according to the first display format, a first description file required to generate the unknown type component according to the parameter values ​​of the plurality of description parameters under the unknown type component; wherein the unknown type component is used to represent a type component that does not exist in the general description model;

[0158] A second determination module is used to determine a first identification position of a newly added first component identification in the general description model according to identification positions of component identifications that identify different component types in the general description model; wherein the first component identification is used to identify the unknown type component;

[0159] The third generating module is used to add the first component identifier at the position of the first identifier, and store the parameter values ​​of various description parameters required to generate the first description file in the first parameter storage area where the first component identifier is located.

[0160] In an optional implementation manner, the component generating device further includes:

[0161] A second response module, configured to respond to a second display requirement for the interface data and determine a data display format that meets the second display requirement as a second display format;

[0162] A third determination module is used to determine, when it is detected that a known type component needs to be generated for displaying the interface data according to the second display format, a second description file required for generating the known type component according to the parameter values ​​of the multiple description parameters under the known type component; wherein the known type component is used to characterize the type component existing in the general description model;

[0163] a fourth determination module, configured to determine, when detecting that a parameter value of a target description parameter has a matching difference between the second description file and the second display format, a second parameter storage area of ​​the second component identifier in the general description model according to an identifier position of the second component identifier in the general description model; wherein the second component identifier is used to identify the known type component; and the target description parameter belongs to the multiple description parameters;

[0164] A correction module is used to correct the parameter value of the target description parameter under the known type component in the second parameter storage area according to the matching difference.

[0165] In an optional implementation, the first generating module 801 is configured to create the general description model by:

[0166] According to the interface application scenario of the request, determine all types of components involved in displaying data in the interface application scenario;

[0167] According to the data display requirements in the interface application scenario, determine the description parameters corresponding to each type of component when meeting the data display requirements and the parameter value of each description parameter;

[0168] The general description model is created according to the component identifier of each type of component in all types of components, the description parameters corresponding to each type of component when satisfying the data display requirements, and the parameter value of each description parameter.

[0169] In an optional implementation, when matching the data features of the interface data with the description files of each type of component to determine a valid description file including parameter values ​​that match the data features, the matching module 802 is configured to:

[0170] For the description file of each type of component, when it is detected that the interface data contains first target sub-data whose data type matches the component of the type, the description file is determined to be the first description file;

[0171] According to the data usage and data content of the first target sub-data, detecting whether the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file;

[0172] When it is detected that the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file, the first description file is determined as the valid description file.

[0173] In an optional implementation, the component generating device further includes:

[0174] A parsing module, used to parse the interface data to determine the data type contained in the interface data;

[0175] A splitting module, used for splitting the interface data according to the data type contained in the interface data to obtain multiple groups of sub-data belonging to the same data type;

[0176] The management module is used to create a data calling interface for each group of sub-data, so as to call and manage the group of sub-data through the data calling interface.

[0177] In an optional implementation, when matching the data features of the interface data with the description file of each type of component, the matching module 802 is further configured to:

[0178] For the description file of each type of component, determine the data type matching the component of this type as the target data type;

[0179] Determine, from the data calling interfaces corresponding to each group of sub-data, a target data calling interface corresponding to the second target sub-data belonging to the target data type;

[0180] The data usage and data content of the second target sub-data are obtained from the target data calling interface, and the data usage and data content of the second target sub-data are matched with the description file of the component of this type.

[0181] The above-mentioned component generation device provided by the embodiment of the present application, after receiving the requested interface data, generates a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model; matches the data characteristics of the interface data with the description file of each type of component, and determines a valid description file including parameter values ​​that match the data characteristics; generates a valid component for displaying the interface data according to the valid description file, and the valid component is used to display the interface data according to the target display format. In this way, the present application can simplify the relevant judgment logic at the component generation node and improve the component generation efficiency.

[0182] Based on the same inventive concept, the present application also provides an electronic device corresponding to the above-mentioned component generation method. Since the principle of solving the problem by the electronic device in the embodiment of the present application is similar to the above-mentioned component generation method in the embodiment of the present application, the implementation of the electronic device can refer to the implementation of the above-mentioned component generation method, and the repeated parts will not be repeated.

[0183] Fig. 9 A structural diagram of an electronic device 900 provided in an embodiment of the present application includes: a processor 901, a memory 902 and a bus 903, wherein the memory 902 stores machine-readable instructions executable by the processor 901. When the electronic device runs a component generation method in an embodiment, the processor 901 communicates with the memory 902 through the bus 903, and the processor 901 executes the machine-readable instructions. When the processor 901 executes the machine-readable instructions, the following steps are implemented, specifically:

[0184] After receiving the requested interface data, a description file for each type of component is generated according to parameter values ​​of multiple description parameters under different types of components in the general description model;

[0185] Matching the data characteristics of the interface data with the description files of each type of component, and determining a valid description file including parameter values ​​that match the data characteristics;

[0186] An effective component for displaying the interface data is generated according to the effective description file, and the effective component is used to display the interface data according to a target display format.

[0187] In an optional implementation manner, the processor 901 is further configured to:

[0188] In response to a first display requirement for the interface data, determining a data display format that meets the first display requirement as a first display format;

[0189] When it is detected that an unknown type component needs to be generated for displaying the interface data according to the first display format, a first description file required for generating the unknown type component is determined according to the parameter values ​​of the plurality of description parameters under the unknown type component; wherein the unknown type component is used to characterize a type component that does not exist in the general description model;

[0190] Determine, according to the identification position of component identifications identifying different component types in the general description model, a first identification position of a newly added first component identification in the general description model; wherein the first component identification is used to identify the unknown type component;

[0191] The first component identifier is added at the first identifier position, and parameter values ​​of various description parameters required to generate the first description file are stored in the first parameter storage area where the first component identifier is located.

[0192] In an optional implementation manner, the processor 901 is further configured to:

[0193] In response to a second display requirement for the interface data, determining a data display format that meets the second display requirement as a second display format;

[0194] When it is detected that a known type component needs to be generated for displaying the interface data according to the second display format, a second description file required for generating the known type component is determined according to the parameter values ​​of the plurality of description parameters under the known type component; wherein the known type component is used to characterize the type component existing in the general description model;

[0195] When it is detected that there is a matching difference between the parameter value of the target description parameter in the second description file and the second display format, determining the second parameter storage area of ​​the second component identifier in the general description model according to the identification position of the second component identifier in the general description model; wherein the second component identifier is used to identify the known type component; and the target description parameter belongs to the multiple description parameters;

[0196] In the second parameter storage area, the parameter value of the target description parameter under the known type component is corrected according to the matching difference.

[0197] In an optional implementation, the processor 901 is further configured to create the general description model by:

[0198] According to the interface application scenario of the request, determine all types of components involved in displaying data in the interface application scenario;

[0199] According to the data display requirements in the interface application scenario, determine the description parameters corresponding to each type of component when meeting the data display requirements and the parameter value of each description parameter;

[0200] The general description model is created according to the component identifier of each type of component in all types of components, the description parameters corresponding to each type of component when satisfying the data display requirements, and the parameter value of each description parameter.

[0201] In an optional implementation, when matching the data feature of the interface data with the description file of each type of component to determine a valid description file including a parameter value matching the data feature, the processor 901 is configured to:

[0202] For the description file of each type of component, when it is detected that the interface data contains first target sub-data whose data type matches the component of the type, the description file is determined to be the first description file;

[0203] According to the data usage and data content of the first target sub-data, detecting whether the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file;

[0204] When it is detected that the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file, the first description file is determined as the valid description file.

[0205] In an optional implementation, after receiving the requested interface data, the processor 901 is further configured to:

[0206] Parsing the interface data to determine the data type contained in the interface data;

[0207] Splitting the interface data according to the data type contained in the interface data to obtain multiple groups of sub-data belonging to the same data type;

[0208] A data calling interface is created for each group of sub-data, so as to call and manage the group of sub-data through the data calling interface.

[0209] In an optional implementation, when matching the data features of the interface data with the description file of each type of component, the processor 901 is configured to:

[0210] For the description file of each type of component, determine the data type matching the component of this type as the target data type;

[0211] Determine, from the data calling interfaces corresponding to each group of sub-data, a target data calling interface corresponding to the second target sub-data belonging to the target data type;

[0212] The data usage and data content of the second target sub-data are obtained from the target data calling interface, and the data usage and data content of the second target sub-data are matched with the description file of the component of this type.

[0213] The electronic device provided in the embodiment of the present application, after receiving the requested interface data, generates a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model; matches the data features of the interface data with the description file of each type of component, and determines a valid description file including parameter values ​​that match the data features; generates a valid component for displaying the interface data according to the valid description file, and the valid component is used to display the interface data in the target display format. In this way, the present application can simplify the relevant judgment logic at the generation node of the component and improve the generation efficiency of the component.

[0214] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed when a processor is running, and the processor performs the following steps:

[0215] After receiving the requested interface data, a description file for each type of component is generated according to parameter values ​​of multiple description parameters under different types of components in the general description model;

[0216] Matching the data characteristics of the interface data with the description files of each type of component, and determining a valid description file including parameter values ​​that match the data characteristics;

[0217] An effective component for displaying the interface data is generated according to the effective description file, and the effective component is used to display the interface data according to a target display format.

[0218] In an optional implementation manner, the processor is further configured to:

[0219] In response to a first display requirement for the interface data, determining a data display format that meets the first display requirement as a first display format;

[0220] When it is detected that an unknown type component needs to be generated for displaying the interface data according to the first display format, a first description file required for generating the unknown type component is determined according to the parameter values ​​of the plurality of description parameters under the unknown type component; wherein the unknown type component is used to characterize a type component that does not exist in the general description model;

[0221] Determine, according to the identification position of component identifications identifying different component types in the general description model, a first identification position of a newly added first component identification in the general description model; wherein the first component identification is used to identify the unknown type component;

[0222] The first component identifier is added at the first identifier position, and parameter values ​​of various description parameters required to generate the first description file are stored in the first parameter storage area where the first component identifier is located.

[0223] In an optional implementation, the processor is further configured to:

[0224] In response to a second display requirement for the interface data, determining a data display format that meets the second display requirement as a second display format;

[0225] When it is detected that a known type component needs to be generated for displaying the interface data according to the second display format, a second description file required for generating the known type component is determined according to the parameter values ​​of the plurality of description parameters under the known type component; wherein the known type component is used to characterize the type component existing in the general description model;

[0226] When it is detected that there is a matching difference between the parameter value of the target description parameter in the second description file and the second display format, determining the second parameter storage area of ​​the second component identifier in the general description model according to the identification position of the second component identifier in the general description model; wherein the second component identifier is used to identify the known type component; and the target description parameter belongs to the multiple description parameters;

[0227] In the second parameter storage area, the parameter value of the target description parameter under the known type component is corrected according to the matching difference.

[0228] In an optional implementation, the processor is further configured to create the general description model by the following method:

[0229] According to the interface application scenario of the request, determine all types of components involved in displaying data in the interface application scenario;

[0230] According to the data display requirements in the interface application scenario, determine the description parameters corresponding to each type of component when meeting the data display requirements and the parameter value of each description parameter;

[0231] The general description model is created according to the component identifier of each type of component in all types of components, the description parameters corresponding to each type of component when satisfying the data display requirements, and the parameter value of each description parameter.

[0232] In an optional implementation, when matching the data features of the interface data with the description files of each type of component to determine a valid description file including parameter values ​​that match the data features, the processor is configured to:

[0233] For the description file of each type of component, when it is detected that the interface data contains first target sub-data whose data type matches the component of the type, the description file is determined to be the first description file;

[0234] According to the data usage and data content of the first target sub-data, detecting whether the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file;

[0235] When it is detected that the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file, the first description file is determined as the valid description file.

[0236] In an optional implementation manner, after receiving the requested interface data, the processor is further configured to:

[0237] Parsing the interface data to determine the data type contained in the interface data;

[0238] Splitting the interface data according to the data type contained in the interface data to obtain multiple groups of sub-data belonging to the same data type;

[0239] A data calling interface is created for each group of sub-data, so as to call and manage the group of sub-data through the data calling interface.

[0240] In an optional implementation, when matching the data features of the interface data with the description file of each type of component, the processor is configured to:

[0241] For the description file of each type of component, determine the data type matching the component of this type as the target data type;

[0242] Determine, from the data calling interfaces corresponding to each group of sub-data, a target data calling interface corresponding to the second target sub-data belonging to the target data type;

[0243] The data usage and data content of the second target sub-data are obtained from the target data calling interface, and the data usage and data content of the second target sub-data are matched with the description file of the component of this type.

[0244] The above-mentioned computer-readable storage medium provided by the embodiment of the present application, after receiving the requested interface data, generates a description file for each type of component according to the parameter values ​​of multiple description parameters under different types of components in the general description model; matches the data characteristics of the interface data with the description file of each type of component, and determines a valid description file including parameter values ​​that match the data characteristics; generates a valid component for displaying the interface data according to the valid description file, and the valid component is used to display the interface data according to the target display format. In this way, the present application can simplify the relevant judgment logic at the generation node of the component and improve the generation efficiency of the component.

[0245] In the embodiment of the present application, when the computer program is run by the processor, other machine-readable instructions can also be executed to execute the component generation method as described in other embodiments. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.

[0246] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0247] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0248] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0249] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0250] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0251] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A component generation method, characterized in that: The component generation method comprises: After receiving the requested interface data, a description file for each type of component is generated according to parameter values ​​of multiple description parameters under different types of components in the general description model; Matching the data characteristics of the interface data with the description files of each type of component, and determining a valid description file including parameter values ​​that match the data characteristics; Generate a valid component for displaying the interface data according to the valid description file, wherein the valid component is used to display the interface data according to a target display format; The general description model is created by the following method: According to the interface application scenario of the request, determine all types of components involved in displaying data in the interface application scenario; According to the data display requirements in the interface application scenario, determine the description parameters corresponding to each type of component when meeting the data display requirements and the parameter value of each description parameter; The general description model is created according to the component identifier of each type of component in all types of components, the description parameters corresponding to each type of component when satisfying the data display requirements, and the parameter value of each description parameter.

2. The component generation method according to claim 1, characterized in that: The component generation method further includes: In response to a first display requirement for the interface data, determining a data display format that meets the first display requirement as a first display format; When it is detected that an unknown type component needs to be generated for displaying the interface data according to the first display format, a first description file required for generating the unknown type component is determined according to the parameter values ​​of the plurality of description parameters under the unknown type component; wherein the unknown type component is used to characterize a type component that does not exist in the general description model; Determine, according to the identification position of component identifications identifying different component types in the general description model, a first identification position of a newly added first component identification in the general description model; wherein the first component identification is used to identify the unknown type component; The first component identifier is added at the first identifier position, and parameter values ​​of various description parameters required to generate the first description file are stored in the first parameter storage area where the first component identifier is located.

3. The component generation method according to claim 1, characterized in that: The component generation method further includes: In response to a second display requirement for the interface data, determining a data display format that meets the second display requirement as a second display format; When it is detected that a known type component needs to be generated for displaying the interface data according to the second display format, a second description file required for generating the known type component is determined according to the parameter values ​​of the plurality of description parameters under the known type component; wherein the known type component is used to characterize the type component existing in the general description model; When it is detected that there is a matching difference between the parameter value of the target description parameter in the second description file and the second display format, determining the second parameter storage area of ​​the second component identifier in the general description model according to the identification position of the second component identifier in the general description model; wherein the second component identifier is used to identify the known type component; and the target description parameter belongs to the multiple description parameters; In the second parameter storage area, the parameter value of the target description parameter under the known type component is corrected according to the matching difference.

4. The component generation method according to claim 1, characterized in that: The step of matching the data features of the interface data with the description files of each type of component and determining a valid description file including parameter values ​​that match the data features comprises: For the description file of each type of component, when it is detected that the interface data contains first target sub-data whose data type matches the component of the type, the description file is determined to be the first description file; According to the data usage and data content of the first target sub-data, detecting whether the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file; When it is detected that the data usage and data content of the first target sub-data match the parameter values ​​included in the first description file, the first description file is determined as the valid description file.

5. The component generation method according to claim 1, characterized in that: After receiving the requested interface data, the component generation method further includes: Parsing the interface data to determine the data type contained in the interface data; Splitting the interface data according to the data type contained in the interface data to obtain multiple groups of sub-data belonging to the same data type; A data calling interface is created for each group of sub-data, so as to call and manage the group of sub-data through the data calling interface.

6. The component generation method according to claim 5, characterized in that: The matching of the data features of the interface data with the description file of each type of component includes: For the description file of each type of component, determine the data type matching the component of this type as the target data type; Determine, from the data calling interfaces corresponding to each group of sub-data, a target data calling interface corresponding to the second target sub-data belonging to the target data type; The data usage and data content of the second target sub-data are obtained from the target data calling interface, and the data usage and data content of the second target sub-data are matched with the description file of the component of this type.

7. A component generation device, characterized in that: The component generating device comprises: A first generating module is used to generate a description file for each type of component according to parameter values ​​of multiple description parameters under different types of components in the general description model after receiving the requested interface data; A matching module, used for matching the data characteristics of the interface data with the description file of each type of component, and determining a valid description file including parameter values ​​matching the data characteristics; A second generating module, configured to generate a valid component for displaying the interface data according to the valid description file, wherein the valid component is used to display the interface data in a target display format; The first generation module is used to create the general description model by the following method: According to the interface application scenario of the request, determine all types of components involved in displaying data in the interface application scenario; According to the data display requirements in the interface application scenario, determine the description parameters corresponding to each type of component when meeting the data display requirements and the parameter value of each description parameter; The general description model is created according to the component identifier of each type of component in all types of components, the description parameters corresponding to each type of component when satisfying the data display requirements, and the parameter value of each description parameter.

8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the component generation method as described in any one of claims 1 to 6 are performed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the component generation method according to any one of claims 1 to 6 are executed.