Visual configuration method and device based on JSON format, equipment and medium

By converting JSON format strings into primary data with upper and lower hierarchical structure relationships, and assigning operation permission values ​​according to role permission levels, the problem of complex permission management in JSON format in configuration management is solved, and refined permission management of upper and lower structured data is realized, and the efficiency and security of permission judgment are improved.

CN119538281APending Publication Date: 2025-02-28CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411573363.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing JSON format has complex permission management in configuration management, especially when the data volume is large or the table structure is not clear, permission judgment is inefficient.

Method used

By converting the JSON format string into primary data with upper and lower hierarchical structure relationships, the operation permission value is assigned to each layer of data according to the preset role permission level, and classification is made through the target user's role permission value and operation permission value, a visual configuration page is generated, and the configured JSON format string is finally generated.

Benefits of technology

It realizes refined management of functional operation permissions for superior and subordinate structured data, improves permission judgment efficiency, reduces the redundancy of intermediate data binding operations, and enhances the security of financial operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538281A_ABST
    Figure CN119538281A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a visual configuration method and device based on a JSON format, equipment and a medium, and the method comprises the steps: obtaining a to-be-configured JSON format character string, and converting the JSON format character string into primary data with more than one upper and lower hierarchical structure according to an upper and lower hierarchical structure relationship; distributing an operation authority value for the primary data according to a preset role authority level; obtaining a user role permission value and an operation permission value corresponding to the primary data, and classifying the primary data according to the two permission values; generating a visual configuration page according to the classification result and the operation authority value; and generating a configured JSON format character string according to the final configuration parameter and the primary data. According to the scheme, the problems that an existing JSON authority management technology is complex in authority management of function operation of upper-level and lower-level structured data, and the authority judgment efficiency is low under the condition that the data size is large or the table structure design is not clear are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a visualization configuration method, device, equipment and medium based on JSON format.

[0002] Background technology Currently, many application systems in the financial technology and healthcare fields use JSON (JavaScript Object Notation) format strings for background configuration. Although JSON format has been widely used in data exchange due to its lightweight and easy-to-parse features, its use in configuration management has obvious shortcomings.

[0003] At present, existing technologies can convert various JSON format text files with different structures into intuitive graphics. However, although such tools can clearly display the hierarchical structure of JSON format and visually modify related data, the permission management of functional operations of hierarchical structured data is relatively complicated. Usually, permission management is implemented using RBAC (Role-Based Access Control). Role-based access control is achieved by combining and binding roles, permissions, resources, etc. This permission management technology is relatively complex. When the data volume is large or the table structure design is not clear, it will lead to inefficient permission judgment. ‌ Summary of the invention The present invention provides a visual configuration method, device, equipment and medium based on the JSON format to solve the problem that the existing JSON permission management technology is relatively complicated in the permission management of functional operations of upper and lower structured data, and when the data volume is large or the table structure design is not clear, it will lead to low efficiency of permission judgment.

[0004] In a first aspect, a visualization configuration method based on JSON format is provided, including: Obtaining a JSON format string to be configured, determining an upper and lower hierarchical structure relationship in the JSON format string, and converting the JSON format string into primary data having one or more upper and lower hierarchical structures according to the upper and lower hierarchical structure relationship; According to the preset role authority level, the operation authority value is assigned to each primary data of the upper and lower hierarchical structures; Obtaining the role authority value of the target user and the operation authority value corresponding to each primary data of the upper and lower hierarchical structures, and classifying each primary data of the upper and lower hierarchical structures according to the role authority value and the operation authority value corresponding to the primary data; Generate a visual configuration page based on the classification results of the primary data and the operation authority values ​​corresponding to the primary data; According to the visual configuration page, the configuration parameters of the target user are obtained, and according to the configuration parameters and the primary data of the upper and lower hierarchical structures, a configured JSON format string is generated.

[0005] In a second aspect, a visual configuration device based on JSON format is provided, comprising: A data acquisition module, used to acquire a JSON format string to be configured, determine the upper and lower hierarchical structure relationship in the JSON format string, and convert the JSON format string into primary data having one or more upper and lower hierarchical structures according to the upper and lower hierarchical structure relationship; A permission configuration module, used to assign operation permission values ​​to the primary data of each upper and lower hierarchical structure according to a preset role permission level; A classification module is used to obtain the role authority value of the target user and the operation authority value corresponding to each primary data of the upper and lower hierarchical structure, and classify the primary data of each upper and lower hierarchical structure according to the role authority value and the operation authority value corresponding to the primary data; A visualization configuration module, used to generate a visualization configuration page according to the classification results of the primary data and the operation authority values ​​corresponding to the primary data; The result saving module is used to obtain the configuration parameters of the target user according to the visual configuration page, and generate a configured JSON format string according to the configuration parameters and the primary data of the upper and lower hierarchical structures.

[0006] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned JSON-based visualization configuration method when executing the computer program.

[0007] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the visualization configuration method based on the JSON format as described above are implemented.

[0008] In the scheme implemented by the above-mentioned visualization configuration method, device, computer equipment and medium based on JSON format, by converting the JSON format string into primary data with a hierarchical structure relationship, assigning an operation permission value to each layer of the primary data according to the preset role permission level, and classifying the primary data of each hierarchical structure by the obtained role permission value of the target user and the operation permission value corresponding to the primary data; generating a visualization configuration page according to the classification result of the primary data, and generating the configured JSON format string with the parameters and primary data after the final configuration. The present invention directly binds the user's role permission value to the data of each layer for operation permission, reducing the redundancy of the intermediate data binding operation, and then realizes the control of the operation range of the current data layer through the set relationship between the target user's role permission value and the operation permission value. The permission management scheme of the present invention only directly binds the operation permission value through the preset role permission level, which solves the problem that the permission management technology of the existing JSON is relatively complicated for the functional operation of the upper and lower structured data, and when the data volume is large or the table structure design is not clear, it will lead to the problem of low efficiency of permission judgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0010] Figure 1 It is a schematic diagram of an application environment of a visual configuration method based on JSON format in one embodiment of the present invention; Figure 2 It is a flow chart of a visualization configuration method based on JSON format in one embodiment of the present invention; Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S12; Figure 4 It is a structural diagram of a visualization configuration device based on JSON format in one embodiment of the present invention; Figure 5 is a schematic diagram of a structure of a computer device in one embodiment of the present invention; Figure 6 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0011] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0012] The visualization configuration method based on JSON format provided in the embodiment of the present invention can be applied in the following aspects: Figure 1 In an application environment, the client communicates with the server through a network, the target user inputs a json string and displays a visual configuration operation on the client, and the server can perform corresponding command operations on the current json string after receiving the target user configuration operation command through the client. The client can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.

[0013] See also Figure 2 As shown, Figure 2 A flowchart of a visualization configuration method based on JSON format provided by an embodiment of the present invention includes the following steps: S10: Acquire a JSON format string to be configured, determine an upper and lower hierarchical structure relationship in the JSON format string, and convert the JSON format string into primary data having one or more upper and lower hierarchical structures according to the upper and lower hierarchical structure relationship.

[0014] In step S10, JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy for humans to read and write, and easy for machines to parse and generate. It is based on a subset of JavaScript, but JSON is language independent, and many programming languages ​​support the generation and parsing of JSON format data. Among them, a JSON format string usually contains the following basic structures: Object: Surrounded by curly braces {}, contains a set of unordered key-value pairs, each separated by a comma. The key is a string surrounded by double quotes, and the value can be a string, number, object, array, Boolean true or false, or null.

[0015] Array: Surrounded by square brackets [], it contains an ordered set of values, each separated by a comma. The value can be any data type supported by JSON, including objects, arrays, strings, numbers, Boolean values, or null.

[0016] String: Enclosed in double quotes ", it can contain escape characters such as \n (newline), \t (tab), \" (double quote), etc.

[0017] Number: can be an integer or floating point number. Octal and hexadecimal are not supported.

[0018] Boolean: true or false.

[0019] Null value: null.

[0020] The following is an example of a JSON format string: { "name":"John Doe", "age":30, "isEmployed":true, "address":{ "street":"123 Main St", "city":"Anytown", "state":"CA", "zip":"12345" }, "phoneNumbers":[ { "type":"home", "number":"555-1234" }, { "type":"work", "number": "555-5678" } ], "hobbies":["reading","cycling",null], "registrationDate":"2023-10-01T14:48:00Z" } In this example: "name" is a string value. "age" is a number value. "isEmployed" is a boolean value. "address" is an object containing multiple key-value pairs. "phoneNumbers" is an array containing two objects. "hobbies" is an array containing strings and a null value. "registrationDate" is a string representing a date and time in ISO 8601 format.

[0021] The hierarchical structure relationship in the JSON format string refers to the hierarchical structure relationship of data in the JSON format string, which is represented by nested objects and arrays. This structure allows data to be organized in a hierarchical manner, so that complex data sets can be clearly expressed. The main things to understand are the top-level objects, nested objects, nested arrays, and hierarchical depth in the hierarchical structure relationship. The specific explanations are as follows: Top-level objects in a hierarchical structure: A JSON string usually starts with an object enclosed in curly braces {}, which can be seen as a top-level container for data. It contains a series of key-value pairs, where the key is a string and the value can be a string, a number, a Boolean value, null, another object, or an array.

[0022] Nested objects in a hierarchy: In a top-level object or any other object, a value can be a new object. This nested object structure allows data to be organized into more complex hierarchies. For example, an object containing user information might have an "address" field whose value is itself an object containing information such as street, city, state, and zip code.

[0023] Nested arrays in a hierarchical relationship: Arrays are represented in JSON with square brackets [] and contain a series of values. These values ​​can be any data type supported by JSON, including strings, numbers, Booleans, null, objects, or another array. Arrays allow data to be represented in the form of an ordered list, and each element in the list can have its own type and structure.

[0024] Hierarchical depth in the upper-lower hierarchical structure relationship: The hierarchical depth of JSON data can be arbitrarily deep as long as it conforms to the JSON syntax rules. For example, an object can contain an array, each element in the array is an object, and these objects can contain their own arrays and objects, and so on.

[0025] Parsing a JSON string into hierarchical primary data usually means converting JSON formatted text into a data structure that is easy to manipulate and access in a programming language. In most programming languages, this data structure usually appears in the form of objects (dictionaries / hash tables), linked lists, and trees.

[0026] In this embodiment, the JSON object is converted into a tree data structure with an upper and lower hierarchical structure. A tree is a typical nonlinear structure, which is a hierarchical set of n (n>0) finite nodes. It is called a "tree" because this data structure looks like an upside-down tree, except that the root is on the top and the leaves are on the bottom. The tree data structure has the following characteristics: each node has only a finite number of child nodes or no child nodes; a node without a parent node is called a root node; each non-root node has one and only one parent node; except for the root node, each child node can be divided into multiple non-intersecting subtrees. This parsed tree data structure is the so-called "primary data of the upper and lower hierarchical structure", which allows easy access and manipulation of various parts of the JSON data programmatically.

[0027] Specifically, after the target user logs in to the front-end configuration page, the front-end configuration page is divided into two columns, the left column of the front-end configuration page will have a string input box, the user can paste and copy the json string to be configured into the input box, or select the existing json format string configuration template through the drop-down list selection method for input; after entering the json format string to be configured, the back-end code uses the built-in function JSON.parse() in JavaScript to parse the JSON string into a JavaScript object. To ensure the correctness of the data, a recursive algorithm is used in this embodiment to parse the nested structure data in the JSON string layer by layer, and convert the JavaScript object into a tree data structure with an upper and lower hierarchical structure. Among them, each node in the tree data structure should contain key, value, type and its child nodes, etc., and its data type can be string, number, object, etc.

[0028] S11: Allocate operation permission values ​​to the primary data of each upper and lower hierarchical structure according to the preset role permission level.

[0029] Specifically, in this embodiment, the role authority levels are divided into level 1 and level 2, and level 2 is greater than level 1. When the above recursive algorithm is used to parse the nested structure data in the JSON string layer by layer, the pre-assigned operation authority value will be loaded in by loading the memory data, and then an operation authority field will be added to the primary data of each upper and lower hierarchical structure (that is, each "{}"), and the corresponding operation authority value will be assigned; if the operation authority value is not assigned in advance when the memory is loaded with data, the program will automatically add an operation authority field to the primary data of each upper and lower hierarchical structure (that is, each "{}"), and initialize and assign a minimum level of operation authority value of level 1, that is, users of all role authority levels can operate on the primary data.

[0030] S12: Obtain the role authority value of the target user, and obtain the operation authority value corresponding to each primary data of the upper and lower hierarchical structures, and classify the primary data of each upper and lower hierarchical structure according to the role authority value and the operation authority value corresponding to the primary data.

[0031] Specifically, based on the above-mentioned role permission level setting, the role permission value of the target user is the user who logs in to the current configuration page. Users need to register a username and password before logging in to the configuration page. When the user registers, the system will assign a role permission value to the user, and the larger the user's role permission value, the greater the user's operation range on the current page data.

[0032] After the target user logs in to the configuration page, the backend code will first obtain the role permission value of the target user, and then obtain the operation permission value corresponding to the operation permission field set for each layer of data in the initial data. Before displaying the data, the front-end page will determine the style and corresponding operation buttons of the primary data of each upper and lower hierarchical structure when displayed on the page based on the set relationship between the role permission value and the operation permission value.

[0033] S13: Generate a visualization configuration page according to the classification result of the primary data and the operation authority value corresponding to the primary data.

[0034] In this embodiment, the primary data of the tree structure containing the classification results and the operation permission values ​​corresponding to the primary data are dynamically generated in a configuration form on the right side of the front-end configuration page through a front-end framework (such as React or Vue.js) for visual configuration display.

[0035] Dynamic forms refer to the process of dynamically generating or modifying form fields based on specific conditions or user interactions. To implement dynamic forms on the front end, you first need to use HTML, CSS, and JavaScript to build the basic form structure and style. Next, write code using JavaScript to listen for change events and dynamically add, delete, or modify form fields. Dynamic forms can be implemented by manipulating DOM elements and using various front-end frameworks (such as React, Vue, etc.). Each item in the form corresponds to a key-value pair in JSON, where the key is displayed as a read-only label and the value is displayed as an editable input box. A front-end framework is a collection of pre-written JavaScript code that helps developers quickly build the interface and interaction logic of a web application.

[0036] In addition, in order to clearly display the hierarchical relationship between data, support expansion and collapse operations, and facilitate users to understand and operate complex data structures, this embodiment uses a tree component, also known as a tree control (such as AntDesign's Tree component or Vue's TreeView). A tree control is a control for displaying data with a hierarchical relationship. In this embodiment, a tree control is used to intuitively display the hierarchical structure of a JSON object, and users can expand or collapse different levels to view and edit nested data.

[0037] This embodiment also uses two-way data binding technology to ensure that when the user modifies the content of the value input box, the JSON object is updated synchronously. Two-way data binding refers to the bidirectional association of data in the view (user interface) with data in the model (business logic). When the data in the view changes, the data in the model will also be updated; similarly, when the data in the model changes, the data in the view will also be updated. This association is automatic, and there is no need to manually write a lot of code to maintain this association. The implementation of two-way data binding may vary depending on different frameworks and technologies. For example, in React, the onChange event is used to implement two-way data binding; in Vue, the v-model directive is used to implement two-way data binding.

[0038] S14: According to the visual configuration page, the configuration parameters of the target user are obtained, and according to the configuration parameters and the primary data of the upper and lower hierarchical structures, a configured JSON format string is generated.

[0039] After the target user makes corresponding modifications to the configuration parameter value in the current json format string in the visual configuration page in the right column, the backend code will update the latest value, key and type to the original json string in the left column, but will filter out the operation permission field. The operation permission field will be saved separately in the corresponding configuration template string for subsequent users to use. The target user can finally copy and use the modified json string in the input box in the left column.

[0040] The pseudo code implementation of the above steps S10 to S14 is as follows: / / Parse the JSON string and add the permission field function parseJsonWithPermissions(jsonString) { const jsonObject = JSON.parse(jsonString); addPermissionsToTree(jsonObject); return jsonObject; } / / Recursively add permission fields to each level of objects function addPermissionsToTree(obj) { for (const key in obj) { if (typeof obj[key] === 'object'&&!Array.isArray(obj[key])) { / / Add permission field, default is 1 obj[key].permissions = 1; addPermissionsToTree(obj[key]); } else if (Array.isArray(obj[key])) { obj[key].forEach(item =>{ if (typeof item === 'object') { item.permissions = 1; addPermissionsToTree(item); }}); } } } / / Parse JSON into a tree structure and render it as UI function renderJsonTree(obj, container) { for (const key in obj) { const value = obj[key]; if (typeof value === 'object'&&!Array.isArray(value)) { renderKeyValueUI(key, value, container); renderJsonTree(value, container); / / Recursively render children } else { renderKeyValueUI(key, value, container); } } } / / Render key-value pair UI elements function renderKeyValueUI(key, value, container) { const row = document.createElement('div'); const keyElement = document.createElement('span'); keyElement.innerText = key; keyElement.style.fontWeight = 'bold'; const valueElement = document.createElement('input'); valueElement.type = 'text'; valueElement.value = typeof value === 'object' ? JSON.stringify(value) : value; row.appendChild(keyElement); row.appendChild(valueElement); container.appendChild(row); } / / Used to finally generate a JSON string function generateJsonStringFromTree(jsonObject) { return JSON.stringify(jsonObject); } / / Example usage const container = document.getElementById('jsonTreeContainer'); const jsonString = '{"name": "Example", "data": {"key": "value"}}'; const jsonObject = parseJsonWithPermissions(jsonString); renderJsonTree(jsonObject, container); const finalJsonString = generateJsonStringFromTree(jsonObject); console.log(finalJsonString); The present invention is based on the visual configuration method of JSON format, and by setting an additional permission control field in each JSON body (i.e., in each {}), it is convenient to control the permission of each object in each JSON string. Only users whose login user permission items match can modify and operate the JSON body at this level, otherwise it is locked, thereby realizing the refined permission configuration of all data permission control and improving the security of financial operations.

[0041] In one embodiment, the primary data of each upper and lower hierarchical structure is classified according to the role authority value and the operation authority value corresponding to the primary data, including: When the role authority value is less than the operation authority value corresponding to the primary data, the primary data of the corresponding hierarchical structure is classified as primary data of an inoperable category.

[0042] When the role authority value is not less than the operation authority value corresponding to the primary data, the primary data of the corresponding hierarchical structure is classified into primary data of an operable category.

[0043] The operable primary data in this embodiment refers to data that the target user can add, delete, or modify after logging into the configuration page, relative to the target user's role permissions. The inoperable primary data refers to data that the target user is not allowed to add, delete, or modify after logging into the configuration page, relative to the target user's role permissions, and only allows the current user to browse and view the data.

[0044] Specifically, Figure 3 As shown, the primary data of each upper and lower hierarchical structure are classified according to the role authority value of the current target user and the operation authority value corresponding to the primary data. When the role authority value of the target user is less than the operation authority value corresponding to the primary data of the current layer, the primary data of the current layer is classified as primary data of an inoperable category, that is, addition, deletion, and modification operations cannot be performed; when the role authority value of the target user is not less than the operation authority value corresponding to the primary data of the current layer, the primary data of the current layer is classified as primary data of an operable category, that is, addition, deletion, and modification operations can be performed.

[0045] In one embodiment, when all the primary data are primary data of the actionable category, they include: A visual configuration page is generated based on the primary data of all upper and lower hierarchical structures and the operation permission values ​​corresponding to the primary data.

[0046] Specifically, when the back-end program determines that all current primary data are primary data of the operational category, that is, all data can be added, deleted, and modified, all current initial data and primary data corresponding to the operation permission values ​​will be marked as permissions that can be added, deleted, and modified. When the front-end page is displayed, the value of such data will be displayed as a state that can be added, deleted, and modified, that is, an add or delete button is set behind the value input box, and the color of the input box is not gray, which allows editing and modification.

[0047] In one embodiment, when the primary data portion is primary data of an operational type, it includes: A visualization configuration page is generated according to the primary data of the operable category and the primary data of the inoperable category, and the operation authority values ​​corresponding to the primary data.

[0048] Specifically, when the back-end program determines that part of the current primary data is primary data of an operable category, that is, part of the data can be added, deleted, and modified, and part of the data cannot be added, deleted, and modified, the operation permission values ​​corresponding to the current partial operable initial data and the partial operable primary data will be marked as permissions for adding, deleting, and modifying. When the front-end page is displayed, the value values ​​of such data will be displayed as a state where they can be added, deleted, and modified, that is, add and delete buttons will be set behind the value input box, and the color of the input box will not be gray, indicating that they can be edited and modified; and the operation permission values ​​corresponding to the remaining initial data of the inoperable class and the remaining primary data will be marked as permissions for browsing and viewing. When the front-end page is displayed, the value values ​​of such data will be displayed as a browsing state, that is, no add and delete buttons will be set behind the value input box, and the color of the input box will be gray, indicating that they cannot be edited and modified.

[0049] In one embodiment, when all primary data are inoperable primary data, it includes: A visual configuration page is generated according to the primary data of all the inoperable categories and the operation authority values ​​corresponding to the primary data.

[0050] Specifically, when the back-end program determines that all current primary data are inoperable primary data, that is, all data cannot be added, deleted, or modified, all current initial data and primary data corresponding to the operation permission values ​​will be marked as browsing-only permissions. When the front-end page is displayed, the value of such data will be displayed as a browsing state, that is, no add or delete button is set behind the value input box, and the color of the input box is gray, and it cannot be edited or modified.

[0051] In one embodiment, according to a preset role authority level, assigning an operation authority value to each primary data of the hierarchical structure includes: The role authority value of the target user at the role authority level is obtained, and the modification range of the operation authority value of the target user is determined according to the role authority value; the modification range includes: the modified operation authority value is not greater than the role authority value of the target user.

[0052] Specifically, the system will uniformly divide the role permissions of all users. For example, the role permission levels in this embodiment are divided into level 1 and level 2. The permission value of level 2 is greater than that of level 1. The role permission value of the target user belongs to one of the values ​​in the role permission level. The user's operation behavior includes: changing the business field structure and value adjustment (i.e., adding, deleting, and modifying) and changing the operation permission value. The target user cannot change the operation permission value to a value higher than his own role permission value. For example, a target user with a role permission value of 2 can change the operation permission value of the corresponding layer of data to 1 or 2, but a target user with a role permission value of 1 can only change the corresponding data operation permission value to 1.

[0053] When the target user with a role permission value of 1 modifies the operation permission value of the data at the corresponding layer, the operation permission value can only be changed to 1 or a lower level operation, and the business field structure and value adjustment operations with an operation permission value of 1 can be changed.

[0054] When the target user with a role permission value of 2 modifies the operation permission value of the data at the corresponding layer, the operation permission value can be changed to 2 or a lower level, and the business field structure and value adjustment of the operation permission value not greater than 2 can also be changed. For example, when the operation permission value of the data at the corresponding layer is changed from 1 to 2, the user with a role permission value of level 1 will no longer be able to change the business field structure and value adjustment of the data at that layer.

[0055] Based on the user's role permissions and operation permissions, decide which configuration items are editable and which are read-only, and set different permission policies for different user roles. For example, administrators can add or delete all configuration items, while ordinary users can only view or edit some configurations, thereby achieving refined permission configuration and improving the security of financial operations.

[0056] In one embodiment, the visualization configuration method based on JSON format of the present invention further includes: Get the configuration template instruction of the target user and save the configured JSON format string as a configuration template.

[0057] Acquiring the JSON format string to be configured includes: acquiring the JSON format string in the configuration template.

[0058] Specifically, the configuration template means that when the target user configures the newly added functional area, he can modify and reconfigure it through the data style of the previously configured json format string. The target user can save the configured JSON string as a configuration template by choosing. The configuration template will contain a field for operation permissions, so that subsequent users can select the corresponding template from the configuration template list for quick configuration. Operation permissions can prevent subsequent operation users from making any modifications to the configuration template.

[0059] When the target user configures a new function module, the data needs to be configured from scratch. If a JSON template with a similar structure can be selected from the page configuration template list, the configuration operation process can be completed quickly.

[0060] In one embodiment, a visualization configuration device based on JSON format is provided, and the visualization configuration device based on JSON format corresponds one-to-one to the visualization configuration method based on JSON format in the above embodiment. Figure 4 As shown, the visualization configuration device includes a data acquisition module 101, a permission configuration module 102, a classification module 103, a visualization configuration module 104, and a result storage module 105. The detailed description of each functional module is as follows: The data acquisition module 101 is used to acquire a JSON format string to be configured, determine the upper and lower hierarchical structure relationship in the JSON format string, and convert the JSON format string into primary data with more than one upper and lower hierarchical structure according to the upper and lower hierarchical structure relationship.

[0061] The authority configuration module 102 is used to allocate operation authority values ​​to the primary data of each upper and lower hierarchical structure according to a preset role authority level.

[0062] The classification module 103 is used to obtain the role authority value of the target user and the operation authority value corresponding to each primary data of the upper and lower hierarchical structure, and classify the primary data of each upper and lower hierarchical structure according to the role authority value and the operation authority value corresponding to the primary data.

[0063] The visualization configuration module 104 is used to generate a visualization configuration page according to the classification result of the primary data and the operation authority value corresponding to the primary data.

[0064] The result saving module 105 is used to obtain the configuration parameters of the target user according to the visual configuration page, and generate a configured JSON format string according to the configuration parameters and the primary data of the upper and lower hierarchical structures.

[0065] In one embodiment, the classification module 103 is specifically configured to: When the role authority value is less than the operation authority value corresponding to the primary data, the primary data corresponding to the hierarchical structure is classified as primary data of an inoperable category.

[0066] When the role authority value is not less than the operation authority value corresponding to the primary data, the primary data corresponding to the hierarchical structure is classified into primary data of an operable category.

[0067] In one embodiment, the classification module 103 is specifically configured to: When all primary data are of actionable categories, they include: A visual configuration page is generated based on all the primary data of the upper and lower hierarchical structures and the operation authority values ​​corresponding to the primary data.

[0068] In one embodiment, the classification module 103 is specifically configured to: When the primary data is partly operational data, it includes: A visualization configuration page is generated according to the primary data of the operable category and the primary data of the inoperable category, and the operation authority values ​​corresponding to the primary data.

[0069] In one embodiment, the classification module 103 is specifically configured to: When all primary data are inoperable primary data, including: A visual configuration page is generated according to the primary data of all the inoperable categories and the operation authority values ​​corresponding to the primary data.

[0070] In one embodiment, the permission configuration module 102 is specifically used to: The allocating operation permission values ​​to the primary data of each hierarchical structure according to the preset role permission level includes: Obtain the role authority value of the target user at the role authority level, and determine the modification range of the operation authority value of the target user according to the role authority value; the modification range includes: the modified operation authority value is not greater than the role authority value of the target user.

[0071] In one embodiment, the data acquisition module 101 is specifically used for: Get the configuration template instruction of the target user, and save the configured JSON format string as a configuration template.

[0072] The obtaining of the JSON format string to be configured includes: obtaining the JSON format string in the configuration template.

[0073] The present invention provides a visual configuration device based on JSON format, which converts a JSON format string into primary data with a hierarchical structure relationship, assigns an operation permission value to each layer of the primary data according to a preset role permission level, and classifies the primary data of each hierarchical structure according to the obtained role permission value of the target user and the operation permission value corresponding to the primary data; generates a visual configuration page according to the classification result of the primary data, and generates a configured JSON format string with the parameters and primary data after the final configuration. The present invention directly binds the user's role permission value to the data of each layer for operation permission, reduces the redundancy of the intermediate data binding operation, and then realizes the control of the operation range of the current data layer through the set relationship between the target user's role permission value and the operation permission value. The permission management scheme of the present invention only directly binds the operation permission value through the preset role permission level, which solves the problem that the permission management technology of the existing JSON is relatively complicated for the functional operation of the upper and lower structured data, and when the data volume is large or the table structure design is not clear, it will lead to the problem of low efficiency of permission judgment.

[0074] For the specific definition of the visualization configuration device based on JSON format, please refer to the definition of the visualization configuration method based on JSON format above, which will not be repeated here. Each module in the above-mentioned visualization configuration device based on JSON format can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0075] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side visual configuration method based on the JSON format.

[0076] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a client side of a visual configuration method based on the JSON format.

[0077] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: A JSON format string to be configured is obtained, an upper and lower hierarchical structure relationship in the JSON format string is determined, and the JSON format string is converted into primary data having one or more upper and lower hierarchical structures according to the upper and lower hierarchical structure relationship.

[0078] According to the preset role authority level, an operation authority value is allocated to each primary data of the upper and lower hierarchical structures.

[0079] The role authority value of the target user is obtained, and the operation authority value corresponding to each primary data of the upper and lower hierarchical structures is obtained, and the primary data of each upper and lower hierarchical structure is classified according to the role authority value and the operation authority value corresponding to the primary data.

[0080] A visualization configuration page is generated based on the classification results of the primary data and the operation authority values ​​corresponding to the primary data.

[0081] According to the visual configuration page, the configuration parameters of the target user are obtained, and according to the configuration parameters and the primary data of the upper and lower hierarchical structures, a configured JSON format string is generated.

[0082] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: A JSON format string to be configured is obtained, an upper and lower hierarchical structure relationship in the JSON format string is determined, and the JSON format string is converted into primary data having one or more upper and lower hierarchical structures according to the upper and lower hierarchical structure relationship.

[0083] According to the preset role authority level, an operation authority value is allocated to each primary data of the upper and lower hierarchical structures.

[0084] The role authority value of the target user is obtained, and the operation authority value corresponding to each primary data of the upper and lower hierarchical structures is obtained, and the primary data of each upper and lower hierarchical structure is classified according to the role authority value and the operation authority value corresponding to the primary data.

[0085] A visualization configuration page is generated based on the classification results of the primary data and the operation authority values ​​corresponding to the primary data.

[0086] According to the visual configuration page, the configuration parameters of the target user are obtained, and according to the configuration parameters and the primary data of the upper and lower hierarchical structures, a configured JSON format string is generated.

[0087] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0088] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0089] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0090] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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 invention, and should all be included in the protection scope of the present invention.

Claims

1. A visualization configuration method based on JSON format, characterized in that: include: Obtaining a JSON format string to be configured, determining an upper and lower hierarchical structure relationship in the JSON format string, and converting the JSON format string into primary data having one or more upper and lower hierarchical structures according to the upper and lower hierarchical structure relationship; According to the preset role authority level, the operation authority value is assigned to each primary data of the upper and lower hierarchical structures; Obtaining the role authority value of the target user and the operation authority value corresponding to each primary data of the upper and lower hierarchical structures, and classifying each primary data of the upper and lower hierarchical structures according to the role authority value and the operation authority value corresponding to the primary data; Generate a visual configuration page based on the classification results of the primary data and the operation authority values ​​corresponding to the primary data; According to the visual configuration page, the configuration parameters of the target user are obtained, and according to the configuration parameters and the primary data of the upper and lower hierarchical structures, a configured JSON format string is generated.

2. The visualization configuration method based on JSON format as claimed in claim 1, characterized in that: The classifying the primary data of each upper and lower hierarchical structure according to the role authority value and the operation authority value corresponding to the primary data includes: When the role authority value is less than the operation authority value corresponding to the primary data, the primary data corresponding to the hierarchical structure is classified as primary data of an inoperable category; When the role authority value is not less than the operation authority value corresponding to the primary data, the primary data corresponding to the hierarchical structure is classified into primary data of an operable category.

3. The visualization configuration method based on JSON format as claimed in claim 2, characterized in that: When all primary data are of actionable categories, they include: A visual configuration page is generated based on all the primary data of the upper and lower hierarchical structures and the operation authority values ​​corresponding to the primary data.

4. The JSON-based visualization configuration method according to claim 2, characterized in that When the primary data is partly operational data, it includes: A visualization configuration page is generated according to the primary data of the operable category and the primary data of the inoperable category, and the operation authority values ​​corresponding to the primary data.

5. The JSON-based visualization configuration method according to claim 2, characterized in that When all primary data are inoperable primary data, including: A visual configuration page is generated according to the primary data of all the inoperable categories and the operation authority values ​​corresponding to the primary data.

6. The visualization configuration method based on JSON format as claimed in claim 1, characterized in that: The allocating operation permission values ​​to the primary data of each hierarchical structure according to the preset role permission level includes: Obtain the role authority value of the target user at the role authority level, and determine the modification range of the operation authority value of the target user according to the role authority value; the modification range includes: the modified operation authority value is not greater than the role authority value of the target user.

7. The visualization configuration method based on JSON format as claimed in claim 1, characterized in that: Also includes: Obtain the configuration template instruction of the target user, and save the configured JSON format string as a configuration template; The obtaining of the JSON format string to be configured includes: obtaining the JSON format string in the configuration template.

8. A visual configuration device based on JSON format, characterized in that: include: A data acquisition module is used to acquire a JSON format string to be configured, determine the upper and lower hierarchical structure relationship in the JSON format string, and convert the JSON format string into primary data having one or more upper and lower hierarchical structures according to the upper and lower hierarchical structure relationship; A permission configuration module, used to assign operation permission values ​​to the primary data of each upper and lower hierarchical structure according to a preset role permission level; A classification module is used to obtain the role authority value of the target user and the operation authority value corresponding to each primary data of the upper and lower hierarchical structure, and classify the primary data of each upper and lower hierarchical structure according to the role authority value and the operation authority value corresponding to the primary data; A visualization configuration module, used to generate a visualization configuration page according to the classification results of the primary data and the operation authority values ​​corresponding to the primary data; The result saving module is used to obtain the configuration parameters of the target user according to the visual configuration page, and generate a configured JSON format string according to the configuration parameters and the primary data of the upper and lower hierarchical structures.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the visualization configuration method based on the JSON format as claimed in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the visualization configuration method based on the JSON format as claimed in any one of claims 1 to 7 are implemented.