CN111541589B - Method, device and equipment for testing expansion module interface of intelligent terminal - Google Patents

Method, device and equipment for testing expansion module interface of intelligent terminal Download PDF

Info

Publication number
CN111541589B
CN111541589B CN202010441184.0A CN202010441184A CN111541589B CN 111541589 B CN111541589 B CN 111541589B CN 202010441184 A CN202010441184 A CN 202010441184A CN 111541589 B CN111541589 B CN 111541589B
Authority
CN
China
Prior art keywords
test
interface
intelligent terminal
expansion module
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010441184.0A
Other languages
Chinese (zh)
Other versions
CN111541589A (en
Inventor
梁哲恒
陈晓江
龙震岳
蒋道环
曹彦朝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202010441184.0A priority Critical patent/CN111541589B/en
Publication of CN111541589A publication Critical patent/CN111541589A/en
Application granted granted Critical
Publication of CN111541589B publication Critical patent/CN111541589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)
  • Communication Control (AREA)

Abstract

The application relates to a method, a device, test control equipment and a storage medium for testing an expansion module interface of an intelligent terminal. The method comprises the following steps: configuring a first expansion module for the test interface, and generating a corresponding first link negotiation response; transmitting a first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through the expansion module interface; the expansion module interface is connected with the test interface; after the first test data is received, a second expansion module with different expansion function types from the first expansion module is reconfigured for the test interface, and a second link negotiation response is generated; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface; and determining a test result aiming at the interface of the expansion module according to the first test data and the second test data so as to improve the test efficiency.

Description

Method, device and equipment for testing expansion module interface of intelligent terminal
Technical Field
The present disclosure relates to the field of intelligent terminals, and in particular, to a method and apparatus for testing an interface of an expansion module of an intelligent terminal, a test control device, and a storage medium.
Background
With the development of electricity data acquisition technology, the intelligent terminal for acquiring electricity data is correspondingly updated, and the technical requirements of the new generation of intelligent terminals are specified: the expansion module interface of the new generation intelligent terminal should support the blind insertion of the expansion module, namely, when in actual use, the expansion module interface of the intelligent terminal can realize any expansion function; the extended function is compared with the original local function of the intelligent terminal, for example, the local function of the intelligent terminal is a function of communicating with an ammeter, and then the functions of collecting ammeter data (such as an RS485 meter reading function) and the like are the extended functions.
Therefore, before the intelligent terminal is put into use, whether an interface of an expansion module of the intelligent terminal is normal or not needs to be tested, namely whether any expansion function can be realized or not; however, when the interface of the expansion module is tested according to the conventional method, different types of expansion modules are inserted into the interface of the expansion module, and the insertion operation needs to be performed for a plurality of times to test, so that the testing efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a test control device, and a storage medium for testing an expansion module interface of an intelligent terminal, which can improve the efficiency of testing the expansion module interface of the intelligent terminal.
A method of testing an expansion module interface of an intelligent terminal, the method comprising:
configuring a first expansion module for a test interface, and generating a first link negotiation response corresponding to the first expansion module;
transmitting the first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through an expansion module interface; the expansion module interface is connected with the test interface;
after receiving the first test data, reconfiguring a second expansion module for the test interface, and generating a second link negotiation response corresponding to the second expansion module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface;
and determining a test result aiming at the expansion module interface according to the first test data and the second test data.
In one embodiment, the plurality of test interfaces are provided, each test interface is connected with a corresponding expansion module interface, the physical structures of the expansion module interfaces are the same, the first expansion module comprises a plurality of expansion sub-modules, and the expansion function types of the expansion sub-modules are different and correspond to different test interfaces;
The step of reconfiguring a second expansion module for the test interface comprises:
the sequence of each expansion sub-module in the first expansion module is adjusted so that the expansion function types of the expansion sub-modules corresponding to any one test interface are different before and after adjustment;
and taking the first expansion module after the sequence adjustment as the second expansion module.
In one embodiment, before the step of sending the first link negotiation response to the intelligent terminal through the test interface, the method further includes:
acquiring a first expansion function protocol corresponding to the first expansion module;
and sending the first extended function protocol to the intelligent terminal, so that the intelligent terminal generates the first test data according to the first extended function protocol after receiving the first link negotiation response.
In one embodiment, before the step of configuring the first expansion module for the test interface, the method includes:
receiving a first link negotiation request sent by the intelligent terminal;
responding to the first link negotiation request, and determining the first expansion module from a plurality of preset expansion modules;
The step of reconfiguring a second expansion module for the test interface after receiving the first test data includes:
transmitting a hardware initialization instruction to the intelligent terminal so that the intelligent terminal transmits a second link negotiation request;
responding to the second link negotiation request, and reconfiguring the second expansion module for the test interface to trigger a new round of test flow; the second expansion module is an expansion module of the plurality of expansion modules.
In one embodiment, before the step of receiving the first link negotiation request sent by the intelligent terminal, the method further includes:
generating a test instruction according to a protocol format of an ammeter communication module of the intelligent terminal;
sending the test instruction to the intelligent terminal; the test instruction is used for indicating the intelligent terminal to send the first link negotiation request and the second link negotiation request through a management channel of the test interface, and returning the first test data and the second test data through a data channel of the test interface.
In one embodiment, the method further comprises:
acquiring a plurality of expansion function protocols corresponding to the expansion modules;
And sending the test instruction carrying the plurality of extended function protocols to the intelligent terminal, so that the intelligent terminal analyzes the test instruction to obtain the plurality of extended function protocols and respectively generates test data corresponding to the plurality of extended modules according to the plurality of extended function protocols.
In one embodiment, the step of determining a test result for the expansion module interface according to the first test data and the second test data includes:
and if the protocol format and the data content of the first test data are matched with the first expansion module, judging that the test result of the expansion module interface is supporting the first expansion module.
In one embodiment, the step of determining a test result for the expansion module interface according to the first test data and the second test data includes:
and if the protocol format and the data content of the second test data are matched with the second expansion module, judging that the test result of the expansion module interface is supporting the second expansion module.
An apparatus for testing an expansion module interface of an intelligent terminal, comprising:
The first response generation module is used for configuring a first expansion module for the test interface and generating a first link negotiation response corresponding to the first expansion module;
the first response sending module is used for sending the first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through an expansion module interface; the expansion module interface is connected with the test interface;
the second response generation module is used for reconfiguring a second expansion module for the test interface after receiving the first test data and generating a second link negotiation response corresponding to the second expansion module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface;
and the test result determining module is used for determining a test result aiming at the expansion module interface according to the first test data and the second test data.
A test control device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Configuring a first expansion module for a test interface, and generating a first link negotiation response corresponding to the first expansion module;
transmitting the first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through an expansion module interface; the expansion module interface is connected with the test interface;
after receiving the first test data, reconfiguring a second expansion module for the test interface, and generating a second link negotiation response corresponding to the second expansion module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface;
and determining a test result aiming at the expansion module interface according to the first test data and the second test data.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
configuring a first expansion module for a test interface, and generating a first link negotiation response corresponding to the first expansion module;
Transmitting the first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through an expansion module interface; the expansion module interface is connected with the test interface;
after receiving the first test data, reconfiguring a second expansion module for the test interface, and generating a second link negotiation response corresponding to the second expansion module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface;
and determining a test result aiming at the expansion module interface according to the first test data and the second test data.
The method, the device, the test control equipment and the storage medium for testing the expansion module interface of the intelligent terminal are provided, wherein the test control equipment configures a first expansion module for the test interface and generates a first link negotiation response corresponding to the first expansion module; the test control equipment sends a first link negotiation response to the intelligent terminal through the test interface so that the intelligent terminal returns first test data through an expansion module interface connected with the test interface; after receiving the first test data, the test control device reconfigures a second expansion module with different expansion function types with the first expansion module for the test interface, and generates a second link negotiation response corresponding to the second expansion module, so that the intelligent terminal returns the second test data through the expansion module interface, further the test control device determines a test result aiming at the expansion module interface according to the first test data and the second test data, the test control device configures the expansion modules with different expansion function types for the test interface, tests various expansion modules for the expansion module interface of the intelligent terminal, and the test efficiency is improved.
Drawings
FIG. 1 is an application environment diagram of a method of testing an expansion module interface of an intelligent terminal in one embodiment;
FIG. 2 is a flow chart of a method for testing an expansion module interface of an intelligent terminal in one embodiment;
FIG. 3a is a flowchart illustrating steps performed to test an expansion module interface of an intelligent terminal in one embodiment;
FIG. 3b is an application environment diagram of a method of testing an expansion module interface of an intelligent terminal in another embodiment;
FIG. 3c is an internal block diagram of a test interface in one embodiment;
FIG. 3d is a schematic diagram of a test control device in one embodiment;
FIG. 4 is a block diagram of an apparatus for testing an expansion module interface of an intelligent terminal in one embodiment;
fig. 5 is an internal structural view of the test control device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
The method for testing the expansion module interface of the intelligent terminal can be applied to an application environment shown in fig. 1. The test control device is provided with a device for testing an expansion module interface of the intelligent terminal (the device can be simply called a test control device), and the test control device can perform test interaction with the intelligent terminal through the test interface. The method for testing the expansion module interface of the intelligent terminal provided by the application can comprise the following steps: after an expansion module interface of the intelligent terminal is connected with a test interface, the test control equipment configures a first expansion module for the test interface, generates a first link negotiation response corresponding to the first expansion module, and sends the first link negotiation response to the intelligent terminal through the test interface; the intelligent terminal responds to the first link negotiation response and returns first test data through an expansion module interface; after receiving the first test data, the test control device reconfigures a second expansion module for the test interface and generates a second link negotiation response corresponding to the second expansion module, wherein the expansion function type of the second expansion module is different from that of the first expansion module; the intelligent terminal responds to the second link negotiation response and returns second test data through the expansion module interface; the test control device determines a test interface for the expansion module interface according to the first test data and the second test data.
The intelligent terminal is provided with one or at least two expansion module interfaces, the physical structures of the expansion module interfaces are consistent, and when the expansion module interfaces of the intelligent terminal are tested (whether the expansion interfaces support corresponding expansion functions or not is tested), the expansion module interfaces need to be spliced with the test interfaces, so that the physical structures of the test interfaces are matched with the physical interfaces of the expansion modules; because the physical interfaces of the expansion module interfaces of the intelligent terminal are consistent, when the number of the expansion module interfaces is at least two, the number of the test interfaces can be corresponding to the number of the expansion module interfaces, and when the expansion module interfaces and the test interfaces are plugged, one of the test interfaces can be plugged with any expansion module interface.
When testing the expansion module interface of the intelligent terminal conventionally, different test interfaces correspond to different expansion functions, that is, if the expansion module interface needs to be tested to realize multiple expansion functions, the expansion module interface needs to be respectively plugged with multiple test interfaces, so that the test efficiency is low.
Based on this, in order to improve the testing efficiency of the expansion module interface of the intelligent terminal, the present application provides a method for testing the expansion module interface of the intelligent terminal, as shown in fig. 2, and the method is applied to the test control device in fig. 1 for illustration, and includes the following steps:
Step S202, a first expansion module is configured for the test interface, and a first link negotiation response corresponding to the first expansion module is generated.
The test control device can configure the test interface with the expansion modules so that the test interface corresponds to the different expansion modules; the test control device configures an expansion module for the test interface, which can be understood as: the test interface is controlled to transmit data related to the configured expansion module, for example, the test control device configures the expansion module of the test interface as an RS485 meter reading module, which is equivalent to that the test control device controls the test interface to transmit data related to the RS485 meter reading module (wherein the data related to the RS485 meter reading module can be the function specification of the RS485 meter reading module or the RS485 meter reading data).
The test control equipment can pre-store at least two expansion modules with different expansion function types, such as an RS485 meter reading module, a start acquisition module, an ammeter control module and the like, and further, the expansion modules with different expansion function types can correspond to different identifications; when the test control device configures the first expansion module for the test interface, any one expansion module can be selected from at least two expansion modules with different expansion function types stored in advance and used as the first expansion module, and then a first link negotiation response is generated according to the identification of the first expansion module.
The expansion module interface connected to the test interface may be understood as an expansion module interface to be tested (in the following description, reference to an expansion module interface may refer to an expansion module interface to be tested).
Step S204, a first link negotiation response is sent to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through the expansion module interface; the expansion module interface is connected with the test interface.
In this step, after generating the first link negotiation response corresponding to the first extension module, the test control device may send the first link negotiation response to the test interface; the test interface transmits the first link negotiation response to the connected expansion module interface so that the intelligent terminal receives the first link negotiation response; after receiving the first link negotiation response, the intelligent terminal analyzes the first link negotiation response to obtain an identifier of a first expansion module, determines that an expansion module configured by test control equipment for a test interface is the first expansion module according to the identifier of the first expansion module, processes a corresponding expansion function according to the determined first expansion module to obtain first test data, transmits the first test data to the test interface through the expansion module interface, and returns the first test data to the test control equipment through the test interface.
In order to further improve the test efficiency, before the test control device sends the first link negotiation response to the intelligent terminal through the test interface, the test control device may further send a first extended function protocol corresponding to the first extended module to the intelligent terminal, and after receiving the first link negotiation response, the intelligent terminal may perform corresponding extended function processing according to the first extended function protocol, so as to obtain first test data.
Step S206, after receiving the first test data, reconfiguring a second expansion module for the test interface and generating a second link negotiation response corresponding to the second expansion module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface.
In the step, after receiving first test data transmitted by a test interface, test control equipment selects a second expansion module from at least two expansion modules with different expansion function types stored in advance, wherein the expansion function type of the second expansion module is different from that of the first expansion module, and reconfigures the second expansion module for the test interface; after the configuration is completed, the test control equipment generates a second link negotiation response according to the identification of the second expansion module, and transmits the second link negotiation response to an expansion module interface of the intelligent terminal through the test interface; after receiving the second link negotiation response, the intelligent terminal analyzes the second link negotiation response to obtain the identification of the second expansion module, further determines that the expansion module corresponding to the test interface is the second expansion module, and then returns second test data; the description of the return of the second test data by the intelligent terminal may refer to the description of the return of the first test data in step S204, which is not repeated herein.
Step S208, determining a test result for the expansion module interface according to the first test data and the second test data.
After receiving the first test data and the second test data, the test control device verifies whether the first test data corresponds to the first expansion module or not, and whether the second test data corresponds to the second expansion module or not, determines the expansion function supported by the interface of the expansion module and the expansion function not supported by the interface of the expansion module according to the verification result, and takes the determined content as a test result.
In one embodiment, in order to further ensure the comprehensiveness of the test, the test control device may determine whether the protocol format and the data content of the first test data match the first expansion module, and if so, determine that the expansion module interface of the intelligent terminal supports the first expansion module; or, the test control device may further determine whether the protocol format and the data content of the second test data match the second expansion module, and if so, determine that the expansion module interface of the intelligent terminal supports the second expansion module.
In the method for testing the expansion module interface of the intelligent terminal, the test control equipment configures a first expansion module for the test interface and generates a first link negotiation response corresponding to the first expansion module; the test control equipment sends a first link negotiation response to the intelligent terminal through the test interface so that the intelligent terminal returns first test data through an expansion module interface connected with the test interface; after receiving the first test data, the test control device reconfigures a second expansion module with different expansion function types with the first expansion module for the test interface, and generates a second link negotiation response corresponding to the second expansion module, so that the intelligent terminal returns the second test data through the expansion module interface, further the test control device determines a test result aiming at the expansion module interface according to the first test data and the second test data, the test control device configures the expansion modules with different expansion function types for the test interface, tests various expansion modules for the expansion module interface of the intelligent terminal, and the test efficiency is improved.
In the test process, whether an expansion module interface of the intelligent terminal supports one of the expansion modules is tested, which can be regarded as a round of test; when a round of test is performed, the test control device needs to perform link negotiation with the intelligent terminal so that the intelligent terminal can acquire the expansion module to be tested. The link negotiation process between the test control device and the intelligent terminal may be: the intelligent terminal transmits a link negotiation request to the test interface through the expansion module interface, and the test interface sends the link negotiation request to the test control equipment; after receiving the link negotiation request, the test control equipment determines an expansion module and generates a link negotiation response corresponding to the expansion module; the test control device sends the generated link negotiation response to the test interface, and the test interface transmits the link negotiation response to the expansion module interface of the intelligent terminal, so that the intelligent terminal can acquire the expansion module to be tested according to the link negotiation response. The test control device determines the expansion module and generates a corresponding link negotiation response, so that the intelligent terminal obtains the related implementation manner of the expansion module to be tested according to the link negotiation response, which may be described in step S202, and is not repeated herein.
If the same expansion module interface needs to be tested whether the RS485 meter reading module, the start acquisition module and the ammeter control module are supported, three rounds of testing exist for the expansion module interface, wherein the test control equipment can be used for receiving test data returned by the intelligent terminal as a mark for completing one round of testing. After the test control equipment completes one round of test, if a new round of test is to be entered, the test interface needs to be manually plugged to trigger the intelligent terminal to resend the link negotiation request, and the new round of link negotiation is performed to realize the new round of test; therefore, the artificial plug operation triggers to enter a new round of expansion module test, and the test efficiency is reduced.
Based on the above, in order to further improve the test efficiency, after receiving the first test data, the test control device may send a hardware initialization instruction to the intelligent terminal, so as to trigger the intelligent terminal to send a link negotiation request of a new round of test. Taking an example of testing whether the expansion module interface supports the first expansion module and the second expansion module, description is made: the intelligent terminal sends a first link negotiation request to the test control equipment; after receiving the first link negotiation request, the test control device determines a first expansion module from a plurality of preset (prestored) expansion modules, and returns the generated first link negotiation response to the intelligent terminal; the intelligent terminal can determine an expansion module to be tested (namely, an expansion module configured by test control equipment for a test interface) as a first expansion module according to the first link negotiation response, and then return first test data to the test control equipment; after receiving the first test data, the test control device can determine that the test of the one-round expansion module is completed, and send a hardware initialization instruction to the intelligent terminal so as to enter the test of the new one-round expansion module; after receiving a hardware initialization instruction of the test control equipment, the intelligent terminal generates a second link negotiation request and sends the second link negotiation request to the test control equipment; after receiving the second link negotiation request, the test control device selects a second expansion module with different expansion function types from a plurality of prestored expansion modules, generates a corresponding second link negotiation response and sends the second link negotiation response to the intelligent terminal.
In one application scenario, if the original local function of the intelligent terminal is a function of communicating with the electric meter, the corresponding module is an electric meter communication module (e.g., a carrier communication module), and the electric meter communication module may be understood as a local communication module, and the corresponding interface is a local communication interface (it will be understood that "external" is referred to in the following description with respect to "local" herein, for example, the external expansion module interface is referred to as a local communication interface). In order to further improve the data transmission efficiency in the test stage, the test control device may send a test instruction carrying a management channel identifier and a data channel identifier to the intelligent terminal before performing link negotiation, so that the intelligent terminal may determine a management channel of the test interface according to the management channel identifier, and determine a data channel of the test interface according to the data channel identifier; wherein the management channel is used for transmitting link negotiation instructions (the link negotiation instructions may include link negotiation requests and/or link negotiation responses), and the data channel is used for transmitting test data.
Specifically, the test control device may generate a test instruction carrying a management channel identifier and a data channel identifier according to a protocol format of the ammeter communication module, and transmit the test instruction to a local communication interface of the intelligent terminal; after receiving the test instruction, the intelligent terminal analyzes the test instruction to obtain a management channel identifier and a data channel identifier, determines a management channel according to the management channel identifier, and determines a data channel according to the data channel identifier; when the intelligent terminal sends a link negotiation request to the test control equipment, the intelligent terminal can determine a management channel of the test interface according to the management channel identification and transmit the link negotiation request to the management channel of the test interface; when the intelligent terminal sends test data to the test control equipment, the data channel of the test interface can be determined according to the data channel identification, and the test data is transmitted to the data channel of the test interface. Correspondingly, when the test control device sends the link negotiation response to the intelligent terminal, the management channel of the test interface can be determined according to the management channel identification, and the link negotiation response is transmitted to the management channel of the test interface. It is understood that the link negotiation request may refer to a first link negotiation request and a second link negotiation request, the link negotiation response may refer to a first link negotiation response and a second link negotiation response, and the test data may refer to first test data and second test data.
In order to further improve the efficiency of the intelligent terminal returning test data in the test process, the test control device can acquire a plurality of extended function protocols corresponding to the plurality of extended modules, generate test instructions according to the plurality of extended function protocols, and send the test instructions carrying the plurality of extended function protocols to the intelligent terminal; the intelligent terminal analyzes the test instruction to obtain a plurality of extended function protocols, and performs corresponding extended function processing according to the extended function protocols to obtain corresponding test data.
In some application scenarios, if the intelligent terminal is provided with multiple expansion module interfaces, in order to further improve the test efficiency, the test control device may test the multiple expansion module interfaces at the same time, and correspondingly, each test interface is connected to a different expansion module interface, and the test control device configures a corresponding expansion module for each test interface (since the tests of the multiple expansion interfaces are performed at the same time, the expansion module of each test interface may also be referred to as an expansion sub-module), where the first expansion module mentioned in step S202 may include multiple expansion sub-modules, where each expansion sub-module corresponds to a different test interface.
The expansion sub-modules configured for each test module may include at least two expansion sub-modules with the same expansion function type, for example, when the test interfaces are three, the expansion sub-modules included in the first expansion module may be: two RS485 meter reading modules and one open acquisition module can also be three open acquisition modules.
However, in some application scenarios, if multiple expansion module interfaces of the intelligent terminal are tested according to the above configuration scheme (including at least two expansion sub-modules with the same expansion function type in the expansion sub-modules configured for each test module), it is difficult to ensure that multiple expansion module interfaces of the intelligent terminal can simultaneously support expansion functions with different expansion function types according to the obtained test result; for example, the intelligent terminal has three expansion module interfaces, if in actual use, the three expansion module interfaces need to support the RS485 meter reading module, the access acquisition module and the ammeter control module respectively, if testing is performed according to the above configuration scheme, it is difficult to ensure that the three expansion module interfaces of the intelligent terminal can support expansion functions with different expansion function types at the same time.
To further ensure the actual usability of the intelligent terminal, in one embodiment, the type of the extended function of the extended sub-module configured by the test control device for each test interface may be different; specifically, the test control device may select multiple extension modules of an extension function type from multiple extension modules, configure each test interface according to the selected multiple extension modules, generate corresponding link negotiation responses, send the link negotiation responses to the intelligent terminal through the corresponding test interfaces, and the intelligent terminal may determine extension modules of the corresponding connected test interfaces according to the link negotiation responses (i.e., multiple first link negotiation responses) received by each extension module interface, and return corresponding test data through the corresponding test interfaces; after receiving the test data transmitted by each test interface, the test control device reconfigures the second expansion module for each test interface; when the test control device reconfigures the second expansion module for each test interface, the test control device may adjust the sequence of each expansion sub-module in the first expansion module, so that the expansion function types of the expansion sub-modules corresponding to any one test interface are different before adjustment and after adjustment, and the first expansion module after the sequence adjustment is used as the second expansion module.
TABLE 1
Before the sequence adjustment After the sequence is adjusted
Test interface First expansion module Second expansion module
A RS485 meter reading module Ammeter control module
B Entry collection module RS485 meter reading module
C Ammeter control module Entry collection module
Illustratively, as shown in table 1, before the adjustment, the extension sub-modules corresponding to the three test interfaces A, B and C (i.e., the order of the respective extension sub-modules in the first extension module) are respectively: the RS485 meter reading module, the start acquisition module and the ammeter control module, the test control equipment adjusts the sequence of three expansion sub-modules in the first expansion module, and the second expansion module obtained after adjustment is: and (5) entering an acquisition module, an ammeter control module and an RS485 meter reading module.
After the second expansion module is obtained, the test control device generates corresponding link negotiation responses (i.e. a plurality of second link negotiation responses), and transmits the corresponding link negotiation responses to the expansion module interface of the intelligent terminal through the corresponding test interface.
In order to better understand the above method, an application example of the method for testing the interface of the expansion module of the intelligent terminal is described in detail below.
In this application example, as shown in fig. 3b, a test system of a new-generation intelligent terminal (i.e., intelligent terminal) includes a test control device and a test interface, where the new-generation intelligent terminal is provided with a local communication interface and an external expansion module interface (i.e., expansion module interface); the test control device can interact with the local communication interface and the test interface, and the test interface is connected with the external expansion module interface.
Further, as shown in fig. 3c, the control chip MCU of the test interface is configured to receive, buffer and send data, and convert the received data between a USB interface data format and a serial interface data format (or an ethernet data format); as shown in fig. 3d, the test control device may include an operation interface, a test procedure for testing the interface of the expansion module, and a plurality of modules (carrier or micropower wireless communication module, RS485 meter reading module, 4G communication module, access acquisition module, and ammeter control module); the carrier wave or micro-power wireless communication module and the RS485 meter reading module can simulate ammeter data.
The test interface may be responsible for performing data format conversion between the test control device and the intelligent terminal, specifically, if the expansion module interface of the intelligent terminal is implemented based on USB2.0 and communication of the test control device is implemented based on serial port or ethernet, the control chip MCU of the test interface may convert instructions or data (such as link negotiation request and test data) transmitted by the expansion module interface from the USB interface data format to the serial port data format or ethernet data format of the test control device, and may also convert data (such as link negotiation response) sent by the test control device from the serial port data format or ethernet data format to the USB interface data format.
The test control device may include the following aspects when testing the expansion module interface of the intelligent terminal:
(1) Interaction of test control device with intelligent terminal: the test control equipment sends the test instruction to the local communication interface of the intelligent terminal through the Ethernet data format or the serial port data format, and receives the data returned by the intelligent terminal so as to verify whether the intelligent terminal obtains the corresponding expansion module protocol according to the test instruction.
(2) Interaction of test control device with test interface: the test control equipment acquires instructions or data sent by the intelligent terminal through the test interface, and returns the data required by the intelligent terminal through the test interface according to the extension module protocol.
(3) The test control device can pre-store a carrier communication module and a micro-power wireless communication module, can simulate the carrier communication function and the micro-power wireless communication function, can simulate the interface protocol of the local communication module of the national grid company Q/GW1376.2-2013 concentrator and the interface protocol of the local communication module of the metering automation terminal of the southern grid company and the data content specified by the protocol, can interact with the intelligent terminal according to the function requirement of the external expansion module of the new generation intelligent terminal, and the interaction can comprise: the test control device can acquire the ammeter data required by the intelligent terminal from the prestored data and send the ammeter data to the intelligent terminal, so that the intelligent terminal can process the ammeter data according to the corresponding protocol to obtain test data and return the test data.
(4) The test control device can also pre-store a 4G communication module, can simulate the functions of the 4G communication module, can simulate the interface protocol of a remote communication module of a Q/GW1376.3-2013 acquisition terminal of a national grid company and the interface protocol of a remote communication module of a metering automation terminal of a southern grid company, and can provide data content specified by the protocol, and can provide all data of interaction between the 4G communication module and an intelligent terminal.
(5) The test control device can be pre-stored with an RS485 meter reading module, can simulate the function of RS485 meter reading, can simulate the interface protocol of a new generation intelligent terminal module, can provide all data interacted by the RS485 meter reading module and the intelligent terminal, and the interaction can comprise: the test control device can acquire the ammeter data required by the intelligent terminal from the prestored data and send the ammeter data to the intelligent terminal, so that the intelligent terminal can process the ammeter data according to the corresponding protocol to obtain test data and return the test data.
(6) The test control device can prestore an opening acquisition module, can simulate the opening acquisition function, and can provide all data, such as switching value change data, of interaction between the opening acquisition module and the intelligent terminal.
(7) The test control device can store the ammeter control module in advance, can simulate the function of the ammeter control module, can provide all data interacted between the ammeter control module and the intelligent terminal, and can judge whether the control command sent by the intelligent terminal is correct.
(8) The test control device can simulate at least 2000 data functions of the electric energy meter, and can provide all data contents of the electric energy meter according to the DL/T645-2007 protocol and the DL/T698.45-2017 protocol.
(9) The test control equipment can simulate various modules and ammeter data of the intelligent terminal when the ammeter is processed, and the used data can be modified and configured through an operation interface of the test control equipment.
(10) The main test functions of the test control device include:
A. consistency test of protocol format of external expansion module interface of new generation intelligent terminal:
the test control equipment acquires the instruction sent by the external expansion module interface of the intelligent terminal through the test interface, analyzes and judges whether the instruction accords with the protocol format, if so, judges that the test is qualified, and if not, judges that the test is unqualified.
The test control equipment acquires an instruction sent by an external expansion module interface of the intelligent terminal through the test interface, judges whether the intelligent terminal sends according to the sequence in the corresponding protocol, if so, judges that the test is qualified, and if not, judges that the test is unqualified.
The test control equipment acquires an instruction sent by an external expansion module interface of the intelligent terminal through the test interface, generates an error instruction, returns the error instruction to the intelligent terminal through the test interface, judges whether the external expansion module interface of the intelligent terminal resends data corresponding to the error instruction, judges that the test is unqualified if the external expansion module interface of the intelligent terminal resends the data corresponding to the error instruction, and judges that the test is qualified if the external expansion module interface of the intelligent terminal resends the data corresponding to the error instruction.
B. Meter reading function test of external expansion module interface of new generation intelligent terminal:
the test control equipment sends the corresponding protocols (such as meter reading files, meter reading tasks and meter reading schemes) of the meter reading functions to a local communication interface of the intelligent terminal; after receiving the meter reading module protocol, the intelligent terminal sends a meter reading command frame through an external expansion interface according to the meter reading module protocol; the test control equipment acquires a meter reading command frame sent by the intelligent terminal through the test interface, analyzes the meter reading command frame to obtain an ammeter data item required by the intelligent terminal, determines corresponding ammeter data from prestored data according to the ammeter data item, assembles the ammeter data according to a format of a meter reading module protocol, and returns the assembled ammeter data to the intelligent terminal through the test interface; the test control device can also obtain the test data of the intelligent terminal through the local communication interface of the intelligent terminal, judge whether the read test data is consistent with the pre-stored data, judge that the test is qualified if the read test data is consistent with the pre-stored data, and judge that the test is unqualified if the read test data is inconsistent with the pre-stored data.
C. Blind-plug function test of external expansion module interface of new generation intelligent terminal:
the extension module for the blind-mate function test may include: the system comprises an RS485 meter reading module, an entering acquisition module, an ammeter control module and a 4G communication module; the 4 test interfaces are respectively inserted into 4 external expansion module interfaces of the intelligent terminal, and the test control equipment configures corresponding expansion modules for the 4 test interfaces, for example, the test interfaces A, B, C and D are respectively an RS485 meter reading module, an opening acquisition module, an ammeter control module and a 4G communication module.
The method for testing the interface of the expansion module of the intelligent terminal provided by the application example is described below with reference to fig. 3 a.
Step S302, the intelligent terminal starts to operate normally under normal working voltage, the test control equipment generates a test instruction according to the expansion function protocol, the management channel identifier and the data channel identifier of each expansion module according to the protocol format of the ammeter communication module, and sends the test instruction to a local communication interface of the intelligent terminal, wherein the expansion function protocol of the four expansion modules can comprise the following information: meter reading information (meter reading file, meter reading task and meter reading scheme), access acquisition parameters, remote control tripping command and 4G communication parameters.
Step S304, after receiving the test instruction through the local communication interface, the intelligent terminal analyzes the test instruction to obtain an extended function protocol, a management channel identifier and a data channel identifier of each extended module; the intelligent terminal generates four link negotiation requests, determines a management channel of the test interface according to the management channel identification, and transmits the four link negotiation requests to the management channel of the corresponding test interface A, B, C, D through four external expansion module interfaces respectively.
Step S306, the test control device obtains the link negotiation request of the intelligent terminal through the management channel of the test interface, generates a corresponding link negotiation response according to the configured expansion module, and sends the link negotiation response to the intelligent terminal through the management channel of the corresponding test interface, so that the intelligent terminal determines the expansion modules of the 4 test interfaces.
Step S308, after determining the expansion modules of the 4 test interfaces, the intelligent terminal processes according to the expansion function specifications of the corresponding expansion modules to obtain corresponding test data, determines the data channels of the test interfaces according to the data channel identifiers, and transmits the corresponding test data to the data channels of the test interfaces through the 4 expansion module interfaces. Illustratively, the corresponding test data received by the test control device may include the following:
The test control equipment obtains a meter reading data command sent by the intelligent terminal through an external expansion module interface connected with the test interface A through a data channel of the test interface A. And the test control equipment returns corresponding data to the intelligent terminal through the data channel of the test interface A according to the ammeter data reading command.
The test control equipment acquires a read switching value state command sent by the intelligent terminal through an external expansion module interface connected with the test interface B through a data channel of the test interface B, and returns corresponding data to the intelligent terminal according to the read switching value state command.
The test control equipment acquires a relay action command sent by the intelligent terminal through an external expansion module interface connected with the test interface C through a data channel of the test interface C, and returns corresponding data to the intelligent terminal according to the relay action command.
The test control equipment acquires a 4G communication connection command sent by the intelligent terminal through an external expansion interface connected with the test interface C through a data channel of the test interface D, and returns corresponding data to the intelligent terminal according to the 4G communication connection command.
Step S310, after receiving corresponding test data returned by the intelligent terminal through 4 test interfaces, the test control device judges whether each expansion module interface of the intelligent terminal supports a corresponding expansion function in the round of test; and the test control device sends a hardware initialization instruction to the intelligent terminal to enter a new round of test.
Step S312, the intelligent terminal restarts after receiving the hardware initialization instruction, and sends a link negotiation request to the test control equipment again.
In step S306, after receiving the link negotiation request sent again by the intelligent terminal, the test control device reconfigures the extension modules for the 4 test interfaces, where the reconfigured extension modules corresponding to the test interfaces A, B, C and D may be: the system comprises a 4G communication module, an RS485 meter reading module, a start acquisition module and an ammeter control module; and generating a corresponding link negotiation response according to the reconfigured expansion module, and returning the response to the intelligent terminal so as to perform a corresponding expansion module interface test.
And by analogy, the test control equipment performs configuration of 4 rounds of expansion modules so as to test whether each expansion module interface can support 4 expansion functions, and blind insertion test of the expansion module interfaces is realized.
The method for testing the expansion module interface of the intelligent terminal, provided by the application example, realizes the test of the external expansion module interface of the new generation intelligent terminal, and the test interface meets the requirements of the external expansion module interface of the new generation intelligent terminal, so that whether the new generation intelligent terminal can perform normal data interaction with the external expansion module, such as function identification and protocol consistency of the external expansion module, can be tested.
The method can simulate the functions of all external expansion modules of the new-generation intelligent terminal and provide various data required by the intelligent terminal in the testing process, thereby replacing matched external equipment required by the testing, such as an ammeter, a carrier or micro-power wireless communication module, a collector and a switching value input device.
The method can also configure the expansion module for the test interface so as to perform blind insertion test on the expansion module interface connected with the test interface, thereby improving the test efficiency.
The method can simulate error data and error command frames, and test the processing capacity and reliability of the new generation intelligent terminal on external error data and error commands.
It should be understood that, although the steps in the flowcharts of fig. 2 and 3a are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in fig. 2 and 3a may include a plurality of steps or stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the execution of the steps or stages is not necessarily sequential, but may be performed in rotation or alternatively with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 4, there is provided an apparatus 400 for testing an expansion module interface of an intelligent terminal, including: a first response generation module 402, a first response transmission module 404, a second response generation module 406, and a test result determination module 408, wherein:
a first response generation module 402, configured to configure a first extension module for the test interface, and generate a first link negotiation response corresponding to the first extension module;
a first response sending module 404, configured to send a first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through the expansion module interface; the expansion module interface is connected with the test interface;
a second response generation module 406, configured to reconfigure the second extension module for the test interface after receiving the first test data, and generate a second link negotiation response corresponding to the second extension module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface;
The test result determining module 408 is configured to determine a test result for the expansion module interface according to the first test data and the second test data.
In one embodiment, the plurality of test interfaces are provided, each test interface is connected with a corresponding expansion module interface, the physical structures of the expansion module interfaces are the same, the first expansion module comprises a plurality of expansion sub-modules, and the expansion function types of the expansion sub-modules are different and correspond to different test interfaces;
the first response generating module 402 is further configured to adjust the order of each expansion sub-module in the first expansion module, so that the expansion function types of the expansion sub-modules corresponding to any one of the test interfaces are different before adjustment and after adjustment; and taking the first expansion module after the sequence adjustment as a second expansion module.
In one embodiment, the apparatus 400 further includes: the first protocol sending module is used for obtaining a first extended function protocol corresponding to the first extended module; and sending the first extended function protocol to the intelligent terminal so that the intelligent terminal generates first test data according to the first extended function protocol after receiving the first link negotiation response.
In one embodiment, the apparatus 400 further includes:
The link negotiation request receiving module is used for receiving a first link negotiation request sent by the intelligent terminal; responding to a first link negotiation request, and determining a first expansion module from a plurality of preset expansion modules;
the hardware initialization instruction sending module is used for sending a hardware initialization instruction to the intelligent terminal so as to enable the intelligent terminal to send a second link negotiation request;
the second response generation module 406 is further configured to reconfigure the second extension module for the test interface in response to the second link negotiation request, so as to trigger a new round of test flow; the second expansion module is an expansion module of the plurality of expansion modules.
In one embodiment, the apparatus 400 further includes: the test instruction sending module is used for generating a test instruction according to the protocol format of the ammeter communication module of the intelligent terminal; transmitting the test instruction to the intelligent terminal; the test instruction is used for indicating the intelligent terminal to send a first link negotiation request and a second link negotiation request through a management channel of the test interface, and returning first test data and second test data through a data channel of the test interface.
In one embodiment, the apparatus 400 further includes: the second protocol sending module is used for obtaining a plurality of extended function protocols corresponding to the plurality of extended modules; and sending the test instruction carrying the plurality of extended function protocols to the intelligent terminal, so that the intelligent terminal analyzes the test instruction to obtain the plurality of extended function protocols and respectively generates test data corresponding to the plurality of extended modules according to the plurality of extended function protocols.
In one embodiment, the test result determining module 408 is further configured to determine that the test result of the expansion module interface is supporting the first expansion module if the protocol format and the data content of the first test data match the first expansion module.
In one embodiment, the test result determining module 408 is further configured to determine that the test result of the expansion module interface is supporting the second expansion module if the protocol format and the data content of the second test data are matched with the second expansion module.
For specific limitation of the device for testing the expansion module interface of the intelligent terminal, reference may be made to the limitation of the method for testing the expansion module interface of the intelligent terminal hereinabove, and the description thereof will not be repeated here. All or part of each module in the device for testing the interface of the expansion module of the intelligent terminal can be realized by software, hardware and a combination thereof. The modules can be embedded in the processor in the test control equipment in a hardware form or can be independent from the processor in the test control equipment, and can also be stored in the memory in the test control equipment in a software form, so that the processor can call and execute the operations corresponding to the modules.
In one embodiment, a test control device is provided, which may be a terminal, the internal structure of which may be as shown in fig. 5. The test control device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the test control device is configured to provide computing and control capabilities. The memory of the test control device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the test control device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method of testing an expansion module interface of an intelligent terminal. The display screen of the test control device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the test control device can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the test control device, and can also be an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the test control device to which the present application is applied, and that a particular test control device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a test control device is provided, comprising a memory storing a computer program and a processor implementing the steps of the method embodiments described above when the processor executes the computer program.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the various method embodiments described above.
It should be noted that, the steps executed by the processor in the test control device are in one-to-one correspondence with the method for testing the expansion module interface of the intelligent terminal in the present application, and the content and the corresponding technical effects described in the embodiment of the method for testing the expansion module interface of the intelligent terminal are applicable to the embodiment of the test control device, which is not described herein again.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method for testing an expansion module interface of an intelligent terminal, the method being applied to test control equipment and comprising:
configuring a first expansion module for a test interface, and generating a first link negotiation response corresponding to the first expansion module;
transmitting the first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through an expansion module interface; the expansion module interface is connected with the test interface;
after receiving the first test data, reconfiguring a second expansion module for the test interface, and generating a second link negotiation response corresponding to the second expansion module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface;
Determining a test result for the expansion module interface according to the first test data and the second test data;
when meter reading function test of the expansion module interface is performed, the method further comprises the following steps:
sending meter reading files, meter reading tasks and meter reading schemes corresponding to the meter reading functions to a local communication interface of the intelligent terminal; so that the intelligent terminal executes the following steps: sending a meter reading command frame through an external expansion interface according to a meter reading module protocol;
acquiring a meter reading command frame sent by an intelligent terminal through a test interface, analyzing the meter reading command frame to obtain an ammeter data item required by the intelligent terminal, determining corresponding ammeter data from prestored data according to the ammeter data item, then assembling the ammeter data according to a format of a meter reading module protocol, and returning the assembled ammeter data to the intelligent terminal through the test interface;
and acquiring test data of the intelligent terminal through a local communication interface of the intelligent terminal, judging whether the read test data are consistent with the pre-stored data, if so, judging that the test is qualified, and if not, judging that the test is unqualified.
2. The method of claim 1, wherein the plurality of test interfaces are provided, each test interface is connected with a corresponding expansion module interface, the physical structures of each expansion module interface are the same, the first expansion module comprises a plurality of expansion sub-modules, and the expansion function types of each expansion sub-module are different and correspond to different test interfaces;
The step of reconfiguring a second expansion module for the test interface comprises:
the sequence of each expansion sub-module in the first expansion module is adjusted so that the expansion function types of the expansion sub-modules corresponding to any one test interface are different before and after adjustment;
and taking the first expansion module after the sequence adjustment as the second expansion module.
3. The method of claim 1, further comprising, prior to the step of sending the first link negotiation response to the intelligent terminal via the test interface:
acquiring a first expansion function protocol corresponding to the first expansion module;
and sending the first extended function protocol to the intelligent terminal, so that the intelligent terminal generates the first test data according to the first extended function protocol after receiving the first link negotiation response.
4. The method of claim 1, comprising, prior to the step of configuring the first expansion module for the test interface:
receiving a first link negotiation request sent by the intelligent terminal;
responding to the first link negotiation request, and determining the first expansion module from a plurality of preset expansion modules;
The step of reconfiguring a second expansion module for the test interface after receiving the first test data includes:
transmitting a hardware initialization instruction to the intelligent terminal so that the intelligent terminal transmits a second link negotiation request;
responding to the second link negotiation request, and reconfiguring the second expansion module for the test interface to trigger a new round of test flow; the second expansion module is an expansion module of the plurality of expansion modules.
5. The method of claim 4, further comprising, prior to the step of receiving the first link negotiation request sent by the intelligent terminal:
generating a test instruction according to a protocol format of an ammeter communication module of the intelligent terminal;
sending the test instruction to the intelligent terminal; the test instruction is used for indicating the intelligent terminal to send the first link negotiation request and the second link negotiation request through a management channel of the test interface, and returning the first test data and the second test data through a data channel of the test interface.
6. The method according to claim 5, further comprising:
Acquiring a plurality of expansion function protocols corresponding to the expansion modules;
and sending the test instruction carrying the plurality of extended function protocols to the intelligent terminal, so that the intelligent terminal analyzes the test instruction to obtain the plurality of extended function protocols and respectively generates test data corresponding to the plurality of extended modules according to the plurality of extended function protocols.
7. The method of any of claims 1 to 6, wherein the step of determining test results for the expansion module interface from the first test data and the second test data comprises:
if the protocol format and the data content of the first test data are matched with those of the first expansion module, judging that the test result of the expansion module interface supports the first expansion module;
and/or the number of the groups of groups,
and if the protocol format and the data content of the second test data are matched with the second expansion module, judging that the test result of the expansion module interface is supporting the second expansion module.
8. The device for testing the expansion module interface of the intelligent terminal is characterized by being applied to test control equipment and comprising the following components:
The first response generation module is used for configuring a first expansion module for the test interface and generating a first link negotiation response corresponding to the first expansion module;
the first response sending module is used for sending the first link negotiation response to the intelligent terminal through the test interface; the first link negotiation response is used for indicating the intelligent terminal to return first test data through an expansion module interface; the expansion module interface is connected with the test interface;
the second response generation module is used for reconfiguring a second expansion module for the test interface after receiving the first test data and generating a second link negotiation response corresponding to the second expansion module; wherein the type of the extended function of the second extended module is different from the type of the extended function of the first extended module; the second link negotiation response is used for indicating the intelligent terminal to return second test data through the expansion module interface;
the test result determining module is used for determining a test result aiming at the expansion module interface according to the first test data and the second test data;
when meter reading function test of the expansion module interface is carried out, the device further comprises a module for executing the following steps:
Sending meter reading files, meter reading tasks and meter reading schemes corresponding to the meter reading functions to a local communication interface of the intelligent terminal; so that the intelligent terminal executes the following steps: sending a meter reading command frame through an external expansion interface according to a meter reading module protocol;
acquiring a meter reading command frame sent by an intelligent terminal through a test interface, analyzing the meter reading command frame to obtain an ammeter data item required by the intelligent terminal, determining corresponding ammeter data from prestored data according to the ammeter data item, then assembling the ammeter data according to a format of a meter reading module protocol, and returning the assembled ammeter data to the intelligent terminal through the test interface;
and acquiring test data of the intelligent terminal through a local communication interface of the intelligent terminal, judging whether the read test data are consistent with the pre-stored data, if so, judging that the test is qualified, and if not, judging that the test is unqualified.
9. A test control device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202010441184.0A 2020-05-22 2020-05-22 Method, device and equipment for testing expansion module interface of intelligent terminal Active CN111541589B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010441184.0A CN111541589B (en) 2020-05-22 2020-05-22 Method, device and equipment for testing expansion module interface of intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010441184.0A CN111541589B (en) 2020-05-22 2020-05-22 Method, device and equipment for testing expansion module interface of intelligent terminal

Publications (2)

Publication Number Publication Date
CN111541589A CN111541589A (en) 2020-08-14
CN111541589B true CN111541589B (en) 2023-05-23

Family

ID=71979714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010441184.0A Active CN111541589B (en) 2020-05-22 2020-05-22 Method, device and equipment for testing expansion module interface of intelligent terminal

Country Status (1)

Country Link
CN (1) CN111541589B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691419B (en) * 2021-08-26 2022-07-19 中信科移动通信技术股份有限公司 Extension unit testing method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202422390U (en) * 2011-12-21 2012-09-05 洛阳愿景科技有限公司 Concentrator communication module of handheld meter reading machine system
CN103117890A (en) * 2013-01-17 2013-05-22 中国电力科学研究院 Device for testing concentrator local communication module interface protocol
CN103631690A (en) * 2013-11-21 2014-03-12 广东电网公司电力科学研究院 Electric power collecting and copying device RS485 interface handheld type tester and testing method thereof
JP2015169562A (en) * 2014-03-07 2015-09-28 中国電力株式会社 Watthour meter and testing system of watthour meter
DE102014105812A1 (en) * 2014-04-24 2015-10-29 Emh Metering Gmbh & Co. Kg Electricity meter or mounting and contacting unit for an electricity meter with an optical communication interface

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10052620B4 (en) * 2000-10-24 2008-07-10 Abb Ag Method for initialization of a pluggable electrical unit
TWI445974B (en) * 2012-07-31 2014-07-21 Quanta Comp Inc Test system and method for ports with multi functions
FR3059503B1 (en) * 2016-11-30 2019-05-17 Sagemcom Energy & Telecom Sas ELECTRICAL METER COMPRISING AN IN LINE CARRIER INTERFACE AND AT LEAST ONE RADIO FREQUENCY INTERFACE
CN106771967A (en) * 2016-12-07 2017-05-31 深圳市科陆物联信息技术有限公司 Core board test device and method
CN110083499B (en) * 2018-01-26 2024-02-23 名硕电脑(苏州)有限公司 Function test equipment using Type-C interface and test method thereof
CN109062751A (en) * 2018-09-14 2018-12-21 电子科技大学中山学院 USB Type-C interface rapid test system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202422390U (en) * 2011-12-21 2012-09-05 洛阳愿景科技有限公司 Concentrator communication module of handheld meter reading machine system
CN103117890A (en) * 2013-01-17 2013-05-22 中国电力科学研究院 Device for testing concentrator local communication module interface protocol
CN103631690A (en) * 2013-11-21 2014-03-12 广东电网公司电力科学研究院 Electric power collecting and copying device RS485 interface handheld type tester and testing method thereof
JP2015169562A (en) * 2014-03-07 2015-09-28 中国電力株式会社 Watthour meter and testing system of watthour meter
DE102014105812A1 (en) * 2014-04-24 2015-10-29 Emh Metering Gmbh & Co. Kg Electricity meter or mounting and contacting unit for an electricity meter with an optical communication interface

Also Published As

Publication number Publication date
CN111541589A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
CN111459794B (en) Communication network testing method, device, computer equipment and storage medium
CN102567203B (en) A kind of method and system of test distributed file system performance
CN111597083B (en) Testing system of intelligent terminal
CN110380939B (en) Consistency test method and system for local communication protocol in electricity consumption information acquisition system
CN113014449B (en) Local communication protocol pressure testing method and system of electricity consumption information acquisition system
CN104978263A (en) Mobile terminal application program test method and mobile terminal application program test system
CN107018523A (en) WIFI module testing method and device
WO2022127575A1 (en) Automatic testing method and system for wifi devices and readable storage medium
CN111404779B (en) Method, device and system for testing role switching of router nodes
CN113407393B (en) Chip verification method, terminal device, verification platform and storage medium
CN116232931B (en) Dual-mode test system applied to HPLC and broadband micropower wireless
CN106776350A (en) The accurate method of testing and device of a kind of program
CN109783340A (en) Test code programming method, IP test method and the device of SoC
CN105120483A (en) Method and system for automatically testing compatibility between intelligent card and mobile terminal
CN112367680A (en) External communication test method and device based on intelligent electric meter and computer equipment
CN110764036A (en) Intelligent distribution transformer terminal test method and system
CN111541589B (en) Method, device and equipment for testing expansion module interface of intelligent terminal
CN112100081A (en) Upgrade test method and device based on double-core intelligent electric meter and computer equipment
CN109613467B (en) Test equipment and test method for realizing multi-meter test of simulation site
CN106201852A (en) A kind of distributed test method and test system
CN110334385B (en) Test method, device and equipment for central controller of comprehensive energy system
CN112867044A (en) Base station simulation test terminal, test method and device
CN116545891A (en) Automatic distribution network testing method based on intelligent equipment
CN114845328B (en) Polymorphism NR radio frequency test system, test case generation method and test method
CN115833964A (en) Performance test method and performance test system of dual-mode communication module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant