CN116540997B - Data type declaration method, medium, device and computing equipment - Google Patents

Data type declaration method, medium, device and computing equipment Download PDF

Info

Publication number
CN116540997B
CN116540997B CN202310827019.2A CN202310827019A CN116540997B CN 116540997 B CN116540997 B CN 116540997B CN 202310827019 A CN202310827019 A CN 202310827019A CN 116540997 B CN116540997 B CN 116540997B
Authority
CN
China
Prior art keywords
type
target
area
data
generic
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.)
Active
Application number
CN202310827019.2A
Other languages
Chinese (zh)
Other versions
CN116540997A (en
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.)
Hangzhou Netease Shuzhifan Technology Co ltd
Original Assignee
Hangzhou Langhe Technology 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 Hangzhou Langhe Technology Co Ltd filed Critical Hangzhou Langhe Technology Co Ltd
Priority to CN202310827019.2A priority Critical patent/CN116540997B/en
Publication of CN116540997A publication Critical patent/CN116540997A/en
Application granted granted Critical
Publication of CN116540997B publication Critical patent/CN116540997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/311Functional or applicative languages; Rewrite languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/313Logic programming, e.g. PROLOG programming language

Abstract

The embodiment of the disclosure provides a data type declaration method, a medium, a device and a computing device, and relates to the technical field of computers, wherein the method comprises the following steps: responsive to a first selection operation for a type selection component in the data type declaration interface, displaying candidate data types and selected data types in a target interface, wherein the target interface includes a first region in which the candidate data types are displayed and a second region in which the selected data types are displayed; responding to a second selection operation aiming at the candidate data type, and displaying a target subtype corresponding to the second selection operation in a second area; and responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype. The method and the device can more conveniently and quickly declare the data type and improve the efficiency of the declaration of the data type.

Description

Data type declaration method, medium, device and computing equipment
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and more particularly, to a data type declaration method, medium, apparatus, and computing device.
Background
This section is intended to provide a background or context for embodiments of the present disclosure. The description herein is not admitted to be prior art by inclusion in this section.
Low Code (Low Code) is a visual application development method, which can deliver an application program with less Code and faster speed, and automate the Code that a programmer does not want to develop. The low code is a group of digital technology tool platforms, and based on more efficient modes such as graphic dragging, parameterized configuration and the like, quick construction, data arrangement, ecological connection and middle service are realized.
At present, in the development process of the low-code application, the data structure, the attribute of the entity, the parameters or variables in the logic and the like used by the low-code application are all declared to be corresponding to the data type through a character programming language. The data type includes a base type, a generic type, and a composite type, etc., wherein the composite type is a data type formed by combining a plurality of subtypes, and the composite type is a joint (unit) type, for example. However, the data type is declared in the above manner, which is not convenient enough. In addition, when the federation type is declared in the above manner, there are cases where the declared data type contains a redundant subtype, but when the data type is used, the redundant subtype is generally ignored, resulting in inconsistency between the data type in the declared state and the data type in the used state. Accordingly, there is a need to provide a new data type declaration scheme.
Disclosure of Invention
The present disclosure provides a data type declaration method, medium, apparatus and computing device to provide a new data type declaration scheme.
In a first aspect of the embodiments of the present disclosure, there is provided a data type declaration method, including:
responsive to a first selection operation for a type selection component in the data type declaration interface, displaying candidate data types and selected data types in a target interface, wherein the target interface includes a first region in which the candidate data types are displayed and a second region in which the selected data types are displayed;
responding to a second selection operation aiming at the candidate data type, and displaying a target subtype corresponding to the second selection operation in a second area;
and responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype.
In a second aspect, embodiments of the present disclosure provide a data type declaration apparatus, including:
a display module for displaying candidate data types and selected data types in a target interface in response to a first selection operation for a type selection component in a data type declaration interface, wherein the target interface comprises a first area in which the candidate data types are displayed and a second area in which the selected data types are displayed;
The display module is used for responding to a second selection operation aiming at the candidate data type and displaying a target subtype corresponding to the second selection operation in a second area;
and the acquisition module is used for responding to the confirmation operation aiming at the target subtype and acquiring the target data type corresponding to the target data in the data type declaration interface according to the target subtype.
In a third aspect, embodiments of the present disclosure provide a computing device comprising: a processor, a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the memory-stored computer-executable instructions to implement the data type declaration method as described in the first aspect of the present disclosure.
In a fourth aspect, an embodiment of the present disclosure provides a storage medium having stored therein computer program instructions that, when executed, implement a data type declaration method according to the first aspect of the present disclosure.
In a fifth aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed, implements a data type declaration method according to the first aspect of the present disclosure.
The data type declaration method, medium, device and computing equipment provided by the embodiment of the disclosure show alternative candidate data types and selected data types in a target interface in response to a first selection operation for a type selection component in a data type declaration interface, wherein the target interface comprises a first area and a second area, the candidate data types are displayed in the first area, and the selected data types are displayed in the second area; responding to a second selection operation aiming at the candidate data type, and displaying a target subtype corresponding to the second selection operation in a second area; and responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype. According to the method and the device for the data type declaration, the target sub-type is configured through the operation of the type selection component in the data type declaration interface, so that the target data type corresponding to the target data in the data type declaration interface is obtained, namely, a visual mode is provided for declarating the data type, and the data type is not required to be declared through a character programming language, so that the data type can be declared more conveniently and rapidly, and the efficiency of the data type declaration is improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
fig. 1 is a schematic view of an application scenario provided in an embodiment of the present disclosure;
FIG. 2 is a flow chart of a data type declaration method provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a data type declaration interface provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a data type declaration interface provided by another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a target interface in an initial state corresponding to a federation type according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a target interface in a final state corresponding to a federation type according to an embodiment of the present disclosure;
FIG. 7 is a flow chart of a data type declaration method provided by another embodiment of the present disclosure;
FIG. 8 is a schematic diagram of selecting candidate generic types in a first region according to an embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a first region after selecting candidate generic types according to an embodiment of the present disclosure;
FIG. 10 is a flow chart of a data type declaration method provided by yet another embodiment of the present disclosure;
FIG. 11 is a schematic diagram of deleting a target non-generic type corresponding to a third selection operation from a second region according to an embodiment of the disclosure;
FIG. 12 is a schematic diagram of a first hierarchical level of target generic types being equivalent types according to an embodiment of the present disclosure;
FIG. 13 is a schematic diagram of a redundant sub-generic type provided by an embodiment of the present disclosure;
FIG. 14 is a schematic diagram of a data type declaration apparatus according to an embodiment of the present disclosure;
FIG. 15 is a schematic diagram of a storage medium according to an embodiment of the present disclosure;
fig. 16 is a schematic structural diagram of a computing device according to an embodiment of the present disclosure.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable one skilled in the art to better understand and practice the present disclosure and are not intended to limit the scope of the present disclosure in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the present disclosure may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software. The data to which the present disclosure relates may be data authorized by a user or sufficiently authorized by parties, and the embodiments/examples of the present disclosure may be combined with each other.
According to an embodiment of the disclosure, a data type declaration method, medium, device and computing equipment are provided.
In this context, it is to be understood that the terms involved:
the data type, the type for short, is a class in the programming language which is divided according to the characteristics of the data (such as the type of the value which can be contained, the storage mode and the processing mode of the computer program or the system, etc.); common basic types are Integer (intelger) type, string (String) type, boolean (Boolean) type, etc.;
generic type, a type with type parameters; for example, list < T > (i.e., list < T >) represents a generic List, where T represents a type parameter, may be replaced with a specific type, such as List < Integer > represents an Integer List, list < Boolean > represents a Boolean List, etc.;
A composite type, which is a type formed by combining a plurality of subtypes;
the union (unit) type is a special compound type, and the specific format is: a|b| … (i.e., a or B or …) representing one of data types a or B; a and B are subtypes of the association type A|B;
an intersection (intersection) type, which is a special composite type, is used to describe a certain data type and represent multiple sub-types at the same time, and the specific format is: c & D & … (i.e., C and D and …) indicates that the data type is both C and D, e.g., intelger & String (i.e., intelger and String), indicates that the data type is both an Integer type and a String type;
equivalent types are one that are completely identical or that can be interchanged; list < intelger > |list < Boolean > contains no redundant subtypes; the occurrence sequence of the sub types in the combined type is irrelevant, so that B|A and A|B are equivalent types; similarly, list < intelger|boolean > and List < boost|intelger > are also equivalent types;
redundancy sub-types, equivalent sub-types that repeatedly appear in the composite type; for example, the joint type string|string|Integer contains a redundant subtype String; for the generic type, if the type parameters are different, redundancy is not considered, for example, list < intelger > |list < Boolean > does not contain redundancy sub-types.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and be provided with corresponding operation entries for the user to select authorization or rejection.
Furthermore, any number of elements in the figures is for illustration and not limitation, and any naming is used for distinction only and not for any limiting sense.
The principles and spirit of the present disclosure are explained in detail below with reference to several representative embodiments thereof.
Summary of The Invention
The inventor finds that in the development process of the low-code application, the data structure used by the low-code application, the attribute of the entity, the parameters or variables in the logic and the like all declare the corresponding data type through a character programming language. The data types include a base type, a generic type, a composite type, and the like, wherein the composite type is a data type formed by combining a plurality of subtypes, and the composite type is a joint type. However, the data type is declared in the above manner, which is not convenient enough.
In addition, when the federation type is declared in the above manner, there are cases where the declared data type contains a redundant subtype, but when the data type is used, the redundant subtype is generally ignored, resulting in inconsistency between the data type in the declared state and the data type in the used state. In one example, for text-based character programming languages, which may be built by keyboard entry, native languages such as Scala (a one-door, multi-paradigm programming language), typeScript (a free and open-source programming language developed by Microsoft), ceylon (a computer programming language), and the like all support federation types, all allowing redundant subtypes to exist in the federation types declared by the user. For example, scala allows a user to declare a federation type with redundant subtypes as "val x: string|string". TypeScript, in which List < String > can be written as (string|box) [ ]), list < string|box > and List < string|box > are equivalent types, and thus, list < string|box > -List < String > -box > -List is displayed as List < string|box > -after eliminating redundancy. When the user uses the combination type, the combination type needs to be matched once in a use mode, the declared combination type is List < string|Boolean > |List < Boolean >, and the actually used combination type is List < string|Boolean >, namely the declared combination type is matched once more, so that the combination type in the declaration state is inconsistent with the combination type in the use state, the use mode of the redundancy sub-type is implicitly eliminated, and the difference between the use mode and the user perception is eliminated, so that the user is obstructed and inconsistent in understanding and use. In another example, for a visual programming language used for developing the low-code application, a graphical interactive interface is provided to enable a user to complete the construction of the low-code application by means of clicking, dragging and the like, but the visual programming language does not support a visualization scheme of a joint type, for example, a low-code platform OutSystems, a low-code platform Power Apps, a low-code platform Mendix and the like do not support the joint type. Accordingly, there is a need to provide a new data type declaration scheme.
Based on the above problems, the disclosure provides a data type declaration method, medium, device and computing equipment, which adopt a visual editing data type mode to declare a data type in a data type declaration interface to obtain a target data type corresponding to target data in the data type declaration interface, so that the data type can be declared more conveniently and rapidly, and the efficiency of data type declaration is improved. Through redundancy check, the joint type/cross type with redundant sub-type can be avoided, the problem that the target data type in the state of statement is inconsistent with the target data type in the state of use is avoided, the operation of a developer of the low-code application can be effectively simplified, and the development quality of the low-code application is improved.
Application scene overview
An application scenario of the solution provided in the present disclosure is first illustrated with reference to fig. 1. Fig. 1 is a schematic view of an application scenario provided by an embodiment of the present disclosure, as shown in fig. 1, in the application scenario, a client 101 is a client of a low-code application development platform, and a server 102 in a cloud is a server of the low-code application development platform; in the process of developing the low-code application, a developer of the low-code application declares a corresponding data type through a type selection component in a corresponding data type declaration interface in a visual editing window of a low-code application development platform displayed on the client 101 aiming at a data structure, an attribute of an entity, a parameter or a variable in logic and the like used by the low-code application, so that the low-code application is obtained, and further the low-code application is compiled through the server 102 and is operated.
It should be noted that fig. 1 is only a schematic diagram of an application scenario provided by an embodiment of the present disclosure, and the embodiment of the present disclosure does not limit the devices included in fig. 1 or limit the positional relationship between the devices in fig. 1.
Exemplary method
A method for data type declaration according to an exemplary embodiment of the present disclosure is described below with reference to fig. 2 in conjunction with the application scenario of fig. 1. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in any way in this respect. Rather, embodiments of the present disclosure may be applied to any scenario where applicable.
First, a data type declaration method is described by way of specific embodiments.
Fig. 2 is a flowchart of a data type declaration method provided by an embodiment of the present disclosure. The method of the embodiments of the present disclosure may be applied in a computing device, which may be a server or a server cluster, or the like. As shown in fig. 2, the method of the embodiment of the present disclosure includes:
and S201, in response to a first selection operation aiming at a type selection component in the data type declaration interface, displaying alternative candidate data types and selected data types in a target interface, wherein the target interface comprises a first area and a second area, the candidate data types are displayed in the first area, and the selected data types are displayed in the second area.
In the embodiment of the disclosure, illustratively, in the development process of the low-code application, the data structure used by the low-code application, the attribute of the entity, the parameters or variables in the logic and the like can all be used for declaring the corresponding data type through the type selection component in the data type declaration interface. Specifically, for example, the data type of the variable, the data type of the logic parameter, the data structure, the data type of the entity, and the like can be set. Fig. 3 is a schematic diagram of a data type declaration interface provided in an embodiment of the present disclosure, as shown in fig. 3, when a developer of a low code application adds a variable "a1", it needs to set a data type of the developer, and may click on a type selection component 302 under "data type" in the data type declaration interface 301 to enter a target interface. Fig. 4 is a schematic diagram of a data type declaration interface provided in another embodiment of the present disclosure, as shown in fig. 4, after a developer of a low-code application adds a member "b1" of a data structure "S2", the data type of the developer needs to be set, and after clicking a type selection component 402 under the "data type" in the data type declaration interface 401, the developer enters a target interface to obtain that the data type corresponding to the "b1" is a "character string type".
Fig. 5 is a schematic diagram of a target interface in an initial state corresponding to a joint type according to an embodiment of the present disclosure, as shown in fig. 5, where the target interface in the initial state includes a first area 501 and a second area 502, and candidate data types are displayed in the first area 501, where the candidate data types include a base type (i.e., a non-generic type) and a generic type, the base type includes an Integer (intel) type, a Boolean (Boolean) type, and a String (String) type, and the generic type includes a List < T > (i.e., list < T >) and a mapping < K, V > (i.e., map < K, V >), where T, K and V each represent a type parameter. The base type has a single box 5011, and the generic type does not have a single box; since the data type has not been selected from the candidate data types, a hint information 5021 for prompting the developer of the low code application to select a data type to be used from the candidate data types is displayed in the second area 502, and after the developer of the low code application selects a data type to be used from the candidate data types, the selected data type may be displayed in the second area 502. When the developer of the low code application does not select any legal data type or selects an illegal data type (e.g., a data type containing redundancy), the ok button 503 is in an unavailable state (e.g., becomes a gray unavailable state), the developer of the low code application cannot click the ok button 503.
S202, responding to a second selection operation aiming at the candidate data type, and displaying a target subtype corresponding to the second selection operation in a second area.
For example, fig. 6 is a schematic diagram of a target interface in a final state corresponding to a joint type provided in an embodiment of the present disclosure, as shown in fig. 6, based on the target interface in the initial state shown in fig. 5, after a developer of a low-code application clicks a single selection box corresponding to a basic type "Integer type" and a "character String type" in a first area 501 in turn (i.e., corresponds to a second selection operation), the selected data type is "Integer type or character String type" in a second area 502, i.e., a legal joint type is configured as intelger|string. Meanwhile, the radio frames corresponding to the basic types "integer type" and "character string type" in the first area 501 all present a checking state, and a target interface in a final state is obtained. In this step, for how to display the target subtype corresponding to the second selection operation in the second area, reference may be made to the following embodiment, which is not described herein.
S203, responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype.
For example, referring to fig. 6, after displaying the target subtype corresponding to the second selection operation in the second area 502, if the developer of the low code application determines that the target subtype declaration is completed, the determination button 503 in fig. 6 may be clicked, and accordingly, the computing device executing the method embodiment obtains, according to the target subtype, the target data type corresponding to the target data in the data type declaration interface according to the target subtype, where the target data type is the joint type intelger|string.
According to the data type declaration method provided by the embodiment of the disclosure, selectable candidate data types and selected data types are displayed in a target interface in response to a first selection operation aiming at a type selection component in the data type declaration interface, wherein the target interface comprises a first area and a second area, the candidate data types are displayed in the first area, and the selected data types are displayed in the second area; responding to a second selection operation aiming at the candidate data type, and displaying a target subtype corresponding to the second selection operation in a second area; and responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype. According to the embodiment of the disclosure, the target sub-type is configured through the operation of the type selection component in the data type declaration interface, so that the target data type corresponding to the target data in the data type declaration interface is obtained, namely, a visual mode is provided for declarating the data type, and the data type is not required to be declared through a character programming language, so that the data type can be declared more conveniently and rapidly, and the efficiency of data type declaration is improved.
Alternatively, the target data type may include a target joint type and/or a target cross type based on the above embodiments.
Illustratively, the target federation type is, for example, integer|String, and the target cross type is, for example, integer & String. It is to be appreciated that the target data types can include target federation types and/or target intersection types, as well as target base data types (e.g., integer) or target generic types (e.g., list < Integer >).
Fig. 7 is a flowchart of a data type declaration method provided by another embodiment of the present disclosure. On the basis of the above embodiments, the embodiments of the present disclosure further describe a data type declaration method. As shown in fig. 7, a method of an embodiment of the present disclosure may include:
and S701, in response to a first selection operation aiming at a type selection component in the data type declaration interface, displaying alternative candidate data types and selected data types in a target interface, wherein the target interface comprises a first area and a second area, the candidate data types are displayed in the first area, and the selected data types are displayed in the second area.
A detailed description of this step may be referred to the related description of S201 in the embodiment shown in fig. 2, and will not be repeated here.
For the target data type including the target joint type and/or the target cross type, in an embodiment of the present disclosure, the step S202 in fig. 2 may further include two steps S702 and S703 as follows:
s702, the target subtype comprises a non-generic type, the target non-generic type corresponding to the second selection operation is obtained in response to the second selection operation for the candidate non-generic type in the candidate data types, and the candidate non-generic type corresponding to the target non-generic type in the first area is configured to be in a selected state.
In the step, aiming at the target sub-type contained in the target joint type and/or the target cross type is a non-generic type, the target non-generic type corresponding to the second selection operation can be obtained in response to the second selection operation aiming at the candidate non-generic type in the candidate data types, and the candidate non-generic type corresponding to the target non-generic type in the first area is configured as the selected state. Taking the example that the target joint type is intelger String, referring to fig. 6, the non-generic type is such as Integer type, string type, and boolean type in the base type. After the developer of the low code application clicks on the single boxes corresponding to the basic types "integer type" and "character string type" in the first area 501 in turn (i.e. corresponding to the second selection operation), it may be obtained that the target non-generic type corresponding to the second selection operation is an integer type and a character string type, and at the same time, the single boxes corresponding to the basic types "integer type" and "character string type" in the first area 501 all present a checkup state (i.e. a selected state).
S703, displaying the target non-generic type in the second area.
Illustratively, based on the example of step S702, after the developer of the low-code application clicks on the radio boxes corresponding to the basic types "Integer type" and "String type" in the first area in turn, the selected data type is displayed as "Integer type or String type" in the second area accordingly, that is, a legal target joint type is constructed as intelger String.
For the target data type including the target joint type and/or the target cross type, in an embodiment of the present disclosure, the step S202 in fig. 2 may further include two steps S704 and S705 as follows:
and S704, the target subtype comprises a generic type, the target generic type to be declared is displayed in a second area in response to a second selection operation for the candidate generic type in the candidate data types, the display content of the first area is updated, the updated first area is obtained, and the candidate data types are displayed in the updated first area.
Illustratively, the generic type is such as List < T >, map < K, V >, etc. Taking the example that the target joint type is intelger|string|list < intelger >, fig. 8 is a schematic diagram of selecting a candidate type in the first area according to an embodiment of the present disclosure, as shown in fig. 8, based on fig. 6, when the developer of the low code application moves the cursor over "List < T >" in the first area 501, the "List < T >" is in a selected state, and a prompt message "add and set type" is displayed. Fig. 9 is a schematic diagram provided in an embodiment of the present disclosure after a candidate type is selected in a first area, as shown in fig. 9, based on fig. 8, after a developer of a low-code application moves a cursor over a "list < T >" in the first area, for example, clicks a left mouse button, a target type 504 to be declared is displayed in a second area 502, and the display content of the first area is updated, so as to obtain an updated first area, where the candidate data type is displayed in the updated first area.
It will be appreciated that a generic type of visual design may include two points: (1) without a radio frame; the reason is that when the type parameters of the generic type are replaced with different specific data types, different generic types are represented, for example, list < intelger > and List < boost > are two different generic types, if a single selection box is added, the List cannot be reused, and then legal joint types such as List < intelger > |list < boost > are selected; (2) hierarchical design; the parameters of the generic type have independent levels, the first area (i.e. the type selection panel) is updated in real time according to the type selection condition of the level where the first area is currently located, as shown in fig. 9, when the developer of the low-code application clicks on the "list < T >" in the first area, the developer enters the type selection of the "list < T >" internal "T", i.e. enters the next level, correspondingly, the display content of the first area is updated, the updated first area is obtained, the updated first area displays candidate data types, no data type is selected, and the hook in the updated first area is empty. The method can return to the previous level, and after returning to the previous level, the radio frame corresponding to the basic type 'integer type' and 'character string type' in the first area is re-presented with the checking state. Specifically, for example, when the developer of the low code application clicks on any one of the locations in the area to the left of "integer type", "string type", or "< >" in the second area, it may return to the previous level. By means of the hierarchical manner, it can be ensured that redundant non-generalized subtypes are not selected in the inner layer.
It should be noted that, the embodiment of the present disclosure does not limit the execution sequence of the steps S702 and S704.
S705, in response to a fifth selection operation for the candidate data type in the updated first area, displaying the finally declared target generic type in the second area.
Illustratively, referring to fig. 9, candidate data types may be selected in the updated first region to obtain a final declared target type, and accordingly, the final declared target type, such as List < intelger >, is displayed in the second region.
S706, responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype.
A detailed description of this step may be referred to the related description of S203 in the embodiment shown in fig. 2, and will not be repeated here.
According to the data type declaration method provided by the embodiment of the disclosure, selectable candidate data types and selected data types are displayed in a target interface in response to a first selection operation aiming at a type selection component in the data type declaration interface, wherein the target interface comprises a first area and a second area, the candidate data types are displayed in the first area, and the selected data types are displayed in the second area; if the target subtype comprises the non-generic type, responding to a second selection operation for the candidate non-generic type in the candidate data types, acquiring the target non-generic type corresponding to the second selection operation, configuring the candidate non-generic type corresponding to the target non-generic type in the first area as a selected state, and displaying the target non-generic type in the second area; if the target subtype comprises the floodtype, displaying the target floodtype to be declared in a second area in response to a second selection operation for the candidate floodtype in the candidate data types, updating the display content of the first area to obtain an updated first area, displaying the candidate data type in the updated first area, and displaying the final declared target floodtype in the second area in response to a fifth selection operation for the candidate data type in the updated first area; and responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype. According to the embodiment of the disclosure, the target subtype is configured through the operation of the type selection component in the data type declaration interface, wherein the target subtype can comprise a non-generic type and a generic type, and further the target data type corresponding to the target data in the data type declaration interface is obtained, namely, a visual mode is provided for declarating the data type without declarating the data type through a character programming language, so that the data type can be declared more conveniently and rapidly, and the declaration efficiency of the data type is improved.
Fig. 10 is a flowchart of a data type declaration method provided by another embodiment of the present disclosure. Based on the embodiment shown in fig. 7, the embodiment of the disclosure further describes a data type declaration method. As shown in fig. 10, a method of an embodiment of the present disclosure may include:
s1001, in response to a first selection operation for a type selection component in a data type declaration interface, displaying candidate data types and selected data types in a target interface, wherein the target interface includes a first area in which the candidate data types are displayed and a second area in which the selected data types are displayed.
A specific description of this step may be referred to the related description of S701 in the embodiment shown in fig. 7, which is not repeated here.
S1002, the target subtype comprises a non-generic type, the target non-generic type corresponding to the second selection operation is obtained in response to the second selection operation for the candidate non-generic type in the candidate data types, and the candidate non-generic type corresponding to the target non-generic type in the first area is configured to be in a selected state.
A detailed description of this step may be referred to the related description of S702 in the embodiment shown in fig. 7, which is not repeated here.
S1003, displaying the target non-generic type in the second area.
A specific description of this step may be referred to the description of S703 in the embodiment shown in fig. 7, and will not be repeated here.
S1004, deleting the target non-generic type corresponding to the third selection operation from the second area in response to the third selection operation aiming at the candidate non-generic type in the selected state, and configuring the candidate non-generic type corresponding to the third selection operation in the first area into an unselected state so that the redundant target non-generic type is not displayed in the second area.
For example, fig. 11 is a schematic diagram provided in an embodiment of the present disclosure for deleting a target non-generic type corresponding to a third selection operation from a second area, as shown in fig. 11, based on fig. 6, a single box corresponding to a basic type "Integer type" and a "String type" in a first area 501 is in a hooked state (i.e., a selected state), if a developer of a low code application clicks the single box corresponding to the "String type" again, the single box is no longer in the hooked state, i.e., is in an unselected state, and accordingly, the selected data type is displayed in the second area 502 from "Integer type or String type" to "Integer type", instead of "Integer type or String type" (i.e., inter|string) containing a redundancy subtype, so that the target non-generic type is not displayed in the second area 502. It can be understood that the candidate non-generic type in the selected state is selected again through the third selection operation, the target non-generic type in the selected state is not displayed in the second area, and the candidate non-generic type in the selected state in the first area is configured to be in the unselected state, so that a developer of the low-code application can only select the non-generic type or cancel the selected non-generic type, thereby ensuring that the same non-generic type can be selected at most once under the same hierarchy, and avoiding the occurrence of redundant non-generic sub-types in the joint type.
S1005, a deleting control is displayed in the second area, and a target non-generic type corresponding to the deleting control is deleted in response to a fourth selection operation for the deleting control; and configuring the candidate non-generic type corresponding to the fourth selection operation in the first area into an unchecked state.
The deleting control is used for deleting the target non-generic type corresponding to the current second selection operation.
Illustratively, referring to FIG. 6, the selected data type is displayed in the second area 502 as an "integer type or string type," with the upper right hand corner of the "string type" displaying a delete control 505. If the developer of the low code application clicks the delete control 505, the "string type" in the second region 502 may be deleted, and accordingly, the "string type" in the first region 501 is configured to be in an unchecked state.
It should be noted that, the embodiment of the present disclosure does not limit the execution sequence of the steps S1004 and S1005.
S1006, the target subtype comprises a generic type, the target generic type to be declared is displayed in a second area in response to a second selection operation for the candidate generic type in the candidate data types, the display content of the first area is updated, the updated first area is obtained, and the candidate data types are displayed in the updated first area.
A detailed description of this step may be referred to the related description of S704 in the embodiment shown in fig. 7, and will not be repeated here.
It should be noted that, the embodiment of the present disclosure does not limit the execution sequence of the steps S1002 and S1006.
In the embodiment of the present disclosure, the step S705 in fig. 7 may further include the following steps S1007 to S1009:
s1007, in response to a fifth selection operation for the candidate data type in the updated first area, determining whether other selected target generic types which belong to the same hierarchy as the currently selected target generic type and are equivalent types exist in the second area based on a preset redundancy check algorithm.
Wherein equivalent types are used to characterize the same or interchangeable data types.
Because the developer of the low-code application can select the same generic type for multiple times, the developer of the low-code application cannot be completely prevented from selecting the redundant generic type interactively, and whether the equivalent type exists or not needs to be judged through a preset redundancy check algorithm. For example, fig. 12 is a schematic diagram of a first level of object type types being equivalent types according to an embodiment of the present disclosure, as shown in fig. 12, where a currently selected object type in the second area 502 is "List < Boolean type or Integer type >" (i.e., "List < Boolean type or intel >"), and other selected object type types in the same level in the second area 502 are "List < Integer type or Boolean type >" (i.e., "List < intel or Boolean >"), and it may be determined whether "List < Boolean or intel >" and "List < intel or boost >" are equivalent types based on a preset redundancy check algorithm. By using a preset redundancy check algorithm, it is possible to find in advance whether the declared data type contains a redundant type of type when the data type is declared, rather than implicitly eliminating the redundant type of type in the declared data type when the data type is used after the data type is declared. For example, in TypeScript, the declared federation type is List < string|Boolean > |list < Boolean|string >, and redundant generic types in the declared federation type are implicitly eliminated when in use, i.e., the federation type actually used is List < string|Boolean >; in the embodiment of the disclosure, when the joint type is declared, the List < string|Boolean > and the List < Boolean|string > are determined to be equivalent types through the preset redundancy check algorithm, so that the declared joint type does not contain a redundant generalized type, namely, the joint type in the declaration state and the joint type in the use state are both List < Boolean|string >, the operation of a developer of the low-code application can be effectively simplified, and the development quality and the development efficiency of the low-code application can be improved.
Further, optionally, based on a preset redundancy check algorithm, determining whether there are other selected target generic types in the second area that belong to the same hierarchy as the currently selected target generic type and are equivalent types may include: acquiring the subtype contained in the currently selected target generic type; sorting the sub-types to obtain sorted sub-types; generating a target type key value corresponding to the currently selected target generic type according to the ordered sub types; determining whether a target type key value exists in a key value mapping table under the current level, wherein the key value mapping table contains the corresponding relation between the selected target generic type and the type key value under different levels; if so, determining that an equivalent type exists in the selected target generic type of the same level; if the target generic type of the same level is not selected, determining that the equivalent type does not exist in the target generic type of the same level.
In this embodiment, the key-value mapping table is obtained by: a unique type key (e.g., represented by typeKey) is generated for each selected target type (e.g., represented by dataType), the typeKey consisting of the name of the type (e.g., represented by typeName) and a list of parameters of the type (if a list of parameters exists, it may be represented by genericcharacters) for subsequent redundancy checks. For example, for parameters of a federated type, its subtypes may be ordered in the dictionary order of their names, and then unique type key values may be generated that are independent of the order of the list of subtype parameters. For example, list < intel > and List < boost > are ordered to generate the same typeKey as "List < boost > intel >". The list of selected target generic types may be traversed, a corresponding type key value generated for each selected target generic type and added to the key value mapping table.
Illustratively, referring to fig. 12, the currently selected target generic type is "List < boost or intel >", and the key value mapping table is assumed to include a type key value corresponding to another selected target generic type (i.e., "List < intel or boost >") having the same hierarchy as the currently selected target generic type as "List < boost|intel >"; sorting the subtypes Integer and Boolean contained in the currently selected target generic type according to the initial sequence of the names of the subtypes Integer and Boolean to obtain sorted subtypes, and generating a target type key value corresponding to the currently selected target generic type as 'List < Boolean|Integer >', according to the sorted subtypes. Since the key-value pair mapping table already contains the type key value "List < Boolean Integer >", it is possible to determine that there is an equivalent type (i.e., a data type repetition) in the target generic type of the same hierarchy that has been selected, and at this time, the developer of the low code application cannot click the ok button. Through a preset redundancy check algorithm, whether the equivalent type exists in the selected target generic type of the same level can be accurately determined, and the condition that the equivalent type is missed to be detected or misjudged is avoided.
Optionally, after determining that the selected target generic type of the same hierarchy does not have an equivalent type, the data type declaration method provided by the embodiment of the present disclosure may further include: and adding the currently selected target generic type and the target type key value into a key value mapping table.
In this embodiment, after determining that there is no equivalent type in the object type of the same hierarchy that has been selected, assuming that the object type key value corresponding to the object type that has been selected currently is "List < Boolean|Integer >", the object type that has been selected currently and the object type key value may be added to the key value pair mapping table for use in the subsequent determination of the equivalent type.
And S1008, if the target generalized type corresponding to the equivalent type is marked as an invalid state, and prompt information is displayed so that the redundant target generalized type is not displayed in the second area.
The prompt information is used for prompting repetition of the currently selected target type and other selected target types.
For example, referring to fig. 12, when the currently selected object type in the second area 502 is "List < Boolean type or Integer type >" (i.e., "List < Boolean type or Integer type >"), other selected object type types of the same hierarchy in the second area 502 are "List < Integer type or Boolean type >" (i.e., "List < intel or Boolean >"), after determining that "List < Boolean or intel >" and "List < intel or Boolean >" are equivalent types based on a preset redundancy check algorithm, the developer of the low-code application may mark both "List < Integer type or Boolean type >" and "List < Boolean type >" as invalid (e.g., with red mark invalid state) and display hint information, such as "this type of repetition", at which time the developer of the low-code application cannot determine the button so that the object type is not displayed in the second area.
S1009, in response to the deletion operation for the redundant target type-generic among the equivalent types, deleting the redundant target type-generic and displaying the remaining target type-generic in the second area.
In this step, after marking all the target generic types corresponding to the equivalent types as invalid and displaying the prompt information, the developer of the low-code application may delete the redundant target generic types in the equivalent types, and correspondingly, the computing device executing the embodiment of the method may delete the redundant target generic types in response to the deletion operation for the redundant target generic types in the equivalent types, and display the remaining target generic types in the second area.
Based on the above examples of steps S1006 to S1009, optionally, the target type to be declared includes a sub type to be declared, and displaying the final declared target type in the second area includes: updating the display content of the first area aiming at the sub-generic type to be declared to obtain an updated first area, wherein the updated first area displays candidate data types; responding to a sixth selection operation for the candidate data types in the updated first area, and displaying the finally-declared sub-generic type in the second area, wherein based on a preset redundancy check algorithm, it is determined that no redundant sub-generic type exists in the sub-generic types of the same level; and displaying the finally declared target type in the second area according to the finally declared sub type.
Illustratively, assuming that the target type to be declared is "List < Integer type > >" (i.e., "List < Integer type > >"), the target type to be declared contains sub-types to be declared that are "List < Integer type >" (i.e., "List < Integer type >"), where the outermost "List < >" can be understood as a first hierarchy and the sub-types to be declared "List < Integer type >" can be understood as a second hierarchy. Referring to fig. 9, for a first level, a target generic type 504 to be declared corresponding to the first level may be obtained; for the second hierarchy, the "list < T >" may be selected (i.e., corresponding to the fifth selection operation) from the candidate data types displayed in the updated first region, and the configuration of the "list < integer type >" corresponding to the second hierarchy may be entered. Specifically, updating the display content of the first area to obtain an updated first area, wherein the updated first area displays candidate data types; in response to a sixth selection operation for candidate data types in the updated first region, the finally declared sub-generic type is displayed in the second region as "list < integer type >". And so on, if the target type to be declared contains multiple levels of sub-types to be declared, the final declared sub-type can be obtained for each level of sub-type to be declared.
Wherein, based on a preset redundancy check algorithm, it can be determined that the redundant sub-generic type does not exist in the sub-generic types of the same level; and displaying the finally declared target type in the second area according to the finally declared sub type. Fig. 13 is a schematic diagram of a redundant sub-generic type provided in an embodiment of the present disclosure, as shown in fig. 13, in which the declared sub-generic type in the second area 502 is "List < String type > or List < String type >" (i.e., "List < String > or List < String >"), based on a preset redundancy check algorithm, it may be determined that a redundant sub-generic type exists in "List < String > or List < String >", the declared sub-generic type is marked as an invalid state, and a prompt message is displayed, at this time, a developer of the low-code application cannot click a determination button. The developer of the low-code application can delete the redundant sub-generic type according to the prompt information to obtain the final declared sub-generic type as 'List < String type >', and further obtain the final declared target generic type as 'List < String type > >'.
Optionally, the data type declaration method provided by the embodiment of the present disclosure may further include at least one of the following: responding to a first level switching instruction, switching from the current level of the finally declared sub-generic type to the next level of the finally declared sub-generic type, and updating the display content of a first area corresponding to the current level to the display content of a first area corresponding to the next level; and responding to the second level switching instruction, cutting out from the current level of the finally-declared sub-generic type to the last level of the finally-declared sub-generic type, and updating the display content of the first area corresponding to the current level to the display content of the first area corresponding to the last level.
Illustratively, if the finally declared target generic type includes a multi-level sub-generic type, a developer of the low-code application may click on a sub-generic type (corresponding to a first-level switching instruction) corresponding to a next level of the current level through an input device (such as a mouse), switch from the current level to the next level, and update display content of a first region corresponding to the current level to display content of a first region corresponding to the next level; alternatively, a developer of a low code application may cut into from the current level to the next level through a right directional key (corresponding to a first level switch instruction) of an input device (such as a keyboard). A developer of the low-code application can click on the upper layer (corresponding to a second layer switching instruction) of the current layer through an input device (such as a mouse), cut out from the current layer to the upper layer, and update the display content of the first area corresponding to the current layer to the display content of the first area corresponding to the upper layer; illustratively, referring to FIG. 5, when a developer of a low code application clicks on any position in the area to the left of "integer type", "string type", or "< >" in the second area 502, a cut may be made from the current level to the previous level; alternatively, the developer of the low code application may cut from the current level to the previous level through the left directional key (corresponding to the second level switch instruction) of the input device (such as a keyboard).
S1010, responding to the confirmation operation aiming at the target subtype, and obtaining the target data type corresponding to the target data in the data type declaration interface according to the target subtype.
A detailed description of this step may be referred to the related description of S706 in the embodiment shown in fig. 7, which is not repeated here.
According to the data type declaration method provided by the embodiment of the disclosure, a target subtype is configured through an operation of a type selection component in a data type declaration interface, the target subtype can comprise a non-generic type and a generic type, wherein for the target non-generic type, a target non-generic type corresponding to the third selection operation can be deleted from a second area in response to the third selection operation of the candidate non-generic type in a selected state, and the candidate non-generic type corresponding to the third selection operation in the first area is configured to be in an unselected state, so that redundant target non-generic types are not displayed in the second area; for the target type, a second selection operation for the candidate type in the candidate data types can be responded, the target type to be declared is displayed in a second area, the display content of the first area is updated, the updated first area is obtained, the candidate data types are displayed in the updated first area, whether other selected target type types which belong to the same hierarchy and are equivalent types to the currently selected target type in the second area are determined based on a preset redundancy check algorithm in response to a fifth selection operation for the candidate data types in the updated first area, if so, the target type corresponding to the equivalent type is marked as an invalid state, prompt information is displayed, and the redundant target type is not displayed in the second area, so that the target data type corresponding to the target data in the data type declaration interface is obtained. The embodiment of the disclosure provides a visual mode to declare the data type without declaring the data type through a character programming language, so that the data type can be declared more conveniently and rapidly, and the efficiency of declaring the data type is improved; and the problem that the target data type in the declaration state is inconsistent with the target data type in the use state can be avoided, and the operation of the developer of the low-code application can be effectively simplified.
Based on the foregoing embodiment, optionally, the data type declaration method provided by the embodiment of the present disclosure may further include: in response to receiving an input operation of a search keyword in the first region, obtaining a target candidate data type according to the search keyword; displaying the target candidate data type.
For example, referring to fig. 5, a keyword to be searched for may be input in the input box 5012 displayed in the first area 501 to search for a target candidate data type and display the searched target candidate data type.
On the basis of the foregoing embodiment, optionally, the data type declaration method provided by the embodiment of the present disclosure may further include at least one of the following: deleting the currently selected target subtype in the second area in response to a deleting instruction aiming at the target subtype; in response to a first movement instruction for the target subtype, updating the state of the adjacent last target subtype of the target subtype in the selected state in the second area to the selected state; in response to a second move instruction for the target subtype, the state of the next adjacent target subtype of the target subtype in the selected state in the second area is updated to the selected state.
Illustratively, referring to fig. 6, after displaying the object subtype "integer type or character string type" corresponding to the second selection operation in the second area 502, the developer of the low code application may delete the corresponding object subtype through a delete control, or may delete the currently selected object subtype through a delete key of an input device (such as a keyboard). The developer of the low code application may update the state of the next-to-last target subtype of the target subtype in the selected state in the second area to the selected state through an input device (e.g., a mouse), or the developer of the low code application may update the state of the next-to-last target subtype of the target subtype in the selected state in the second area to the selected state through an up-arrow key of the input device (e.g., a keyboard). The developer of the low code application may update the state of the next adjacent one of the object sub-types in the selected state in the second area to the selected state through an input device such as a mouse, or the developer of the low code application may update the state of the next adjacent one of the object sub-types in the selected state in the second area to the selected state through a down direction key of the input device such as a keyboard.
Exemplary apparatus
Having described the medium of the exemplary embodiment of the present disclosure, next, a data type declaration apparatus of the exemplary embodiment of the present disclosure is described with reference to fig. 14. The device of the exemplary embodiment of the disclosure can realize each process in the data type declaration method embodiment and achieve the same functions and effects.
Fig. 14 is a schematic structural diagram of a data type declaration apparatus according to an embodiment of the present disclosure, and as shown in fig. 14, a data type declaration apparatus 1400 according to an embodiment of the present disclosure includes: a display module 1401, a display module 1402 and an acquisition module 1403. Wherein:
a display module 1401, configured to respond to a first selection operation for a type selection component in the data type declaration interface, and display, in a target interface, candidate data types and selected data types, where the target interface includes a first area and a second area, the candidate data types are displayed in the first area, and the selected data types are displayed in the second area.
A display module 1402, configured to, in response to a second selection operation for the candidate data type, display a target subtype corresponding to the second selection operation in a second area.
An obtaining module 1403, configured to obtain, according to the target subtype, a target data type corresponding to the target data in the data type declaration interface in response to the confirmation operation for the target subtype.
In one possible implementation, the target data type includes a target federation type and/or a target intersection type.
In one possible implementation, the target subtype includes a non-generic type, and the display module 1402 may be specifically configured to: responding to a second selection operation aiming at the candidate non-generic type in the candidate data types, acquiring a target non-generic type corresponding to the second selection operation, and configuring the candidate non-generic type corresponding to the target non-generic type in the first area into a selected state; and displaying the target non-generic type in the second area.
In one possible implementation, the display module 1402 may also be used to: after the second area displays the target non-generic type, in response to a third selection operation for the candidate non-generic type in the selected state, deleting the target non-generic type corresponding to the third selection operation from the second area, and configuring the candidate non-generic type corresponding to the third selection operation in the first area to be in an unselected state so that the redundant target non-generic type is not displayed in the second area.
In one possible implementation manner, a deletion control is displayed in the second area, where the deletion control is used to delete the target non-generic type corresponding to the current second selection operation, and the display module 1402 is further configured to: after the target non-generic type is displayed in the second area, deleting the target non-generic type corresponding to the deletion control in response to a fourth selection operation for the deletion control; and configuring the candidate non-generic type corresponding to the fourth selection operation in the first area into an unchecked state.
In one possible implementation, the target subtype includes a generic type, and the display module 1402 may be specifically configured to: responding to a second selection operation aiming at the candidate generalized type in the candidate data types, displaying the target generalized type to be declared in a second area, updating the display content of the first area, obtaining an updated first area, and displaying the candidate data types in the updated first area; and in response to a fifth selection operation for the candidate data type in the updated first region, displaying the finally declared target generic type in the second region.
In one possible implementation, the display module 1402, when used to display the final declared type of object generic in the second area, may be specifically used to: based on a preset redundancy check algorithm, determining whether other selected target generic types which belong to the same hierarchy as the currently selected target generic type and are equivalent types exist in the second region, wherein the equivalent types are used for representing the same or mutually replaceable data types; if the target type is in the invalid state, marking the target type corresponding to the equivalent type as the invalid state, and displaying prompt information so that the redundant target type is not displayed in the second area, wherein the prompt information is used for prompting that the currently selected target type and other selected target type are repeated; and deleting the redundant target type in response to the deleting operation aiming at the redundant target type in the equivalent types, and displaying the rest target type in the second area.
In one possible implementation, the display module 1402, when configured to determine, based on a preset redundancy check algorithm, whether there are other selected target generic types in the second area that belong to the same hierarchy as the currently selected target generic type and are equivalent types, may be specifically configured to: acquiring the subtype contained in the currently selected target generic type; sorting the sub-types to obtain sorted sub-types; generating a target type key value corresponding to the currently selected target generic type according to the ordered sub types; determining whether a target type key value exists in a key value mapping table under the current level, wherein the key value mapping table contains the corresponding relation between the selected target generic type and the type key value under different levels; if so, determining that an equivalent type exists in the selected target generic type of the same level; if the target generic type of the same level is not selected, determining that the equivalent type does not exist in the target generic type of the same level.
In one possible implementation, the display module 1402 may also be used to: after determining that there is no equivalent type in the target type of the same hierarchy that has been selected, the currently selected target type and the target type key value are added to the key value mapping table.
In one possible implementation, the target generic type to be declared includes a sub-generic type to be declared, and the display module 1402, when configured to display the final declared target generic type in the second area, may be specifically configured to: updating the display content of the first area aiming at the sub-generic type to be declared to obtain an updated first area, wherein the updated first area displays candidate data types; responding to a sixth selection operation for the candidate data types in the updated first area, and displaying the finally-declared sub-generic type in the second area, wherein based on a preset redundancy check algorithm, it is determined that no redundant sub-generic type exists in the sub-generic types of the same level; and displaying the finally declared target type in the second area according to the finally declared sub type.
In one possible implementation, the display module 1402 may also be used for at least one of: responding to a first level switching instruction, switching from the current level of the finally declared sub-generic type to the next level of the finally declared sub-generic type, and updating the display content of a first area corresponding to the current level to the display content of a first area corresponding to the next level; and responding to the second level switching instruction, cutting out from the current level of the finally-declared sub-generic type to the last level of the finally-declared sub-generic type, and updating the display content of the first area corresponding to the current level to the display content of the first area corresponding to the last level.
In one possible implementation, the data type declaration apparatus 1400 may further include a first processing module 1404 for, in response to receiving an input operation of a search key in the first region, obtaining a target candidate data type from the search key; displaying the target candidate data type.
In one possible implementation, the data type declaration apparatus 1400 may further include a second processing module 1405 for at least one of: deleting the currently selected target subtype in the second area in response to a deleting instruction aiming at the target subtype; in response to a first movement instruction for the target subtype, updating the state of the adjacent last target subtype of the target subtype in the selected state in the second area to the selected state; in response to a second move instruction for the target subtype, the state of the next adjacent target subtype of the target subtype in the selected state in the second area is updated to the selected state.
The device of the embodiment of the disclosure may be used to implement the scheme of the data type declaration method in any of the above method embodiments, and its implementation principle and technical effects are similar, and are not repeated here.
Exemplary Medium
Having described the method of the exemplary embodiments of the present disclosure, next, a storage medium of the exemplary embodiments of the present disclosure will be described with reference to fig. 15.
Fig. 15 is a schematic view of a storage medium according to an embodiment of the disclosure. Referring to fig. 15, a storage medium 1500 in which a program product for implementing the above-described method according to an embodiment of the present disclosure is stored may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device such as a personal computer. However, the program product of the present disclosure is not limited thereto.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the developer computing device of the low code application, partly on the developer device of the low code application, partly on a remote computing device, or entirely on a remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the developer computing device of the low-code application through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN).
Exemplary computing device
Having described the methods, media, and apparatus of exemplary embodiments of the present disclosure, a computing device of exemplary embodiments of the present disclosure is next described with reference to fig. 16.
The computing device 1600 shown in fig. 16 is merely an example and should not be taken as limiting the functionality and scope of use of embodiments of the present disclosure.
Fig. 16 is a schematic structural diagram of a computing device according to an embodiment of the disclosure, and as shown in fig. 16, the computing device 1600 is in the form of a general-purpose computing device. Components of computing device 1600 may include, but are not limited to: the at least one processing unit 1601, the at least one storage unit 1602, and a bus 1603 connecting the different system components (including the processing unit 1601 and the storage unit 1602). Illustratively, the processing unit 1601 may be embodied as a processor, the storage unit 1602 stores computer-executable instructions, and the processing unit 1601 executes the computer-executable instructions stored by the storage unit 1602 to implement the data type declaration method described above.
Bus 1603 includes a data bus, a control bus, and an address bus.
The storage unit 1602 may include readable media in the form of volatile memory, such as Random Access Memory (RAM) 16021 and/or cache memory 16022, and may further include readable media in the form of nonvolatile memory, such as Read Only Memory (ROM) 16023.
The storage unit 1602 may also include a program/utility 16025 having a set (at least one) of program modules 16024, such program modules 16024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The computing device 1600 may also communicate with one or more external devices 1604 (e.g., keyboard, pointing device, etc.). Such communication may occur through an input/output (I/O) interface 1605. Moreover, computing device 1600 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 1606. As shown in fig. 16, network adapter 1606 communicates with other modules of computing device 1600 over bus 1603. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with the computing device 1600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of a data type declaration apparatus are mentioned, such a division is only exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present disclosure. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Furthermore, although the operations of the methods of the present disclosure are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
While the spirit and principles of the present disclosure have been described with reference to several particular embodiments, it is to be understood that this disclosure is not limited to the particular embodiments disclosed nor does it imply that features in these aspects are not to be combined to benefit from this division, which is done for convenience of description only. The disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (7)

1. A data type declaration method, comprising:
responsive to a first selection operation for a type selection component in a data type declaration interface, presenting in a target interface candidate data types for selection and selected data types, wherein the target interface includes a first region in which the candidate data types are displayed and a second region in which the selected data types are displayed;
Responding to a second selection operation for the candidate data type, and displaying a target subtype corresponding to the second selection operation in the second area;
responding to the confirmation operation aiming at the target subtype, and obtaining a target data type corresponding to target data in the data type declaration interface according to the target subtype;
the target data type comprises a target joint type and/or a target cross type;
the target subtype includes a non-generic type, and the displaying, in the second area, the target subtype corresponding to the second selection operation in response to the second selection operation for the candidate data type includes:
responding to a second selection operation for the candidate non-generic type in the candidate data types, acquiring a target non-generic type corresponding to the second selection operation, and configuring the candidate non-generic type corresponding to the target non-generic type in the first area into a selected state;
displaying the target non-generic type in the second area;
after the second area displays the target non-generic type, the method further includes:
in response to a third selection operation for the candidate non-generic type in the selected state, deleting the target non-generic type corresponding to the third selection operation from the second area, and configuring the candidate non-generic type corresponding to the third selection operation in the first area to be in an unselected state, so that the redundant target non-generic type is not displayed in the second area.
2. The data type declaration method of claim 1, the target subtype including a generic type, the responsive to a second selection operation for the candidate data type displaying a target subtype corresponding to the second selection operation in the second area, comprising:
responding to a second selection operation aiming at the candidate generalized type in the candidate data types, displaying a target generalized type to be declared in the second area, updating the display content of the first area, and obtaining an updated first area, wherein the candidate data type is displayed in the updated first area;
and in response to a fifth selection operation for the candidate data type in the updated first area, displaying a final declared target generic type in the second area.
3. The data type declaration method according to claim 2, wherein the displaying the finally declared target generic type in the second area includes:
based on a preset redundancy check algorithm, determining whether other selected target type types which belong to the same hierarchy as the currently selected target type types and are equivalent types exist in the second region, wherein the equivalent types are used for representing the same or interchangeable data types;
If so, marking the target type corresponding to the equivalent type as an invalid state, and displaying prompt information so that redundant target type is not displayed in the second area, wherein the prompt information is used for prompting that the currently selected target type and the other selected target type are repeated;
and deleting the redundant target type in the equivalent types in response to a deleting operation aiming at the redundant target type, and displaying the rest target type in the second area.
4. A data type declaration method according to claim 3, said target type of floods to be declared including sub-types of floods to be declared, said displaying the final declared target type of floods in said second area comprising:
updating the display content of the first area aiming at the sub-generic type to be declared to obtain an updated first area, wherein the candidate data type is displayed in the updated first area;
in response to a sixth selection operation for the candidate data type in the updated first area, displaying a final declared sub-generic type in the second area, wherein based on the preset redundancy check algorithm, it is determined that no redundant sub-generic type exists in the sub-generic types of the same hierarchy;
And displaying the finally declared target type in the second area according to the finally declared sub type.
5. A data type declaration apparatus, comprising:
a display module for displaying, in response to a first selection operation for a type selection component in a data type declaration interface, alternative candidate data types and selected data types in a target interface, wherein the target interface includes a first region in which the candidate data types are displayed and a second region in which the selected data types are displayed;
the display module is used for responding to a second selection operation aiming at the candidate data type and displaying a target subtype corresponding to the second selection operation in the second area;
the acquisition module is used for responding to the confirmation operation aiming at the target subtype and obtaining a target data type corresponding to the target data in the data type declaration interface according to the target subtype; the target data type comprises a target joint type and/or a target cross type;
the target subtype comprises a non-generic type, and the display module is specifically configured to: responding to a second selection operation for the candidate non-generic type in the candidate data types, acquiring a target non-generic type corresponding to the second selection operation, and configuring the candidate non-generic type corresponding to the target non-generic type in the first area into a selected state; displaying the target non-generic type in the second area;
The display module is further configured to: after the target non-generic type is displayed in the second area, in response to a third selection operation for the candidate non-generic type in the selected state, deleting the target non-generic type corresponding to the third selection operation from the second area, and configuring the candidate non-generic type corresponding to the third selection operation in the first area to be in an unselected state, so that a redundant target non-generic type is not displayed in the second area.
6. A computing device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the data type declaration method of any of claims 1 to 4.
7. A storage medium having stored therein computer program instructions which, when executed, implement the data type declaration method of any of claims 1 to 4.
CN202310827019.2A 2023-07-07 2023-07-07 Data type declaration method, medium, device and computing equipment Active CN116540997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310827019.2A CN116540997B (en) 2023-07-07 2023-07-07 Data type declaration method, medium, device and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310827019.2A CN116540997B (en) 2023-07-07 2023-07-07 Data type declaration method, medium, device and computing equipment

Publications (2)

Publication Number Publication Date
CN116540997A CN116540997A (en) 2023-08-04
CN116540997B true CN116540997B (en) 2023-09-26

Family

ID=87452873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310827019.2A Active CN116540997B (en) 2023-07-07 2023-07-07 Data type declaration method, medium, device and computing equipment

Country Status (1)

Country Link
CN (1) CN116540997B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7526752B1 (en) * 2005-04-12 2009-04-28 Sun Microsystems, Inc. Introspection support for generic types
WO2017128986A1 (en) * 2016-01-29 2017-08-03 腾讯科技(深圳)有限公司 Selection method, device and storage medium for multimedia menu item
CN111198711A (en) * 2020-01-13 2020-05-26 陕西心像信息科技有限公司 Collection version control method and system based on MongoDB
CN111796727A (en) * 2019-03-22 2020-10-20 阿里巴巴集团控股有限公司 Interface data processing method and device
CN113741743A (en) * 2021-01-04 2021-12-03 北京沃东天骏信息技术有限公司 Display method and device, equipment and storage medium
CN113761411A (en) * 2020-08-21 2021-12-07 北京沃东天骏信息技术有限公司 Page processing method and device
CN115826835A (en) * 2021-09-16 2023-03-21 腾讯科技(深圳)有限公司 Data processing method and device and readable storage medium
CN116107524A (en) * 2023-04-13 2023-05-12 杭州朗和科技有限公司 Low-code application log processing method, medium, device and computing equipment
CN116382659A (en) * 2023-05-29 2023-07-04 珠海乐图软件有限公司 Data definition method of code-free development platform

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070240080A1 (en) * 2006-04-11 2007-10-11 Invensys Systems, Inc. Strategy editor for process control supporting drag and drop connections to declarations
US8286130B2 (en) * 2007-04-24 2012-10-09 Intel Corporation Methods and systems for using type models to generate an implementation of a type
US10503707B2 (en) * 2016-07-01 2019-12-10 Salesforce.Com, Inc. Field types defined via custom metadata types
US20220156152A1 (en) * 2016-09-15 2022-05-19 Pure Storage, Inc. Dynamic data segment sizing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7526752B1 (en) * 2005-04-12 2009-04-28 Sun Microsystems, Inc. Introspection support for generic types
WO2017128986A1 (en) * 2016-01-29 2017-08-03 腾讯科技(深圳)有限公司 Selection method, device and storage medium for multimedia menu item
CN111796727A (en) * 2019-03-22 2020-10-20 阿里巴巴集团控股有限公司 Interface data processing method and device
CN111198711A (en) * 2020-01-13 2020-05-26 陕西心像信息科技有限公司 Collection version control method and system based on MongoDB
CN113761411A (en) * 2020-08-21 2021-12-07 北京沃东天骏信息技术有限公司 Page processing method and device
CN113741743A (en) * 2021-01-04 2021-12-03 北京沃东天骏信息技术有限公司 Display method and device, equipment and storage medium
CN115826835A (en) * 2021-09-16 2023-03-21 腾讯科技(深圳)有限公司 Data processing method and device and readable storage medium
CN116107524A (en) * 2023-04-13 2023-05-12 杭州朗和科技有限公司 Low-code application log processing method, medium, device and computing equipment
CN116382659A (en) * 2023-05-29 2023-07-04 珠海乐图软件有限公司 Data definition method of code-free development platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Visualization of Programming Skill Structure by Log-Data Analysis with Decision Tree";Shinichi Oeda,Mutsumi Chieda;《Procedia Computer Science》;第159卷;Pages 582-589 *
"深入评析低代码开发平台";郭卫丹等;《中国信息技术教育》(第11期);全文 *

Also Published As

Publication number Publication date
CN116540997A (en) 2023-08-04

Similar Documents

Publication Publication Date Title
US8495100B2 (en) Semantic version control system for source code
US5878425A (en) Intuitive technique for visually creating resource files
US20200167134A1 (en) Programming Environment Augment with Automated Dialog System Assistance
US20150046153A1 (en) Macro replacement of natural language input
CN111427561A (en) Service code generation method and device, computer equipment and storage medium
US8005812B1 (en) Collaborative modeling environment
US8161399B2 (en) Automated learning system for improving graphical user interfaces
CN111443964B (en) Method, apparatus and computer readable storage medium for updating user interface
EP1715418A1 (en) Task-based interface with underlying extensible framework
US20090254538A1 (en) Methods, systems, and computer program products for social based assistance in a source code control system
Benyon et al. Critical Issues in User Interface Systems Engineering
CN112558966B (en) Depth model visualization data processing method and device and electronic equipment
CN117009911B (en) Abnormality determination method and device for target event, medium and electronic equipment
CN116107524B (en) Low-code application log processing method, medium, device and computing equipment
CN116540997B (en) Data type declaration method, medium, device and computing equipment
WO2023109648A1 (en) Model-code synchronization method
CN109344050B (en) Interface parameter analysis method and device based on structure tree
US11194966B1 (en) Management of concepts and intents in conversational systems
JP2019133534A (en) Merging method, merging device, and merging program
US11106526B1 (en) Architecture-based root cause analysis
CN113961835A (en) Data processing method and device, electronic equipment and storage medium
CN110727428B (en) Method and device for converting service logic layer codes and electronic equipment
CN113190462A (en) Dynamic data debugging method, device and equipment
CN111125083B (en) Historical record screening method and device
US20230092628A1 (en) Systems and methods for building products

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou NetEase Shuzhifan Technology Co.,Ltd.

Address before: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU LANGHE TECHNOLOGY Ltd.