Method and device for displaying attribute field of data object, equipment and storage medium

By acquiring and displaying the definition and inheritance information of data objects and creating a tree-structured inheritance chain set, the problem of low efficiency of manual code analysis in the existing technology is solved, and the automatic display and efficient maintenance of data object properties are realized.

CN120723940APending Publication Date: 2025-09-30CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510711071.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In the prior art, in order to obtain all the attributes of a data object, workers need to analyze the code manually, resulting in low work efficiency.

Method used

By obtaining the definition information and inheritance information of each data object in the code, a tree-structured inheritance chain set is created to display all attribute fields of the data object, including the attribute fields of the ancestor node data object in the inheritance chain set.

Benefits of technology

It enables viewing all properties of data objects without manual code analysis, improves work efficiency, reduces the time for understanding and maintaining code, and enhances code maintainability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723940A_ABST
    Figure CN120723940A_ABST
Patent Text Reader

Abstract

The invention discloses a display method and device for attribute fields of data objects, equipment and a storage medium, and relates to the technical field of data analysis, definition information of each data object in a code is obtained, the definition information comprises a first attribute field defined by the data object and inheritance information, and the first attribute field and the inheritance information are stored in the code; the inheritance information represents a father node data object of the data object, then according to the inheritance information of each data object, an inheritance chain set of a tree structure of each data object is created, the inheritance chain set comprises all ancestor node data objects of the data object, and then according to the inheritance chain set, all ancestor node data objects of the data object are created; and obtaining the second attribute field inherited by the data object corresponding to the inheritance chain set, and displaying the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set, so that all attributes of the data object are displayed for a worker to check, the worker does not need to manually analyze codes, and the efficiency is improved. And the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data analysis technology, and specifically relates to a method, apparatus, device and storage medium for displaying attribute fields of a data object. Background Art

[0002] A data object has at least one attribute. For example, goods have name, weight, and size. Goods are data objects, and name, weight, and size are attributes. Newly added data objects can inherit the attributes of the added data objects. For example, the added data object is goods, and the new data object is a vehicle. The vehicle has name, weight, size, color, and model. Name, weight, and size are inherited attributes of goods, and color and model are newly added attributes.

[0003] In the related art, data objects and attribute fields of data objects are added by writing code, wherein the attribute fields of data objects can be added by definition and inheritance. The attribute fields defined in the definition code segment of the data object are the attribute fields defined by the data object. In the case where the newly defined data object inherits the previously defined data object, the attribute fields of the previously defined data object are the attribute fields inherited by the newly defined data object.

[0004] However, in order to obtain all the properties of a data object, staff need to analyze the code manually, which is inefficient. Summary of the Invention

[0005] The present application aims to provide a method, device, electronic device and storage medium for displaying the attribute fields of a data object, at least to solve the problem in the related art that in order to obtain all the attributes of a data object, staff need to analyze the code manually, resulting in low work efficiency.

[0006] In order to solve the above technical problems, this application is implemented as follows: In a first aspect, an embodiment of the present application provides a method for displaying attribute fields of a data object, the method comprising: Obtain definition information of each data object in the code, the definition information including a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents a parent node data object of the data object; Creating a tree-structured inheritance chain set for each data object according to the inheritance information of each data object, wherein the inheritance chain set includes all ancestor node data objects of the data object; According to the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed; the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set.

[0007] In a second aspect, an embodiment of the present application further provides a device for displaying attribute fields of a data object, the device comprising: A first acquisition module is configured to acquire definition information of each data object in the code, wherein the definition information includes a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents a parent node data object of the data object; A creation module, configured to create, based on the inheritance information of each data object, a tree-structured inheritance chain set for each data object, wherein the inheritance chain set includes all ancestor node data objects of the data object; The second acquisition module is used to obtain the second attribute field inherited by the data object corresponding to the inheritance chain set according to the inheritance chain set, and display the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set; the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set.

[0008] In a third aspect, an embodiment of the present application further provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0009] In a fourth aspect, an embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] In an embodiment of the present application, by obtaining definition information of each data object in the code, the definition information includes the first attribute field defined by the data object and the inheritance information of the data object, the inheritance information represents the parent node data object of the data object, and then based on the inheritance information of each data object, a tree-structured inheritance chain set of each data object is created, the inheritance chain set includes all ancestor node data objects of the data object, and then based on the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed, wherein the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set, thereby realizing the display of all attributes of the data object for staff to view, and eliminating the need for staff to manually analyze the code, thereby improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 This is a flowchart of a method for displaying attribute fields of a data object provided by an embodiment of the present application; Figure 2 This is a flowchart of the specific steps of a method for displaying attribute fields of a data object provided by an embodiment of the present application; Figure 3 This is a schematic diagram of a display process of attribute fields of a data object provided by an embodiment of the present application; Figure 4 This is a block diagram of a device for displaying attribute fields of a data object provided by an embodiment of the present application; Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0013] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0014] The following describes in detail the method for displaying the attribute fields of a data object provided by the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0015] Figure 1 This is a flowchart of a method for displaying attribute fields of a data object provided by an embodiment of the present application. Figure 1 As shown, the method may include: Step 101: Obtain definition information of each data object in the code, wherein the definition information includes a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents a parent node data object of the data object.

[0016] The attribute field of the data object is used to represent the attributes of the data object.

[0017] The attribute fields of the data object include a first attribute field defined by the data object and a second attribute field inherited by the data object.

[0018] In some embodiments, the acquired data object definition information is stored in a dictionary, where the dictionary key is the identifier of the data object, and the key value is the definition information of the data object. A dictionary is a special type of object used to store key-value pairs. Dictionaries are typically used in scenarios where a value needs to be quickly found using a string or number as a key.

[0019] In some embodiments, the inheritance structure of data objects in the code is a tree structure. The parent node data object of the data object is the other data objects inherited by the data object. The root node data object in the inheritance structure of the data object has no parent node data object, that is, the inheritance information of the root node data object is an empty value (that is, an empty array).

[0020] In some embodiments, definition information of a data object is obtained by parsing a definition code segment of the data object. For example, a result code segment representing the definition information of the data object is output by parsing the definition code segment of the data object, and the representation result code segment is stored in a dictionary.

[0021] For example, the definition code segment of the data object "Goods" in the code includes multiple lines of code in sequence: "interfaceGoods{", "name: string;", "price: string;", "unit: string;", "}".

[0022] Among them, "interface Goods" defines a data object, the identifier of the data object is Goods, that is, it defines a data object "Goods"; "name: string;" defines an attribute of the data object "Goods", name is the attribute field of the data object "Goods", and string is the type of the attribute field name; "price: string;" defines an attribute of the data object "Goods", price is the attribute field of the data object "Goods", and string is the type of the attribute field price; "unit: string;" defines an attribute of the data object "Goods", unit is the attribute field of the data object "Goods", and string is the type of the attribute field unit.

[0023] The data object "Goods" is used to represent the data object as a "commodity", the attribute field "name" of the data object "Goods" is used to represent the attribute "name" of the data object "commodity", the attribute field "price" of the data object "Goods" is used to represent the attribute "price" of the data object "commodity", and the attribute field "unit" of the data object "Goods" is used to represent the attribute "unit" of the data object "commodity"; the first attribute field defined by the data object "Goods" includes "name", "price" and "unit".

[0024] The definition code segment of the data object "FruitGoods" in the code includes multiple lines of code in sequence: "interfaceFruitGoods extends Goods {", "isOrganic: boolean;", "}".

[0025] "interface FruitGoods extends Goods" defines a data object "FruitGoods". FruitGoods inherits the previously defined data object Goods. "isOrganic:boolean;" defines a property of the data object "FruitGoods". "isOrganic" is a property field of the data object "FruitGoods", and "boolean" (logical value) is the type of the property field "isOrganic". The data object "FruitGoods" is used to represent the data object "fruit commodity". The attribute field "isOrganic" of the data object "FruitGoods" is used to represent the attribute "whether it is organic" of the data object "fruit commodity". The data object "FruitGoods" inherits the attribute fields "name", "price" and "unit" of the data object "Goods". The first attribute field of the data object "FruitGoods" includes "isOrganic", and the second attribute field of the data object "FruitGoods" includes "name", "price" and "unit". The parent node data object of the data object "FruitGoods" is "Goods".

[0026] The definition code segment of the data object "Apple" in the code includes multiple lines of code in sequence: "interfaceApple extends FruitGoods {", "hasWaxCoating: boolean;", "}".

[0027] Among them, "interface Apple extends FruitGoods" indicates the definition of a data object "Apple", which inherits the previously defined data object FruitGoods; "hasWaxCoating: boolean;" defines a property of the data object "Apple", where hasWaxCoating is the property field of the data object "Apple" and boolean is the type of the property field hasWaxCoating; The data object "Apple" is used to represent the data object "apple", and the attribute field "hasWaxCoating" of the data object "Apple" is used to represent the attribute "whether it is waxed" of the data object "apple". The data object "Apple" inherits the attribute fields "name", "price", "unit", and "isOrganic" of the data object "FruitGoods"; the first attribute field of the data object "Apple" includes "hasWaxCoating", and the second attribute field of the data object "Apple" includes "name", "price", "unit", and "isOrganic". The parent node data object of the data object "Apple" is "FruitGoods".

[0028] By parsing the definition code segment of the data object, a result code segment representing the definition information of the data object is output, wherein the field typeName is used to store the identifier of the data object, for example, ""typeName": "Goods"" means that the field typeName of the data object "Goods" stores the identifier of the data object "Goods"; the field fields is used to store the first attribute field defined by the data object and the type of the first attribute field, for example, in ""fields": [{ "namey": "name", "type": "string"},{ "namey": "price", "type": "string"},{ "namey": "unit", "type": "string"}]", the field fields of the data object "Goods" is used to store the first attribute fields "name", "price", and "unit" defined by the data object "Goods" and the type "string" of the first attribute fields "name", "price", and "unit"; the field namey is used to store the identifier of the first attribute field, for example, in ""namey": "name"", the field namey stores the identifier of the first attribute field "name"; the field "type" is used to store the type of the first attribute field, for example, "{ "namey": "name", "type": "string"}", the field "type" stores the type "string" of the first attribute field "name"; the field extendsFrom is used to store the parent node data object of the data object. For example, in ""FruitGoods": {"typeName": "FruitGoods","fields": [{ "namey": "isOrganic", "type": "boolean"}],"extendsFrom": {"typeName": "Goods"}", the inheritance information of the data object is ""extendsFrom": {"typeName": "Goods"}", and the field extendsFrom is used to store the parent node data object Goods of the data object FruitGoods; null represents a null value.

[0029] In an embodiment of the present application, by obtaining the definition information of each data object in the code, the definition information includes the first attribute field of the data object definition and the inheritance information of the data object, the inheritance information represents the parent node data object of the data object, and then according to the inheritance information of each data object, a tree-structured inheritance chain set of each data object is created.

[0030] Step 102: Create a tree-structured inheritance chain set for each data object based on the inheritance information of each data object, where the inheritance chain set includes all ancestor node data objects of the data object.

[0031] In some embodiments, the ancestor node data objects in the inheritance chain set are arranged in order to represent the tree structure of the inheritance chain set; the ancestor node is the node of the branch from the root node of the tree structure to the current node, and the ancestor node data object is the data object at the branch node; the inheritance chain set of the root node data object is an empty value.

[0032] For example, the inheritance information of data object A is data object B, the inheritance information of data object B is data object C, and the ancestor node data objects of data object A include data object B and data object C. Then the inheritance chain set of data object A includes B and C arranged in order, the inheritance chain set of data object B includes C, and the inheritance chain set of data object C is an empty value.

[0033] In some embodiments, the inheritance chain set is stored in a field, for example, in "Apple: {……extendsChain: ["FruitGoods", "Goods"],}", the field extendsChain is used to store the inheritance chain set of the data object "Apple", and the inheritance chain set of the data object "Apple" includes the data objects "FruitGoods" and "Goods".

[0034] In an embodiment of the present application, a tree-structured inheritance chain set is created for each data object based on the inheritance information of each data object, and then the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained based on the inheritance chain set, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed.

[0035] Step 103: According to the inheritance chain set, obtain the second attribute field inherited by the data object corresponding to the inheritance chain set, and display the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set; the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set.

[0036] In some embodiments, if the inheritance chain set is a null value, the data object corresponding to the inheritance chain set does not have an inherited second attribute field.

[0037] For example, the inheritance chain set of data object A includes B and C arranged in order, the first attribute field defined by data object B includes b1 and b2, and the first attribute field defined by data object C includes c1, then the second attribute field inherited by data object A includes b1, b2, and c1.

[0038] In an embodiment of the present application, by obtaining the second attribute field inherited by the data object corresponding to the inheritance chain set according to the inheritance chain set, and displaying the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set, all attributes of the data object are displayed.

[0039] To sum up, in an embodiment of the present application, by obtaining the definition information of each data object in the code, the definition information includes the first attribute field defined by the data object and the inheritance information of the data object, the inheritance information represents the parent node data object of the data object, and then according to the inheritance information of each data object, a tree-structured inheritance chain set of each data object is created, the inheritance chain set includes all ancestor node data objects of the data object, and then according to the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed, wherein the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set, thereby realizing the display of all attributes of the data object for staff to view, and there is no need for staff to manually analyze the code, thereby improving work efficiency.

[0040] Figure 2 This is a flowchart of the specific steps of the method for displaying the attribute fields of a data object provided in an embodiment of the present application, such as Figure 2 As shown, the method may include: Step 201: Obtain definition information of each data object in the code, wherein the definition information includes a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents a parent node data object of the data object.

[0041] The implementation of this step is similar to the implementation process in the above step 101 and will not be repeated here.

[0042] Step 202: Create a tree-structured inheritance chain set for each data object based on the inheritance information of each data object, where the inheritance chain set includes all ancestor node data objects of the data object.

[0043] The implementation of this step is similar to the implementation process in the above step 102 and will not be repeated here.

[0044] Optionally, in some embodiments, step 202 includes the following sub-steps: Sub-step 2021: When the inheritance information of the first data object in the code represents the second data object in the code, add the second data object to the inheritance chain set of the first data object.

[0045] In some embodiments, the second data object is added to the inheritance chain set of the first data object, that is, the second data object is stored in a field of the inheritance chain set of the first data object, and the initial value of the field of the inheritance chain set is a null value (ie, an empty array).

[0046] For example, the inheritance information of the first data object is "FruitGoods: {……"extendsFrom": {"typeName": "Goods"}}", and the field extendsFrom is used to store the parent node data object Goods of the data object FruitGoods, that is, the parent node data object of the first data object FruitGoods is the second data object Goods in the code, then the second data object Goods is added to the inheritance chain set of the first data object FruitGoods, that is, Goods is added to the field extendsChain of the inheritance chain set of the first data object FruitGoods, then there is "FruitGoods:{……extendsChain: ["Goods"],}".

[0047] In an embodiment of the present application, when the inheritance information of the first data object in the code represents the second data object, the second data object is added to the inheritance chain set of the first data object, and then the first attribute field of the second data object in the inheritance chain set of the first data object is determined as the second attribute field of the first data object.

[0048] Sub-step 2022: When the inheritance information of the first data object in the code is a null value, determine that the inheritance chain set of the first data object is a null value.

[0049] In some embodiments, when the inheritance information of the first data object in the code is a null value, the first data object is a root node data object in the tree inheritance structure of data objects in the code.

[0050] For example, the inheritance information of the first data object is "Goods: {……"extendsFrom": null}", the field extendsFrom is used to store the parent node data object of the data object Goods, null represents a null value, that is, the inheritance information of the first data object Goods is a null value, and it is determined that the inheritance chain set of the first data object is a null value.

[0051] In the embodiment of the present application, when the inheritance information of the first data object in the code is a null value, it is determined that the inheritance chain set is a null value, and then it is determined that the first data object does not inherit the second attribute field.

[0052] By executing sub-steps 2021 to 2022 , it is possible to add the parent node data object of the first data object to the inheritance chain set of the first data object or to determine the second attribute field that the first data object does not inherit.

[0053] Optionally, in some embodiments, after sub-step 2021, step 202 further includes the following sub-steps: Sub-step 2023: If the inheritance information of the second data object represents a third data object in the code, add the third data object to the inheritance chain set of the first data object.

[0054] For example, the inheritance information of the first data object is ""Apple": {……"extendsFrom": {"typeName": "FruitGoods"}}", and the field extendsFrom is used to store the parent node data object FruitGoods of the data object Apple. That is, the parent node data object of the first data object Apple is the second data object FruitGoods in the code, then the second data object FruitGoods is added to the inheritance chain set of the first data object Apple, that is, FruitGoods is added to the field extendsChain of the inheritance chain set of the first data object Apple, and then there is "Apple:{……extendsChain: ["FruitGoods"],}"; The inheritance information of the second data object is "FruitGoods: {……"extendsFrom": {"typeName":"Goods"}}", and the field extendsFrom is used to store the parent node data object Goods of the data object FruitGoods, that is, the parent node data object of the second data object FruitGoods is the third data object Goods in the code, then the third data object Goods is added to the inheritance chain set of the first data object Apple, that is, Goods is added to the field extendsChain of the inheritance chain set of the first data object Apple, then there is Apple: {……extendsChain: ["FruitGoods", "BaseGoods"],}".

[0055] In an embodiment of the present application, when the inheritance information of the second data object represents the third data object in the code, the third data object is added to the inheritance chain set of the first data object, and then the first attribute field of the third data object in the inheritance chain set of the first data object is determined as the second attribute field of the first data object.

[0056] Sub-step 2024: When the inheritance information of the second data object is a null value, determine that the creation of the inheritance chain set of the first data object is complete.

[0057] In some embodiments, when the inheritance information of the second data object is a null value, the second data object is a root node data object in a tree inheritance structure of data objects in the code.

[0058] For example, the inheritance information of the first data object is "FruitGoods: {……"extendsFrom": {"typeName": "Goods"}}", and the field extendsFrom is used to store the parent node data object Goods of the data object FruitGoods. That is, the parent node data object of the first data object FruitGoods is the second data object Goods in the code, then the second data object Goods is added to the inheritance chain set of the first data object FruitGoods, that is, Goods is added to the field extendsChain of the inheritance chain set of the first data object FruitGoods, then there is "FruitGoods:{……extendsChain: ["Goods"],}" The inheritance information of the second data object is "Goods: {……"extendsFrom": null}". The field extendsFrom is used to store the parent node data object of the data object Goods. Null represents a null value, that is, the inheritance information of the second data object Goods is a null value. At this time, it is determined that the inheritance chain set of the first data object FruitGoods is created.

[0059] In an embodiment of the present application, when the inheritance information of the second data object is a null value, it is determined that the creation of the inheritance chain set of the first data object is completed to obtain the inheritance chain set of the first data object, and then the first attribute field of the ancestor node data object in the inheritance chain set of the first data object is determined as the second attribute field of the first data object.

[0060] By executing sub-steps 2023 to 2024 , it is possible to add the third data object to the inheritance chain set of the first data object or determine that the creation of the inheritance chain set of the first data object is complete.

[0061] In some embodiments, after sub-step 2023, the inheritance information of the third data object is continued to be determined. When the inheritance information of the third data object indicates that the inheritance information of the third data object is a null value, it is determined that the creation of the inheritance chain set of the first data object is complete. When the inheritance information of the third data object indicates that the fourth data object in the code is added, the fourth data object is added to the inheritance chain set of the first data object, and so on. According to this method, the ancestor node data objects of the first data object are sequentially added to the inheritance chain set of the first data object until the root node data object of the first data object is added to the inheritance chain set of the first data object, and it is determined that the creation of the inheritance chain set of the first data object is complete. All ancestor node data objects of the first data object are added to the inheritance chain set of the first data object to obtain the inheritance chain set of the first data object, and then the first attribute field of the ancestor node data object in the inheritance chain set of the first data object is determined as the second attribute field of the first data object.

[0062] Step 203: determine the first attribute field of the ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set, and display the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set.

[0063] For example, the first attribute field defined by data object A includes a1, the inheritance chain set of data object A includes data object B and data object C arranged in order, the first attribute field defined by data object B includes b1 and b2, and the first attribute field defined by data object C includes c1, then b1, b2, and c1 are all determined to be the second attribute field of data object A, and the first attribute field a1 and the second attribute fields b1, b2, and c1 of data object A are displayed.

[0064] In an embodiment of the present application, by determining the first attribute field of the ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set, and displaying the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set, all attributes of the data object are displayed.

[0065] Optionally, in some embodiments, each of the data objects has a corresponding attribute field set; determining the first attribute field of the ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set includes the following sub-steps: Sub-step 2031: Add the first attribute field of each ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set.

[0066] In some embodiments, the ancestor node data objects in the inheritance chain set are sequentially executed: the first attribute field of the ancestor node data object in the inheritance chain set is added as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set. For example, starting from the root node data object in the inheritance chain set, the first attribute field of the root node data object in the inheritance chain set is added as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set. Then, the first attribute field of the child node data object of the root node data object in the inheritance chain set is added as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set, and so on, ..., until the first attribute field of the parent node data object of the data object corresponding to the inheritance chain set is added as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set.

[0067] In some embodiments, the attribute field set is stored in a collection field, and the initial value of the collection field is a null value (ie, an empty array).

[0068] In some embodiments, in the process of adding the first attribute field of each ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set, the second attribute field in the attribute field set of the data object is deduplicated. For example, when the collection field allFields of the inheritance chain set includes the field name, and the second attribute field newly added to allFields is name, name in allFields is deleted, and the newly added second attribute field is inserted into the tail of the allFields field; when all the fields in allFields are different from the second attribute field newly added to allFields, the newly added second attribute field is directly inserted into the tail of the allFields field.

[0069] In an embodiment of the present application, the first attribute field of each ancestor node data object in the inheritance chain set is added to the attribute field set of the data object corresponding to the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set, thereby displaying the attribute field set.

[0070] Optionally, in some embodiments, the method further comprises the following steps: Step 204: Add the first attribute field of the data object to the attribute field set of the data object.

[0071] In an embodiment of the present application, after the first attribute field of each ancestor node data object in the inheritance chain set is added to the attribute field set of the data object corresponding to the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set, the first attribute field of the data object is added to the attribute field set of the data object, and then the attribute field set is displayed to realize the display of the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set.

[0072] The step of displaying the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set includes the following sub-steps: Sub-step 2032: display the attribute field set.

[0073] In the embodiment of the present application, the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed by displaying the attribute field set.

[0074] Optionally, in some embodiments, each of the data objects has a corresponding attribute field set; the definition information further includes the type of the first attribute field of the data object; and the method further includes the following steps: Step 205: Add the type of the first attribute field and the type of the second attribute field of the data object to the attribute field set of the data object.

[0075] In an embodiment of the present application, by adding the type of the first attribute field and the type of the second attribute field of the data object to the attribute field set of the data object, and then displaying the attribute field set, the type of the first attribute field and the type of the second attribute field of the data object corresponding to the inheritance chain set are displayed.

[0076] In some embodiments, when other fields in the collection field are excluded, the result code segment of the fields of the attribute field set is displayed to display the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set; the other fields are fields other than the first attribute field, the second attribute field, the type of the first attribute field, and the type of the second attribute field in the collection field.

[0077] For example, in "Apple: {……"fields": [{ "namey": "hasWaxCoating", "type": "boolean"}],……extendsChain: ["FruitGoods", "Goods"],}", the field extendsChain is used to store the inheritance chain set of the data object "Apple", which includes the data objects "FruitGoods" and "Goods". The field fields of the data object "Apple" is used to store the first attribute field "hasWaxCoating" defined by the data object "Apple" and the type "boolean" of the first attribute field "hasWaxCoating"; In “"Goods": {……"fields": [{ "namey": "name", "type": "string"},{ "namey": "price", "type": "string"},{ "namey": "unit", "type": "string"}],……},”, the field fields of the data object “Goods” is used to store the first attribute fields “name”, “price”, “unit” and the type “string” of the first attribute fields “name”, “price” and “unit” defined by the data object “Goods”; the data object “Goods” is the root node data object, then “name”, “price”, “unit” and the type “string” of the first attribute fields “name”, “price” and “unit” are added to the attribute field set of the data object Apple, that is, stored in the collection field “allFields” of the attribute field set of the data object Apple.

[0078] In “"FruitGoods": {……"fields": [{ "namey": "isOrganic", "type": "boolean"}],……}},”, the field fields of the data object “FruitGoods” is used to store the first attribute field “isOrganic” defined by the data object “FruitGoods” and the type “boolean” of the first attribute field “isOrganic”; the data object “FruitGoods” is the parent node data object of the data object Apple, so “isOrganic” and the type “boolean” of the first attribute field “isOrganic” are added to the attribute field set of the data object Apple, that is, stored in the collection field “allFields” of the attribute field set of the data object Apple.

[0079] Then, "hasWaxCoating" and the first attribute field "hasWaxCoating" of type "boolean" are added to the attribute field collection of the data object Apple, that is, stored in the collection field "allFields" of the attribute field collection of the data object Apple; At this time, the resulting code segment of the collection field "allFields" of Apple's attribute field collection is: "Apple:{……allFields: [{ "namey": "name", "type": "string"},{ "namey": "price", "type": "string"},{ "namey": "unit", "type": "string"},{ "namey": "isOrganic", "type": "boolean"}{ "namey": "hasWaxCoating", "type": "boolean"}]}……}"; Initialize the compeletDef field on the data object with a string type, initialize a variable def with the format of "interface typeName {", where typeName is the identifier of the data object, traverse each field in the attribute field set, take out the field name and field type of allFields, generate the string \nname: type;, then concatenate the string after def, and repeat the above operation until all fields in allFields are traversed. Finally, add the} string after def as the end to eliminate other fields in the collection field of the attribute field set. The code segment showing the fields of the final attribute field set includes multiple lines of code in sequence: "interface Apple {", "name: string;", "price: string;", "unit: string;", "isOrganic: boolean;", "hasWaxCoating: boolean;", "}".

[0080] Among them, all attribute fields of the data object "Apple" include "name", "price", "unit", "isOrganic", and "hasWaxCoating", which means that all attributes of the data object "Apple" include name, price, unit, whether it is organic, and whether it is waxed, thereby realizing the display of all attributes of the data object "Apple"; in addition, the types of the attribute fields "name", "price", and "unit" are all string, and the types of the attribute fields "isOrganic" and "hasWaxCoating" are all boolean, thereby realizing the display of the types of all attribute fields of "Apple"; the attribute field "hasWaxCoating" is the first attribute field of the data object "Apple", and the attribute fields "name", "price", "unit", and "isOrganic" are all the second attribute fields of the data object "Apple".

[0081] Reference Figure 3In some embodiments, the display process of the attribute fields of the data objects of the embodiments of the present application includes: X1. Start; X2. Obtain the definition information of the data object, that is, obtain the first attribute field, the type of the first attribute field, and the parent node data object of each data object definition in the code; X3. Define the definition structure of the data object, that is, define it in a dictionary, the key value (key) of the dictionary is the identifier of the data object, and the key value (value) is the definition information of the data object; X4. Store the definition information of the data object in the dictionary; X5. Parse the type inheritance relationship, that is, obtain the parent node data object of the data object; X6. Initialize the fields of the inheritance chain set, that is, set the initial value of the collection field of the inheritance chain set of the data object to a null value; X7. Parse the fields of the inheritance chain set, that is, create an inheritance chain set of a tree structure for each data object according to the inheritance information of each data object; X8. Add the parent node data object to the fields of the inheritance chain set, that is, when the inheritance information of the first data object in the code represents the second data object, the second data object is added to the inheritance chain set. According to the embodiment of the present invention, a first data object is added to the inheritance chain set of the first data object; X9, the inheritance relationship of the data object is recursively parsed, that is, each ancestor node data object of the first data object is added to the inheritance chain set of the first data object in turn; X10, the inheritance parsing is ended, that is, when the root node data object of the first data object is added to the inheritance chain set of the first data object, it is determined that the creation of the inheritance chain set of the first data object is completed; X11, all attribute fields of the data object are calculated, that is, the first attribute field defined by the ancestor node data object in the inheritance chain set is obtained; X12, the fields of the attribute field set are initialized, that is, the initial values ​​of the fields of the attribute field set are set to null values; X13, the attribute fields are superimposed in the inheritance order, that is, the ancestor node data objects in the inheritance chain set are executed in turn to add the first attribute field of the ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set; X14, the fields of the attribute field set are generated; X15, end.

[0082] An embodiment of the present application provides a definition capture mechanism for data objects, designs a TypeDef (data object definition) data structure for storing data object definition information, and uses a TypeDefMap dictionary structure to uniformly manage the definition information of all data objects, facilitating quick search and access. An embodiment of the present application provides an inheritance relationship parsing system, records the complete inheritance chain of data objects through the extendsChain array, and automatically parses the complete inheritance path from the current data object to the root node data object in a recursive manner to ensure the integrity and accuracy of the inheritance relationship. An embodiment of the present application implements field merging and overwriting processing, designs an allFields structure to store all attribute fields of a data object, automatically merges the attribute fields defined by the ancestor node data object in inheritance order, implements an intelligent overwriting mechanism when attribute fields have duplicate names, and ensures that the attribute fields of the child data object have higher priority than the attribute fields of the parent data object. In addition, an embodiment of the present application implements definition display generation of data objects, automatically generates a standard data object definition string based on the collected complete attribute field information, provides clear formatted output, and is easy for developers to understand and use, thereby solving the problem of difficult intuitive display of the inheritance relationship of data objects in data development, and improving development efficiency and code maintainability.

[0083] In an embodiment of the present application, by automatically calculating and displaying the complete definition of a data object, developers no longer need to manually track and deduce the inheritance relationships of complex data objects, reducing the time developers spend on understanding the structure of data objects, allowing them to focus more on the development of business logic, reducing code errors caused by misunderstandings of data objects, reducing debugging time, and improving development efficiency; the embodiment of the present application clearly displays the complete structure of a data object, making the code easier to understand and maintain. When a data object needs to be modified or extended, developers can intuitively see all the attribute fields of the data object, avoiding duplication or conflict of attribute fields, which helps team collaboration and enables new developers to quickly understand the existing type system, thereby enhancing code maintainability; the embodiment of the present application ensures the accuracy of the inheritance relationship of data objects through a systematic data object calculation process, automatically handles the field coverage mechanism, avoids human judgment errors, reduces runtime errors caused by unclear type definitions, and thus improves the reliability of the type system; The embodiments of the present application provide an intuitive display of data object definitions, making the structure of data objects clear at a glance. The automated calculation process of data objects reduces the mental burden of developers. The standardized output format facilitates code review and document generation, thereby optimizing the development experience. In addition, the embodiments of the present application reduce the need for code refactoring due to misunderstandings of data objects, improve the readability of the code, reduce the difficulty of code maintenance, and help keep the code base tidy and consistent. These effects together improve the quality and efficiency of data development, bring significant technical value and economic benefits, and thus reduce project maintenance costs.

[0084] To sum up, in an embodiment of the present application, by obtaining the definition information of each data object in the code, the definition information includes the first attribute field defined by the data object and the inheritance information of the data object, the inheritance information represents the parent node data object of the data object, and then according to the inheritance information of each data object, a tree-structured inheritance chain set of each data object is created, the inheritance chain set includes all ancestor node data objects of the data object, and then according to the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed, wherein the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set, thereby realizing the display of all attributes of the data object for staff to view, and there is no need for staff to manually analyze the code, thereby improving work efficiency.

[0085] Figure 4 This is a block diagram of a device for displaying attribute fields of a data object provided by an embodiment of the present application, such as Figure 4 As shown, the device 300 includes: The first acquisition module 301 is used to acquire definition information of each data object in the code, wherein the definition information includes a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents the parent node data object of the data object; A creation module 302 is configured to create a tree-structured inheritance chain set for each data object based on the inheritance information of each data object, wherein the inheritance chain set includes all ancestor node data objects of the data object; The second acquisition module 303 is used to obtain the second attribute field inherited by the data object corresponding to the inheritance chain set according to the inheritance chain set, and display the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set; the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set.

[0086] Optionally, the creation module 302 includes: a first adding submodule, configured to add a second data object to an inheritance chain set of the first data object when the inheritance information of the first data object in the code represents a second data object in the code; The first determining submodule is configured to determine that the inheritance chain set of the first data object is a null value when the inheritance information of the first data object in the code is a null value.

[0087] Optionally, the creation module 302 further includes: a second adding submodule, configured to add the third data object to the inheritance chain set of the first data object when the inheritance information of the second data object represents a third data object in the code; The second determining submodule is configured to determine that creation of the inheritance chain set of the first data object is complete when the inheritance information of the second data object is a null value.

[0088] Optionally, the second obtaining module 303 includes: The third determining submodule is configured to determine the first attribute field of the ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set.

[0089] Optionally, each of the data objects has a corresponding attribute field set; the third determining submodule includes: The adding unit is used to add the first attribute field of each ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set.

[0090] Optionally, the apparatus 300 further includes: A first adding module, configured to add the first attribute field of the data object to the attribute field set of the data object; The second acquisition module 303 includes: The display submodule is used to display the attribute field set.

[0091] Optionally, each of the data objects has a corresponding attribute field set; the definition information further includes the type of the first attribute field of the data object; the apparatus 300 further includes: The second adding module is used to add the type of the first attribute field and the type of the second attribute field of the data object to the attribute field set of the data object.

[0092] In the embodiments of the present application, the device for displaying the attribute fields of a data object can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc., without specific limitation in the embodiments of the present application.

[0093] In the embodiment of the present application, the device for displaying the attribute fields of the data object can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0094] The display device of the attribute field of the data object provided by the embodiment of the present application can realize Figure 1 To avoid repetition, the various processes implemented by the device for displaying the attribute fields of a data object in the method embodiment are not described here.

[0095] In an embodiment of the present application, by obtaining definition information of each data object in the code, the definition information includes the first attribute field defined by the data object and the inheritance information of the data object, the inheritance information represents the parent node data object of the data object, and then based on the inheritance information of each data object, a tree-structured inheritance chain set of each data object is created, the inheritance chain set includes all ancestor node data objects of the data object, and then based on the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed, wherein the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set, thereby realizing the display of all attributes of the data object for staff to view, and eliminating the need for staff to manually analyze the code, thereby improving work efficiency.

[0096] Optionally, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the various processes of the embodiment of the method for displaying the attribute fields of the above-mentioned data object are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.

[0097] The electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices described above.

[0098] Figure 5 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0099] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .

[0100] Those skilled in the art will understand that the electronic device 400 may also include a power supply (such as a battery) to power each component. The power supply may be logically connected to the processor 410 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.

[0101] The processor 410 is configured to obtain definition information of each data object in the code, wherein the definition information includes a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents a parent node data object of the data object; Creating a tree-structured inheritance chain set for each data object according to the inheritance information of each data object, wherein the inheritance chain set includes all ancestor node data objects of the data object; According to the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed; the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set.

[0102] In an embodiment of the present application, by obtaining definition information of each data object in the code, the definition information includes the first attribute field defined by the data object and the inheritance information of the data object, the inheritance information represents the parent node data object of the data object, and then based on the inheritance information of each data object, a tree-structured inheritance chain set of each data object is created, the inheritance chain set includes all ancestor node data objects of the data object, and then based on the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed, wherein the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set, thereby realizing the display of all attributes of the data object for staff to view, and eliminating the need for staff to manually analyze the code, thereby improving work efficiency.

[0103] Optionally, the processor 410 is further configured to, when the inheritance information of the first data object in the code represents the second data object in the code, add the second data object to the inheritance chain set of the first data object; and when the inheritance information of the first data object in the code is a null value, determine that the inheritance chain set of the first data object is a null value.

[0104] Optionally, the processor 410 is further configured to, after adding the second data object to the inheritance chain set of the first data object, add the third data object to the inheritance chain set of the first data object when the inheritance information of the second data object represents the third data object in the code; and determine that the creation of the inheritance chain set of the first data object is complete when the inheritance information of the second data object is a null value.

[0105] Optionally, the processor 410 is further configured to determine the first attribute field of the ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set.

[0106] Optionally, each of the data objects has a corresponding attribute field set; the processor 410 is also used to add the first attribute field of each of the ancestor node data objects in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set to the attribute field set of the data object corresponding to the inheritance chain set.

[0107] Optionally, the processor 410 is further configured to add the first attribute field of the data object to an attribute field set of the data object; and display the attribute field set.

[0108] Optionally, each of the data objects has a corresponding attribute field set; the definition information also includes the type of the first attribute field of the data object; the processor 410 is further used to add the type of the first attribute field and the type of the second attribute field of the data object to the attribute field set of the data object.

[0109] In an embodiment of the present application, by obtaining definition information of each data object in the code, the definition information includes the first attribute field defined by the data object and the inheritance information of the data object, the inheritance information represents the parent node data object of the data object, and then based on the inheritance information of each data object, a tree-structured inheritance chain set of each data object is created, the inheritance chain set includes all ancestor node data objects of the data object, and then based on the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed, wherein the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set, thereby realizing the display of all attributes of the data object for staff to view, and eliminating the need for staff to manually analyze the code, thereby improving work efficiency.

[0110] It should be understood that in the embodiments of the present application, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042. The GPU 4041 processes image data of still images or videos captured by an image capture device (e.g., a camera) in video capture mode or image capture mode. The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 407 includes a touch panel 4071 or at least one of other input devices 4072. The touch panel 4071, also known as a touch screen, may include a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on / off keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

[0111] Memory 409 can be used to store software programs and various data. Memory 409 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). Furthermore, memory 409 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0112] Processor 410 may include one or more processing units. Optionally, processor 410 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 410.

[0113] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the embodiment of the method for displaying the attribute fields of the above-mentioned data object are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0114] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.

[0115] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the embodiment of the method for displaying the attribute fields of the above-mentioned data object, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0116] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0117] In this document, the terms "comprises", "includes" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0118] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of this application.

[0119] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A method for displaying attribute fields of a data object, characterized in that: The method comprises: Obtain definition information of each data object in the code, the definition information including a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents a parent node data object of the data object; Creating a tree-structured inheritance chain set for each data object according to the inheritance information of each data object, wherein the inheritance chain set includes all ancestor node data objects of the data object; According to the inheritance chain set, the second attribute field inherited by the data object corresponding to the inheritance chain set is obtained, and the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed; the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set.

2. The method according to claim 1, characterized in that The step of creating a tree-structured inheritance chain set for each data object according to the inheritance information of each data object includes: In a case where the inheritance information of the first data object in the code represents the second data object in the code, adding the second data object to the inheritance chain set of the first data object; When the inheritance information of the first data object in the code is a null value, it is determined that the inheritance chain set of the first data object is a null value.

3. The method according to claim 2, characterized in that After adding the second data object to the inheritance chain set of the first data object, creating a tree-structured inheritance chain set for each data object according to the inheritance information of each data object further includes: In a case where the inheritance information of the second data object represents a third data object in the code, adding the third data object to the inheritance chain set of the first data object; When the inheritance information of the second data object is a null value, it is determined that the creation of the inheritance chain set of the first data object is complete.

4. The method according to claim 1, wherein The acquiring, according to the inheritance chain set, a second attribute field inherited by the data object corresponding to the inheritance chain set includes: The first attribute field of the ancestor node data object in the inheritance chain set is determined as the second attribute field of the data object corresponding to the inheritance chain set.

5. The method according to claim 4, characterized in that Each of the data objects has a corresponding attribute field set; determining the first attribute field of the ancestor node data object in the inheritance chain set as the second attribute field of the data object corresponding to the inheritance chain set includes: The first attribute field of each ancestor node data object in the inheritance chain set is used as the second attribute field of the data object corresponding to the inheritance chain set, and is added to the attribute field set of the data object corresponding to the inheritance chain set.

6. The method according to claim 5, characterized in that The method further comprises: Adding the first attribute field of the data object to the attribute field set of the data object; The first attribute field and the second attribute field of the data object corresponding to the inheritance chain set are displayed, including: Display the attribute field set.

7. The method according to claim 1, characterized in that Each of the data objects has a corresponding set of attribute fields; the definition information further includes the type of the first attribute field of the data object; the method further includes: The type of the first attribute field and the type of the second attribute field of the data object are added to the attribute field set of the data object.

8. A device for displaying attribute fields of a data object, characterized in that: The device comprises: A first acquisition module is configured to acquire definition information of each data object in the code, wherein the definition information includes a first attribute field defined by the data object and inheritance information of the data object; the inheritance information represents a parent node data object of the data object; A creation module, configured to create, based on the inheritance information of each data object, a tree-structured inheritance chain set for each data object, wherein the inheritance chain set includes all ancestor node data objects of the data object; The second acquisition module is used to obtain the second attribute field inherited by the data object corresponding to the inheritance chain set according to the inheritance chain set, and display the first attribute field and the second attribute field of the data object corresponding to the inheritance chain set; the second attribute field is the first attribute field of the ancestor node data object in the inheritance chain set.

9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the method for displaying the attribute fields of a data object as described in any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method for displaying the attribute field of a data object according to any one of claims 1 to 7 are implemented.