Data processing method and device, electronic equipment and computer readable medium

By filtering and deleting useless attributes during page rendering and obtaining retained attributes for rendering, the problem of obtaining component attributes is solved and the rendering performance is improved.

CN119536833APending Publication Date: 2025-02-28BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311101775.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

During the page rendering process, obtaining the relevant attributes of a component is a difficult problem. The prior art will refer to a large number of useless attributes when processing component rendering, resulting in performance losses.

Method used

A data processing method is proposed to obtain the candidate attributes of the component to be rendered, find and delete useless attributes (such as undeclared, invalid, and null attributes) to obtain the reserved attributes, and determine the component attribute description information based on these reserved attributes for rendering processing.

Benefits of technology

It effectively avoids performance losses caused by reference to too many useless attributes in rendering processing, and improves component rendering performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536833A_ABST
    Figure CN119536833A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, electronic equipment and a computer readable medium, and the method comprises the steps: after obtaining at least one candidate attribute of a to-be-rendered component, searching and deleting a first attribute meeting a first useless condition from the at least one candidate attribute to obtain at least one reserved attribute, the at least one reserved attribute can represent an attribute which needs to be referenced in the rendering processing process of the to-be-rendered component and has a use value; and according to the at least one retention attribute, determining component attribute description information corresponding to the to-be-rendered component, so that the component attribute description information can represent an attribute which needs to be referenced when rendering processing is performed on the to-be-rendered component and has a use value. In this way, performance loss caused by the fact that many attributes without use value are referred to in the component rendering processing process can be effectively avoided, and therefore the component rendering performance can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, electronic device, and computer-readable medium. Background Art

[0002] In some application scenarios, for a page, during the rendering process (or update process) of the page, rendering processing for one or more components may be completed based on relevant properties of these components.

[0003] However, how to obtain these properties is a technical problem that needs to be solved urgently. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a data processing method, device, electronic device, and computer-readable medium.

[0005] In order to achieve the above objectives, the technical solutions provided by this application are as follows:

[0006] The present application provides a data processing method, the method comprising:

[0007] Get at least one candidate attribute of the component to be rendered;

[0008] Searching and deleting a first attribute that satisfies a first useless condition from the at least one candidate attribute to obtain at least one retained attribute;

[0009] According to the at least one reserved attribute, component attribute description information corresponding to the component to be rendered is determined.

[0010] In a possible implementation manner, the first useless condition includes one or more of the following:

[0011] The first attribute is an undeclared attribute;

[0012] The first attribute is an invalid attribute;

[0013] The first attribute is a null value attribute.

[0014] In a possible implementation manner, before searching and deleting the first attribute satisfying the first useless condition from the at least one candidate attribute, the method further includes:

[0015] If there is a second attribute that satisfies the preset system default attribute condition in the at least one candidate attribute, the second attribute in the at least one candidate attribute is processed so that the processed second attribute satisfies the first useless condition.

[0016] In one possible implementation, the at least one candidate attribute includes at least one single-item class attribute;

[0017] The step of searching and deleting a first attribute satisfying a first useless condition from the at least one candidate attribute to obtain at least one retained attribute includes:

[0018] Searching for a first attribute satisfying a first useless condition from the at least one single-item class attribute;

[0019] The first attribute is deleted from the at least one candidate attribute to obtain at least one retained attribute.

[0020] In a possible implementation manner, the at least one candidate attribute further includes multiple aggregation attributes;

[0021] The process of determining the at least one reserved attribute comprises:

[0022] Deleting the first attribute from the at least one single-item class attribute to obtain at least one third attribute;

[0023] Determining at least one element attribute from the plurality of aggregate class attributes;

[0024] Searching and deleting a fourth attribute satisfying a second useless condition from the at least one element attribute to obtain at least one fifth attribute;

[0025] The at least one retained attribute is determined based on the at least one third attribute and the at least one fifth attribute.

[0026] In a possible implementation manner, before determining at least one element attribute from the multiple aggregation attributes, the method further includes:

[0027] If the plurality of aggregate attributes are in a shortened format, the plurality of aggregate attributes are converted into a full-written format.

[0028] In a possible implementation manner, the component attribute description information is obtained by concatenating the at least one reserved attribute.

[0029] In a possible implementation manner, after determining the component attribute description information corresponding to the component to be rendered, the method further includes:

[0030] Rendering is performed on the component to be rendered according to the component attribute description information.

[0031] The present application provides a data processing device, comprising:

[0032] An attribute acquisition unit, used to acquire at least one candidate attribute of the component to be rendered;

[0033] an attribute screening unit, configured to search for and delete a first attribute satisfying a first useless condition from the at least one candidate attribute, to obtain at least one retained attribute;

[0034] An information determination unit is used to determine component property description information corresponding to the component to be rendered based on the at least one reserved property.

[0035] The present application provides an electronic device, the device comprising: a processor and a memory;

[0036] The memory is used to store instructions or computer programs;

[0037] The processor is used to execute the instructions or computer programs in the memory so that the electronic device executes the data processing method provided in the present application.

[0038] The present application provides a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes the data processing method provided by the present application.

[0039] The present application provides a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for executing the data processing method provided by the present application.

[0040] Compared with the related art, this application has at least the following advantages:

[0041] In the technical solution provided by the present application, after obtaining at least one candidate attribute of the component to be rendered, first search and delete the first attribute that meets the first useless condition (for example, undeclared attributes, invalid attributes, null value attributes and other attributes with no use value) from the at least one candidate attribute to obtain at least one retained attribute, so that the at least one retained attribute can represent the attribute with use value that needs to be referenced in the rendering process of the component to be rendered; then, based on the at least one retained attribute, determine the component attribute description information corresponding to the component to be rendered, so that the component attribute description information can represent the attribute with use value that needs to be referenced when rendering the component to be rendered. This can effectively avoid performance loss caused by referring to a large number of attributes with no use value during the component rendering process, thereby helping to improve component rendering performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;

[0044] Figure 2 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] After research, it was found that for some related solutions, after obtaining all the properties related to the component, the rendering processing of the component can be completed directly by traversing all the properties, so that in the rendering process, not only some useful properties need to be processed, but also some useless properties need to be processed, which leads to a large performance loss.

[0047] Based on the above research, in order to better reduce performance loss, the present application provides a data processing method, which includes: after obtaining at least one candidate attribute of the component to be rendered, first search and delete the first attribute that meets the first useless condition from the at least one candidate attribute (for example, undeclared attributes, invalid attributes, null value attributes and other attributes that have no use value), and obtain at least one retained attribute, so that the at least one retained attribute can represent the attribute with use value that needs to be referenced in the rendering process of the component to be rendered; then, based on the at least one retained attribute, determine the component attribute description information corresponding to the component to be rendered, so that the component attribute description information can represent the attribute with use value that needs to be referenced when rendering the component to be rendered, so that the performance loss caused by referring to a large number of attributes with no use value during the component rendering process can be effectively avoided, thereby helping to improve the component rendering performance.

[0048] In addition, the present application does not limit the execution subject of the above data processing method. For example, any implementation of the data processing method provided in the embodiment of the present application can be applied to a device with data processing function such as a terminal device or a server. For example, any implementation of the data processing method provided in the embodiment of the present application can also be implemented by means of a data communication process between different devices (for example, a terminal device and a server, two terminal devices, or two servers). Among them, the terminal device can be a smart phone, a computer, a personal digital assistant (PDA) or a tablet computer, etc. The server can be a stand-alone server, a cluster server or a cloud server.

[0049] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] In order to better understand the technical solution provided by this application, the data processing method provided by this application is described below with reference to some drawings. Figure 1 As shown, the data processing method provided in the embodiment of the present application includes the following S1-S3. Figure 1 A flowchart of a data processing method provided in an embodiment of the present application.

[0051] S1: Obtain at least one candidate attribute of the component to be rendered.

[0052] The component to be rendered refers to a component that needs to be rendered; and the present application does not limit the implementation method of the component to be rendered. For example, it may refer to any component deployed on a page.

[0053] The candidate attributes are used to represent the attributes related to the component to be rendered above, so that the above "at least one candidate attribute" can represent the attributes presented by the component to be rendered in at least one aspect (for example, color, position, size, etc.), so that the "at least one candidate attribute" can represent the attributes that theoretically need to be referenced during the rendering process of the component to be rendered; and the present application does not limit the implementation method of the above "at least one candidate attribute", for example, it can specifically include all business attributes pre-set for the component to be rendered (for example, pre-configured Cascading Style Sheets (CSS) attributes, default fallback attributes, etc.).

[0054] In addition, this application does not limit the method of obtaining the above "at least one candidate attribute". For example, in some application scenarios, when the above component to be rendered needs to be rendered and displayed on the terminal device, the "at least one candidate attribute" may include some attribute information provided by the server for the component to be rendered (for example, the above CSS attributes, etc.). The server and the terminal device can communicate data. For example, in other application scenarios, the "at least one candidate attribute" may include some attribute information (for example, the above-mentioned catch-all attributes, etc.) read from a certain storage space (for example, cache, memory, etc.).

[0055] Based on the relevant content of S1 above, it can be known that for a component that needs to be rendered (for example, a component to be rendered), at least one candidate attribute of the component is first obtained so that the attributes required for use in the rendering process of the component can be subsequently filtered out from these candidate attributes.

[0056] S2: Searching and deleting a first attribute satisfying a first useless condition from at least one candidate attribute to obtain at least one retained attribute.

[0057] The first attribute refers to a candidate attribute that exists in at least one of the above candidate attributes and satisfies the first useless condition, so that the first attribute is used to represent an attribute (eg, style) that has no use value in the rendering process of the component to be rendered.

[0058] The first useless condition refers to a condition satisfied by an attribute that has no use value during the rendering process of the component to be rendered; and the present application does not limit the implementation method of the first useless condition. For example, the first useless condition can be set according to the actual application scenario. For ease of understanding, the following is an example.

[0059] As an example, in some application scenarios, the first useless condition above may include one or more of the items shown in ①-③ below.

[0060] ①The first attribute is an undeclared attribute.

[0061] Among them, the undeclared attribute is used to represent an undeclared attribute; and the present application does not limit the implementation method of the undeclared attribute. For example, in some application scenarios, for any candidate attribute of at least one candidate attribute above, if the attribute value of the candidate attribute is not declared, it can be determined that the candidate attribute belongs to the undeclared attribute; if the attribute name of the candidate attribute is not declared, it can be determined that the candidate attribute belongs to the undeclared attribute.

[0062] ②The first attribute is an invalid attribute.

[0063] Among them, the invalid attribute is used to represent an invalid (null) attribute; and the present application does not limit the implementation method of the invalid attribute. For example, in some application scenarios, for any candidate attribute of at least one candidate attribute above, if the attribute value of the candidate attribute is a preset invalid value (for example, null), it can be determined that the candidate attribute belongs to an invalid attribute.

[0064] ③The first attribute is a null value attribute.

[0065] Among them, the null value attribute is used to represent an attribute with a null value; and the present application does not limit the implementation method of the null value attribute. For example, in some application scenarios, for any candidate attribute of at least one candidate attribute above, if the attribute value of the candidate attribute is a null value, it can be determined that the candidate attribute belongs to the null value attribute.

[0066] Based on the relevant contents of ① to ③ above, it can be known that in some application scenarios, for any candidate attribute among the at least one candidate attribute above, if the candidate attribute belongs to an undeclared attribute, it can be determined that the candidate attribute satisfies the first useless condition above, so the candidate attribute can be regarded as the first attribute; if the candidate attribute belongs to an invalid attribute, it can be determined that the candidate attribute satisfies the first useless condition, so the candidate attribute can be regarded as the first attribute; if the candidate attribute belongs to a null value attribute, it can be determined that the candidate attribute satisfies the first useless condition, so the candidate attribute can be regarded as the first attribute, so that the purpose of finding one or more first attributes that meet the first useless condition from the at least one candidate attribute can be achieved.

[0067] The reserved attributes are used to represent the attributes that are useful in the rendering process of the component to be rendered, so that the above "at least one reserved attribute" can represent the attributes that actually need to be referenced when rendering the component to be rendered.

[0068] In addition, the present application does not limit the determination process of the above “at least one reserved attribute”. For ease of understanding, it is explained below in combination with some situations.

[0069] Case 1: In some application scenarios, when the above "at least one candidate attribute" includes N candidate attributes, the determination process of the above "at least one reserved attribute" can be specifically as follows: determine whether the nth candidate attribute satisfies the first useless condition; if it satisfies the first useless condition, the nth candidate attribute can be regarded as the first attribute for deletion; if it does not satisfy the first useless condition, the nth candidate attribute can be regarded as the reserved attribute for retention. Where n is a positive integer, n≤N, and N is a positive integer.

[0070] Case 2: In some application scenarios, some related properties of a component may include some system default properties, and these system default properties may not have usage value in the rendering process of the component.

[0071] Based on the above situation 2, it can be known that in a possible implementation, the above determination process of "at least one reserved attribute" may specifically include the following steps 11 and 12. Among them, the execution time of step 11 is later than the execution time of S1 above; the execution time of step 12 is later than the execution time of step 11.

[0072] Step 11: If there is a second attribute in the at least one candidate attribute that satisfies the preset system default attribute condition, the second attribute in the at least one candidate attribute is processed so that the processed second attribute satisfies the first useless condition.

[0073] The second attribute refers to a candidate attribute that exists in at least one of the above candidate attributes and satisfies a preset system default attribute condition, so that the second attribute can represent the system default attribute related to the above component to be rendered.

[0074] The preset system default attribute condition refers to the condition satisfied by the system default attribute related to the above-mentioned component to be rendered; and the present application does not limit the implementation method of the preset system default attribute condition. For example, in some application scenarios, the preset system default attribute condition may specifically be: the attribute value of the above-mentioned second attribute is the same as the system default value pre-set for the second attribute. Among them, the system default value refers to the attribute value pre-set for certain attributes in the operating system.

[0075] Based on the relevant content of step 11 above, it can be known that in some application scenarios, when the above "at least one candidate attribute" includes N candidate attributes, for the nth candidate attribute, if it is determined that the nth candidate attribute meets the preset system default attribute condition, it can be determined that the nth candidate attribute belongs to the system default attribute, and thus it can be determined that the nth candidate attribute belongs to an attribute with no use value. Therefore, in order to further improve the rendering performance, the nth candidate attribute can be processed in some way (for example, the attribute value of the nth candidate attribute is adjusted to a null value, etc.) so that the processed nth candidate attribute meets the first useless condition above, so that the processed nth candidate attribute can be deleted as an attribute with no use value in the future. Wherein, n is a positive integer, n≤N, and N is a positive integer.

[0076] Step 12: Search and delete the first attribute that meets the first useless condition from the at least one candidate attribute above to obtain at least one retained attribute.

[0077] In the present application, for any candidate attribute among the at least one candidate attribute above (for example, the at least one candidate attribute may include at least one or more processed second attributes, etc.), it is determined whether the candidate attribute satisfies the first useless condition. If the first useless condition is satisfied, the candidate attribute can be regarded as the first attribute and deleted; if the first useless condition is not satisfied, the candidate attribute can be regarded as a retained attribute and retained.

[0078] Based on the relevant contents of steps 11 to 12 above, it can be known that in some application scenarios, for some related attributes of a component, it is necessary not only to delete useless attributes such as undeclared attributes, invalid attributes, and null value attributes in these related attributes, but also to delete the system default attributes that appear in these attributes. This can effectively reduce the number of attributes that need to be referenced during the rendering process of the component, thereby helping to reduce performance loss.

[0079] Case 3: In some application scenarios, the first useless condition mentioned above is usually used to filter out some attributes that have no use value in single-item attributes (for example, color attributes and other style attributes).

[0080] Based on the above situation 3, it can be known that in a possible implementation, when the above at least one candidate attribute includes at least one single-item attribute, the above determination process of "at least one reserved attribute" can specifically include at least the following steps 13 and 14. Among them, the execution time of step 13 is later than the execution time of S1 above, or the execution time of step 13 is later than the execution time of step 11 above.

[0081] Step 13: Find the first attribute that satisfies the first useless condition from the at least one single-item class attribute above.

[0082] Among them, the single-item class attribute is used to describe the state of the above component to be rendered in a certain dimension (for example, color and other dimensions); and this application does not limit the single-item class attribute, for example, the attribute value in the single-item class attribute is a data value. In addition, this application does not limit the implementation method of the single-item class attribute, for example, in some application scenarios, the single-item class attribute can be implemented using a style attribute similar to a color attribute.

[0083] Based on the relevant content of step 13 above, it can be known that for at least one candidate attribute of the component to be rendered above, each single-item class attribute can be selected from the at least one candidate attribute; and then the first attribute that meets the first useless condition is searched from these single-item class attributes, which is conducive to improving the search efficiency.

[0084] Step 14: Delete the first attribute from the above at least one candidate attribute to obtain at least one retained attribute.

[0085] Based on the relevant contents of steps 13 to 14 above, it can be known that when the above "at least one candidate attribute" includes N candidate attributes, for the nth candidate attribute, first determine whether the nth candidate attribute belongs to a single-item attribute, so that when it is determined that the nth candidate attribute belongs to a single-item attribute, further determine whether the nth candidate attribute satisfies the first useless condition. If the first useless condition is satisfied, the nth candidate attribute is deleted as an attribute with no use value; however, in other cases (for example, the nth candidate attribute does not belong to a single-item attribute, or the nth candidate attribute does not satisfy the first useless condition), the nth candidate attribute is regarded as a reserved attribute and is retained. Where n is a positive integer, n≤N, and N is a positive integer.

[0086] Case 4: In some application scenarios, in order to further reduce performance loss, not only can some unusable attributes in at least one of the above single-item attributes be deleted, but also some unusable attributes (for example, null value attributes) in multiple aggregate attributes (for example, attributes expressed in array form, etc.) can be deleted.

[0087] Based on the above situation 4, it can be known that in a possible implementation, when the above at least one candidate attribute includes at least one single-item attribute and multiple aggregated attributes, the above determination process of "at least one retained attribute" can specifically include at least the following steps 15 to 18. Among them, the execution time of step 15 is later than the execution time of S1 above, or the execution time of step 15 is later than the execution time of step 11 above.

[0088] Step 15: Search and delete the first attribute that meets the first useless condition from the at least one single-item class attribute above to obtain at least one third attribute.

[0089] The first attribute is used to represent an attribute that exists in at least one of the above single-item class attributes and has no use value in the rendering process of the component to be rendered.

[0090] The third attribute refers to an attribute that exists in at least one of the above single-item class attributes and has use value in the rendering process of the component to be rendered.

[0091] Based on the relevant content of step 15 above, it can be known that for any single-item class attribute existing in at least one candidate attribute of the component to be rendered above, it is determined whether the single-item class attribute satisfies the first useless condition. If the first useless condition is satisfied, the single-item class attribute can be regarded as the first attribute and deleted; if the first useless condition is not satisfied, the single-item class attribute can be regarded as the third attribute and retained.

[0092] Step 16: Determine at least one element attribute from the above multiple aggregation class attributes.

[0093] Among them, multiple aggregation attributes are used to describe the status of the above component to be rendered in at least two dimensions.

[0094] In addition, the present application does not limit the above-mentioned multiple aggregate attributes. For example, the attribute values ​​of the multiple aggregate attributes may include at least two data values; and the present application does not limit the representation method of the attribute values ​​of the multiple aggregate attributes. For example, it can be implemented using an array.

[0095] In addition, the present application does not limit the implementation methods of the above-mentioned multiple aggregation attributes. For example, it can be implemented using attributes such as border-radius and border-width.

[0096] An element attribute refers to an attribute information extracted from the above multiple aggregate attributes, so that the element attribute is used to represent the state of the above component to be rendered in a certain dimension (for example, the upper left corner position and other dimensions), so that the above "at least one element attribute" can represent multiple single-item attributes split from the multiple aggregate attributes.

[0097] In addition, the present application does not limit the determination process of at least one element attribute above. For example, in some application scenarios, when the multiple aggregate attributes above are in full-write format, the determination process of the at least one element attribute can be specifically as follows: according to a pre-set mapping rule, the multiple aggregate attributes are converted into multiple single-item attributes (for example, style attributes), and each single-item attribute obtained by the conversion is regarded as an element attribute, so that these element attributes can represent the attribute information carried by the multiple aggregate attributes. Among them, the full-write format refers to a representation method of the multiple aggregate attributes, so that the multiple aggregate attributes in the full-write format can more clearly represent the state of the above component to be rendered in at least two dimensions. The mapping rule refers to a pre-set rule required to be followed when converting the multiple aggregate attributes into single-item attributes; and the present application does not limit the implementation method of the mapping rule. For example, it can be implemented with the help of a mapping relationship diagram (map).

[0098] For another example, in some application scenarios, when the above multiple aggregate attributes are in abbreviated format, the process of determining at least one element attribute above can be specifically as follows: first convert the multiple aggregate attributes into a full-written format (for example, convert [1,2] into [1,1,2,2], etc.), obtain the converted attributes, so that the converted attributes are in a full-written format; then determine at least one element attribute from the converted attributes. The abbreviated format is another way of expressing the multiple aggregate attributes, so that the multiple aggregate attributes in the abbreviated format can express the state of the above component to be rendered in at least two dimensions with as few data values ​​as possible.

[0099] Based on the relevant content of step 16 above, it can be known that for any one of the multiple aggregate attributes existing in at least one candidate attribute of the component to be rendered above, the multiple aggregate attributes can be converted into some element attributes, so that the attribute information that has no use value in the multiple aggregate attributes can be deleted by screening these element attributes.

[0100] Step 17: Search and delete the fourth attribute that meets the second useless condition from the at least one element attribute above to obtain at least one fifth attribute.

[0101] Among them, the fourth attribute refers to an element attribute that exists in at least one of the above element attributes and satisfies the second useless condition, so that the fourth attribute can represent the attributes that exist in the above multiple aggregation attributes and have no use value in the rendering process of the component to be rendered.

[0102] The second useless condition refers to the condition satisfied by the attributes existing in the above-mentioned multiple aggregated attributes which have no use value in the rendering process of the component to be rendered; and the present application does not limit the implementation method of the second useless condition. For example, the second useless condition may specifically be: the fourth attribute is a null value attribute.

[0103] The fifth attribute refers to an attribute that exists in the above-mentioned multiple aggregation attributes and has use value in the rendering process of the component to be rendered.

[0104] Based on the relevant content of step 17 above, it can be known that for any one of the multiple aggregate attributes existing in at least one candidate attribute of the component to be rendered above, after extracting multiple element attributes from the multiple aggregate attributes, for any element attribute, determine whether the element attribute satisfies the second useless condition. If the second useless condition is satisfied, the element attribute can be regarded as the fourth attribute and deleted; if the second useless condition is not satisfied, the element attribute can be regarded as the fifth attribute and retained.

[0105] Step 18: Obtain at least one retained attribute based on the above at least one third attribute and the above at least one fifth attribute.

[0106] It should be noted that the present application does not limit the implementation method of step 18 above. For example, it can specifically be: combining the at least one third attribute above and the at least one fifth attribute above to obtain at least one retained attribute, so that the at least one retained attribute includes the at least one third attribute and the at least one fifth attribute.

[0107] Based on the relevant contents of steps 15 to 18 above, it can be known that in some application scenarios, for the relevant attributes of a component, different attribute screening processes can be used for different types of attributes to ensure that there is no attribute information with no use value in the attributes that are finally retained as much as possible, which is conducive to improving rendering performance.

[0108] Based on the relevant content of S2 above, it can be known that for the component to be rendered above, after obtaining at least one candidate attribute of the component to be rendered, some attributes with no use value can be found and deleted from these candidate attributes to ensure that there is no attribute information with no use value in the attributes that are finally retained as much as possible, which is conducive to improving rendering performance.

[0109] S3: Determine component attribute description information corresponding to the component to be rendered based on at least one reserved attribute.

[0110] The component attribute description information is used to describe the attributes that actually need to be referenced when rendering the component to be rendered.

[0111] In addition, the present application does not limit the method for determining the above "component property description information corresponding to the component to be rendered". For example, in some application scenarios, the "component property description information corresponding to the component to be rendered" can be specifically: first concatenate at least one of the above reserved attributes to obtain a concatenated string, so that the concatenated string includes these reserved attributes (for example, attribute name + attribute value); and then use the concatenated string as the component property description information corresponding to the component to be rendered.

[0112] In addition, the present application does not limit the application method of the above "component attribute description information corresponding to the component to be rendered". For example, for some application scenarios, after obtaining the component attribute description information corresponding to the component to be rendered, the component to be rendered can be rendered according to the component attribute description information. Among them, because there are almost no useless attributes (that is, attributes that have no use value) in the component attribute description information, there is no need to execute business logic related to these useless attributes during the component rendering process based on the component attribute description information, which is beneficial to reducing the resource consumption of the component rendering process, thereby helping to improve the component rendering performance.

[0113] Based on the relevant contents of S1 to S3 above, it can be known that for the data processing method provided in the embodiment of the present application, after obtaining at least one candidate attribute of the component to be rendered, first search and delete the first attribute that satisfies the first useless condition from the at least one candidate attribute (for example, undeclared attributes, invalid attributes, null value attributes, and other attributes that have no use value) to obtain at least one retained attribute, so that the at least one retained attribute can represent the attribute with use value that needs to be referenced during the rendering process of the component to be rendered; then, based on the at least one retained attribute, determine the component attribute description information corresponding to the component to be rendered, so that the component attribute description information can represent the attribute with use value that needs to be referenced when rendering the component to be rendered. This can effectively avoid performance loss caused by referring to a large number of attributes with no use value during the component rendering process, thereby helping to improve component rendering performance.

[0114] Based on the data processing method provided in the embodiment of the present application, the embodiment of the present application also provides a data processing device. Figure 2 Explain and illustrate. Figure 2 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. It should be noted that for the technical details of the data processing device provided in an embodiment of the present application, please refer to the relevant content of the data processing method above.

[0115] like Figure 2 As shown, the data processing device 200 provided in the embodiment of the present application includes:

[0116] The attribute acquisition unit 201 is used to acquire at least one candidate attribute of the component to be rendered;

[0117] The attribute screening unit 202 is used to search and delete the first attribute that meets the first useless condition from the at least one candidate attribute to obtain at least one retained attribute;

[0118] The information determination unit 203 is used to determine the component attribute description information corresponding to the component to be rendered according to the at least one reserved attribute.

[0119] In a possible implementation manner, the first useless condition includes one or more of the following:

[0120] The first attribute is an undeclared attribute;

[0121] The first attribute is an invalid attribute;

[0122] The first attribute is a null value attribute.

[0123] In a possible implementation manner, the data processing device 200 further includes:

[0124] The attribute processing unit is used to process the second attribute in the at least one candidate attribute so that the processed second attribute satisfies the first useless condition before searching for and deleting the first attribute that satisfies the first useless condition from the at least one candidate attribute, if there is a second attribute that satisfies the preset system default attribute condition in the at least one candidate attribute.

[0125] In one possible implementation, the at least one candidate attribute includes at least one single-item class attribute;

[0126] The attribute screening unit 202 includes:

[0127] An attribute screening subunit, configured to search for a first attribute satisfying a first useless condition from the at least one single-item class attribute;

[0128] The attribute determination subunit is used to delete the first attribute from the at least one candidate attribute to obtain at least one retained attribute.

[0129] In a possible implementation manner, the at least one candidate attribute further includes multiple aggregation attributes;

[0130] The attribute determination subunit is specifically used to: delete the first attribute from the at least one single-item class attribute to obtain at least one third attribute; determine at least one element attribute from the multiple aggregate class attributes; search and delete the fourth attribute that meets the second useless condition from the at least one element attribute to obtain at least one fifth attribute; determine the at least one retained attribute based on the at least one third attribute and the at least one fifth attribute.

[0131] In a possible implementation, the attribute determination subunit is further used to: before determining at least one element attribute from the multiple aggregate attributes, if the multiple aggregate attributes are in a shortened format, convert the multiple aggregate attributes into a full-written format.

[0132] In a possible implementation manner, the component attribute description information is obtained by concatenating the at least one reserved attribute.

[0133] In a possible implementation manner, the data processing device 200 further includes:

[0134] The component rendering unit is used to render the component to be rendered according to the component attribute description information.

[0135] Based on the relevant content of the above-mentioned data processing device 200, it can be known that for the data processing device 200 provided in the embodiment of the present application, after obtaining at least one candidate attribute of the component to be rendered, first search and delete the first attribute that meets the first useless condition from the at least one candidate attribute (for example, undeclared attributes, invalid attributes, null value attributes and other attributes that have no use value) to obtain at least one retained attribute, so that the at least one retained attribute can represent the attribute with use value that needs to be referenced in the rendering process of the component to be rendered; then, based on the at least one retained attribute, determine the component attribute description information corresponding to the component to be rendered, so that the component attribute description information can represent the attribute with use value that needs to be referenced when rendering the component to be rendered. In this way, the performance loss caused by referring to a large number of attributes with no use value during the component rendering process can be effectively avoided, thereby helping to improve the component rendering performance.

[0136] In addition, an embodiment of the present application also provides an electronic device, which includes a processor and a memory: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes any implementation of the data processing method provided in the embodiment of the present application.

[0137] See also Figure 3 , which shows a schematic diagram of the structure of an electronic device 300 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0138] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0139] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0140] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0141] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept, and the technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0142] The embodiment of the present application also provides a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes any implementation of the data processing method provided in the embodiment of the present application.

[0143] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0144] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0145] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0146] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device can execute the method.

[0147] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0148] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0149] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit / module does not, in some cases, constitute a limitation on the unit itself.

[0150] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0151] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0153] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0154] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0155] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0156] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that: The method comprises: Get at least one candidate attribute of the component to be rendered; Searching and deleting a first attribute that satisfies a first useless condition from the at least one candidate attribute to obtain at least one retained attribute; According to the at least one reserved attribute, component attribute description information corresponding to the component to be rendered is determined.

2. The method according to claim 1, characterized in that The first useless condition includes one or more of the following: The first attribute is an undeclared attribute; The first attribute is an invalid attribute; The first attribute is a null value attribute.

3. The method according to claim 1, characterized in that Before searching and deleting the first attribute satisfying the first useless condition from the at least one candidate attribute, the method further includes: If there is a second attribute that satisfies the preset system default attribute condition in the at least one candidate attribute, the second attribute in the at least one candidate attribute is processed so that the processed second attribute satisfies the first useless condition.

4. The method according to claim 1, characterized in that: The at least one candidate attribute includes at least one single-item class attribute; The step of searching and deleting a first attribute satisfying a first useless condition from the at least one candidate attribute to obtain at least one retained attribute includes: Searching for a first attribute satisfying a first useless condition from the at least one single-item class attribute; The first attribute is deleted from the at least one candidate attribute to obtain at least one retained attribute.

5. The method according to claim 4, characterized in that The at least one candidate attribute further includes a plurality of aggregate attributes; The process of determining the at least one reserved attribute comprises: Deleting the first attribute from the at least one single-item class attribute to obtain at least one third attribute; Determining at least one element attribute from the plurality of aggregate class attributes; Searching and deleting a fourth attribute satisfying a second useless condition from the at least one element attribute to obtain at least one fifth attribute; The at least one retained attribute is determined based on the at least one third attribute and the at least one fifth attribute.

6. The method according to claim 5, characterized in that Before determining at least one element attribute from the plurality of aggregate attributes, the method further includes: If the plurality of aggregate attributes are in a shortened format, the plurality of aggregate attributes are converted into a full-written format.

7. The method according to claim 1, characterized in that The component attribute description information is obtained by splicing the at least one reserved attribute.

8. A data processing device, characterized in that: include: An attribute acquisition unit, used to acquire at least one candidate attribute of the component to be rendered; an attribute screening unit, configured to search for and delete a first attribute satisfying a first useless condition from the at least one candidate attribute, to obtain at least one retained attribute; An information determination unit is used to determine component property description information corresponding to the component to be rendered based on the at least one reserved property.

9. An electronic device, characterized in that: The device comprises: a processor and a memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs in the memory so that the electronic device executes the method according to any one of claims 1 to 7.

10. A computer-readable medium, characterized in that The computer-readable medium stores instructions or computer programs, and when the instructions or computer programs are executed on a device, the device is enabled to execute the method according to any one of claims 1 to 7.