Data path end-to-end testing method, device, computer equipment and storage medium

By obtaining the data to be tested from the data path, analyzing and on-chain processing, and testing it in combination with the processing results of the terminal node, the problem of low end-to-end testing efficiency of the battery pack data path is solved, and efficient and accurate test results are achieved.

CN114487842BActive Publication Date: 2025-01-17HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111564882.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-01-17
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

The prior art is inefficient in end-to-end testing of the data path of the battery pack, especially in complex business systems across hardware to software, requiring manual testing and repeated operations, resulting in high workload and inefficiency.

Method used

By obtaining the data to be tested from the data path, analyzing it based on the test model, if the data is normal, it is carried out on the chain and stored in the blockchain, obtaining the processing results of the terminal node, and testing and processing based on the preset test method. Achieve end-to-end interaction.

Benefits of technology

It improves the efficiency and accuracy of end-to-end testing of data paths, reduces the frequency of manual repetition acquisition and testing, and improves the efficiency and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114487842B_ABST
    Figure CN114487842B_ABST
Patent Text Reader

Abstract

The present invention discloses a data path end-to-end test method, which is applied to the field of data testing and is used to improve the test efficiency of the data path end-to-end test for battery packs. The method provided by the present invention includes: obtaining the data to be tested from the data path; performing data analysis on the data to be tested based on the test model to obtain the analysis result; if the analysis result shows that the data to be tested is normal data, the data to be tested is processed on the chain, and the chain result obtained by the chain processing is stored in the blockchain; obtaining the processing result of the terminal node on the data to be tested; based on the preset test method, the processing result and the chain result are tested and processed to obtain the test result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data testing, and in particular to a data path end-to-end testing method, device, computer equipment and storage medium. Background Art

[0002] Current methods for end-to-end testing of data paths in battery packs, especially in complex business systems spanning hardware to software, are mostly based on manual testing or semi-automated testing.

[0003] When the connection board and battery pack are turned on, complex business system testing from hardware to software often requires turning on other components and manually testing some data to complete the end-to-end testing process of the data path. The workload during the testing process is large, and the manually tested data needs to be tested repeatedly, resulting in low efficiency of the overall testing process.

[0004] Therefore, existing methods for end-to-end testing of data paths of battery packs have the problem of low testing efficiency. Summary of the invention

[0005] Embodiments of the present invention provide a data path end-to-end test method, apparatus, computer equipment, and storage medium to improve the test efficiency of data path end-to-end testing for battery packs.

[0006] A data path end-to-end testing method, comprising:

[0007] Acquire the data to be tested from the data path;

[0008] Based on the test model, data analysis is performed on the data to be tested to obtain analysis results;

[0009] If the analysis result shows that the data to be tested is normal data, the data to be tested is processed on the chain, and the on-chain result obtained by the on-chain processing is stored in the blockchain;

[0010] Obtaining the processing result of the terminal node on the data to be tested;

[0011] Based on a preset test method, the processing result and the uplink result are tested to obtain a test result.

[0012] A data path end-to-end testing device, comprising:

[0013] A test data acquisition module, used for acquiring the test data from the data path;

[0014] An analysis module, used to perform data analysis on the data to be tested based on a test model to obtain analysis results;

[0015] A storage module, configured to, if the analysis result shows that the data to be tested is normal data, perform on-chain processing on the data to be tested, and store the on-chain result obtained by the on-chain processing in the blockchain;

[0016] A processing result acquisition module, used to obtain the processing result of the terminal node on the data to be tested;

[0017] The test module is used to test the processing result and the uplink result based on a preset test method to obtain a test result.

[0018] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned data path end-to-end testing method when executing the computer program.

[0019] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned data path end-to-end testing method are implemented.

[0020] The data path end-to-end testing method, device, computer equipment and storage medium provided by the embodiments of the present invention obtain the data to be tested from the data path; based on the test model, perform data analysis on the data to be tested to obtain the analysis result; if the analysis result is that the data to be tested is normal data, then the data to be tested is processed on the chain, and the on-chain result obtained by the on-chain processing is stored in the blockchain; obtain the processing result of the data to be tested by the terminal node; based on the preset test method, test the processing result and the on-chain result to obtain the test result. Through the above steps, by obtaining the data to be tested in the data path and the on-chain result corresponding to the data to be tested on the blockchain, end-to-end interaction can be achieved as long as the connection board and the battery pack are turned on, thereby improving the test efficiency of the data path end-to-end test for the battery pack. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0022] Figure 1 is a schematic diagram of an application environment of a data path end-to-end testing method in one embodiment of the present invention;

[0023] Figure 2is a flow chart of a data path end-to-end testing method in one embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of the structure of a data path end-to-end testing device in one embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] The data path end-to-end testing method provided in this application can be applied to Figure 1 In an application environment, a computer device communicates with a server via a network. The computer device may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.

[0028] In one embodiment, if Figure 2 As shown, a data path end-to-end test method is provided, which is applied in Figure 1 The server in the example is used to illustrate, including the following steps S101 to S105:

[0029] S101. Acquire data to be tested from a data path.

[0030] In step S101, the data to be tested includes but is not limited to can data and interface request data.

[0031] Among them, CAN data (Controller Area Network) refers to the broadcast message data that can be obtained by all nodes in the data path. Interface request data refers to the data information corresponding to the request initiated to one or more interfaces in the data path.

[0032] Testing of the above CAN data includes but is not limited to functional testing, stress testing, benchmark testing, high-concurrency performance load testing and stability testing.

[0033] The above data paths include but are not limited to data paths for battery packs. It should be understood that the data paths mentioned in the embodiments of the present invention are also applicable to other data paths with low test efficiency. No specific restrictions are made here.

[0034] By directly acquiring the data to be tested, it is convenient for subsequent data processing and analysis, and the frequency of manual repeated data collection is reduced, thereby improving the test efficiency of the end-to-end test of the data path for the battery pack.

[0035] S102: Based on the test model, perform data analysis on the test data to obtain analysis results.

[0036] In step S102, the implementation method of the above test model includes but is not limited to a positive and negative sample data training model and a BERT algorithm-based training model.

[0037] Preferably, positive and negative sample data are used to train the model.

[0038] The above data analysis refers to the process of analyzing the data to be tested. The above data analysis includes but is not limited to format analysis, function analysis, and state analysis. It should be understood that different data analysis methods can be selected for different data to be tested.

[0039] For example, when the test object is CAN data, the format of the CAN data is analyzed based on the test model, and whether the format meets the format requirements is used as the analysis result.

[0040] The test model is used to perform data analysis on the test data to obtain analysis results. Due to the robustness of the model, the frequency of manual repeated data collection and repeated testing can be reduced, thereby improving the test efficiency of end-to-end testing of the data path for battery packs.

[0041] S103. If the analysis result shows that the data to be tested is normal data, the data to be tested is uploaded to the blockchain, and the uploaded results obtained by the uploaded processing are stored in the blockchain.

[0042] In step S103, the above-mentioned on-chain processing refers to the process of converting and storing the data to be tested on the blockchain.

[0043] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0044] By uploading the data to be tested to the chain, the data to be tested can be stored on the blockchain as a data cache. Due to the security of the blockchain, it is convenient to conduct subsequent testing on the data to be tested, thereby improving the test accuracy of the end-to-end test of the data path for the battery pack.

[0045] S104: Obtain the processing result of the terminal node on the test data.

[0046] In step S104, the terminal node refers to the last node of the data path receiving the data to be tested.

[0047] The above processing result refers to the data after the terminal node processes the test data.

[0048] By obtaining the processing results of the terminal node on the test data and testing the test data based on the processing results, the test accuracy of the end-to-end test of the data path for the battery pack is improved.

[0049] S105: Based on a preset test method, test the processing result and the uplink result to obtain a test result.

[0050] In step S105, the above-mentioned preset test method includes but is not limited to comparison judgment and similarity calculation. Among them, comparison judgment refers to a method of obtaining a test result by comparing and judging the data corresponding to the same field in the processing result and the on-chain result. Similarity calculation refers to a method of calculating the similarity value between the processing result and the on-chain result, and comparing the similarity value with the preset similarity value to obtain a test result.

[0051] Preferably, a comparative judgment method is used for testing.

[0052] Through the preset test method, the processing results and the uplink results are compared and judged, which improves the test accuracy of the end-to-end test of the data path for the battery pack.

[0053] The data path end-to-end test method provided by the embodiment of the present invention obtains the data to be tested from the data path. Based on the test model, data analysis is performed on the data to be tested to obtain analysis results. If the analysis result is that the data to be tested is normal data, the data to be tested is processed on the chain, and the on-chain results obtained by the on-chain processing are stored in the blockchain; the processing result of the terminal node on the data to be tested is obtained; based on the preset test method, the processing result and the on-chain result are tested and processed to obtain the test result. Through the above steps, by obtaining the data to be tested in the data path and the on-chain results corresponding to the data to be tested on the blockchain, end-to-end interaction can be achieved as long as the connection board and the battery pack are turned on, thereby improving the test efficiency of the end-to-end test of the data path for the battery pack.

[0054] In some optional implementations of this embodiment, before step S102, the data path end-to-end testing method further includes steps S201 to S202:

[0055] S201. Deploy a test environment and build an initial test model based on the test environment.

[0056] S202: Obtain positive test data and negative test data, and input the positive test data and negative test data into an initial test model for training to obtain a test model.

[0057] In step S201, the test environment includes but is not limited to building a connection board system on the hardware side and a business middle platform environment. For example, building a blockchain underlying platform, the use of the blockchain underlying platform includes but is not limited to the test platform embedded environment of the connection board and the backend service of the business middle platform.

[0058] In step S202, the above-mentioned positive test data refers to data whose corresponding label is normal. The above-mentioned negative test data refers to data whose corresponding label is abnormal. Among them, the positive test data includes but is not limited to positive CAN data and positive interface request data. The negative test data includes negative CAN data and negative interface request data. It should be noted here that positive CAN data refers to message data that conforms to the CAN format, and negative CAN data refers to message data that does not conform to the CAN format.

[0059] It should be understood that positive test data can meet most of the syntax and functional tests of business backend services and embedded systems. Negative test data tests business backend systems and battery pack embedded systems. Depending on the abnormal scenario, the tested object can output different error messages.

[0060] The above-mentioned method of obtaining positive test data and negative test data includes but is not limited to test case writing and log acquisition. Among them, test case writing includes but is not limited to using Python, Java, and Go languages ​​to write test cases.

[0061] For example, when writing a test case for constructing negative CAN data, it includes but is not limited to constructing an incorrect CAN frame header and constructing CAN frame content that exceeds the set original boundary. Among them, constructing an incorrect CAN frame header, for example, assuming that the CAN frame header is only 0x00-0x08, constructing the CAN frame header to be 0xFF, and constructing CAN frame content that exceeds the set original boundary, for example, assuming that the CAN frame length is 6Bytes, the actual constructed length is 12Bytes.

[0062] When writing test cases for negative interface data, it includes but is not limited to constructing input parameter types and input parameter boundaries that do not conform to the interface document design. For example, the input parameter type is int type as required by the interface design, and the output parameter type is string type. For example, the input parameter boundary requires the format length of the string to be 256, and the actual input length is 512.

[0063] When the test data is CAN data, after the CAN data sends a message through the controller area network protocol (socketCAN protocol), the message content received by the candump method is used to verify whether the CAN port to be tested corresponding to the CAN data meets the basic functions of sending and receiving.

[0064] When the test data is interface data, the status of the business functions related to the backend services of the business middle station is verified through a Hypertext Transfer Protocol request.

[0065] During the training process, when the CAN message is positive CAN data, the CAN frame can be sent successfully through the cansend method, and the CAN frame content can be received through the candump method. If the received CAN frame content is the same as the sent CAN frame content, the verification passes; when the CAN message is negative CAN data, sending the message through the cansend method fails and the specific error reason is output.

[0066] When the interface request is a positive interface request data, a Hypertext Transfer Protocol request is sent through the request module, and the response is returned through the business backend service. The returned content is compared with the expected value. If they are the same, it means that the interface request verification is successful, otherwise it fails. When the interface request is a negative interface request data, an abnormal Hypertext Transfer Protocol request is constructed, and the response content is returned through the business backend service processing. The returned content is compared with the expected value. If they are the same, it means that the interface request verification is successful, otherwise it fails.

[0067] The test model trained through the above steps can effectively identify the test data, thereby improving the test efficiency of the end-to-end test of the data path for the battery pack.

[0068] In some optional implementations of this embodiment, after step S102, the data path end-to-end testing method further includes steps S203 to S204:

[0069] S203. If the analysis result shows that the data to be tested is abnormal data, the test model outputs an abnormal result.

[0070] S204: Based on the abnormal result, callback processing is performed on the test data and log content is output.

[0071] In step S203, when the data to be tested is can data, sending the message through the cansend method fails and the specific error reason is output.

[0072] When the data to be tested is interface request data, the response content is returned through the backend service processing of the business middle station. The backend service of the business middle station subscribes to the keywords of the blockchain message queue and verifies the response content. If the format does not match, the program will exit and output the error reason. If it matches, the transaction will be written to the database.

[0073] In step S204, the implementation method of the above callback processing includes but is not limited to the candump method.

[0074] By analyzing the test data through the test model to obtain abnormal results, and processing the test data according to the abnormal results, the processing capability of the test data can be effectively improved, thereby improving the test efficiency of the end-to-end test of the data path for the battery pack.

[0075] In some optional implementations of this embodiment, step S103 further includes the following steps S301 to S303:

[0076] S301. If the analysis result shows that the data to be tested is normal data, the data to be tested is format converted to obtain converted data.

[0077] S302: Packaging and signing the transferred data to obtain signed data.

[0078] S303: The signature data is processed on the chain as the chain result and stored in the blockchain.

[0079] In step S301, the format conversion process refers to the process of converting the format of data into the American Standard Code for Information Interchange (ASCII code).

[0080] In step S303, the above-mentioned on-chain processing refers to the process of sending the signature data to the blockchain for storage.

[0081] By converting the format of the test data, packaging the data, signing the data, and uploading it to the blockchain, the test data whose analysis results are normal data can be stored on the blockchain for subsequent analysis of the test data, thereby improving the test efficiency of the end-to-end test of the data path for the battery pack.

[0082] In some optional implementations of this embodiment, before step S104, the data path end-to-end testing method further includes steps S401 to S404:

[0083] S401. Obtain data to be tested based on the message queue corresponding to the terminal node.

[0084] S402: Perform verification processing on the test data according to a preset verification method to obtain a verification result.

[0085] S403: When the verification result is qualified, the data to be tested is used as the processing result.

[0086] S404: When the verification result is unqualified, the test data is discarded.

[0087] In step S402, the above-mentioned preset verification methods include but are not limited to format verification, function verification, and status verification.

[0088] For example, when the data to be tested is interface request data, the input parameter type and input parameter boundary of the interface request data are checked. When the interface design requires the input parameter type to be int, and the input parameter boundary requires the format length of the string to be 256, if the output parameter type is string and / or the actual input length is 512, the data to be tested can be determined to be unqualified.

[0089] By obtaining the data to be tested in the terminal node message queue and verifying it, the data to be tested can be analyzed later, thereby improving the test efficiency of the end-to-end test of the data path for the battery pack.

[0090] In some optional implementations of this embodiment, step S105 further includes the following steps S501 to S504:

[0091] S501. Obtain the data to be tested corresponding to the processing result and the data to be tested corresponding to the uplink result.

[0092] S502: Compare and judge the data to be tested corresponding to the processing result and the data to be tested corresponding to the uploaded result to obtain a comparison result.

[0093] S503: If the comparison result shows that the data to be tested corresponding to the processing result and the data to be tested corresponding to the uplink result are consistent, the test result is passed.

[0094] S504: If the comparison result shows that the data to be tested corresponding to the processing result and the data to be tested corresponding to the uploaded result are inconsistent, the test result is failure to pass the test.

[0095] In step S501, the method for obtaining the data to be tested corresponding to the processing result and the data to be tested corresponding to the on-chain result includes but is not limited to identification number acquisition and field matching. Among them, identification number acquisition means that the data to be tested corresponding to the processing result and the data to be tested corresponding to the on-chain result have the same identification number. Field matching means that the data to be tested corresponding to the processing result and the data to be tested corresponding to the on-chain result have a unique field for identification.

[0096] In step S502, the above-mentioned comparison and judgment refers to the process of comparing and judging the data corresponding to the same field in the processing result and the uploaded result to obtain the comparison result.

[0097] In step S503 and step S504, the display of the above test results can be displayed in combination with the allure plug-in, wherein allure refers to an open source tool for test reporting.

[0098] Through the above steps, full coverage of the end-to-end test of the data path for the battery pack is achieved, and the test report can be displayed, which is conducive to the subsequent processing of the test report, thereby improving the test efficiency of the end-to-end test of the data path for the battery pack.

[0099] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0100] In one embodiment, a data path end-to-end testing device is provided, and the data path end-to-end testing device corresponds one-to-one to the data path end-to-end testing method in the above embodiment. Figure 3 As shown, the data path end-to-end test device includes a test data acquisition module 11, an analysis module 12, a storage module 13, a processing result acquisition module 14 and a test module 15. The functional modules are described in detail as follows:

[0101] The test data acquisition module 11 is used to acquire the test data from the data path.

[0102] The analysis module 12 is used to perform data analysis on the test data based on the test model to obtain analysis results.

[0103] The storage module 13 is used to, if the analysis result shows that the data to be tested is normal data, perform on-chain processing on the data to be tested, and store the on-chain results obtained by the on-chain processing in the blockchain.

[0104] The processing result acquisition module 14 is used to obtain the processing result of the terminal node on the test data.

[0105] The test module 15 is used to test the processing result and the uplink result based on a preset test method to obtain a test result.

[0106] In one of the embodiments, the data path end-to-end testing device further includes:

[0107] The initial test model acquisition module is used to deploy the test environment and build the initial test model based on the test environment.

[0108] The training module is used to obtain positive test data and negative test data, and input the positive test data and negative test data into the initial test model for training to obtain the test model.

[0109] In one embodiment, after the analysis module 12, the data path end-to-end testing device further includes:

[0110] The anomaly identification unit is used to test the model to output an abnormal result if the analysis result shows that the data to be tested is abnormal data.

[0111] The exception handling unit is used to perform callback processing on the test data and output log content based on the exception results.

[0112] In one embodiment, the storage module 13 further includes:

[0113] The transfer unit is used for performing format transfer processing on the data to be tested to obtain transfer data if the analysis result shows that the data to be tested is normal data.

[0114] The signature data acquisition unit is used to perform data packaging and data signature processing on the transferred data to obtain signature data.

[0115] The storage unit is used to process the signature data as the on-chain result and store it in the blockchain.

[0116] In one embodiment, before the processing result acquisition module 14, the data path end-to-end testing device further includes:

[0117] The test data acquisition unit is used to acquire the test data based on the message queue corresponding to the terminal node.

[0118] The verification unit is used to verify the test data according to a preset verification method to obtain a verification result.

[0119] The first verification unit is used to use the data to be tested as the processing result when the verification result is qualified.

[0120] The second verification unit is used to discard the test data when the verification result is unqualified.

[0121] In one embodiment, the testing module 15 further comprises:

[0122] The data acquisition unit is used to acquire the data to be tested corresponding to the processing result and the data to be tested corresponding to the uplink result.

[0123] The comparison unit is used to compare and judge the data to be tested corresponding to the processing result and the data to be tested corresponding to the uploaded result to obtain a comparison result.

[0124] The first comparison unit is used for, if the comparison result is that the to-be-tested data corresponding to the processing result and the to-be-tested data corresponding to the uplink result are consistent, the test result is a passed test.

[0125] The second comparison unit is used to determine that the test result fails the test if the comparison result shows that the data to be tested corresponding to the processing result and the data to be tested corresponding to the uplink result are inconsistent.

[0126] The meaning of "first" and "second" in the above modules / units is only to distinguish different modules / units, and is not used to define which module / unit has a higher priority or other limiting meanings. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules in this application is only a logical division, and there may be other division methods when implemented in actual applications.

[0127] The specific definition of the data path end-to-end test device can be found in the definition of the data path end-to-end test method above, which will not be repeated here. Each module in the above-mentioned data path end-to-end test device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0128] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the data path end-to-end test method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data path end-to-end test method is implemented.

[0129] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the data path end-to-end testing method in the above embodiment are implemented, such as Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit of the data path end-to-end test device in the above embodiment are realized, for example, Figure 3 The functions of modules 11 to 15 are shown in Figure 1. To avoid repetition, they will not be described here.

[0130] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.

[0131] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.), etc.

[0132] The memory may be integrated into the processor or may be arranged separately from the processor.

[0133] In one embodiment, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, the steps of the data path end-to-end testing method in the above embodiment are implemented, such as Figure 2 Alternatively, when the computer program is executed by a processor, the functions of each module / unit of the data path end-to-end test device in the above embodiment are realized, for example, Figure 3 The functions of modules 11 to 15 are shown in Figure 1. To avoid repetition, they will not be described here.

[0134] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0135] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0136] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A data path end-to-end testing method, characterized in that: include: Acquire the data to be tested from the data path; Based on the test model, data analysis is performed on the data to be tested to obtain analysis results, wherein the data analysis includes at least one of format analysis, function analysis, and state analysis, and the analysis results include at least one of format analysis results, function analysis results, and state analysis results; If the analysis result shows that the data to be tested is normal data, the data to be tested is processed on the chain, and the on-chain result obtained by the on-chain processing is stored in the blockchain; Obtaining the processing result of the terminal node on the data to be tested; Obtain the data to be tested corresponding to the processing result and the data to be tested corresponding to the uploaded result; Compare and judge the data to be tested corresponding to the processing result and the data to be tested corresponding to the uploaded result to obtain a comparison result; If the comparison result is that the data to be tested corresponding to the processing result is consistent with the data to be tested corresponding to the uploaded result, then the test result is passed; If the comparison result is that the data to be tested corresponding to the processing result and the data to be tested corresponding to the uploaded result are inconsistent, then the test result is failure to pass the test.

2. The method according to claim 1, characterized in that Before the step of performing data analysis on the data to be tested based on the test model to obtain analysis results, the method further includes: Deploy a test environment and build an initial test model based on the test environment; Positive test data and negative test data are obtained, and the positive test data and the negative test data are input into the initial test model for training to obtain the test model.

3. The method according to claim 1, characterized in that After the step of performing data analysis on the data to be tested based on the test model to obtain analysis results, the method further includes: If the analysis result is that the data to be tested is abnormal data, the test model outputs an abnormal result, wherein the abnormal data includes at least one of format abnormal data, function abnormal data, and state abnormal data; Based on the abnormal result, callback processing is performed on the data to be tested and log content is output.

4. The method according to claim 1, characterized in that If the analysis result shows that the data to be tested is normal data, the steps of performing on-chain processing on the data to be tested, and storing the on-chain result obtained by the on-chain processing in the blockchain include: If the analysis result shows that the data to be tested is normal data, the data to be tested is format converted to obtain converted data; Performing data packaging and data signing processing on the transferred data to obtain signature data; The signature data is processed on the chain as the chain result and stored in the blockchain.

5. The method according to claim 1, characterized in that Before obtaining the processing result of the terminal node on the data to be tested, the method further includes: Based on the message queue corresponding to the terminal node, obtaining the data to be tested; According to a preset verification method, the data to be tested is verified to obtain a verification result; When the verification result is qualified, the data to be tested is used as the processing result; When the verification result is unqualified, the data to be tested is discarded.

6. A data path end-to-end testing device, characterized in that: include: A test data acquisition module, used for acquiring the test data from the data path; An analysis module, configured to perform data analysis on the data to be tested based on a test model to obtain an analysis result, wherein the data analysis includes at least one of a format analysis, a function analysis, and a state analysis, and the analysis result includes at least one of a format analysis result, a function analysis result, and a state analysis result; A storage module, configured to, if the analysis result shows that the data to be tested is normal data, perform on-chain processing on the data to be tested, and store the on-chain result obtained by the on-chain processing in the blockchain; A processing result acquisition module, used to obtain the processing result of the terminal node on the data to be tested; The test module is used to obtain the data to be tested corresponding to the processing result and the data to be tested corresponding to the on-chain result; compare and judge the data to be tested corresponding to the processing result and the data to be tested corresponding to the on-chain result to obtain a comparison result; if the comparison result is that the data to be tested corresponding to the processing result and the data to be tested corresponding to the on-chain result are consistent, then the test result is a passed test; if the comparison result is that the data to be tested corresponding to the processing result and the data to be tested corresponding to the on-chain result are inconsistent, then the test result is a failed test.

7. The device according to claim 6, characterized in that The device also includes: An initial test model acquisition module is used to deploy a test environment and build an initial test model based on the test environment; The training module is used to obtain positive test data and negative test data, and input the positive test data and the negative test data into the initial test model for training to obtain a test model.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the data path end-to-end testing method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the data path end-to-end testing method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Paper storage method and device based on block chain, and computer readable storage medium

    CN110222010A

  • Automatic random test method and device, computer equipment and medium

    CN111427803A