Element configuration processing method and device, equipment and storage medium

By converting expressions into control conditions for configuration fields, users can edit them on the graphical user interface, solving the problem of high threshold for logical control configuration of page elements in the existing technology and enabling convenient page construction for non-professional users.

CN120803448APending Publication Date: 2025-10-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510928445.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In the existing technology, the logical control configuration method of page elements mainly relies on professionals to input JS expressions, which has a high threshold and is not conducive to page construction for non-professional users.

Method used

By receiving the first expression of the target programming language entered by the user on the expression interface, and converting it into a first control condition consisting of multiple configuration fields when receiving the interface switching operation, it is displayed on the graphical user interface, supporting users to perform editing operations through the configuration fields.

Benefits of technology

The configuration threshold of page elements is lowered, and users can implement logical control configuration without writing specific code, which improves the efficiency of page construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803448A_ABST
    Figure CN120803448A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to an element configuration processing method and device, equipment and a storage medium, and the method comprises the steps: firstly, receiving a first expression of a target programming language input by a user on an expression interface for a target page element, so as to achieve the logic control of a target page through the first expression; when a trigger operation of switching from the expression interface to the graphical user interface is received, converting the first expression into a first control condition formed by a plurality of configuration fields, and displaying the first control condition on the graphical user interface, therefore, a user can trigger an editing operation for the first control condition through the configuration field in the first control condition. Visibly, according to the embodiment of the invention, the configuration of the logic control of the page elements can be realized in a manner of configuring the fields, the configuration threshold of the page elements is reduced, and the page is convenient to build.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of data processing, and particularly relates to an element configuration processing method and device, equipment and a storage medium. BACKGROUND

[0002] With the continuous development of data processing technology, pages play a vital role as the core interface for users to interact with software, websites or applications. A page is usually composed of various elements such as text, pictures, buttons, tables, etc. These elements are combined together through specific layout and design rules to provide users with information display, interactive operation and other functions.

[0003] In the process of building a page, logical control configuration of page elements such as display, hiding, loading, etc. is usually required. In related technologies, the logical control configuration of page elements is only realized by professional personnel inputting JS expressions. Obviously, this configuration processing method has a high threshold and is not conducive to the building of pages. SUMMARY

[0004] To solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an element configuration processing method, device, equipment and storage medium.

[0005] In a first aspect, the embodiments of the present disclosure provide an element configuration processing method, which comprises:

[0006] receiving a first expression input on an expression interface for a target page element; wherein the first expression is a code snippet of a target programming language, and the first expression is used for logical control of the target page element;

[0007] in response to a trigger operation of switching from the expression interface to a graphical user interface, converting the first expression into a first control condition composed of a plurality of configuration fields, and displaying the first control condition on the graphical user interface; wherein the configuration field in the first control condition is used to trigger an editing operation for the first control condition.

[0008] In an optional implementation, after displaying the first control condition on the graphical user interface, the method further comprises:

[0009] receiving an editing operation on the graphical user interface for at least one configuration field in the first control condition;

[0010] determining a second control condition corresponding to the first control condition based on the editing operation.

[0011] In an alternative implementation, after the determining the second control condition corresponding to the first control condition based on the editing operation, the method further comprises:

[0012] In response to a triggering operation of switching to the expression interface by the graphical user interface, converting the second control condition into a second expression, and displaying the second expression on the expression interface; wherein the second expression belongs to a code snippet of the target programming language.

[0013] In an alternative implementation, after the converting the second control condition into a second expression, the method further comprises:

[0014] In response to a determination message for the second expression on the expression interface, storing the second expression into a database; wherein the second expression is used for logical control of the target page element.

[0015] In an alternative implementation, the converting the first expression into a first control condition composed of a plurality of configuration fields comprises:

[0016] Converting the first expression into a condition object of a preset domain-specific language type by analyzing the first expression;

[0017] Converting the condition object of the preset domain-specific language type into the first control condition composed of a plurality of configuration fields.

[0018] In an alternative implementation, the converting the first expression into a condition object of a preset domain-specific language type by analyzing the first expression comprises:

[0019] Determining a sub-expression according to a split identifier in the first expression, and generating an abstract syntax tree corresponding to the sub-expression by parsing the sub-expression;

[0020] Generating a sub-condition object of a preset domain-specific language type corresponding to the sub-expression by parsing the abstract syntax tree;

[0021] Determining the condition object of the preset domain-specific language type based on the sub-condition object.

[0022] In an alternative implementation, the converting the second control condition into a second expression comprises:

[0023] Generating a condition object of a preset domain-specific language type based on a configuration field in the second control condition;

[0024] convert the preset field-specific language type condition object into an expression of the target programming language as a second expression.

[0025] In an optional implementation, the second control condition includes a plurality of sub-conditions, and the plurality of sub-conditions have a logical relationship therebetween, and the converting the second control condition into the second expression includes:

[0026] The second control condition is converted into the second expression according to the plurality of sub-conditions and the logical relationship therebetween.

[0027] In a second aspect, the present disclosure provides an element configuration processing apparatus, and the apparatus includes:

[0028] A first receiving module is configured to receive a first expression input on an expression interface for a target page element, wherein the first expression is a code snippet of a target programming language, and the first expression is used for logical control of the target page element.

[0029] A first converting module is configured to convert the first expression into a first control condition composed of a plurality of configuration fields in response to a trigger operation of switching from the expression interface to a graphical user interface, and display the first control condition on the graphical user interface, wherein a configuration field in the first control condition is used to trigger an editing operation for the first control condition.

[0030] In a third aspect, the present disclosure provides an electronic device, and the electronic device includes a processor, a memory for storing executable instructions of the processor, and the processor is configured to read the executable instructions from the memory and execute the instructions to implement the element configuration processing method provided by the embodiments of the present disclosure.

[0031] In a fourth aspect, the present disclosure provides a computer-readable storage medium, and the storage medium stores a computer program, and the computer program is used to execute the element configuration processing method provided by the embodiments of the present disclosure.

[0032] In a fifth aspect, the present disclosure provides a computer program product, and the computer program product includes computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the above method.

[0033] Compared with the prior art, the technical solutions provided by the embodiments of the present disclosure have at least the following advantages:

[0034] In the element configuration processing method provided by the embodiments of the present disclosure, first, a first expression of a target programming language input by a user on an expression interface for a target page element is received, so as to realize logical control of the target page through the first expression; when a trigger operation of switching from the expression interface to a graphical user interface is received, the first expression is converted into a first control condition composed of a plurality of configuration fields, and the first control condition is displayed on the graphical user interface, so that the user can trigger an editing operation for the first control condition through the configuration fields in the first control condition.

[0035] It can be seen that, by converting the first expression input for the target page element into the first control condition composed of the plurality of configuration fields, the embodiments of the present disclosure support the editing operation of the first control condition through the configuration fields in the first control condition, so that the configuration of the logical control of the page element can be realized through the configuration fields, and the configuration threshold of the page element is reduced, and the page building is facilitated. BRIEF DESCRIPTION OF DRAWINGS

[0036] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent by describing in detail some embodiments with reference to the attached drawings. The same or similar elements are denoted by the same or similar reference numerals throughout the drawings. It is to be understood that the drawings are schematic, and the original and elements are not necessarily drawn according to the scale.

[0037] Figure 1 A flowchart of an element configuration processing method provided by the embodiments of the present disclosure;

[0038] Figure 2 A schematic diagram of a graphical user interface and an expression interface provided by the embodiments of the present disclosure;

[0039] Figure 3 A schematic diagram of another graphical user interface and expression interface provided by the embodiments of the present disclosure;

[0040] Figure 4 A schematic diagram of still another graphical user interface and expression interface provided by the embodiments of the present disclosure;

[0041] Figure 5 A structural schematic diagram of an element configuration processing apparatus provided by the embodiments of the present disclosure;

[0042] Figure 6 A structural schematic diagram of an element configuration processing device provided by the embodiments of the present disclosure. DETAILED DESCRIPTION

[0043] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein; rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for illustrative purposes and are not intended to limit the scope of protection of the present disclosure.

[0044] It should be understood that each of the steps recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0045] The term "comprising" and variations thereof as used herein are open-ended, that is "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related terms are defined in the following description.

[0046] It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.

[0047] It should be noted that the modification of "one" or "multiple" mentioned in the present disclosure is illustrative rather than limiting, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".

[0048] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0049] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained in a proper manner according to relevant laws and regulations.

[0050] For example, when responding to the active request of the user, a prompt message is sent to the user to explicitly prompt the user that the operation requested to be performed will require the acquisition and use of the personal information of the user. Thus, the user can voluntarily choose whether to provide the personal information to the electronic device, application program, server or storage medium, etc. software or hardware performing the operation of the technical solutions of the present disclosure according to the prompt message.

[0051] As an optional but non-limiting implementation, in response to receiving the active request of the user, the manner of sending the prompt information to the user may be, for example, a pop-up window manner, in which the prompt information may be presented in the form of text. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0052] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure. Other manners that meet relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0053] With the continuous development of data processing technology, pages play a crucial role as the core interface for users to interact with software, websites, or applications. Pages are usually composed of various elements such as text, images, buttons, tables, etc. These elements are combined through specific layout and design rules to provide users with information display, interactive operation, and other functions.

[0054] During the construction of a page, logical control configuration of page elements, such as display, hiding, loading, etc., is usually required. In related technologies, the configuration of logical control of page elements is mainly achieved by professional personnel inputting JS expressions. However, for users with limited code writing ability, if they want to modify the logical control of page elements, they can only achieve it by editing JS expressions. Obviously, this configuration processing method has a high threshold and is not conducive to page construction.

[0055] Therefore, the embodiments of the present disclosure provide an element configuration processing method. First, a first expression of a target programming language input by a user on an expression interface for a target page element is received to achieve logical control of the target page through the first expression. When a trigger operation of switching from the expression interface to a graphical user interface is received, the first expression is converted into a first control condition composed of multiple configuration fields, and the first control condition is displayed on the graphical user interface, so that the user can trigger an editing operation for the first control condition through the configuration fields in the first control condition. It can be seen that the embodiments of the present disclosure convert the first expression input for the target page element into a first control condition composed of multiple configuration fields to support editing operations of the first control condition through the configuration fields in the first control condition. Therefore, the user can realize the configuration of logical control of page elements through the configuration fields, which reduces the configuration threshold of page elements and facilitates the construction of pages.

[0056] For ease of understanding, the present disclosure provides an element configuration processing method, which can be executed by an element configuration processing device, wherein the device can be implemented using software and / or hardware and can generally be integrated into an electronic device. Figure 1 , is a flowchart of an element configuration processing method provided by an embodiment of the present disclosure, wherein the method includes:

[0057] S101: Receive a first expression input for a target page element on an expression interface.

[0058] The first expression is a code snippet of a target programming language, and is used to perform logical control on the target page element.

[0059] The element configuration processing method provided by the embodiments of the present disclosure may be applied to a client. For example, the client may include a client deployed on a smart phone, a client deployed on a tablet computer, and the like.

[0060] In actual applications, page elements are the basic components of a page. Users can interact with software, websites, or applications or obtain information through page elements. Therefore, in the process of building a page, logical control such as displaying, hiding, and loading of page elements is usually involved.

[0061] In the embodiment of the present disclosure, the target page element can be any page element in the page to be built. The page to be built can include, for example, a video playback page, a query page, etc. The page elements can include, for example, component elements such as radio buttons, check boxes, text boxes, and can also include elements such as variables, objects or object properties in the page data.

[0062] In the disclosed embodiments, an expression interface refers to a page provided to a user for performing logical control of page elements through expressions. Specifically, upon receiving a first expression entered by a user for a target page element on the expression interface, the first expression can be used to perform logical control of the target page element, such as controlling the display or hiding of the target page element.

[0063] The first expression is a code snippet of a target programming language, and may include, for example, JavaScript, HTML, etc. The embodiment of the present disclosure does not impose any specific restrictions on the target programming language.

[0064] S102: In response to a triggering operation of switching from the expression interface to the graphical user interface, converting the first expression into a first control condition consisting of a plurality of configuration fields, and displaying the first control condition on the graphical user interface.

[0065] The configuration field in the first control condition is used to trigger an editing operation for the first control condition.

[0066] In the embodiments of the present disclosure, the graphical user interface refers to a page provided for a user to configure a page element by a configuration field, and the graphical user interface is provided with a left value, an operator, a right value and other page components for conditional configuration. The user can input a control condition corresponding to a page element by configuring a field for each page component. The triggering operation from the expression interface to the graphical user interface can include a triggering operation on the "control condition" control.

[0067] In the embodiments of the present disclosure, when receiving the triggering operation from the expression interface to the graphical user interface, the first expression on the expression interface is first converted into a first control condition composed of multiple configuration fields, and then the first control condition is displayed on the graphical user interface.

[0068] As shown in Figure 2 FIG. 1 is a schematic diagram of an expression page and a graphical user interface provided by the embodiments of the present disclosure. In the expression interface in Figure 2 the expression interface is a display page of a JS expression input by the user for a radio button.

[0069] When receiving the triggering operation from the expression interface to the graphical user interface, the JS expression in the expression page is converted into a first control condition composed of multiple configuration fields, and the first control condition is displayed in the graphical user interface.

[0070] The first control condition obtained based on the JS expression can include sub-conditions such as "text content 1 is not empty", "the length of page title 1 is greater than or equal to 1", and "page title 2 is equal to text content 1". In the sub-condition "text content 1 is not empty", "text content 1" is a field configured by the user for the "left value" page component, and "not empty" is a field configured by the user for the "operator" page component; in the sub-condition "the length of page title 1 is greater than or equal to 1", "page title 1" is a field configured by the user for the "left value" page component, "length greater than or equal to" is a field configured by the user for the "operator" page component, and "1" is a field configured by the user for the "right value" page component.

[0071] In actual applications, the "left value", "operator", "right value" and other page components in the graphical user interface can be implemented by using a drop-down list, for example, for the "left value" page component, the user can configure a corresponding field for the "left value" page component by selecting each option displayed in the drop-down list corresponding to the "left value" page component.

[0072] In the element configuration processing method provided by the embodiments of the present disclosure, first, a first expression in a target programming language input by a user on an expression interface for a target page element is received, so as to realize logical control of a target page through the first expression; when a trigger operation of switching from the expression interface to a graphical user interface is received, the first expression is converted into a first control condition composed of multiple configuration fields, and the first control condition is displayed on the graphical user interface, so that the user can trigger an editing operation for the first control condition through the configuration fields in the first control condition. It can be seen that, by converting the first expression input for the target page element into the first control condition composed of multiple configuration fields, the embodiments of the present disclosure support the editing operation of the first control condition through the configuration fields in the first control condition, so that the user can realize the configuration of the logical control of the page element through the configuration fields, thereby reducing the configuration threshold of the page element and facilitating the building of the page.

[0073] In an optional implementation, the first control condition input by the user on the graphical user interface through the configuration fields for the target page element can also be received, and then the first control condition is converted into the first expression in the target programming language, so as to realize the logical control of the target page element through the first expression.

[0074] In the embodiments of the present disclosure, the user can configure the corresponding control condition for the page element through the configuration fields on the graphical user interface, and realize the configuration of the logical control of the page element. Obviously, this configuration field mode does not require the user to write specific codes, so as to reduce the configuration threshold of the page element, thereby improving the page building efficiency of the user.

[0075] In an optional implementation, since the first control condition can include multiple sub-conditions, the user can also configure the corresponding logical relationship for the multiple sub-conditions in the first control condition in the process of configuring the first control condition for the target page element, so as to convert the first control condition into the first expression in the target programming language based on the multiple sub-conditions and the logical relationship between the multiple sub-conditions.

[0076] In the embodiments of the present disclosure, first, the first control condition input through the configuration fields on the graphical user interface for the target page element and the logical relationship between the multiple sub-conditions input for the multiple sub-conditions in the first control condition are received, and then the first control condition is converted into the first expression in the target programming language according to the multiple sub-conditions and the logical relationship between the multiple sub-conditions. The logical relationship between the multiple sub-conditions can include or, and, etc.

[0077] For example Figure 2For example, in the graphical user interface in FIG. 1, assuming that the logical relationship between the multiple sub-conditions is set as: the single selection control is disabled when all of the following conditions are met, it indicates that the logical relationship between the multiple sub-conditions is and, that is, the single selection control can be disabled only when all of the sub-conditions are met; assuming that the logical relationship between the multiple sub-conditions is set as: the single selection control is disabled when any of the following conditions is met, it indicates that the logical relationship between the multiple sub-conditions is or, that is, the single selection control can be disabled as long as any of the sub-conditions is met.

[0078] It can be seen that the embodiment of the present disclosure also supports the configuration of the logical control of the page element by configuring the field, so as to reduce the configuration threshold of the page element and facilitate the construction of the page.

[0079] In an optional implementation, in the process of displaying the first control condition on the graphical user interface, an editing operation on at least one configuration field in the first control condition on the graphical user interface can also be received; then, the second control condition corresponding to the first control condition is determined based on the editing operation.

[0080] The editing operation on at least one configuration field in the first control condition can include a modification operation on the at least one configuration field, for example, in the first control condition "Text Content 1 is not empty", the field "Text Content 1" configured for the "left value" page component is modified to "Text Content 2", and the second control condition "Text Content 2 is not empty" is obtained.

[0081] In actual application, after editing at least one configuration field in the first control condition on the graphical user interface to obtain the edited first control condition, the second control condition can also be converted back to an expression of the target programming language, so that the expression of the target programming language can be edited by the user subsequently.

[0082] In the embodiment of the present disclosure, when the triggering operation of switching from the graphical user interface to the expression interface is received, the second control condition is converted into a second expression, and the second expression is displayed on the expression interface. The second expression belongs to a code snippet of the target programming language.

[0083] In the embodiment of the present disclosure, the triggering operation of switching from the graphical user interface to the expression interface can include a click operation on a switching control within the graphical user interface, etc. For example Figure 2 In the graphical user interface in FIG. 1, when a click operation on the "write expression" control 202 is received, the graphical user interface is switched to the expression interface, and a second expression of the target programming language is displayed on the expression interface, so that the user can view how the expression of the target programming language is configured based on the expression interface.

[0084] In an alternative implementation, after the second control condition is converted into the second expression, the second expression can be stored into the database in response to a determination message for the second expression on the expression interface, where the second expression is used to logically control the target page element.

[0085] In the embodiments of the present disclosure, after the second control condition is converted into the second expression in the target programming language, the second control condition can be converted based on the second expression stored in the database, and the second control condition can be displayed on the graphical user interface, by storing the second expression into the database, so as to subsequently switch back to the graphical user interface from the expression interface.

[0086] In another alternative implementation, during the process of displaying the second expression in the target programming language on the expression interface, an editing operation for the second expression in the expression interface can also be received, and an edited expression can be determined based on the editing operation, and the expression in the database can be updated using the edited expression.

[0087] The editing operation for the expression can include an editing operation for any sub-expression in the expression, an editing operation for a logical relationship between multiple sub-expressions, etc. After the edited expression is determined, the expression for the target page element stored in the database is updated using the edited expression.

[0088] It can be seen that the embodiments of the present disclosure not only support editing the control condition of the target page element on the graphical user interface by configuring the fields to reduce the configuration threshold of the page element, but also support editing the expression converted from the control condition on the expression page, thereby meeting the configuration needs of professionals based on the expression to control the logic of the page element.

[0089] In an alternative implementation, the control condition for the target page element can also be displayed on the graphical user interface based on a condition object in a preset domain-specific language type by converting the first expression into the condition object.

[0090] In the embodiments of the present disclosure, when the trigger operation of switching from the expression interface to the graphical user interface is received, the first expression is first analyzed to convert the first expression into a condition object in a preset domain-specific language type; then the condition object in the preset domain-specific language type is converted into the first control condition composed of multiple configuration fields; and then the first control condition is displayed on the graphical user interface.

[0091] The domain-specific language DSL is a computer language designed to solve a problem in a specific domain, and the DSL makes the problem solving in the specific domain more efficient through customized syntax.

[0092] In the embodiments of the present disclosure, since the control conditions on the graphical user interface are displayed by using the condition objects of the preset domain-specific language type, when switching from the expression interface to the graphical user interface, the first control condition needs to be converted from the expression to be converted to the condition object of the preset domain-specific language type first, and then displayed on the graphical user interface by using the condition object of the preset domain-specific language type.

[0093] As shown in FIG. 2, when receiving the trigger operation of the “control condition” control 201 on the expression interface, the first expression displayed on the expression interface is analyzed first, and the first expression is converted to the condition object of the preset domain-specific language type, and then the condition object of the preset domain-specific language type is converted to the first control condition, and the first control condition is displayed on the graphical user interface. Figure 2

[0094] In addition, the first control condition displayed on the graphical user interface can include multiple sub-conditions, and a corresponding delete control is set for each sub-condition. When receiving the trigger operation of the delete control corresponding to any sub-condition, the sub-condition is deleted from the first control condition corresponding to the target page element.

[0095] It can be seen that the embodiments of the present disclosure support converting the first expression displayed on the expression interface to the condition object of the preset domain-specific language type, converting the first control condition by using the condition object, and displaying the first control condition on the graphical user interface.

[0096] In an optional implementation, in the process of converting the first expression to the condition object of the preset domain-specific language type, the sub-expression can also be determined according to the split identifier in the first expression, and the corresponding abstract syntax tree is generated by analyzing the sub-expression; then the sub-condition object of the preset domain-specific language type corresponding to the sub-expression is generated by analyzing the abstract syntax tree; and then the condition object of the preset domain-specific language type is determined based on the sub-condition object.

[0097] In the embodiments of the present disclosure, the split identifier can include identifiers such as “&&” and “||”, wherein the split identifier “&&” represents the logical relationship between multiple sub-conditions as and, and the split identifier “||” represents the logical relationship between multiple sub-conditions as and. When receiving the trigger operation of switching from the expression interface to the graphical user interface, the expression to be converted is first split according to the split identifier “&&” or “||” in the expression to be converted, and multiple sub-expressions are obtained. For each sub-expression, the corresponding abstract syntax tree of each sub-expression is generated by using the parser library to analyze the sub-expression.

[0098] ​The Abstract Syntax Tree (AST) is a tree structure used to represent the abstract syntax structure of the code, each node in the AST represents a structure in the code, such as an expression, a statement, a function, etc., and the nodes are connected by parent-child relationship, forming a tree structure.

[0099] In an optional implementation, after generating the abstract syntax tree corresponding to each sub-expression respectively, the abstract syntax tree can be parsed by using the mapping relationship between the pre-configured variable and the variable type, to generate the sub-condition object corresponding to each sub-expression respectively, so as to determine the condition object of the preset domain-specific language type by using the sub-condition object.

[0100] It can be seen that, by converting the first expression input for the target page element into the first control condition composed of multiple configuration fields, the editing operation of the first control condition by the configuration field in the first control condition is supported, so that the configuration of the logical control of the page element can be realized by the configuration field, thereby reducing the configuration threshold of the page element and facilitating the construction of the page.

[0101] In an optional implementation, in the process of displaying the second control condition on the graphical user interface, when a trigger operation of switching from the graphical user interface to the expression interface is received, a condition object of a preset domain-specific language type can be first generated based on the configuration field in the second control condition, and then the condition object of the preset domain-specific language type is converted into an expression of a target programming language as a second expression.

[0102] In the embodiments of the present disclosure, in the process of converting the control condition into the second expression of the target programming language, the preset domain-specific language type is designed and used as the business data type of the condition rendering plug-in, so that in the process of switching from the graphical user interface to the expression interface, the control condition can be first converted into a condition object of a preset domain-specific language type, and then converted into a JS expression, and finally the control logic of the target page element is stored in the database in the form of a JS expression type.

[0103] In an optional implementation, the second control condition can include multiple sub-conditions, and the multiple sub-conditions have a logical relationship. When a trigger operation of switching from the graphical user interface to the expression interface is received, the second control condition can be converted into a second expression of a target programming language according to the multiple sub-conditions and the logical relationship between the multiple sub-conditions.

[0104] Exemplarily, assuming that the logical relationship between the plurality of sub-conditions is and, i.e., the component is disabled when all the sub-conditions are met, when converting the second control condition into the second expression of the target programming language, specifically, the plurality of sub-conditions can be converted into sub-expressions of the target programming language, and each specific sub-expression is connected by the symbol “&&”; assuming that the logical relationship between the plurality of sub-conditions is or, i.e., the component is disabled when any one of the sub-conditions is met, when converting the second control condition into the second expression of the target programming language, specifically, the plurality of sub-conditions can be converted into sub-expressions of the target programming language, and each specific sub-expression is connected by the symbol “||”.

[0105] As shown in FIG. 7, a flowchart of another element configuration processing method provided by an embodiment of the present disclosure is shown. The method includes the following steps. Figure 3

[0106] S301: receiving a second control condition input for a target page element through a configuration field on a graphical user interface.

[0107] In the embodiment of the present disclosure, a user can configure a corresponding control condition for a page element through a configuration field on a graphical user interface, so as to realize configuration of logical control of the page element. Obviously, this configuration field does not require the user to write specific codes, so as to reduce the configuration threshold of the page element, thereby improving the page building efficiency of the user.

[0108] S302: in response to a trigger operation of switching from the graphical user interface to the expression interface, generating a condition object of a preset domain-specific language type based on the configuration field in the second control condition.

[0109] In the embodiment of the present disclosure, after receiving the second control condition input for the target page element through the configuration field on the graphical user interface, first, a condition object of a preset domain-specific language type is generated based on the configuration field in the control condition, so as to convert the condition object of the preset domain-specific language type into an expression of a target programming language subsequently.

[0110] Exemplarily, when a trigger operation of the “write expression” control 202 on the graphical user interface is received, first, a condition object of a preset domain-specific language type is generated based on the configuration field in the second control condition.

[0111] S302: converting the condition object of the preset domain-specific language type into an expression of the target programming language as a second expression, and displaying the second expression on the expression interface.

[0112] Exemplarily, after converting the condition object of the preset domain-specific language type into the second expression, the second expression is displayed on the expression interface.​

[0113] It can be seen that, since the embodiment of the present disclosure supports converting the control condition into an expression of the target programming language, the user can realize the configuration of the logical control of the page element by the way of configuring the field, thereby reducing the configuration threshold of the page element and facilitating the building of the page.

[0114] As shown in FIG. 6, a flowchart of another element configuration processing method provided by the embodiment of the present disclosure is shown. The method comprises the following steps: Figure 4

[0115] S401: receiving a first expression input on an expression interface for a target page element.

[0116] The first expression belongs to a code snippet of a target programming language, and the first expression is used for logical control of the target page element.

[0117] S402: in response to a trigger operation of switching from the expression interface to the graphical user interface, determining a sub-expression according to a split identifier in the first expression, and generating an abstract syntax tree corresponding to the sub-expression by parsing the sub-expression.

[0118] For example, when receiving the trigger operation of switching from the expression interface to the graphical user interface, the to-be-converted expression is first split according to the split identifier “&&” or “||” in the to-be-expressed expression, and a plurality of sub-expressions are obtained.

[0119] S403: generating a corresponding abstract syntax tree by parsing the sub-expression, and generating a sub-condition object of a preset domain-specific language type by parsing the abstract syntax tree.

[0120] In the embodiment of the present disclosure, after obtaining a plurality of sub-expressions, each sub-expression is first parsed to generate a corresponding abstract syntax tree AST, and then the abstract syntax tree AST is parsed using the mapping relationship between the pre-configured variables and variable types to generate a sub-condition object corresponding to each sub-expression.

[0121] S404: determining a condition object of the preset domain-specific language type based on the sub-condition object.

[0122] In the embodiment of the present disclosure, after generating the sub-condition object corresponding to each sub-expression, all the sub-condition objects are combined to obtain a complete condition object of the preset domain-specific language type.

[0123] S405: converting the condition object of the preset domain-specific language type into a first control condition composed of a plurality of configuration fields, and displaying the first control condition on the graphical user interface.​

[0124] In the embodiments of the present disclosure, after converting the condition object of the preset domain-specific language type into the first control condition, the first control condition is displayed on the graphical user interface.

[0125] It can be seen that the embodiments of the present disclosure can also convert the expression displayed on the expression interface into a condition object of a preset domain-specific language type, so as to display the control condition of the target page element on the graphical user interface by using the condition object.

[0126] In order to realize the above-mentioned embodiments, the present disclosure further provides an element configuration processing device. Figure 5 A structural schematic diagram of an element configuration processing device provided by the embodiments of the present disclosure is shown in FIG. 1. The device can be realized by software and / or hardware, and can be integrated in an electronic device. As shown in FIG. 1, the device includes: Figure 5

[0127] The first receiving module 501 is configured to receive a first expression input on an expression interface for a target page element; wherein the first expression belongs to a code segment of a target programming language, and the first expression is used for logical control of the target page element.

[0128] The first conversion module 502 is configured to convert the first expression into a first control condition composed of a plurality of configuration fields in response to a trigger operation of switching from the expression interface to a graphical user interface, and display the first control condition on the graphical user interface; wherein the configuration field in the first control condition is used to trigger an editing operation for the first control condition.

[0129] In an optional implementation, the device further includes:

[0130] The second receiving module is configured to receive an editing operation on the graphical user interface for at least one configuration field in the first control condition.

[0131] The determining module is configured to determine a second control condition corresponding to the first control condition based on the editing operation.

[0132] In an optional implementation, the device further includes:

[0133] The second conversion module is configured to convert the second control condition into a second expression in response to a trigger operation of switching from the graphical user interface to the expression interface, and display the second expression on the expression interface; wherein the second expression belongs to a code segment of the target programming language.

[0134] In an optional implementation, the device further includes: ​

[0135] a storage module, configured to store the second expression into a database in response to the determination message for the second expression on the expression interface, wherein the second expression is used to logically control the target page element.

[0136] In an optional implementation, the first conversion module comprises:

[0137] a first conversion submodule, configured to convert the first expression into a condition object of a preset domain-specific language type by analyzing the first expression;

[0138] a second conversion submodule, configured to convert the condition object of the preset domain-specific language type into a first control condition composed of a plurality of configuration fields.

[0139] In an optional implementation, the first conversion submodule is specifically configured to:

[0140] determine a sub-expression according to a split identifier in the first expression, and generate an abstract syntax tree corresponding to the sub-expression by parsing the sub-expression;

[0141] generate a sub-condition object of a preset domain-specific language type corresponding to the sub-expression by parsing the abstract syntax tree;

[0142] determine the condition object of the preset domain-specific language type based on the sub-condition object.

[0143] In an optional implementation, the second conversion module comprises:

[0144] a generation submodule, configured to generate a condition object of a preset domain-specific language type based on the configuration fields in the second control condition;

[0145] a third conversion submodule, configured to convert the condition object of the preset domain-specific language type into an expression of the target programming language as a second expression.

[0146] In an optional implementation, the second control condition comprises a plurality of sub-conditions, and the plurality of sub-conditions have a logical relationship, and the second conversion module comprises:

[0147] a fourth conversion submodule, configured to convert the second control condition into a second expression according to the plurality of sub-conditions and the logical relationship between the plurality of sub-conditions.

[0148] In the element configuration processing apparatus provided by the embodiment of the present disclosure, first, a first expression of a target programming language input by a user on an expression interface for a target page element is received, so as to realize logical control of the target page through the first expression; when a trigger operation of switching from the expression interface to a graphical user interface is received, the first expression is converted into a first control condition composed of a plurality of configuration fields, and the first control condition is displayed on the graphical user interface, so that the user can trigger an editing operation for the first control condition through the configuration fields in the first control condition. It can be seen that, by converting the first expression input for the target page element into the first control condition composed of the plurality of configuration fields, the embodiment of the present disclosure supports the editing operation of the first control condition through the configuration fields in the first control condition, so that the user can realize the configuration of the logical control of the page element through the configuration fields, thereby reducing the configuration threshold of the page element and facilitating the building of the page.

[0149] In addition to the method and the apparatus described above, the embodiment of the present disclosure further provides a computer-readable storage medium, and the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the element configuration processing method provided by the embodiment of the present disclosure.

[0150] The embodiment of the present disclosure further provides a computer program product, and the computer program product includes computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the element configuration processing method provided by the embodiment of the present disclosure.

[0151] In addition, the embodiment of the present disclosure further provides an element configuration processing device, as shown in Figure 6 may include:

[0152] The processor 601, the memory 602, the input device 603 and the output device 604. The number of processors 601 in the element configuration processing device can be one or more, Figure 6 In some embodiments of the present disclosure, the processor 601, the memory 602, the input device 603 and the output device 604 can be connected through a bus or other means, wherein, Figure 6 In some embodiments of the present disclosure, the processor 601, the memory 602, the input device 603 and the output device 604 can be connected through a bus or other means, wherein,

[0153] The memory 602 can be used to store software programs and modules, and the processor 601 can execute various functional applications and data processing of the element configuration processing device by running the software programs and modules stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by at least one function, and the like. In addition, the memory 602 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. The input device 603 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the element configuration processing device.

[0154] In particular in the present embodiment, the processor 601 loads the executable file corresponding to the process of one or more application programs into the memory 602 according to the following instructions, and runs the application programs stored in the memory 602 by the processor 601, thereby realizing the various functions of the element configuration processing device described above.

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

[0156] The above is only a specific embodiment of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing element configuration, characterized in that: The method comprises: Receive a first expression input on an expression interface for a target page element; wherein the first expression is a code snippet of a target programming language, and the first expression is used to perform logical control on the target page element; In response to a trigger operation of switching from the expression interface to the graphical user interface, the first expression is converted into a first control condition consisting of multiple configuration fields, and the first control condition is displayed on the graphical user interface; wherein the configuration fields in the first control condition are used to trigger an editing operation for the first control condition.

2. The element configuration processing method according to claim 1, characterized in that: After displaying the first control condition on the graphical user interface, the method further includes: receiving an editing operation on the graphical user interface for at least one configuration field in the first control condition; A second control condition corresponding to the first control condition is determined based on the editing operation.

3. The element configuration processing method according to claim 2, characterized in that: After determining the second control condition corresponding to the first control condition based on the editing operation, the method further includes: In response to a triggering operation of switching from the graphical user interface to the expression interface, the second control condition is converted into a second expression, and the second expression is displayed on the expression interface; wherein the second expression belongs to a code snippet of the target programming language.

4. The element configuration processing method according to claim 3, characterized in that: After converting the second control condition into a second expression, the method further includes: In response to a confirmation message for the second expression on the expression interface, the second expression is stored in a database; wherein the second expression is used to perform logical control on the target page element.

5. The element configuration processing method according to claim 1, characterized in that: The converting the first expression into a first control condition consisting of a plurality of configuration fields includes: By analyzing the first expression, the first expression is converted into a condition object of a preset domain-specific language type; The condition object of the preset domain specific language type is converted into a first control condition consisting of a plurality of configuration fields.

6. The element configuration processing method according to claim 5, characterized in that: The step of analyzing the first expression to convert the first expression into a condition object of a preset domain-specific language type includes: Determine a sub-expression according to the segmentation identifier in the first expression, and generate an abstract syntax tree corresponding to the sub-expression by parsing the sub-expression; Generate a sub-condition object of a preset domain-specific language type corresponding to the sub-expression by parsing the abstract syntax tree; The condition object of the preset domain-specific language type is determined based on the sub-condition object.

7. The element configuration processing method according to claim 3, characterized in that: Converting the second control condition into a second expression includes: generating a condition object of a preset domain-specific language type based on the configuration field in the second control condition; The condition object of the preset domain specific language type is converted into an expression in the target programming language as a second expression.

8. The element configuration processing method according to claim 3, characterized in that: The second control condition includes a plurality of sub-conditions, and the plurality of sub-conditions have a logical relationship between them. Converting the second control condition into a second expression includes: The second control condition is converted into a second expression according to the multiple sub-conditions and the logical relationships between the multiple sub-conditions.

9. An element configuration processing device, characterized in that: The device comprises: A first receiving module is configured to receive a first expression input on an expression interface for a target page element; wherein the first expression is a code snippet of a target programming language, and the first expression is used to perform logical control on the target page element; A first conversion module is used to convert the first expression into a first control condition consisting of multiple configuration fields in response to a trigger operation of switching from the expression interface to the graphical user interface, and display the first control condition on the graphical user interface; wherein the configuration field in the first control condition is used to trigger an editing operation for the first control condition.

10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product comprises a computer program / instructions, which implement the method according to any one of claims 1 to 8 when executed by a processor.