Test method, platform, electronic device and medium for big data real-time stream model
By using an automated testing platform and methods to split and construct sample data, the problem of low testing efficiency for real-time streaming models of big data was solved, achieving full coverage and automated testing of expressions, thus improving testing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DBAPPSECURITY CO LTD
- Filing Date
- 2022-11-22
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, real-time big data streaming models require a large number of complex and repetitive regression tests after each modification, resulting in low testing efficiency.
This paper provides a testing platform and method for real-time streaming models of big data. The model expression is split into constituent elements by a model splitting component, multiple sample data that satisfy and do not satisfy the model are constructed using a sample construction component, and the data is sent to a big data platform for matching test through a data sending component, and the test results are automatically generated.
It enables automated testing of real-time big data streaming models, covering all branches of the expression, improving testing efficiency and reducing human judgment and repetitive work.
Smart Images

Figure CN115729819B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and in particular to a testing method, platform, electronic device, and readable storage medium for a real-time big data streaming model. Background Technology
[0002] The AiLPHA big data platform collects various logs through probes, parses the log formats, and sends them to the platform. The platform automatically performs calculations on this log data in real-time and matches it against a pre-built real-time big data stream model. If a match is successful, a corresponding alarm is generated. As the big data platform continuously iterates and updates, the real-time big data stream model needs to be modified in real time. Each modification requires large-scale regression testing, which involves a significant amount of complex and repetitive testing.
[0003] Therefore, how to effectively improve the testing efficiency of real-time big data streaming models is a technical problem that technical personnel in this field need to solve. Summary of the Invention
[0004] This application provides a testing method, platform, electronic device, and readable storage medium for real-time big data streaming models, which can effectively improve the testing efficiency of real-time big data streaming models.
[0005] To address the aforementioned technical problems, the embodiments of the present invention provide the following technical solutions:
[0006] One embodiment of the present invention provides a testing platform for a real-time big data streaming model, including a model splitting component, a sample construction component, and a data sending component;
[0007] The model splitting component is used to split the expressions of each real-time stream model to be tested, which are actively read from the big data real-time stream model database, to obtain each component element of each real-time stream model to be tested.
[0008] The sample construction component is used to recombine the constituent elements and rewrite the field values of each real-time stream model to be tested for each model, so as to construct multiple sample data that satisfy and do not satisfy the real-time stream model to be tested.
[0009] The data sending component is used to send all sample data to the real-time stream of the big data platform.
[0010] Optional, also includes:
[0011] The testing component is used to generate test results based on whether the pre-matching result and the actual matching result are consistent; if the pre-matching result and the actual matching result are consistent, the test is successful; if the pre-matching result and the actual matching result are inconsistent, the test fails.
[0012] The pre-matching result is the matching result between each sample data and the corresponding real-time streaming model to be tested, and the actual matching result is the matching result between each sample data and the big data real-time streaming model of the big data platform.
[0013] Optional, also includes:
[0014] The test result storage component is used to store the test results and corresponding sample data locally.
[0015] Optional, also includes:
[0016] A human-computer interaction component is used to receive test data keywords input by the user; the test data keywords are used to uniquely point to the target sample data.
[0017] The test result query component is used to obtain the actual matching result of the target sample data of the real-time streaming model to be queried based on the test data keywords and the model name of the real-time streaming model to be queried.
[0018] Optionally, the model splitting component is further used for:
[0019] The expressions of each real-time streaming model under test are split according to the operators;
[0020] Each element after splitting is further split according to various judgment conditions to obtain the matching conditions corresponding to each field.
[0021] Another embodiment of the present invention provides a testing method for a real-time big data streaming model, comprising:
[0022] The expressions of each real-time stream model to be tested, which are actively read from the big data real-time stream model database, are decomposed to obtain each component element of each real-time stream model to be tested.
[0023] For each real-time streaming model to be tested, the constituent elements of the current real-time streaming model to be tested are recombined and the field values are rewritten to construct multiple sample data that satisfy and do not satisfy the real-time streaming model to be tested.
[0024] Send all sample data to the big data platform in real time.
[0025] Optionally, after sending all sample data to the real-time stream of the big data platform, the process further includes:
[0026] Test results are generated based on whether the pre-matching results and the actual matching results are consistent.
[0027] If the pre-matching result and the actual matching result are consistent, the test is successful; if the pre-matching result and the actual matching result are inconsistent, the test fails.
[0028] The pre-matching result is the matching result between each sample data and the corresponding real-time streaming model to be tested, and the actual matching result is the matching result between each sample data and the big data real-time streaming model of the big data platform.
[0029] Optionally, the step of splitting the expressions of each real-time stream model to be tested, which are actively read from the big data real-time stream model database, includes:
[0030] The expressions of each real-time streaming model under test are split according to the operators;
[0031] Each element after splitting is further split according to various judgment conditions to obtain the matching conditions corresponding to each field.
[0032] This invention also provides an electronic device, including a processor, which executes a computer program stored in a memory to implement the steps of a test method for a real-time big data streaming model as described in any of the preceding claims.
[0033] Finally, this embodiment of the invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the test method for the real-time big data streaming model as described in any of the preceding embodiments.
[0034] The advantage of the technical solution provided in this application is that it actively reads the real-time big data streaming model from the database and automatically splits the model's expression. It constructs data for each split result, which will result in a large number of log samples in actual use. That is, for the same model, there will be multiple different test data, which can cover all branches of the expression and cover test data under various conditions as much as possible. This allows for sufficient branch testing of the expression, automating the verification test of collision between the real-time stream and the model, and thus effectively improving the testing efficiency of the real-time big data streaming model.
[0035] Furthermore, embodiments of the present invention also provide corresponding implementation methods, electronic devices, and readable storage media for testing platforms of big data real-time streaming models, further making the method more practical, and the method, electronic devices, and readable storage media have corresponding advantages.
[0036] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 A structural diagram of a specific implementation of the test platform for the real-time big data streaming model provided in this embodiment of the invention;
[0039] Figure 2 A flowchart illustrating a testing method for a real-time big data streaming model provided in an embodiment of the present invention;
[0040] Figure 3 A flowchart illustrating another testing method for a real-time big data streaming model provided in an embodiment of the present invention;
[0041] Figure 4 This is a structural diagram of a specific embodiment of the electronic device provided in this invention. Detailed Implementation
[0042] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may include steps or units not listed. After introducing the technical solutions of the embodiments of the present invention, various non-limiting embodiments of this application are described in detail below.
[0044] First see Figure 1 , Figure 1 This is a schematic diagram of the structural framework of a test platform for a real-time big data streaming model provided in an embodiment of the present invention. The embodiment of the present invention may include the following:
[0045] The test platform for the real-time big data streaming model in this embodiment can exist independently as an app or webpage, or it can exist as a built-in tool or built-in functional module of a big data platform. The test platform for the real-time big data streaming model may include a model splitting component 1, a sample construction component 2, and a data sending component 3.
[0046] The model splitting component 1 can be used to split the expressions of each real-time stream model to be tested, which is actively read from the big data real-time stream model database, to obtain each component element of each real-time stream model to be tested. All real-time stream models of the big data platform are stored in the big data real-time stream model database. Reading operations can be pre-set, such as when a user issues an automated testing command, or when new data is detected in the big data real-time stream model database. For example, if a real-time stream model is modified by adding, modifying, or deleting certain fields based on the original data, forming a new real-time stream model, the database can be actively read to serve as the real-time stream model to be tested. Once a real-time stream model to be tested is detected from the database, the model splitting component 1 splits the read model. After all expressions of the real-time stream models to be tested have been split, the example construction component 2 is called to process each model accordingly. Alternatively, the example construction component 2 can be called to process each model after it has been split.
[0047] In this embodiment, the sample construction component 2 is used to take each real-time streaming model to be tested as the current real-time streaming model to be tested, and recombine the constituent elements of the current real-time streaming model to be tested. Each combination corresponds to a construction expression, resulting in multiple data that satisfy and do not satisfy the conditions. For example, if the model expression is A and B, it can be broken down into three constituent elements: A, B, and and. Based on these three constituent elements, four data can be constructed: data that only satisfies A, data that only satisfies B, data that does not satisfy either A or B, and data that satisfies both A and B. Then, these satisfying and non-satisfied data are concatenated, assembled, or permuted to obtain multiple data. As another example, if the model expression is A = test value and B! = test value, it can be broken down into A = test value 1 and B! = test value 2. Then, based on the fact that the left side of the operator is the field name and the right side of the operator is the field value, by modifying the corresponding fields of the data, that is, rewriting the field values, four sample data that satisfy the overall expression and four sample data that do not satisfy the overall expression are constructed. For ease of description, these multiple data points can be referred to as multiple sample data points. Each real-time streaming model to be tested includes multiple sample data points. These multiple sample data points can cover all branches of the expression of the model to be tested, and cover test data under various conditions as much as possible.
[0048] Understandably, after receiving data, big data platforms like AiLPHA will match and collide the sample data with a real-time streaming model that meets certain conditions. If the received data satisfies the set conditions, an alarm or anomaly record will be generated. Therefore, in the process of testing the real-time streaming model under test, it is also necessary to put the constructed sample data into the big data platform for actual testing. In this embodiment, data sending component 3 is used to send all sample data to the real-time stream of the big data platform.
[0049] Therefore, by splitting component 1, sample construction component 2, and data sending component 3, the system can automatically read all real-time streaming models, split the expression according to the conditions of the real-time streaming model, and construct data based on the splitting results. Since it can construct both satisfied and unsatisfied data for each split data condition, it achieves full coverage of the expression. The entire process is handled by the program, automatically executing tests without requiring manual judgment of expressions, construction of data, or querying of data results, thus reducing a significant amount of complex and repetitive work.
[0050] The above embodiments do not limit how the test is performed. Based on the above embodiments, this application also provides another embodiment, which may include:
[0051] The testing platform for the aforementioned real-time big data streaming model may also include a testing component, which is used to generate test results based on whether the pre-matching result and the actual matching result are consistent. If the pre-matching result and the actual matching result are consistent, the test is successful; if the pre-matching result and the actual matching result are inconsistent, the test fails.
[0052] The pre-matching result is the matching result between each sample data and the corresponding real-time streaming model to be tested. In other words, after obtaining each sample data, each sample data is pre-matched with its corresponding real-time streaming model to be tested. The pre-matching result is the expected result of the test. After the sample data is sent to the big data platform, each sample data, as real-time data received by the big data platform, will be matched and collided with each real-time streaming model to generate the actual matching result. That is, the actual matching result is the matching result between each sample data and the big data platform's big data real-time streaming model. The expected test result is compared with the actual execution result, i.e., the actual matching result. If the actual execution result matches the pre-matching result, the test is marked as passed; otherwise, the test fails, thus achieving the purpose of automated testing.
[0053] Furthermore, to facilitate traceability, the aforementioned big data real-time streaming model testing platform may also include a test result storage component. This component stores the test results and corresponding sample data locally. Storing each test data point along with its corresponding actual test result facilitates troubleshooting or data playback when problems arise.
[0054] Furthermore, obtaining the actual matching results can be achieved through a query function, that is, querying the big data platform based on the sent sample data. Correspondingly, the testing platform for the big data real-time streaming model can also include a human-computer interaction component and a test result query component. The human-computer interaction component is used to receive test data keywords input by the user; the test data keywords uniquely point to the target sample data. The test result query component is used to obtain the actual matching results of the target sample data of the real-time streaming model to be queried, based on the test data keywords and the model name of the real-time streaming model to be queried.
[0055] The above embodiments do not limit how to perform the splitting. Based on the above embodiments, this application also provides an optional implementation method. In this embodiment, the model splitting component 1 can first split the expression of each real-time stream model to be tested according to the operator; then, after splitting, each element is further split according to various judgment conditions to obtain the matching conditions corresponding to each field.
[0056] In this embodiment, the syntax of the expression can be predefined, such as operators including: and, or, and parentheses; expressions including: contain (in), not contain (not in), regular expression matching (~), regular expression not matching (~!), etc. Based on these specific symbols, the operators are first split to facilitate the subsequent generation of data from the contents on both sides of each operator; then, various judgment conditions are split to obtain the matching conditions corresponding to each field.
[0057] Based on the above embodiments, this embodiment also provides a testing method for a real-time big data streaming model. The testing method for the real-time big data streaming model described below can be referred to in correspondence with the testing platform for the real-time big data streaming model described above. Descriptions identical to those in the above embodiments can be found in the implementation methods described in the above embodiments, and will not be repeated here. First, see... Figure 2 , Figure 2 This is a flowchart illustrating a testing method for a real-time big data streaming model provided by an embodiment of the present invention. The embodiment of the present invention may include the following:
[0058] S201: The expressions of each real-time stream model to be tested, which are actively read from the big data real-time stream model database, are split to obtain each component element of each real-time stream model to be tested.
[0059] S202: For each real-time streaming model to be tested, recombine the constituent elements of the current real-time streaming model to be tested and rewrite the field values to construct multiple sample data that satisfy and do not satisfy the real-time streaming model to be tested.
[0060] S203: Send all sample data to the big data platform in real time.
[0061] Based on the above embodiments, after sending all sample data to the real-time stream of the big data platform, as follows: Figure 3 As shown, it may also include:
[0062] Test results are generated based on whether the pre-matching results and the actual matching results are consistent.
[0063] If the pre-match result and the actual match result are the same, the test is successful; if the pre-match result and the actual match result are different, the test fails.
[0064] Among them, the pre-matching result is the matching result between each sample data and the corresponding real-time stream model to be tested, and the actual matching result is the matching result between each sample data and the big data real-time stream model of the big data platform.
[0065] As an optional implementation of the above embodiments, after obtaining the test results, the test results and the corresponding sample data can also be stored locally.
[0066] As another optional implementation of the above embodiments, before generating test results, the actual matching results can be queried and obtained, which may include the following:
[0067] Receive test data keywords input by the user; test data keywords are used to uniquely point to the target sample data;
[0068] Based on the test data keywords and the model name of the real-time streaming model to be queried, obtain the actual matching results of the target sample data of the real-time streaming model to be queried.
[0069] There is no limitation on how step S201 is performed. This embodiment provides one implementation method, which may include:
[0070] The expressions of each real-time streaming model under test are split according to the operators;
[0071] Each element after splitting is further split according to various judgment conditions to obtain the matching conditions corresponding to each field.
[0072] In the technical solution provided by the embodiments of the present invention, the big data real-time stream model is actively read from the database and the expression of the model is automatically split. Each split result is used to construct data. In actual use, this will result in a large number of log samples, that is, for the same model, there will be multiple different test data, which can cover all branches of the expression and cover test data under various conditions as much as possible. This allows for sufficient branch testing of the expression, realizes the automation of the verification test of the collision between the real-time stream and the model, and thus effectively improves the testing efficiency of the big data real-time stream model.
[0073] It should be noted that there is no strict order of execution for the steps in this application. As long as they conform to a logical order, these steps can be executed simultaneously or in a certain preset order. Figures 2-3 This is just an illustrative example and does not mean that this is the only possible execution order.
[0074] The above embodiments provide corresponding implementation methods for a test platform of a real-time big data streaming model. The computer program corresponding to the implementation of this test method is the program that supports the operation of the test platform for the real-time big data streaming model. The test platform for the real-time big data streaming model mentioned above is described from the perspective of functional modules. Furthermore, this application also provides an electronic device, which is described from the perspective of hardware. Figure 4 This is a schematic diagram of the structure of the electronic device provided in one embodiment of this application. For example... Figure 4 As shown, the electronic device includes a memory 40 for storing a computer program; and a processor 41 for executing the computer program to implement the steps of the test method for the big data real-time streaming model as mentioned in any of the above embodiments.
[0075] The processor 41 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 41 may also be a controller, microcontroller, microprocessor, or other data processing chip. The processor 41 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 41 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 41 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 41 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0076] The memory 40 may include one or more computer-readable storage media, which may be non-transitory. The memory 40 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the memory 40 may be an internal storage unit of an electronic device, such as a server hard drive. In other embodiments, the memory 40 may be an external storage device of an electronic device, such as a plug-in hard drive on a server, a smart media card (SMC), a secure digital card (SD), a flash card, etc. Furthermore, the memory 40 may include both internal and external storage units of the electronic device. The memory 40 can be used not only to store application software and various types of data installed on the electronic device, such as code in the process of executing the test method for the real-time big data streaming model, but also to temporarily store data that has been output or will be output. In this embodiment, the memory 40 is used to store at least the following computer program 401, which, after being loaded and executed by the processor 41, is capable of implementing the relevant steps of the test method for the real-time big data streaming model disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 40 may also include an operating system 402 and data 403, and the storage method may be temporary storage or permanent storage. The operating system 402 may include Windows, Unix, Linux, etc. Data 403 may include, but is not limited to, data corresponding to test results of big data real-time streaming models.
[0077] In some embodiments, the aforementioned electronic device may further include a display screen 42, an input / output interface 43, a communication interface 44 (or network interface), a power supply 45, and a communication bus 46. The display screen 42 and input / output interface 43, such as a keyboard, are user interfaces; optional user interfaces may also include standard wired interfaces, wireless interfaces, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a display screen or display unit, used to display information processed in the electronic device and to display a visual user interface. The communication interface 44 may optionally include a wired interface and / or a wireless interface, such as a Wi-Fi interface, a Bluetooth interface, etc., typically used to establish communication connections between the electronic device and other electronic devices. The communication bus 46 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0078] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, such as sensors 47 that perform various functions.
[0079] The functions of each functional module of the electronic device described in the embodiments of the present invention can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0080] As can be seen from the above, the embodiments of the present invention can effectively improve the testing efficiency of big data real-time streaming models.
[0081] It is understood that if the testing method for the real-time big data streaming model in the above embodiments is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, and other media capable of storing program code.
[0082] Based on this, embodiments of the present invention also provide a readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the steps of the test method for the big data real-time streaming model described in any of the above embodiments are as follows.
[0083] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Regarding the platform hardware disclosed in the embodiments, including platforms and electronic devices, since it corresponds to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0084] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0085] The foregoing has provided a detailed description of the testing method, platform, electronic device, and readable storage medium for a real-time big data streaming model provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the invention. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A test platform for a real-time big data streaming model, characterized in that, This includes a model splitting component, a sample construction component, and a data sending component; The model splitting component is used to split the expressions of each real-time stream model to be tested actively read from the big data real-time stream model database to obtain each component element of each real-time stream model to be tested; the model splitting component is also used to: split the inclusion, exclusion, regular expression matching, and regular expression non-matching in each real-time stream model to be tested according to and, or and parentheses; and then split each element according to various judgment conditions to obtain the matching conditions corresponding to each field. The sample construction component is used to recombine the constituent elements and rewrite the field values of each real-time stream model to be tested for each real-time stream model to be tested, so as to construct multiple sample data that satisfy and do not satisfy the real-time stream model to be tested. This includes: based on the field name on the left side of the operator and the field value on the right side of the operator obtained by splitting, modifying the corresponding fields of the data to construct data that satisfies the overall expression and data that does not satisfy the overall expression. The data sending component is used to send all sample data to the real-time stream of the big data platform, so that the big data platform can match and collide the received sample data with the real-time stream model.
2. The test platform for the real-time big data streaming model according to claim 1, characterized in that, Also includes: The testing component is used to generate test results based on whether the pre-matching results and the actual matching results are consistent. If the pre-matching result and the actual matching result are consistent, the test is successful; If the pre-matching result and the actual matching result are inconsistent, the test fails. The pre-matching result is the matching result between each sample data and the corresponding real-time streaming model to be tested, and the actual matching result is the matching result between each sample data and the big data real-time streaming model of the big data platform.
3. The test platform for the real-time big data streaming model according to claim 2, characterized in that, Also includes: The test result storage component is used to store the test results and corresponding sample data locally.
4. The test platform for the real-time big data streaming model according to claim 1, characterized in that, Also includes: Human-computer interaction component, used to receive test data keywords input by the user; The test data keyword is used to uniquely point to the target sample data; The test result query component is used to obtain the actual matching result of the target sample data of the real-time streaming model to be queried based on the test data keywords and the model name of the real-time streaming model to be queried.
5. The test platform for the real-time big data streaming model according to any one of claims 1 to 4, characterized in that, The model splitting component is further used for: The expressions of each real-time streaming model under test are split according to the operators; Each element after splitting is further split according to various judgment conditions to obtain the matching conditions corresponding to each field.
6. A testing method for a real-time big data streaming model, characterized in that, include: The expressions of each real-time stream model to be tested, which are actively read from the big data real-time stream model database, are decomposed to obtain each component element of each real-time stream model to be tested. For each real-time streaming model to be tested, the constituent elements of the current real-time streaming model to be tested are recombined and the field values are rewritten to construct multiple sample data that satisfy and do not satisfy the real-time streaming model to be tested. This includes: based on the field name on the left side of the operator and the field value on the right side of the operator obtained by splitting, modifying the corresponding fields of the data to construct data that satisfies the overall expression and data that does not satisfy the overall expression. All sample data is sent to the real-time stream of the big data platform so that the big data platform can match and collide the received sample data with the real-time stream model. This involves breaking down the expressions of each real-time streaming model to be tested, which will be actively read from the big data real-time streaming model database, into several parts, including: The elements of each real-time stream model under test are split according to the terms "and", "or", and parentheses, including inclusion, exclusion, regular expression matching, and regular expression non-matching. Each element is then split according to various judgment conditions to obtain the matching conditions corresponding to each field.
7. The testing method for the real-time big data streaming model according to claim 6, characterized in that, After sending all sample data to the real-time stream of the big data platform, the process also includes: Test results are generated based on whether the pre-matching results and the actual matching results are consistent. If the pre-matching result and the actual matching result are consistent, the test is successful; if the pre-matching result and the actual matching result are inconsistent, the test fails. The pre-matching result is the matching result between each sample data and the corresponding real-time streaming model to be tested, and the actual matching result is the matching result between each sample data and the big data real-time streaming model of the big data platform.
8. The testing method for the real-time big data streaming model according to claim 6, characterized in that, The process of splitting the expressions of each real-time stream model to be tested, which will be actively read from the big data real-time stream model database, includes: The expressions of each real-time streaming model under test are split according to the operators; Each element after splitting is further split according to various judgment conditions to obtain the matching conditions corresponding to each field.
9. An electronic device, characterized in that, It includes a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the steps of the test method for the big data real-time streaming model as described in any one of claims 6 to 8.
10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the test method for the real-time big data streaming model as described in any one of claims 6 to 8.
Citation Information
Patent Citations
Proxy method and device for verification of real-time data task
CN106201886A
Firmware testing method, server and computer readable storage medium
CN113127338A
Data testing method and equipment
CN115237756A