A method, apparatus, device and storage medium for implementing linkage function

By receiving JSON Schema configuration and performing linked parsing, the linked function code is automatically generated, which solves the problems of generalization limitations and high iterative development costs in the Formily framework, and realizes efficient linked function development.

CN114385148BActive Publication Date: 2026-04-07WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Formily's collaborative development has limitations in generalization and high costs in iterative development. In existing technologies, the lack of execution context for expression string variables leads to errors, and function-based development is complex and requires writing code blocks manually.

Method used

By receiving JSON Schema configuration, it iterates through the linkage configuration information of component nodes, performs linkage parsing processing using data structure specifications, automatically generates linkage function code, registers it to the linkage function API of the Formily framework, and realizes the linkage function of component nodes.

Benefits of technology

It solves the generalization limitations of collaborative development, reduces the need for handwritten code, lowers the cost of iterative development, and improves development efficiency and code execution effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114385148B_ABST
    Figure CN114385148B_ABST
Patent Text Reader

Abstract

This application proposes a method, apparatus, electronic device, and computer storage medium for implementing linkage functionality, applied in the low-code core class of the Formily framework. The method includes: receiving a JSON Schema configuration sent from a user page; the JSON Schema configuration is obtained by the user page from a page designer; the JSON Schema configuration includes linkage configuration information describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification; obtaining the linkage configuration information of each component node by traversing the JSON Schema configuration; performing linkage parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain linkage function code after linkage parsing processing; and using the linkage function code after linkage parsing processing to implement the linkage function for each component node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology in financial technology (Fintech), and more particularly to a method, apparatus, electronic device, and computer storage medium for realizing linkage functions. Background Technology

[0002] With the development of computer technology, more and more technologies are being applied in the financial field, and the traditional financial industry is gradually transforming into financial technology. However, due to the security and real-time requirements of the financial industry, higher demands are also being placed on technology.

[0003] Among related technologies, the high-performance form solution Forily suffers from limitations in generalization and high costs in iterative development. For example, when writing cascading functions in the schema using expression strings, variables within those strings may cause errors due to a lack of correct execution context when executed elsewhere. Furthermore, when developing complex cascading functions using Forily's effect application programming interface (API) with functions, each iteration requires manually writing the code blocks related to the complex cascading functions; consequently, this impacts Forily's cascading development capabilities. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and computer storage medium for implementing linkage functions, which can solve the problems of the limitations in the generalization of Formily's linkage development and the high cost in iterative development in related technologies.

[0005] The technical solution of this application is implemented as follows:

[0006] This application provides a method for implementing linkage functionality, applied in the low-code core class of the Formily framework. The method includes:

[0007] Receive JSON Schema configuration sent from the user page; the JSON Schema configuration is obtained by the user page from the page designer; the JSON Schema configuration includes linkage configuration information for describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification;

[0008] By traversing the JSON Schema configuration, the linkage configuration information of each component node among the multiple component nodes is obtained; the linkage configuration information of each component node is parsed according to the data structure specification to obtain the linkage function code after linkage parsing;

[0009] The linkage function code after the linkage parsing process is used to realize the linkage function for each component node.

[0010] For example, the component node includes multiple sets of linkage configuration information, each set of linkage configuration information including: the final setting result of the component node and linkage conditions; the linkage conditions include condition node path and condition component node type;

[0011] The linkage function code after linkage parsing is used to execute the following steps:

[0012] In the current set of linkage configuration information included in the current component node, the component node is found from the other component nodes according to the condition node path and condition component node type in the linkage condition; the current component node refers to the component node that needs to be linked and parsed among the multiple component nodes, and the other component nodes refer to the component nodes other than the current component node among the multiple component nodes.

[0013] Determine whether the found component nodes meet the linkage conditions;

[0014] When it is determined that the found component node meets the linkage condition, the current set of linkage configuration information is determined to meet the linkage condition, and the final setting result in the current set of linkage configuration information is set to the result of the current component node.

[0015] For example, the linkage condition further includes a condition node value and a condition node value type, and determining whether the found component node satisfies the linkage condition includes:

[0016] The condition node values ​​of the found component nodes are converted according to the type of the condition node values ​​in the linkage conditions to obtain the converted condition values.

[0017] If the condition value after type conversion is the same as the condition node value in the linkage condition, it is determined that the found component node satisfies the linkage condition.

[0018] If the condition value after type conversion is different from the condition node value in the linkage condition, it is determined that the found component node does not meet the linkage condition.

[0019] For example, the step of using the linkage function code after the linkage parsing processing to implement the linkage function for each component node includes:

[0020] Register the linked function code after the linked parsing processing to the linked function application interface API of the Formic framework;

[0021] When it is determined that the user page triggers a linkage for each component node, the linkage function code is called through the linkage function API to realize the linkage function for each component node.

[0022] Exemplarily, the method further includes:

[0023] According to the data structure specification, the linkage configuration information of each component node is verified and parsed to obtain the verification function code after verification and parsing.

[0024] The verification function code after the verification parsing process is used to implement the verification function for each component node.

[0025] For example, the component node includes multiple sets of linkage configuration information, each set of linkage configuration information including: the final setting result of the component node and linkage conditions; the linkage conditions include condition node path and condition component node type;

[0026] The verification function code after the linkage parsing process is used to perform the following steps:

[0027] In the current set of linkage configuration information included in the current component node, the component node is found from the other component nodes according to the condition node path and condition component node type in the linkage condition; the current component node refers to the component node that needs to be linked and parsed among the multiple component nodes, and the other component nodes refer to the component nodes other than the current component node among the multiple component nodes.

[0028] Determine whether the found component nodes meet the linkage conditions;

[0029] When it is determined that the found component node meets the linkage condition, it is also determined that the current set of linkage configuration information meets the linkage condition. The result of the current component node is then checked to see if it passes the verification, and a verification result is obtained. After determining that the current component node has passed the verification based on the verification result, the next component node of the current component node is checked to see if it passes the verification, until all component nodes requiring linkage parsing processing have been checked. Alternatively,

[0030] When it is determined that the found component node does not meet the linkage condition, the current component node is determined to pass the verification; the next component node of the current component node is then determined to pass the verification, until all component nodes that need linkage parsing processing are judged.

[0031] For example, the step of finding the component node from the remaining component nodes according to the condition node path and condition component node type in the linkage condition includes:

[0032] From the remaining component nodes, determine the component nodes that correspond to the condition node paths in the linkage conditions;

[0033] Find the component node with the same type as the condition component node in the linkage condition from the component node.

[0034] For example, the step of using the verification function code after the verification parsing process to implement the verification function for each component node includes:

[0035] Register the verification function code after the linkage parsing process to the submission function of the low-code core class;

[0036] When the user page determines to perform a data recovery or submission operation, the verification function code is executed to perform a verification function on each component node.

[0037] For example, after executing the verification function code, the method further includes:

[0038] Based on the data type of the condition node in the linkage condition of the current component node, the output data of the verification function code is converted.

[0039] This application also proposes a device for implementing a linkage function, the device comprising a receiving module, a receiving module, and a linkage module, wherein...

[0040] The receiving module is used to receive JSON Schema configuration sent from the user page; the JSON Schema configuration is obtained by the user page from the page designer; the JSON Schema configuration includes linkage configuration information for describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification;

[0041] The module is used to obtain the linkage configuration information of each component node among the multiple component nodes by traversing the JSON Schema configuration; and to perform linkage parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain the linkage function code after linkage parsing processing.

[0042] The linkage module is used to implement the linkage function for each component node by utilizing the linkage function code after linkage parsing.

[0043] This application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method for achieving linkage function provided by one or more of the aforementioned technical solutions.

[0044] This application provides a computer storage medium storing a computer program; when the computer program is executed, it can implement the method for achieving linkage function provided by one or more of the aforementioned technical solutions.

[0045] This application proposes a method, apparatus, electronic device, and computer storage medium for implementing linkage functionality, applied in the low-code core class of the Formily framework. The method includes: receiving a JSON Schema configuration sent from a user page; the JSON Schema configuration is obtained by the user page from a page designer; the JSON Schema configuration includes linkage configuration information describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification; obtaining the linkage configuration information of each component node among the multiple component nodes by traversing the JSON Schema configuration; performing linkage parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain linkage function code after linkage parsing processing; and using the linkage function code after linkage parsing processing to implement the linkage function for each component node.

[0046] As can be seen in this embodiment, since each component node included in the JSON Schema configuration corresponds to the same data structure specification, when it is necessary to perform linkage development on each component node included in the JSON Schema configuration, linkage parsing processing of these component nodes can be performed based on a generalized data structure specification. This solves the problem of the limitation of linkage development in terms of generalization. Furthermore, when performing linkage parsing processing on these component nodes according to the data structure specification, by sorting out the rules of each protocol field in the data structure specification, functional code for implementing linkage functions can be automatically generated. In this way, developers do not need to manually write code blocks related to complex linkage functions each time, solving the problem of high cost in iterative development of linkage functions. Attached Figure Description

[0047] Figure 1A This is a flowchart illustrating a method for implementing linkage functionality in an embodiment of this application;

[0048] Figure 1B This is a flowchart illustrating the execution of linkage function code in an embodiment of this application;

[0049] Figure 1C This is a schematic diagram of a data structure specification in an embodiment of this application;

[0050] Figure 2AThis is a schematic diagram illustrating a scenario for implementing the linkage verification function according to an embodiment of this application;

[0051] Figure 2B This is a schematic diagram illustrating a process for performing linked parsing and verification parsing according to an embodiment of this application;

[0052] Figure 2C This is a schematic diagram illustrating another process for performing linked parsing in an embodiment of this application;

[0053] Figure 2D This is a schematic diagram illustrating another verification and parsing process according to an embodiment of this application;

[0054] Figure 3 This is a schematic diagram of the structural composition of the device for implementing the linkage function according to an embodiment of this application;

[0055] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0056] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are merely illustrative of the present application and are not intended to limit the present application. Furthermore, the embodiments provided below are some embodiments for implementing the present application, and not all embodiments for implementing the present application. Unless otherwise specified, the technical solutions described in the embodiments of the present application can be implemented in any combination.

[0057] It should be noted that, in the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a method or apparatus that includes a list of elements includes not only the elements expressly described, but also other elements not expressly listed, or elements inherent to implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other related elements (e.g., steps in the method or units in the apparatus, such as portions of circuitry, processors, programs, or software, etc.) in the method or apparatus that includes that element.

[0058] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, I and / or J can represent three cases: I alone, I and J simultaneously, and J alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements. For example, including at least one of I, J, and R can mean including any one or more elements selected from the set consisting of I, J, and R.

[0059] For example, the method for implementing linkage function provided in the embodiments of this application includes a series of steps, but the method for implementing linkage function provided in the embodiments of this application is not limited to the steps described. Similarly, the device for implementing linkage function provided in the embodiments of this application includes a series of modules, but the device for implementing linkage function provided in the embodiments of this application is not limited to the modules explicitly described, but may also include modules that need to be set for obtaining relevant task data or processing based on task data.

[0060] The embodiments of this application can be applied to computer systems composed of server components and can operate together with many other general-purpose or special-purpose computing system environments or configurations. Here, the server can be a distributed cloud computing technology environment including small computer systems, large computer systems, etc.

[0061] Server-side and other electronic devices can achieve corresponding functions through the execution of program modules. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0062] Currently, Formily offers three usage methods: Markup Schema, JSON Schema, and JSX; this application embodiment is applicable to the JSON Schema usage method.

[0063] Formily uses a JSON Schema protocol with insufficient data type support. Formily uses JSON strings, generated by the page designer. In the page designer, since most values ​​corresponding to these JSON strings are manually entered by the user through input boxes, the resulting values ​​are string types. Furthermore, Formily's schema types only support string, object, array, number, boolean, void, date, and datetime. Therefore, when encountering basic types like boolean values ​​(true, false), string input boxes cannot correctly convert string values ​​to boolean values. Additionally, when encountering complex types such as job type structures like {jobcode:1234}, Formily's schematype cannot correctly convert string values. Moreover, Formily's collaborative development suffers from limitations in generalization and high costs in iterative development.

[0064] To address the aforementioned technical problems, the following embodiments are proposed.

[0065] In some embodiments of this application, the method for implementing the linkage function can be implemented using a processor in the device for implementing the linkage function. The processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, and microprocessor.

[0066] Figure 1A This is a flowchart illustrating a method for implementing linkage functionality in an embodiment of this application, as shown below. Figure 1A As shown, the method includes the following steps:

[0067] Step 100: Receive the JSON Schema configuration sent from the user page; the JSON Schema configuration is obtained by the user page from the page designer; the JSON Schema configuration includes linkage configuration information for describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification.

[0068] For example, the method for implementing the linkage function can be applied to the low-code core class of the Formily framework; here, the Formily framework includes not only the low-code core class, but also a user page and a page designer; the user page can be a web interface corresponding to a World Wide Web (WEB) application, or it can be other human-computer interaction interfaces; the page designer is a page design platform developed by low-code, which can ultimately output a JSON data conforming to the JSON Schema protocol.

[0069] In this embodiment of the application, the low-code core class receives the JSON Schema configuration sent from the user page. For example, the implementation process can be as follows: when the user page is opened, the user page sends a data request to the page designer to obtain the JSON Schema configuration. When the page designer receives the data request, it returns the JSON Schema configuration to the user page and sends the JSON Schema configuration to the low-code core class. At this time, the low-code core class receives the JSON Schema configuration sent from the user page.

[0070] For example, JSON Schema configuration can be represented by a tree data structure in JSON format, where the tree data structure consists of multiple component nodes describing the user page; here, a component node represents a node used to describe the data information of the corresponding component within the user page. For example, a component node can be an abstract data type that combines view and interaction logic, and can contain Hypertext Markup Language (HTML) templates, Cascading Style Sheets (CSS) styles, and JavaScript logic code snippets.

[0071] Step 101: By traversing the JSON Schema configuration, obtain the linkage configuration information of each component node in multiple component nodes; perform linkage parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain the linkage function code after linkage parsing processing.

[0072] For example, after the low-code core class receives the JSON Schema configuration sent from the user page, it first obtains the linkage configuration information of each component node by traversing the JSON Schema configuration; then, it saves the linkage configuration information of each component node into a linkage configuration array; in this way, the linkage configuration array stores the linkage configuration information of all component nodes from the JSON Schema configuration; here, the linkage configuration array is located in the cache of the low-code core class.

[0073] For example, when saving the linkage configuration information of each component node to the linkage configuration array, the linkage configuration information can be saved in the format of [{"key","data structure specification"}]. Here, "key" represents the component node identity document (id). By saving the component node id to the linkage configuration array, it is convenient to find each component node in the subsequent linkage parsing process.

[0074] Here, before the low-code core class needs to process the linkage configuration information of each component node, it first obtains the linkage configuration array, then retrieves the linkage configuration information of each component node from the linkage configuration array, and then... Figure 1B The data structure specification shown performs linkage parsing on the linkage configuration information of each component node. Here, linkage parsing is equivalent to declaring the code blocks corresponding to each protocol field in the linkage configuration information. After linkage parsing, the functional code needed to implement the linkage function of each component node can be automatically generated. Therefore, in this process, developers do not need to manually write code blocks related to the linkage function, thus solving the problem of high costs in iterative development of linkage functions.

[0075] Step 102: Use the linked function code after linked parsing to implement the linked function for each component node.

[0076] For example, a component node may include multiple sets of linkage configuration information, wherein each set of linkage configuration information may include the final setting result of the component node and linkage conditions; wherein the linkage conditions may include condition node path and condition component node type.

[0077] In some embodiments, refer to Figure 1B The linked function code, after being parsed and processed, is used to execute the following steps:

[0078] Step 1021: In the current set of linkage configuration information included in the current component node, find the component node from the remaining component nodes according to the condition node path and condition component node type in the linkage conditions.

[0079] Step 1022: Determine whether the found component nodes meet the linkage conditions;

[0080] Step 1023: When it is determined that the found component node meets the linkage condition, it is determined that the current linkage configuration information meets the linkage condition, and the final setting result in the current linkage configuration information is set to the result of the current component node.

[0081] Here, the current component node refers to the component node that needs to be parsed and processed in conjunction with other component nodes; the remaining component nodes refer to the component nodes other than the current component node.

[0082] In some embodiments, finding component nodes from the remaining component nodes according to the condition node path and condition component node type in the linkage condition may include: determining a subset of component nodes from the remaining component nodes that correspond to the condition node path in the linkage condition; and finding component nodes from the subset of component nodes that have the same type as the condition component node in the linkage condition.

[0083] For example, when the linkage condition of the current component node is determined, firstly, based on the condition node path in the linkage condition of the current component node, some component nodes under the condition node path are found from the remaining component nodes; then, by traversing each component node in the partial component nodes, component nodes with the same type as the condition component node in the linkage condition are found.

[0084] In this embodiment of the application, if a component node is found in the current set of linkage configuration information included in the current component node, according to the condition node path and condition component node type in the linkage conditions, it is necessary to further determine whether the found component node meets the linkage conditions.

[0085] For example, if it is determined that the found component node meets the linkage conditions, it means that the current linkage configuration information meets the linkage conditions. At this time, the final setting result in the current linkage configuration information can be set to the result of the current component node. Conversely, if it is determined that the found component node does not meet the linkage conditions, it means that the current linkage configuration information does not meet the linkage conditions, that is, the current component node does not match this linkage configuration information. At this time, it continues to determine whether the found component node in the next linkage configuration information included by the current component node meets the linkage conditions, until a linkage configuration information matching the current component node is found. If no linkage configuration information matching the current component node is found in the multiple linkage configuration information included by the current component node, it means that the current component node does not need to trigger linkage.

[0086] In some embodiments, the linkage condition may further include a condition node value and a condition node value type. Determining whether the found component node satisfies the linkage condition may include: converting the condition node value of the found component node to a type according to the condition node value type in the linkage condition to obtain a type-converted condition value; if the type-converted condition value is the same as the condition node value in the linkage condition, determining that the found component node satisfies the linkage condition; if the type-converted condition value is different from the condition node value in the linkage condition, determining that the found component node does not satisfy the linkage condition.

[0087] Here, if it is determined that the found component node meets the linkage condition, it means that the current set of linkage configuration information included in the current component node meets the linkage condition; conversely, if it is determined that the found component node does not meet the linkage condition, it means that the current set of linkage configuration information included in the current component node does not meet the linkage condition.

[0088] For example, the linkage configuration information of each component node in the JSON Schema configuration corresponds to the same data structure specification; here, the data structure specification is a generalized protocol specification newly defined in this application; Figure 1C This is a schematic diagram of a data structure specification in an embodiment of this application, such as... Figure 1C As shown, the data structure specification "includeAttributeValues" can be represented in the form of {values,condition{key,values,formType,valueType},errorMsg}. Below, we will explain each attribute (i.e., protocol field) in this data structure specification.

[0089] Here, the `values` property represents the final setting result of the component node that needs to be processed in the linkage analysis. It should be noted that the types of `values` values ​​can be different for different types of component nodes. For example, when the component node is an Input component, the `values` value represents the types of linkage conditions; when the component node is a Select component, the `values` value represents the range of options. The `condition` property defines the conditions required for linkage judgment of component nodes. The purpose of setting the various judgment conditions in the `condition` property is to facilitate the code parsing of linkage condition judgment in the low-code core class.

[0090] Furthermore, `condition.key` (the `key` in the `condition` property) represents the path of the condition node to be observed; how it is observed is implemented by the subsequent parsed linkage function code. `condition.values` (the `values` in the `condition` property) represents the condition node value, defining the specific value of the judgment condition. `condition.formType` (the `formType` in the `condition` property) represents the condition component node type; each component node encapsulates its own linkage parsing method. `condition.valueType` (the `valueType` in the `condition` property) defines the condition node data type; here, `condition.values` and `condition.valueType` appear in pairs; `errorMsg` represents the error message. Finally, during the linkage condition judgment process, the component node corresponding to `condition.formType` will first undergo type conversion based on `condition.valueType`, and then the condition node value of the component node corresponding to `condition.formType` will be judged to determine whether the current component node requiring linkage parsing meets the linkage condition.

[0091] For example, the attributes included in the data structure specification are derived from actual business processes. They describe key data information related to the linkage of component nodes. In this application embodiment, the same data structure specification can be used to perform corresponding linkage parsing processing on the linkage configuration information of each component node, which can solve the problem of the limitation of linkage development in terms of generalization.

[0092] For example, in the process of determining whether a found component node meets the linkage condition based on the current linkage configuration information included in the current component node, the component node ID of each found component node can be traversed. The condition node value after type conversion of each component node can be compared with the condition node value in the linkage condition of the current component node. If they are the same, the found component node meets the linkage condition, i.e., the current linkage configuration information meets the linkage condition. In this case, the final setting result in the current linkage configuration information can be set to the result of the current component node. Conversely, if they are different, the found component node does not meet the linkage condition, i.e., the current linkage configuration information does not meet the linkage condition. In this case, the process continues to determine whether the next linkage configuration information included in the current component node meets the linkage condition, until a linkage configuration information matching the current component node is found. If no linkage configuration information matching the current component node is found among the multiple linkage configuration information included in the current component node, it means that the current component node does not need to trigger linkage.

[0093] As can be seen in this embodiment, the linkage configuration information matching the current component node can be found from the multiple linkage configuration information included in the current component node, and the linkage configuration information can be used to subsequently implement the linkage of the current component node.

[0094] In some embodiments, the linkage function code after linkage parsing is used to implement the linkage function for each component node. This may include: registering the linkage function code after linkage parsing to the linkage function API of the Formily framework; and calling the linkage function code through the linkage function API when it is determined that the user page triggers linkage for each component node to implement the linkage function for each component node.

[0095] For example, taking the current component node as an example, after the low-code core class determines the component nodes that will be linked with the current component node according to the above steps, the corresponding linkage function code can be obtained. This linkage function code is then registered in the linkage function API of the Formily framework. Here, the linkage function API is located in the user interface. Subsequently, when the user triggers the linkage of the current component node through the user page, the corresponding linkage function code can be called according to the linkage function API. By executing the linkage function code, the linkage function of the current component node can be realized.

[0096] As can be seen from the embodiments of this application, by registering the linkage function code to the linkage function API of the Formily framework, it is convenient to quickly execute the linkage function code related to the component node when the linkage of the component node is triggered in the future, so as to ensure the effectiveness of the linkage operation.

[0097] This application proposes a method, apparatus, electronic device, and computer storage medium for implementing linkage functionality, applied in the low-code core class of the Formily framework. The method includes: receiving a JSON Schema configuration sent from a user page; the JSON Schema configuration is obtained by the user page from the page designer; the JSON Schema configuration includes linkage configuration information describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification; obtaining the linkage configuration information of each component node among the multiple component nodes by traversing the JSON Schema configuration; performing linkage parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain the linkage function code after linkage parsing processing; and using the linkage function code after linkage parsing processing to implement the linkage function for each component node. As can be seen in this embodiment, since each component node included in the JSON Schema configuration corresponds to the same data structure specification, when it is necessary to perform linkage development on each component node included in the JSON Schema configuration, linkage parsing processing of these component nodes can be performed based on a generalized data structure specification. This solves the problem of the limitation of linkage development in terms of generalization. Furthermore, when performing linkage parsing processing on these component nodes according to the data structure specification, by sorting out the rules of each protocol field in the data structure specification, functional code for implementing linkage functions can be automatically generated. In this way, developers do not need to manually write code blocks related to complex linkage functions each time, solving the problem of high cost in iterative development of linkage functions.

[0098] In some embodiments, the above method may further include: performing verification and parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain the verification function code after verification and parsing processing; and using the verification function code after verification and parsing processing to implement the verification function for each component node.

[0099] Here, the data structure specifications for verification and parsing are the same as those for linkage parsing, and will not be repeated here.

[0100] For example, performing verification and parsing processing on the linkage configuration information of each component node according to the same data structure specifications as the linkage parsing processing can improve the accuracy of the component node verification results.

[0101] In some embodiments, the verification function code after linkage parsing is used to perform the following steps: in the current linkage configuration information included in the current component node, according to the condition node path and condition component node type in the linkage condition, find the component node from the remaining component nodes; the current component node refers to the component node that needs to be linked parsing among multiple component nodes, and the remaining component nodes refer to the component nodes other than the current component node among multiple component nodes; determine whether the found component node meets the linkage condition.

[0102] When a found component node meets the linkage conditions, the current linkage configuration information is confirmed to meet the linkage conditions. The result of the current component node is then checked to determine if it passes the verification. After confirming that the current component node has passed the verification, the next component node is checked to determine if it passes the verification, and so on, until all component nodes requiring linkage parsing have been checked. Alternatively, if a found component node does not meet the linkage conditions, the current component node passes the verification. The next component node is checked to determine if it passes the verification, and so on, until all component nodes requiring linkage parsing have been checked.

[0103] For example, the implementation method for determining whether the found component node meets the linkage condition has been described in the above embodiments and will not be repeated here.

[0104] In one implementation, if it is determined that the found component node meets the linkage condition, then it is further determined whether the current component node passes the verification. Here, passing the verification means that the result of the current component node is the same as the final setting result in the current linkage configuration information; failing the verification means that the result of the current component node is not the same as the final setting result in the current linkage configuration information.

[0105] For example, if the current component node is determined to pass the verification, the system continues to determine whether the next component node of the current component node passes the verification, until the verification of all component nodes that need to be linked for parsing is completed.

[0106] In another implementation, if it is determined that the current component node does not meet the linkage condition, there is no need to perform a verification judgment. Instead, the current component node is directly assumed to have passed the verification. Then, it is determined whether the next component node of the current component node meets the linkage condition. If it does, the verification judgment is performed. If it does not, the verification is directly assumed to have passed.

[0107] Here, in the current set of linkage configuration information included in the current component node, the verification function of the current component node is considered to have passed only if all the found component nodes pass the verification; otherwise, the verification function of the current component node is considered to have failed.

[0108] As can be seen, after identifying the component nodes that need to be linked with the current component node, further verification of these component nodes can ensure the reliability of the component node linkage function.

[0109] In some embodiments, the verification function code after verification parsing is used to implement the verification function for each component node. This may include: registering the verification function code after linkage parsing to the submission function of the low-code core class; and implementing the verification function for each component node by executing the verification function code when it is determined that the user page is performing a data recovery or submission operation.

[0110] In this application, taking the current component node as an example, after obtaining the verification function code of the current component node, the verification function code is registered in the submission function of the low-code core class; then, when the user performs data recovery or submission operations through the user page, the verification function code can be executed to realize the verification function of the current component node.

[0111] As can be seen, in this embodiment of the application, by registering the verification function code into the submission function of the low-code core class, it is convenient to quickly execute the verification function code related to the component node when performing data recovery or submission operations, so as to ensure the effectiveness of the verification operation.

[0112] In some embodiments, after executing the verification function code, the above method may further include: performing type conversion on the output data of the verification function code according to the data type of the condition node in the linkage condition of the current component node.

[0113] For example, after executing the verification function code, the output data of the verification function code related to the current component node can be type-converted according to the data type of the condition node in the linkage condition of the current component node to obtain the final output result of the verification function code.

[0114] It can be seen that by converting the output data according to the data type of the condition node, the data types of the JSON Schema protocol can be enriched, and the problem that some data types in related technologies cannot be correctly converted through string type can be solved.

[0115] To better illustrate the purpose of this application, further explanation will be provided based on the above embodiments.

[0116] Figure 2A This is a schematic diagram illustrating a scenario for implementing the linkage verification function according to an embodiment of this application, such as... Figure 2A As shown in the diagram, it includes: the user page, the low-code core class (LowcodeCore), and the page designer; the specific implementation process can be as follows:

[0117] First, the user page sends a data request to the page designer to retrieve the JSON Schema configuration; when the page designer receives the data request, it returns the JSON Schema configuration to the user page; after receiving the JSON Schema configuration, the user page sends the JSON Schema configuration to the low-code core class.

[0118] Then, the low-code core class traverses the tree data structure configured by the JSON Schema to find the linkage configuration information of each component node under each level of the node tree and saves it into the linkage configuration array. The low-code core class performs linkage and verification parsing processing on the linkage configuration information of each component node in the linkage configuration array according to the data structure specification, and automatically generates linkage function code and verification function code.

[0119] Finally, the linkage function code is registered to the linkage function API of the Formily framework for use, and the validation function code is registered to the submit function of the low-code core class, which will be executed when the page performs data restoration or submission.

[0120] Figure 2B This is a schematic diagram illustrating a process for performing linked parsing and verification parsing according to an embodiment of this application, as shown below. Figure 2B As shown, the process includes the following steps:

[0121] Step A1: Obtain the linkage configuration array.

[0122] For example, the low-code core class retrieves a linkage configuration array from its own cache, which includes linkage configuration information for all component nodes in the JSON Schema configuration.

[0123] Step A2: Determine the work type as a linkage type.

[0124] For example, after the low-code core class obtains the linkage configuration array, it will determine the current work type; here, the work type includes two types: linkage type and validation type.

[0125] Step A3: Perform linked parsing processing according to the data structure specifications.

[0126] For example, after determining that the current work type is a linkage type, the low-code core class performs linkage parsing processing on multiple linkage configuration information in the linkage configuration array corresponding to the current component node according to the data structure specification.

[0127] Step A4: Find the linkage configuration information that meets the linkage conditions by traversing the linkage configuration array.

[0128] For example, if by traversing each set of linkage configuration information in the linkage configuration array corresponding to the current component node, it is determined that the current set of linkage configuration information included in the current component node satisfies the linkage condition, then it means that all component nodes found based on the current set of linkage configuration information satisfy the linkage condition; the specific implementation method has been described in the above embodiments and will not be repeated here.

[0129] Step A5: Set the values ​​in the linkage configuration information to the current component node.

[0130] For example, the values ​​correspond to the final setting result in the current linkage configuration information. After determining that all component nodes in the current linkage configuration information meet the linkage conditions by traversing the linkage configuration array, the values ​​(final setting result) in the current linkage configuration information are set to the current component node. At this time, the linkage parsing process for the current component node is completed, and the linkage function code after linkage parsing is obtained.

[0131] Step A2': Determine the job type as a verification type.

[0132] Step A3': Perform verification and parsing processing according to the data structure specifications.

[0133] For example, after determining that the current job type is a validation type, the low-code core class performs validation and parsing processing on multiple sets of linkage configuration information in the linkage configuration array corresponding to the current component node according to the data structure specification.

[0134] Step A4': Find the linkage configuration information that meets the linkage conditions by traversing the linkage configuration array.

[0135] For example, the specific implementation method has been described in the above embodiments, and will not be repeated here.

[0136] Step A5': Determine if it is equal to the result of the current component node.

[0137] For example, in the linkage configuration information that meets the linkage conditions, it is determined whether the values ​​(final setting result) in the linkage configuration information is equal to the result of the current component node; if so, it means that the verification function of the current component node has passed, and at this time, the verification success is returned; otherwise, it means that the verification function of the current component node has failed, and at this time, the verification failure is returned.

[0138] The following section explains the above-mentioned linkage parsing process and verification parsing process with reference to specific flowcharts; Figure 2C This is a schematic diagram illustrating another process for performing linked parsing in an embodiment of this application, as shown below. Figure 2C As shown, the process includes the following steps:

[0139] Step B1: Obtain the linkage configuration array.

[0140] Step B2: Obtain the current set of linkage configuration information for the current component node.

[0141] For example, the current set of linkage configuration information for the current component node can be obtained from the linkage configuration array by traversal. Here, the current component node represents the JSON description of one of the user page (User Interface, UI) components in the JSON Schema tree configuration describing the current user page.

[0142] Step B3: Determine if the current component node has changed.

[0143] For example, determine whether the current linkage configuration information of the current component node has changed; if yes, continue to execute the following steps. At this time, it is necessary to redetermine other component nodes that are linked with the current component node; if no, it means that the current component node does not need to be relinked.

[0144] Step B4: Determine some component nodes according to the condition node path in the linkage conditions.

[0145] For example, in the current set of linkage configuration information of the current component node, some component nodes are determined according to the condition node path in the linkage conditions.

[0146] Step B5: Based on the type of the condition component node in the linkage conditions, obtain the ComponentSchema component instance of the found component node.

[0147] For example, after determining some component nodes, based on the type of condition component node in the linkage condition, continue to search for component nodes with the same type as the condition component node in the linkage condition from the partial component nodes; obtain the ComponentSchema component instance of the found component node.

[0148] Step B6: Pass the condition node value type and condition node value in the linkage condition to the ComponentSchema component instance of the found component node.

[0149] For example, after passing the condition node value type and condition node value in the linkage condition to the ComponentSchema component instance of the found component node, the ComponentSchema component instance will perform type conversion on the condition node value of each component node in the found component node according to the condition node value type in the linkage condition to obtain the type-converted condition value; and compare the type-converted condition value with the condition node value in the linkage condition to determine whether all the found component nodes satisfy the linkage condition.

[0150] Step B7: Determine if the linkage conditions are met. If yes, proceed to step B8; otherwise, proceed to step B4, which is used to determine whether the next set of linkage configuration information included in the current component node meets the linkage conditions.

[0151] For example, it is determined whether the found component node meets the linkage condition. If the condition value after type conversion of the found component node is the same as the condition node value in the linkage condition, the found component node is determined to meet the linkage condition, that is, the current linkage configuration information meets the linkage condition; otherwise, the current linkage configuration information is determined not to meet the linkage condition.

[0152] Step B8: Obtain the ComponentSchema instance of the current component node, and pass the values ​​from the current set of linkage configuration information to the ComponentSchema instance of the current component node for setting.

[0153] For example, if it is determined that the current set of linkage configuration information meets the linkage conditions, the ComponentSchema component instance of the current component node can be obtained, and the values ​​in the current set of linkage configuration information can be passed to the ComponentSchema component instance of the current component node to set the linkage result. That is, the values ​​in the current set of linkage configuration information (the final setting result) can be set to the ComponentSchema component instance of the current component node.

[0154] For example, when the generated linkage function code begins to be executed, the linkage configuration array `relationConfigArr`, which contains linkage configuration information for all component nodes, is first retrieved from the low-code core class. For example, the current component node in the linkage configuration array can be represented as:

[0155] '[{"key":"detail.identity","includeAttributeValues":[{"values":[{"regex":"\\S","error Remind":""}],"condition":[{"key":"detail.identityType","values":[{"label":"ID card","value":"0"}],"formType":"select","valueType":"2"}]}]}]'; relationConfigArr.*.key represents the ID of the current component node, while relationConfigArr.*.includeAttributeValues ​​represents the linkage configuration information of the current component node.

[0156] Then, the linkage configuration array `relationConfigArr` is traversed; for each component node in `relationConfigArr`, linkage parsing is performed according to the data structure specifications. The linkage configuration information `relationConfig` for the current component node is as follows:

[0157] The following is a parsing explanation of ({"includeAttributeValues":[{"values":[{"regex":"\\S","errorRemind":""}],"condition":[{"key":"detail.identityType","values":[{"label":"ID card","value":"0"}],"formType":"select","valueType":"2"}]}]}) and Formily's data source ({detail:{identity,identityType}})).

[0158] During the linkage resolution process, the condition node in the `relationConfig` configuration is used as the linkage judgment condition. The value of `condition.key` is "detail.identityType" as the dependency path. Then, the `onFieldValueChange` API of `Formily` is called to listen for data with the `condition.key` path `detail.identityType` and register a callback function. In the callback function, when `detail.identityType` changes, the result of `detail.identityType` is retrieved from the formal parameters of the callback function. Next, based on the component type `condition.formType`, the corresponding `ComponentSchema` component instance is obtained. The range values ​​of `detail.identityType` and `condition.values` are passed to the `ComponentSchema` component instance, and `validate` is called to perform validation. If the condition validation passes, it means that the current component linkage condition is met; otherwise, it is not. Next, Array.some is used to traverse, validate, and parse the component nodes in the linkage configuration array. If any condition in the linkage configuration array passes the validation of the ComponentSchema component instance, the linkage result includeAttributeValues.*.values ​​is set to the corresponding component of the configuration relationConfig.key. The component corresponding to relationConfig.key will call the Formal API setFieldState according to the current component rules to set the linkage result includeAttributeValues.*.values ​​to the correct attribute.

[0159] Figure 2DThis is a schematic diagram of another verification and parsing process according to an embodiment of this application, as shown below. Figure 2D As shown, the process includes the following steps:

[0160] Step C1: Obtain the linkage configuration array.

[0161] Step C2: Obtain the linkage configuration information of the component nodes that need to be linked for parsing and processing.

[0162] For example, the linkage configuration information of all component nodes that need to be linked for parsing can be obtained from the linkage configuration array by traversal.

[0163] Step C3: Verify based on the linkage configuration information of the current component node.

[0164] Here, the current component node is one of all component nodes that need to be processed in a coordinated manner.

[0165] Step C4: Determine if all verifications have passed.

[0166] For example, determine whether all component nodes requiring linked parsing have passed verification. If yes, execute steps C12 and C13 sequentially; otherwise, execute step C5.

[0167] Step C5: Based on the type of the condition component node in the linkage conditions, obtain the ComponentSchema component instance of the found component node.

[0168] Step C6: Pass the condition node value type and condition node value from the linkage conditions of the current component node to the ComponentSchema component instance of the found component node.

[0169] For example, steps C5 to C6 are implemented in the same way as steps B5 to B6 described above, and will not be repeated here.

[0170] Step C7: Determine if the linkage conditions are met. If yes, proceed to step C8; otherwise, proceed to step C4, which is used to determine if all component nodes requiring linkage parsing have passed verification. If not, the following steps will continue to verify the linkage of the next component node of the current component node; at this point, it is assumed that the current component node has passed verification.

[0171] Step C8: Obtain the ComponentSchema component instance of the current component node.

[0172] For example, if it is determined that the current set of linkage configuration information meets the linkage conditions, the ComponentSchema component instance of the current component node can be obtained.

[0173] Step C9: Pass the values ​​from the current set of linkage configuration information to the ComponentSchema component instance of the current component node for verification.

[0174] For example, after passing the values ​​from the current set of linkage configuration information included in the current component node to the ComponentSchema component instance of the current component node, the verification is performed by comparing the actual result of the ComponentSchema component instance of the current component node with the values ​​from the current set of linkage configuration information.

[0175] Step C10: Determine whether the verification passed.

[0176] For example, based on the comparison result between the ComponentSchema component instance of the current component node and the values ​​in the current set of linkage configuration information, it is determined whether the verification function of the current component node passes; if yes, proceed to step C4, otherwise proceed to step C11.

[0177] Step C11: Verification failed.

[0178] For example, after determining that the validation function of the current component node has failed, the validation is determined to have failed.

[0179] Step C12: Perform type conversion on the output data.

[0180] For example, the output data of the validation function code related to the current component node can be type-converted according to the data type of the condition node in the linkage condition of the current component node to obtain the final output result.

[0181] Step C13: Verification successful.

[0182] For example, after obtaining the final output, the verification is determined to be successful.

[0183] For example, when the code for generating the verification function begins to be executed, the linkage configuration array `relationConfigArr`, which contains the linkage configuration information of all component nodes, is first retrieved from the low-code core class. For example, the current component node in the linkage configuration array can be represented as:

[0184] '[{"key":"detail.identity","includeAttributeValues":[{"values":[{"regex":"\\S","error Remind":""}],"condition":[{"key":"detail.identityType","values":[{"label":"ID card","value":"0"}],"formType":"select","valueType":"2"}]}]}]'. relationConfigArr.*.key represents the ID of the current component node, while relationConfigArr.*.includeAttributeValues ​​represents the linkage configuration information of the current component node.

[0185] Then, the linkage configuration array `relationConfigArr` is traversed; for each component node in `relationConfigArr`, linkage parsing is performed according to the data structure specifications. The linkage configuration information `relationConfig` for the current component node is as follows:

[0186] The following is a parsing explanation of the data source ({detail:{identity,identityType}}) and the result data source of the submission operation: ({"includeAttributeValues":[{"values":[{"regex":"\\S","errorRemind":""}],"condition":[{"key":"detail.identityType","values":[{"label":"ID card","value":"0"}],"formType":"select","valueType":"2"}]}]})

[0187] During the linkage parsing process, the `condition` node of the `relationConfig` configuration is used as the linkage judgment condition. The value of `condition.key`, "detail.identityType", is used as the dependency path to retrieve the value of `detail.identityType` from the data source. Then, based on the component type `condition.formType`, the corresponding `ComponentSchema` instance is obtained. The range of values ​​for the `detail.identityType` and `condition.values` judgment conditions is passed to the `ComponentSchema` instance, and `validate` is called for verification. If a match is successful, the linkage condition node passes; otherwise, the process continues to traverse the next linkage configuration. If none of the condition nodes match, the current node `relationConfig.key` passes verification. If a condition node matches successfully, the corresponding `ComponentSchema` instance is obtained based on the node ID of `relationConfig.key`. Then, by configuring `relationConfig.key` as "detail.identity" as the value retrieval path, the verification value is retrieved from the data source. The verification value and the matching result range of `includeAttributeValues.*.values` are passed to the `ComponentSchema` instance for verification. Verification passes only if the verification value matches the result range of `includeAttributeValues.*.values`; otherwise, the node verification of `relationConfig.key` returns failure. Next, `Array.every` is used to iterate and parse the validation configuration array `relationConfigArr` for all nodes. Only when all nodes pass the validation process of the linked configuration `includeAttributeValues` is the validation function confirmed as successful; otherwise, it returns failure. After successful validation, the output data needs to be type-converted to obtain the final data. For example, a `ComponentSchema` instance has a `config` property representing configuration information, and `config.valueType` represents the output data type. For instance, if `valueType` is of type `number`, the output data of the current node needs to be processed to the `number` type; for example, the string "1" will be updated to the `number` type "1". Finally, when the validation function succeeds, the validation result and output data are output as `{status:true,data:{a1,a2,a3}}`.

[0188] Figure 3This is a schematic diagram of the structural composition of the device for implementing the linkage function according to an embodiment of this application, as shown below. Figure 3 As shown, the device includes a receiving module 300, a receiving module 301, and a linkage module 302, wherein,

[0189] The receiving module 300 is used to receive a JSON Schema configuration sent from the user page; the JSON Schema configuration is obtained by the user page from the page designer; the JSON Schema configuration includes linkage configuration information for describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification;

[0190] Module 301 is used to obtain the linkage configuration information of each component node among the multiple component nodes by traversing the JSON Schema configuration; and to perform linkage parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain the linkage function code after linkage parsing processing.

[0191] The linkage module 302 is used to implement the linkage function for each component node by utilizing the linkage function code after linkage parsing.

[0192] In some embodiments, the component node includes multiple sets of linkage configuration information, each set of linkage configuration information including: the final setting result of the component node and linkage conditions; the linkage conditions include condition node path and condition component node type;

[0193] The linkage function code after linkage parsing is used to execute the following steps:

[0194] In the current set of linkage configuration information included in the current component node, the component node is found from the other component nodes according to the condition node path and condition component node type in the linkage condition; the current component node refers to the component node that needs to be linked and parsed among the multiple component nodes, and the other component nodes refer to the component nodes other than the current component node among the multiple component nodes.

[0195] Determine whether the found component nodes meet the linkage conditions;

[0196] When it is determined that the found component node meets the linkage condition, the current set of linkage configuration information is determined to meet the linkage condition, and the final setting result in the current set of linkage configuration information is set to the result of the current component node.

[0197] In some embodiments, the linkage condition further includes a condition node value and a condition node value type. The linkage module 302 is used to determine whether the found component node satisfies the linkage condition, including:

[0198] The condition node values ​​of the found component nodes are converted according to the type of the condition node values ​​in the linkage conditions to obtain the converted condition values.

[0199] If the condition value after type conversion is the same as the condition node value in the linkage condition, it is determined that the found component node satisfies the linkage condition.

[0200] If the condition value after type conversion is different from the condition node value in the linkage condition, it is determined that the found component node does not meet the linkage condition.

[0201] In some embodiments, the linkage module 302 is used to implement linkage functionality for each component node using the linkage function code after linkage parsing, including:

[0202] Register the linked function code after the linked parsing processing to the linked function application interface API of the Formic framework;

[0203] When it is determined that the user page triggers a linkage for each component node, the linkage function code is called through the linkage function API to realize the linkage function for each component node.

[0204] In some embodiments, the apparatus further includes a verification module, the verification module being configured to:

[0205] According to the data structure specification, the linkage configuration information of each component node is verified and parsed to obtain the verification function code after verification and parsing.

[0206] The verification function code after the verification parsing process is used to implement the verification function for each component node.

[0207] In some embodiments, the component node includes multiple sets of linkage configuration information, each set of linkage configuration information including: the final setting result of the component node and linkage conditions; the linkage conditions include condition node path and condition component node type;

[0208] The verification function code after the linkage parsing process is used to perform the following steps:

[0209] In the current set of linkage configuration information included in the current component node, the component node is found from the other component nodes according to the condition node path and condition component node type in the linkage condition; the current component node refers to the component node that needs to be linked and parsed among the multiple component nodes, and the other component nodes refer to the component nodes other than the current component node among the multiple component nodes.

[0210] Determine whether the found component nodes meet the linkage conditions;

[0211] When it is determined that the found component node meets the linkage condition, it is also determined that the current set of linkage configuration information meets the linkage condition. The result of the current component node is then checked to see if it passes the verification, and a verification result is obtained. After determining that the current component node has passed the verification based on the verification result, the next component node of the current component node is checked to see if it passes the verification, until all component nodes requiring linkage parsing processing have been checked. Alternatively,

[0212] When it is determined that the found component node does not meet the linkage condition, the current component node is determined to pass the verification; the next component node of the current component node is then determined to pass the verification until all component nodes that need linkage parsing processing are judged.

[0213] In some embodiments, the verification module is configured to locate the component node from the remaining component nodes according to the condition node path and condition component node type in the linkage condition, including:

[0214] From the remaining component nodes, determine the component nodes that correspond to the condition node paths in the linkage conditions;

[0215] Find the component node with the same type as the condition component node in the linkage condition from the component node.

[0216] In some embodiments, the verification module is used to implement a verification function for each component node using the verification function code after verification parsing, including:

[0217] Register the verification function code after the linkage parsing process to the submission function of the low-code core class;

[0218] When the user page determines to perform a data recovery or submission operation, the verification function code is executed to perform a verification function on each component node.

[0219] In some embodiments, after executing the verification function code, the verification module is further configured to:

[0220] Based on the data type of the condition node in the linkage condition of the current component node, the output data of the verification function code is converted.

[0221] In practical applications, the receiving module 300, obtaining module 301, linkage module 302 and verification module can all be implemented by a processor located in an electronic device. The processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller and microprocessor.

[0222] Furthermore, in this embodiment, the functional modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0223] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), RAM, magnetic disks, or optical disks.

[0224] Specifically, the computer program instructions corresponding to a method for implementing a linkage function in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the computer program instructions corresponding to a method for implementing a linkage function in the storage media are read or executed by an electronic device, any of the methods for implementing a linkage function in the aforementioned embodiments is implemented.

[0225] Based on the same technical concept as the foregoing embodiments, see Figure 4 It illustrates an electronic device 400 provided in an embodiment of this application, which may include: a memory 401 and a processor 402; wherein,

[0226] Memory 401 is used to store computer programs and data;

[0227] The processor 402 is configured to execute a computer program stored in a memory to implement any of the methods for implementing linkage functions in the foregoing embodiments.

[0228] In practical applications, the memory 401 mentioned above can be volatile memory, such as RAM; or non-volatile memory, such as ROM, flash memory, hard disk drive (HDD) or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 402.

[0229] The processor 402 described above can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. Understandably, for different devices implementing the linkage function, the electronic device used to implement the above processor function can also be other types; this application embodiment does not specifically limit the specific types.

[0230] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0231] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0232] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict.

[0233] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0234] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0235] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0236] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.

[0237] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0238] The above are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application.

Claims

1. A method for implementing linkage function, characterized in that, The method, applied in the low-code core classes of the Formic framework, includes: Receive JSON Schema configuration sent from the user page; the JSON Schema configuration is obtained by the user page from the page designer; the JSON Schema configuration includes linkage configuration information for describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification; By traversing the JSON Schema configuration, the linkage configuration information of each component node among the multiple component nodes is obtained; the linkage configuration information of each component node is parsed according to the data structure specification to obtain the linkage function code after linkage parsing; The linkage function code after the linkage parsing process is used to realize the linkage function for each component node; The component node includes multiple sets of linkage configuration information. Each set of linkage configuration information includes: the final setting result of the component node and the linkage conditions; the linkage conditions include the condition node path and the condition component node type. The linkage function code after linkage parsing is used to execute the following steps: In the current set of linkage configuration information included in the current component node, the component node is found from the other component nodes according to the condition node path and condition component node type in the linkage condition; the current component node refers to the component node that needs to be linked and parsed among the multiple component nodes, and the other component nodes refer to the component nodes other than the current component node among the multiple component nodes. Determine whether the found component nodes meet the linkage conditions; When it is determined that the found component node meets the linkage condition, the current set of linkage configuration information is determined to meet the linkage condition, and the final setting result in the current set of linkage configuration information is set to the result of the current component node.

2. The method according to claim 1, characterized in that, The linkage conditions also include condition node values ​​and condition node value types. The step of determining whether the found component nodes meet the linkage conditions includes: The condition node values ​​of the found component nodes are converted according to the type of the condition node values ​​in the linkage conditions to obtain the converted condition values. If the condition value after type conversion is the same as the condition node value in the linkage condition, it is determined that the found component node satisfies the linkage condition. If the condition value after type conversion is different from the condition node value in the linkage condition, it is determined that the found component node does not meet the linkage condition.

3. The method according to claim 1, characterized in that, The method of using the linkage function code after linkage parsing to implement the linkage function for each component node includes: Register the linked function code after the linked parsing processing to the linked function application interface API of the Formic framework; When it is determined that the user page triggers a linkage for each component node, the linkage function code is called through the linkage function API to realize the linkage function for each component node.

4. The method according to claim 1, characterized in that, The method further includes: According to the data structure specification, the linkage configuration information of each component node is verified and parsed to obtain the verification function code after verification and parsing. The verification function code after the verification parsing process is used to implement the verification function for each component node.

5. The method according to claim 4, characterized in that, The component node includes multiple sets of linkage configuration information. Each set of linkage configuration information includes: the final setting result of the component node and the linkage conditions; the linkage conditions include the condition node path and the condition component node type. The verification function code after the linkage parsing process is used to perform the following steps: In the current set of linkage configuration information included in the current component node, the component node is found from the other component nodes according to the condition node path and condition component node type in the linkage condition; the current component node refers to the component node that needs to be linked and parsed among the multiple component nodes, and the other component nodes refer to the component nodes other than the current component node among the multiple component nodes. Determine whether the found component nodes meet the linkage conditions; When it is determined that the found component node meets the linkage condition, it is also determined that the current set of linkage configuration information meets the linkage condition. The result of the current component node is then checked to see if it passes the verification, and a verification result is obtained. After determining that the current component node has passed the verification based on the verification result, the next component node of the current component node is checked to see if it passes the verification, until all component nodes requiring linkage parsing processing have been checked. Alternatively, When it is determined that the found component node does not meet the linkage condition, the current component node is determined to pass the verification; the next component node of the current component node is then determined to pass the verification, until all component nodes that need linkage parsing processing are judged.

6. The method according to claim 1 or 5, characterized in that, The step of finding component nodes from other component nodes according to the condition node path and condition component node type in the linkage conditions includes: From the remaining component nodes, determine the component nodes that correspond to the condition node paths in the linkage conditions; Find the component node with the same type as the condition component node in the linkage condition from the component node.

7. The method according to claim 4, characterized in that, The verification function code, processed by the verification parsing, is used to implement the verification function for each component node, including: Register the verification function code after the linkage parsing process to the submission function of the low-code core class; When the user page determines to perform a data recovery or submission operation, the verification function code is executed to perform a verification function on each component node.

8. The method according to claim 4 or 5, characterized in that, After executing the verification function code, the method further includes: Based on the data type of the condition node in the linkage condition of the current component node, the output data of the verification function code is converted.

9. A device for realizing a linkage function, characterized in that, The device, applied in the low-code core classes of the Formily framework, includes: The receiving module is used to receive JSON Schema configuration sent from the user page; the JSON Schema configuration is obtained by the user page from the page designer; the JSON Schema configuration includes linkage configuration information for describing multiple component nodes of the user page, and the linkage configuration information of different component nodes corresponds to the same data structure specification; The module is used to obtain the linkage configuration information of each component node among the multiple component nodes by traversing the JSON Schema configuration; and to perform linkage parsing processing on the linkage configuration information of each component node according to the data structure specification to obtain the linkage function code after linkage parsing processing. The linkage module is used to implement the linkage function for each component node by utilizing the linkage function code after linkage parsing and processing. The component node includes multiple sets of linkage configuration information. Each set of linkage configuration information includes: the final setting result of the component node and the linkage conditions; the linkage conditions include the condition node path and the condition component node type. The linkage function code after linkage parsing is used to execute the following steps: In the current set of linkage configuration information included in the current component node, the component node is found from the other component nodes according to the condition node path and condition component node type in the linkage condition; the current component node refers to the component node that needs to be linked and parsed among the multiple component nodes, and the other component nodes refer to the component nodes other than the current component node among the multiple component nodes. Determine whether the found component nodes meet the linkage conditions; When it is determined that the found component node meets the linkage condition, the current set of linkage configuration information is determined to meet the linkage condition, and the final setting result in the current set of linkage configuration information is set to the result of the current component node.

10. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method according to any one of claims 1 to 8.

11. A computer storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1 to 8.