Configuration Method, Device, Storage Medium and Computer Device for Data Model

By configuring the model project information and extended configuration information of the data model on the model editing page, the problem of complex and inefficient modification of the data model in the prior art is solved, and the dynamic expansion and reliability of the data model are achieved.

CN114356304BActive Publication Date: 2025-06-24YGSOFT INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111670776.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-06-24
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In the prior art, modifying the data model is complex and inefficient, which leads to difficulty in repeated development and maintenance of functions. It requires manual judgment and testing to ensure normal functions.

Method used

Configure the model project information of the data model through the model editing page, and display the extension configuration page based on the user's extension instructions. The user configures the extension configuration information on this page, and after completion, the information is stored in the database.

Benefits of technology

The dynamic expansion of the data model is realized, and there is no need to modify the code, which saves functional coding and testing time, avoids data model capability defects caused by differences in personal programming capabilities, and ensures the reliability of the data model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356304B_ABST
    Figure CN114356304B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method, apparatus, storage medium, and computer device for configuring a data model, relating to the field of data processing. When developing an application based on a data model, the present application dynamically expands the service capabilities of the data model based on a graphical interface, without the need to modify the data model by modifying code, saving the time of the functional coding link and the testing time of the code, avoiding defects in the data model capabilities caused by differences in personal programming capabilities during functional coding, and ensuring the reliability of the use of the data model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular, to a method, device, storage medium, and computer device for configuring a data model. Background Art

[0002] In the implementation process of software development using a data model, the behaviors, rules, and business logics required by data models designed according to different requirements vary greatly; developers need to code to implement differentiated processing logics according to specific requirements, which inevitably leads to problems such as duplicate function development and difficult maintenance. Manual judgment and repeated verification through testing are required to ensure normal functions, and the code of the data model needs to be directly modified, which has problems of relatively complex operations and low efficiency. Summary of the Invention

[0003] This application provides a method, device, storage medium, and computer device for configuring a data model, which can solve the problems of complex operations and low efficiency in modifying a data model in the prior art. The technical solutions are as follows:

[0004] In a first aspect, this application provides a method for configuring a data model, the method including:

[0005] Configuring model project information of a data model through a model editing page;

[0006] Based on an extension instruction of a user, displaying an extension configuration page of the data model;

[0007] Configuring extension configuration information on the extension configuration page based on a configuration instruction of the user;

[0008] After configuration is completed, obtaining extension configuration information on the extension configuration page;

[0009] Storing the model project information and the extension configuration information into a database.

[0010] In a second aspect, this application provides a device for configuring a data model, the device including:

[0011] An editing unit, configured to configure model project information of a data model through a model editing page;

[0012] A triggering unit, configured to display an extension configuration page of the data model based on an extension instruction of a user;

[0013] An extension unit, configured to configure extension configuration information on the extension configuration page based on a configuration instruction of the user;

[0014] An obtaining unit, configured to obtain extension configuration information on the extension configuration page after configuration is completed;

[0015] A storage unit for storing the model item information and the extended configuration information into a database.

[0016] In a third aspect, the present application provides a computer storage medium storing multiple instructions, which are adapted to be loaded and executed by a processor to perform the above method steps.

[0017] In a fourth aspect, the present application provides a computer device, which may include: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the above method steps.

[0018] The beneficial effects brought by the technical solutions provided in some embodiments of the present application at least include:

[0019] When performing application development based on a data model, the service capabilities of the data model are dynamically extended based on a graphical interface, without the need to modify the data model by modifying code, saving the time of the functional coding link and the testing time of the code, avoiding defects in the data model capabilities caused by differences in personal programming abilities during functional coding, and ensuring the reliability of the use of the data model. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0021] Figure 1 It is a schematic flowchart of the configuration method of the data model provided by the present application;

[0022] Figure 2 It is a schematic diagram of the model editing page provided by the present application;

[0023] Figure 3 It is a schematic diagram of the extended configuration page provided by the present application;

[0024] Figure 4 It is a schematic diagram of the interface of the configured model item information and extended configuration information provided by the present application;

[0025] Figure 5 The configuration interface diagram of the centralized cache provided by the present application;

[0026] Figure 6 It is a schematic structural diagram of a configuration device of a data model provided by the present application;

[0027] Figure 7 This is a schematic structural diagram of a computer device provided by the present application. Specific implementation manners

[0028] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe in detail the embodiments of the present application in conjunction with the accompanying drawings.

[0029] It should be noted that the method for configuring the data model provided by the present application is generally executed by a computer device. Correspondingly, the device for configuring the data model is generally disposed in the computer device.

[0030] When the computer device is hardware, a display device and a camera may also be installed thereon. The display device may be various devices capable of implementing a display function, and the camera is used to collect a video stream. For example, the display device may be a cathode ray tube display (CR for short), a light-emitting diode display (LED for short), an electronic ink screen, a liquid crystal display (LCD for short), a plasma display panel (PDP for short), etc. A user may use the display device on the computer device to view information such as text, pictures, and videos displayed.

[0031] The following will be combined with the attached Figure 1 , and a method for configuring a data model provided by an embodiment of the present application will be introduced in detail. Among them, the device for configuring the data model in the embodiment of the present application may be Figure 1 the computer device shown.

[0032] Please refer to Figure 1 , which is a schematic flowchart of a method for configuring a data model provided by an embodiment of the present application. As Figure 1 shown, the method of the embodiment of the present application may include the following steps:

[0033] S101. Configure the model item information of the data model through a model editing page.

[0034] Among them, the terminal device displays the model editing page through a display unit, and the user performs an interaction operation through the model editing page to configure the model item information. The number of model item information in a data model is one or more, and the model item information is used to describe the data structure and data type in the data model.

[0035] For example, refer to Figure 2The schematic diagram of the interface shown, the model editing page includes multiple controls and a model item table. The model item table includes multiple entries, each row is an entry, and an entry is a model item information. The model item information includes a project title, a project name, a data type, etc. The multiple controls include: a new control, an insert control, a move up control, and a move down control. The new control is used to create a data model. The insert control is used to insert a new entry into the data item table. The move up control is used to move the selected entry up one row by the user. The move down control is used to move the selected entry down one row by the user to adjust the position of the entry. The selected entry is displayed in a highlighted manner.

[0036] In one or more possible embodiments, before S101, the terminal device displays a model attribute configuration page based on the user's model creation instruction. The creation instruction is triggered by the user through an input device. The input device can be a mouse, a keyboard, a touch screen, etc. The user configures model attribute information on the model attribute configuration page based on the input device. After the configuration is completed, the terminal device obtains the model attribute information in the model attribute configuration page. Among them, the model attribute information includes: category, entity attribution, type ID, display name, and type name.

[0037] For example: Refer to Figure 2 The schematic diagram of the interface shown, the terminal device displays a model attribute configuration page based on the user's creation instruction. The model attribute configuration page includes multiple fields and value input boxes for each field. The multiple fields include: category, entity attribution, type ID, display name, and type name. The user inputs the values of each field in the value input box through the keyboard, and then saves the model attribute information set on this page through the save control.

[0038] S202. Display an extended configuration page of the data model based on the user's extension instruction.

[0039] S203. Configure extended configuration information on the extended configuration page based on the user's configuration instruction.

[0040] Among them, the extension instruction is generated based on a trigger operation on the control included in the model editing page. For example, an extension button is set on the model editing page. When the user clicks the extension button with the mouse, an extension instruction is generated, and then the extended configuration page of the data model is displayed through the display unit. The user performs an interaction operation through this extended configuration page, and the terminal device generates a configuration instruction based on the interaction operation to implement the configuration of the user's extended configuration information. The extended configuration information is used to extend the service capabilities of the data model. For example, it extends the service capabilities such as rules, operations, and reconciliations of the data model.

[0041] For example, refer to Figure 3The schematic diagram of the interface shown, the terminal device displays based on the extension instruction triggered on the model editing page Figure 3 of the extended configuration page. The extended configuration page includes a function candidate area and an operator candidate area. The operator candidate area is further subdivided into a logical operator candidate area and a mathematical operator candidate area. The function candidate area includes multiple types of functions, which are respectively: document functions, entity functions, mathematical functions, and time functions. Each type of function is further divided into multiple specific sub-functions. The logical operator candidate area is provided with multiple logical operators, and the data operator candidate area is provided with multiple mathematical operators. It is used to perform selection operations in each candidate area through the input device to trigger the generation of a selection instruction, and combine the functions and operators selected according to the selection instruction into a final expression, and this expression is the extended configuration information of the data model.

[0042] S204. After the configuration is completed, obtain the extended configuration information on the extended configuration page.

[0043] Among them, during the configuration completion, traverse each numerical input box and cell in the extended configuration page to obtain the extended configuration information. For example: refer to Figure 4 shown, Figure 4 are the extended configuration page and the model editing page after the configuration is completed.

[0044] S205. Store the model project information and the extended configuration information into the database.

[0045] Among them, the model project information and the extended configuration information of the data model are stored in a structured manner.

[0046] In one or more possible embodiments, after the extension of the data model is completed, associate the data model with the application package, and then perform the deployment of the application package and the data model. The deployment process is: obtain the application package associated with the data model, and deploy the application package on multiple nodes; perform a hash operation on the model project information and the extended configuration information to obtain a digest information; store the digest information into the centralized cache.

[0047] For example, refer to Figure 6 the schematic diagram of the interface shown. The model project information and the extended configuration information of the data attributes are stored in the centralized cache in the form of key-value pairs. Different information corresponds to different keys, and each row corresponds to a key-value pair. Users can insert, delete, and reload key-value pairs according to their needs.

[0048] Among them, the application package is deployed on multiple nodes in a distributed manner, which can improve the response speed of the application package. Storing the model project information and the extended configuration information of the data model in the form of key-value pairs in the distributed cache can improve the speed of the application package calling the data model.

[0049] Further, when an access request for the application package is detected, a target node is selected from multiple nodes to respond to the access request; for example, a node closest to the visitor's terminal is selected from multiple nodes as the target node, and the model item information and extended configuration information are read from the centralized cache through the summary information, and the access request is responded based on the read information to update the data of the data model.

[0050] In the embodiment of the present application, when developing an application based on a data model, the service capabilities of the data model are dynamically extended based on a graphical interface, without modifying the data model by modifying the code, saving the time of the function coding link and the testing time of the code, avoiding defects in the data model capabilities caused by differences in personal programming capabilities during function coding, and ensuring the reliability of the use of the data model.

[0051] The following is an embodiment of the device of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the present application.

[0052] Please refer to Figure 6 , which shows a schematic structural diagram of a configuration device for a data model provided by an exemplary embodiment of the present application, hereinafter referred to as device 6. This device 6 can be implemented as all or part of a computer device through software, hardware, or a combination of both. Device 6 includes: an editing unit 601, a triggering unit 602, an extension unit 603, an acquisition unit 604, and a storage unit 605.

[0053] The editing unit 601 is used to configure the model item information of the data model through a model editing page;

[0054] The triggering unit 602 is used to display the extended configuration page of the data model based on a user's extension instruction;

[0055] The extension unit 603 is used to configure extended configuration information on the extended configuration page based on a user's configuration instruction;

[0056] The acquisition unit 604 is used to acquire the extended configuration information on the extended configuration page after the configuration is completed;

[0057] The storage unit 605 is used to store the model item information and the extended configuration information into the database editing unit.

[0058] In one or more possible embodiments, the model editing page includes a model item table and multiple controls. The model item table includes multiple entries, each entry includes an item title, an item name, and a data type. The multiple controls include a new control, an insert control, a move-up control, and a move-down control.

[0059] In one or more possible embodiments, it further includes:

[0060] A creation unit, configured to create an instruction based on a user's model and display a model attribute configuration page;

[0061] Obtain model attribute information in the model attribute configuration page; wherein, the model attribute information includes: category, entity attribution, type ID, display name, and type name.

[0062] In one or more possible embodiments, the extended configuration information includes: an expression; the extended configuration page includes a function candidate area and an operator candidate area; the expression is composed of a function selected by the user in the function candidate area and an operator selected in the operator candidate area.

[0063] In one or more possible embodiments, the function candidate area includes: document functions, entity functions, mathematical functions, and time functions.

[0064] In one or more possible embodiments, it further includes:

[0065] A deployment unit, configured to obtain an application package associated with the data model and deploy the application package on multiple nodes;

[0066] Perform a hashing operation on the model project information and the extended configuration information to obtain digest information;

[0067] Store the digest information in a centralized cache.

[0068] In one or more possible embodiments, it further includes:

[0069] A response unit, configured to select a target node to respond to the access request on multiple nodes when detecting an access request for the application package;

[0070] Read the model project information and the extended configuration information from the centralized cache through the digest information, respond to the access request based on the read information, and update the data model.

[0071] It should be noted that when the device 6 provided in the above embodiment executes the data model configuration method, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data model configuration device provided in the above embodiment and the data model configuration method embodiment belong to the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.

[0072] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0073] The embodiments of the present application further provide a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor to perform the method steps of the embodiments as described above. Figure 1 The specific execution process can be referred to Figure 1 the specific description of the embodiments shown, and will not be elaborated here.

[0074] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the configuration method of the data model as described in the above embodiments.

[0075] Please refer to Figure 7 , which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 7 shown, the computer device 700 may include: at least one processor 701, at least one network interface 704, a user interface 703, a memory 705, and at least one communication bus 702.

[0076] Among them, the communication bus 702 is used to realize the connection and communication between these components.

[0077] Among them, the user interface 703 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 703 may further include a standard wired interface and a wireless interface.

[0078] Among them, the network interface 704 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0079] Among them, the processor 701 may include one or more processing cores. The processor 701 connects various parts within the entire terminal 700 through various interfaces and lines, and executes various functions of the terminal 700 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 705, and by calling the data stored in the memory 705. Optionally, the processor 701 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 701 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 701 and may be implemented separately by a single chip.

[0080] Among them, the memory 705 may include random access memory (RAM), and may also include read-only memory. Optionally, the memory 705 includes a non-transitory computer-readable storage medium. The memory 705 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 705 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. Optionally, the memory 705 may also be at least one storage device located far from the aforementioned processor 701. As Figure 7 shown, the memory 705, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.

[0081] In Figure 7In the computer device 700 shown, the user interface 703 is mainly used to provide an interface for the user to input data and obtain the data input by the user; while the processor 701 can be used to call the application programs stored in the memory 705 and specifically execute as Figure 1 shown in the method, and the specific process can be referred to Figure 1 shown, and will not be elaborated here.

[0082] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.

[0083] The above-disclosed are only the preferred embodiments of the present application. Of course, the scope of the rights of the present application cannot be limited by this. Therefore, equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.

Claims

1. A method for configuring a data model, characterized in that, Including: Configuring model project information of a data model through a model editing page; The model editing page includes a model project table and multiple controls. The model project table includes multiple entries, and each entry includes a project title, a project name, and a data type. The multiple controls include an add control, an insert control, a move up control, and a move down control; each row is an entry, and an entry is a model project information; Based on a user's extension instruction, displaying an extension configuration page of the data model; Configuring extension configuration information on the extension configuration page based on a user's configuration instruction; After configuration is completed, obtaining extension configuration information on the extension configuration page; The extension configuration information includes: an expression; the extension configuration page includes a function candidate area and an operator candidate area; the expression is composed of a function selected by the user in the function candidate area and an operator selected by the user in the operator candidate area; Storing the model project information and the extension configuration information in a database.

2. The method according to claim 1, characterized in that Before configuring the model project information of the data model through the model editing page, it further includes: Based on a user's model creation instruction, displaying a model property configuration page; Obtaining model property information in the model property configuration page; wherein, the model property information includes: category, entity attribution, type ID, display name, and type name.

3. The method according to claim 1, characterized in that, The function candidate area includes: document functions, entity functions, mathematical functions, and time functions.

4. The method according to claim 3, characterized in that, It also includes: Obtaining an application package associated with the data model, and deploying the application package on multiple nodes; Performing a hash operation on the model project information and the extension configuration information to obtain digest information; Storing the digest information in a centralized cache.

5. The method according to claim 4, characterized in that It also includes: When detecting an access request for the application package, selecting a target node among multiple nodes to respond to the access request; Reading the model project information and the extension configuration information in the centralized cache through the digest information, and responding to the access request based on the read information to update the data model.

6. A configuration device for a data model, characterized in that, Including: An editing unit for configuring model project information of a data model through a model editing page; The model editing page includes a model project table and multiple controls. The model project table includes multiple entries, and each entry includes a project title, a project name, and a data type. The multiple controls include an add control, an insert control, a move up control, and a move down control; each row is an entry, and an entry is a model project information; A triggering unit for displaying an extension configuration page of the data model based on a user's extension instruction; The extension configuration information includes: an expression; the extension configuration page includes a function candidate area and an operator candidate area; the expression is composed of a function selected by the user in the function candidate area and an operator selected by the user in the operator candidate area; An extension unit for configuring extension configuration information on the extension configuration page based on a user's configuration instruction; An obtaining unit for obtaining extension configuration information on the extension configuration page after configuration is completed; A storage unit for storing the model item information and the extended configuration information into a database.

7. A computer storage medium, characterized in that, The computer storage medium stores multiple instructions, and the instructions are adapted to be loaded and executed by a processor to perform the method steps of any one of claims 1 to 5.

8. A computer device, characterized in that, Comprising: A processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the method steps of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Visual service development method and system

    CN104360859A

  • Model code generation method, computer equipment and readable storage medium

    CN113296760A