Time series database comparison method and apparatus based on internet of things scenarios
By developing a method and apparatus for comparing time-series databases in IoT scenarios, the problem of selecting an inappropriate database is solved, improving comparison efficiency and accuracy, enhancing system performance and stability, and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies cannot comprehensively compare all aspects of time-series databases, leading to the selection of unsuitable time-series databases in IoT scenarios, which affects business stability and performance.
A method and apparatus for comparing time-series databases based on IoT scenarios are provided. By extracting comparison items from IoT scenarios and comparing them in simulated scenarios, the best and worst items are displayed. Combined with the table structure and query statements of actual IoT scenarios, the comparison efficiency and accuracy are improved.
It improves the accuracy and efficiency of time series database selection, reduces comparison time in IoT scenarios, enhances system performance and stability, and reduces usage costs.
Smart Images

Figure CN115658648B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed database technology, specifically to a method and apparatus for comparing time-series databases in an Internet of Things (IoT) scenario. Background Technology
[0002] With the rapid development of IoT technology, the problems of IoT time-series data entry, storage and retrieval have become prominent. A single time-series database cannot enable various IoT scenarios to operate at the best performance or cost.
[0003] Currently, some IoT scenarios uniformly use a single time-series database, sacrificing the performance of data insertion, storage, and querying in specific scenarios to ensure business stability. Other IoT scenarios directly choose expensive time-series database products, even though the actual business scenario may not require this extra expense, and free time-series database products can meet the business needs. Some only perform simple comparisons of data insertion and query performance, neglecting field compatibility comparisons, leading to business functionality issues. Some only compare field and application compatibility, without comparing high-availability solutions, resulting in inability to promptly restore service during anomalies. Still others only compare high-availability solutions, without comparing the stability of time-series databases, leading to frequent stability issues.
[0004] Therefore, how to comprehensively compare all aspects of time series databases, so that staff using time series databases can fully evaluate and select the best option that suits the actual IoT scenario, is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] The technical objective of this invention is to provide a method and apparatus for comparing time-series databases based on Internet of Things (IoT) scenarios, in order to solve the problem of how to comprehensively compare various aspects of time-series databases, and facilitate staff using time-series databases to comprehensively evaluate and select the best option that suits the actual IoT scenario.
[0006] The technical objective of this invention is achieved as follows: a time-series database comparison method based on an Internet of Things (IoT) scenario. This method extracts comparison items from the IoT scenario, compares these items in a simulated scenario, and intuitively displays the comparison results and the optimal item, thereby improving the efficiency of time-series database comparison and selection under different IoT scenarios. Specifically, as follows:
[0007] Extract default comparison items from IoT scenarios;
[0008] Using the default comparison items as a template, extract new comparison items and modify the table structure, data characteristics, and query statements of the new comparison items;
[0009] Compare the items in a simulated scenario.
[0010] As a preferred option, the default comparison items are extracted as follows:
[0011] We extracted default comparison items from previous IoT scenarios, including field compatibility, data compatibility, application compatibility, database insertion performance, compression performance, query performance, stability performance, high availability, and field precision. The table structure, data characteristics, and query statements in the comparison items have been fixed based on previous IoT scenarios and cannot be modified.
[0012] As a preferred option, using the default comparison items as a template, new comparison items are extracted, and the table structure, data characteristics, and query statements of the new comparison items are modified as follows:
[0013] Extract business-related table structures, data characteristics, and query statement comparison features from actual IoT scenarios;
[0014] Enter the table structure, feature data, and query statements in conjunction with the business scenario;
[0015] Choose whether to record actual IoT scenarios:
[0016] If you do not choose to input actual IoT scenarios, then all regular items will be compared during the comparison. The table structure, data characteristics and query statements for comparison are fixed by default.
[0017] Even better, the comparison items are compared in a simulated scenario, specifically as follows:
[0018] Based on the extracted comparison items, select the corresponding comparison items and the time series database to be compared this time;
[0019] Based on the selected comparison items, build a comparison environment in the simulation environment;
[0020] Run each comparison item in a simulation environment based on the selected comparison item;
[0021] Record and display the comparison results, and mark the best and worst items.
[0022] More preferably, the simulation environment is as follows:
[0023] Install the corresponding time series database based on the time series database to be compared;
[0024] Prepare feature-rich simulated comparison data based on the comparison items;
[0025] Generate detailed comparison items and comparison scripts based on the comparison items.
[0026] A time-series database comparison device for IoT scenarios, the device comprising,
[0027] Extraction unit, used to extract comparison items from IoT scenarios;
[0028] The contrast unit is used to perform different contrast features in a simulation environment;
[0029] The display unit is used to retrieve data from the database and show the comparison results, while also indicating the best and worst items.
[0030] Preferably, the extraction unit includes,
[0031] The first generation module is used to extract comparison items from previous IoT scenarios and provide support for regular comparison items;
[0032] The second generation module is used to extract comparative features from actual IoT scenarios and provide support for actual comparative features.
[0033] More preferably, the comparison unit includes,
[0034] The selection module is used to select the required comparison items and the time series database to be compared in this case, based on the extracted comparison items.
[0035] The building module is used to set up a comparison environment in the simulation environment based on the selected comparison items;
[0036] The run module is used to run each comparison item in a simulation environment based on the selected comparison items, and the comparison data is stored in the database.
[0037] An electronic device includes: a memory and at least one processor;
[0038] The memory contains computer programs;
[0039] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the time-series database comparison method based on the Internet of Things scenario as described above.
[0040] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the time-series database comparison method based on the Internet of Things scenario as described above.
[0041] The time-series database comparison method and apparatus based on the Internet of Things (IoT) scenario of the present invention have the following advantages:
[0042] (i) The comparative items of the present invention can comprehensively compare various time-series databases in the Internet of Things scenario, which can reduce the time for comparing time-series databases in actual Internet of Things scenarios.
[0043] (ii) This invention can extract table structures, data features and query statements related to actual IoT scenarios, and add comparison features according to actual IoT scenarios. This makes the comparison results closer to the actual environment and the comprehensive evaluation of time-series databases in actual IoT scenarios more accurate.
[0044] (III) Based on the selected comparison items, the present invention can build a comparison environment in a simulated environment to compare different time series databases, and then intuitively display the comparison results and the best and worst items in the results. This can reduce the comparison time of time series databases in actual IoT scenarios, and also intuitively show the advantages and disadvantages of different time series database products in actual IoT scenarios, making it convenient for relevant personnel to select time series databases in actual IoT scenarios.
[0045] (iv) This invention not only compares conventional projects, but also adds comparison features based on actual IoT scenarios, making the results closer to the actual environment and making the comprehensive evaluation of time series databases in actual IoT scenarios more accurate.
[0046] (v) This invention uses a scientific comparison method to select a suitable time series database, thereby reducing the cost of using time series databases in the corresponding scenarios;
[0047] (vi) This invention improves the performance of data entry, storage and querying in the corresponding scenarios, thereby improving the system's operating efficiency;
[0048] (vii) This invention improves the stability of time-series databases in corresponding scenarios and ensures the continuous development of business;
[0049] (viii) This invention comprehensively compares all aspects of time series databases and intuitively displays the best and worst items of the comparison results, which makes it convenient for staff using time series databases to comprehensively evaluate and select the best option that matches the actual Internet of Things scenario.
[0050] (ix) This invention integrates conventional comparison items and can add comparison features according to actual scenarios, thereby reducing the comparison time of time series databases in actual IoT scenarios and improving the professionalism of time series database comparison in actual IoT scenarios. Attached Figure Description
[0051] The invention will be further described below with reference to the accompanying drawings.
[0052] Appendix Figure 1 A flowchart of a time-series database comparison method based on IoT scenarios;
[0053] Appendix Figure 2 A flowchart illustrating the process of comparing items in a simulated scenario;
[0054] Appendix Figure 3This is a schematic diagram of the structure of a time-series database comparison device based on an Internet of Things (IoT) scenario.
[0055] Appendix Figure 4 Here is a structural block diagram of the comparison unit;
[0056] Appendix Figure 5 A flowchart for setting up a simulation environment. Detailed Implementation
[0057] The following detailed description of the time-series database comparison method and apparatus based on the Internet of Things scenario of the present invention is provided with reference to the accompanying drawings and specific embodiments.
[0058] Example 1:
[0059] As attached Figure 1 As shown, this embodiment provides a time-series database comparison method based on IoT scenarios. This method extracts comparison items from IoT scenarios, compares these items in simulated scenarios, and intuitively displays the comparison results and the optimal item, thereby improving the efficiency of time-series database comparison and selection under different IoT scenarios; specifically as follows:
[0060] S1. Extract default comparison items from IoT scenarios;
[0061] S2. Using the default comparison items as a template, extract new comparison items and modify the table structure, data characteristics, and query statements of the new comparison items.
[0062] S3. Compare the items in a simulated scenario.
[0063] The specific steps for extracting the default comparison items in step S1 of this embodiment are as follows:
[0064] We extracted default comparison items from previous IoT scenarios, including field compatibility, data compatibility, application compatibility, database insertion performance, compression performance, query performance, stability performance, high availability, and field precision. The table structure, data characteristics, and query statements in the comparison items have been fixed based on previous IoT scenarios and cannot be modified.
[0065] In step S2 of this embodiment, new comparison items are extracted using the default comparison items as templates, and the table structure, data characteristics, and query statements of the new comparison items are modified as follows:
[0066] S201. Extract business-related table structures, data characteristics, and query statement comparison features from actual IoT scenarios;
[0067] S202. Input the table structure, feature data, and query statements in conjunction with the business scenario;
[0068] S203. Select whether to record actual IoT scenarios:
[0069] If you do not choose to input actual IoT scenarios, then all regular items will be compared during the comparison. The table structure, data characteristics and query statements for comparison are fixed by default.
[0070] As attached Figure 2 As shown, the specific steps in step S3 of this embodiment, comparing the comparison items in a simulated scenario, are as follows:
[0071] S301. Based on the extracted comparison items, select the corresponding comparison items and the time series database to be compared this time;
[0072] S302. Based on the selected comparison items, build a comparison environment in the simulation environment;
[0073] S303. Run each comparison item in the simulation environment according to the selected comparison item;
[0074] S304. Record and display the comparison results, and indicate the best and worst items.
[0075] As attached Figure 5 As shown, the simulation environment in this embodiment is as follows:
[0076] (1) Install the corresponding time series database according to the time series database to be compared;
[0077] (2) Prepare simulated comparison data with features based on the comparison items;
[0078] (3) Generate detailed comparison items and comparison scripts based on the comparison items.
[0079] Example 2:
[0080] As attached Figure 3 As shown, this embodiment provides a time-series database comparison device based on an Internet of Things (IoT) scenario. The device includes...
[0081] Extraction unit, used to extract comparison items from IoT scenarios;
[0082] The contrast unit is used to perform different contrast features in a simulation environment;
[0083] The display unit is used to retrieve data from the database and show the comparison results, while also indicating the best and worst items.
[0084] The extraction unit in this embodiment includes,
[0085] The first generation module is used to extract comparison items from previous IoT scenarios and provide support for regular comparison items;
[0086] The second generation module is used to extract comparative features from actual IoT scenarios and provide support for actual comparative features.
[0087] As attached Figure 4 As shown, the comparison unit in this embodiment includes,
[0088] The selection module is used to select the required comparison items and the time series database to be compared in this case, based on the extracted comparison items.
[0089] The building module is used to set up a comparison environment in the simulation environment based on the selected comparison items;
[0090] The run module is used to run each comparison item in a simulation environment based on the selected comparison items, and the comparison data is stored in the database.
[0091] Example 3:
[0092] This embodiment also provides an electronic device, including: a memory and a processor;
[0093] The memory stores the instructions executed by the computer.
[0094] The processor executes computer execution instructions stored in the memory, causing the processor to execute the time-series database comparison method based on the Internet of Things scenario in any embodiment of the present invention.
[0095] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.
[0096] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.
[0097] Example 4:
[0098] This embodiment also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the time-series database comparison method based on an IoT scenario according to any embodiment of the present invention. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0099] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0100] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0101] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0102] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A time series database comparison method based on an Internet of Things scenario, characterized in that, The method is to extract comparison items from the Internet of Things scene, compare the comparison items in the simulation scene, intuitively display the comparison results and the optimal item in the results, and improve the comparison and selection efficiency of the time series database under different Internet of Things scenes; Specifically as follows: Extract the default comparison items from the Internet of Things scene: Take the default comparison items as a template, extract new comparison items, and modify the table structure, data characteristics and query statements of the new comparison items; Compare the comparison items in the simulation scene; Among them, taking the default comparison items as a template, extracting new comparison items, and modifying the table structure, data characteristics and query statements of the new comparison items are as follows: Extract the business-related table structure, data characteristics and query statement comparison features from the actual Internet of Things scene; Enter the table structure, feature data and query statement in combination with the business scene; Select whether to enter the actual Internet of Things scene: If you do not choose to enter the actual Internet of Things scene, when comparing, all regular items are compared, and the table structure, data characteristics and query statements for comparison are fixed by default. 2.The IoT scenario-based time series database comparison method of claim 1, wherein, Extract the default comparison items as follows: Extract the default comparison items of field compatibility, data compatibility, application compatibility, storage performance, compression performance, query performance, stability performance, high availability and field precision from the past Internet of Things scene; Among them, the table structure, data characteristics and query statements in the comparison items have been fixed in combination with the past Internet of Things scene and cannot be modified. 3.The IoT scenario-based time series database comparison method of claim 1 or 2, characterized in that, Compare the comparison items in the simulation scene as follows: According to the extracted comparison items, select the corresponding comparison items and the time series database to be compared this time; According to the selected comparison items, build a comparison environment in a simulation environment; According to the selected comparison items, run each comparison item in the simulation environment; Record and display the comparison results, mark the optimal item and the worst item. 4.The IoT scenario-based time series database comparison method of claim 3, wherein, The simulation environment is as follows: According to the time series database to be compared, install the corresponding time series database; Prepare simulation comparison data with features according to the comparison items; Generate comparison details and comparison scripts according to the comparison items. 5.A time series database comparison device based on an Internet of Things scenario, characterized in that, The device comprises, An extraction unit for extracting comparison items from the Internet of Things scene; A comparison unit for executing different comparison features in a simulation environment; A display unit for obtaining data from the database and displaying comparison results, while marking the optimal item and the worst item; Among them, the extraction unit comprises, A first generation module for extracting comparison items from the past Internet of Things scene to provide regular comparison item support; A second generation module for extracting comparison features from the actual Internet of Things scene to provide actual comparison feature support; Among them, extracting comparison features from the actual Internet of Things scene is as follows: taking the default comparison items as a template, extracting new comparison items, and modifying the table structure, data characteristics and query statements of the new comparison items, specifically as follows: S201, extract business-related table structure, data characteristics and query statement comparison features from the actual Internet of Things scene; S202, enter the table structure, feature data and query statement in combination with the business scene; S203, select whether to enter the actual Internet of Things scene: If the actual Internet of Things scene entry is not selected, all conventional items are compared, and the table structure, data characteristics and query statements of the comparison are fixed by default. 6.The IoT scenario-based time series database comparison apparatus of claim 5, wherein, The comparison unit comprises, The selection module is configured to select the required comparison items and the time series database to be compared this time according to the extracted comparison items. The construction module is configured to build a comparison environment in a simulation environment according to the selected comparison items. The running module is configured to run each comparison item in the simulation environment according to the selected comparison items, and store the comparison data in the database.
7. An electronic device, comprising: Comprise: A memory and at least one processor; The memory has a computer program stored thereon; The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the time series database comparison method based on the Internet of Things scene as claimed in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, The computer program stored in the computer readable storage medium can be executed by the processor to realize the time series database comparison method based on the Internet of Things scene as claimed in any one of claims 1 to 4.