Mobile power supply abnormality testing method, device, computer equipment and storage medium
By performing integrity verification and anomaly detection on the real-time data packets of the mobile power bank and combining them with the test data collected by the camera, the problem of the mobile power bank testing process being cumbersome and time-consuming is solved, and efficient and accurate anomaly detection is achieved.
Patent Information
- Application Number
- CN202210401867.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-04-15
AI Technical Summary
The testing process of mobile power supplies is cumbersome and requires manual operation. There are many test items and it takes a long time, which is prone to omissions and errors.
By obtaining the real-time transmitted data packets, performing integrity verification and anomaly detection, and combining the test data collected by the camera, it is analyzed whether there is any abnormality in the mobile power supply.
It improves the detection speed, realizes the intelligent monitoring of multiple experimental data, saves labor costs, and ensures the accuracy and efficiency of test results.
Smart Images

Figure CN114994561B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic device testing, and in particular to a method, device, computer equipment, storage medium, and computer program product for abnormality testing of a mobile power supply. Background Art
[0002] With the increasing popularity of electronic devices, their application functions are becoming increasingly diverse, and their power consumption is also increasing accordingly. A fully charged mobile phone can usually only be used for a few hours. In order to facilitate users to charge at any time, mobile power supplies came into being. Each model of mobile power supply needs to be tested to better serve users.
[0003] However, the testing process is cumbersome and requires manual operation throughout. Instruments are used to test designated test points in the circuit. There are many test items, and tests such as power and voltage require multiple charge and discharge cycles. The charge and discharge process is recorded with the help of video. The backtracking process is time-consuming and prone to omissions and errors. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product that can efficiently test abnormalities of mobile power supplies in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for abnormality testing of a mobile power supply, the method comprising:
[0006] Acquire a data packet transmitted in real time; the data packet carries first test data of the mobile power supply;
[0007] performing integrity checks on each of the data packets in sequence based on the amount of data recorded at the end of the packet and the amount of data of the first test data obtained each time;
[0008] When the integrity check passes, performing abnormality detection on the first test data based on the model of the mobile power supply, and collecting second test data of the mobile power supply based on a camera;
[0009] When the power information in the second test data meets the power condition, performing anomaly detection on the second test data based on the model of the mobile power supply;
[0010] Based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, it is analyzed whether the mobile power supply has an abnormality.
[0011] In one embodiment, obtaining the data packet transmitted in real time includes:
[0012] Get the input test requirements and mobile power product number;
[0013] Determining the model of the mobile power supply based on the mobile power supply product number;
[0014] Determine the type of parameters to be transmitted according to the model and the test requirements;
[0015] When the mobile power supply is tested, a data packet carrying the first test data of the parameter category is acquired in real time.
[0016] In one embodiment, the performing integrity check on each of the data packets in sequence based on the amount of data recorded at the end of each acquired data packet and the amount of data of the first test data includes:
[0017] Comparing the data volume recorded at the tail of each data packet obtained with the data volume of the first test data;
[0018] When the data volume recorded in the packet tail is consistent with the data volume of the first test data, comparing the data volume of the first test data with the corresponding data volume threshold;
[0019] When the data volume of the first test data is less than the data volume threshold, the integrity check passes.
[0020] In one embodiment, comparing the data volume recorded at the tail of each acquired data packet with the data volume of the first test data includes:
[0021] Calculating the sum of the data volumes of the first test data of different parameter categories to obtain a target data volume of the first test data;
[0022] Comparing the data volume recorded at the end of the data packet with the target data volume of the first test data;
[0023] When the amount of the first test data is less than the data amount threshold, passing the integrity check includes:
[0024] When the target data volume is less than the data volume threshold, the integrity check is passed.
[0025] In one embodiment, collecting the second test data of the mobile power supply based on a camera includes:
[0026] Recording the mobile power supply under test based on the camera to obtain a test image;
[0027] The second test data is obtained based on the power indicator light or the power value display screen in the test screen.
[0028] In one embodiment, the performing abnormality detection on the first test data based on the model of the mobile power supply includes:
[0029] Determining a parameter threshold of the first test data based on the model of the mobile power supply;
[0030] Based on the first test data in each acquired data packet, a data curve of the first test data at each time is sequentially drawn in the window of the display interface;
[0031] According to the parameter threshold, abnormal data in the data curve is determined and marked.
[0032] In one embodiment, when the power information in the second test data meets the power condition, performing abnormality detection on the second test data based on the model of the mobile power supply includes:
[0033] Determining a corresponding power estimation rule based on the model of the mobile power supply;
[0034] When the power information in the second test data meets the power condition, estimating the time when the power information reaches the power condition according to the power estimation rule to generate an estimated power of the mobile power supply;
[0035] The power information in the second test data is compared with the estimated power of the mobile power supply to determine whether the second test data is abnormal.
[0036] In one embodiment, the analyzing whether the mobile power supply has an abnormality based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data includes:
[0037] Based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, determining whether at least one process of the mobile power supply during the charging and discharging process changes uniformly; and / or,
[0038] Based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, it is determined whether the power indicator light or the power value display screen of the mobile power supply is abnormal.
[0039] In a second aspect, the present application further provides a device for testing abnormalities of a mobile power supply, the device comprising:
[0040] A data packet acquisition module, configured to acquire a data packet transmitted in real time; the data packet carries first test data of the mobile power supply;
[0041] a data packet verification module, configured to perform integrity verification on each of the data packets in sequence based on the amount of data recorded at the end of the packet obtained each time and the amount of data of the first test data;
[0042] a first test data testing module, configured to, when the integrity check is passed, perform anomaly detection on the first test data based on the model of the mobile power supply, and collect second test data of the mobile power supply based on a camera;
[0043] a second test data testing module configured to perform an anomaly detection on the second test data based on the model of the mobile power supply when the power information in the second test data meets the power condition;
[0044] The mobile power supply abnormality determination module is configured to analyze whether the mobile power supply has an abnormality based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data.
[0045] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the abnormality test of the mobile power supply in any of the above embodiments.
[0046] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of abnormality testing of a mobile power supply in any of the above embodiments.
[0047] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of abnormality testing of a mobile power supply in any of the above embodiments.
[0048] The above-described power bank abnormality testing method, apparatus, computer device, storage medium, and computer program product acquire real-time transmitted data packets carrying first test data of the power bank. Based on the data volume recorded at the end of each acquired data packet and the data volume of the first test data, integrity checks are performed on each data packet in sequence. Thus, by verifying the integrity of the data packets, it is possible to accurately determine whether there is a transmission problem with the data packet and clearly identify the source of the abnormality. If the integrity check passes, the first test data is checked for abnormalities based on the power bank's model to determine whether the data transmitted in the data packet is abnormal. A camera is then used to capture second test data of the power bank. If the power level information in the second test data meets a power level condition, the second test data is checked for abnormalities based on the power bank's model to determine whether there is an abnormality in the power bank's power level. Based on at least one of the abnormality detection results of the first test data and the second test data, the power bank is analyzed for abnormality. This significantly improves detection speed, enables intelligent monitoring of multiple experimental data, and saves labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A diagram illustrating an application environment of a method for testing abnormalities of a mobile power supply according to an embodiment;
[0050] Figure 2 1 is a flow chart of a method for abnormality testing of a mobile power supply according to an embodiment;
[0051] Figure 3 This is a schematic diagram of a terminal structure in one embodiment;
[0052] Figure 4 1 is a flow chart of a method for abnormality testing of a mobile power supply according to another embodiment;
[0053] Figure 5 is a structural block diagram of an abnormality testing device for a mobile power supply in one embodiment;
[0054] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0056] The abnormality testing method of the mobile power supply provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 obtains a data packet transmitted in real time; the data packet carries the first test data of the mobile power supply; based on the amount of data recorded at the end of the packet obtained each time and the amount of data of the first test data, each of the data packets is sequentially checked for integrity; when the integrity check passes, the first test data is detected for anomalies based on the model of the mobile power supply, and the second test data of the mobile power supply is collected based on the camera; when the power information in the second test data meets the power condition, the second test data is detected for anomalies based on the model of the mobile power supply; based on at least one of the anomaly detection result of the first test data and the anomaly detection result of the second test data, the mobile power supply is analyzed for whether there is an anomaly.
[0057] Terminal 102 may include, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Server 104 may be implemented as a standalone server or a server cluster consisting of multiple servers.
[0058] In one embodiment, Figure 2 As shown, a method for abnormal testing of a mobile power supply is provided, which is applied to Figure 1 Taking the terminal 102 in FIG. 1 as an example, the method includes the following steps:
[0059] Step 202: Acquire a data packet transmitted in real time; the data packet carries first test data of the mobile power supply.
[0060] The first test data is test data transmitted via data packets. It can be data in charging mode, discharging mode, low current mode, or other application modes. The parameter category of the first test data can be one or more of current, voltage, temperature, and other test data.
[0061] A data packet consists of a header, a body, and a trailer. The header may record data such as the source address and destination address used to determine the transmission path, as well as the packet size. The header can be used to determine whether the packet carries the first test data and its parameter category. The body carries the test data of the packet, while the trailer records the size of the first test data in the packet.
[0062] In one embodiment, before acquiring data packets, the mobile power supply to be tested is connected to a terminal equipped with a test platform, and the corresponding test program is then launched. Testing is performed based on the product number and test requirements of the mobile power supply entered by the user in the test program. During the test, the terminal receives first test data via a URAT interface or other interface for transmitting data packets. The data packets acquired by the terminal in real time can be transmitted according to a preset period or frequency.
[0063] In one embodiment, obtaining a data packet for real-time transmission includes: obtaining input test requirements and a mobile power product number; determining the model of the mobile power based on the mobile power product number; determining the parameter category to be transmitted according to the model and the test requirements; and when testing the mobile power, obtaining a data packet carrying first test data of the parameter category in real time.
[0064] Testing requirements refer to the need to test data for certain parameter categories based on product requirements. Compared with comprehensive testing, it saves time and is more targeted. Testing requirements include at least one charging protocol corresponding to the mobile power supply, as well as optional test items. Among them, the electrical protocol refers to the switchable protocol set in different protocol chips, which can be various fast charging or slow charging modes; the charging protocol can be stored on the corresponding protocol chip; and the test items can be one or more items such as output voltage, input current, input voltage, input current, power, light load protection, short circuit protection, overcurrent protection, low power alarm, standby current, etc., and one item may undergo multiple charge and discharge test cycles of the mobile power supply.
[0065] There's a correspondence between product numbers and device models. One product number corresponds to one device model. Each device model has corresponding parameter thresholds, which are used to test the first test data to obtain the desired test results. Each device model also has corresponding power estimation rules, which are used to estimate the power level of the power bank at different times during the testing process.
[0066] Step 204 : Based on the data volume recorded at the end of each acquired data packet and the data volume of the first test data, integrity check is performed on each data packet in sequence.
[0067] The amount of the first test data is within a specific range and has a functional relationship with the amount of data recorded at the end of the packet. This functional relationship is used to verify the integrity of each data packet. After the first test data at different times is sequentially obtained from each data packet transmitted in real time, the first test data transmitted by each data packet is verified separately.
[0068] In one embodiment, based on the amount of data recorded at the end of each acquired data packet and the amount of data of the first test data, integrity verification is performed on each data packet in turn, including: comparing the amount of data recorded at the end of each acquired data packet with the amount of data of the first test data; when the amount of data recorded at the end of the packet is consistent with the amount of data of the first test data, comparing the amount of data of the first test data with a corresponding data amount threshold; when the amount of data of the first test data is less than the data amount threshold, passing the integrity verification.
[0069] Among them, the data volume recorded at the end of the packet is consistent with the data volume of the first test data, which may be caused by the fact that the data volume recorded at the end of the packet and the data volume of the first test data are both abnormal. Therefore, a data volume threshold for the first test data is set, and the data volume threshold is used to determine whether the data packet is within the preset data volume transmission range, so as to make the integrity check result more accurate.
[0070] In one embodiment, the amount of data recorded at the end of each data packet obtained is compared with the amount of data of the first test data, including: calculating the sum of the data amounts of the first test data of different parameter categories to obtain the target data amount of the first test data; and comparing the amount of data recorded at the end of the data packet with the target data amount of the first test data.
[0071] Correspondingly, when the data volume of the first test data is less than the data volume threshold, the integrity check is passed, including: when the target data volume is less than the data volume threshold, the integrity check is passed.
[0072] When the test requirement corresponds to data of multiple parameter categories, the data of different parameter categories can be arranged in different positions within the same data packet according to the order of the parameter categories, so that the data packet contains first test data of multiple parameter categories. In a data packet, the first test data of different parameter categories each has a corresponding data volume, and the sum of the data volumes of the first test data of each parameter category is the target data volume of the first test data.
[0073] Optionally, when the target data volume exceeds a corresponding data volume threshold, or is inconsistent with the data volume recorded in the packet tail, the data packet fails the integrity check. If the integrity check fails, a corresponding error message is sent to indicate an abnormality in the transmission process. The data packet transmission process is then checked to determine whether there are any abnormalities in test-related dimensions such as the input data and the test process. Once the abnormalities are corrected, the mobile power supply test is resumed.
[0074] Step 206 : When the integrity check is passed, anomaly detection is performed on the first test data based on the model of the mobile power supply, and second test data of the mobile power supply is collected based on the camera.
[0075] Through integrity checking, it is determined that there is no problem with the amount of data in the data packet during the transmission process, which is conducive to ensuring the accuracy of the detection of the first test data. It is also necessary to use a camera to shoot and collect the second test data to determine the progress of the test according to the power of the mobile power supply.
[0076] In one embodiment, anomaly detection is performed on first test data based on the model of the mobile power supply, including: determining a parameter threshold of the first test data based on the model of the mobile power supply; based on the first test data in the data packet obtained each time, drawing data curves of the first test data at each time in the window of the display interface; and determining and marking abnormal data in the data curve according to the parameter threshold.
[0077] Each power bank model corresponds to a threshold value for the parameter category to which the first test data belongs. This is used to determine whether the first test data for each parameter category is abnormal. To better display and analyze the first test data, its changing time and trend, a corresponding data curve is plotted. When the first test data at a certain moment in the data curve exceeds the threshold, the curve is marked to determine the time of the abnormality. If any parameter exceeds the threshold at a certain moment, the power bank is considered to have an abnormality; otherwise, no abnormality exists.
[0078] This allows for the acquisition of complete charge-discharge cycle data curves based on test requirements. Markings at different moments in the corresponding data curves can also be used to increase detection speed, enabling intelligent monitoring of multiple experimental data points by the host computer or other testing software, saving labor costs. Furthermore, markings on the data curves allow abnormal data to be transferred to a coordinate system of power and time.
[0079] In one embodiment, collecting the second test data of the mobile power supply based on the camera includes: recording the mobile power supply under test based on the camera to obtain a test screen; and obtaining the second test data based on the power indicator light or power value display screen in the test screen.
[0080] The battery indicator light is a component installed in the power bank. The power bank displays the power level by the number of lights or the position of the lights on the power bank. The power value display shows the power level of the power bank through the value displayed on the display set by the power bank.
[0081] During the charging and discharging process of the mobile power bank, its functional status can be detected by the naked eye, and can be traced back through the recorded test screen, which helps in two inspections. One is whether the charging and discharging process is uniform and whether there are problems such as power outages. The other is whether the light display or digital display is normal and whether there are quality problems such as no light, garbled characters, and bad pixels.
[0082] Optionally, when the test requirements are met, the recording is stopped and the recorded test footage is saved, and named according to the time and model. For example, during the discharge test, when the terminal detects that the indicator light is no longer on or the battery level display shows zero, the system is considered to have completed the discharge process. The discharging is considered complete when the current and voltage outputs are interrupted. At this point, the video is saved in .avi format and automatically named (date + model).
[0083] Step 208: When the power information in the second test data meets the power condition, an abnormality detection is performed on the second test data based on the model of the mobile power supply.
[0084] The power condition is a preset key power value. When the power information in the second test data matches the power condition, the power information satisfies the corresponding power condition. The power condition is set according to different mobile power supply models.
[0085] In one embodiment, when the power information in the second test data meets the power condition, the second test data is detected for abnormalities based on the model of the mobile power supply, including: determining the corresponding power estimation rule based on the model of the mobile power supply; when the power information in the second test data meets the preset power condition, estimating the time for the power information to reach the power condition according to the power estimation rule to generate the estimated power of the mobile power supply; comparing the power information in the second test data with the estimated power of the mobile power supply to determine whether the second test data is abnormal.
[0086] The power estimation rule is a calculation method based on time changes, which is used to estimate the power during the charging / discharging process of the mobile power supply to generate the corresponding mobile power supply estimated power supply. The mobile power supply estimated power supply is the theoretical power supply value of the mobile power supply of this model.
[0087] When the power information in the second test data is compared with the estimated power of the mobile power supply, if the power information is too high or too low, an abnormality may exist. Therefore, whether the mobile power supply has an abnormality can be determined based on the second test data.
[0088] Furthermore, when the mobile power supply is under testing, a time and power coordinate system and corresponding curves can be constructed to accurately locate the problems found in the test on the time and power coordinate axis based on the marks at different moments in the data curve of the first test data in the charge / discharge cycle.
[0089] Step 210 : Analyze whether the mobile power supply has an abnormality based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data.
[0090] In one embodiment, based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, it is determined whether at least one process of the mobile power supply during the charging and discharging process changes uniformly; and / or,
[0091] Based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, it is determined whether the power indicator light or the power value display screen of the mobile power supply is abnormal.
[0092] Specifically, during the charging process of the mobile power supply, when the first test data or the second test data is abnormal, there is a situation where there is uneven change. For example, when the first test data is the current input to the mobile power supply, and the abnormal detection result of the current input to the mobile power supply indicates that the current input to the mobile power supply exceeds the corresponding current threshold, then it is determined that the current input to the mobile power supply has uneven changes; when the second test data is the power of the mobile power supply during charging, and the abnormal detection result of the power of the mobile power supply during charging indicates that the power of the mobile power supply during charging is abnormal at the corresponding time, it is determined that the voltage input to the mobile power supply has uneven changes and whether a power outage has occurred.
[0093] During the discharge process of the mobile power supply, when the first test data or the second test data is abnormal, there is an uneven change. Its application scenario is similar to the charging process of the mobile power supply. Only the input data is different, so it is not described in detail.
[0094] During the charging or discharging process of the mobile power supply, the time when the power information reaches the power condition can be determined according to the abnormal detection result, and the time when the power information reaches the power condition can be used as the detection time. At each detection time, it can be detected whether the power indicator light is normally lit, and whether there are garbled characters or bad LEDs on the power value display screen.
[0095] For example, when recording the test footage of a mobile power bank to form a test video, the corresponding detection time is determined according to the abnormal detection result. By viewing the test video, the problem of the mobile power bank can be directly identified without retracing the complete test process, thereby improving test efficiency.
[0096] Optionally, the test results are categorized and saved to facilitate problem tracing.
[0097] The above-mentioned abnormality testing method for mobile power supplies can switch between different protocols in real time by building a protocol chip into the corresponding device, which is convenient for testing and can customize the test process according to product requirements; it can greatly improve the detection speed, and the upper computer detection software provides intelligent monitoring of multiple experimental data, saving labor costs; it can obtain the data curve of the first test data in the complete charging and discharging cycle, and mark the abnormal data on the data curve to accurately locate it on the time and power coordinate axis; the test results can also be classified and saved through the software to facilitate problem tracing.
[0098] In one embodiment, Figure 3 As shown, a terminal for testing abnormalities in a mobile power bank includes a device body and a host computer. The device body includes buttons, an input port, a load port, a display, an MCU chip, and a protocol chip corresponding to different mobile power bank charging modes. The host computer includes a display and a camera, and the host computer stores data through corresponding storage devices. Furthermore, the device body can operate independently when the host computer is not in use, and can be regarded as a convenient module that can display the current mobile power bank test data in real time and change the charging protocol through button control.
[0099] In one embodiment, Figure 4 As shown in the figure, the test process of power bank discharge is discussed. This test process executes the corresponding steps through a thread of the terminal. After the main thread is enabled, real-time data packets are obtained and the received data packets are checked for integrity. If the integrity check fails, the corresponding data packets are re-acquired. If the integrity check passes, the camera is turned on, the data curve is displayed, and the number of power indicator lights on the mobile power bank is recorded according to the camera. The time when the power indicator lights turn on and off is recorded to control the overall test process until the discharge test is completed. The main thread is terminated or returned to the thread pool to be enabled.
[0100] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0101] Based on the same inventive concept, embodiments of the present application also provide a mobile power supply abnormality testing device for implementing the aforementioned mobile power supply abnormality testing method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the mobile power supply abnormality testing device provided below can be found in the above-mentioned limitations of the mobile power supply abnormality testing method and will not be further elaborated here.
[0102] In one embodiment, Figure 5 As shown, a mobile power supply abnormality testing device is provided, including: a data packet acquisition module 502, a data packet verification module 504, a first test data testing module 506, a second test data testing module 508 and a mobile power supply abnormality determination module 510, wherein:
[0103] The data packet acquisition module 502 is configured to acquire a data packet transmitted in real time; the data packet carries first test data of the mobile power supply;
[0104] The data packet verification module 504 is configured to perform integrity verification on each of the data packets in sequence based on the amount of data recorded at the end of each data packet and the amount of data of the first test data;
[0105] a first test data testing module 506 configured to, when the integrity check is passed, perform anomaly detection on the first test data based on the model of the mobile power supply, and collect second test data of the mobile power supply based on a camera;
[0106] A second test data testing module 508 is configured to perform an anomaly detection on the second test data based on the model of the mobile power supply when the power information in the second test data meets the power condition;
[0107] The mobile power supply abnormality determination module 510 is configured to analyze whether the mobile power supply has an abnormality based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data.
[0108] In one embodiment, the data packet acquisition module 502 includes:
[0109] Test configuration unit, used to obtain input test requirements and mobile power product number;
[0110] A model determining unit, configured to determine the model of the mobile power supply based on the product number of the mobile power supply;
[0111] A parameter category determination unit, configured to determine the category of parameters to be transmitted according to the machine model and the test requirements;
[0112] The data packet acquisition unit is used to acquire a data packet carrying the first test data of the parameter category in real time when the mobile power supply is tested.
[0113] In one embodiment, the data packet verification module 504 includes:
[0114] a first verification unit, configured to compare the amount of data recorded at the end of each packet of the data packet obtained each time with the amount of data of the first test data;
[0115] a second verification unit, configured to compare the data volume of the first test data with a corresponding data volume threshold when the data volume recorded in the packet tail is consistent with the data volume of the first test data;
[0116] The verification result generating unit is configured to pass the integrity check when the amount of the first test data is less than the data amount threshold.
[0117] In one embodiment, the first verification unit includes:
[0118] a data volume calculation subunit, configured to calculate the sum of the data volumes of the first test data of different parameter categories to obtain a target data volume of the first test data;
[0119] a data volume comparison unit, configured to compare the data volume recorded at the end of the data packet with the target data volume of the first test data;
[0120] Correspondingly, the verification result generating unit includes:
[0121] The verification result generating subunit is used to pass the integrity check when the target data volume is less than the data volume threshold.
[0122] In one embodiment, the first test data testing module 506 includes:
[0123] a shooting unit, configured to record the mobile power supply under test based on the camera to obtain a test image;
[0124] The second test data acquiring unit is configured to acquire the second test data based on the power indicator light or the power value display screen in the test screen.
[0125] In one embodiment, the first test data testing module 506 includes:
[0126] a parameter threshold determination unit, configured to determine a parameter threshold of the first test data based on a model of the mobile power supply;
[0127] A data curve drawing unit, configured to draw, in a window of a display interface, data curves of the first test data at each time based on the first test data in the data packet obtained each time;
[0128] The first abnormal data determining unit is configured to determine and mark abnormal data in the data curve according to the parameter threshold.
[0129] In one embodiment, the second test data testing module 508 includes:
[0130] An estimation rule acquisition unit, configured to determine a corresponding power estimation rule based on the model of the mobile power supply;
[0131] a power estimation unit, configured to, when the power information in the second test data satisfies the power condition, estimate the time when the power information reaches the power condition according to the power estimation rule, and generate an estimated power of the mobile power supply;
[0132] The second abnormal data determining unit is configured to compare the power information in the second test data with the estimated power of the mobile power supply to determine whether the second test data is abnormal.
[0133] In one embodiment, the mobile power supply abnormality determination module 510 includes:
[0134] a first abnormality testing unit, configured to determine whether at least one of a charging process and a discharging process of the mobile power supply changes uniformly based on at least one of an abnormality detection result of the first test data and an abnormality detection result of the second test data;
[0135] The second abnormality testing unit is used to determine whether the power indicator light or the power value display screen of the mobile power supply is abnormal based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data.
[0136] Each module in the above-mentioned abnormality testing device for a mobile power supply can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0137] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for testing abnormalities of a mobile power supply is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0138] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0139] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0140] 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 in the above-mentioned method embodiments are implemented.
[0141] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0143] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented 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, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0144] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0145] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for abnormality testing of a mobile power supply, characterized in that: The method comprises: Acquire a data packet transmitted in real time; the data packet carries first test data of the mobile power supply; performing integrity checks on each of the data packets in sequence based on the amount of data recorded at the end of the packet and the amount of data of the first test data obtained each time; When the integrity check passes, performing abnormality detection on the first test data based on the model of the mobile power supply, and collecting second test data of the mobile power supply based on a camera; When the power information in the second test data meets the power condition, anomaly detection is performed on the second test data based on the model of the mobile power supply; the power information is used to indicate the test progress; Based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, it is analyzed whether the mobile power supply has an abnormality.
2. The method according to claim 1, characterized in that The obtaining of the real-time transmitted data packet includes: Get the input test requirements and mobile power product number; Determining the model of the mobile power supply based on the mobile power supply product number; Determine the type of parameters to be transmitted according to the model and the test requirements; When the mobile power supply is tested, a data packet carrying the first test data of the parameter category is acquired in real time.
3. The method according to claim 1, characterized in that The step of sequentially performing integrity checks on each of the data packets based on the amount of data recorded at the end of the packet obtained each time and the amount of data of the first test data includes: Comparing the data volume recorded at the tail of each data packet obtained with the data volume of the first test data; When the data volume recorded in the packet tail is consistent with the data volume of the first test data, comparing the data volume of the first test data with the corresponding data volume threshold; When the data volume of the first test data is less than the data volume threshold, the integrity check passes.
4. The method according to claim 3, characterized in that The comparing the data volume recorded at the tail of each acquired data packet with the data volume of the first test data includes: Calculating the sum of the data volumes of the first test data of different parameter categories to obtain a target data volume of the first test data; Comparing the data volume recorded at the end of the data packet with the target data volume of the first test data; When the amount of the first test data is less than the data amount threshold, passing the integrity check includes: When the target data volume is less than the data volume threshold, the integrity check is passed.
5. The method according to any one of claims 1 to 4, characterized in that The collecting the second test data of the mobile power supply based on the camera includes: Recording the mobile power supply under test based on the camera to obtain a test image; The second test data is obtained based on the power indicator light or the power value display screen in the test screen.
6. The method according to claim 1, characterized in that The performing abnormality detection on the first test data based on the model of the mobile power supply includes: Determining a parameter threshold of the first test data based on the model of the mobile power supply; Based on the first test data in each acquired data packet, a data curve of the first test data at each time is sequentially drawn in the window of the display interface; According to the parameter threshold, abnormal data in the data curve is determined and marked.
7. The method according to claim 1, characterized in that When the power information in the second test data meets the power condition, performing abnormality detection on the second test data based on the model of the mobile power supply includes: Determining a corresponding power estimation rule based on the model of the mobile power supply; When the power information in the second test data meets the power condition, estimating the time when the power information reaches the power condition according to the power estimation rule to generate an estimated power of the mobile power supply; The power information in the second test data is compared with the estimated power of the mobile power supply to determine whether the second test data is abnormal.
8. The method according to claim 1, characterized in that The analyzing whether the mobile power supply has an abnormality based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data includes: Based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, determining whether at least one process of the mobile power supply during the charging and discharging process changes uniformly; and / or, Based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data, it is determined whether the power indicator light or the power value display screen of the mobile power supply is abnormal.
9. A mobile power supply abnormality testing device, characterized in that: The device comprises: A data packet acquisition module, configured to acquire a data packet transmitted in real time; the data packet carries first test data of the mobile power supply; a data packet verification module, configured to perform integrity verification on each of the data packets in sequence based on the amount of data recorded at the end of the packet obtained each time and the amount of data of the first test data; a first test data testing module, configured to, when the integrity check is passed, perform anomaly detection on the first test data based on the model of the mobile power supply, and collect second test data of the mobile power supply based on a camera; A second test data testing module is configured to perform an anomaly detection on the second test data based on the model of the mobile power supply when the power information in the second test data meets the power condition; the power information is used to indicate the test progress; The mobile power supply abnormality determination module is configured to analyze whether the mobile power supply has an abnormality based on at least one of the abnormality detection result of the first test data and the abnormality detection result of the second test data.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Dynamic environment testing method and system for intelligent power supply
CN109613448A