A method for configuring backend interface fields based on service orchestration system

By using flat List structure and hierarchical association in the service orchestration system to convert it into a hierarchical relationship and tree structure, the problem of configuring basic types and array type fields is solved, and the field configuration and operation of these types of fields is realized, which expands the system's application scenarios.

CN114238276BActive Publication Date: 2025-04-25SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111544222.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-04-25
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

When the existing service orchestration system configures back-end interface fields of basic types and array types, it is difficult to add description fields without changing the structure of leaf nodes, which limits data structure design and application scenarios.

Method used

By creating an orchestration process, using a flat List structure to store data, and using id and parentId to associate hierarchical relationships, writing functions to convert List structures into structures and tree structures with hierarchical relationships, realizing the description field configuration of basic type and array type fields.

Benefits of technology

It solves the problem of the service orchestration system when configuring basic type and array type fields, expands the system's flexibility and application scenarios, and allows the addition, deletion and modification of these types of fields.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention discloses a method for configuring backend interface fields based on a service orchestration system. By performing data structure processing, the method solves the pain point that when a conventional service orchestration system configures description fields for basic type and array type fields, it is difficult to add description fields to them without changing the structure of leaf nodes, thereby expanding the flexibility and application scenarios of service orchestration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of service orchestration, and in particular to a method for configuring a backend interface field based on a service orchestration system. Background Art

[0002] Microservice orchestration through service orchestration system, thus achieving the effect of low-code and agile development, is becoming more and more popular in the industry. The existing service orchestration system has a big pain point in the scenario of backend interface field configuration. Conventional service orchestration system only needs to add corresponding fields to describe the configuration of packaging type (except array) and enumeration type data, but it is helpless when it comes to basic types and arrays. The fields of basic types are often leaf nodes in the data structure, and it is difficult to add description fields without changing the structure of the leaf nodes. This will inevitably limit the data structure design of the service orchestration system, thereby limiting the application scenarios of the service orchestration system.

[0003] Therefore, the prior art has defects and needs to be improved. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for configuring backend interface fields based on a service orchestration system.

[0005] The technical solution of the present invention is as follows: a method for configuring a backend interface field based on a service orchestration system is provided, comprising the following steps:

[0006] Step 1: Create an orchestration process. The configuration of each node in the process corresponds to the backend interface. Each interface has multiple fields of different data types that need to be configured.

[0007] Step 2: Agree that the data structure for front-end and back-end interaction is a flat List structure, and store the List structure as raw data;

[0008] Step 3: The hierarchical relationship between data is associated through id and parentId;

[0009] Step 4: Convert the above List structure data fldList into a structure with hierarchical relationship by writing a function;

[0010] Step 5: After converting the above transferListWithChild structure, write a function to convert transferListWithChild into a tree structure that can be displayed in the json editor;

[0011] Step 6: Write a conditional copy function to process the data and get the data filterObj displayed in the json editor;

[0012] Step 7: Click to select a field in the json editor, get the field name, and select the required data from the original List;

[0013] Step 8: After retrieving the field description attributes, you can add, delete or modify the fields or field description attributes.

[0014] Furthermore, the function written in step 4 is:

[0015] Const transferListWithChild=listWithChild(fldList), transferListWithChild.

[0016] Furthermore, the function written in step 5 is:

[0017] Const treeObject=TreeToObj(transferListWithChild).

[0018] Furthermore, the function written in step 6 is:

[0019] Const filterObj=deepCloneWithCondition(treeObject).

[0020] Furthermore, the function for selecting the required data from the original List in step 7 is:

[0021] Const descriptionObj=findDescriptionObj(List, fieldName), findDescriptionObj.

[0022] Furthermore, the specific steps of step 8 are as follows:

[0023] Step 8.1: When you need to modify or add the current field or the description attribute of the field, modify it in the original List through fieldName and parentId;

[0024] Step 8.2: When a field or a field's description attribute needs to be deleted, the callback function is used to obtain the json data updateJson;

[0025] Step 8.3: Convert updateJson into a hierarchical path and define the path array pathArray to store all key values ​​in res;

[0026] Step 8.4: Delete the array in the original List.

[0027] By adopting the above scheme, the present invention solves the pain point that when a conventional service orchestration system configures description fields for basic type and array type fields, it is difficult to add description fields to them without changing the structure of leaf nodes through data structure processing, thereby expanding the flexibility and application scenarios of service orchestration. DETAILED DESCRIPTION

[0028] The present invention is described in detail below in conjunction with specific embodiments.

[0029] The present invention provides a method for configuring a backend interface field based on a service orchestration system, comprising the following steps:

[0030] Step 1: Create an orchestration process. The configuration of each node in the process corresponds to the backend interface. Each interface has multiple fields of different data types that need to be configured.

[0031] Step 2: Agree that the data structure for front-end and back-end interaction is a flat List structure, and store the List structure as raw data.

[0032] Step 3: The hierarchical relationship between data is associated through id and parentId. This hierarchical association structure makes it easy to add corresponding description fields to basic types or arrays.

[0033] Step 4: Convert the List structure data fldList into a hierarchical structure by writing a function. The function written is:

[0034] Const transferListWithChild=listWithChild(fldList), transferListWithChild.

[0035] After the conversion, you can see the number of child elements under the selected field in the transferListWithChild structure.

[0036] Step 5: After converting the transferListWithChild structure, write a function to convert transferListWithChild into a tree structure that can be displayed in the json editor. This json structure needs to be stored to obtain the description attribute of the form display field. The function written is:

[0037] Const treeObject=TreeToObj(transferListWithChild).

[0038] After conversion, the original List structure can be converted into a more intuitive tree structure and displayed in the json editor.

[0039] Step 6: Write a function that copies according to conditions to process the data and get the data filterObj displayed in the json editor. The function written is:

[0040] Const filterObj=deepCloneWithCondition(treeObject).

[0041] Step 7: Click to select a field in the json editor, get the field name, and select the required data from the original List. The function to select the required data from the original List is:

[0042] Const descriptionObj=findDescriptionObj(List, fieldName), findDescriptionObj.

[0043] Through the inner and outer loop traversal, when the parameter name fieldName is found in the List and the parentId of the parameter also matches the one in the List, the required data is obtained. The parentId can be used to distinguish the duplication of parameters at different levels.

[0044] Step 8: After taking out the field description attributes, you can add, delete or modify the fields or field description attributes. The specific steps are as follows:

[0045] Step 8.1: When you need to modify or add the current field or the description attribute of the field, modify it in the original List through fieldName and parentId;

[0046] Step 8.2: When a field or a field's description attribute needs to be deleted, the callback function is used to obtain the json data updateJson;

[0047] Step 8.3: Convert updateJson into a hierarchical path and define the path array pathArray to store all key values ​​in res;

[0048] Step 8.4: Delete the array in the original List.

[0049] After the above processing, you can add description fields to basic type or Array type fields and perform add, delete, and modify operations. At the same time, the front-end and back-end always interact through the original List data. Only one set of data needs to be maintained, which can ensure the accuracy of data processing in the orchestration system.

[0050] In summary, the present invention solves the pain point that when a conventional service orchestration system configures description fields for basic type and array type fields, it is difficult to add description fields to them without changing the structure of leaf nodes through data structure processing, thereby expanding the flexibility and application scenarios of service orchestration.

[0051] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for configuring backend interface fields based on a service orchestration system, characterized in that: The steps include: Step 1: Create an orchestration process. The configuration of each node in the process corresponds to the backend interface. Each interface has multiple fields of different data types that need to be configured. Step 2: Agree that the data structure for front-end and back-end interaction is a flat List structure, and store the List structure as raw data; Step 3: The hierarchical relationship between data is associated through id and parentId; Step 4: Convert the above List structure data fldList into a structure with hierarchical relationship by writing a function; Step 5: After converting to the transferListWithChild structure, write a function to convert transferListWithChild into a tree structure that can be displayed in the json editor; Step 6: Write a conditional copy function to process the data and get the data filterObj displayed in the json editor; Step 7: Click to select a field in the json editor, get the field name, and select the required data from the original List; Step 8: After retrieving the field description attributes, you can add, delete or modify the fields or field description attributes.

2. The method for configuring backend interface fields based on a service orchestration system according to claim 1, characterized in that: The function written in step 4 is: Const transferListWithChild=listWithChild(fldList), transferListWithChild.

3. The method for configuring backend interface fields based on a service orchestration system according to claim 1, characterized in that: The function written in step 5 is: Const treeObject=TreeToObj(transferListWithChild).

4. The method for configuring backend interface fields based on a service orchestration system according to claim 1, characterized in that: The function written in step 6 is: Const filterObj=deepCloneWithCondition(treeObject).

5. The method for configuring backend interface fields based on a service orchestration system according to claim 1, characterized in that: The function for selecting the required data from the original List in step 7 is: Const descriptionObj=findDescriptionObj(List, fieldName), findDescriptionObj.

6. The method for configuring backend interface fields based on a service orchestration system according to claim 1, characterized in that: The specific steps of step 8 are as follows: Step 8.1: When you need to modify or add the current field or the description attribute of the field, modify it in the original List through fieldName and parentId; Step 8.2: When a field or a field's description attribute needs to be deleted, the callback function is used to obtain the json data updateJson; Step 8.3: Convert updateJson into a hierarchical path and define the path array pathArray to store all key values ​​in res; Step 8.4: Delete the array in the original List.

Citation Information

Patent Citations

  • Video on demand system and method

    CN103051933A

  • Method and device for automatically generating interface message

    CN110806973A