Communication function test method and device, equipment and storage medium
By obtaining device images of smart home devices and automatically detecting the status of communication modules and server configuration, the cumbersome testing process in the prior art is solved, and the testing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411523890.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the communication function testing process of smart home devices is cumbersome, resulting in low testing efficiency.
By acquiring the device image of the device to be tested, the communication status and version status of the communication module are determined, and the communication server and configuration server are determined based on the identification information, automatic testing of the communication module is realized.
It improves the efficiency of communication function testing, simplifies the testing process, and ensures the normal communication function of smart home devices.
Smart Images

Figure CN119583400A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a communication function testing method, apparatus, device and storage medium. Background Art
[0002] Timely and reliable data communication between smart home devices and their corresponding servers is a key link in the normal operation of smart home devices. The timeliness and reliability of data communication between smart home devices and their corresponding servers depend to a large extent on the communication function of smart home devices. Therefore, in order to ensure timely and reliable data communication between smart home devices and their corresponding servers, it is necessary to perform communication function tests on the smart home devices.
[0003] In the prior art, when the communication function is realized through the 4G module, the 4G module can directly connect to the cloud when powered on, without the need for network configuration. Therefore, the smart home device to be tested can be bound based on the test program, and the communication function test of the smart home device can be realized by checking whether the binding is successful and whether the smart home device to be tested can be controlled through the test program.
[0004] However, the process of binding the smart home devices to be tested based on the test program is rather cumbersome, resulting in low test efficiency. Summary of the invention
[0005] The present invention provides a communication function testing method, device, equipment and storage medium to improve the testing efficiency of the communication function of a device to be tested.
[0006] In a first aspect, an embodiment of the present invention provides a communication function testing method, comprising:
[0007] Acquire a device image of the device under test, and determine the communication status and version status of the communication module according to the device image, wherein the device under test includes the communication module and a display module;
[0008] When it is determined that the communication status is normal communication and the version status is consistent versions, determining a communication server and a configuration server of the communication module according to the identification information of the communication module;
[0009] When it is determined that the communication server of the communication module is consistent with the configuration server, it is determined that the communication function of the communication module is normal.
[0010] The technical solution of an embodiment of the present invention provides a communication function testing method, including: obtaining a device image of a device to be tested, and determining the communication status and version status of a communication module according to the device image, wherein the device to be tested includes the communication module and a display module; when it is determined that the communication status is normal and the version status is consistent with the version, determining the communication server and configuration server of the communication module according to the identification information of the communication module; when it is determined that the communication server of the communication module is consistent with the configuration server, determining that the communication function of the communication module is normal. According to the above technical scheme, after the communication module and the display module are pre-installed to obtain the device to be tested, the device image of the device to be tested can be firstly obtained, and then the operating status of the network indicator light can be determined according to the display image contained in the device image, and the communication status of the communication module can be determined according to the operating status of the network indicator light. The version status of the communication module can also be determined according to the actual version of the communication module extracted from the display image and the packaged version of the communication module extracted from the communication image. When it is determined that the communication status of the communication module is normal and the version status is consistent, the communication server and configuration server of the communication module are determined according to the identification information of the communication module, and the test result of the communication function of the communication module is determined according to whether the communication server is consistent with the configuration server, thereby realizing automated testing of the communication function of the communication module and improving testing efficiency.
[0011] Further, the device image includes a display image of the display module, and correspondingly, determining the communication state of the communication module according to the device image includes:
[0012] The brightness information of each pixel in the display image is determined, and the communication state of the communication module is determined according to the brightness information of each pixel.
[0013] Further, the display module includes a network indicator light, and correspondingly, determining the communication status of the communication module according to the brightness information of each pixel includes:
[0014] If the brightness information of the pixel corresponding to the network indicator light is higher than the brightness information of other pixels, it is determined that the communication status of the communication module is normal; otherwise, it is determined that the communication status of the communication module is abnormal.
[0015] Further, the device image also includes a communication image of the communication module. Accordingly, determining the version status of the communication module according to the device image includes:
[0016] determining a packaging version of the communication module according to the communication image;
[0017] determining an actual version of the communication module according to the displayed image;
[0018] If the packaged version is consistent with the actual version, the version status is determined to be consistent with the version; otherwise, the version status is determined to be inconsistent with the version.
[0019] Further, determining the communication server of the communication module according to the identification information of the communication module includes:
[0020] The communication data of the communication module is determined according to the identification information, and the communication server is determined according to the communication data.
[0021] Further, determining the communication server according to the communication data includes:
[0022] The communication server is determined according to the IP address and port number information included in the communication data.
[0023] Further, determining the configuration server of the communication module according to the identification information of the communication module includes:
[0024] A correspondence table between identifiers and servers is searched according to the identifier information, and a server corresponding to an identifier consistent with the identifier information in the correspondence table between identifiers and servers is determined as the configuration server.
[0025] In a second aspect, an embodiment of the present invention further provides a communication function test device, the device comprising:
[0026] an acquisition module, used to acquire a device image of the device under test, and determine a communication status and a version status of the communication module according to the device image, wherein the device under test includes the communication module and a display module;
[0027] a determination module, configured to determine a communication server and a configuration server of the communication module according to identification information of the communication module when it is determined that the communication status is normal communication and the version status is consistent with the version;
[0028] The execution module is used to determine that the communication function of the communication module is normal when it is determined that the communication server of the communication module is consistent with the configuration server.
[0029] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0030] at least one processor; and a memory communicatively coupled to the at least one processor;
[0031] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the communication function testing method as described in any one of the first aspects.
[0032] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a communication function testing method as described in any one of the first aspects.
[0033] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on a computer, the computer executes the communication function testing method provided in the first aspect.
[0034] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium, wherein the computer-readable storage medium may be packaged together with the processor of the communication function test device, or may be packaged separately from the processor of the communication function test device, which is not limited in this application.
[0035] The description of the second, third, fourth and fifth aspects in this application can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third, fourth and fifth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.
[0036] In this application, the name of the communication function test device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies.
[0037] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 A flow chart of a communication function testing method provided by an embodiment of the present invention;
[0040] Figure 2A flow chart of another communication function testing method provided by an embodiment of the present invention;
[0041] Figure 3 A flowchart of another communication function testing method provided by an embodiment of the present invention;
[0042] Figure 4 A schematic diagram of the structure of a communication function test device provided by an embodiment of the present invention;
[0043] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0045] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0046] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0047] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0048] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.
[0049] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0050] In the description of the present application, unless otherwise specified, “plurality” means two or more.
[0051] In the prior art, binding the smart home device to be tested based on the test program requires the user to operate the test program based on the terminal device to bind the smart home device, which is inefficient, and the cost of replacing or repairing the communication module after detecting an abnormality is high.
[0052] Therefore, the present application provides a communication function testing method. Before assembling smart home devices, a communication function test is performed on the device to be tested obtained by pre-installing the communication module and the display module, and then the smart home devices are assembled based on the device to be tested with normal communication function to ensure that the communication function of the smart home devices is normal.
[0053] The communication function testing method provided in the present application will be described in detail below with reference to the diagrams and embodiments.
[0054] Figure 1 A flow chart of a communication function testing method provided by an embodiment of the present invention. This embodiment is applicable to a situation where the communication function of a communication module needs to be tested. The method can be executed by a communication function testing device, such as Figure 1 As shown, the specific steps include:
[0055] Step 110: Acquire a device image of the device to be tested, and determine the communication status and version status of the communication module according to the device image.
[0056] Wherein, the device under test includes the communication module and the display module, and the communication module is a 4G module.
[0057] In order to perform a communication function test on a communication module loaded in an electronic device, the communication function test may be performed on the pre-installed communication module when the communication module is pre-installed, to ensure that the electronic device can be assembled based on the communication module with normal communication function.
[0058] Generally speaking, the display module may include a network indicator light for displaying the communication status of the communication module. Therefore, in order to improve the efficiency of the communication function test, the communication function test may be performed on the device to be tested obtained by pre-installing the communication module and the display module.
[0059] The operating status of the network indicator light is normal operation, indicating that the communication status of the communication module is normal communication. The operating status of the network indicator light is abnormal operation, indicating that the communication status of the communication module is abnormal communication. The brightness of the network indicator light can indicate the operating status of the network indicator light. The brightness of the network indicator light can be determined based on the image of the display module. Therefore, the image of the display module can be obtained first. Since the device to be tested is a pre-installed device, the pre-installed device is generally circulated in the production line. Therefore, the device image of the device to be tested can be obtained based on the image acquisition device set on one side of the production line to obtain the image of the display module contained in the device to be tested. In actual applications, the image acquisition device can be set on the upper side of the production line, and the specific position is not specifically limited here.
[0060] The device image may include a communication image of the communication module and a display image of the display module. After the communication image of the communication module and the display image of the display module are determined in the device image according to the specific shapes of the communication module and the display module, the brightness of the network indicator light is determined according to the display image. If the brightness of the network indicator light is greater than a preset threshold, it is determined that the network indicator light is on, and then it can be determined that the operating state of the network indicator light is normal, and further it can be determined that the communication state of the communication module is normal, thereby realizing the detection of the communication state of the communication module.
[0061] Furthermore, the communication status of the communication module is normal communication, indicating that the communication module is connected to the communication base station, and the communication status of the communication module is abnormal communication, indicating that the communication module is not connected to the communication base station.
[0062] When the actual version of the communication module is consistent with the packaging version pasted on the exposed position of the communication module, the version status of the communication module can be determined as the version is consistent, otherwise, the version information of the communication module can be determined as the version is inconsistent. The display module connected to the communication module can display the real version of the communication module, so the actual version of the communication module can be extracted through the display image. In addition, the packaging version of the communication module can be extracted through the communication image. Furthermore, the version status of the communication module can be determined based on whether the actual version of the communication module is consistent with the communication version, thereby realizing the version detection of the communication module.
[0063] In an embodiment of the present invention, after the communication module and the display module are pre-installed to obtain the device to be tested, the device image of the device to be tested is acquired based on an image acquisition device arranged on one side of the production line, the operating status of the network indicator light is determined according to the display image contained in the device image, the communication status of the communication module is determined according to the operating status of the network indicator light, whether the communication module is connected to the communication base station is determined, and the version status of the communication module is determined according to the actual version of the communication module extracted from the display image and the packaged version of the communication module extracted from the communication image.
[0064] Step 120: When it is determined that the communication status is normal communication and the version status is consistent with the version, determine the communication server and the configuration server of the communication module according to the identification information of the communication module.
[0065] Specifically, after determining that the communication status of the communication module is normal communication and the version status is consistent with the version, it is possible to continue to determine whether the communication server that the communication module actually communicates with is the configuration server configured for it. Therefore, the communication server and configuration server of the communication module can be determined. Specifically, first, the identification information of the communication module can be determined, and then the communication data of the communication module can be obtained according to the identification information of the communication module. Specifically, the interaction data between the communication module and its corresponding server can be obtained, and the communication server that actually communicates with the communication module can be determined based on these interaction data. In addition, the corresponding relationship table between the identification and the server can be searched according to the identification information of the communication module to determine the configuration server that the communication module should communicate with.
[0066] In the embodiment of the present invention, a communication server and a configuration server of a communication module are determined according to identification information of the communication module.
[0067] Step 130: When it is determined that the communication server of the communication module is consistent with the configuration server, determine that the communication function of the communication module is normal.
[0068] Specifically, when it is determined that the communication module communication server is consistent with the configuration server, the test result of the communication module can be determined as normal communication function. When it is determined that the communication module communication server is inconsistent with the configuration server, the test result of the communication module can be determined as abnormal communication function.
[0069] In the embodiment of the present invention, the test result of the communication function of the communication module is determined according to whether the communication server of the communication module is consistent with the configuration server.
[0070] A communication function testing method provided by an embodiment of the present invention includes: acquiring a device image of a device to be tested, and determining a communication status and a version status of a communication module according to the device image, wherein the device to be tested includes the communication module and a display module; when it is determined that the communication status is normal and the version status is consistent with the version, determining a communication server and a configuration server of the communication module according to identification information of the communication module; when it is determined that the communication server of the communication module is consistent with the configuration server, determining that the communication function of the communication module is normal. According to the above technical scheme, after the communication module and the display module are pre-installed to obtain the device to be tested, the device image of the device to be tested can be firstly obtained, and then the operating status of the network indicator light can be determined according to the display image contained in the device image, and the communication status of the communication module can be determined according to the operating status of the network indicator light. The version status of the communication module can also be determined according to the actual version of the communication module extracted from the display image and the packaged version of the communication module extracted from the communication image. When it is determined that the communication status of the communication module is normal and the version status is consistent, the communication server and configuration server of the communication module are determined according to the identification information of the communication module, and the test result of the communication function of the communication module is determined according to whether the communication server is consistent with the configuration server, thereby realizing automated testing of the communication function of the communication module and improving testing efficiency.
[0071] Figure 2 This is a flow chart of another communication function testing method provided by an embodiment of the present invention. This embodiment is specific based on the above embodiment. Figure 2 As shown, in this embodiment, the method may further include:
[0072] Step 210: Acquire a device image of the device under test.
[0073] The device under test includes the communication module and the display module, and the device image includes a display image of the display module and a communication image of the communication module.
[0074] As mentioned above, the device image of the device to be tested may be acquired based on an image acquisition device disposed at one side of the production line.
[0075] Step 220: Determine the communication status of the communication module according to the device image.
[0076] In one implementation, step 220 may specifically include:
[0077] The brightness information of each pixel in the display image is determined, and the communication state of the communication module is determined according to the brightness information of each pixel.
[0078] Further, the display module includes a network indicator light, and correspondingly, determining the communication status of the communication module according to the brightness information of each pixel includes:
[0079] If the brightness information of the pixel corresponding to the network indicator light is higher than the brightness information of other pixels, it is determined that the communication status of the communication module is normal; otherwise, it is determined that the communication status of the communication module is abnormal.
[0080] Specifically, after acquiring the device image, the display image of the display module can be determined in the device image according to the specific shape of the display module, and then the brightness information of each pixel in the display image can be determined. If the network indicator light of the display module is on, the brightness of the pixel corresponding to the network indicator light is significantly higher than the brightness of other pixels. Therefore, when it is determined that there are pixels with brightness significantly higher than other pixels in the display image, it can be determined that the network indicator light is on, and then it can be determined that the operating status of the network indicator light is normal, and further it can be determined that the communication status of the communication module is normal, thereby realizing the detection of the communication status of the communication module.
[0081] In the embodiment of the present invention, the operation state of the network indicator light is determined according to the brightness information of each pixel in the display image included in the device image, and then the communication state of the communication module is determined according to the operation state of the network indicator light.
[0082] Step 230: Determine the version status of the communication module according to the device image.
[0083] In one implementation, step 230 may specifically include:
[0084] Determine the packaging version of the communication module according to the communication image; determine the actual version of the communication module according to the display image; if the packaging version is consistent with the actual version, determine the version status as consistent version; otherwise, determine the version status as inconsistent version.
[0085] Specifically, after acquiring the device image, the communication image of the communication module can also be determined in the device image according to the specific shape of the communication module. On the one hand, the actual version of the communication module can be extracted by displaying the content displayed in the image, and on the other hand, the packaged version of the communication module can be extracted through the communication image. Furthermore, the actual version of the communication module and the communication version can be compared. If the actual version of the communication module and the communication version are consistent, the version status of the communication module is determined to be consistent; if the actual version of the communication module and the communication version are inconsistent, the version status of the communication module is determined to be inconsistent, thereby realizing version detection of the communication module.
[0086] In the embodiment of the present invention, the version status of the communication module is determined according to the actual version of the communication module extracted from the display image and the packaged version of the communication module extracted from the communication image.
[0087] In actual applications, after step 210, step 220 and step 230 may be executed simultaneously, or step 220 may be executed first and then step 230, or step 230 may be executed first and then step 220, which is not specifically limited here.
[0088] Step 240: When it is determined that the communication status is normal communication and the version status is consistent with the version, determine the communication server and the configuration server of the communication module according to the identification information of the communication module.
[0089] In one implementation, step 240 may specifically include:
[0090] When it is determined that the communication status is normal communication and the version status is consistent with the version, the communication data of the communication module is determined according to the identification information, and the communication server is determined according to the communication data; the correspondence table between the identifier and the server is searched according to the identification information, and the server corresponding to the identifier consistent with the identification information in the correspondence table between the identifier and the server is determined as the configuration server.
[0091] Further, determining the communication server according to the communication data includes:
[0092] The communication server is determined according to the IP address or port number information contained in the communication data.
[0093] Specifically, the identification information of the communication module can be determined first, and the identification information of the communication module can be obtained by scanning the barcode pasted on the communication module with a scanning device, or the identification information of the communication module can be extracted through a communication image. Then, the communication data of the communication module can be obtained according to the identification information of the communication module, and the communication server that actually communicates with the communication module can be determined according to the IP address or port number information contained in the communication data. In addition, the corresponding relationship table of the identification and the server can be searched according to the identification information of the communication module, and the server corresponding to the identification consistent with the identification information in the corresponding relationship table of the identification and the server is determined as the configuration server that the communication module should communicate with.
[0094] In the embodiment of the present invention, a communication server and a configuration server of a communication module are determined according to identification information of the communication module.
[0095] Step 250: When it is determined that the communication server of the communication module is consistent with the configuration server, determine that the communication function of the communication module is normal.
[0096] Specifically, when it is determined that the communication server of the communication module is consistent with the configuration server, it can be determined that the communication server with which the communication module actually communicates is the configuration server configured by the communication module, and then the test result of the communication module can be determined that the communication function is normal. When it is determined that the communication server of the communication module is inconsistent with the configuration server, it can be determined that the communication server with which the communication module actually communicates is not the configuration server configured by the communication module, and then the test result of the communication module can be determined that the communication function is abnormal.
[0097] In practical applications, after determining that the test result of the communication module is that the communication function is abnormal, the communication module included in the device under test can be replaced to obtain a new device under test, and the communication function test of the new device under test can be continued.
[0098] In addition, in order to ensure that the communication function of the electronic device is normal, after the electronic device is assembled according to the device to be tested and powered on, the network indicator light of the display module is checked again to determine whether the electronic device is connected to the communication base station based on the brightness of the network indicator light, thereby further ensuring the normal operation of the communication function of the electronic device.
[0099] In the embodiment of the present invention, the test result of the communication function of the communication module is determined according to whether the communication server of the communication module is consistent with the configuration server.
[0100] A communication function testing method provided by an embodiment of the present invention includes: acquiring a device image of a device to be tested; determining a communication status of a communication module according to the device image; determining a version status of the communication module according to the device image; when it is determined that the communication status is normal and the version status is consistent, determining a communication server and a configuration server of the communication module according to identification information of the communication module; when it is determined that the communication server of the communication module is consistent with the configuration server, determining that the communication function of the communication module is normal. According to the above technical scheme, after the communication module and the display module are pre-installed to obtain the device to be tested, the device image of the device to be tested can be firstly obtained, and then the operating status of the network indicator light can be determined according to the brightness information of each pixel in the display image contained in the device image, and the communication status of the communication module can be determined according to the operating status of the network indicator light. The version status of the communication module can also be determined according to the actual version of the communication module extracted from the display image and the packaged version of the communication module extracted from the communication image. When it is determined that the communication status of the communication module is normal and the version status is consistent, the communication server and configuration server of the communication module are determined according to the identification information of the communication module, and the test result of the communication function of the communication module is determined according to whether the communication server is consistent with the configuration server, thereby realizing automated testing of the communication function of the communication module and improving testing efficiency.
[0101] Figure 3 The flowchart of another communication function test method provided by the embodiment of the present invention exemplifies one of the implementation methods. Figure 3 As shown, including:
[0102] Step 310: After the device to be tested is obtained by pre-installing the communication module and the display module, a device image of the device to be tested and identification information of the communication module are obtained.
[0103] Step 320: After determining that the device to be tested is powered on, determine whether the communication module is connected to the communication base station according to the display image included in the device image.
[0104] When it is determined that the communication module is connected to the communication base station, step 330 is executed; otherwise, step 380 is executed.
[0105] Step 330: Determine the actual version of the communication base station according to the display image included in the device image, and determine the packaging version of the communication base station according to the communication image included in the device image.
[0106] Step 340: Determine whether the actual version and the packaged version are consistent.
[0107] When it is determined that the actual version and the packaged version are consistent, step 350 is executed; otherwise, step 380 is executed.
[0108] Step 350: Determine the communication server and configuration server of the communication module according to the identification information of the communication module.
[0109] Step 360: Determine whether the communication server and the configuration server are consistent.
[0110] When it is determined that the communication server and the configuration server are consistent, step 370 is executed; otherwise, step 380 is executed.
[0111] Step 370: Determine whether the communication function of the communication module is normal.
[0112] Step 380: Determine that the communication function of the communication module is abnormal.
[0113] The communication function testing method provided in the embodiment of the present invention has the corresponding functional modules and beneficial effects for executing any of the aforementioned communication function testing methods.
[0114] Figure 4 The present invention provides a schematic diagram of the structure of a communication function test device, which can be applied to situations where the communication function of a communication module needs to be tested to improve the test efficiency. The device can be implemented by software and / or hardware and is generally integrated in a computer device.
[0115] like Figure 4As shown, the device comprises:
[0116] An acquisition module 410 is used to acquire a device image of the device under test, and determine the communication status and version status of the communication module according to the device image, wherein the device under test includes the communication module and the display module;
[0117] A determination module 420, configured to determine a communication server and a configuration server of the communication module according to identification information of the communication module when it is determined that the communication status is normal communication and the version status is consistent with the version;
[0118] The execution module 430 is used to determine that the communication function of the communication module is normal when it is determined that the communication server of the communication module is consistent with the configuration server.
[0119] The communication function testing device provided in this embodiment obtains a device image of a device to be tested, and determines the communication status and version status of a communication module according to the device image, wherein the device to be tested includes the communication module and the display module; when it is determined that the communication status is normal and the version status is consistent with the version, the communication server and configuration server of the communication module are determined according to the identification information of the communication module; when it is determined that the communication server of the communication module is consistent with the configuration server, it is determined that the communication function of the communication module is normal. According to the above technical scheme, after the communication module and the display module are pre-installed to obtain the device to be tested, the device image of the device to be tested can be firstly obtained, and then the operating status of the network indicator light can be determined according to the display image contained in the device image, and the communication status of the communication module can be determined according to the operating status of the network indicator light. The version status of the communication module can also be determined according to the actual version of the communication module extracted from the display image and the packaged version of the communication module extracted from the communication image. When it is determined that the communication status of the communication module is normal and the version status is consistent, the communication server and configuration server of the communication module are determined according to the identification information of the communication module, and the test result of the communication function of the communication module is determined according to whether the communication server is consistent with the configuration server, thereby realizing automated testing of the communication function of the communication module and improving testing efficiency.
[0120] On the basis of the above embodiment, the device image includes the display image of the display module and the communication image of the communication module. Accordingly, the acquisition module 410 is specifically used for:
[0121] Determine the brightness information of each pixel in the displayed image, and determine the communication status of the communication module according to the brightness information of each pixel; determine the packaging version of the communication module according to the communication image; determine the actual version of the communication module according to the displayed image; if the packaging version is consistent with the actual version, determine the version status as version consistency; otherwise, determine the version status as version inconsistency.
[0122] Further, the display module includes a network indicator light, and correspondingly, determining the communication status of the communication module according to the brightness information of each pixel includes:
[0123] If the brightness information of the pixel corresponding to the network indicator light is higher than the brightness information of other pixels, it is determined that the communication status of the communication module is normal; otherwise, it is determined that the communication status of the communication module is abnormal.
[0124] Based on the above embodiment, the determination module 420 is specifically used for:
[0125] When it is determined that the communication status is normal communication and the version status is consistent with the version, the communication data of the communication module is determined according to the identification information, and the communication server is determined according to the communication data; the correspondence table between the identifier and the server is searched according to the identification information, and the server corresponding to the identifier consistent with the identification information in the correspondence table between the identifier and the server is determined as the configuration server.
[0126] Further, determining the communication server according to the communication data includes:
[0127] The communication server is determined according to the IP address or port number information contained in the communication data.
[0128] The communication function testing device provided in the embodiment of the present invention can execute the communication function testing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the communication function testing method.
[0129] It is worth noting that in the embodiment of the above-mentioned communication function testing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0130] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 A block diagram of an exemplary electronic device 5 suitable for implementing embodiments of the present invention is shown. Figure 5 The electronic device 5 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0131] like Figure 5 As shown, the electronic device 5 is in the form of a general purpose computing electronic device. The components of the electronic device 5 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0132] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0133] The electronic device 5 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 5, including volatile and non-volatile media, removable and non-removable media.
[0134] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 5 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0135] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0136] The electronic device 5 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 5, and / or any device that enables the electronic device 5 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 5 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. Figure 5 As shown, the network adapter 20 communicates with other modules of the electronic device 5 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 5, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0137] The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, implementing the communication function test method provided in the embodiment of the present invention, the method comprising:
[0138] Acquire a device image of the device under test, and determine the communication status and version status of the communication module according to the device image, wherein the device under test includes the communication module and a display module;
[0139] When it is determined that the communication status is normal communication and the version status is consistent versions, determining a communication server and a configuration server of the communication module according to the identification information of the communication module;
[0140] When it is determined that the communication server of the communication module is consistent with the configuration server, it is determined that the communication function of the communication module is normal.
[0141] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the communication function testing method provided by any embodiment of the present invention.
[0142] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a communication function test method provided by an embodiment of the present invention is implemented, for example, and the method includes:
[0143] Acquire a device image of the device under test, and determine the communication status and version status of the communication module according to the device image, wherein the device under test includes the communication module and a display module;
[0144] When it is determined that the communication status is normal communication and the version status is consistent versions, determining a communication server and a configuration server of the communication module according to the identification information of the communication module;
[0145] When it is determined that the communication server of the communication module is consistent with the configuration server, it is determined that the communication function of the communication module is normal.
[0146] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0147] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0148] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0149] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0150] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0151] In addition, the acquisition, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations.
[0152] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A communication function testing method, characterized in that: include: Acquire a device image of the device under test, and determine the communication status and version status of the communication module according to the device image, wherein the device under test includes the communication module and a display module; When it is determined that the communication status is normal communication and the version status is consistent versions, determining a communication server and a configuration server of the communication module according to the identification information of the communication module; When it is determined that the communication server of the communication module is consistent with the configuration server, it is determined that the communication function of the communication module is normal.
2. The communication function testing method according to claim 1, characterized in that: The device image includes a display image of the display module. Accordingly, determining the communication state of the communication module according to the device image includes: The brightness information of each pixel in the display image is determined, and the communication state of the communication module is determined according to the brightness information of each pixel.
3. The communication function testing method according to claim 2, characterized in that: The display module includes a network indicator light, and correspondingly, determining the communication status of the communication module according to the brightness information of each pixel includes: If the brightness information of the pixel corresponding to the network indicator light is higher than the brightness information of other pixels, it is determined that the communication status of the communication module is normal; otherwise, it is determined that the communication status of the communication module is abnormal.
4. The communication function testing method according to claim 2, characterized in that: The device image also includes a communication image of the communication module. Accordingly, determining the version status of the communication module according to the device image includes: determining a packaging version of the communication module according to the communication image; determining an actual version of the communication module according to the displayed image; If the packaged version is consistent with the actual version, the version status is determined to be consistent with the version; otherwise, the version status is determined to be inconsistent with the version.
5. The communication function testing method according to claim 1, characterized in that: Determining a communication server of the communication module according to identification information of the communication module includes: The communication data of the communication module is determined according to the identification information, and the communication server is determined according to the communication data.
6. The communication function testing method according to claim 5, characterized in that: Determining the communication server according to the communication data includes: The communication server is determined according to the IP address or port number information contained in the communication data.
7. The communication function testing method according to claim 1, characterized in that: Determining a configuration server of the communication module according to identification information of the communication module includes: A correspondence table between identifiers and servers is searched according to the identifier information, and a server corresponding to an identifier consistent with the identifier information in the correspondence table between identifiers and servers is determined as the configuration server.
8. A communication function test device, characterized in that: include: an acquisition module, used to acquire a device image of the device under test, and determine a communication status and a version status of the communication module according to the device image, wherein the device under test includes the communication module and a display module; a determination module, configured to determine a communication server and a configuration server of the communication module according to identification information of the communication module when it is determined that the communication status is normal communication and the version status is consistent with the version; The execution module is used to determine that the communication function of the communication module is normal when it is determined that the communication server of the communication module is consistent with the configuration server.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the communication function testing method as described in any one of claims 1-7.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the communication function testing method according to any one of claims 1 to 7 when executed by a computer processor.