Method and apparatus for generating simulated data, and electronic device and storage medium

By obtaining project database tables and determining data simulation configuration information, and automatically generating simulation data, the problem of low simulation data generation efficiency in the prior art is solved, and efficient and accurate data simulation is achieved.

WO2025086679A1PCT designated stage expired Publication Date: 2025-05-01BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
PCT/CN2024/100223
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-24
Filing Date
2024-06-19
Publication Date
2025-05-01

AI Technical Summary

Technical Problem

When generating simulation data in urban development projects, existing technology requires a lot of development time and high professional requirements, resulting in waste of manpower and time, and low data simulation efficiency.

Method used

Provides a method of generating simulation data, and automatically generates simulation data by obtaining the database table of the pending items and determining the data simulation configuration information of its fields. The method includes an information determination unit and a data generation unit, using a preset code template and a template engine, generate and run data simulation code based on the data simulation configuration information, and generate the required simulation data.

Benefits of technology

It improves the efficiency of generating simulated data, saves manpower and time, reduces the possibility of manual input errors, and improves the accuracy and efficiency of data simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024100223_01052025_PF_FP_ABST
    Figure CN2024100223_01052025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and particularly relates to the field of source codes. Provided are a method and apparatus for generating simulated data, and an electronic device and a storage medium. The specific implementation solution comprises: acquiring a database table of a project to be processed, and determining data simulation configuration information corresponding to a field in the database table, wherein the database table comprises at least one field, which represents the type of simulated data required by said project, and the data simulation configuration information represents a generation means for the simulated data and the format of the simulated data; and on the basis of the data simulation configuration information, generating the simulated data under the field in the database table. Different pieces of configuration information are set for different fields, and when it is necessary to simulate data, corresponding configuration information is searched for to automatically generate simulated data, thereby improving the simulation efficiency of the data.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, electronic device and storage medium for generating simulation data

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on October 24, 2023, with application number 2023113895610 and application name “Method, device, electronic device and storage medium for generating analog data”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of source code in the field of computer technology, and in particular to a method, device, electronic device and storage medium for generating simulation data. Background Art

[0003] During urban development and construction, many projects need to be developed. For example, these projects may involve cultural tourism, healthcare, education, and more. Each project requires certain data to support it, and the data required for different projects may vary.

[0004] During project development, it's necessary to simulate the required data for demonstration and testing. Currently, data simulation services are developed for different project needs, generating simulated data through these services. However, this approach consumes significant development time, requires high developer expertise, wastes significant manpower and time, and results in low data simulation efficiency.

[0005] Summary of the Invention

[0006] The purpose of this application is to provide a method, device, electronic device and storage medium for generating simulation data.

[0007] In a first aspect, a method for generating simulation data is provided, comprising:

[0008] Obtaining a database table of a project to be processed, and determining data simulation configuration information corresponding to fields in the database table; wherein the database table includes at least one field representing the type of simulation data required for the project to be processed; and the data simulation configuration information representing a method for generating the simulation data and a format of the simulation data;

[0009] Generate simulation data for the fields in the database table according to the data simulation configuration information.

[0010] In a second aspect, a device for generating simulation data is provided, comprising:

[0011] an information determination unit, configured to obtain a database table of a project to be processed and determine data simulation configuration information corresponding to fields in the database table; wherein the database table includes at least one field representing a type of simulation data required for the project to be processed; and the data simulation configuration information representing a method for generating the simulation data and a format of the simulation data;

[0012] The data generating unit is used to generate simulation data under the fields in the database table according to the data simulation configuration information.

[0013] According to a third aspect, an electronic device is provided, including:

[0014] at least one processor; and

[0015] a memory communicatively coupled to the at least one processor;

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect of the present application.

[0017] In a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect of the present application.

[0018] In a fifth aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect of the present application.

[0019] According to the technology of the present application, the efficiency of generating simulation data is improved.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present application.

[0022] FIG1 is a schematic flow chart of a method for generating simulation data according to an embodiment of the present application;

[0023] FIG2 is a schematic diagram of an interface for importing a database table according to an embodiment of the present application;

[0024] FIG3 is a flow chart of a method for generating simulation data according to an embodiment of the present application;

[0025] FIG4 is a flow chart of a method for generating simulation data according to an embodiment of the present application;

[0026] FIG5 is a structural block diagram of a device for generating simulation data according to an embodiment of the present application;

[0027] FIG6 is a structural block diagram of a device for generating simulation data according to an embodiment of the present application;

[0028] FIG7 is a block diagram of an electronic device for implementing the method for generating simulation data according to an embodiment of the present application;

[0029] FIG8 is a block diagram of an electronic device for implementing the method for generating simulation data according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following description of exemplary embodiments of the present application is made in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0031] When developing a city, projects can be processed and delivered based on the IOC (Intelligent Operations Center). During project development, the project needs to be deployed on a pre-set demonstration platform for daily demonstrations. Therefore, it is necessary to obtain simulation data for the project and conduct demonstrations based on the simulation data.

[0032] In the related technologies of data simulation, a data simulation service can be developed for each project, and mock data can be generated based on the data simulation service. Mock data can also be directly inserted into the database through manual input.

[0033] However, while developing a data simulation service can automatically generate simulation data, it requires developing a service for each project, increasing development costs and requiring high developer expertise. Manually inserting data can avoid developing a new data simulation service, but it requires manual, timed insertion, is prone to operational errors, and is more susceptible to operator bias, resulting in lower data simulation efficiency and accuracy.

[0034] The present application provides a method, device, electronic device and storage medium for generating simulation data, which are applied to the field of source code in the field of computer technology to improve the efficiency of generating simulation data.

[0035] It should be noted that the data in this embodiment is not data for a specific user and cannot reflect the personal information of a specific user. It should be noted that the data in this embodiment comes from a public data set.

[0036] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0037] In order to enable readers to have a deeper understanding of the implementation principle of the present application, the embodiment is further detailed with reference to the following Figures 1 to 8.

[0038] FIG1 is a flow chart of a method for generating simulation data according to an embodiment of the present application, which can be executed by a device for generating simulation data. As shown in FIG1 , the method includes the following steps:

[0039] S101: Obtain a database table of a project to be processed, and determine data simulation configuration information corresponding to fields in the database table.

[0040] For example, a project can be represented as a theme established during the urban development process for urban development. For example, a project could involve a city's cultural tourism, transportation, healthcare, education, and other topics. The operation of a project requires data support. Different projects may correspond to different database tables, and the fields in these tables may vary. These database table fields may represent the data required by the project. In other words, different projects may require different data.

[0041] For a pending project, the data required for the project can be simulated to obtain simulated data. A database table includes at least one field, which represents the type of simulated data required for the pending project. For example, if the pending project is an education project, the fields in the database table may include the number of schools, school addresses, and the number of teachers and students in each school. In other words, the types of simulated data required include the number of schools, school addresses, and the number of teachers and students in each school. The simulated data is the specific field content under the field.

[0042] When data simulation is required for the project to be processed, the database table corresponding to the project to be processed is obtained. The database table lists the fields to which the required simulation data belongs, but does not include the specific field content. According to the database table of the project to be processed, the fields in the database table can be determined. Different fields can correspond to different data simulation configuration information, and the data simulation configuration information represents the generation method of the simulation data and the format of the simulation data. The generation method of the simulation data is the rule for generating the simulation data, and the format of the simulation data can be expressed as the data type of the simulation data, that is, the expression form of the data. For example, the data type may include the character type and length of the simulation data. In other words, the generation method of the simulation data under different fields may be different, and the format of the simulation data may also be different. For example, for the "school name" field and the "number of teachers and students" field, the data format of the simulation data of the "school name" field is text, and the data format of the simulation data of the "number of teachers and students" field is number.

[0043] When obtaining database tables for pending projects, you can pre-set the relationships between projects and database tables. Users can enter or select a pending project from existing projects. Based on the pre-set relationships between projects and database tables, the database table corresponding to the pending project is searched and imported, enabling the reuse of database tables for the project and improving data simulation efficiency.

[0044] In this embodiment, obtaining the database table of the project to be processed includes: in response to a selection operation on the historical database table, determining a target database table from the historical database table, which is the database table of the project to be processed; wherein the fields in the historical database table correspond to pre-stored data simulation configuration information.

[0045] Specifically, you can store previously constructed database tables as historical database tables. When acquiring a database table, you can directly select it from the historical database tables. You can then determine a target database table from the historical database tables as the database table for the project to be processed. For example, you can select the target database table from a drop-down box in the historical database table.

[0046] There are many historical database tables. To improve database table selection efficiency, you can categorize historical database tables and group multiple historical database tables into one data source, resulting in multiple data sources. In other words, a data source can include one or more database tables. Users can first select a data source, then select the target database table from the database tables contained in that data source.

[0047] The fields in the historical database table correspond to pre-stored data simulation configuration information. After obtaining the target database table, the data simulation configuration information corresponding to each field in the target database table can be obtained.

[0048] The beneficial effect of this setting is that the database table of the project to be processed can be directly imported according to the historical database table, which reduces the database table construction process, improves the efficiency of determining the database table, and thus improves the efficiency of generating simulation data.

[0049] S102: Generate simulation data for fields in a database table according to the data simulation configuration information.

[0050] For example, different fields correspond to different data simulation configuration information. Based on the data simulation configuration information, corresponding simulated data can be generated for different fields. For example, if a database table has fields A and B, and the data simulation configuration information for field A randomly generates a 16-character string, and the data configuration information for field B randomly selects a number from 1 to 10, then the simulated data generated for field A might be abcd1234567rtyu8, and the simulated data for field B might be 5.

[0051] The data simulation configuration information may also include the number of generated simulation data. For example, for field A, 50 simulation data may be generated in advance; and for field B, 30 simulation data may be generated in advance.

[0052] Figure 2 is a schematic diagram of the database table import interface provided in an embodiment of the present application. In Figure 2, the user can select a data source, and the data source selected by the user is "Parking Lot." The user then selects a database table related to "Parking Lot." The user clicks the triangle symbol in the input box under "Data Table Name." A drop-down box displays the database table. The user selects the target database table from the drop-down box, thereby performing data simulation on the fields in the target database table.

[0053] The embodiment of the present application can obtain the corresponding database table for the project to be processed. The fields in different database tables can be different, and different rules, i.e., data simulation configuration information, are configured for different fields. When it is necessary to simulate the field content under a field, simulation data can be automatically generated according to the corresponding data simulation configuration information. There is no need to develop data simulation services for different projects, nor is there any need to manually enter simulation data, which saves manpower and time, avoids errors in manual input, and improves the accuracy and efficiency of data simulation.

[0054] FIG3 is a flow chart of a method for generating simulation data provided in an embodiment of the present application, which is an optional embodiment based on the above embodiment.

[0055] In this embodiment, based on the data simulation configuration information, simulated data is generated under the fields in the database table, which can be further broken down into: obtaining a preset code template; wherein the preset code template is a template for generating code for simulated data; based on the data simulation configuration information corresponding to the fields in the database table, data simulation code is generated based on the preset code template; wherein the data simulation code is used to generate simulated data; and running the data simulation code to generate simulated data under the fields in the database table.

[0056] As shown in FIG3 , the method includes the following steps:

[0057] S301: Obtain a database table of a project to be processed, and determine data simulation configuration information corresponding to fields in the database table.

[0058] For example, this step may refer to the above-mentioned step S101 and will not be described in detail.

[0059] S302: Obtain a preset code template; wherein the preset code template is a template for generating a code for simulation data.

[0060] Exemplarily, a code template is pre-set, and according to the code template, a code for generating simulation data can be obtained, that is, the code template is a template for generating code for simulation data. For example, the code template may include fixed code statements and may also be provided with a code format.

[0061] One or more code templates may be provided. For example, different code templates may be provided for different data simulation configuration information. When obtaining a preset code template, the code template corresponding to the data simulation configuration information may be searched. In this embodiment, a FreeMarker (template engine) preset code template may be used.

[0062] S303: Generate data simulation code according to the data simulation configuration information corresponding to the fields in the database table and based on a preset code template; wherein the data simulation code is used to generate simulation data.

[0063] For example, the code template does not contain data simulation configuration information. After obtaining the code template, the code template can be supplemented according to the data simulation configuration information corresponding to the fields in the database table to obtain a complete code. The obtained complete code is determined as the data simulation code, and the data simulation code is used to generate simulation data. Different data simulation codes can be generated for different fields. If the data simulation configuration information needs to be modified, a new data simulation code can be generated based on the modified data simulation configuration information without modifying the original data simulation code, thereby reducing the professional requirements for staff, making the modification more flexible, and being able to meet actual business needs.

[0064] In this embodiment, data simulation code is generated based on the data simulation configuration information corresponding to the fields in the database table and the preset code template, including: combining the data simulation configuration information corresponding to the fields in the database table with the preset code template to obtain the data simulation code.

[0065] Specifically, the code template may include a location for filling in data simulation configuration information. For example, "XXX" may be used in the code template to indicate that data simulation configuration information needs to be filled in. That is, if "XXX" appears in the code template, it indicates that data simulation configuration information needs to be used to replace "XXX".

[0066] After obtaining the code template, determine the locations within the code template where the data simulation configuration information needs to be filled. Based on the determined locations, combine the data simulation configuration information corresponding to the fields in the database table with the preset code template to generate the data simulation code. In other words, the data simulation configuration information can be filled in the empty locations in the code template.

[0067] The beneficial effect of this setting is that by combining data simulation configuration information with code templates, data model codes can be automatically obtained, reducing the code writing process for staff, saving manpower and time, and improving the accuracy and efficiency of data simulation.

[0068] In this embodiment, the data simulation configuration information corresponding to the fields in the database table is combined with the preset code template to obtain the data simulation code, including: determining the position of the data simulation configuration information corresponding to the fields in the database table in the preset code template, which is the position to be added; based on the preset template engine, the data simulation configuration information corresponding to the fields in the database table is added to the position to be added in the preset code template to obtain the data simulation code; wherein the preset template engine is an engine for generating output text, and the output text represents the data simulation code.

[0069] Specifically, if the data simulation configuration information does not exist in the code template, the code cannot be run. You need to add the data simulation configuration information to the code template so that the code template can run based on the data simulation configuration information. Pre-set the location of the data simulation configuration information in the code template and determine the location where the data simulation configuration information will be added. For the same code template, the locations of different data simulation configuration information in the code template are the same.

[0070] According to the position to be added, the data simulation configuration information is combined with the code template to obtain a complete data simulation code. For example, the data simulation configuration information can be added to the position to be added of the code template. In the present embodiment, a preset template engine can be used to add the data simulation configuration information to the position to be added. For example, the preset template engine can be FreeMarker, that is, the data simulation configuration information can be injected into the code template through FreeMarker. The template engine can generate output text based on the code template and the data simulation configuration information, that is, obtain the data simulation code.

[0071] The beneficial effect of this setting is that the template engine is used to inject data simulation configuration information into the code template to realize the automatic generation of data simulation code, thereby providing data mock services and improving the efficiency of data mock.

[0072] S304: Run the data simulation code to generate simulation data for the fields in the database table.

[0073] For example, after obtaining the data simulation code, the data simulation code is run. The result of running the data simulation code is simulated data, that is, simulated data for fields in the database table. Each time the data simulation code is run, one or more simulated data items are generated. The number of generated simulated data items can be preset in the code template. By running the data simulation code, simulated data can be automatically generated, reducing user operations, saving manpower and time, improving the efficiency and accuracy of simulated data generation, and supporting rapid project delivery.

[0074] In this embodiment, running the data simulation code to generate simulated data for the fields in the database table includes: regularly running the data simulation code according to a preset data generation cycle to generate simulated data for the fields in the database table.

[0075] Specifically, the simulation data generation task can be a timed task. The data generation cycle can be preset and set in the code template. That is, after the data simulation code is generated, the data simulation code can be run regularly according to the data generation cycle.

[0076] Run the data simulation code regularly to generate simulated data for the fields in the database table. The database table contains multiple fields, that is, you can regularly generate simulated data for each field in the database to obtain a complete database table.

[0077] The beneficial effect of this setting is that it sets scheduled tasks for database tables, realizes automatic and regular data simulation, reduces manual participation, and effectively improves the efficiency of data simulation.

[0078] In this embodiment, the data simulation code is used to generate fixed data; generating simulated data under the fields in the database table includes: generating a preset number of fixed data, which are simulated data under the fields in the database table.

[0079] Specifically, different data simulation configuration information can be pre-set, and different data simulation configuration information can be used to generate simulation data based on different simulation data generation methods. By injecting the data simulation configuration information into the code template, a data simulation code can be obtained. The data simulation code can execute different simulation data generation methods based on the data simulation configuration information to generate simulation data in a preset format. For example, the data simulation configuration information indicates random generation of simulation data, that is, the data generation method represented by the data simulation configuration information is random generation, and the data simulation code can randomly generate simulation data when it is running. For another example, the data simulation configuration information indicates the generation of fixed simulation data, that is, the data generation method represented by the data simulation configuration information is to generate preset fixed data, and the data simulation code can generate preset fixed data as simulation data when it is running.

[0080] When the data simulation code is used to generate fixed data, the amount of generated fixed data can be set. The data simulation code is run to generate a preset amount of fixed data as the simulated data for a field in the database table. The fixed data can be a fixed value, that is, a fixed value is assigned to the field. For example, if the field is "is_deleted", the specified simulated data is 0. The fixed data can also represent the current time. If the field is a time type field, the simulated data for the field can be specified to be fixed to the current time. The specific value of the simulated data for the field changes with the current time.

[0081] This setting has the advantage of assigning a fixed value or the current time to a field. This is suitable for situations where a field is fixed, for example, the "is_deleted" field is fixed to 0, and the "update_time" and "craete_time" fields are fixed to the current time. This reduces the computational effort during simulation data generation, improves simulation data generation efficiency, and ensures that the simulation data meets actual business needs.

[0082] In this embodiment, the data simulation code is used to generate random data in a preset format; generating simulated data under a field in a database table includes: randomly generating a preset amount of data according to the preset format represented in the data simulation code, which is the simulated data under the field in the database table.

[0083] Specifically, the data simulation configuration information may indicate the random generation of simulated data. That is, the data simulation configuration information indicates a random generation method, and the simulated data can be randomly generated when the data simulation code is executed. The data simulation code may also preset the format of the randomly generated data. For example, the preset format may be a string, integer, floating-point number, date, time, timestamp, URL, email address, school name, mobile phone number, name, city, image, etc. In other words, the simulated data can be randomly generated according to the preset format.

[0084] When the data simulation code is used to generate random data in a preset format, the number of random data generated can be set. The data simulation code is run to generate a preset number of random data in the preset format as simulated data for a field in a database table. For example, if the preset format is a 3-character string, a preset number of strings can be generated, and all generated strings are 3 characters long.

[0085] The beneficial effect of such a setting is that, by randomly generating data, the efficiency of generating simulation data can be improved, the randomness of data simulation can be improved, and the subjective influence brought about by artificially generating simulation data can be avoided.

[0086] In this embodiment, the data simulation code is used to generate data with increasing values; generating simulated data under a field in a database table includes: generating a preset amount of data based on a preset starting value according to the increasing interval represented in the data simulation code, which is the simulated data under the field in the database table.

[0087] Specifically, the data simulation configuration information may represent the generation of simulation data with increasing values, and may be preset with an increasing interval and an initial value. When the data simulation code is running, it may generate increasing values ​​starting from the initial value according to the preset increasing interval.

[0088] When the data simulation code is used to generate incremental values, the increment interval and initial value can be set, and the amount of simulated data can also be set. The data simulation code is run to generate a preset amount of data starting from the preset initial value according to the increment interval as the simulated data for the field in the database table. In this embodiment, both numerical increment and time increment are supported. Numeric increment supports a custom increment interval. When the increment interval is not set, the increment interval defaults to 1. Time increment also supports a custom increment interval, and the time unit can be customized. When the increment interval is not set, the increment interval defaults to 1, and the unit defaults to day.

[0089] The beneficial effect of this setting is that simulation data is generated according to the incremental rules, which can meet actual business needs and improve the flexibility of data simulation.

[0090] In this embodiment, the data simulation code is used to generate data according to a preset calculation expression; generating simulated data under a field in a database table includes: determining the simulated data under a field in a database table based on a preset calculation expression represented by the data simulation code; wherein the calculation expression is a regular expression or a Spring expression language expression.

[0091] Specifically, the data simulation configuration information can be expressed as a preset calculation expression, which is a formula for calculating simulation data. When the data simulation code is running, calculations can be performed according to the preset calculation expression to obtain simulation data.

[0092] When the data simulation code generates data based on a preset calculation expression, the amount of simulated data generated each time can be set. The data simulation code is run to generate a preset amount of data according to the preset calculation expression, which serves as the simulated data for the fields in the database table. In this embodiment, the calculation expression can be a regular expression or a SpEL (Spring Expression Language) expression. SpEL expressions use the Spring EL engine to parse and execute expressions.

[0093] The beneficial effect of such a setting is that the simulation data is calculated according to the preset expression, the simulation data is automatically calculated, and the generation efficiency and accuracy of the simulation data are improved.

[0094] In this embodiment, the data simulation code is used to obtain simulation data from a preset vocabulary; generate simulation data under a field in a database table, including: randomly selecting a preset number of data from the preset vocabulary, which are the simulation data under the field in the database table; or, traversing from the first data in the preset vocabulary, obtaining a preset number of data, which are the simulation data under the field in the database table.

[0095] Specifically, the data simulation configuration information may indicate that data is acquired from a preset vocabulary. The data in the preset vocabulary is pre-stored in the vocabulary. When the data simulation code is running, data may be acquired from the preset vocabulary as simulation data.

[0096] When the data simulation code retrieves simulation data from a preset vocabulary, the amount of simulation data retrieved each time can be set. The data simulation code is run to retrieve a preset amount of data from the preset vocabulary as simulation data for a field in a database table. For example, a preset amount of data can be randomly selected from the preset vocabulary as simulation data. Alternatively, the data in the vocabulary can be traversed and a preset amount of data can be retrieved as simulation data in the order of traversal. If the preset amount is greater than the amount of data in the vocabulary, the vocabulary can be traversed repeatedly until the preset amount of simulation data is retrieved.

[0097] The beneficial effect of this setting is that it directly obtains data from the preset vocabulary, reduces the difficulty of data generation, eliminates the need for calculations, and improves the efficiency of generating simulation data.

[0098] In this embodiment, the fields in the database table represent geographic locations, and the data simulation code is used to obtain location information of the geographic locations; generating simulation data under the fields in the database table includes: determining the geographic location represented by the fields in the database table; based on a preset positioning service, performing information point positioning processing on the geographic location represented by the fields in the database table to obtain location information of the geographic location represented by the fields in the database table; and determining the location information of the geographic location represented by the fields in the database table as simulation data under the fields in the database table.

[0099] Specifically, a field in a database table can represent a geographic location, and the data simulation configuration information can indicate the location information for obtaining that geographic location. For example, a field in a database table can be an address, longitude, latitude, province, city, or region, and the location information can indicate the specific address, longitude, latitude, province, city, or region corresponding to the field. When the data simulation code is running, the location information of a specific location can be obtained as simulation information. For example, the location information of the current city can be obtained, or the location information of a specified city can be obtained.

[0100] In the case where the data simulation code obtains location information, the POI (Point of Information) for which the location information is to be obtained can be set. For example, the POI can be set to a certain city. According to the preset positioning service, the geographical location represented by the field in the database table is positioned for the POI point to obtain the true location information of the POI point. The positioning service is used to locate the POI point and obtain the longitude and latitude and other location information of the POI point. In this embodiment, the preset positioning service is not specifically limited. The location information of the geographical location represented by the field in the database table is determined as the simulation data under the field in the database table.

[0101] The beneficial effect of this setting is that it can obtain location information for real POI points, improve the authenticity of simulation data, and facilitate project development and processing.

[0102] The embodiment of the present application can obtain the corresponding database table for the project to be processed. The fields in different database tables can be different, and different rules, i.e., data simulation configuration information, are configured for different fields. When it is necessary to simulate the field content under a field, simulation data can be automatically generated according to the corresponding data simulation configuration information. There is no need to develop data simulation services for different projects, nor is there any need to manually enter simulation data, which saves manpower and time, avoids errors in manual input, and improves the accuracy and efficiency of data simulation.

[0103] FIG4 is a flow chart of a method for generating simulation data provided in an embodiment of the present application, which is an optional embodiment based on the above embodiment.

[0104] In this embodiment, determining the data simulation configuration information corresponding to the fields in the database table can be further refined as follows: parsing the database table to obtain the fields in the database table; and determining the data simulation configuration information corresponding to the fields in the database table based on the association relationship between the preset fields and the data simulation configuration information.

[0105] As shown in FIG4 , the method includes the following steps:

[0106] S401: Obtain a database table of a project to be processed, parse the database table, and obtain fields in the database table.

[0107] For example, different projects may correspond to different database tables. For a project to be processed, the database table for the project to be processed is obtained. For example, the fields required for the project to be processed may be pre-determined, and a database table may be constructed and stored based on the required fields. When a database table is needed, the database table corresponding to the project to be processed is searched from the pre-stored database tables.

[0108] The database table of the project to be processed is parsed to obtain basic information of the table structure, which may include fields contained in the database table, the number of rows and columns in the database table, etc. That is, by parsing the database table, the fields in the database table can be obtained.

[0109] In this embodiment, obtaining the database table of the project to be processed includes: in response to the selection operation of the table creation statement, determining the table creation statement to be imported from a preset table creation statement library; wherein the table creation statement library includes multiple table creation statements, the table creation statement is a structured query statement, and the table creation statement is used to generate the database table of the project to be processed; based on the table creation statement to be imported, determining the database table of the project to be processed.

[0110] Specifically, a pre-stored database table can be directly retrieved, or a database table for a pending project can be constructed in real time. Constructing a database table requires the use of a table creation statement, which can be a SQL (Structured Query Language) statement used to generate the database table. Multiple table creation statements can be pre-stored, and these statements can form a table creation statement library.

[0111] When a database table needs to be constructed, the user can select the desired statement from a pre-stored set of table-building statements and import the selected statement to obtain the desired database table. For example, the user can select a table-building statement. In response to the selection, the table-building statement to be imported is determined from a preset library of table-building statements. Based on the imported table-building statement, the database table for the project to be processed is determined. For example, the user can sort and combine multiple selected table-building statements to obtain a complete SQL statement representing the database table.

[0112] The beneficial effect of this setting is that you can directly import table creation SQL statements according to actual business needs to create database tables, improve the flexibility of generating simulation data, facilitate user operations, and avoid users manually entering incorrect table creation statements.

[0113] S402: Determine the data simulation configuration information corresponding to the field in the database table according to the association relationship between the preset field and the data simulation configuration information.

[0114] For example, different data simulation configuration information can be configured for different fields, and the associations between the fields and the data simulation configuration information can be pre-stored. After the fields in the database table are determined, the data simulation configuration information corresponding to each field can be determined based on the associations between the fields and the data simulation configuration information. This allows for targeted simulation of field content based on different data simulation configuration information, improving the accuracy of simulated data generation.

[0115] In this embodiment, based on the association relationship between the preset fields and the data simulation configuration information, the data simulation configuration information corresponding to the fields in the database table is determined, including: determining the data type corresponding to the fields in the database table; wherein the data type represents the format of the data; based on the association relationship between the preset fields and the generation method of the simulation data, determining the generation method of the simulation data associated with the fields in the database table as the target generation method; based on the target generation method and the data type, generating the data simulation configuration information corresponding to the fields in the database table.

[0116] Specifically, different fields can correspond to different data types. The data type refers to the format of the data, that is, the format of the field content under the field. The format can be the character type and length of the field content. For example, if the field is "Number of Teachers and Students", the data type corresponding to this field can be a numeric value with a length of 4 digits. The data type corresponding to each field is pre-set. After determining the database table, you can determine the data type corresponding to the field in the database table.

[0117] The simulation data generation method is the rule to be followed for generating the simulation data. For example, the generation method can be random generation of simulation data or generation of simulation data with fixed values. Preset associations are established between different fields and simulation data generation methods. Based on the preset associations, the simulation data generation method associated with each field in the database table is determined as the target generation method for the field.

[0118] The data simulation configuration information can include the data type and target generation method corresponding to the field. That is, the data simulation configuration information corresponding to the field in the database table can be determined based on the data type and target generation method. For example, if the data type is a 16-character string and the target generation method is random generation, the data simulation configuration information can be determined to randomly generate a 16-character string.

[0119] The beneficial effect of this setting is that the data simulation configuration information includes the generation method and format of the simulation data, which enables accurate generation of simulation data, meets actual business needs, and facilitates project delivery.

[0120] S403: Generate simulation data for fields in a database table according to the data simulation configuration information.

[0121] For example, this step may refer to the above-mentioned step S102 and will not be described in detail.

[0122] The embodiment of the present application can obtain the corresponding database table for the project to be processed. The fields in different database tables can be different, and different rules, i.e., data simulation configuration information, are configured for different fields. When it is necessary to simulate the field content under a field, simulation data can be automatically generated according to the corresponding data simulation configuration information. There is no need to develop data simulation services for different projects, nor is there any need to manually enter simulation data, which saves manpower and time, avoids errors in manual input, and improves the accuracy and efficiency of data simulation.

[0123] FIG5 is a block diagram of a simulation data generation device provided by an embodiment of the present application. For ease of illustration, only the portion relevant to the embodiment of the present application is shown. Referring to FIG5 , the simulation data generation device 500 includes: an information determination unit 501 and a data generation unit 502.

[0124] The information determination unit 501 is configured to obtain a database table of a project to be processed and determine data simulation configuration information corresponding to fields in the database table; wherein the database table includes at least one field representing the type of simulation data required for the project to be processed; and the data simulation configuration information represents a method for generating the simulation data and a format of the simulation data;

[0125] The data generating unit 502 is configured to generate simulation data for the fields in the database table according to the data simulation configuration information.

[0126] Figure 6 is a structural block diagram of a simulation data generation device provided in an embodiment of the present application. As shown in Figure 6, the simulation data generation device 600 includes an information determination unit 601 and a data generation unit 602, wherein the data generation unit 602 includes a template acquisition module 6021, a code generation module 6022 and a code execution module 6023.

[0127] The template acquisition module 6021 is used to acquire a preset code template; wherein the preset code template is a template for generating a code for simulation data;

[0128] A code generation module 6022 is configured to generate data simulation code based on the data simulation configuration information corresponding to the fields in the database table and a preset code template; wherein the data simulation code is used to generate simulation data;

[0129] The code running module 6023 is used to run the data simulation code to generate simulation data under the fields in the database table.

[0130] In one example, the code generation module 6022 includes:

[0131] The code combining submodule is used to combine the data simulation configuration information corresponding to the fields in the database table with the preset code template to obtain the data simulation code.

[0132] In one example, the code combines submodules to:

[0133] Determine the position of the data simulation configuration information corresponding to the field in the database table in the preset code template as the position to be added;

[0134] Based on a preset template engine, the data simulation configuration information corresponding to the fields in the database table is added to the position to be added in the preset code template to obtain the data simulation code; wherein, the preset template engine is an engine for generating output text, and the output text represents the data simulation code.

[0135] In one example, the code execution module 6023 includes:

[0136] The timing operation submodule is used to regularly run the data simulation code according to a preset data generation cycle to generate simulation data under the fields in the database table.

[0137] In one example, the data simulation code is used to generate fixed data; the code execution module 6023 is specifically used to:

[0138] Generate a preset amount of fixed data, which is simulated data under the fields in the database table.

[0139] In one example, the data simulation code is used to generate random data in a preset format; the code execution module 6023 is specifically used to:

[0140] According to the preset format represented by the data simulation code, a preset amount of data is randomly generated as simulated data under the fields in the database table.

[0141] In one example, the data simulation code is used to generate data with increasing values; the code execution module 6023 is specifically used to:

[0142] According to the incremental interval represented by the data simulation code and based on a preset starting value, a preset amount of data is generated as simulated data under the field in the database table.

[0143] In one example, the data simulation code is used to generate data according to a preset calculation expression; the code execution module 6023 is specifically used to:

[0144] Based on a preset calculation expression represented by the data simulation code, the simulation data under the field in the database table is determined; wherein the calculation expression is a regular expression or a Spring expression language expression.

[0145] In one example, the data simulation code is used to obtain simulation data from a preset vocabulary; the code execution module 6023 is specifically used to:

[0146] Randomly select a preset number of data from a preset vocabulary as simulated data under the fields in the database table; or,

[0147] The traversal starts from the first data in the preset vocabulary, and a preset number of data are obtained, which are the simulated data under the fields in the database table.

[0148] In one example, a field in a database table represents a geographic location, and the data simulation code is used to obtain location information of the geographic location; the code execution module 6023 is specifically used to:

[0149] Determining the geographic location represented by the field in the database table;

[0150] Based on a preset positioning service, performing information point positioning processing on the geographical location represented by the field in the database table to obtain location information of the geographical location represented by the field in the database table;

[0151] The location information of the geographical location represented by the field in the database table is determined as the simulation data under the field in the database table.

[0152] In one example, the information determining unit 601 includes:

[0153] A parsing module, configured to parse the database table to obtain fields in the database table;

[0154] The information determination module is used to determine the data simulation configuration information corresponding to the field in the database table according to the association relationship between the preset field and the data simulation configuration information.

[0155] In one example, the information determination module includes:

[0156] A first determining submodule is configured to determine a data type corresponding to a field in the database table; wherein the data type represents a format of the data;

[0157] A second determining submodule is configured to determine, based on the association between the preset fields and the generation methods of the simulation data, a generation method of the simulation data associated with the fields in the database table as a target generation method;

[0158] The information generation submodule is used to generate data simulation configuration information corresponding to the fields in the database table according to the target generation method and the data type.

[0159] In one example, the information determining unit 601 includes:

[0160] A statement import module, configured to determine a table creation statement to be imported from a preset table creation statement library in response to a table creation statement selection operation; wherein the table creation statement library includes a plurality of table creation statements, each of which is a structured query statement and is used to generate a database table for a project to be processed;

[0161] The table determination module is used to determine the database table of the project to be processed according to the table creation statement to be imported.

[0162] In one example, the information determining unit 601 includes:

[0163] The table import module is used to determine a target database table from the historical database table in response to a selection operation on the historical database table, which is a database table of a project to be processed; wherein the fields in the historical database table correspond to pre-stored data simulation configuration information.

[0164] According to an embodiment of the present application, the present application also provides an electronic device.

[0165] Figure 7 is a structural block diagram of an electronic device provided in an embodiment of the present application. As shown in Figure 7, the electronic device 700 includes: at least one processor 702; and a memory 701 communicatively connected to the at least one processor 702; wherein the memory stores instructions that can be executed by the at least one processor 702, and the instructions are executed by the at least one processor 702 to enable the at least one processor 702 to execute the simulation data generation method of the present application.

[0166] The electronic device 700 further includes a receiver 703 and a transmitter 704. The receiver 703 is used to receive instructions and data sent by other devices, and the transmitter 704 is used to send instructions and data to external devices.

[0167] According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.

[0168] According to an embodiment of the present application, the present application also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0169] FIG8 shows a schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0170] As shown in Figure 8, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0171] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0172] The computing unit 801 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the method for generating simulated data. For example, in some embodiments, the method for generating simulated data can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the method for generating simulated data described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the method for generating simulated data by any other appropriate means (e.g., by means of firmware).

[0173] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0174] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow charts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0175] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0176] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0177] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0178] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.

[0179] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved. This is not limited herein.

[0180] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for generating simulation data, comprising: Obtaining a database table of the project to be processed, and determining data simulation configuration information corresponding to a field in the database table; wherein the database table includes at least one field, and the field represents the type of simulation data required for the project to be processed; and the data simulation configuration information represents the generation method of the simulation data and the format of the simulation data; According to the data simulation configuration information, simulated data under the fields in the database table are generated.

2. The method according to claim 1, wherein: The step of generating simulation data for fields in the database table according to the data simulation configuration information includes: Obtaining a preset code template; wherein the preset code template is a template for generating a code for simulation data; According to the data simulation configuration information corresponding to the fields in the database table, based on a preset code template, a data simulation code is generated; wherein the data simulation code is used to generate simulation data; The data simulation code is run to generate simulation data under the fields in the database table.

3. The method according to claim 2, wherein: The step of generating data simulation code according to the data simulation configuration information corresponding to the fields in the database table and based on a preset code template includes: The data simulation configuration information corresponding to the fields in the database table is combined with the preset code template to obtain the data simulation code.

4. The method according to claim 3, wherein: The step of combining the data simulation configuration information corresponding to the fields in the database table with the preset code template to obtain the data simulation code includes: Determine the position of the data simulation configuration information corresponding to the field in the database table in the preset code template as the position to be added; Based on a preset template engine, the data simulation configuration information corresponding to the fields in the database table is added to the position to be added in the preset code template to obtain the data simulation code; wherein the preset template engine is an engine for generating output text, and the output text represents the data simulation code.

5. The method according to claim 2, wherein: The step of running the data simulation code to generate simulation data for the fields in the database table includes: According to a preset data generation cycle, the data simulation code is run regularly to generate simulation data under the fields in the database table.

6. The method according to claim 5, wherein: The generating of simulation data under the fields in the database table includes: Generate a preset number of fixed data, which are simulated data under the fields in the database table; or, According to the preset format represented in the data simulation code, a preset amount of data is randomly generated as simulated data under the fields in the database table; or, According to the increment interval represented in the data simulation code and based on a preset starting value, a preset amount of data is generated as simulated data under the field in the database table; or, Determine the simulated data under the field in the database table based on the preset calculation expression represented by the data simulation code; wherein the calculation expression is a regular expression or a Spring expression language expression; or, Randomly select a preset number of data from a preset word library as simulated data under the fields in the database table; or, Start traversing from the first data in the preset word library to obtain a preset amount of data, which is the simulated data under the field in the database table; or, Determine the geographical location represented by the field in the database table; based on a preset positioning service, perform information point positioning processing on the geographical location represented by the field in the database table to obtain the location information of the geographical location represented by the field in the database table; determine the location information of the geographical location represented by the field in the database table as simulated data under the field in the database table.

7. The method according to claim 1, wherein: The step of determining the data simulation configuration information corresponding to the field in the database table includes: Parsing the database table to obtain fields in the database table; According to the association relationship between the preset fields and the data simulation configuration information, the data simulation configuration information corresponding to the fields in the database table is determined.

8. The method according to claim 7, wherein: The step of determining the data simulation configuration information corresponding to the field in the database table according to the association relationship between the preset field and the data simulation configuration information includes: Determine the data type corresponding to the field in the database table; wherein the data type represents the format of the data; According to the association relationship between the preset fields and the generation method of the simulation data, the generation method of the simulation data associated with the fields in the database table is determined as the target generation method; According to the target generation method and the data type, data simulation configuration information corresponding to the fields in the database table is generated.

9. The method according to claim 7, wherein: The step of obtaining a database table of items to be processed includes: In response to the selection operation of the table building statement, determining the table building statement to be imported from a preset table building statement library; wherein the table building statement library includes a plurality of table building statements, the table building statement is a structured query statement, and the table building statement is used to generate a database table of the project to be processed; According to the table creation statement to be imported, a database table of the project to be processed is determined.

10. The method according to any one of claims 1 to 9, wherein: The step of obtaining a database table of items to be processed includes: In response to the selection operation on the historical database table, a target database table is determined from the historical database table as the database table of the project to be processed; wherein the fields in the historical database table correspond to pre-stored data simulation configuration information.

11. A device for generating simulation data, comprising: An information determination unit, used to obtain a database table of a project to be processed, and determine data simulation configuration information corresponding to a field in the database table; wherein the database table includes at least one field, and the field represents the type of simulation data required for the project to be processed; the data simulation configuration information represents the generation method of the simulation data and the format of the simulation data; A data generating unit is used to generate simulation data under the fields in the database table according to the data simulation configuration information.

12. The device according to claim 11, wherein The data generating unit comprises: A template acquisition module, used to acquire a preset code template; wherein the preset code template is a template for generating a code for simulation data; A code generation module, used to generate data simulation code according to the data simulation configuration information corresponding to the fields in the database table and based on a preset code template; wherein the data simulation code is used to generate simulation data; The code running module is used to run the data simulation code to generate simulation data under the fields in the database table.

13. The device according to claim 12, wherein: The code generation module comprises: The code combining submodule is used to combine the data simulation configuration information corresponding to the fields in the database table with the preset code template to obtain the data simulation code.

14. The device according to claim 13, wherein: The code is combined with submodules, specifically used for: Determine the position of the data simulation configuration information corresponding to the field in the database table in the preset code template as the position to be added; Based on a preset template engine, the data simulation configuration information corresponding to the fields in the database table is added to the position to be added in the preset code template to obtain the data simulation code; wherein the preset template engine is an engine for generating output text, and the output text represents the data simulation code.

15. The device according to claim 12, wherein: The code running module includes: The timed operation submodule is used to regularly run the data simulation code according to a preset data generation cycle to generate simulation data under the fields in the database table.

16. The device according to claim 15, wherein: The code execution module is specifically used for: Generate a preset number of fixed data, which are simulated data under the fields in the database table; or, According to the preset format represented in the data simulation code, a preset amount of data is randomly generated as simulated data under the fields in the database table; or, According to the increment interval represented in the data simulation code and based on a preset starting value, a preset amount of data is generated as simulated data under the field in the database table; or, Determine the simulated data under the field in the database table based on the preset calculation expression represented by the data simulation code; wherein the calculation expression is a regular expression or a Spring expression language expression; or, Randomly select a preset number of data from a preset word library as simulated data under the fields in the database table; or, Start traversing from the first data in the preset word library to obtain a preset amount of data, which is the simulated data under the field in the database table; or, Determine the geographical location represented by the field in the database table; based on a preset positioning service, perform information point positioning processing on the geographical location represented by the field in the database table to obtain the location information of the geographical location represented by the field in the database table; determine the location information of the geographical location represented by the field in the database table as simulated data under the field in the database table.

17. The device according to claim 11, wherein: The information determining unit comprises: A parsing module, used to parse the database table to obtain fields in the database table; The information determination module is used to determine the data simulation configuration information corresponding to the field in the database table according to the association relationship between the preset field and the data simulation configuration information.

18. The device according to claim 17, wherein: The information determination module comprises: A first determination submodule is used to determine the data type corresponding to the field in the database table; wherein the data type represents the format of the data; A second determination submodule is used to determine the generation method of the simulation data associated with the field in the database table as the target generation method according to the association relationship between the preset field and the generation method of the simulation data; The information generation submodule is used to generate data simulation configuration information corresponding to the fields in the database table according to the target generation method and the data type.

19. The device according to claim 17, wherein: The information determining unit comprises: A statement import module, used for determining a table building statement to be imported from a preset table building statement library in response to a selection operation of a table building statement; wherein the table building statement library includes a plurality of table building statements, the table building statement is a structured query statement, and the table building statement is used to generate a database table of a project to be processed; The table determination module is used to determine the database table of the project to be processed according to the table creation statement to be imported.

20. The device according to any one of claims 11 to 19, wherein: The information determining unit comprises: The table import module is used to determine a target database table from the historical database table in response to a selection operation on the historical database table, which is a database table of the project to be processed; wherein the fields in the historical database table correspond to pre-stored data simulation configuration information.

21. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.

23. A computer program product, wherein: The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 10 when being executed by a processor.

Citation Information

Patent Citations

  • Analog data generation method, device and equipment and storage medium

    CN112306881A

  • Business processing method and device, electronic equipment and computer readable storage medium

    CN115374207A

  • Data processing method and device, computer program product, equipment and storage medium

    CN116263659A

  • Simulation data generation method and device, electronic equipment and storage medium

    CN117435593A

  • Data protection method and device and storage medium

    US20200301917A1

Cited By

  • Simulation data generation method and device for evaluating large model, medium and equipment

    CN120596930A