Automatic testing method and device for air pressure accuracy, electronic equipment and medium
Through automated testing methods, the complex and complicated problems of AI mattress air pressure testing are solved, and efficient air pressure accuracy testing is achieved, which significantly improves testing efficiency and accuracy, reduces manpower investment, and optimizes the product research and development and marketing promotion process.
Patent Information
- Application Number
- CN202411371413.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-10
AI Technical Summary
The air pressure testing process of existing AI mattresses is complicated and requires manual operation, resulting in large labor investment and high time cost, which seriously restricts R&D efficiency and market promotion speed.
Using automated testing methods, the target air cushion equipment for pre-test is determined through the test selection instructions of the target object, the air pressure is adjusted in response to the test start instruction, and the test report is generated, including the adjustment success or failure and the reasons for failure, and the transmission instance is transmitted using API calls and message queues. Monitor the air pressure adjustment information, automatically compare the air pressure range, and generate test statistics.
Significantly improve testing efficiency, reduce manpower investment, improve testing accuracy, provide immediate feedback on the reasons for failure, optimize the testing process, shorten product R&D cycle, and enhance market competitiveness.
Smart Images

Figure CN119292233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an automated testing method, device, electronic equipment and medium for air pressure accuracy. Background Art
[0002] In the wave of modern health technology, AI mattresses, with their excellent ergonomic design and intelligent adjustment functions, have become an important innovative product to protect people's spinal health. This type of mattress uses built-in precision algorithms to cleverly control the inflation and deflation process of the airbags, and can dynamically and accurately adjust the softness and hardness of the head, shoulders, waist, hips, legs and other parts of the body, so as to perfectly fit the natural physiological curvature of the human spine, providing users with unprecedented comfort and health protection.
[0003] However, behind this high-tech product, there are huge challenges in the testing and verification process. At present, in order to ensure the accuracy of the air pressure control of the AI mattress, testers have to rely on manual operation to adjust the air pressure level of the airbags one by one. This process is not only cumbersome and complicated, but also requires testers to strictly refer to the established air pressure standards and carefully compare them with the actual air pressure values reported by the mattress for each part.
[0004] What is even more difficult is that in order to fully verify the long-term reliability and durability of the airbag control unit, such a test process needs to be repeated many times. This not only means huge manpower investment, but also leads to a sharp increase in time costs, which seriously restricts the R&D efficiency and market promotion speed of AI mattresses. Summary of the invention
[0005] The main purpose of the embodiments of the present invention is to provide an automated test method, device, electronic device and medium for air pressure accuracy, in order to solve at least one problem of the prior art. The present invention can efficiently perform automated testing of air pressure accuracy.
[0006] To achieve the above object, an embodiment of the present invention provides an automated test method for air pressure accuracy, the method comprising:
[0007] Based on the test selection instruction of the target object, determining the target air cushion device for pre-test; the target air cushion device is provided with an air pressure regulating device;
[0008] In response to a test start instruction of the target object, an air pressure regulating device of the target air cushion device is inflated and deflated;
[0009] A test report is generated based on the results of the inflation and deflation operations; the test report includes the test results, and the test results include successful adjustment or failed adjustment; when the test result is a failed adjustment, the test report also includes the cause of the failure.
[0010] In some embodiments, the method further comprises the following steps:
[0011] In response to the binding instruction of the target object, scanning and obtaining the communication information of the air cushion device to be tested;
[0012] Based on the communication information, the network configuration information is sent to the air cushion device through the general attribute protocol, so that the air cushion device completes the network configuration operation;
[0013] Associate the air cushion device that has completed the network configuration operation with the test account;
[0014] Among them, the target air cushion device is selected and determined from the air cushion devices associated with the test account based on the test selection instruction of the target object.
[0015] In some embodiments, the air pressure regulating device of the target air cushion device is inflated and deflated, comprising the following steps:
[0016] Sending an inflation instruction to an air pressure regulating device of a target air cushion device, so that the air pressure regulating device inflates a target position of the target air cushion device to a first gear position;
[0017] After a preset inflation cycle, a deflation instruction is sent to the air pressure regulating device of the target air cushion device, so that the air pressure regulating device deflates the target position of the target air cushion device to the second gear position;
[0018] After the preset deflation cycle, the number of operations is increased by 1, and the process returns to the step of sending an inflation command to the air pressure regulating device of the target air cushion device until the number of operations reaches the preset number of tests;
[0019] The number of operations is initially 0, and the number of tests is determined based on the test selection instruction.
[0020] In some embodiments, the test report also includes adjustment information; generating the test report based on the results of the inflation and deflation operations includes the following steps:
[0021] Establish a message queue telemetry transmission instance based on the media access control address of the target air cushion device;
[0022] Monitoring the adjustment information of the inflation and deflation operation of the air pressure regulating device in the target air cushion device through the message queue telemetry transmission instance;
[0023] The adjustment information includes the total number of adjustment times of the inflation and deflation operations, the start and end time of each inflation and deflation operation, and the air pressure value after each inflation and deflation operation is completed;
[0024] Obtaining the device type of the target air cushion device and the adjustment gear position of the inflation and deflation operation;
[0025] Obtaining a target air pressure range from preset air pressure range setting data based on the device type and the adjustment gear;
[0026] When the air pressure value exceeds the target air pressure range, the test result of the corresponding inflation and deflation operation is determined to be adjustment failure, and the failure reason is determined to be the first reason; otherwise, the test result of the corresponding inflation and deflation operation is determined to be adjustment success, and the failure reason is determined to be null;
[0027] A test report is obtained based on the adjustment information, test results and failure reasons corresponding to all inflation and deflation operations.
[0028] In some embodiments, the inflation and deflation operations are performed based on an API call. When the result of the API call is a failure, the method further includes the following steps:
[0029] The adjustment information corresponding to the corresponding inflation and deflation operation is set to empty, the test result corresponding to the inflation and deflation operation is set to adjustment failure, and the failure reason is determined to be the second reason.
[0030] In some embodiments, the method further comprises the following steps:
[0031] In response to the test setting instruction of the target object, the air pressure range of the air cushion devices of all device types at each adjustment gear is obtained, and then the air pressure range setting data is saved.
[0032] In some embodiments, the test report also includes test statistics; the method further includes the following steps:
[0033] The test statistics are obtained by summarizing the test results corresponding to all the inflation and deflation operations, and the test statistics are added to the test report;
[0034] Among them, the test statistical information includes the number of test passes and the number of test failures; the number of test passes is obtained based on the number of inflation and deflation operations with successful test results, and the number of test failures is obtained based on the number of inflation and deflation operations with failed test results.
[0035] To achieve the above object, another aspect of an embodiment of the present invention provides an automatic test device for air pressure accuracy, the device comprising:
[0036] The first module is used to determine a target air cushion device for pre-test based on a test selection instruction of a target object; the target air cushion device is provided with an air pressure regulating device;
[0037] The second module is used to inflate and deflate the air pressure regulating device of the target air cushion device in response to the test start instruction of the target object;
[0038] The third module is used to generate a test report based on the results of the inflation and deflation operations; the test report includes the test results, and the test results include successful adjustment or failed adjustment; when the test result is a failure of adjustment, the test report also includes the cause of the failure.
[0039] In some embodiments, the apparatus further comprises:
[0040] The fourth module is used to scan and obtain the communication information of the air cushion device to be tested in response to the binding instruction of the target object;
[0041] The fifth module is used to send network configuration information to the air cushion device through the general attribute protocol based on the communication information, so that the air cushion device completes the network configuration operation;
[0042] The sixth module is used to associate the air cushion device that has completed the network configuration operation with the test account;
[0043] Among them, the target air cushion device is selected and determined from the air cushion devices associated with the test account based on the test selection instruction of the target object.
[0044] In some embodiments, the inflation and deflation operations are performed based on an API call, and when the result of the API call is a failure, the apparatus further comprises:
[0045] The seventh module is used to set the adjustment information corresponding to the corresponding inflation and deflation operation to empty, set the test result corresponding to the inflation and deflation operation to adjustment failure, and determine the failure reason as the second reason.
[0046] In some embodiments, the apparatus further comprises:
[0047] The eighth module is used to respond to the test setting instruction of the target object, obtain the air pressure range of the air cushion devices of all device types at each adjustment gear, and then save the air pressure range setting data.
[0048] In some embodiments, the test report also includes test statistics; the apparatus further includes:
[0049] A ninth module is used to obtain test statistics based on the test results corresponding to all inflation and deflation operations, and add the test statistics to the test report;
[0050] Among them, the test statistical information includes the number of test passes and the number of test failures; the number of test passes is obtained based on the number of inflation and deflation operations with successful test results, and the number of test failures is obtained based on the number of inflation and deflation operations with failed test results.
[0051] To achieve the above objective, another aspect of an embodiment of the present invention provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.
[0052] To achieve the above objective, another aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0053] The present invention provides an automated test method, device, electronic device and medium for air pressure accuracy. The scheme determines the target air cushion device for pre-test by selecting a test instruction based on the target object; the target air cushion device is provided with an air pressure regulating device; in response to the test start instruction of the target object, the air pressure regulating device of the target air cushion device is inflated and deflated; a test report is generated based on the result of the inflating and deflation operation; the test report includes the test result, and the test result includes adjustment success or adjustment failure; when the test result is adjustment failure, the test report also includes the failure reason. The embodiments of the present invention include at least the following beneficial effects:
[0054] Significantly improve test efficiency: Through the automated command control and response mechanism, there is no need to manually adjust the air pressure level and compare data one by one, which greatly shortens the test cycle and reduces time costs.
[0055] Reduce manpower input: The testing process is almost fully automated, which significantly reduces the consumption of human resources and makes testing work easier and more efficient.
[0056] Improve test accuracy: The automated test system can accurately perform inflation and deflation operations and automatically generate a report containing test results based on the operation results, reducing human errors and improving test accuracy and reliability.
[0057] Instant feedback on the cause of failure: When the test result is an adjustment failure, the test report will automatically include the cause of failure, which helps technicians quickly locate the problem and take timely measures to repair it, further speeding up problem solving.
[0058] Enhance product competitiveness: By optimizing the testing process, the product development cycle is shortened, the cost is reduced, and the air cushion equipment can be brought to market faster, thus enhancing the market competitiveness of the product.
[0059] In summary, the technical solution of the present invention not only solves the key problems in air pressure testing, but also provides strong support for product quality control and efficiency improvement through automated and intelligent testing methods. It is an important step in promoting the development of health technology products. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 is a flow chart of an automated testing method for air pressure accuracy provided by an embodiment of the present invention;
[0061] Figure 2is a schematic diagram of an example of an operation interface of an air pressure monitoring tool provided by an embodiment of the present invention;
[0062] Figure 3 is a schematic diagram of an example of a gear position air pressure preset interface provided by an embodiment of the present invention;
[0063] Figure 4 It is a schematic diagram of the structure of an automated testing device for air pressure accuracy provided by an embodiment of the present invention;
[0064] Figure 5 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention. They are only examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the attached claims.
[0066] It is understood that the terms "first", "second", etc. used in the present invention may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0067] The terms "at least one", "multiple", "each", "any", etc. used in the present invention, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0069] The automated testing method for air pressure accuracy provided by the embodiment of the present invention relates to the field of data processing technology. The automated testing method for air pressure accuracy provided by the embodiment of the present invention can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application of an automated testing method for air pressure accuracy, etc., but is not limited to the above forms.
[0070] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0071] Figure 1 is an optional flow chart of the automated testing method for air pressure accuracy provided by an embodiment of the present invention. Figure 1 The method may include but is not limited to steps S100 to S300.
[0072] S100, determining a target air cushion device for pre-test based on a test selection instruction of a target object;
[0073] Wherein, the target air cushion equipment is provided with an air pressure regulating device;
[0074] It should be noted that, in some embodiments, the method may further include the following steps: in response to the binding instruction of the target object, scanning and obtaining the communication information of the air cushion device to be tested; based on the communication information, sending the network configuration information to the air cushion device through the general attribute protocol, so that the air cushion device completes the network configuration operation; associating the air cushion device that has completed the network configuration operation to the test account; wherein, the target air cushion device is selected and determined from the air cushion devices associated with the test account based on the test selection instruction of the target object.
[0075] In some specific application scenarios, the communication information may be Bluetooth information, wireless connection information (for example, 4G, 5G IoT information or WiFi information).
[0076] Exemplarily, in some specific implementations, the target air cushion device can be a mattress, a cushion, a sofa, or other equipment including an air pressure regulating device. The following uses a mattress as an example for illustration (the same applies to subsequent specific implementations): Before starting the test, the mattress can be bound to the test account family through a preset application / automated testing tool (used to implement the logic of the technical solution of the present invention). The binding process can be implemented as follows: First, power on the mattress, turn on the Bluetooth of the mobile phone, enter the app and log in to the test account. Then enter the app (i.e., application) to add the mattress interface. At this time, the Bluetooth information released by the mattress (including the Bluetooth name, mac and type of the mattress) will be scanned. Then the app will send the SSID, password and MQTT communication configuration of the wifi connection to the mattress through the GATT (Generic Attribute) protocol to achieve network binding. After successful binding, the Bluetooth name, mac and type of the mattress will be saved in the database and associated with the family of the test account.
[0077] In some specific application scenarios, you can start the automated testing tool (hereinafter referred to as the "tool"), the main interface (such as Figure 2 The bound mattress will be automatically loaded into the device drop-down box (as shown), and the displayed content includes the mattress name and type. Then, in response to the test selection instruction of the tester (including but not limited to click operation and box selection operation and other selection operations), the (one or more) mattresses to be tested are selected; the number of tests can also be determined in response to the test selection instruction of the tester (including but not limited to digital input operation).
[0078] S200, in response to a test start instruction of the target object, performing an inflating and deflating operation on an air pressure regulating device of a target air cushion device;
[0079] It should be noted that, in some embodiments, the inflation and deflation operations on the air pressure regulating device of the target air cushion device may include the following steps: sending an inflation command to the air pressure regulating device of the target air cushion device, so that the air pressure regulating device inflates the target position of the target air cushion device to a first gear; after a preset inflation cycle, sending a deflation command to the air pressure regulating device of the target air cushion device, so that the air pressure regulating device deflates the target position of the target air cushion device to a second gear; after the preset deflation cycle, adding 1 to the number of operations, and returning to execute the step of sending an inflation command to the air pressure regulating device of the target air cushion device until the number of operations reaches a preset number of tests; wherein the number of operations is initially 0, and the number of tests is determined based on the test selection instruction.
[0080] In some specific application scenarios, when the target air cushion device is provided with multiple air pressure regulating devices (for example, provided at multiple different positions), the aforementioned inflation and deflation operations can be performed on the air pressure regulating devices at each position in turn according to the preset test sequence. Similarly, when the number of target air cushion devices is greater than 1, the aforementioned inflation and deflation operations can be performed on all target air cushion devices in parallel, wherein the testing principle when the target air cushion device is provided with multiple air pressure regulating devices is the same as the aforementioned.
[0081] For example, in some specific embodiments, Figure 2 As shown, after determining the pre-tested equipment, you can start the inflation and deflation test by clicking the "Start" button (i.e., the test start command). At this point, the tool connects to the MQTT proxy server according to the specified host name, port number, account number, and password, and creates an MQTT client instance with the mattress mac as the client_id, and then subscribes to the relevant topics based on the mattress mac to monitor the entire life cycle of the mattress adjustment (multiple mattresses will create multiple instances and topics). Subsequently, the tool will read the gear position of the corresponding configuration table according to the type of mattress selected, and call the mattress adjustment API to issue instructions (the request parameters are the mattress mac, adjustment part, and gear position).
[0082] S300: Generate a test report based on the results of the inflation and deflation operations.
[0083] The test report includes the test result, which includes adjustment success or adjustment failure; when the test result is adjustment failure, the test report also includes the failure reason;
[0084] It should be noted that the test report also includes adjustment information; in some embodiments, generating a test report based on the result of the inflation and deflation operation may include the following steps: establishing a message queue telemetry transmission instance based on the media access control address of the target air cushion device; monitoring the adjustment information of the inflation and deflation operation performed by the air pressure adjustment device in the target air cushion device through the message queue telemetry transmission instance; wherein the adjustment information includes the total number of adjustment times of the inflation and deflation operation, the start time and end time of each inflation and deflation operation, and the air pressure value after each inflation and deflation operation is completed; obtaining the device type of the target air cushion device and the adjustment gear of the inflation and deflation operation; obtaining the target air pressure range from the preset air pressure range setting data based on the device type and the adjustment gear; when the air pressure value exceeds the target air pressure range, determining that the test result of the corresponding inflation and deflation operation is an adjustment failure, and determining that the failure reason is the first reason, otherwise, determining that the test result of the corresponding inflation and deflation operation is an adjustment success, and determining that the failure reason is empty; and obtaining a test report based on the adjustment information, test results and failure reasons corresponding to all inflation and deflation operations. wherein, when the number of tests is preset, the total number of adjustments is the preset number of tests.
[0085] Further, in some embodiments, the inflation and deflation operations are performed based on an API call. When the result of the API call is failure, the method may also include the following steps: setting the adjustment information corresponding to the corresponding inflation and deflation operations to empty, setting the test results corresponding to the inflation and deflation operations to adjustment failure, and determining the cause of failure to be the second cause.
[0086] Exemplarily, in some specific implementations, if the API call is successful, the corresponding mattress will receive messages reported during the adjustment process, including the adjusted part, progress, air pressure data, and the final adjustment completion status; if the API call fails, the gear adjustment fails, the error returned by the API is recorded, and then the next instruction is executed (testing the next air pressure regulating device of the air cushion device or the next air cushion device) without interrupting the overall test process.
[0087] In some embodiments, the method may further include the following steps: in response to a test setting instruction of the target object, obtaining the air pressure range of the air cushion devices of all device types at each adjustment gear, and then saving the air pressure range setting data.
[0088] For example, in some specific embodiments, Figure 3 As shown, the tester can define the air pressure range corresponding to each gear when adjusting the mattress on the setting page according to the mattress type, and then save the configuration table of the relationship between the gear and the air pressure (i.e., the air pressure range setting data) on the setting page.
[0089] Further, in some embodiments, the test report also includes test statistical information; the method may also include the following steps: obtaining test statistical information based on the test results corresponding to all inflation and deflation operations, and adding the test statistical information to the test report; wherein the test statistical information includes the number of test passes and the number of test failures; the number of test passes is obtained based on the number of inflation and deflation operations whose test results are successful adjustments, and the number of test failures is obtained based on the number of inflation and deflation operations whose test results are failed adjustments.
[0090] It should be understood that the pass rate and failure rate, as well as the ratio of the pass rate to the failure rate and other test statistical information can also be obtained based on the number of test passes and test failures combined with the total number of inflation and deflation operations (total number of adjustments / number of tests).
[0091] For example, in some specific embodiments, Figure 2 As shown, the adjustment process will be displayed in the form of a log print at the bottom of the main interface, including whether the adjustment instructions for each part are successfully issued, the adjustment gear value, the adjustment progress, the real-time air pressure value after adjustment, and the comparison result with the air pressure range in the configuration table. In addition, after all adjustments are completed, the total number of mattress adjustments, the number of passes, and the number of failures will be output (failures in issuing adjustment instructions and failures in air pressure accuracy verification are both counted as failures). During the adjustment process, the user does not need to pay attention all the time. You can click the close button in the upper right corner of the tool and select "Minimize to System Tray" to run the program in the background.
[0092] In some specific application scenarios, after completing all inflation and deflation operations (air cushion equipment and all air pressure regulating devices contained therein), a pop-up notification can be sent to the target object. Then, the tester can open the tool and click the "Export Report" button to save the test report in a customized path. Since the tool supports multi-threaded parallel execution of inflation and deflation tests on multiple mattresses, if there is only one mattress, the test report can be output after generating a test record for one mattress; if there are multiple mattresses, after all the test records of the mattresses are generated, they are merged into the same test report for output. An example of the report content is shown in Table 1.
[0093] Table 1
[0094]
[0095] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0096] In some specific application scenarios, taking a mattress including an air pressure regulating device as an example, the technical solution of the present invention can implement full-process automated testing by executing corresponding instruction logic through an integrated application (app) or automated testing tool. The specific logic is as follows:
[0097] 1. Before starting the test, you can bind the mattress to the test account family through the preset application / automated testing tool (used to implement the logic of the technical solution of the present invention). The binding process can be implemented as follows: First, power on the mattress, turn on the Bluetooth of the mobile phone, enter the app and log in to the test account. Then enter the app (i.e., application) to add the mattress interface. At this time, the Bluetooth information released by the mattress (including the Bluetooth name, mac and type of the mattress) will be scanned. Then the app will send the SSID, password and MQTT communication configuration of the wifi connection to the mattress through the GATT (GenericAttribute) protocol to realize the network binding. After the binding is successful, the Bluetooth name, mac and type of the mattress will be saved in the database and associated with the family of the test account.
[0098] 2. Start the automated testing tool (hereinafter referred to as the "tool"), the main interface (such as Figure 2 The bound mattress will be automatically loaded in the device drop-down box (as shown in the figure), and the displayed content includes the mattress name and type. Testers can set the mattress type according to the setting page (as shown in the figure). Figure 3 The air pressure range corresponding to each gear when the mattress is adjusted is defined as shown in the figure.
[0099] 3. After saving the configuration table of the relationship between gear and air pressure (hereinafter referred to as the "configuration table") on the settings page, return to the main interface, select a mattress (multiple selections are supported), fill in the number of tests, and click the "Start" button to start the inflation and deflation test. At this point, the tool connects to the MQTT proxy server according to the specified host name, port number, account number and password, and creates an MQTT client instance with the mattress mac as the client_id, and then subscribes to the relevant topics based on the mattress mac to monitor the entire life cycle of the mattress adjustment (multiple mattresses will create multiple instances and topics). Subsequently, the tool will read the gear of the corresponding configuration table according to the type of mattress selected, and call the mattress adjustment API to issue instructions (the request parameters are the mattress mac, the adjustment part and the gear). If the API call is successful, the corresponding mattress will receive the message reported during the adjustment process, including the adjustment part, progress, air pressure data and the final adjustment completion status; if the API call fails, the gear adjustment fails, the error returned by the API is recorded, and then the next instruction is executed without interrupting the overall test process. The adjustment process will be displayed in the form of log print at the bottom of the main interface, including whether the adjustment instructions for each part are issued successfully, the adjustment gear value, the adjustment progress, the real-time air pressure value after adjustment, and the comparison result with the air pressure range in the configuration table (such as Figure 2 In addition, after all adjustments are completed, the total number of mattress adjustments, the number of passes, and the number of failures will be output (failures in issuing adjustment instructions and failures in verifying air pressure accuracy are both counted as failures). During the adjustment process, the user does not need to pay attention all the time. You can click the close button in the upper right corner of the tool and select "Minimize to system tray" to run the program in the background.
[0100] 4. After the adjustment is completed, a notification will pop up on the computer desktop. The tester can open the tool and click the "Export Report" button to save the test report in a custom path. Since the tool supports multi-threaded parallel execution of inflation and deflation tests on multiple mattresses, if there is only one mattress, the test report can be output after generating a test record for one mattress; if there are multiple mattresses, after the test records of all mattresses are generated, they will be merged into the same test report for output. The report content example is shown in Table 1 above.
[0101] In summary, the present invention aims to save the manpower and time costs required for air pressure accuracy testing through automated tools and improve test efficiency. The present invention can control the inflation and deflation actions of a specified gear of a mattress by calling an API (Application Programming Interface), and then obtain the air pressure data reported by the mattress air pressure sensor in combination with the MQTT (Message Queuing Telemetry Transport) protocol, and verify whether the air pressure data is within the standard range according to the air pressure value range corresponding to the preset gear, thereby ensuring the air pressure accuracy, reliability and durability of the mattress inflation and deflation.
[0102] The final output result of the technical solution of the present invention is a test report, and the content of the test report mainly includes the overall conclusion and specific data. The overall conclusion shows the total number of mattresses tested, the number of passes, the number of failures, and the pass rate; the specific data lists the mattress name, mattress MAC, mattress type, each adjustment position and gear value, whether the adjustment is successful, the start and end time of the adjustment, the adjusted air pressure value, the test results, the reason for failure, etc.
[0103] Compared with the prior art, the present invention has at least the following beneficial effects:
[0104] 1. The mattress can be inflated and deflated without manual intervention, and the preset air pressure standard can be automatically compared to verify the accuracy of the air pressure during the inflation and deflation of the mattress. In addition, by increasing the number of tests, the reliability and durability of the airbag control unit can be verified after long-term operation;
[0105] 2. Multiple mattresses can be tested at the same time. Since the tool allows multi-threaded parallel execution of inflation and deflation adjustments, the time required to inflate and deflate multiple mattresses at the same time is basically the same as that of a single mattress, greatly improving the test efficiency.
[0106] See also Figure 4 The embodiment of the present invention further provides an automatic test device 900 for air pressure accuracy, which can implement the automatic test method for air pressure accuracy. The device includes:
[0107] The first module 901 is used to determine a target air cushion device for pre-test based on a test selection instruction of a target object; the target air cushion device is provided with an air pressure regulating device;
[0108] The second module 902 is used to inflate and deflate the air pressure regulating device of the target air cushion device in response to the test start instruction of the target object;
[0109] The third module 903 is used to generate a test report based on the results of the inflation and deflation operations; the test report includes the test results, and the test results include adjustment success or adjustment failure; when the test result is adjustment failure, the test report also includes the cause of failure.
[0110] In some embodiments, the apparatus may further include:
[0111] The fourth module is used to scan and obtain the communication information of the air cushion device to be tested in response to the binding instruction of the target object;
[0112] The fifth module is used to send network configuration information to the air cushion device through the general attribute protocol based on the communication information, so that the air cushion device completes the network configuration operation;
[0113] The sixth module is used to associate the air cushion device that has completed the network configuration operation with the test account;
[0114] Among them, the target air cushion device is selected and determined from the air cushion devices associated with the test account based on the test selection instruction of the target object.
[0115] In some embodiments, the inflation and deflation operations are performed based on an API call. When the result of the API call is a failure, the device may further include:
[0116] The seventh module is used to set the adjustment information corresponding to the corresponding inflation and deflation operation to empty, set the test result corresponding to the inflation and deflation operation to adjustment failure, and determine the failure reason as the second reason.
[0117] In some embodiments, the apparatus may further include:
[0118] The eighth module is used to respond to the test setting instruction of the target object, obtain the air pressure range of the air cushion devices of all device types at each adjustment gear, and then save the air pressure range setting data.
[0119] In some embodiments, the test report also includes test statistics; the apparatus may further include:
[0120] A ninth module is used to obtain test statistics based on the test results corresponding to all inflation and deflation operations, and add the test statistics to the test report;
[0121] Among them, the test statistical information includes the number of test passes and the number of test failures; the number of test passes is obtained based on the number of inflation and deflation operations with successful test results, and the number of test failures is obtained based on the number of inflation and deflation operations with failed test results.
[0122] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0123] The embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned automatic test method for air pressure accuracy when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0124] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0125] See also Figure 5 , Figure 5 The hardware structure of an electronic device 1000 of another embodiment is illustrated. The electronic device includes:
[0126] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0127] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the automatic test method for air pressure accuracy of the embodiment of the present invention;
[0128] Input / output interface 1003, used to implement information input and output;
[0129] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0130] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0131] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0132] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned automatic testing method for air pressure accuracy is implemented.
[0133] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0134] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0135] The automatic test method, automatic test device, electronic device and medium of air pressure accuracy provided by the embodiment of the present invention obtain the test instruction of the target object; the test instruction includes the device model and the upgrade number; according to the device model, the target firmware package is downloaded; based on the device model, the communication module of the target mattress is scanned and processed; when the result of the scanning process is successful, the firmware version of the target mattress is obtained through the communication module; when the firmware version is less than or equal to the version information of the target firmware package, the upgrade protocol instruction is sent to the target mattress and the confirmation information replied by the target mattress is obtained; based on the confirmation information, the target firmware package is sub-packaged and sent to the target mattress, and the result of each sub-package sending is verified; when all sub-packages are received, the target mattress is sent to the target mattress, and the confirmation information of each sub-package .... The results of the package transmission are all passed, and a firmware verification instruction is sent to the target mattress, so that the target mattress performs a firmware upgrade according to the target firmware package based on the verification instruction; the upgrade result of the target mattress is obtained based on the upgrade reply value replied by the target mattress, and the test number is increased by 1; wherein the test number is initially 0; the upgrade result includes the upgrade test result, and the upgrade test result is an upgrade success or an upgrade failure; when the upgrade test result is an upgrade failure, the upgrade result also includes the failure reason; when the test number is less than the upgrade number, then return to execute the steps of sending the upgrade protocol instruction to the target mattress and obtaining the confirmation information replied by the target mattress, until the test number is equal to the upgrade number, and the test report is obtained according to all the upgrade results. The embodiment of the present invention greatly reduces the tediousness and error rate of manual operation by automatically obtaining the firmware version of the target mattress, sending the upgrade protocol instruction, sending the target firmware package in a sub-package, and performing firmware verification, thereby improving the efficiency and accuracy of the firmware upgrade; and through multiple upgrade tests (when the test number is less than the upgrade number), the stability and reliability of the device system in various scenarios can be ensured, thereby enhancing the robustness of the entire device system. The embodiment of the present invention can efficiently perform automated testing of air pressure accuracy.
[0136] The embodiments described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art can appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0137] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present invention and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0138] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] Those skilled in the art will appreciate that all or some of the steps, devices, and functional modules / units in the above disclosed methods may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0140] The terms "first", "second", "third", "fourth", etc. (if any) in the description of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0141] It should be understood that in the present invention, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0142] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0143] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0144] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including multiple instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store programs.
[0146] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the embodiments of the present invention is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present invention shall be within the scope of the rights of the embodiments of the present invention.
Claims
1. An automated test method for air pressure accuracy, characterized in that: The method comprises the following steps: Based on the test selection instruction of the target object, determining a target air cushion device for pre-test; the target air cushion device is provided with an air pressure regulating device; In response to a test start instruction of the target object, performing an inflating and deflating operation on the air pressure regulating device of the target air cushion device; A test report is generated based on the result of the inflation and deflation operation; the test report includes the test result, and the test result includes adjustment success or adjustment failure; when the test result is the adjustment failure, the test report also includes the cause of failure.
2. The method according to claim 1, characterized in that The method further comprises the following steps: In response to the binding instruction of the target object, scanning and obtaining the communication information of the air cushion device to be tested; Based on the communication information, sending network configuration information to the air cushion device through a general attribute protocol, so that the air cushion device completes the network configuration operation; Associating the air cushion device that has completed the network configuration operation with a test account; The target air cushion device is selected and determined from the air cushion devices associated with the test account based on the test selection instruction of the target object.
3. The method according to claim 1, characterized in that The step of inflating and deflating the air pressure regulating device of the target air cushion equipment comprises the following steps: Sending an inflation instruction to the air pressure regulating device of the target air cushion device, so that the air pressure regulating device inflates the target position of the target air cushion device to a first gear position; After a preset inflation cycle, sending a deflation instruction to the air pressure regulating device of the target air cushion device, so that the air pressure regulating device deflates the target position of the target air cushion device to a second gear position; After a preset deflation cycle, the number of operations is increased by 1, and the step of sending an inflation instruction to the air pressure regulating device of the target air cushion device is returned to execution until the number of operations reaches a preset number of tests; The operation times are initially 0, and the test times are determined based on the test selection instruction.
4. The method according to claim 1, characterized in that The test report also includes adjustment information; the generating of the test report based on the result of the inflation and deflation operation includes the following steps: Establishing a message queue telemetry transmission instance based on the media access control address of the target air cushion device; Monitoring the adjustment information of the inflation and deflation operation performed by the air pressure adjustment device in the target air cushion device through the message queue telemetry transmission instance; The adjustment information includes the total number of adjustment of the inflation and deflation operation, the start time and end time of each inflation and deflation operation, and the air pressure value after each inflation and deflation operation is completed; Acquire the device type of the target air cushion device and the adjustment gear position of the inflation and deflation operation; Obtaining a target air pressure range from preset air pressure range setting data based on the device type and the adjustment gear; When the air pressure value exceeds the target air pressure range, determining that the test result of the corresponding charging and discharging operation is the adjustment failure, and determining that the failure reason is the first reason; otherwise, determining that the test result of the corresponding charging and discharging operation is the adjustment success, and determining that the failure reason is null; The test report is obtained based on the adjustment information, the test results and the failure reasons corresponding to all the inflation and deflation operations.
5. The method according to claim 4, characterized in that The inflation and deflation operations are performed based on an API call. When the result of the API call is failure, the method further includes the following steps: The adjustment information corresponding to the corresponding inflation and deflation operation is set to empty, the test result corresponding to the inflation and deflation operation is set to the adjustment failure, and the failure reason is determined to be the second reason.
6. The method according to claim 4, characterized in that The method further comprises the following steps: In response to the test setting instruction of the target object, the air pressure range of the air cushion devices of all the device types at each of the adjustment gears is obtained, and then the air pressure range setting data is saved.
7. The method according to any one of claims 1 to 6, characterized in that: The test report also includes test statistical information; the method also includes the following steps: Summarizing the test results corresponding to all the inflation and deflation operations to obtain test statistical information, and adding the test statistical information to the test report; Among them, the test statistical information includes the number of test passes and the number of test failures; the number of test passes is obtained based on the number of inflation and deflation operations for which the test result is successful adjustment, and the number of test failures is obtained based on the number of inflation and deflation operations for which the test result is failed adjustment.
8. An automatic test device for air pressure accuracy, characterized in that: The device comprises: The first module is used to determine a target air cushion device for pre-test based on a test selection instruction of a target object; the target air cushion device is provided with an air pressure regulating device; A second module is used to perform an inflating and deflating operation on the air pressure regulating device of the target air cushion device in response to a test start instruction of the target object; The third module is used to generate a test report based on the results of the inflation and deflation operations; the test report includes the test results, and the test results include successful adjustment or failed adjustment; when the test result is the failure of the adjustment, the test report also includes the reason for the failure.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.