Data editing method, related device, equipment and storage medium

By converting the data text of the key-value pair structure into a programming language object, and editing data types and expanding attributes in the modeling interface, the problem of limited data format functions in the existing technology is solved, and more complex business logic and scenarios are realized. support.

CN119476203APending Publication Date: 2025-02-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310964879.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When editing data text, the prior art is limited by the simple key-value pair structure, resulting in limited text functions in the data format and it is difficult to bear complex business logic and scenario problems.

Method used

By converting the first text of the key-value pair structure into a first programming language object, and displaying and editing the modeling data of multiple fields in the modeling interface, including editing of data types and extension attributes, the data types and extension attributes can be achieved. Updates of properties.

Benefits of technology

By adding data types and expansion attributes, the data text can carry more complex business logic, solve more complex scenario problems, and improve the functionality and flexibility of data editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476203A_ABST
    Figure CN119476203A_ABST
Patent Text Reader

Abstract

The invention discloses a data editing method, a related device, equipment and a storage medium. According to the method, a first text of a key-value pair structure can be converted into a first programming language object according to a modeling request, modeling data of a plurality of modeled first fields in the first programming language object are displayed on a modeling interface, and attribute editing data of a second field in the plurality of first fields are acquired; and updating the data type of the second field and the expansion attribute related to the data type to modeling data of the second field of the modeling interface, and synchronizing to a database. According to the method, the first text is converted into the first programming language object, and then the data type and the expansion attribute are added to the first programming language object, so that the data type and the expansion attribute corresponding to the data type can be edited for the field in the first text with the key-value pair structure, namely, more logic functions are configured for the first text; therefore, the first text can bear more complex business logic, and the problem of more complex scenes is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a data editing method, related devices, equipment and storage medium. Background Art

[0002] Data format is the format in which data is stored in files or records. It can be in the form of numeric values, characters or binary numbers. It is described by the data type and the growth rate of the number. Its determination should meet certain conditions: to ensure that all the information required for recording is ensured; to improve storage efficiency and ensure full utilization of storage space; to standardize the format and ensure data exchange between related data processing systems.

[0003] Currently, when editing data text, the data format of the data text is edited through a code editor. However, due to the limitation of a simple key-value data structure of some data formats, the text functions of the data format are limited. Summary of the invention

[0004] The present application provides a data editing method, related devices, equipment and storage medium, which are used to edit the data type of a field in a first text of a key-value pair structure and edit the corresponding extended attributes of the data type, that is, to configure more logical functions for the first text, so that the first text can carry more complex business logic and solve more complex scenario problems.

[0005] In view of this, the present application provides a data editing method, comprising:

[0006] In response to a modeling request for a first text, obtaining the first text according to the modeling request, wherein a first data format used by the first text is a key-value pair structure;

[0007] converting the first text into a first programming language object;

[0008] Acquire modeling data of a plurality of first fields in a first programming language object, wherein the modeling data of each first field includes attribute data of each first field;

[0009] Displaying modeling data of multiple first fields on the modeling interface;

[0010] Acquire attribute editing data of a second field on the modeling interface, the plurality of first fields including the second field, the attribute editing data including data of the data type and data of an extended attribute corresponding to the data type;

[0011] The modeling data of the second field is updated according to the attribute edit data.

[0012] Another aspect of the present application provides a data editing device, comprising:

[0013] An acquiring unit, configured to respond to a modeling request for a first text and acquire the first text according to the modeling request, wherein a first data format used by the first text is a key-value pair structure;

[0014] a conversion unit, configured to convert the first text into a first programming language object;

[0015] The acquisition unit is further used to acquire modeling data of a plurality of first fields in the first programming language object, wherein the modeling data of each first field includes attribute data of each first field;

[0016] A display unit, used to display the modeling data of the plurality of first fields on the modeling interface;

[0017] The acquiring unit acquires attribute editing data of a second field on the modeling interface, the plurality of first fields including the second field, and the attribute editing data including data of a data type and data of an extended attribute corresponding to the data type;

[0018] The updating unit is used to update the modeling data of the second field according to the attribute editing data.

[0019] In a possible design, in another implementation of another aspect of the embodiment of the present application, the acquisition unit is further used to:

[0020] In response to an edit instruction for the second field on the modeling interface, displaying an edit window for the second field;

[0021] Get the data on the edit window as attribute edit data.

[0022] In one possible design, in another implementation of another aspect of the embodiment of the present application, the editing window includes basic attributes and extended attributes, the basic attributes include a data type, and one or more of a field, a name, a default value, or a description;

[0023] The acquisition unit is specifically used for:

[0024] The data of the basic attribute and the data of the extended attribute are obtained as the attribute editing data.

[0025] In a possible design, in another implementation of another aspect of the embodiment of the present application, the apparatus further includes a deleting unit, and the deleting unit is specifically configured to:

[0026] In response to a deletion instruction for the third field, the modeling data of the third field in the modeling interface is deleted, and the plurality of first fields includes the third field.

[0027] In a possible design, in another implementation of another aspect of the embodiment of the present application, the device further includes a hiding unit, and the hiding unit is specifically used to:

[0028] In response to a hiding instruction for a fourth field, modeling data of a fourth field in the modeling interface is hidden, and the plurality of first fields include the fourth field.

[0029] In a possible design, in another implementation of another aspect of the embodiment of the present application, the device further includes an adding unit, and the adding unit is specifically used to:

[0030] In response to the adding instruction, displaying an adding window corresponding to the adding instruction;

[0031] Acquire the attribute data of the fifth field on the adding window as the attribute adding data, wherein the first text includes the fifth field;

[0032] Add data according to the attributes and display the modeling data of the fifth field on the modeling interface.

[0033] In a possible design, in another implementation of another aspect of the embodiment of the present application, the adding unit is specifically used for:

[0034] Obtaining attribute names of a plurality of sixth fields in the first programming language object;

[0035] The attribute names of multiple sixth fields are converted into tree structure data and displayed in the adding window corresponding to the adding instruction, the multiple sixth fields include the fifth field, and the tree structure data includes the attribute name of each sixth field and an identifier indicating whether each sixth field is modeled.

[0036] In a possible design, in another implementation of another aspect of the embodiment of the present application, the adding unit is specifically used for:

[0037] Get the key-value pair information of the fifth field;

[0038] Determine the initial data type of the fifth field according to the value in the key-value pair information;

[0039] Add data by adding key-value pair information and initial data type to the attribute.

[0040] In a possible design, in another implementation of another aspect of the embodiment of the present application, the display unit is specifically used for:

[0041] The modeling data of the plurality of first fields are displayed in the form of a foldable frame.

[0042] In a possible design, in another implementation of another aspect of the embodiment of the present application, the conversion unit is further used for:

[0043] In response to a conversion instruction for a first text on a code interface, a second text corresponding to the first text is displayed on the code interface according to the conversion instruction, and the second text uses a second data format.

[0044] In a possible design, in another implementation of another aspect of the embodiment of the present application, the conversion unit is specifically used for:

[0045] The second text is converted into a first programming language object.

[0046] In a possible design, in another implementation of another aspect of the embodiment of the present application, the conversion unit is further used for:

[0047] In response to a conversion instruction for the second text on the code interface, the first text corresponding to the second text is displayed on the code interface according to the conversion instruction, and the second text uses a second data format.

[0048] In a possible design, in another implementation of another aspect of the embodiment of the present application, the acquisition unit is further used to:

[0049] Get the code data in the code interface;

[0050] The device also includes a verification unit, which is specifically used to:

[0051] Performing format verification on the code data according to the data format of the code data to obtain a verification result;

[0052] Display units are also used for:

[0053] Display the verification results on the code interface.

[0054] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first data format is the data serialization format language YAML, the second data format is the Java script object notation JSON, and the first programming language object is a Java script JS object.

[0055] Another aspect of the present application provides a computer device, comprising:

[0056] memories, transceivers, processors, and bus systems;

[0057] Wherein, the memory is used to store programs;

[0058] The processor is used to execute the program in the memory, including executing the above-mentioned methods;

[0059] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

[0060] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.

[0061] Another aspect of the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided by the above aspects.

[0062] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0063] In an embodiment of the present application, a data editing method is provided. The method can convert a first text of a key-value pair structure into a first programming language object according to a modeling request, display the modeling data of multiple first fields that have been modeled in the first programming language object on a modeling interface, obtain the attribute editing data of a second field in multiple first fields, and update the data type of the second field and the extended attributes related to the data type to the modeling data of the second field in the modeling interface. In the above manner, the first text is converted into a first programming language object, and then the data type and extended attributes are added to the first programming language object, so that the data type of the field in the first text of the key-value pair structure can be edited and the extended attributes corresponding to the data type can be edited, that is, more logical functions are configured for the first text, so that the first text can carry more complex business logic and solve more complex scenario problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 A schematic diagram of an application environment in an embodiment of the present application;

[0065] Figure 2 A flowchart of a data editing method in an embodiment of the present application;

[0066] Figure 3 A YAML text modeling diagram in an embodiment of the present application;

[0067] Figure 4 This is a schematic diagram showing an extended attribute in an embodiment of the present application;

[0068] Figure 5 This is a string type editing schematic diagram in an embodiment of the present application;

[0069] Figure 6 This is a schematic diagram of a bool type editing in an embodiment of the present application;

[0070] Figure 7 A schematic diagram of number type editing in an embodiment of the present application;

[0071] Figure 8This is a schematic diagram of an enum type editing in an embodiment of the present application;

[0072] Fig. 9 A schematic diagram of modeling data deletion in an embodiment of the present application;

[0073] Fig.10 A schematic diagram of modeling data hiding in an embodiment of the present application;

[0074] Fig.11 A schematic diagram is added for fields of a modeling interface in an embodiment of the present application;

[0075] Fig.12 This is a schematic diagram of adding a window in an embodiment of the present application;

[0076] Fig.13 A conversion logic diagram of a modeling converter in an embodiment of the present application;

[0077] Fig.14 A schematic diagram of a processing flow of a terminal device in an embodiment of the present application;

[0078] Fig.15 A schematic diagram of a tree structure in an embodiment of the present application;

[0079] Fig.16 This is a schematic diagram of a folding frame in an embodiment of the present application;

[0080] Fig.17 A folding schematic diagram of an embodiment of the present application;

[0081] Fig.18 A schematic diagram of field parsing in an embodiment of the present application;

[0082] Fig.19 This is a schematic diagram of a code interface in an embodiment of the present application;

[0083] Fig. 20 This is another schematic diagram of a code interface in an embodiment of the present application;

[0084] Fig.21 A schematic diagram of the structure of a data editing device in an embodiment of the present application;

[0085] Fig. 22 A schematic diagram of the structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0086] The embodiments of the present application provide a data editing method, related devices, equipment and storage medium for editing the data type of a field in a YAML text and editing the corresponding extended attributes of the data type, that is, configuring more logical functions for the YAML text, so that the YAML text can carry more complex business logic and solve more complex scenario problems.

[0087] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0088] The embodiments of the present application can be applied to a private cloud, wherein a private cloud is a cloud infrastructure and software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within a data center. In addition to hardware resources, cloud equipment (IaaS, infrastructure as a service) software is generally also provided to create a private cloud.

[0089] Private cloud computing also includes three levels: cloud hardware, cloud platform, and cloud service. The difference is that cloud hardware is the user's own personal computer or server, not the cloud computing vendor's data center. The purpose of cloud computing vendors to build data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and relatives for individuals, and only serves employees, customers, and suppliers for enterprises. Therefore, an individual or enterprise's own personal computer or server is sufficient to provide cloud services.

[0090] The environment in which the embodiments of the present application are applied can be as follows Figure 1As shown. The application environment includes: a terminal device 102 for human-computer interaction with a user, a network 104, and a server 106. A user 108 can perform human-computer interaction with the terminal device 102, and a data storage application client is running in the terminal device 102. The terminal device 102 includes a human-computer interaction screen 1022, a processor 1024, and a memory 1026. The human-computer interaction screen 1022 is used to present the code data in the code interface, and is also used to present the attribute data of the modeling interface; the processor 1024 is used to convert the first text in the code interface into a first programming language object when it is necessary to model the first text of the key-value pair structure. And based on the user's addition operation, the attribute data of multiple first fields in the first programming language object are converted into modeling data of the modeling interface, and then based on the attribute editing data of the user editing the second field in the multiple first fields, the data type in the modeling data of the second field in the modeling interface and the extended attribute corresponding to the data type are updated. The memory 1026 is used to store the code data in the code interface, and is also used to store the modeling data of the modeling interface.

[0091] In addition, the server 106 includes a database 1062, and the terminal device 102 can send the code data in the code interface and the modeling data of the modeling interface to the server 106 through the network 104. The database 1062 is used to store the code data in the code interface and the modeling data of the modeling interface.

[0092] The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0093] It should be understood that the data format is the format in which data is stored in a file or record. It can be in the form of a numerical value, a character, or a binary number. It is described by the data type and the growth rate of the number. Its determination should meet certain conditions: ensure that all the information required for the record is recorded; improve storage efficiency and ensure full utilization of storage space; standardize the format to ensure the exchange of data between related data processing systems. Currently, when editing a data text, the data format of the text is edited by a code editor. However, due to the data structure of a key-value pair with a simple data format, the text function of the data format is limited. In the scheme of the embodiment of the present application, the first text can be converted into a first programming language object, and then the data type and extended attributes can be added to the first programming language object, so that the data type of the field in the first text of the key-value pair structure can be edited and the corresponding extended attributes of the data type can be edited, that is, more logical functions are configured for the first text, so that the first text can carry more complex business logic and solve more complex scenario problems.

[0094] To implement the above solution, an embodiment of the present application provides a data editing method, which can be described from the perspective of a terminal device.

[0095] The first data format in the embodiment of the present application can be a data serialization format language (YAML ain't markup language, YAML), Java script object notation (JSON) or programming language (Lua). Among them, YAML is a highly readable, easy to understand and commonly used format for expressing data serialization. JSON is a light-weight, text-based, readable (human-readable) format. Lua is a powerful, efficient, lightweight, embeddable scripting language that supports procedural programming, object-oriented programming, functional programming, data-driven programming and data description.

[0096] In the embodiment of the present application, the first data format takes YAML as an example, and the second data format takes JSON as an example. YAML and JSON can be converted into each other. The first programming language object takes JS object as an example. YAML can be directly converted into JS object, or it can be converted into JSON and then converted into JS object from JSON.

[0097] See also Figure 2 ,like Figure 2 The figure is a flow chart of a data editing method provided by an embodiment of the present application, the method comprising:

[0098] Step 201: In response to a modeling request for a first text, the first text is obtained according to the modeling request, and a first data format used by the first text is a key-value pair structure.

[0099] In one or more embodiments, the modeling request is a request for page display of attribute data in the YAML text. The user can request to display the attribute data in the YAML text on a visualization page. YAML is a key-value pair structure. In response to the modeling request, the YAML text of the code interface can be obtained. The user can initiate the modeling request by clicking a modeling button in the code interface with the YAML text, which is not limited here.

[0100] For example, see Figure 3 The YAML text modeling diagram shown in the figure is Figure 3 The code interface in the code has YAML text input, and the code interface is provided with a modeling button. When the user clicks the modeling button, it indicates that the YAML text in the current code interface needs to be modeled into a user interface (UI). Figure 3 The position of the modeling button in the upper right corner is taken as an example, which is not limited here. In the embodiment of the present application, a save button can also be configured, and the user saves the YAML text of the current code interface by clicking the save button.

[0101] Step 202: Convert the first text into a first programming language object.

[0102] In one or more embodiments, the JS object is a collection of attribute data, and the JS object can clearly know the attribute data in the YAML text, and the attribute data in the JS object is unordered and different. By converting the YAML text into a JS object, the attribute data collection in the YAML text can be obtained.

[0103] Step 203: Obtain modeling data of multiple first fields in the first programming language object, where the modeling data of each first field includes attribute data of each first field.

[0104] In one or more embodiments, the first field is a modeled field in a set of attribute data, that is, the field that the user has added to the modeling interface is the first field, and the attribute data of the first field has been saved as the modeling data of the first field in the database. When the modeling data of the first field needs to be displayed, the modeling data of the first field can be obtained from the database.

[0105] Step 204: Display the modeling data of the multiple first fields on the modeling interface.

[0106] In one or more embodiments, after obtaining modeling data of multiple first fields, the code interface can be switched to the modeling interface, and then the modeling data of each first field can be displayed separately on the modeling interface, that is, the attribute data of the YAML text can be visually displayed.

[0107] Step 205: Acquire attribute editing data of a second field on the modeling interface, the plurality of first fields include the second field, and the attribute editing data includes data of the data type and data of an extended attribute corresponding to the data type.

[0108] In one or more embodiments, for the modeling data of the first field on the modeling interface, the embodiment of the present application also provides an editing interface, that is, the user can select any one of the multiple first fields as the second field, and edit the modeling data of the second field. Specifically, the data of the extended attribute corresponding to the data type of the second field can be added to the second field. Exemplarily, when editing the attribute, different fields can be set according to different data types, the string type can set the verification rules, the number type can set the maximum value, minimum value, step size, and the enumeration type can add an enumeration array, etc. Among them, the data type can be the initial data type or the data type modified by the user.

[0109] Step 206: Update the modeling data of the second field according to the attribute editing data.

[0110] In one or more embodiments, after obtaining the attribute editing data, the modeling data corresponding to the second field can be determined based on the field name, and then the modeling data can be overwritten based on the data in the attribute editing data, that is, the modeling data of the second field in the database is updated, and the modeling data of the second field displayed on the modeling interface is updated.

[0111] The embodiment of the present application converts the first text of the key-value pair structure into a first programming language object according to the modeling request, displays the modeling data of multiple first fields that have been modeled in the first programming language object on the modeling interface, obtains the attribute editing data of the second field among the multiple first fields, and updates the data type of the second field and the extended attributes related to the data type to the modeling data of the second field in the modeling interface. Through the above method, the first text is converted into the first programming language object, and then the data type and extended attributes are added to the first programming language object, so that the data type of the field in the first text of the key-value pair structure can be edited and the extended attributes corresponding to the data type can be edited, that is, more logical functions are configured for the first text, so that the first text can carry more complex business logic and solve more complex scenario problems.

[0112] Optionally, in the above Figure 2On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining the attribute editing data of the second field on the modeling interface includes:

[0113] In response to an edit instruction for the second field on the modeling interface, displaying an edit window for the second field;

[0114] Get the data on the edit window as attribute edit data.

[0115] In one or more embodiments, a user triggers an editing instruction for a second field through the editing interface of the second field on the modeling interface. In response to the editing instruction, an editing window for the second field may pop up, and the user may modify the attribute data of the second field in the editing window. After the modification is confirmed, the data in the modified editing window may be used as attribute editing data.

[0116] In the embodiment of the present application, a method for editing attribute data is provided. Through the above method, after the modeling data of the second field is displayed on the modeling interface, an editing window pops up according to the editing instruction to obtain the attribute editing data, and a method for inputting the attribute editing data is provided through the pop-up window, so as to facilitate the user to edit the attribute data.

[0117] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the editing window includes basic attributes and extended attributes, and the basic attributes include data types, and one or more of fields, names, default values, or descriptions;

[0118] Getting the data on the edit window as attribute edit data includes:

[0119] The data of the basic attribute and the data of the extended attribute are obtained as the attribute editing data.

[0120] In one or more embodiments, there are only key-value pairs in the YAML text. In addition to adding data types and extended data to the modeling data of the second field, the editing window can also provide one or more of field, name, default value or description, where field indicates the second field, name is the name of the second field, default value is the value in the key-value pair, and description is user notes. The attribute editing data is the data of the basic attribute and the data of the extended attribute on the editing window.

[0121] Among them, assuming that the basic attributes include fields, names, default values, descriptions and data types at the same time, the extended attributes on the editing window will be different according to the selection of different data types. The possible values ​​of the data type are: string (string) / number (number) / Boolean (bool) / enumeration (enum) / object (object) / array (array). Among them, for the data types of array and object, there may be nested situations. For example, each element in the array is an object type, and each object contains an array. In theory, there can be infinite levels of nesting. The array and object types do not need to be configured with corresponding extended attributes. For the other four simple types string / number / bool / enum, the corresponding extended attributes can be displayed. For example Figure 4 The extended attribute display diagram shown in the figure shows that the relationship between the extended attribute and the data type Type is: when the data type Type is string, the extended attribute is to fill in the verification rule; when the data type Type is bool, the extended attribute is empty; when the data type Type is number, the extended attribute is the maximum value, minimum value, and step size; when the data type Type is enum, the extended attribute is an enumeration value list.

[0122] See also Figure 5 In the string type editing diagram shown in the figure, when the data type Type is string, the extended attribute is to fill in the validation rule, which can be used to verify whether the value entered by the user is legal. Assuming that the second field is cloudName, the name of the second field is also represented by cloudName, the default value is "test", and the data type of cloudName is string, then the extended attribute is the validation rule, and the description is the information of the user's remarks. Figure 5 The middle is empty.

[0123] See also Figure 6 In the bool type editing diagram shown in the figure, when the data type Type is bool, the extended attribute is empty. At this time, the default value can only be true or false, and no additional verification is required. Assuming that the second field is cloudName, the name of the second field is also represented by cloudName, the default value is "true", and the data type of cloudName is Boolean, then no extended attribute is required, and the description is the user's remarks information. Figure 6 The middle is empty.

[0124] See also Figure 7The number type editing diagram shown in the figure shows that when the data type Type is number, the extended attributes are maximum value, minimum value, and step length. Because the number type can only input numbers, and generally has a maximum and minimum value, when setting the default value, the amount of increase or decrease each time is the step length. For example, if the step length is set to 1, the minimum value is 1, and the maximum value is 10, then any integer between 1 and 10 can be entered. If the minimum value is 2, the maximum value is 10, and the step length is 2, then only the numbers 2, 4, 6, 8, and 10 can be entered. Figure 6 Assume that the second field is cloudName, the name of the second field is also represented by cloudName, the default value is "6", the data type of cloudName is a number, and the extended attributes include a maximum value of 10, a minimum value of 2, and a step length of 2. The description is the user's remarks. Figure 7 The middle is empty.

[0125] See also Figure 8 The enum type editing diagram shown in the figure shows that when the data type Type is enum, the extended attribute is the enumeration value list. The enumeration value list contains two attributes: value and name. The value is used to match the data and is invisible to the user. It is mainly used for identification in the program. The name is the description of this value and is visible to the user. The user sees the name, and the program saves the value. The role of the enumeration type is to provide a conversion dictionary for the value and the name. Generally, users select a fixed finite set of values. For example Figure 8 Assume that the second field is cloudName, and the name of the second field is also represented by cloudName. The default value is "test". The data type of cloudName is enumeration. The extended attributes include value and Name. Users can add a new row of data or delete the added data. The description is the user's remarks. Figure 8 The middle is empty.

[0126] In the embodiment of the present application, simple types can be switched between each other, for example, a numeric type can be changed to a string or an enumeration type, and after switching the data type, the extended attributes unique to each simple type are also switched and displayed along with the change of the simple type.

[0127] In an embodiment of the present application, a method for editing attribute data is provided. Through the above method, a pop-up editing window displays multiple attributes of the second field, which is convenient for users to distinguish and edit attribute data.

[0128] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after the modeling data of the plurality of first fields are displayed on the modeling interface, the method further includes:

[0129] In response to a deletion instruction for the third field, the modeling data of the third field in the modeling interface is deleted, and the plurality of first fields includes the third field.

[0130] In one or more embodiments, for multiple first fields that have been displayed on the modeling interface, the user can select unnecessary fields to delete, and the user can trigger the delete button of the third field in the multiple first fields to generate a delete instruction for the third field, and the terminal device can execute an operation of deleting the modeling data of the third field in response to the delete instruction, wherein the deleted data includes the modeling data of the third field in the modeling interface and the modeling data in the database. If the third field is nested with other fields, the data of the other fields will be deleted accordingly as the data of the third field is deleted.

[0131] For details, please refer to Fig. 9The modeling data deletion diagram shown in the figure assumes that the JS object includes the object cloud, and the array regions and array zones nested in the object cloud, wherein the object cloud includes cloudName and cloudUUID of string type, the field cloudName is named cloudName, the default value is test 1, the description is empty as an example, and the executable operation is edit, and the attribute of the field cloudName is modified through the editing interface; the field cloudUUID is named cloudUUID, the default value is test 2, the description is empty, and the executable operation is edit. The array regions and array zones are both configured with editing interfaces, and the element 1 included in the array regions can include multiple fields and nested array zones, and the multiple fields take the string type regionName and regionUUID as examples, the field regionName is named regionName, the default value is test 3, the description is empty, and the executable operation is edit; the field regionUUID is named regionUUID, the default value is test 4, the description is empty, and the executable operation is edit. The element 1 included in the zones array can include multiple fields. For example, the zoneName and zoneUUID of string type, the zoneName field is named zoneName, the default value is test 5, the description is empty, and the executable operation is edit; the zoneUUID field is named zoneUUID, the default value is test 6, the description is empty, and the executable operation is edit. Correspondingly, the operations that can be executed by the object cloud also include edit and delete operations. When the delete operation is triggered, the object cloud, the fields in the object cloud, the arrays regions and zones nested in the object cloud, and the fields in the arrays regions and zones will be deleted.

[0132] In an embodiment of the present application, a method for deleting modeling data is provided. Through the above method, an interface for deleting modeling data is provided to save storage space.

[0133] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after the modeling data of the plurality of first fields are displayed on the modeling interface, the method further includes:

[0134] In response to a hiding instruction for a fourth field, modeling data of a fourth field in the modeling interface is hidden, and the plurality of first fields include the fourth field.

[0135] In one or more embodiments, for multiple first fields that have been displayed on the modeling interface, the user can choose to hide fields that do not need to be viewed temporarily, and the user can trigger a hide button for a third field among the multiple first fields to generate a hide instruction for the third field. The terminal device can respond to the hide instruction and execute an operation to hide the modeling data of the third field. If the third field is nested with other fields, the data of the other fields will be hidden accordingly as the data of the third field is hidden.

[0136] For details, please refer to Fig.10 The modeling data shown is hidden in the schematic diagram. Fig. 9 Taking the example of , the executable operations of cloudName and cloudUUID of string type also include hiding, the array regions and the array zones include a hiding interface in addition to being configured with an editing interface, and the executable operations of regionName and regionUUID also include hiding, and the executable operations of zoneName and zoneUUID also include hiding.

[0137] In an embodiment of the present application, a method for hiding modeling data is provided. By providing an interface for hiding modeling data on a modeling interface, modeling data that does not need to be viewed can be hidden, thereby speeding up user viewing efficiency.

[0138] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the method further includes:

[0139] In response to the adding instruction, displaying an adding window corresponding to the adding instruction;

[0140] Acquire the attribute data of the fifth field on the adding window as the attribute adding data, wherein the first text includes the fifth field;

[0141] Add data according to the attributes and display the modeling data of the fifth field on the modeling interface.

[0142] In one or more embodiments, the user can add unmodeled fields in the YAML text to the modeling interface at any time. Accordingly, an adding interface can be set on the modeling interface, and the user can trigger the adding interface to generate an adding instruction. Then, in response to the adding instruction, the terminal device can pop up an adding window corresponding to the adding instruction, wherein the adding window can only provide a selection path for unmodeled fields, or can provide a selection path for all fields in the YAML text, but the selection path for modeled fields is not selectable. When the user selects an unmodeled field (the fifth field), the terminal device can obtain the attribute data of the fifth field, such as the key-value pair information in the JS object corresponding to the YAML text, and use the key-value pair information as the attribute adding data of the fifth field, and add it to the modeling interface as the modeling data of the fifth field.

[0143] For example, see Fig.11 The fields in the modeling interface shown in the figure are added to the diagram. Fig.10 Based on the example, the modeling interface is configured with an interface for adding modeling fields. The location of this interface is not limited. When the user triggers this interface, please refer to Fig.12 The schematic diagram of the add window shown in the figure includes selection paths for all fields in the YAML text, such as DomainMain, DomainMainProtocol, test_num, and tes_string_array, where DomainMain and test_num are not modeled as optional. Fig.12 The fields in bold indicate optional fields. The checked fields are selected. DomainMainProtocol and tes_string_array are modeled fields and cannot be selected. Fig.12 In the form of being in light font and checked, when the user checks a bold field, the user can press the OK button to trigger the adding operation of the terminal device, or press the Cancel button to trigger the abandonment of the adding operation.

[0144] In step 204, if the current data has been modeled, the modeling data of the modeled attributes of the current data will be directly returned as the modeling data of the first fields. If it has not been modeled, first select the fields to be modeled through the above-mentioned adding modeling method, and generate modeling data through the modeling converter. The conversion logic of the modeling converter can be found in Fig.13As shown, the simple key-value structure in the YAML data is expanded into a complex object structure on the right side of the figure above. UUID is the unique identifier of each attribute, through which you can accurately find the specific attribute, edit and delete the attribute. Key corresponds to the key in yaml, which is the English name of the attribute. DefaultValue corresponds to the value after the colon in YAML, which is the value of the attribute. Name is the Chinese name corresponding to the current attribute, and Type is the type of the value of this attribute. The possible values ​​are: string / number / bool / enum / object / array. Each type corresponds to different extended attributes, including MinValue indicating the minimum value, MaxValue indicating the maximum value, Step indicating the step size, Items indicating the item list of the array, Properties indicating the property list of the object, ReadOnly indicating whether it is read-only, and Hidden indicating whether it is hidden.

[0145] The processing flow of the terminal device in the embodiment of the present application can refer to Fig.14As shown, step 1401: obtain user code input; step 1402: convert YAML text and JSON text mutually according to user instructions, so as to facilitate viewing on the page; step 1403: convert YAML text or JSON text into JS object, wherein YAML text can be converted into JSON text first and then into JS object; step 1404: determine whether there is modeling data, if yes, execute step 1407, otherwise execute step 1405; step 1405: obtain fields to be modeled, such as providing a field selection interface for user selection in response to the add instruction; step 1406: use the modeling converter to convert the fields to be modeled into modeling data; step 1407: obtain modeling data, such as querying which fields are modeled, querying the modeling data of these fields from the database, and the front end obtains the modeled modeling data from the server through the asynchronous network (axios); step 1408: visualize the modeling data, and load the modeling data through the application programming interface (API) request on the page, and the front end parses the modeling data and maps the data to specific elements of the page. The fields of array and object types will be parsed as collapsible boxes, which can be folded and viewed when there are too many fields. Basic data types such as strings, numbers, Booleans, and enumeration values ​​can be displayed in a table format; Step 1409: Edit modeling data, such as users can select fields on the page for editing, and can modify field attributes, such as the value of name, default value, data type, validation rule, maximum value, minimum value, step size, enumeration value, description and other information; Step 1410: Update modeling data, in response to the user's editing operation on the attribute data of the field in the modeling interface, update the modeling data on the modeling interface, and update the modeling data in the database, that is, transmit the edited data to the server through a POST request through axios request, and finally save it in the database.

[0146] In the embodiment of the present application, a method for adding modeling data is provided. Through the above method, an interface for adding modeling data on the modeling interface is provided, and the modeling data of the field in the code can be viewed at any time, which speeds up the user's viewing efficiency.

[0147] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the adding window corresponding to the adding instruction is displayed including:

[0148] Obtaining attribute names of a plurality of sixth fields in the first programming language object;

[0149] The attribute names of multiple sixth fields are converted into tree structure data and displayed in the adding window corresponding to the adding instruction, the multiple sixth fields include the fifth field, and the tree structure data includes the attribute name of each sixth field and an identifier indicating whether each sixth field is modeled.

[0150] In one or more embodiments, all fields in the JS object can be determined, and each of the fields can be called the sixth field. Each sixth field has a corresponding attribute name, such as the key in the key-value pair information. The attribute name corresponding to each sixth field, as well as the name of the sixth field and whether it has been modeled can be obtained. According to the relationship between the attribute name, the name and whether it has been modeled, the tree structure data can be configured, and the information in the tree structure data can be reflected in the add window.

[0151] For example, you can use jsonKeys = Object.keys (jsonValue) to get the first-level attribute name in the JS object, and then use Fig.15 As shown in the tree structure diagram, each attribute name key can be converted into tree structure data including title, key, and disableCheckbox, wherein title indicates the name of the field corresponding to the attribute name, key is the unique index of the field, and disableCheckbox indicates whether the field is selectable, that is, whether the field has been modeled.

[0152] In an embodiment of the present application, a method for adding modeling data is provided. In this way, only the field name needs to be provided in the adding window, and no attribute data needs to be displayed. The user can quickly filter all fields, thereby improving the adding efficiency.

[0153] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining the attribute data of the fifth field on the adding window as the attribute adding data includes:

[0154] Get the key-value pair information of the fifth field;

[0155] Determine the initial data type of the fifth field according to the value in the key-value pair information;

[0156] Add data by adding key-value pair information and initial data type to the attribute.

[0157] In one or more embodiments, the YAML text is limited to a simple data structure such as key:value. When YAML is converted into JSON text, it only carries information such as key:value. When adding the fifth field, the key-value pair information of the fifth field can be obtained. Since the key-value pair information does not include a data type, the terminal device can configure an initial data type for the fifth field, and the initial data type can be related to the value in the key-value pair information. For example, when the key-value pair is age:18 and the value is 18, the data type can be set to a number; when the key-value pair is test:'http' and the value is 'http', the data type can be set to a string, etc. Correspondingly, the key-value pair information and the initial data type are the attribute addition data that needs to be added to the modeling interface. That is, assuming that the object to be modeled is y, and the key and value are known, according to the formula y=f(key, value), the value of key is filled in the Key field of the y object, the value of value is filled in the DefaultValue field of the y object, and the value of the Type field is filled in according to the type of value, and other extended attributes are initialized to empty.

[0158] In an embodiment of the present application, a method for adding modeling data is provided. Through the above method, the data type can be automatically configured according to the value in the key-value pair information of the field, saving the user's editing time and improving the user's editing efficiency.

[0159] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the modeling data showing the plurality of first fields includes:

[0160] The modeling data of the plurality of first fields are displayed in the form of a foldable frame.

[0161] In one or more embodiments, the form of a foldable frame means that the display frame where each first field is located is in a foldable form, that is, the modeling data in the display frame where the first field is located can be folded through a folding interface.

[0162] For example, see Fig.16 The folded frame diagram shown in Fig.11 As the basis, Fig.16 The unfolded form is represented by "ν". When you choose to collapse the cloud (object), see Fig.17 As shown in the folding diagram, the modeling interface only displays the editable and deletable contents of cloud (object). cloudName, cloudUUID, array regions and array zones have been folded in cloud (object). The folded state is indicated by ">".

[0163] The collapsible box format is for fields whose data types are objects and arrays. That is, the parsing rules displayed are parsed into different components according to the different data types, such as Fig.18 The field parsing diagram shown in the figure shows that if the data type is array, it is parsed as a foldable component and the title indicates that it is an array. If the data type is object, it is parsed as a foldable component and the title indicates that it is an object. If the data type is one of the four simple types, including string / number / bool / enum, it is parsed as a table and their values ​​are represented in a table. For fields with data types of array and object, there may be nesting. For example, each element in the array is an object type, and each object contains an array. In theory, there can be unlimited levels of nesting. For this situation, the program also performs compatibility processing, parsing each array and object as a foldable component. Inside the foldable component, it is looped and rendered according to the same rules based on the types of attributes or element items they contain, so that no matter how many layers of nesting there are, it can be rendered according to the expected results.

[0164] In an embodiment of the present application, a method for folding modeling data is provided. By means of the above method, the modeling data can be folded freely, saving display space of the modeling interface.

[0165] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the method further includes:

[0166] In response to a conversion instruction for a first text on a code interface, a second text corresponding to the first text is displayed on the code interface according to the conversion instruction, and the second text uses a second data format.

[0167] In one or more embodiments, since YAML code is not easy to understand, for YAML text input in the code interface, the terminal device can configure a conversion interface for converting YAML text into JSON text in the code interface. The user can choose to convert the YAML text into JSON text according to their own needs, that is, trigger the conversion interface, generate a conversion instruction, so that the terminal device responds to the conversion instruction and displays the JSON text corresponding to the YAML text in the code interface. At this time, when the user chooses modeling, the JSON text can be directly converted into a JS object. The conversion method can use the js-yaml tool to convert JSON to YAML through the load method. The formula is as follows: json = f(yaml), and the specific code is: const jsonValue = jsyaml.load(yaml)||{}.

[0168] For example, see Fig.19The code interface diagram shown is Figure 3 Based on this, the code interface can also configure the code type and the YAML conversion JSON interface, where the code type indicates the type of the code of the current text. Fig.19 The code type in the above figure is YAML. When the user triggers the YAML to JSON interface, such as Fig.19 In the following figure, the code type is converted into JSON, and the YAML text content is converted into JSON text content.

[0169] In the embodiment of the present application, a code conversion method is provided. In this way, YAML text can be converted into JSON text, which is convenient for users to understand the code.

[0170] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, converting the first text into a first programming language object includes:

[0171] The second text is converted into a first programming language object.

[0172] In one or more embodiments, after the user converts the YAML text into JSON text, the text displayed on the current code interface is JSON text. When the user selects the current text for modeling, the JSON text can be directly converted into a JS object.

[0173] In the embodiment of the present application, an object conversion method is provided. Through the above method, JSON text can be converted into JS objects to improve the conversion efficiency.

[0174] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the method further includes:

[0175] In response to a conversion instruction for the second text on the code interface, the first text corresponding to the second text is displayed on the code interface according to the conversion instruction, and the second text uses a second data format.

[0176] In one or more embodiments, since YAML code is not easy to understand, the user can input JSON text, and then use the JSON conversion YAML interface configured by the terminal device in the code interface to convert the JSON text into YAML text, that is, trigger the conversion interface, generate a conversion instruction, so that the terminal device responds to the conversion instruction and displays the YAML text corresponding to the JSON text in the code interface. Among them, when the user inputs JSON text, if modeling is required, the JSON can be directly converted into a JS object. The conversion method can use the js-yaml tool to convert yaml to json through the load method. The formula is expressed as follows: yaml = f(json), and the specific code is: const yamlValue = jsyaml.dump(jsonObj,{lineWidth:-1}).

[0177] For example, see Fig. 20 Another code interface diagram shown in Fig.19 Based on this, the code interface can also configure the code type and the JSON conversion YAML interface, where the code type indicates the type of the code of the current text. Fig. 20 The code type in the above figure is JSON. When the user triggers the JSON to YAML interface, such as Fig. 20 In the following figure, the code type is converted into YAML, and the JSON text content is converted into YAML text content.

[0178] In the embodiment of the present application, a code conversion method is provided. Through the above method, the input JSON text can be converted into YAML text, which is convenient for users to edit the YAML text.

[0179] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the method further includes:

[0180] Get the code data in the code interface;

[0181] Performing format verification on the code data according to the data format of the code data to obtain a verification result;

[0182] Display the verification results on the code interface.

[0183] In one or more embodiments, for the code data input by the user into the code interface, the code data may be data in YAML format or data in JSON format. Based on the data format of the code data, code alignment and formatting, as well as basic format verification, may be automatically performed. If the input content does not conform to the corresponding format, a verification result may be generated, and then an error message may be given on the page, and the verification result may be displayed. That is, format verification is performed according to the YAML format for data in YAML format, and format verification is performed according to the JSON format for data in JSON format.

[0184] In the embodiment of the present application, a code verification method is provided. Through the above method, the input code data is verified in real time to improve the code quality.

[0185] The data editing device in this application is described in detail below. Fig.21 , Fig.21 This is a schematic diagram of an embodiment of a data editing device in an embodiment of the present application. The data editing device 210 includes:

[0186] An acquiring unit 2101 is configured to respond to a modeling request for a first text and acquire the first text according to the modeling request, wherein a first data format used by the first text is a key-value pair structure;

[0187] A conversion unit 2102, configured to convert the first text into a first programming language object;

[0188] The acquisition unit 2101 is further used to acquire modeling data of multiple first fields in the first programming language object, where the modeling data of each first field includes attribute data of each first field;

[0189] A display unit 2103, used to display modeling data of multiple first fields on the modeling interface;

[0190] The acquiring unit 2101 acquires attribute editing data of a second field on the modeling interface, the plurality of first fields includes the second field, and the attribute editing data includes data of a data type and data of an extended attribute corresponding to the data type;

[0191] The updating unit 2104 is used to update the modeling data of the second field according to the attribute editing data.

[0192] In an embodiment of the present application, a data editing device is provided. The above device is used to convert a first text into a first programming language object, and then add data types and extended attributes to the first programming language object, so that the data type of the field in the first text of the key-value pair structure can be edited and the corresponding extended attributes of the data type can be edited, that is, more logical functions are configured for the first text, so that the first text can carry more complex business logic and solve more complex scenario problems.

[0193] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the acquisition unit 2101 is further used for:

[0194] In response to an edit instruction for the second field on the modeling interface, displaying an edit window for the second field;

[0195] Get the data on the edit window as attribute edit data.

[0196] In an embodiment of the present application, a data editing device is provided. With the above device, after the modeling data of the second field is displayed on the modeling interface, an editing window pops up according to the editing instruction to obtain attribute editing data, and a method for inputting attribute editing data is provided through the pop-up window, so as to facilitate users to edit attribute data.

[0197] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the editing window includes basic attributes and extended attributes, and the basic attributes include data types, and one or more of fields, names, default values ​​or descriptions;

[0198] The acquisition unit 2101 is specifically used for:

[0199] The data of the basic attribute and the data of the extended attribute are obtained as the attribute editing data.

[0200] In an embodiment of the present application, a data editing device is provided. With the above device, a pop-up editing window is displayed to display various attributes of the second field, which is convenient for users to distinguish and edit attribute data.

[0201] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the device 210 further includes a deleting unit 2105, and the deleting unit 2105 is specifically used for:

[0202] In response to a deletion instruction for the third field, the modeling data of the third field in the modeling interface is deleted, and the plurality of first fields includes the third field.

[0203] In an embodiment of the present application, a data editing device is provided. By using the above device, an interface for deleting modeling data is provided to save storage space.

[0204] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the device 210 further includes a hiding unit 2106, and the hiding unit 2106 is specifically used for:

[0205] In response to a hiding instruction for a fourth field, modeling data of a fourth field in the modeling interface is hidden, and the plurality of first fields include the fourth field.

[0206] In an embodiment of the present application, a data editing device is provided. By using the above device, an interface for hiding modeling data on a modeling interface is provided, which can hide modeling data that does not need to be viewed, thereby speeding up the viewing efficiency of users.

[0207] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the device 210 further includes an adding unit 2107, and the adding unit 2107 is specifically used for:

[0208] In response to the adding instruction, displaying an adding window corresponding to the adding instruction;

[0209] Acquire the attribute data of the fifth field on the adding window as the attribute adding data, wherein the first text includes the fifth field;

[0210] Add data according to the attributes and display the modeling data of the fifth field on the modeling interface.

[0211] In an embodiment of the present application, a data editing device is provided. By using the above device, an interface for adding modeling data on a modeling interface is provided, and the modeling data of a field in the code can be viewed at any time, thereby improving the viewing efficiency of users.

[0212] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the adding unit 2107 is specifically used for:

[0213] Obtaining attribute names of a plurality of sixth fields in the first programming language object;

[0214] The attribute names of multiple sixth fields are converted into tree structure data and displayed in the adding window corresponding to the adding instruction, the multiple sixth fields include the fifth field, and the tree structure data includes the attribute name of each sixth field and an identifier indicating whether each sixth field is modeled.

[0215] In an embodiment of the present application, a data editing device is provided. With the above device, only the field name needs to be provided in the adding window, and the attribute data does not need to be displayed. The user can quickly filter all fields, thereby improving the adding efficiency.

[0216] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the adding unit 2107 is specifically used for:

[0217] Get the key-value pair information of the fifth field;

[0218] Determine the initial data type of the fifth field according to the value in the key-value pair information;

[0219] Add data by adding key-value pair information and initial data type to the attribute.

[0220] In an embodiment of the present application, a data editing device is provided. By using the above device, data types can be automatically configured according to the values ​​in the key-value pair information of the field, saving user editing time and improving user editing efficiency.

[0221] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the display unit 2103 is specifically used for:

[0222] The modeling data of the plurality of first fields are displayed in the form of a foldable frame.

[0223] In an embodiment of the present application, a data editing device is provided. By using the device, modeling data can be folded freely, saving display space of the modeling interface.

[0224] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the conversion unit 2102 is further used for:

[0225] In response to a conversion instruction for a first text on a code interface, a second text corresponding to the first text is displayed on the code interface according to the conversion instruction, and the second text uses a second data format.

[0226] In an embodiment of the present application, a data editing device is provided. By using the above device, YAML text can be converted into JSON text, which is convenient for users to understand the code.

[0227] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the conversion unit 2102 is specifically used for:

[0228] The second text is converted into a first programming language object.

[0229] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the conversion unit 2102 is further used for:

[0230] In response to a conversion instruction for the second text on the code interface, the first text corresponding to the second text is displayed on the code interface according to the conversion instruction, and the second text uses a second data format.

[0231] In an embodiment of the present application, a data editing device is provided. By using the above device, an input JSON text can be converted into a YAML text, which is convenient for users to edit the YAML text.

[0232] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the acquisition unit 2101 is further used for:

[0233] Get the code data in the code interface;

[0234] The device 210 further includes a verification unit 2108, which is specifically configured to:

[0235] Performing format verification on the code data according to the data format of the code data to obtain a verification result;

[0236] The display unit 2103 is also used for:

[0237] Display the verification results on the code interface.

[0238] In an embodiment of the present application, a data editing device is provided. The device is used to verify input code data in real time to improve code quality.

[0239] Optionally, in the above Fig.21 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 210 provided in the embodiment of the present application, the first data format is the data serialization format language YAML, the second data format is the Java script object notation JSON, and the first programming language object is a Java script JS object.

[0240] Fig. 22: This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 322 (for example, one or more processors) and a memory 332, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the node device. Furthermore, the central processing unit 322 can be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 300.

[0241] The computer device 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and / or one or more operating systems 341, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0242] The steps performed by the terminal device in the above embodiment can be based on the Fig.21 The computer device structure shown.

[0243] A computer-readable storage medium is also provided in an embodiment of the present application, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods described in the above embodiments are implemented.

[0244] A computer program product is also provided in an embodiment of the present application, including a computer program, which, when executed by a processor, implements the steps of the methods described in the above embodiments.

[0245] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0246] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0247] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0249] If the integrated unit is implemented in the form of a software functional unit and 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 the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0250] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data editing method, characterized in that: include: In response to a modeling request for a first text, obtaining the first text according to the modeling request, wherein a first data format used by the first text is a key-value pair structure; converting the first text into a first programming language object; Acquire modeling data of a plurality of first fields in the first programming language object, wherein the modeling data of each first field includes attribute data of each first field; Displaying the modeling data of the plurality of first fields on the modeling interface; Acquire attribute editing data of a second field on the modeling interface, each of the first fields includes the second field, and the attribute editing data includes data of a data type and data of an extended attribute corresponding to the data type; The modeling data of the second field is updated according to the attribute editing data.

2. The method according to claim 1, characterized in that The acquiring of the attribute editing data of the second field on the modeling interface comprises: In response to an edit instruction for the second field on the modeling interface, displaying an edit window for the second field; The data on the editing window is acquired as the attribute editing data.

3. The method according to claim 2, characterized in that The editing window includes basic attributes and extended attributes, the basic attributes include the data type, and one or more of the field, name, default value or description; The acquiring of the data on the editing window as the attribute editing data comprises: The data of the basic attribute and the data of the extended attribute are acquired as the attribute editing data.

4. The method according to claim 1, characterized in that After the modeling data of the plurality of first fields are displayed on the modeling interface, the method further includes: In response to a deletion instruction for a third field, modeling data of the third field in the modeling interface is deleted, and the plurality of first fields include the third field.

5. The method according to claim 1, characterized in that After the modeling data of the plurality of first fields are displayed on the modeling interface, the method further includes: In response to a hiding instruction for a fourth field, modeling data of the fourth field in the modeling interface is hidden, and the plurality of first fields include the fourth field.

6. The method according to claim 1, characterized in that The method further comprises: In response to the adding instruction, displaying an adding window corresponding to the adding instruction; Acquire the attribute data of the fifth field on the adding window as the attribute adding data, wherein the first text includes the fifth field; The modeling data of the fifth field is displayed on the modeling interface according to the attribute added data.

7. The method according to claim 6, characterized in that The adding window corresponding to the adding instruction includes: Obtaining attribute names of a plurality of sixth fields in the first programming language object; The attribute names of the multiple sixth fields are converted into tree structure data and displayed in the adding window corresponding to the adding instruction, wherein the multiple sixth fields include the fifth field, and the tree structure data includes the attribute name of each sixth field and an identifier indicating whether each sixth field is modeled.

8. The method according to claim 6, characterized in that The acquiring the attribute data of the fifth field on the adding window as the attribute adding data comprises: Obtain key-value pair information of the fifth field; Determine the initial data type of the fifth field according to the value in the key-value pair information; The attribute adding data is determined by the key-value pair information and the initial data type.

9. The method according to claim 1, characterized in that: The modeling data showing a plurality of first fields includes: The modeling data of the plurality of first fields are displayed in the form of a foldable frame.

10. The method according to claim 1, characterized in that The method further comprises: In response to a conversion instruction for the first text on a code interface, a second text corresponding to the first text is displayed on the code interface according to the conversion instruction, and the second text uses a second data format.

11. The method according to claim 10, characterized in that The converting the first text into a first programming language object comprises: The second text is converted into the first programming language object.

12. The method according to claim 1, characterized in that The method further comprises: In response to a conversion instruction for a second text in a code interface, the first text corresponding to the second text is displayed in the code interface according to the conversion instruction, and the second text uses a second data format.

13. The method according to claim 1, characterized in that The method further comprises: Get the code data in the code interface; Performing format verification on the code data according to the data format of the code data to obtain a verification result; The verification result is displayed on the code interface.

14. The method according to any one of claims 10 to 12, characterized in that: The first data format is the data serialization format language YAML, the second data format is the Java script object notation JSON, and the first programming language object is a Java script JS object.

15. A data editing device, characterized in that: include: an acquisition unit, configured to respond to a modeling request for a first text and acquire the first text according to the modeling request, wherein a first data format used by the first text is a key-value pair structure; a conversion unit, configured to convert the first text into a first programming language object; The acquisition unit is further used to acquire modeling data of a plurality of first fields in the first programming language object, wherein the modeling data of each first field includes attribute data of each first field; A display unit, used for displaying the modeling data of the plurality of first fields on the modeling interface; The acquiring unit acquires attribute editing data of a second field on the modeling interface, the plurality of first fields including the second field, the attribute editing data including data of a data type and data of an extended attribute corresponding to the data type; An updating unit is used to update the modeling data of the second field according to the attribute editing data.

16. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, including executing the method according to any one of claims 1 to 14; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

17. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 14.

18. A computer program product, characterized in that When the computer program product is executed on a computer, the computer performs the method according to any one of claims 1 to 14.