Data warehousing method and device, electronic equipment and storage medium

By introducing the differentiation between imported and computational data, format checking in the temporary storage area, and data slicing for storage, the inefficiency and uniformity of existing data systems have been solved, enabling efficient and diversified data acquisition and intelligent analysis report generation.

CN118838947BActive Publication Date: 2026-11-27BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310445488.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-23
Publication Date
2026-11-27
Estimated Expiration
2043-04-23

AI Technical Summary

Technical Problem

Existing data systems are inefficient in acquiring and processing traffic big data reports, unable to meet diverse data acquisition needs, have poor scalability of configuration files, use only one data acquisition format, and cannot perform further calculations and integration, resulting in a poor user experience.

Method used

It introduces a distinction between incoming data and computational data, performs data preprocessing through database configuration files, introduces a temporary storage area as an intermediate layer for format checking and data slicing for storage, supports multi-threaded access and periodic data updates, and adapts to 3D data formats and complex mapping relationships.

Benefits of technology

It improves the efficiency and accuracy of data acquisition, reduces direct database operations, enhances user experience, and supports diverse data acquisition and intelligent analysis report generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118838947B_ABST
    Figure CN118838947B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of big data, in particular to the technical field of data storage, and more particularly to a data storage method and device, an electronic device and a storage medium. The specific implementation scheme is as follows: obtaining incoming data from a data source according to a database configuration file; the incoming data is original data directly obtained from the data source; calculating and processing the incoming data according to the database configuration file to obtain calculated data; wherein the calculated data is obtained by integrating and calculating the incoming data; and writing the incoming data and the calculated data into a database. By integrating and calculating the incoming data to obtain the calculated data before storing the data, the user can directly obtain the incoming data and the calculated data from the database, thereby improving the data acquisition efficiency and meeting the user's diversified data acquisition requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of big data technology, specifically to the field of data storage technology, and in particular to data entry methods, devices, electronic devices, and storage media. Background Technology

[0002] In the field of business intelligence, data is always the most important element. Among all BI (Business Intelligence) tools, acquiring and processing data is the most critical step, as data quality directly impacts the final product output. In the traffic big data report BI product, intelligent interpretation reports are generated by combining user-configured report templates with selected time and location metrics from database data.

[0003] Because big data reports require complete data, we need to iterate through the database interface, returning one piece of data each time. In addition, we need to integrate and calculate the data obtained from the database. This process is very complex, the way of obtaining data is very inefficient, and the format of the obtained data is also very limited, which cannot meet the diverse data acquisition needs of users. Summary of the Invention

[0004] This disclosure provides a data entry method, apparatus, electronic device, storage medium, and intelligent transportation data system.

[0005] According to a first aspect of this disclosure, a data import method is provided, comprising:

[0006] The incoming data is obtained from the data source according to the database configuration file; wherein, the incoming data is the raw data obtained directly from the data source.

[0007] The input data is processed according to the database configuration file to obtain computed data; wherein, the computed data is obtained by integrating and calculating the input data.

[0008] Write the input data and the computational data into the database.

[0009] According to a second aspect of this disclosure, a data entry device is provided, comprising:

[0010] The first data generation module is configured to obtain incoming data from the data source according to the database configuration file; wherein, the incoming data is raw data obtained directly from the data source;

[0011] The second data generation module is configured to perform calculations on the input data according to the database configuration file to obtain calculated data; wherein the calculated data is obtained by integrating and calculating the input data.

[0012] The data entry module is configured to write the input data and the computational data into the database.

[0013] According to a third aspect of this disclosure, an electronic device is provided, comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any of the above technical solutions.

[0017] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any one of the methods described above.

[0018] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in any one of the above technical solutions.

[0019] According to a sixth aspect of this disclosure, an intelligent transportation data system is provided, including the electronic device described in the above-described technical solutions.

[0020] This disclosure provides a data entry method, apparatus, electronic device, storage medium, and intelligent transportation data system, which improves data acquisition efficiency and meets users' more diverse data acquisition needs.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0022] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0023] Figure 1 This is a schematic diagram of the structure of a data entry system in the existing technology;

[0024] Figure 2This is a schematic diagram of the steps of the data entry method in this embodiment of the disclosure;

[0025] Figure 3 This is a schematic diagram of the data entry system in an embodiment of this disclosure;

[0026] Figure 4 This is a diagram of the product-side display interface for updating metrics in this embodiment of the disclosure;

[0027] Figure 5 This is a schematic diagram of the data entry device in an embodiment of this disclosure;

[0028] Figure 6 This is a schematic diagram of the data entry module in this embodiment of the disclosure;

[0029] Figure 7 This is a block diagram of an electronic device used to implement the data entry method of the embodiments of this disclosure. Detailed Implementation

[0030] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0031] like Figure 1 As shown, existing data systems primarily acquire and process data for storage based on road network files, configuration files, and user-input dates. This data acquisition method is highly inefficient and uses a limited range of data types, failing to meet diverse data acquisition needs. For example… Figure 1 When data is imported, the system can only request raw data from the data source (upstream database) through a data interface. This raw data undergoes simple processing to generate input-type data, which refers to relatively straightforward data from the raw data, such as traffic flow and speed at a certain intersection at a certain time. However, it cannot provide complex data for generating intelligent analysis reports, such as the congestion index at a certain intersection at a certain time. Congestion index data requires further calculation and integration based on the input-type data, for example, by comprehensively calculating based on indicators such as traffic flow and speed at the intersection. With the current data system only providing input-type data, users must perform calculations and integrations on this data after obtaining it to generate an intelligent report, resulting in very low data acquisition efficiency for users.

[0032] The existing road network file provides road network information for a city, such as the number of intersections and the ID (Identity Document) for each intersection. This ID is the same as the one used when accessing the data interface. Therefore, when we need to retrieve indicator data for all intersections, we first load the IDs corresponding to all intersections in the road network file, and then retrieve the corresponding data from the upstream database based on the intersection ID. For example, if the ID for a certain intersection is "R0001", and we need to retrieve the traffic flow at that intersection at 10:00 AM, the system can retrieve the corresponding traffic flow from the upstream database based on the ID "R0001".

[0033] The existing data system's configuration file primarily determines which metric data needs to be generated, and this configuration file can be pre-configured manually. Each line in the configuration file represents a metric, and the configuration file also specifies how data should be fed into each metric, such as defining the metric's name, access address, and time granularity (15-minute or hourly). However, currently, the request parameters in the configuration file are fixed and cannot handle diverse data requests.

[0034] Existing data systems rely solely on user-inputted dates when acquiring data, offering no routine tasks. For example, if a user inputs "March 1, 2023," only data for March 1, 2023, will be retrieved. When the system is designated to retrieve data for a specific date (which could be a single day's data or monthly aggregated data), it iterates through all metrics in the configuration file to obtain the data. The data system first categorizes all metrics according to road type (intersections, roads, etc.). Once the metric data for one road type is completed, the system updates this metric data to the big data reporting system's database.

[0035] The biggest problem with the existing data system is its extremely poor scalability of configuration files. Because the original data sources had very simple data formats, each interface only needed to send a fixed ID, frequency, and start / end time when retrieving data; the request format was fixed. However, as business needs grow, more and more data formats emerge, and the fixed format for sending data requests can no longer meet the demands of diverse data retrieval. For example, previously, the time format for data retrieval was "2022-03-26 8:00:00," but after data expansion, our data format might include "20220326" or only monthly times. Furthermore, previously, there was a one-to-one correspondence between data source interfaces and our metrics, but with business growth, the relationships between data source interfaces and reporting system metrics have become one-to-many and many-to-one, and the current configuration file design completely fails to meet this requirement.

[0036] The scalability limitations of the existing data system are also reflected in the limited data acquisition methods. As business requirements increase, we need to acquire data not only from traffic management data sources but also integrate, calculate, and rank existing data in the database. For example, we might need to know the top 10 most congested intersections in a region on a given date, along with their corresponding congestion indices and average vehicle speeds; or we might need to know the most congested time periods in a region, along with their corresponding congestion indices and average vehicle delays. The current configuration files can only guide us in acquiring data but cannot perform further calculations based on existing data.

[0037] The efficiency of data acquisition, storage, and product presentation in the existing data system is also an issue. When we want to obtain a day's data for a city's road network, we need to traverse several road types and access different metrics for thousands of units. Currently, handling millions of accesses takes nearly a day, and the instability of the on-site interface frequently places unnecessary burdens on our data system. We also don't check existing data in the database during the storage process; there's no need to re-acquire existing and complete data. When we want to present the data to the product side, we need to manually add metrics, so updating metrics becomes extremely cumbersome when the number of metrics is particularly large.

[0038] To address the aforementioned technical problems in the prior art, this disclosure provides a data import method, such as... Figure 2 As shown, it includes:

[0039] Step S201: Obtain incoming data from the data source according to the database configuration file; wherein, the incoming data is the raw data obtained directly from the data source.

[0040] For example, the raw data may include: user data obtained from data sources (data collected with user authorization), such as traffic data provided by map apps. This type of data can be generated based on mobile terminals and includes, but is not limited to, user real-time location information, driving speed information, etc.; public transportation data, such as public transportation card terminal systems. By analyzing transportation card data and public transportation vehicle GPS data, it is possible to analyze the number of citizens taking public transportation, data on boarding and alighting vehicles, and the number of people entering and leaving stations at any time. It is also possible to analyze the passenger situation on key routes, key stations, and key periods at any time; video surveillance system data, including road monitoring equipment installed by traffic management departments, as well as monitoring networks installed by emergency, education, urban management, and other departments. In particular, high-definition video cameras can accurately record detailed vehicle information such as vehicle type, vehicle license plate, and vehicle speed. Combined with facial recognition technology, some intersections have installed multi-functional electronic police equipment and pedestrian red-light violation capture equipment, which can quickly and accurately obtain pedestrian crossing information; urban vehicle GPS data, such as location information data of taxis, ride-hailing vehicles, and other transportation vehicles. This data can also expand road condition data. Through network connection with traffic management departments, it can also provide supplementary data for real-time monitoring of various road sections and various types of vehicles.

[0041] The database configuration file is pre-configured manually and includes multiple target parameters, such as road type, indicator name, and data type as shown in Table 1. These target parameters are not limited to those listed in Table 1 and can be added based on real-world application scenarios. The database configuration file guides the system to preprocess the raw data before it is imported into the database. It determines which indicator data needs to be generated and how to generate it based on one or more target parameters. As shown in Table 1, each line in the configuration file represents an indicator. The configuration file also specifies how data should be imported for each indicator, such as determining the indicator name, access address, and time granularity (15-minute or hourly).

[0042]

[0043] Table 1. Target parameters contained in the database configuration file

[0044] like Figure 3 As shown, incoming data refers to data that needs to be obtained by accessing a data source interface. In this embodiment, the data source interface can be the traffic management API (Application Programming Interface) interface 305. Incoming data can be raw data obtained directly from a data source (such as an upstream database) through the traffic management API interface 305, such as the user's real-time location information, driving speed on a certain road, etc.

[0045] Step S202, according to database configuration file 301 ( Figure 3 The config file shown performs calculations on the input data to obtain computed data; the computed data is obtained by integrating and calculating the input data and cannot be directly obtained from the data source.

[0046] As shown in Table 1 and Figure 3 As shown, to adapt to more diverse data acquisition needs, this disclosure divides data into input data and computational data. Computational data requires further integration and calculation of the acquired input data. For example, based on the user's real-time location information and driving speed information (input data), road traffic congestion status (computational data) can be calculated. Traffic management departments can obtain a large amount of real-time basic user data through interface methods. The system integrates and calculates the massive amount of input data to obtain computational data.

[0047] Step S203: Write the input data and the calculated data into the database.

[0048] By storing both input and computational data into a database, the database becomes more diverse in its data types. When needed, input and / or computational data can be directly retrieved from the database and quickly fed back to the user via the app. This ensures high accuracy, real-time performance, and reliability of the data, while also reducing the cost and difficulty of data acquisition. The generated computational data can also be directly used to create intelligent analysis reports required by the user. This eliminates the need for further integration and computation of the computational data after it is obtained, significantly improving data acquisition efficiency and user experience.

[0049] As an optional implementation method, such as Figure 3 As shown, step S203, writing the input data and calculated data into the database, includes:

[0050] Write the input data and the calculated data to the temporary storage file 302.

[0051] Check whether the data formats of the imported and calculated data in the temporary storage file 302 are consistent with the preset data formats in the database configuration file;

[0052] In response to the fact that the data format of the incoming data and the calculated data is consistent with the preset data format, the incoming data and the calculated data are written from the temporary storage file 302 to the database 303;

[0053] In response to the inconsistency between the data format of the input data and the calculation data and the preset data format, the data format of the input data and the calculation data is modified to be consistent with the preset data format, and then the modified input data and the calculation data are written from the temporary storage file to the database.

[0054] like Figure 3 As shown, the data import system in this embodiment introduces a staging area as an intermediate layer between data acquisition and data import. The staging area can store data locally in CSV (Comma-Separated Values) format. Data import is also performed by writing queries through these CSV files. Besides CSV, other formats are also possible. The main purpose of introducing a staging area is to reduce the number of interactions between the data system and the database, as excessive direct read and write operations to the database are insecure. Directly writing data to the database when the completeness of the data source is uncertain can compromise database security. For example, if a data task requires 10 write operations, but an error occurs or a data quality problem is discovered during the 5th write operation, it is necessary not only to locate the problem in the data source but also to delete the erroneous data already imported into the database, which is an insecure operation for the database. Therefore, in this embodiment, the data from each access is first written to a staging area file in CSV format. When the data task is completed and the data format of all data is confirmed to be correct, all data in the staging area file is then updated to the database. In this way, for a single data reading task, the system will only perform one database update write operation, thus improving the security of database read and write operations.

[0055] For example, before data in the staging area file is written to the database, a format checking program automatically checks the data format to confirm whether there are any errors. It checks whether the data format of all data in the staging area file is consistent with the preset data format in the database configuration file. It also checks whether each column of imported and calculated data in CSV format is consistent with the database configuration file. For example, according to the database configuration file in Table 1, the first column of the data is "Road Type," so it checks whether the first column of the data in the staging area file is also "Road Type," and checks whether each column has any null values. Once it is confirmed that the data format of all data in the staging area file meets the requirements of the database configuration file, i.e., it is consistent with the preset data format, the data is confirmed to be error-free, and then the data in the staging area is written to the database. If some data in the staging area file is found to have incorrect format, the data format is modified until all data formats meet the requirements of the database configuration file before being written to the database, thereby ensuring database security.

[0056] As an optional implementation, step S203, writing the input data and computational data into the database, includes: processing the input data and computational data into multiple data slices; and writing the multiple data slices into the database in batches from the temporary storage file.

[0057] As mentioned earlier, existing data systems send numerous data requests to the data source when acquiring data, a process that takes a significant amount of time. The data system in this embodiment provides a multi-threaded mode when accessing the interface, thereby significantly reducing access time. During the stage of inserting data from the temporary storage area into the database, data slicing is also used to accelerate the insertion process. When CSV data has tens of thousands of rows, writing it using a single insert statement or writing it row by row is extremely time-consuming. Therefore, during data insertion, the data in a large CSV file can be inserted in batches of 500 rows each. This batch insertion method can save a significant amount of data insertion time.

[0058] As an optional implementation, obtaining incoming data from the data source according to the database configuration file includes:

[0059] The data execution time period is retrieved, which includes either a user-input date or a preset date. The user-input date refers to the date entered by the user in real time, indicating which time period of data the user wants to retrieve, such as data for March 1, 2023. The preset date can be a date pre-set in the data system, such as retrieving the previous day's data at 1:00 AM every day.

[0060] Based on the database configuration file, the raw data corresponding to the data execution time period is obtained from the data source as the input data.

[0061] For example, the data execution period can be a date actively entered by the user or a preset date, meaning it supports scheduled execution of data tasks. To make data task execution more convenient during product deployment, two new functions have been added: one-click initialization and startup of the data system, and scheduled tasks. When users run our data system, they can also leave the date blank, and the system will automatically run the daily data for the previous 14 days, the weekly data for the previous two weeks, and the monthly data for the previous two months to assist in generating daily, weekly, and monthly reports for traffic management scenarios. Users can also pre-set the data system to run the data for the previous day, week, and month at 1:00 AM every day, every Monday, and the 1st of every month. In this way, users don't need to manually enter any dates; the data system will automatically obtain all the data for the dates the user needs, improving the convenience of data access.

[0062] As an optional implementation, obtaining incoming data from the data source according to the database configuration file also includes:

[0063] like Figure 3 As shown, the first target parameter corresponding to the input data is obtained from the database configuration file 301;

[0064] Obtain the identification code corresponding to each road in the incoming data from the road network file 304; the incoming data is traffic data, and the road network file includes the identification code corresponding to each road in the traffic data and the hierarchical relationship between each road;

[0065] Based on the identification code and the first target parameter, the corresponding raw data is obtained from the data source as the input data.

[0066] As shown in Table 1, when the types of data sources and the required metrics increase, the request parameters for many data points will also differ, and some data require specific granularity, such as some metrics that only have monthly data. To better handle these complex scenarios, we have added metrics such as data type, metric retrieval granularity, and request parameters. Data type determines whether the metric is input-type or computational-type data. Metric retrieval granularity helps avoid invalid accesses; if an interface only has monthly data, a daily data task will not access it. Request parameters specify the necessary headers for accessing an interface; each header corresponds to a specific return data style.

[0067] Table 1 categorizes request parameters and addresses into range requests and aggregation requests. Range request parameters and addresses help obtain daily data, such as the congestion index of an intersection every 15 minutes within a 24-hour period. Aggregation request parameters and addresses help obtain aggregated data for multiple days (weekly, monthly), such as the congestion index of a specific intersection every 15 minutes within a 24-hour period each day of a month in a year. Data for an indicator can be for a single day or a single month, but the interface addresses and request parameters for daily and monthly data are different, so we use two separate fields to distinguish them. When the system runs a data task for a specific date or month, it can select the appropriate range or aggregation interface to obtain the data based on the database configuration file. Through the above technical solution, richer input data is generated based on the target parameters provided in the database configuration file and the IDs provided in the road network file.

[0068] The road network file is a PB file (P stands for protocol; B stands for buffer), which is a map of a city, providing road network information such as the number of intersections and their IDs. These IDs are the same as those used when accessing the data interface, so when we need to obtain indicator data for all intersections, the system can first load all the IDs from the road network file. In this embodiment, in addition to providing all IDs for different road types, the road network file also provides the hierarchical relationships between different road types. For example, a region may have sub-regions, and each sub-region may have different roads, and each road may have different road segments and intersections. Based on the IDs and hierarchical relationships provided by the road network file, richer indicator data can be obtained when generating computational data.

[0069] As an optional implementation, existing data systems only have one-dimensional and two-dimensional data formats, while the data system in this embodiment is adapted to the newly added three-dimensional data. One-dimensional data refers to a single numerical value or text, which generally appears in the database as integer, float, or text. Multi-dimensional data is generally stored in the database using the JSONB format, and different types of JSONB data have different classification rules, such as KV (Kivy source code files), SIV, etc. All JSONB data is stored in the database in the form of doubly linked lists, and the dimension of the JSONB data corresponds to the length of each inner list. The length of the name of each type of JSONB data corresponds to its dimension, and each character in the name represents a different meaning. Two-dimensional JSONB data is generally in KV format, with each inner array containing a key-value pair, in a format such as: [["7:30–9:00", 1.354], ["17:20–19:05", 1.345]...].

[0070] As traffic management data becomes increasingly complex, two-dimensional data storage formats can no longer meet users' data acquisition needs. For example, when a data source provides frequently occurring congestion periods for a given month, along with data on different indicators during these periods, users may require data in a third dimension. The newly added three-dimensional JSONB format can extend the two-dimensional model. As shown in Table 2, this embodiment adds three characters: Space (S), Time (T), and Index (I). For example, the TIV format indicates that the first value in each array represents the time period, the second value represents the index, and the third is the corresponding value.

[0071] character illustrate V Value K Key S Space T Time I Index

[0072] Table 2. Character Descriptions for 3D Data

[0073] Table 3 presents the TIV-formatted JSONB data in tabular form. By expanding the data dimensions, it extends one-dimensional and two-dimensional data to three-dimensional data, adapting to complex data. Further selections can be made in the database configuration file for different times, indices, and spaces. For example, when retrieving TIV-formatted JSONB data, the data source might return five indices, but the user might only select three. In this case, simply add the three indices selected by the user to the "Select Indices" field in the configuration file (all are selected by default).

[0074] 07:30-09:00 17:30-19:05 average speed 42.83 44.691 Congestion duration 90 105 Congestion Index 1.354 1.345 Congestion Mileage 28.884 24.024

[0075] Table 3. JSONB data in TIV format

[0076] As an optional implementation, to address the technical problem that existing data system configuration files, where each indicator corresponds to a data interface in a one-to-one mapping relationship, cannot adapt to complex data, this embodiment extends the data system with one-to-many and many-to-one indicator and interface mapping relationships to adapt to more complex data.

[0077] For example, the first scenario involves multiple data sources simultaneously providing data for an indicator in a single database configuration file. As mentioned earlier, range-based and aggregate-based data requests are typical examples of many-to-one mapping relationships, allowing an indicator to simultaneously possess daily, weekly, and monthly data. Another type of many-to-one mapping relationship involves multiple data sources providing data at the same granularity. For instance, a data source might have three types: sub-roads, parent roads, and trunk roads, but our indicator is road-specific, encompassing all three road types. To enable our road indicator data to attempt to retrieve data from all three data interfaces, we can include all three request addresses in the request address field of the database configuration file. This allows the data system to traverse these data source interfaces and find the appropriate data to retrieve.

[0078] Furthermore, the data system also supports a single data source providing data on multiple different metrics. For example, an interface might provide congestion metrics every 5 minutes for each of the 24 hours of a given day or month. This congestion metric data includes indicators such as congestion index and congestion mileage in dictionary form. To create a five-minute congestion index metric, the system can access this data source and select the "Congestion Index" metric using the "Select Index" field. By selecting the index field, we can use this data source to create separate metrics such as congestion index and congestion mileage, thus achieving a many-to-one mapping relationship.

[0079] As an optional implementation, the computational data obtained by processing the input data according to the database configuration file includes:

[0080] Retrieve the second target parameter corresponding to the computational data from the database configuration file;

[0081] Extract the identification code and hierarchical relationship for each road from the computational data in the road network file;

[0082] Based on the identification code, hierarchical relationship, and second target parameter, the input data is processed to obtain the corresponding second indicator data as the calculated data; wherein, the calculation process includes at least one of the following: extracting, integrating, and ranking the input data.

[0083] For example, the establishment of computational data indicators is a key function of this publicly available data system. The system can not only access and adapt to various data interfaces provided by traffic management, but also integrate, calculate, and rank the acquired input data. The system extracts, integrates, and ranks the acquired input data through configuration file fields such as indicator name, data type, data format, selected index, selected time period, and selected area. For instance, to find out which intersections are most congested in a specific area on a given day, during a specific time period, or during morning and evening rush hours, one can select the 3D JSONB STV format in the database configuration file, declare the top five congestion index rankings in the selected area, and declare the time periods as all day, morning rush hour, and evening rush hour. The data system can interpret the parameters in the database configuration file and ultimately calculate the data required by the user, as shown in Table 4.

[0084]

[0085] Table 4. Examples of Computational Data

[0086] As an optional implementation method, such as Figure 3 As shown, data import methods also include:

[0087] Regularly read data from the product side;

[0088] Determine if there are discrepancies between the product-side data and the database configuration file;

[0089] In response to discrepancies between product-side data and database configuration files, the differences between the product-side data and database configuration files are written to a temporary storage file.

[0090] If there is no discrepancy between the product-side data and the database configuration file, return a periodic read of the product-side data;

[0091] After writing the difference data to the temporary storage file, check whether the data format of the difference data is consistent with the preset data format.

[0092] In response to the fact that the data format of the difference data is consistent with the preset data format, the difference data is written from the temporary storage file to the database.

[0093] In response to the discrepancy between the data format of the differential data and the preset data format, the data format of the differential data is modified to match the preset data format, and the differential data is written from the temporary storage file to the database.

[0094] Specifically, when new types of data need to be imported into the database, the database configuration file may need to be modified or reconfigured to accommodate the new data import. If the data configuration on the product side is not modified, it may lead to discrepancies between the product side's data configuration and the database configuration file. Therefore, it is advisable to periodically read the product side's data and update the product side's data, as well as the data to be imported into the database in the staging area file, to ensure consistency between the product side's data and the database.

[0095] As an optional implementation method, such as Figure 3 As shown in the architecture diagram, the data system has added a module to display updated metrics for product-side data. Existing data systems complete their task after data is entered into the database. However, to display these updated metrics on the product side, each metric needs to be added individually at the product level. When the number of new metrics is large, this step consumes a significant amount of time. Therefore, the data system in this embodiment automatically displays updated metrics on the product side (306), such as... Figure 4 As shown, after the data is successfully imported into the database, the system automatically updates and displays the changed metrics on the product side.

[0096] This disclosure also provides a data entry device 500, such as... Figure 5 As shown, it includes:

[0097] The first data generation module 501 is configured to obtain incoming data from the data source according to the database configuration file; wherein, the incoming data is the raw data obtained directly from the data source.

[0098] For example, the raw data may include: user data obtained from data sources (data collected with user authorization), such as traffic data provided by map apps. This type of data can be generated based on mobile terminals and includes, but is not limited to, user real-time location information, driving speed information, etc.; public transportation data, such as public transportation card terminal systems. By analyzing transportation card data and public transportation vehicle GPS data, it is possible to analyze the number of citizens taking public transportation, data on boarding and alighting vehicles, and the number of people entering and leaving stations at any time. It is also possible to analyze the passenger situation on key routes, key stations, and key periods at any time; video surveillance system data, including road monitoring equipment installed by traffic management departments, as well as monitoring networks installed by emergency, education, urban management, and other departments. In particular, high-definition video cameras can accurately record detailed vehicle information such as vehicle type, vehicle license plate, and vehicle speed. Combined with facial recognition technology, some intersections have installed multi-functional electronic police equipment and pedestrian red-light violation capture equipment, which can quickly and accurately obtain pedestrian crossing information; urban vehicle GPS data, such as location information data of taxis, ride-hailing vehicles, and other transportation vehicles. This data can also expand road condition data. Through network connection with traffic management departments, it can also provide supplementary data for real-time monitoring of various road sections and various types of vehicles.

[0099] The database configuration file is pre-configured manually and includes multiple target parameters, such as road type, indicator name, and data type as shown in Table 1. These target parameters are not limited to those listed in Table 1 and can be added based on real-world application scenarios. The database configuration file guides the system to preprocess the raw data before it is imported into the database. It determines which indicator data needs to be generated and how to generate it based on one or more target parameters. As shown in Table 1, each line in the configuration file represents an indicator. The configuration file also specifies how data should be imported for each indicator, such as determining the indicator name, access address, and time granularity (15-minute or hourly).

[0100] For example, such as Figure 3 As shown, incoming data refers to data that needs to be obtained by accessing a data source interface. In this embodiment, the data source interface can be a traffic management API interface. Incoming data can be data obtained directly from the data source through the traffic management API interface, such as the user's real-time location information or driving speed on a certain road.

[0101] The second data generation module 502 is configured to perform calculations on the input data according to the database configuration file to obtain calculated data; wherein, the calculated data is obtained by integrating and calculating the input data and cannot be directly obtained from the data source.

[0102] As shown in Table 1 and Figure 3As shown, to adapt to more diverse data acquisition needs, this disclosure divides data into input data and computational data. Computational data requires further integration and calculation of the acquired input data. For example, based on the user's real-time location information and driving speed information (input data), road traffic congestion status (computational data) can be calculated. Traffic management departments can obtain a large amount of real-time basic user data through interface methods. The system integrates and calculates the massive amount of input data to obtain computational data.

[0103] The data entry module 503 is configured to write incoming data and computational data into the database.

[0104] By storing both input and computational data into a database, the database becomes more diverse in its data types. When needed, input and / or computational data can be directly retrieved from the database and quickly fed back to the user via the app. This ensures high accuracy, real-time performance, and reliability of the data, while also reducing the cost and difficulty of data acquisition. The generated computational data can also be directly used to create intelligent analysis reports required by the user. This eliminates the need for further integration and computation of the computational data after it is obtained, significantly improving data acquisition efficiency and user experience.

[0105] As an optional implementation method, such as Figure 6 As shown, the data import module 503 includes:

[0106] Temporary storage unit 5031 is configured to write incoming data and computational data to a temporary storage file;

[0107] The inspection unit 5032 is configured to check whether the data format of all incoming data and computational data in the temporary storage file is consistent with the preset data format in the database configuration file.

[0108] The inbound unit 5033 is configured to write the inbound data and the calculated data from the temporary storage file into the database in response to the data format of the inbound data and the calculated data being consistent with the preset data format.

[0109] Modification unit 5034 is configured to modify the data format of the input data and the calculated data to match the preset data format in response to the data format of the input data and the calculated data being inconsistent with the preset data format. The storage unit then writes the modified input data and the calculated data from the temporary storage file into the database.

[0110] like Figure 3As shown, the data import system in this embodiment introduces a staging area as an intermediate layer between data acquisition and data import. The staging area can store data locally in CSV format, and data import is also performed by writing queries through these CSV files. Besides CSV, other formats are also possible. The main purpose of introducing a staging area is to reduce the number of interactions between the data system and the database, as excessive direct read / write operations on the database are insecure. Directly writing data to the database when the completeness of the data source is uncertain can compromise database security. For example, if a data task requires 10 write operations, but an error occurs or a data quality problem is discovered during the 5th write operation, it is necessary not only to locate the problem in the data source but also to delete the erroneous data already imported into the database, which is an insecure operation for the database. Therefore, in this embodiment, the data accessed each time is first written to a staging area file in CSV format. When the data task is completed and all data is confirmed to be correct, all data in the staging area file is then updated to the database. In this way, for a data read task, the system only performs one database update write operation, improving the security of database read / write operations.

[0111] For example, before data in the staging area file is written to the database, a format checking program automatically checks the data format to confirm whether there are any errors. It checks whether the data format of all data in the staging area file is consistent with the preset data format in the database configuration file. It also checks whether each column of imported and calculated data in CSV format is consistent with the database configuration file. For example, according to the database configuration file in Table 1, the first column of the data is "Road Type," so it checks whether the first column of the data in the staging area file is also "Road Type," and checks whether each column has any null values. Once it is confirmed that the data format of all data in the staging area file meets the requirements of the database configuration file, i.e., it is consistent with the preset data format, the data is confirmed to be error-free, and then the data in the staging area is written to the database. If some data in the staging area file is found to have incorrect format, the data format is modified until all data formats meet the requirements of the database configuration file before being written to the database, thereby ensuring database security.

[0112] As an optional implementation, the data entry module 503 writes the incoming data and computational data into the database by: processing the incoming data and computational data into multiple data slices; and writing the multiple data slices into the database in batches from the temporary storage file.

[0113] Existing data systems send numerous data requests to the data source when acquiring data, a process that is time-consuming. The data system in this embodiment provides a multi-threaded mode when accessing the interface, significantly reducing access time. During the stage of inserting data from the temporary storage area into the database, data slicing is also used to accelerate the insertion process. When CSV data has tens of thousands of rows, writing it using a single insert statement or writing it row by row is extremely time-consuming. Therefore, during data insertion, data from a large CSV file can be inserted in batches of 500 rows each, saving significant data insertion time.

[0114] As an optional implementation, the first data generation module 501 obtains incoming data from the data source according to the database configuration file, including:

[0115] The data execution time period is retrieved, which includes either a user-input date or a preset date. The user-input date refers to the date entered by the user in real time, indicating which time period of data the user wants to retrieve, such as data for March 1, 2023. The preset date can be a date pre-set in the data system, such as retrieving the previous day's data at 1:00 AM every day.

[0116] Based on the database configuration file, the raw data corresponding to the data execution time period is obtained from the data source as the input data.

[0117] For example, the data execution period can be a date actively entered by the user or a preset date, meaning it supports scheduled execution of data tasks. To make data task execution more convenient during product deployment, two new functions have been added: one-click initialization and startup of the data system, and scheduled tasks. When users run our data system, they can also leave the date blank, and the system will automatically run the daily data for the previous 14 days, the weekly data for the previous two weeks, and the monthly data for the previous two months to assist in generating daily, weekly, and monthly reports for traffic management scenarios. Users can also pre-set the data system to run the data for the previous day, week, and month at 1:00 AM every day, every Monday, and the 1st of every month. In this way, users don't need to manually enter any dates; the data system will automatically obtain all the data for the dates the user needs, improving the convenience of data access.

[0118] As an optional implementation, the first data generation module 501 includes:

[0119] The first determining unit is configured to obtain the first target parameter corresponding to the input data from the database configuration file.

[0120] The first acquisition unit is configured to acquire the identification code corresponding to each road in the incoming data from the road network file; the incoming data is traffic data, and the road network file includes the identification code corresponding to each road in the traffic data and the hierarchical relationship between the roads.

[0121] The first generation unit is configured to obtain the corresponding raw data from the data source as input data based on the identification code and the first target parameter.

[0122] As shown in Table 1, when the types of data sources and the required metrics increase, the request parameters for many data points will also differ, and some data require specific granularity, such as some metrics that only have monthly data. To better handle these complex scenarios, we have added metrics such as data type, metric retrieval granularity, and request parameters. Data type determines whether the metric is input-type or computational-type data. Metric retrieval granularity helps avoid invalid accesses; if an interface only has monthly data, a daily data task will not access it. Request parameters specify the necessary headers for accessing an interface; each header corresponds to a specific return data style.

[0123] The request parameters and addresses in Table 1 are divided into range requests and aggregation requests. Here, range request parameters and addresses help obtain daily data, such as the congestion index of an intersection every 15 minutes within a 24-hour period; aggregation request parameters and addresses help obtain aggregated data for multiple days (weekly, monthly), such as the congestion index of a specific intersection every 15 minutes within a 24-hour period each day of a month in a year. Data for an indicator can be for a single day or a single month, but the interface addresses and request parameters for daily and monthly data are different, so we use two separate fields to distinguish them. When the system runs a data task for a specific date or month, it can select the appropriate range or aggregation interface to obtain the data according to the database configuration file.

[0124] A road network file is a map of a city, providing road network information such as the number of intersections and their IDs. These IDs are the same as those used when accessing the data interface, so when we need to obtain indicator data for all intersections, the system can first load all the IDs from the road network file. In this embodiment, in addition to providing all IDs for different road types, the road network file also provides the hierarchical relationships between different road types. For example, a region may have sub-regions, and each sub-region may have different roads, and each road may have different road segments and intersections. Based on the IDs and hierarchical relationships provided by the road network file, richer indicator data can be obtained when generating computational data.

[0125] As an optional implementation, existing data systems only have one-dimensional and two-dimensional data formats, while the data system in this embodiment is adapted to the newly added three-dimensional data. One-dimensional data refers to a single numerical value or text, which generally appears in the database as integer, float, or text. Multi-dimensional data generally uses the JSONB format in the database, and there are different classification rules for different types of JSONB data, such as KV, SIV, etc. All JSONB data is stored in the database in the form of a doubly linked list, and the dimension of the JSONB data corresponds to the length of each of its inner lists. The length of the name of each type of JSONB data corresponds to its dimension, and each character in the name represents a different meaning. Two-dimensional JSONB data is generally in KV format, with each inner array containing a key-value pair, in a format such as: [["7:30–9:00", 1.354], ["17:20–19:05", 1.345]...].

[0126] As traffic management data becomes increasingly complex, two-dimensional data storage formats can no longer meet users' data acquisition needs. For example, when a data source provides frequently occurring congestion periods for a given month, along with data on different indicators during these periods, users may require data in a third dimension. The newly added three-dimensional JSONB format can extend the two-dimensional model. As shown in Table 2, this embodiment adds three characters: Space (S), Time (T), and Index (I). For example, the TIV format indicates that the first value in each array represents the time period, the second value represents the index, and the third is the corresponding value.

[0127] Table 3 presents the TIV-formatted JSONB data in tabular form. By expanding the data dimensions, it extends one-dimensional and two-dimensional data to three-dimensional data, adapting to complex data. Further selections can be made in the database configuration file for different times, indices, and spaces. For example, when retrieving TIV-formatted JSONB data, the data source might return five indices, but the user might only select three. In this case, simply add the three indices selected by the user to the "Select Indices" field in the configuration file (all are selected by default).

[0128] As an optional implementation, to address the technical problem that existing data system configuration files, where each indicator corresponds to a data interface in a one-to-one mapping relationship, cannot adapt to complex data, this embodiment extends the data system with one-to-many and many-to-one indicator and interface mapping relationships to adapt to more complex data.

[0129] For example, the first scenario involves multiple data sources simultaneously providing data for an indicator in a single database configuration file. As mentioned earlier, range-based and aggregate-based data requests are typical examples of many-to-one mapping relationships, allowing an indicator to simultaneously possess daily, weekly, and monthly data. Another type of many-to-one mapping relationship involves multiple data sources providing data at the same granularity. For instance, a data source might have three types: sub-roads, parent roads, and trunk roads, but our indicator is road-specific, encompassing all three road types. To enable our road indicator data to attempt to retrieve data from all three data interfaces, we can include all three request addresses in the request address field of the database configuration file. This allows the data system to traverse these data source interfaces and find the appropriate data to retrieve.

[0130] Furthermore, the data system also supports a single data source providing data on multiple different metrics. For example, an interface might provide congestion metrics every 5 minutes for each of the 24 hours of a given day or month. This congestion metric data includes indicators such as congestion index and congestion mileage in dictionary form. To create a five-minute congestion index metric, the system can access this data source and select the "Congestion Index" metric using the "Select Index" field. By selecting the index field, we can use this data source to create separate metrics such as congestion index and congestion mileage, thus achieving a many-to-one mapping relationship.

[0131] As an optional implementation, the second data generation module 503 includes:

[0132] The second determining unit is configured to obtain the second target parameter corresponding to the computational data from the database configuration file;

[0133] The second acquisition unit is configured to acquire the identification code and hierarchical relationship corresponding to each road in the computational data from the road network file;

[0134] The second generation unit is configured to perform calculations on the input data based on the identification code, hierarchical relationship, and second target parameters to obtain corresponding second indicator data as calculated data; wherein the calculation process includes at least one of the following: extracting, integrating, and ranking the input data.

[0135] For example, the establishment of computational data indicators is a key function of this publicly available data system. The system can not only access and adapt to various data interfaces provided by traffic management, but also integrate, calculate, and rank the acquired input data. The system extracts, integrates, and ranks the acquired input data through configuration file fields such as indicator name, data type, data format, selected index, selected time period, and selected area. For instance, to find out which intersections are most congested in a specific area on a given day, during a specific time period, or during morning and evening rush hours, one can select the 3D JSONB STV format in the database configuration file, declare the top five congestion index rankings in the selected area, and declare the time periods as all day, morning rush hour, and evening rush hour. The data system can interpret the parameters in the database configuration file and ultimately calculate the data required by the user, as shown in Table 4.

[0136] As an optional implementation, the data entry device further includes:

[0137] The second data acquisition module is configured to periodically read data from the product side.

[0138] The judgment module is configured to determine whether there are differences between the product-side data and the database configuration file.

[0139] In response to a difference between the product-side data and the database configuration file, the temporary storage unit 5031 writes the difference data between the product-side data and the database configuration file into the temporary storage area file.

[0140] If there is no discrepancy between the product-side data and the database configuration file, the second data acquisition module will periodically read the product-side data.

[0141] After the temporary storage unit 5031 writes the difference data into the temporary storage area file, the checking unit 5032 checks whether the data format of the difference data in the temporary storage area file is consistent with the preset data format.

[0142] The inbound unit 5033 writes the difference data from the temporary storage file to the database in response to the fact that the data format of the difference data is consistent with the preset data format.

[0143] In response to the discrepancy between the data format of the difference data and the preset data format, the modification unit 5034 modifies the data format of the difference data to be consistent with the preset data format, and then the storage unit 5033 writes the modified difference data from the temporary storage file into the database.

[0144] Specifically, when new types of data need to be imported into the database, the database configuration file may need to be modified or reconfigured to accommodate the new data import. If the data configuration on the product side is not modified, it may lead to discrepancies between the product side's data configuration and the database configuration file. Therefore, it is advisable to periodically read the product side's data and update the product side's data, as well as the data to be imported into the database in the staging area file, to ensure consistency between the product side's data and the database.

[0145] As an optional implementation, the data system adds a display module for showing updated metrics of product-side data. Existing data systems complete their task after data entry, but displaying these updated metrics on the product side requires adding each metric individually at the product level. This step becomes very time-consuming when the number of new metrics is large. Therefore, the data system in this embodiment automatically displays updated metrics on the product side, such as... Figure 4 As shown, after the data is successfully imported into the database, the system automatically updates and displays the changed metrics on the product side.

[0146] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0147] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0148] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0149] like Figure 7As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded into random access memory (RAM) 703 from storage unit 708. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0150] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0151] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning objective function algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the data loading method. For example, in some embodiments, the data loading method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the data loading method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the data loading method by any other suitable means (e.g., by means of firmware).

[0152] Various embodiments of the systems and techniques described above herein 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), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0153] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0154] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0156] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0157] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0158] According to embodiments of this disclosure, an intelligent transportation data system is also provided, including the electronic devices described in the above embodiments.

[0159] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0160] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A data import method, comprising: The incoming data is obtained from the data source according to the database configuration file; wherein, the incoming data is the raw data obtained directly from the data source. The input data is processed according to the database configuration file to obtain computed data; wherein, the computed data is obtained by integrating and calculating the input data. Write the input data and the computational data into the database; The step of obtaining incoming data from the data source according to the database configuration file also includes: Obtain the first target parameter corresponding to the input data from the database configuration file; Obtain the identification code corresponding to each road in the input data from the road network file; the input data is traffic data, and the road network file includes the identification code corresponding to each road in the traffic data and the hierarchical relationship between each road; Based on the identification code and the first target parameter, the corresponding raw data is obtained from the data source as the input data; The step of processing the input data according to the database configuration file to obtain computed data includes: Obtain the second target parameter corresponding to the computational data from the database configuration file; Obtain the identification code and hierarchical relationship corresponding to each road in the computational data from the road network file; Based on the identification code, the hierarchical relationship, and the second target parameter, the input data is processed to obtain the corresponding second indicator data as the calculated data. The computational processing includes at least one of the following: extracting the input data; integrating the input data; and ranking the input data.

2. The method according to claim 1, wherein, The step of writing the input data and the computational data into the database includes: Write the input data and the computational data into a temporary storage file; Check whether the data format of the input data and the computational data in the temporary storage file is consistent with the preset data format in the database configuration file; In response to the fact that the data format of the input data and the computational data is consistent with the preset data format, the input data and the computational data are written from the temporary storage file to the database; In response to the fact that the data format of the input data and the computational data is inconsistent with the preset data format, the data format of the input data and the computational data is modified to be consistent with the preset data format, and the modified input data and computational data are written from the temporary storage file to the database.

3. The method according to claim 1, wherein, The step of retrieving incoming data from the data source according to the database configuration file includes: Obtain the data execution time period, wherein the data execution time period includes the user-input date or a preset date; According to the database configuration file, the raw data corresponding to the data execution time period is obtained from the data source as the input data.

4. The method according to claim 2, wherein, The step of writing the input data and the computational data from the temporary storage file to the database includes: The input data and the computational data are processed into multiple data slices; Multiple data slices are written to the database in batches from the temporary storage file.

5. The method according to claim 2, further comprising: Regularly read data from the product side; Determine whether there are differences between the product-side data and the database configuration file; In response to a discrepancy between the product-side data and the database configuration file, the discrepancy data is written to the temporary storage file; If there is no difference between the product-side data and the database configuration file, the process of periodically reading the product-side data is returned. After writing the difference data into the temporary storage file, check whether the data format of the difference data is consistent with the preset data format. In response to the fact that the data format of the difference data is consistent with the preset data format, the difference data is written from the temporary storage file to the database; In response to the discrepancy between the data format of the discrepancy data and the preset data format, the data format of the discrepancy data is modified to match the preset data format, and the modified discrepancy data is written from the temporary storage file to the database.

6. The method according to any one of claims 1-5, wherein, The database configuration file includes at least one of the following parameters: road type; indicator name; data type; indicator acquisition granularity; data request range; aggregation request parameters; data format; range request address; aggregation request address; time granularity; selected index; selected time period.

7. A data entry device, comprising: The first data generation module is configured to obtain incoming data from the data source according to the database configuration file; wherein, the incoming data is raw data obtained directly from the data source; The second data generation module is configured to perform calculations on the input data according to the database configuration file to obtain calculated data; wherein the calculated data is obtained by integrating and calculating the input data. The data entry module is configured to write the input data and the computational data into the database; The first data generation module includes: The first determining unit is configured to obtain the first target parameter corresponding to the input data from the database configuration file; The first acquisition unit is configured to acquire the identification code corresponding to each road in the input data from the road network file; the input data and the calculated data are traffic data, and the road network file includes the identification code corresponding to each road in the traffic data and the hierarchical relationship between each road; The first generation unit is configured to obtain corresponding raw data from the data source as the input data based on the identification code and the first target parameter; The second data generation module includes: The second determining unit is configured to obtain the second target parameter corresponding to the computational data from the database configuration file; The second acquisition unit is configured to acquire the identification code and the hierarchical relationship corresponding to each road in the computational data from the road network file; The second generation unit is configured to perform calculation processing on the input data according to the identification code, the hierarchical relationship and the second target parameter to obtain the corresponding second indicator data as the calculated data. The computational processing includes at least one of the following: extracting the input data; integrating the input data; and ranking the input data.

8. The apparatus according to claim 7, wherein, The data import module includes: The temporary storage unit is configured to write the input data and the computational data into a temporary storage file; The checking unit is configured to check whether the data format of the input data and the computational data in the temporary storage file is consistent with the preset data format in the database configuration file; The inbound unit is configured to write the incoming data and the calculated data from the temporary storage file into the database in response to the data format of the incoming data and the calculated data being consistent with the preset data format; The modification unit is configured to modify the data format of the input data and the computational data to match the preset data format in response to the data format of the input data and the computational data being inconsistent with the preset data format, and the database entry unit writes the modified input data and computational data from the temporary storage file into the database.

9. The apparatus according to claim 7, wherein, The first data generation module obtains incoming data from the data source according to the database configuration file, including: Obtain the data execution time period, wherein the data execution time period includes the user-input date or a preset date; According to the database configuration file, the raw data corresponding to the data execution time period is obtained from the data source as the input data.

10. The apparatus according to claim 8, wherein, The data import module writes the input data and the computational data from the temporary storage file into the database, including: The input data and the computational data are processed into multiple data slices; Multiple data slices are written to the database in batches from the temporary storage file.

11. The apparatus according to claim 8, wherein, Also includes: The second data acquisition module is configured to periodically read data from the product side. The judgment module is configured to determine whether there is a difference between the product-side data and the database configuration file; In response to a difference between the product-side data and the database configuration file, the temporary storage unit writes the difference data into the temporary storage area file; If there is no difference between the product-side data and the database configuration file, the second data acquisition module is returned to periodically read the product-side data. After the temporary storage unit writes the difference data into the temporary storage area file, the checking unit checks whether the data format of the difference data is consistent with the preset data format. The data entry unit writes the difference data from the temporary storage file into the database in response to the fact that the data format of the difference data is consistent with the preset data format. In response to the discrepancy between the data format of the difference data and the preset data format, the modification unit modifies the data format of the difference data to match the preset data format, and then the storage unit writes the modified difference data from the temporary storage file into the database.

12. The apparatus according to any one of claims 7-11, wherein, The database configuration file includes at least one of the following parameters: road type; indicator name; data type; indicator acquisition granularity; data request range; aggregation request parameters; data format; range request address; aggregation request address; time granularity; selected index; selected time period.

13. 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 to enable the at least one processor to perform the method of any one of claims 1-6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.

16. An intelligent transportation data system, comprising the electronic device as described in claim 13.

Citation Information

Patent Citations

  • Method and device for converting data of non-relational database into relational database

    CN106528898A

  • Data storage method and device, equipment and medium

    CN114281812A