Real-time database capability testing method, system, electronic device and storage medium
By comparing the data in real-time database with the data in relational databases, the problem of the inability to effectively verify the acquisition and storage capabilities of real-time databases in the prior art is solved, and effective verification of data accuracy and integrity is achieved.
Patent Information
- Application Number
- CN202111473785.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-12-02
AI Technical Summary
The prior art is difficult to determine the acquisition capability and data storage capability of real-time databases, resulting in the inability to effectively verify the data accuracy and integrity of real-time databases.
By calling real-time data and historical data from the real-time database and comparing it with the corresponding data in the relational database, the collection and storage capabilities of the real-time database are determined. The specific steps include obtaining real-time data and historical data data and the amount of data, comparing whether it is consistent with the data in the relational database, and if it is inconsistent, it is determined that the acquisition or storage capacity is insufficient.
It realizes effective verification of real-time database collection capabilities and storage capabilities, ensures the correctness and integrity of data, and improves the accuracy and efficiency of testing.
Smart Images

Figure CN114428716B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to a real-time database capability testing method, system, electronic equipment and storage medium. Background Art
[0002] Currently, testing the acquisition functionality of real-time databases typically uses traditional methods: data is collected through collector software connected to a data simulator or controller device. This data is then uploaded and saved to the real-time database. The data's accuracy and integrity are then manually checked by querying both the real-time data and archived historical data. However, due to the difficulty in manually accessing data from the source for comparison, this method makes it difficult to verify the accuracy and integrity of the real-time database's collected data, and thus, the database's acquisition and data storage capabilities cannot be determined.
[0003] The above-mentioned deficiencies are what those skilled in the art would like to overcome. Summary of the Invention
[0004] (1) Technical issues to be solved
[0005] In order to solve the above problems in the prior art, the present invention provides a real-time database capability testing method, system, electronic device and storage medium, aiming to solve the problem in the prior art that the acquisition capability and data storage capability of the real-time database cannot be determined.
[0006] (2) Technical solution
[0007] In order to solve the above problems, in a first aspect, the present invention provides a method for testing the capabilities of a real-time database, the method comprising:
[0008] Call real-time data from the real-time database and obtain the data and data volume of the real-time data;
[0009] Call historical data from the real-time database and obtain the data and data volume of historical data;
[0010] Obtaining the data volume of the first data according to the field corresponding to the real-time data from the relational database, and obtaining the data volume of the second data according to the field corresponding to the historical data;
[0011] determining the acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data;
[0012] The storage capacity of the real-time database is determined by comparing the data and data volume of the historical data with the data and data volume of the second data.
[0013] In an exemplary embodiment of the present invention, the present invention further includes:
[0014] Get the test data source of real-time data and historical data through simulator simulation;
[0015] The test data source simulated by the simulator is collected by the collector software and pushed to the real-time database to obtain real-time data and historical data;
[0016] The simulated test data source is written into a relational database and stored as corresponding first data and second data according to structured fields.
[0017] In an exemplary embodiment of the present invention, the test data source for obtaining real-time data and historical data through simulator simulation further includes:
[0018] A counter is used to count the real-time data and historical data generated by the simulator.
[0019] In an exemplary embodiment of the present invention, the test data source for obtaining real-time data and historical data through simulator simulation further includes:
[0020] The simulator performs simulation based on the business characteristics of the real-time database and the basic requirements of automated testing to obtain the test data source;
[0021] The parameters in the test data source include at least one of data type, change period, waveform, and amplitude.
[0022] In an exemplary embodiment of the present invention, determining the acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data includes:
[0023] If the data volume of the real-time data is smaller than the data volume of the first data, it is determined that the acquisition capacity of the real-time database is insufficient; and / or
[0024] If the data of the real-time data is different from the data of the first data in terms of content, it is determined that the acquisition capability of the real-time database is insufficient.
[0025] In an exemplary embodiment of the present invention, determining the storage capacity of the real-time database by comparing the data volume of the historical data with the data volume of the second data includes:
[0026] If the amount of the historical data is smaller than the amount of the second data, determining that the storage capacity of the real-time database is insufficient; and / or
[0027] If the data of the historical data and the data of the second data are different in content, it is determined that the storage capacity of the real-time database is insufficient.
[0028] In an exemplary embodiment of the present invention, the present invention further includes:
[0029] Within a preset period, whether the collection capacity and storage capacity of the real-time database are in compliance is determined based on the data and data volume of the real-time data, the data and data volume of the first data, the data and data volume of the historical data, and the data and data volume of the second data.
[0030] In a second aspect, the present invention further provides a real-time database capability testing system, the system comprising:
[0031] Real-time data module, used to call real-time data from the real-time database and obtain the data and data volume of the real-time data;
[0032] The historical data module is used to call historical data from the real-time database and obtain the data and data volume of the historical data;
[0033] A relational data module is used to obtain the data volume of the first data according to the field corresponding to the real-time data, and obtain the data volume of the second data according to the field corresponding to the historical data from the relational database;
[0034] an acquisition test module, configured to determine an acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data;
[0035] The storage test module is used to determine the storage capacity of the real-time database by comparing the data and data volume of the historical data with the data and data volume of the second data.
[0036] In a third aspect, the present invention further provides an electronic device, comprising:
[0037] processor;
[0038] A memory stores the method steps described above for the processor to control.
[0039] In a fourth aspect, the present invention further provides a storage medium having computer executable instructions stored thereon, wherein the executable instructions implement the above-mentioned method steps when executed by a processor.
[0040] (3) Beneficial effects
[0041] The beneficial effects of the present invention are as follows: the real-time database capability testing method, system, electronic device and storage medium provided in the embodiments of the present invention can conveniently verify the real-time data collection capability and storage capability, and verify the correctness and integrity of the collected data of the real-time database by statistically analyzing the structured data in the relational database and comparing the data and data volume with the real-time data and historical data stored in the real-time database to determine whether they are consistent. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1A flowchart of a method for testing real-time database capabilities provided by one embodiment of the present invention;
[0043] Figure 2 Schematic diagram of the data flow process for testing the real-time database capability in an embodiment of the present invention;
[0044] Figure 3 This is an example diagram of a relational database in an embodiment of the present invention;
[0045] Figure 4 A schematic structural diagram of a real-time database capability testing system provided by another embodiment of the present invention;
[0046] Figure 5 A schematic diagram of the internal structure of a computer system of an electronic device provided in yet another embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.
[0048] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0049] In addition, the terms "first," "second," and so on, used in this disclosure are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this disclosure, "plurality" means at least two, such as two or three, unless otherwise specifically defined.
[0050] The terms involved in the embodiments of the present invention are explained as follows:
[0051] Real-time database (RTDB) is a branch of database system development. It is the result of combining database technology with real-time processing technology. It can directly collect and obtain various data during the operation of an enterprise in real time and convert it into public information that is effective for various businesses.
[0052] Automated testing is a process that converts human-driven testing behavior into machine execution.
[0053] Collector software is software that collects data from controllers, PLCs, OPC devices and other devices and uploads it to an industrial real-time database.
[0054] A simulator is a software that generates regular timing data, such as sine waves, square waves, triangle waves, random numbers, etc.
[0055] A relational database is a database that uses a relational model to organize data. It stores data in the form of rows and columns to facilitate user understanding. This series of rows and columns in a relational database is called a table, and a group of tables constitutes a database.
[0056] Figure 1 A flowchart of a method for testing real-time database capabilities provided by one embodiment of the present invention is shown in FIG. Figure 1 As shown, the specific steps include:
[0057] like Figure 1 As shown, in step S110, real-time data is called from the real-time database and the data and data volume of the real-time data are obtained;
[0058] like Figure 1 As shown, in step S120, historical data is called from the real-time database and the data and data volume of the historical data are obtained;
[0059] like Figure 1 As shown, in step S130, the data volume of the first data is obtained from the relational database according to the field corresponding to the real-time data, and the data volume of the second data is obtained according to the field corresponding to the historical data;
[0060] like Figure 1 As shown, in step S140, the acquisition capability of the real-time database is determined by comparing the data and data volume of the real-time data with the data and data volume of the first data;
[0061] like Figure 1 As shown, in step S150, the storage capacity of the real-time database is determined by comparing the data and data volume of the historical data with the data and data volume of the second data.
[0062] Based on the method provided in the above embodiment, by counting the structured data in the relational database and comparing the data and data volume with the real-time data and historical data stored in the real-time database to determine whether they are consistent, it is possible to easily verify the collection and storage capabilities of real-time data and verify the correctness and completeness of the collected data in the real-time database.
[0063] The following Figure 1 The following method is introduced in detail:
[0064] In step S110 , real-time data is called from a real-time database and the data and data volume of the real-time data are obtained.
[0065] In step S120 , historical data is called from the real-time database and the data and data volume of the historical data are obtained.
[0066] There is no restriction on the order between step S110 and step S120, and they can be executed separately or simultaneously.
[0067] In an exemplary embodiment of the present invention, before step S110 and / or step S120, a preprocessing step is further included, specifically including the following preprocessing steps:
[0068] Get the test data source of real-time data and historical data through simulator simulation;
[0069] The simulated test data source is collected by the collector software and pushed to the real-time database to obtain real-time data and historical data;
[0070] The simulated test data source is written into a relational database and stored as corresponding first data and second data according to structured fields.
[0071] In this step, the simulated test data source can be pushed to the real-time database and written to the relational database at the same time.
[0072] In an exemplary embodiment of the present invention, the test data source for obtaining real-time data and historical data through simulation by a simulator further includes:
[0073] A counter is used to count the real-time data and historical data generated by the simulator.
[0074] In an exemplary embodiment of the present invention, the test data source for obtaining real-time data and historical data through simulator simulation further includes:
[0075] The simulator simulates the real-time database based on its business characteristics and the basic requirements of automated testing to obtain the test data source.
[0076] The real-time database includes both real-time and historical data. Parameters in the test data sources for the real-time and / or historical data include at least one of data type, change period, waveform type, and amplitude. The real-time database is an in-memory snapshot database, reflecting second-by-second changes in the timestamp, value, and quality of real-time production data. Users can query the real-time data values (value, timestamp, and quality) of real-time production data from the real-time database.
[0077] Through the above preprocessing steps, due to the uncertainty factors of ordinary data simulators or controller device data (we don’t know what the data source data is, generally only its waveform and data type are known), the verification of real-time database data is more troublesome and the relational database has the advantages of convenient, mature and reliable data query. Through the data simulator (referred to as the simulator in this article), the simulator can collect and push super-second data to the real-time database collector software, and at the same time store the bit number data and timestamp in the relational database, which is very convenient for testers to compare the data collected by the real-time database with the data of the relational database, and efficiently verify the collection capability and data storage capability of the real-time database.
[0078] In step S130 , the data volume of the first data is obtained from the relational database according to the fields corresponding to the real-time data, and the data volume of the second data is obtained according to the fields corresponding to the historical data.
[0079] In a relational database, data tables are designed based on the relationships between entities, including fields composed of keywords such as time and name. Therefore, when reading data from a relational database, data can be read according to the fields.
[0080] In step S140 , the acquisition capability of the real-time database is determined by comparing the data and data volume of the real-time data with the data and data volume of the first data.
[0081] In an exemplary embodiment of the present invention, determining the acquisition capability of the real-time database by comparing the data volume of the real-time data with the data volume of the first data in this step includes: if the data volume of the real-time data is less than the data volume of the first data, determining that the acquisition capability of the real-time database is insufficient; and / or if the data of the real-time data and the data of the first data differ in content, determining that the acquisition capability of the real-time database is insufficient.
[0082] If the data volume of the real-time data is not less than the data volume of the first data and the data contents are consistent, it is determined that the collection capacity of the real-time database is sufficient.
[0083] In step S150 , the storage capacity of the real-time database is determined by comparing the data volume of the historical data with the data volume of the second data.
[0084] In an exemplary embodiment of the present invention, determining the storage capacity of the real-time database by comparing the data volume of the historical data with the data volume of the second data in this step includes: if the data volume of the historical data is less than the data volume of the second data, determining that the storage capacity of the real-time database is insufficient; and / or if the data of the historical data and the data of the second data are different in content, determining that the storage capacity of the real-time database is insufficient.
[0085] If the data volume of the historical data is not less than the data volume of the second data and the data contents are consistent, it is determined that the storage capacity of the real-time database is sufficient.
[0086] In an exemplary embodiment of the present invention, in addition to the above steps, the method may further include: verifying whether the capabilities of the real-time database and the relational database match, that is, within a preset period, determining whether the acquisition capability and storage capability of the real-time database are consistent based on the data and data volume of the real-time data, the data and data statistics of the first data, the data and data volume of the historical data, and the data and data volume of the second data. For example, the acquisition capability of the real-time database is determined based on the data volume of the real-time data in the real-time database and the data and data volume of the first data in the relational database. The storage capability of the real-time database is determined based on the data and data volume of the historical data in the real-time database and the data and data volume of the second data in the relational database. The acquisition capability and storage capability of the real-time database are further compared, and adjustments are made based on the comparison results to avoid data leakage caused by a mismatch between the acquisition and storage capabilities of the real-time database.
[0087] Figure 2 Schematic diagram of the data flow process for testing the real-time database capability in an embodiment of the present invention. Figure 2 As shown, first, according to the business characteristics of the real-time database and the basic requirements of automated testing, the data simulator tool is used to simulate data with different changes, and the simulator generates ultra-second data. At the same time, a counter is used to record the amount of data generated by the simulator. The data is collected and pushed to the real-time database through the collector software, and the data is synchronously written to the relational database. Then, the real-time data query interface and historical data query interface of the real-time data are called, and compared and analyzed with the data stored in the relational database to verify whether the data collection and storage of the real-time database are correct. If the real-time data in the real-time database is less than the data in the relational database or the data content is different, it means that the real-time database collection capability is insufficient. If the historical data in the real-time database is less than the data in the relational database or the data content is different, it means that the real-time database historical storage capability is insufficient. When the real-time data and historical data in the real-time database are consistent with the data in the relational database, it proves that under the current collection cycle and other conditions, the collection capability and storage capability of the real-time database are in compliance. Therefore, Figure 2 The test conclusions shown include the acquisition capability and storage capability of the real-time database and whether the acquisition capability and storage capability are in compliance.
[0088] Figure 3 An example diagram of a relational database in an embodiment of the present invention is shown in FIG. Figure 3 As shown, it includes ID, bit name, parameter value, quality code and time stamp.
[0089] Figure 1 The method shown can achieve the following effects:
[0090] 1) The simulator can be configured with parameters such as data type, change period, waveform, amplitude, etc., which can achieve the diversity of test data and meet the needs of the collector software. At the same time, the data can be directly written into the relational database, so that one piece of data can be stored in two types of databases for easy detection;
[0091] 2) Counting the data in the relational database and comparing the data stored in the real-time database to see if they are consistent can facilitate verification of the collection and storage capabilities of the real-time database, as well as the correctness and completeness of the collected data in the real-time database.
[0092] 3) Realize fast and accurate processing of data in relational databases, and compare and verify whether the historical data query interface (maximum value, minimum value, integral value, average value, etc.) provided by the real-time database is correct.
[0093] In summary, the above method solves the problem of avoiding uncertain factors of data source data and difficulty in achieving automated data verification in the traditional real-time database functional testing process. It can not only improve the accuracy and effectiveness of the test, but also reduce the workload of testers and the cost of testing software and hardware, effectively improving the quality of software products.
[0094] Corresponding to the above method, Figure 4 A schematic diagram of a real-time database capability testing system is provided in another embodiment of the present invention. Figure 4 As shown, the system 200 includes: a real-time data module 210 , a historical data module 220 , a relational data module 230 , a collection test module 240 and a storage test module 250 .
[0095] The real-time data module 210 is used to call real-time data from the real-time database and obtain the data and data volume of the real-time data; the historical data module 220 is used to call historical data from the real-time database and obtain the data and data volume of the historical data; the relational data module 230 is used to obtain the data volume of the first data according to the field corresponding to the real-time data, and obtain the data volume of the second data according to the field corresponding to the historical data from the relational database; the acquisition test module 240 is used to determine the acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data; the storage test module 250 is used to determine the storage capability of the real-time database by comparing the data and data volume of the historical data with the data and data volume of the second data.
[0096] The functions and effects of each unit in the system refer to the relevant description in the above method embodiment, which will not be repeated here.
[0097] In another aspect, the present disclosure further provides an electronic device, including a processor and a memory, wherein the memory stores operating instructions for the processor to control the following method:
[0098] Call real-time data from the real-time database and obtain the data and data volume of the real-time data;
[0099] Call historical data from the real-time database and obtain the data and data volume of historical data;
[0100] Obtaining the data volume of the first data according to the field corresponding to the real-time data from the relational database, and obtaining the data volume of the second data according to the field corresponding to the historical data;
[0101] determining the acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data;
[0102] The storage capacity of the real-time database is determined by comparing the data and data volume of the historical data with the data and data volume of the second data.
[0103] Reference below Figure 5 , which shows a structural diagram of a computer system 400 suitable for implementing an electronic device of an embodiment of the present application. Figure 5 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0104] like Figure 5 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage unit 407 into a random access memory (RAM) 403. Various programs and data required for the operation of the system 400 are also stored in the RAM 403. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0105] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 408 including a hard disk; and a communication section 409 including a network interface card such as a LAN card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read therefrom can be installed into the storage section 408 as needed.
[0106] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present application are executed.
[0107] It should be noted that the storage medium shown in this application can be a computer-readable signal medium or a computer-readable medium or any combination of the two. Computer-readable media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any combination of the above. More specific examples of computer-readable media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0108] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0109] The units involved in the embodiments described in this application may be implemented by software or hardware. The units described may also be provided in a processor, wherein the names of these units do not, in certain circumstances, constitute limitations on the units themselves.
[0110] On the other hand, the present disclosure also provides a storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not be installed in the electronic device. The above storage medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device includes the following method steps:
[0111] Call real-time data from the real-time database and obtain the data and data volume of the real-time data;
[0112] Call historical data from the real-time database and obtain the data and data volume of historical data;
[0113] Obtaining the data volume of the first data according to the field corresponding to the real-time data from the relational database, and obtaining the data volume of the second data according to the field corresponding to the historical data;
[0114] determining the acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data;
[0115] The storage capacity of the real-time database is determined by comparing the data and data volume of the historical data with the data and data volume of the second data.
[0116] It should be understood that the above description of the specific embodiments of the present invention is merely for the purpose of illustrating the technical approach and features of the present invention. Its purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. However, the present invention is not limited to the above-described specific embodiments. Any changes or modifications made within the scope of the claims of the present invention are intended to be covered by the scope of protection of the present invention.
Claims
1. A method for testing real-time database capabilities, characterized in that: The method comprises: Call real-time data from the real-time database and obtain the data and data volume of the real-time data; Call historical data from the real-time database and obtain the data and data volume of the historical data; Obtaining data and data volume of the first data according to the fields corresponding to the real-time data from the relational database, and obtaining data and data volume of the second data according to the fields corresponding to the historical data; Determining the acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data; determining the storage capacity of the real-time database by comparing the data and data volume of the historical data with the data and data volume of the second data; Also includes: Get the test data source of real-time data and historical data through simulator simulation; The simulated test data source is collected through the collector software and pushed to the real-time database to obtain real-time data and historical data; Writing the simulated test data source into a relational database and storing it as corresponding first data and second data according to structured fields; The test data source for obtaining real-time data and historical data through simulator simulation also includes: The counter is used to count the data of the real-time data simulated by the simulator and the data of the historical data.
2. The method for testing the real-time database capability according to claim 1, characterized in that: The test data source for obtaining real-time data and historical data through simulator simulation also includes: The simulator simulates the real-time database based on its business characteristics and the basic requirements of automated testing to obtain the test data source; The parameters in the test data source include at least one of a data type, a change period, a waveform, and an amplitude.
3. The method for testing the real-time database capability according to claim 1, characterized in that: Determining the acquisition capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data includes: If the data volume of the real-time data is smaller than the data volume of the first data, it is determined that the acquisition capacity of the real-time database is insufficient; and / or If the data of the real-time data and the data of the first data are different in content, it is determined that the acquisition capability of the real-time database is insufficient.
4. The method for testing the real-time database capability according to claim 1, characterized in that: Determining the storage capacity of the real-time database by comparing the data and data volume of the historical data with the data and data volume of the second data includes: If the data volume of the historical data is smaller than the data volume of the second data, it is determined that the storage capacity of the real-time database is insufficient; and / or If the data of the historical data and the data of the second data are different in content, it is determined that the storage capacity of the real-time database is insufficient.
5. The method for testing the real-time database capability according to any one of claims 1 to 4, characterized in that: Also includes: Within a preset period, whether the collection capacity and storage capacity of the real-time database are in compliance is determined based on the data and data volume of the real-time data, the data and data volume of the first data, the data and data volume of the historical data, and the data and data volume of the second data.
6. A real-time database capability testing system, characterized in that: The system comprises: Real-time data module, used to call real-time data from the real-time database and obtain the data and statistical data volume of real-time data; The historical data module is used to call historical data from the real-time database and obtain the data and data volume of the historical data; A relational data module, used to obtain the data volume of the first data according to the field corresponding to the real-time data from the relational database, and to obtain the data volume of the second data according to the field corresponding to the historical data; A collection test module, used to determine the collection capability of the real-time database by comparing the data and data volume of the real-time data with the data and data volume of the first data; A storage test module, for determining the storage capacity of the real-time database by comparing the data and data volume of the historical data with the data and data volume of the second data; Also includes: A simulation module is used to obtain a test data source of real-time data and historical data through simulator simulation; The push module is used to collect the simulated test data source through the collector software and push it to the real-time database to obtain real-time data and historical data; A writing module, used to write the simulated test data source into a relational database and store it as corresponding first data and second data according to structured fields; The simulation module is specifically used to use a counter to count the real-time data and historical data simulated by the simulator.
7. An electronic device, characterized in that: include: processor; A memory storing the method steps used by the processor to control the method according to any one of claims 1-5.
8. A storage medium having computer executable instructions stored thereon, characterized in that: When the executable instructions are executed by a processor, the method steps according to any one of claims 1-5 are implemented.
Citation Information
Patent Citations
Intelligent integrated testing method based on standard big data
CN107291582A
Database testing method and device, equipment and storage medium
CN109726136A
Time sequence database testing method and device, computer equipment and storage medium
CN113608981A