CN116541005A - Abstract description method, device, equipment and medium for front-end interface configuration - Google Patents

Abstract description method, device, equipment and medium for front-end interface configuration Download PDF

Info

Publication number
CN116541005A
CN116541005A CN202310672543.7A CN202310672543A CN116541005A CN 116541005 A CN116541005 A CN 116541005A CN 202310672543 A CN202310672543 A CN 202310672543A CN 116541005 A CN116541005 A CN 116541005A
Authority
CN
China
Prior art keywords
node
josn
abstract
node object
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310672543.7A
Other languages
Chinese (zh)
Inventor
李江坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN202310672543.7A priority Critical patent/CN116541005A/en
Publication of CN116541005A publication Critical patent/CN116541005A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the specification discloses an abstract description method, a device, equipment and a medium for front-end interface configuration, which comprise the following steps: sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface; acquiring abstract types of JOSN component configuration to determine node object identifiers of the JOSN component configuration based on the abstract types; acquiring a corresponding node object from a preset node object memory based on the node object identifier; assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects; and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is completed or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.

Description

Abstract description method, device, equipment and medium for front-end interface configuration
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an abstract description method for front end interface configuration.
Background
Front-end often refers to the foreground portion of a web site, and may include the presentation and structural layers of the web site. In the related art, the front-end interface may be built by, for example, generating an interface with the style of the front-end framework by front-end framework software such as Bootstrap, or generating a template stored in HTML (HyperText Markup Language ) format by a template website, and retrieving the template when in use. In most current low code platforms, the development of forms will result in JSON configuration of the form interface description.
When the form interface is modified in development, JSON configuration is directly modified. As the functions of the construction become more complex, JSON configuration structures become more complex and hierarchies become deeper. In the current mode, after a component is modified, nodes of the component need to be traversed in JSON configuration, and when the JSON level is deep, the nodes need to be searched layer by layer, so that the performance and usability are poor when the JSON configuration is modified. As forms get more and more complex, JSON configurations get more and more complex, and the performance becomes worse when modifying JSON configurations. When one component is modified and other associated nodes are required to be modified at the same time, all the previous places for modifying the component JSON are required to be modified and are not easy to expand, so that abstract description of front-end interface configuration becomes a demanding problem to be solved.
Disclosure of Invention
In order to solve the above technical problems, one or more embodiments of the present disclosure provide an abstract description method of front-end interface configuration.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present disclosure provide an abstract description method for front-end interface configuration, where the method includes:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
Optionally, in one or more embodiments of the present specification, before obtaining a type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the type, the method further includes:
determining an initial type of the JOSN configuration described by the front-end interface; wherein the initial types include: object, array, number, string, boolean;
determining a type abstraction rule of each initial type based on the field length and the field attribute of the initial type so as to abstract the initial type based on the type abstraction rule to obtain an abstract type; wherein the abstract type comprises: simple type, node list.
Optionally, in one or more embodiments of the present disclosure, before the preset node object memory acquires the corresponding node object based on the node object identifier, the method further includes:
determining the corresponding relation between the node object identification and the corresponding node object;
establishing a key value pair of the node object identifier and the corresponding node object based on the corresponding relation;
and storing the corresponding node object in a preset node object memory so as to acquire the corresponding node object corresponding to the node object identification in the preset node memory based on the key value pair.
Optionally, in one or more embodiments of the present specification, determining the node object identifier configured by the JOSN component based on the abstract type specifically includes:
acquiring a node acquisition instruction of a preset JSON configuration processor; the node obtaining instruction is as follows: getNodeByType;
and inputting the field of the abstract type into the node acquisition instruction to acquire the node object identification configured by the JOSN component.
Optionally, in one or more embodiments of the present disclosure, iteratively obtaining an attribute of the assigned node object to determine, based on an abstract type corresponding to the attribute, whether the JOSN component configuration is abstract to be converted into a corresponding node object, including:
traversing the assigned node object attribute to obtain an abstract type corresponding to the assigned node object attribute;
if the abstract type corresponding to the attribute is determined to have a node or a node list, carrying out iterative assignment on the attribute to determine that the node or the node list does not exist in the node object attribute after the iterative assignment;
if the node object attribute after the iterative assignment is determined to not have the node or the node list, determining that the JOSN component is configured to be abstract, and converting the abstract configuration to a corresponding node object.
Optionally, in one or more embodiments of the present disclosure, performing iterative assignment on the attribute to determine that no node or node list exists in the node object attribute after the iterative assignment, including specifically:
acquiring a node conversion method of a preset JSON configuration processor to convert the attribute into an iterative node object based on the node conversion method;
and assigning the iterative node object based on the value configured by the JOSN component to obtain the node object after iterative assignment so as to judge whether the node or the node list in the node object attribute after iterative assignment.
Optionally, in one or more embodiments of the present disclosure, the iterating obtains an attribute of the assigned node object, so as to determine, based on an abstract type corresponding to the attribute, whether the JOSN component configuration is abstract, so as to convert the JOSN component configuration into a corresponding node object, and then the method further includes:
monitoring attribute expansion operation of the node object; wherein, the attribute expansion operation user changes the attribute value of the node object;
if the node object is determined to trigger attribute expansion operation, a corresponding event expansion method is called to synchronize the associated nodes based on the event expansion method; the event expansion method comprises the following steps: setValueEvent.
One or more embodiments of the present specification provide an abstract description apparatus for front-end interface configuration, the apparatus including:
the first acquisition unit is used for sequentially acquiring JOSN component configuration described by the front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
the determining unit is used for obtaining the abstract type of the JOSN component configuration so as to determine the node object identification of the JOSN component configuration based on the abstract type;
the second acquisition unit is used for acquiring the corresponding node object from a preset node object memory based on the node object identifier;
the assignment unit is used for assigning the corresponding node object based on the value configured by the JOSN component so as to obtain an assigned node object;
and the abstract conversion unit is used for iteratively acquiring the attributes of the assigned node objects so as to judge whether the JOSN component configuration is abstract or not based on the abstract type corresponding to the attributes, so as to convert the JOSN component configuration into the corresponding node objects.
One or more embodiments of the present specification provide an abstract description device of a front-end interface configuration, the device including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer-executable instructions configured to:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
The above-mentioned at least one technical scheme that this description embodiment adopted can reach following beneficial effect:
the corresponding node object can be quickly obtained from the preset node object memory based on the key value pair of the node object, so that subsequent operation is performed, and the processing efficiency is improved. By converting the JONS configuration into the node object, the method corresponding to the node can be directly invoked to realize modification when the JONS configuration is modified, so that the problem that the code platform expansibility is poor due to the fact that the JSON node of the component needs to be modified and other nodes related to the component also need to be modified in the existing mode is solved. In addition, the advanced nodes inherit the DomNode, so that the abstract JONS simplifies the structure of the page description.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
fig. 1 is a schematic flow chart of an abstract description method of front-end interface configuration according to an embodiment of the present disclosure;
fig. 2 is a schematic internal structure diagram of an abstract description device of front-end interface configuration according to an embodiment of the present disclosure;
fig. 3 is a schematic internal structure diagram of an abstract description device of front-end interface configuration according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an internal structure of a nonvolatile storage medium according to an embodiment of the present disclosure.
Detailed Description
The embodiment of the specification provides an abstract description method, device, equipment and medium for front-end interface configuration.
In most low code platforms, the development of forms will result in JSON configuration of the form interface description. When the form interface is modified in development, JSON configuration is directly modified. As the functions of the construction become more complex, JSON configuration structures become more complex and hierarchies become deeper. Without abstracting the JSON configuration, several problems are faced: firstly, in the traditional mode, after a component is modified, nodes which need to be traversed in JSON configuration and find the component are needed to be searched layer by layer when the JSON level is deep, and the performance and usability are poor when the JSON configuration is modified. As forms get more and more complex, JSON configurations get more and more complex, and the performance becomes worse when modifying JSON configurations. Secondly, a large number of components are arranged in the low code platform, when components are added, modified and deleted on a form or other operations are carried out on the components, nodes of JSON configuration need to be modified, not only are JSON nodes of the components required to be modified, but also other nodes related to the components are required to be modified. For example: when a button assembly is added, a command for clicking the button needs to be added. If the JSON configuration is not abstracted, when one component is modified and other associated nodes need to be modified at the same time, all the previous places where the component JSON is modified need to be modified, and the expansion is not easy to carry out. Thirdly, along with the increasing complexity of the constructed functions, nodes of JSON configuration are more and more, structures are more and more complex, some similar node header containers and page content containers are all subordinate to the containers and have container type attributes such as length, width, layout mode and the like, but redundant storage is carried out in the JSON configuration, so that the JSON configuration structure is complex. In order to solve the above-mentioned problems, an abstract description method of front-end interface configuration is provided in the embodiments of the present disclosure to abstract JSON configuration.
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present disclosure.
As shown in FIG. 1, one or more embodiments of the present disclosure provide a flow diagram of a method for abstracting a front-end interface configuration. As can be seen from fig. 1, an abstract description method of front-end interface configuration includes the following steps:
s101: sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface.
When the form interface is modified in development, JSON configuration is directly modified, so in order to abstract the JSON configuration in the embodiment of the specification, JOSN component configuration described by the front-end interface needs to be acquired sequentially. It should be noted that the JOSN component configuration is located in the JOSN configuration described in the front-end interface.
S102: and obtaining the abstract type of the JOSN component configuration to determine the node object identification of the JOSN component configuration based on the abstract type.
Based on the foregoing step S101, after the configuration of the JOSN component is obtained, in order to abstract the configuration of the JOSN component, in the embodiment of the present disclosure, the abstract type of the configuration of the JOSN component is obtained, so that the node object identifier of the configuration of the JOSN component is determined according to the abstract type. Specifically, in one or more embodiments of the present disclosure, determining, based on the abstract type, a node object identifier configured by the JOSN component specifically includes: acquiring a node acquisition instruction of a preset JSON configuration processor; the node acquisition instruction is as follows: the getNodeByType then inputs the abstract type field into the node get instruction, thereby getting the node object identifier configured by the JOSN component.
Further, in one or more embodiments of the present disclosure, before obtaining an abstract type of a JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type, the method further includes:
determining an initial type of the JOSN configuration described by the front-end interface; wherein the initial types include: object, array, number, string, boolean;
determining a type abstraction rule of each initial type based on the field length and the field attribute of the initial type so as to abstract the initial type based on the type abstraction rule to obtain an abstract type; wherein the abstract type comprises: simple type, node list. In a certain application scenario, when abstract is performed on the JSON type, nodes configured by JSON are mainly divided into the following types: an object, an array, a number, a character string and a Boolean are set as a type abstract rule that "number, character string and Boolean" are abstract as simple types, "the object" is abstract as a node type, and "the array" is abstract as a node list, so that the abstract rule is abstract as three classes based on the type abstract rule: simple type (number, string, boolean), node (object), node list (array). By abstracting the types, since the simple type can be described with the basic type number, string, bool of the basic type with TypeScript, etc., the abstraction can be mainly made for the nodes and the node list. It should be further noted that the node class includes: original node object, other higher level node objects. The node list class includes: the original node list object.
S103: and acquiring a corresponding node object from a preset node object memory based on the node object identifier.
In order to smoothly convert JSON configuration into abstract node objects, in the embodiment of the present disclosure, corresponding node objects are obtained in a preset node object memory according to node object identifiers. Further, in one or more embodiments of the present disclosure, before the preset node object memory acquires the corresponding node object based on the node object identifier, the method further includes: determining the corresponding relation between the node object identification and the corresponding node object; establishing a key value pair of the node object identifier and the corresponding node object based on the corresponding relation; storing the corresponding node object in a preset node object memory so as to acquire the corresponding node object corresponding to the node object identification in the preset node memory based on the key value pair.
S104: and assigning the corresponding node object based on the value configured by the JOSN component to obtain the assigned node object.
Based on the above-mentioned node object obtained in step S103, in order to avoid the problem that the performance and usability are poor when modifying JSON configuration because the JSON level needs to be searched layer by layer when it is deep. The specification firstly carries out assignment on the corresponding node object according to the value configured by the JOSN component so as to obtain the assigned node object.
S105: and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
In order to convert all JSON configurations into objects, in the embodiment of the present disclosure, the attributes of the node objects after assignment are obtained iteratively, so as to determine, based on the abstract type corresponding to the attributes, whether the jsn component configuration is abstract, so as to convert the JSON component configuration into the corresponding node objects. Specifically, in one or more embodiments of the present disclosure, iteratively obtaining an attribute of an assigned node object to determine, based on an abstract type corresponding to the attribute, whether the JOSN component configuration is abstract to be converted into a corresponding node object, where the method specifically includes:
traversing the assigned node object attributes to obtain abstract types corresponding to the assigned node object attributes. If the abstract type corresponding to the attribute is determined to have the node or the node list, carrying out iterative assignment on the attribute to determine that the node or the node list does not exist in the node object attribute after the iterative assignment. If it is determined that no node or node list exists in the node object attributes after iterative assignment, then it is determined that the JOSN component configuration is complete and is converted into a corresponding node object. That is, if the type of an attribute on a node object is still a node or node list, then the loadJson step is repeated again until the JSON configuration is all turned into an object. The iteration traversal process and the original node list class are further described by taking an example, wherein the original node list class mainly abstracts a list, a list object has the capacity of array correlation at the same time, the following traversal mode is given, and table 1 is a method description of the original node list class:
class DomNodeList{
data of nodes in a/(memory list)
public domNodeList:DomNode[]
loadJson(domJson:any)
toJson()
get(index:number):DomNode
forEach()
}
TABLE 1 description of method for original node list class
Furthermore, it should be further noted that the JSON configuration processor is a tool for abstracting JSON, and when the low code platform performs the initialization, the JSON configuration of the page description can be automatically converted into an object through the loadJson capability of the JSON configuration processor. When saving the description of the page, the object of the page description can be turned into JSON by JSON configuring the processor's toJson capability. The specific procedure is shown below, and table 2 illustrates a method for automatically converting JSON configuration into objects.
class DomHandler{
A/(component node object
component:ComponentNode;
Memory for/(node object)
NodeMap:any;
loadJson(domJson:any);
toJson();
getNodeByType(type);
}
TABLE 2 method description of automatic conversion of JSON configuration to object
Further, in one or more embodiments of the present disclosure, performing iterative assignment on an attribute to determine that no node or node list exists in the node object attribute after the iterative assignment, which specifically includes the following procedures:
firstly, a node conversion method of a preset JSON configuration processor is obtained, so that the attribute is converted into an iterative node object based on the node conversion method. And then, assigning the iterative node object according to the value configured by the JOSN component to obtain the node object after iterative assignment, thereby judging whether the node or the node list in the node object attribute after iterative assignment.
Further, in one or more embodiments of the present disclosure, the method further includes, after iteratively obtaining the attribute of the assigned node object to determine, based on the abstract type corresponding to the attribute, whether the JOSN component configuration is abstract, so as to convert the abstract component configuration into the corresponding node object:
monitoring attribute expansion operation of the node object; wherein the attribute expansion operation user changes the attribute value of the node object. If the node object is determined to trigger attribute expansion operation, a corresponding event expansion method is called to synchronize the associated nodes based on the event expansion method; the event expansion method is as follows: setValueEvent. For example: the following is a manner of operation of the original node setValue, and table 3 is a method description of the original node object:
class DomNode{
internode code
id:string;
Type of/(node)
type:string;
Content of the/(node)
contents:DomNodeList;
loadJson(domJson:any)
toJson()
setValue(key,value)
setValueEvent()
}
TABLE 3 description of original node object definition methods
Other methods of operating on nodes operate on principles similar to setValue. The setValue method performs a setValueEvent event so that the event is performed when the attribute value is set. This event can be rewritten in the following advanced node object, thereby achieving the purpose of extension.
Further, for other advanced node objects, the advanced nodes inherit domnod, naturally also have the attribute and the capability on the parent class, and meanwhile, the ContainerNode is a common node of the container, so that the attribute and the capability of the container are abstracted, as follows:
class ComponentNode extends DomNode{
}
class ContainerNode extends DomNode{
width:number;
height:number;
}
class PageContainerNode Node extends ContainerNode{
}
class ContentContainerNode Node extends ContainerNode{
the common attribute and capability of the nodes are extracted to the DomNode in the abstract process, and the common attribute of the containers is extracted to the container base class (ContainerNode), so that the problem that repeated attribute and capability exist when the information is stored in the JSON structure, and the JSON configuration becomes complex is solved, and the effect of simplifying the structure of page description is realized.
Fig. 2 shows an abstract description apparatus of front-end interface configuration provided in an embodiment of the present disclosure, where, as shown in fig. 2, the apparatus includes:
the first acquisition unit is used for sequentially acquiring JOSN component configuration described by the front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
the determining unit is used for obtaining the abstract type of the JOSN component configuration so as to determine the node object identification of the JOSN component configuration based on the abstract type;
the second acquisition unit is used for acquiring the corresponding node object from a preset node object memory based on the node object identifier;
the assignment unit is used for assigning the corresponding node object based on the value configured by the JOSN component so as to obtain an assigned node object;
and the abstract conversion unit is used for iteratively acquiring the attributes of the assigned node objects so as to judge whether the JOSN component configuration is abstract or not based on the abstract type corresponding to the attributes, so as to convert the JOSN component configuration into the corresponding node objects.
One or more embodiments of the present disclosure provide an abstract description device of a front-end interface configuration, as shown in fig. 3, where as can be seen from fig. 3, the device includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
As shown in fig. 4, in one or more embodiments of the present disclosure, there is provided a schematic internal structure of a nonvolatile storage medium, as can be seen from fig. 4, a nonvolatile storage medium storing computer executable instructions capable of:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is merely one or more embodiments of the present description and is not intended to limit the present description. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present description, is intended to be included within the scope of the claims of the present description.

Claims (10)

1. An abstract description method of front-end interface configuration, the method comprising:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
2. The abstract description method of a front-end interface configuration of claim 1, wherein before obtaining a type of said JOSN component configuration to determine a node object identification of said JOSN component configuration based on said type, said method further comprises:
determining an initial type of the JOSN configuration described by the front-end interface; wherein the initial types include: object, array, number, string, boolean;
determining a type abstraction rule of each initial type based on the field length and the field attribute of the initial type so as to abstract the initial type based on the type abstraction rule to obtain an abstract type; wherein the abstract type comprises: simple type, node list.
3. The abstract description method of claim 1, wherein before a preset node object memory obtains a corresponding node object based on the node object identification, the method further comprises:
determining the corresponding relation between the node object identification and the corresponding node object;
establishing a key value pair of the node object identifier and the corresponding node object based on the corresponding relation;
and storing the corresponding node object in a preset node object memory so as to acquire the corresponding node object corresponding to the node object identification in the preset node memory based on the key value pair.
4. The abstract description method for front-end interface configuration according to claim 1, wherein determining a node object identifier of said JOSN component configuration based on said abstract type comprises:
acquiring a node acquisition instruction of a preset JSON configuration processor; the node obtaining instruction is as follows: getNodeByType;
and inputting the field of the abstract type into the node acquisition instruction to acquire the node object identification configured by the JOSN component.
5. The abstract description method of front-end interface configuration according to claim 2, wherein iteratively obtaining an attribute of the assigned node object to determine whether the JOSN component configuration is abstract based on an abstract type corresponding to the attribute, so as to convert the JOSN component configuration into a corresponding node object, includes:
traversing the assigned node object attribute to obtain an abstract type corresponding to the assigned node object attribute;
if the abstract type corresponding to the attribute is determined to have a node or a node list, carrying out iterative assignment on the attribute to determine that the node or the node list does not exist in the node object attribute after the iterative assignment;
if the node object attribute after the iterative assignment is determined to not have the node or the node list, determining that the JOSN component is configured to be abstract, and converting the abstract configuration to a corresponding node object.
6. The method for abstract description of a front-end interface configuration according to claim 5, wherein performing iterative assignment on the attribute to determine that no node or node list exists in the node object attribute after the iterative assignment, comprises:
acquiring a node conversion method of a preset JSON configuration processor to convert the attribute into an iterative node object based on the node conversion method;
and assigning the iterative node object based on the value configured by the JOSN component to obtain the node object after iterative assignment so as to judge whether the node or the node list in the node object attribute after iterative assignment.
7. The method for abstract description of a front-end interface configuration according to claim 1, wherein said iteratively obtaining an attribute of said assigned node object, so as to determine, based on an abstract type corresponding to said attribute, whether said JOSN component configuration is abstract for conversion to a corresponding node object, said method further comprising:
monitoring attribute expansion operation of the node object; wherein, the attribute expansion operation user changes the attribute value of the node object;
if the node object is determined to trigger attribute expansion operation, a corresponding event expansion method is called to synchronize the associated nodes based on the event expansion method; the event expansion method comprises the following steps: setValueEvent.
8. An abstract description apparatus of a front-end interface configuration, the apparatus comprising:
the first acquisition unit is used for sequentially acquiring JOSN component configuration described by the front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
the determining unit is used for obtaining the abstract type of the JOSN component configuration so as to determine the node object identification of the JOSN component configuration based on the abstract type;
the second acquisition unit is used for acquiring the corresponding node object from a preset node object memory based on the node object identifier;
the assignment unit is used for assigning the corresponding node object based on the value configured by the JOSN component so as to obtain an assigned node object;
and the abstract conversion unit is used for iteratively acquiring the attributes of the assigned node objects so as to judge whether the JOSN component configuration is abstract or not based on the abstract type corresponding to the attributes, so as to convert the JOSN component configuration into the corresponding node objects.
9. An abstract description apparatus of a front-end interface configuration, the apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
10. A non-volatile storage medium storing computer-executable instructions, the computer-executable instructions being capable of:
sequentially acquiring JOSN component configuration described by a front-end interface; the JOSN component configuration is located in the JOSN configuration described by the front-end interface;
acquiring an abstract type of the JOSN component configuration to determine a node object identifier of the JOSN component configuration based on the abstract type;
acquiring a corresponding node object from a preset node object memory based on the node object identifier;
assigning values to the corresponding node objects based on the value configured by the JOSN component to obtain assigned node objects;
and iteratively acquiring the attributes of the assigned node objects to judge whether the JOSN component configuration is abstract or not based on the abstract types corresponding to the attributes so as to be converted into the corresponding node objects.
CN202310672543.7A 2023-06-06 2023-06-06 Abstract description method, device, equipment and medium for front-end interface configuration Pending CN116541005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310672543.7A CN116541005A (en) 2023-06-06 2023-06-06 Abstract description method, device, equipment and medium for front-end interface configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310672543.7A CN116541005A (en) 2023-06-06 2023-06-06 Abstract description method, device, equipment and medium for front-end interface configuration

Publications (1)

Publication Number Publication Date
CN116541005A true CN116541005A (en) 2023-08-04

Family

ID=87452488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310672543.7A Pending CN116541005A (en) 2023-06-06 2023-06-06 Abstract description method, device, equipment and medium for front-end interface configuration

Country Status (1)

Country Link
CN (1) CN116541005A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117215585A (en) * 2023-11-09 2023-12-12 浪潮通用软件有限公司 Visual description and dynamic control method and device for interface component attribute

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117215585A (en) * 2023-11-09 2023-12-12 浪潮通用软件有限公司 Visual description and dynamic control method and device for interface component attribute
CN117215585B (en) * 2023-11-09 2024-03-08 浪潮通用软件有限公司 Visual description and dynamic control method and device for interface component attribute

Similar Documents

Publication Publication Date Title
US7890923B2 (en) Configurable pattern detection method and apparatus
CN111241454B (en) Method, system and device for generating webpage codes
CN108363587B (en) Application program operation monitoring method and device, computer equipment and storage medium
CN101271475B (en) Commercial intelligent system
US8595236B2 (en) Searching existing user interfaces to enable design, development and provisioning of user interfaces
US7698694B2 (en) Methods and systems for transforming an AND/OR command tree into a command data model
CN108399130A (en) Automatically generate the method, apparatus, equipment and readable storage medium storing program for executing of test cases
CN109189374B (en) Object structure code generation method and system based on object reference chain
CN109582909A (en) Webpage automatic generation method, device, electronic equipment and storage medium
CN111124379B (en) Page generation method and device, electronic equipment and storage medium
CN110515896B (en) Model resource management method, model file manufacturing method, device and system
CN116541005A (en) Abstract description method, device, equipment and medium for front-end interface configuration
US20140282412A1 (en) System And Method For Automatic Generation Of Software Test
CN113867880A (en) Tree structure display method, device, system, electronic device and storage medium
CN115202626A (en) Low-code front-end development method supporting multi-technology stack components
CN115438740A (en) Multi-source data convergence and fusion method and system
CN113778961A (en) Production management method, device and system for CIM model data
CN117112012A (en) Application configuration generation method, device, equipment and medium
Miao et al. ModelHUB: lifecycle management for deep learning
CN114490440A (en) Memory object reference analysis method, device, equipment and storage medium
CN113485706A (en) DSL-based multi-technology stack front-end code generation method and device
CN113032709B (en) Information model setting method, device, equipment and storage medium
CN114969131B (en) Information query method, device and equipment
CN113704672B (en) Comment method based on browser plug-in, browser plug-in and readable storage medium
CN107506299A (en) A kind of code analysis methods and terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination