A database-based scenario method, device, electronic equipment and storage medium
By parsing and populating metadata using a database-based method, the problems of low efficiency and low accuracy in existing technologies are solved, achieving an efficient and accurate planning process.
Patent Information
- Application Number
- CN202510406785.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Existing methods are inefficient, and handwriting is prone to errors, resulting in low accuracy.
By using a database-based approach, the scenario data structure table of the business system model is parsed to generate a scenario configuration preparation table. Metadata is then searched and populated in the database to generate a scenario configuration table for simulation and deduction.
It improves the efficiency and accuracy of scenario planning, enabling rapid scenario planning for complex scenarios.
Smart Images

Figure CN120255875B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of modeling technology, and more specifically, to a database-based scenario planning method, apparatus, electronic device, and storage medium. Background Technology
[0002] During the modeling process, after modeling is completed, simulation is required to verify whether the constructed model conforms to the modeling intent. Before simulation, scenario planning is necessary. Scenario planning is the preparatory work for simulation, specifically referring to the setting of the model's operating conditions or scenarios, that is, setting the initial and ending conditions of the simulation based on certain assumptions and preconditions.
[0003] Currently, existing scenario planning methods generally involve manually filling in the scenario data or using default data from a pre-built scenario. These methods have the following problems: low efficiency, easy to make mistakes when writing by hand, resulting in low accuracy. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a database-based planning method, apparatus, electronic device and storage medium to improve planning efficiency and accuracy.
[0005] Firstly, a database-based scenario planning method is provided, which includes:
[0006] Determine the modeling method for the proposed business system model; the modeling method should at least include manual modeling.
[0007] The scenario diagram of the manually modeled business system is parsed to obtain the scenario data structure table;
[0008] A scenario configuration preparation table is generated based on the scenario data structure table, the preset scenario method, and the data source;
[0009] The required metadata is retrieved from the pre-built business system's database and then populated into the configuration preparation table to obtain the desired configuration table, which is then used for simulation and deduction based on the data in the desired configuration table.
[0010] Optionally, the desired configuration preparation table includes at least a name field, a data source field, and a data mapping field; the required metadata in the desired configuration preparation table is retrieved from the database of the pre-built business system, and the retrieved metadata is populated into the configuration preparation table to obtain the desired configuration table, which includes:
[0011] Search the database of the pre-built business system model for the metadata corresponding to the field with the same name as the field, and the name of the table where the metadata is located;
[0012] Fill the data mapping field and the data source field with the metadata and the name of the table containing the metadata, respectively, to obtain the desired configuration table.
[0013] Optionally, the scenario data structure table is a tree structure table. The metadata corresponding to the field with the same name as the field in the pre-built business system model database, and the table name where the metadata resides, are searched, including:
[0014] Based on the tree structure of the desired configuration preparation table, the database of the pre-built business system model is searched level by level for the metadata corresponding to the field with the same name field and the name of the table where the metadata is located.
[0015] Optionally, the method further includes:
[0016] The data in the target configuration table is corrected.
[0017] Optionally, the modeling approach also includes automatic modeling based on a database, and the methods also include:
[0018] For business system models based on database automatic modeling, the current scenario data in the business system model is determined as the hypothetical data so that simulation and deduction can be performed based on the hypothetical data.
[0019] Optionally, the process of automatically building a business system model based on a database includes:
[0020] In the database of the pre-built business system, the main table and sub-tables are determined based on the foreign key relationships of each data table.
[0021] A scenario where a business system model is generated based on fields from the main table;
[0022] The business system model is generated based on the fields of the sub-table; a class is a general term for objects with the same attribute, and members are the components of a class;
[0023] The metadata corresponding to the fields of the sub-table is populated into the default data values of the members.
[0024] Optionally, after determining the current scenario data in the business system model as the desired data for the database-based automatic modeling business system model, the method further includes:
[0025] The scene diagram of the automatically modeled business system model is parsed to obtain the scene data structure table;
[0026] A scenario configuration preparation table is generated based on the scenario data structure table, the preset scenario method, and the data source;
[0027] The required metadata is retrieved from the pre-built business system model database and then populated into the configuration preparation table to obtain the desired configuration table.
[0028] Secondly, a database-based conceptual apparatus is provided, the apparatus comprising:
[0029] The defining unit is used to determine the modeling method for the proposed business system model; the modeling method includes at least manual modeling.
[0030] The first parsing unit is used to parse the scene diagram of the manually modeled business system model to obtain the scene data structure table;
[0031] The first generation unit is used to generate a scenario configuration preparation table based on the scenario data structure table, the preset scenario method, and the data source.
[0032] The first lookup unit is used to search for the required metadata in the pre-built business system's database in the desired configuration preparation table, and then fill the searched metadata into the configuration preparation table to obtain the desired configuration table, so as to perform simulation and deduction based on the data in the desired configuration table.
[0033] Thirdly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0034] The memory is used to store computer programs;
[0035] When the processor executes a program stored in the memory, it implements any of the steps of the method described in the first aspect.
[0036] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect.
[0037] This invention provides a database-based scenario planning method, apparatus, electronic device, and storage medium. The method involves: determining the modeling method of the business system model to be simulated; parsing the scenario diagram of the manually modeled business system model to obtain a scenario data structure table; generating a scenario configuration preparation table based on the scenario data structure table, a preset scenario planning method, and data sources; searching for the required metadata in the scenario configuration preparation table in the pre-built business system database, and filling the configuration preparation table with the found metadata to obtain a scenario configuration table, so as to perform simulation deduction based on the data in the scenario configuration table. This invention, by parsing the data structure of the already constructed business system model to obtain the scenario configuration preparation table, and by searching the database for metadata matching the classes and members in the scenario configuration preparation table, enables rapid scenario planning for complex scenarios, improving planning efficiency. Furthermore, compared to scenario planning methods that manually fill in or use default data from the business system model, database-based scenario planning significantly improves accuracy.
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 A schematic diagram illustrating the classes and members provided in an embodiment of the present invention is shown;
[0041] Figure 2 A flowchart of a database-based conceptualization method provided by an embodiment of the present invention is shown;
[0042] Figure 3 A schematic diagram illustrating the composition of data tables in the database of the business system model provided in an embodiment of the present invention is shown;
[0043] Figure 4 A schematic diagram of a scenario for a business system model automatically created based on a database, as provided in an embodiment of the present invention, is shown.
[0044] Figure 5 This invention provides a scenario diagram showing the data populated in a business system model automatically created from a database, as provided in an embodiment of the invention.
[0045] Figure 6A schematic diagram of a database-based conceptual device provided in an embodiment of the present invention is shown.
[0046] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0048] Given that existing scenario planning methods generally involve manually filling in scenario data or using default data from pre-built scenarios, these methods have the following problems: low efficiency, easy to make mistakes when writing by hand, resulting in low accuracy.
[0049] Based on this, embodiments of the present invention provide a database-based conceptual method and apparatus, which are described below through embodiments.
[0050] Before proceeding with this embodiment, the modeling method used in this embodiment of the invention will be explained first:
[0051] The embodiments of the present invention model the business system based on the object process relationship modeling method to obtain the business system model.
[0052] The object-process relationship-based modeling method models the real world based on objects and processes and the relationships between them. It refines the model from top to bottom through two forms: magnification and expansion, and has a dual-modal representation of form and text.
[0053] Among them, objects are things that are independent of time. Users can use objects to describe static things that exist in the system for a period of time.
[0054] A process is something that depends on time. Users can use processes to describe dynamic things in a system that are used to transform objects.
[0055] The modeling software allows users to create objects and processes by dragging and dropping. After selecting an object or process, users can set basic information such as name, description, persistence, nature, and dependency; they can also set parameter information for simulation and deduction functions.
[0056] In object- and process-based modeling methods, two definitions are also involved: class and member:
[0057] In this context, a class is a template for objects, defining a set of common attributes and methods for objects; members are the components of a class.
[0058] Figure 1 The diagram illustrates classes and members. Taking a table as an example, the table class has members including the tabletop, table legs, and table number. The table legs and tabletop are both members of the table and also the next level of classes. The tabletop has members including: tabletop number, material, and paint. The table legs have members including: table leg number, material, and paint.
[0059] This invention provides a database-based scenario planning method, such as... Figure 2 As shown, the method includes the following steps:
[0060] Step S201: Determine the modeling method for the business system model to be envisioned; the modeling method shall include at least manual modeling.
[0061] In this embodiment of the invention, a modeling software is used to model the obligatory system. The front-end interface of the modeling software includes a main design view. On the left side of the main design view, there are graphic elements representing objects and graphic elements representing processes. On the right side of the design view, information such as the attributes of objects and processes can be configured.
[0062] In this embodiment of the invention, there are two modeling methods: manual modeling and automatic modeling. The automatic modeling method will be described in the following embodiments and will not be repeated here.
[0063] The manual modeling method involves dragging and dropping the corresponding graphic elements and configuring the corresponding attributes to complete the modeling process.
[0064] For business system models completed manually, manually filling in the scenario data is very inefficient and inaccurate. Therefore, the scenario can be defined through the following steps.
[0065] Step S202: Analyze the scene diagram of the manually modeled business system model to obtain the scene data structure table.
[0066] In this step, since the business system model has already been built, a scenario diagram of the business system model can be obtained, such as... Figure 1 As shown, a composition diagram of classes and members can represent a scenario diagram.
[0067] By parsing the data structure in the scene diagram layer by layer, a scene data structure table can be obtained. In this embodiment of the invention, the scene data structure table is a tree structure table, as shown in Table 1 below:
[0068]
[0069] Step S203: Generate a scenario configuration preparation table based on the scenario data structure table, the preset scenario method, and the data source.
[0070] In this step, the scenario data structure table is defined. Continuing from the previous example, taking the table modeling scenario as an example, the default definition of the table is first set as "data table", and the data source is the table table. Here, "data table" refers to the various data tables in the database of the pre-built business system. Figure 3 The diagram shows the composition of the data table, including the table table, the desktop table, and the table leg table.
[0071] After completing these configurations, a desired configuration preparation table is generated, as shown in Table 2 below:
[0072] Table 2: Desired Configuration Preparation Table
[0073]
[0074] Table 2, the scenario configuration preparation table includes at least a name field, a data source field, and a data mapping field; by clicking the "Initialize Properties" button, the system will automatically perform the scenario configuration initialization operation.
[0075] Step S204: Locate the required metadata in the pre-built business system database in the desired configuration preparation table, and populate the found metadata into the configuration preparation table to obtain the desired configuration table, so as to perform simulation and deduction based on the data in the desired configuration table.
[0076] like Figure 3 As shown, the table has a primary key (table number) and the table legs and tabletops have foreign key (tabletop number, table leg number). Based on the relationship between the primary key and the foreign key, the metadata that matches the table leg members and tabletop members can be found and populated into the scenario configuration preparation table, so as to realize the rapid scenario planning for complex scenarios.
[0077] This invention parses the data structure of a pre-built business system model to obtain a scenario configuration preparation table. By searching the database for metadata that matches the classes and members in this scenario configuration preparation table, it can quickly simulate complex scenarios, improving simulation efficiency. Moreover, compared to the simulation method of manually filling in or using the default data of the business system model, simulation based on the database also greatly improves accuracy.
[0078] Based on the above embodiments, the required metadata in the desired configuration preparation table is retrieved from the database of the pre-built business system, and the retrieved metadata is populated into the configuration preparation table to obtain the desired configuration table, including:
[0079] Step S104A: Search the database of the pre-built business system model for the metadata corresponding to the field with the same name field and the name of the table where the metadata is located.
[0080] In one feasible implementation, searching the database of the pre-built business system model for the metadata corresponding to the field with the same name as the field, and the name of the table containing the metadata, includes:
[0081] Based on the tree structure of the desired configuration preparation table, the database of the pre-built business system model is searched level by level for the metadata corresponding to the field with the same name field and the name of the table where the metadata is located.
[0082] In this embodiment of the invention, the table table is the main table, and the desktop table and table leg table are the sub-tables. During the hierarchical search and matching, it is first determined whether the first field found in the main table contains a subset. If it does, the matching continues with the field of the sub-table; if it does not contain a subset, the matching continues with the field of the main table.
[0083] In a specific example, for a class whose name field is "table", in Figure 3 The data table shown is searched level by level. First, the table containing the table field is found to be "table number". Since "table number" does not contain any subsets, it means it is an attribute field. Therefore, it is only necessary to match it with the fields in the table table.
[0084] For classes whose name field is "desktop", in Figure 3 The data table shown is searched level by level. First, the field "Desktop Number" containing desktops is found in the table of desktops. Since the desktop number also includes a subset, namely the desktop table, it means that the desktop number is a subclass instance. Therefore, it is necessary to continue to match it with the fields in the desktop table, and the final matching data in the desktop table shall prevail.
[0085] Step S104B: Fill the metadata and the table name where the metadata is located into the data mapping field and the data source field respectively to obtain the desired configuration table.
[0086] The resulting scenario configuration table is shown in Table 3 below:
[0087]
[0088] To further improve accuracy and avoid data inaccuracies due to malicious database tampering, the method further includes, based on the above embodiments:
[0089] The data in the target configuration table is corrected.
[0090] In one feasible implementation, corrections can be made manually. For example, if the material of the tabletop is inconsistent with the material of the table legs, it can be verified offline to determine whether correction is necessary.
[0091] Based on the above embodiments, the modeling method also includes database-based automatic modeling, which further includes:
[0092] Step S105: For the business system model based on database automatic modeling, the current scenario data in the business system model is determined as the hypothetical data so that simulation and deduction can be performed based on the hypothetical data.
[0093] Since the business system model is automatically created based on data from the database, the parameters used for simulation and deduction all come from the database. Therefore, during the scenario planning phase, we can simply plan directly, which can also ensure the efficiency and accuracy of the scenario planning.
[0094] In one feasible implementation, the process of automatically building a business system model based on a database includes:
[0095] Step S105A: Determine the main table and sub-tables in the database of the pre-built business system based on the foreign key relationships of each data table.
[0096] Taking a table model as an example, such as Figure 3 As shown, the main table is the table of tables, and the sub-tables are the table of tabletops and the table of table legs.
[0097] Step S105B: Scenario of generating a business system model based on the fields of the main table.
[0098] After selecting the main table, the system automatically generates a business system model based on fields from the main table, such as table number, tabletop number, and table leg number. Figure 4 As shown, a scene diagram automatically generated based on a database is illustrated.
[0099] Among them, the program for automatically generating business system models can be preset. This program is used to obtain data from the database of the business system, determine the relationships between various classes and members in the business system based on the foreign key relationships of various data tables in the database, and automatically generate the business system model and its scenarios based on the obtained relationships between various classes and members. This not only improves modeling efficiency, but also allows the model created in this way to directly load scenario data for scenario planning, thereby meeting the need for rapid scenario planning for complex scenarios.
[0100] Step S105C: Generate the classes and members of the business system model based on the fields of the sub-table.
[0101] In this embodiment of the invention, a class refers to a collective term for objects that have the same attribute, and members are the components of a class.
[0102] For example, members with numbers, materials, and paints are assigned to the table legs and tabletop respectively.
[0103] Step S105D: Fill the corresponding metadata of the fields in the sub-table into the default data values of the members.
[0104] Based on the scenario constructed in step S105B, and the classes and members constructed in step S105C, the corresponding metadata is populated into the default data of the members. Figure 5 This shows a scenario diagram of the populated business system model.
[0105] While business system models automatically created based on databases can be directly modeled using the data loaded during modeling, if the data in the database changes after a period of time but the data in the model is not automatically updated, the model can be remodeled using the same method as manually created business system models to ensure the accuracy of the created business system model.
[0106] Therefore, based on the above embodiments, after determining the current scenario data in the business system model as the desired data for the business system model based on database automatic modeling, the method further includes:
[0107] Step S105C: Parse the scene diagram of the automatically modeled business system model to obtain the scene data structure table.
[0108] Step S105D: Generate a scenario configuration preparation table based on the scenario data structure table, the preset scenario method, and the data source.
[0109] Step S105E: Locate the required metadata in the pre-built business system model database in the desired configuration preparation table, and populate the desired configuration table with the found metadata.
[0110] For a detailed explanation of steps S105C-S105E, please refer to the description of the scenario process for manually created business system models in the above embodiments, and it will not be repeated here.
[0111] Based on the same inventive concept, embodiments of the present invention also provide a database-based conceptual device, such as... Figure 6 As shown, the device includes:
[0112] The determination unit 601 is used to determine the modeling method of the business system model to be conceived; the modeling method includes at least manual modeling.
[0113] The first parsing unit 602 is used to parse the scene diagram of the manually modeled business system model to obtain the scene data structure table.
[0114] The first generation unit 603 is used to generate a scenario configuration preparation table based on the scenario data structure table, the preset scenario method, and the data source.
[0115] The first lookup unit 604 is used to look up the required metadata in the pre-built business system database in the pre-configured configuration preparation table, and fill the found metadata into the configuration preparation table to obtain the pre-configured configuration table, so as to perform simulation and deduction based on the data in the pre-configured configuration table.
[0116] Based on the above embodiments, the scenario configuration preparation table includes at least a name field, a data source field, and a data mapping field; the first lookup unit includes:
[0117] Search sub-unit: Used to search for metadata corresponding to the field with the same name field and the name of the table where the metadata is located in the database of the pre-built business system model;
[0118] The scene data structure table is a tree structure table, and the search for sub-units is specifically used for:
[0119] Based on the tree structure of the desired configuration preparation table, the database of the pre-built business system model is searched level by level for the metadata corresponding to the field with the same name field and the name of the table where the metadata is located.
[0120] Population cell: Used to populate the metadata and the table name where the metadata is located into the data mapping field and the data source field respectively, to obtain the desired configuration table.
[0121] Based on the above embodiments, the device further includes:
[0122] The calibration unit is used to calibrate the data in the target configuration table.
[0123] Based on the above embodiments, the modeling method also includes automatic modeling based on a database, and the device further includes:
[0124] The scenario unit is used to define the current scenario data in the business system model based on database automatic modeling as scenario data, so as to perform simulation and deduction based on the scenario data.
[0125] The process of automatically building a business system model based on a database includes:
[0126] In the database of the pre-built business system, the main table and sub-tables are determined based on the foreign key relationships of each data table.
[0127] A scenario where a business system model is generated based on fields from the main table;
[0128] The business system model is generated based on the fields of the sub-table; a class is a general term for objects with the same attribute, and members are the components of a class;
[0129] The metadata corresponding to the fields of the sub-table is populated into the default data values of the members.
[0130] Based on the above embodiments, the device further includes:
[0131] The second parsing unit is used to parse the scene diagram of the business system model of automatic modeling to obtain the scene data structure table;
[0132] The second generation unit is used to generate a scenario configuration preparation table based on the scenario data structure table, the preset scenario method, and the data source.
[0133] The second lookup unit is used to search for the required metadata in the pre-built business system model database in the desired configuration preparation table, and then populate the searched metadata into the configuration preparation table to obtain the desired configuration table.
[0134] Based on the same technical concept, embodiments of the present invention also provide an electronic device, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.
[0135] Memory 703 is used to store computer programs;
[0136] The processor 701 is used to implement the steps of a database-based conceptual method when executing a program stored in the memory 703.
[0137] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0138] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0139] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0140] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0141] The computer program product for performing a database-based hypothetical method provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0142] The database-based conceptual device provided in this embodiment of the invention can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this embodiment of the invention are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiments can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0143] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0144] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0145] In addition, the functional units in the embodiments provided by the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0146] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0147] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0148] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A database-based scenario planning method, characterized in that, The method includes: Determine the modeling method for the proposed business system model; the modeling method includes at least manual modeling; The scenario diagram of the manually modeled business system is parsed to obtain the scenario data structure table; Based on the scenario data structure table, the preset scenario method, and the data source, a scenario configuration preparation table is generated; The required metadata is retrieved from the database of the pre-built business system and then populated into the configuration preparation table to obtain the scenario configuration table, so that simulation and deduction can be performed based on the data in the scenario configuration table. The desired configuration preparation table includes at least a name field, a data source field, and a data mapping field; the step of searching for the required metadata in the desired configuration preparation table in the database of the pre-built business system and filling the desired configuration table with the searched metadata includes: Search the database of the pre-built business system model for the metadata corresponding to the field with the same name field and the name of the table where the metadata is located; The metadata and the table name containing the metadata are filled into the data mapping field and the data source field respectively to obtain the desired configuration table.
2. The method according to claim 1, characterized in that, The scenario data structure table is a tree structure table. The step of searching the database of the pre-built business system model for the metadata corresponding to the field with the same name as the specified field, and the name of the table containing that metadata, includes: Based on the tree structure of the desired configuration preparation table, the database of the pre-built business system model is searched level by level for the metadata corresponding to the field with the same name field and the table name where the metadata is located.
3. The method according to claim 1, characterized in that, The method further includes: The data in the desired configuration table is corrected.
4. The method according to claim 1, characterized in that, The modeling method also includes automatic modeling based on a database, and the method further includes: For a business system model based on database automatic modeling, the current scenario data in the business system model is determined as the scenario data so that simulation and deduction can be performed based on the scenario data.
5. The method according to claim 4, characterized in that, The process of automatically building a business system model based on a database includes: In the database of the pre-built business system, the main table and sub-tables are determined based on the foreign key relationships of each data table. A scenario where a business system model is generated based on the fields of the main table; The business system model's classes and members are generated based on the fields of the sub-table; the class refers to a collective term for objects with the same attribute, and the members are the components of the class; The metadata corresponding to the fields of the sub-table is filled into the default data values of the member.
6. The method according to claim 4, characterized in that, After determining the current scenario data in the business system model as the desired data for the database-based automatic modeling business system model, the method further includes: The scene diagram of the automatically modeled business system model is parsed to obtain the scene data structure table; Based on the scenario data structure table, the preset scenario method, and the data source, a scenario configuration preparation table is generated; The required metadata is retrieved from the database of the pre-built business system model and then populated into the configuration preparation table to obtain the desired configuration table.
7. A database-based conceptual device, characterized in that, The device includes: A determining unit is used to determine the modeling method for the proposed business system model; the modeling method includes at least manual modeling. The first parsing unit is used to parse the scene diagram of the manually modeled business system model to obtain the scene data structure table; The first generation unit is used to generate a scenario configuration preparation table based on the scenario data structure table, the preset scenario method, and the data source. The first lookup unit is used to look up the required metadata in the pre-built business system database in the scenario configuration preparation table, and fill the found metadata into the configuration preparation table to obtain the scenario configuration table, so as to perform simulation and deduction based on the data in the scenario configuration table; The scenario configuration preparation table includes at least a name field, a data source field, and a data mapping field; the database of the pre-built business system model is searched for the metadata corresponding to the field with the same name field and the table name where the metadata is located; The metadata and the table name containing the metadata are filled into the data mapping field and the data source field respectively to obtain the desired configuration table.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes the program stored in the memory, it implements the steps of the method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-6.
Citation Information
Patent Citations
Scene data management method and device, storage medium and equipment
CN116303384A
Simulation data construction method and device based on ER graph
CN116501757A