Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Although the steps in the present invention are arranged by using reference numbers, the order of the steps is not limited, and the relative order of the steps can be adjusted unless the order of the steps is explicitly stated or other steps are required for the execution of a certain step.
FIG. 1 is a schematic flow chart of a method for testing an account opening function of a fee control interactive terminal according to an embodiment; the method is suitable for the cost control interactive terminal. The charge control interactive terminal is composed of a communication unit, a display unit, a main control unit, a user card interface unit and the like, can realize the functions of remote account opening, recharging, parameter updating and the like of the charge control electric energy meter, and meanwhile is terminal equipment with the functions of alarm prompting, communication forwarding, query display and the like.
As shown in fig. 1, the method for testing account opening function of a fee control interactive terminal in this embodiment includes the steps of:
s1, detecting the card swiping operation information of each account opening card of at least two preset account opening cards, and acquiring the parameter information of each account opening card according to the card swiping operation information.
Generally, an account opening card for opening an account of an electric energy meter can be an IC card or a radio frequency card, and parameter information such as card identification information, user account information, electric energy meter information and the like is recorded on the account opening card. It is understood that the card swiping operation information includes contact card swiping operation information, such as card swiping operation, and non-contact card swiping operation information, which may be card swiping implemented based on any near field communication technology (bluetooth, NFC, and other video technologies).
In an optional embodiment, the method for testing the account opening function of the fee-control interaction terminal further includes the steps of: and presetting at least two account opening cards, wherein the at least two account opening cards comprise an account opening card with wrong parameters and an account opening card with correct parameters.
And S2, acquiring an account opening command sent by the fee control interactive terminal to the corresponding electric energy meter according to the parameter information of each account opening card.
In an optional embodiment, the electric energy meter is an electric energy meter pre-simulated by a server, and the fee control interaction terminal is in signal connection with the simulated electric energy meter. The simulated electric energy meter can simulate real electric energy meters in different states, such as an electric energy meter which is opened and responds normally when an account is opened, an electric energy meter which is closed or responds abnormally when the account is opened, an electric energy meter which is in a closing state or an electric energy meter which is in a tripping state. The possible states of the real electric energy meter can be simulated by the simulated electric energy meter. Thereby improving the comprehensiveness of the test; meanwhile, the state of the simulated electric energy meter can be changed through software of the server side, various real electric energy meters do not need to be connected, and therefore the test cost can be controlled.
And S4, acquiring the response information of the fee control interactive terminal after receiving the electric energy meter account opening response information.
Under a normal condition, after receiving an account opening command issued by the fee control interactive terminal, the electric energy meter returns execution information of the account opening command to the fee control interactive terminal, so that the execution information of the electric energy meter is displayed at the fee control interactive terminal, and a user can know an actual account opening condition conveniently.
And S4, judging whether the account opening function of the charge control interaction terminal is qualified or not according to the parameter information, the account opening command and the response information.
In an optional embodiment, the parameter information, the account opening command and the response information may be analyzed based on an account opening function detection model of the fee-control interaction terminal obtained through pre-learning, the account opening function detection model may be a model obtained through machine learning of the fee-control interaction terminal with a qualified account opening function, the model takes account opening card parameter information, account opening instruction information and the response information as inputs, and takes output as output whether the account opening function of the fee-control interaction terminal is qualified or not.
In another optional embodiment, referring to fig. 2, the implementation manner of determining whether the account opening function of the fee-control interaction terminal is qualified according to the parameter information, the account opening command, and the response information may further be:
l1, detecting whether the parameter information is correct, if not, detecting whether the account opening command is empty, if not, judging that the account opening function of the fee control interactive terminal is unqualified, and if so, executing a step L3; if the parameter information is correct, executing the step L2;
l2, detecting whether the account opening command is correct; if the account opening command is incorrect, judging that the account opening function of the cost control interaction terminal is unqualified, and if the account opening command is correct, executing the step L3;
l3, comparing the response information with preset reference response information, and if the response information is not consistent with the preset reference response information, judging that the account opening function of the fee control interactive terminal is unqualified; and if the two are not consistent, judging that the account opening function of the charge control interactive terminal is qualified. And the reference response information represents the response information of the fee control interaction terminal with qualified account opening function after receiving the account opening response information of the electric energy meter.
In an optional embodiment, the acquired parameter information of each account opening card may include: the electric energy meter comprises electric energy meter number information, account opening card serial number, user number and/or purchased electricity frequency information. Preferably, the parameter error includes a format error of each parameter itself or a parameter exceeding a set parameter range, and may also be a correspondence error between parameters, such as a correspondence error between meter number information of the electric energy meter, a serial number of the account opening card, and a user number.
Therefore, through the test mode of the embodiment, whether the identification of the account opening card with the wrong parameter by the fee-control interactive terminal is qualified can be tested, for example, if the account opening card with the wrong parameter is identified, the fee-control interactive terminal does not send an account opening instruction to the corresponding electric energy meter or sends a null instruction, so that the situation of stealing card swiping can be prevented; and only when the account opening card with correct parameters is identified, the fee control interaction terminal sends an effective account opening instruction to the corresponding electric energy meter.
In an optional embodiment, the response information includes: and the account opening card writes back the execution information and/or the record information of the account opening state of the electric energy meter. The charge control interaction terminal sends an account opening instruction to the electric energy meter according to the correct account opening card, so that the account opening response information of this time can be locally stored and displayed, and the account opening card can be rewritten according to the account opening response information returned by the electric energy meter, such as the account opening state updating and the electricity purchasing frequency updating stored in the account opening card. Furthermore, the user information may also be modified by write-back.
In an optional embodiment, before detecting card swiping operation information of each preset at least two account opening cards, the method further includes the steps of: and carrying out time synchronization on the fee control interactive terminal in a formal key state, and initializing the fee control interactive terminal.
In an optional embodiment, before detecting card swiping operation information of each preset at least two account opening cards, the method further includes the steps of: and establishing a corresponding account opening card file for each account opening card at the expense control interactive terminal, and/or establishing an electric energy meter file for each electric energy meter connected with the expense control interactive terminal. Historical account opening information of the same account opening card information can be effectively managed through the account opening card file; and managing the account opening response information returned by each electric energy meter each time through the electric energy meter files.
Further, after acquiring the parameter information of each account opening card according to the card swiping operation information, the method further comprises the following steps: and writing the parameter information into the corresponding account opening card file. After the response information of the fee control interactive terminal after receiving the electric energy meter account opening response information is obtained, the method also comprises the following steps: and writing the account opening response information of the electric energy meter into a corresponding electric energy meter file, and updating the account opening card file according to the response information of the fee control interaction terminal. Because the response information of the fee control interactive terminal comprises the update information of the account opening card parameters, the account opening card files corresponding to the account opening cards need to be updated synchronously.
In addition, through the account opening card file and the electric energy meter file, historical account opening information of the fee control interaction terminal is conveniently acquired, and an account opening function detection model of the fee control interaction terminal is built or perfected through learning the historical account opening information.
Further, the method for testing the account opening function of the fee-control interactive terminal according to the above embodiment is exemplarily described below. The specific process is as follows:
step 1: setting an account opening card file and an analog table file at the charge control interactive terminal in a formal key state, and timing;
step 2: and initializing the fee control interactive terminal. Controlling the charge control interactive terminal to enter a formal secret key state, swiping an account opening card with a wrong parameter on the charge control interactive terminal, and acquiring the following account opening command condition of the charge control interactive terminal and the response condition according to the response of the electric energy meter under the assumption that the electric energy meter responds normally; therefore, whether the account opening function test of the fee control interactive terminal passes when the account opening card with wrong parameters is detected.
And step 3: swiping an account opening card with a wrong parameter on the charge control interactive terminal, and acquiring the following account opening command condition of the charge control interactive terminal and the response condition according to the response of the electric energy meter under the assumption that the electric energy meter responds abnormally (namely cannot respond); and detecting whether the account opening function test of the fee control interactive terminal passes or not when the account opening card with wrong parameters and the electric energy meter respond abnormally.
And 4, step 4: swiping an account opening card with correct parameters on the charge control interactive terminal, and acquiring the following account opening command condition of the charge control interactive terminal and the response condition according to the response of the electric energy meter on the assumption that the electric energy meter responds normally; the response condition comprises an account opening state, an account opening card electricity purchasing information file update, an electric energy meter customer number, an electricity purchasing record and the like. Therefore, whether the account opening function test of the fee control interaction terminal passes or not when the account opening card with correct parameters and the electric energy meter response are normal is detected.
And 5: and (3) checking the detection conditions of the steps 2-4, if any step fails to pass the detection, determining that the overall test conclusion of the account opening function of the cost control interaction terminal is unqualified, and only when all 3 steps pass the detection, determining that the overall test conclusion of the account opening function of the cost control interaction terminal is qualified.
According to the method for testing the account opening function of the cost control interaction terminal, at least two account opening cards are preset, wherein the account opening cards comprise account opening cards with wrong parameters and account opening cards with correct parameters; when the card is swiped, reading the parameter information of each account opening card, and acquiring an account opening command sent by the fee control interaction terminal to the corresponding electric energy meter according to the parameter information of each account opening card; acquiring response information of the fee control interactive terminal after receiving the account opening response information of the electric energy meter; and judging whether the account opening function of the charge control interaction terminal is qualified or not according to the parameter information, the account opening command and the response information. Therefore, the response condition of the fee control interactive terminal to the account opening function of different account opening cards can be obtained, and the account opening function test result of the fee control interactive terminal can be obtained according to the response information under different conditions, so that the objectivity of the test result is ensured, and the test efficiency is improved.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention.
Based on the same idea as the method for testing the account opening function of the fee control interactive terminal in the embodiment, the invention also provides a device for testing the account opening function of the fee control interactive terminal, and the device can be used for executing the method for testing the account opening function of the fee control interactive terminal. For convenience of explanation, the schematic structural diagram of the device embodiment for testing the account opening function of the fee-control interaction terminal only shows a part related to the embodiment of the present invention, and those skilled in the art will understand that the illustrated structure does not constitute a limitation of the device, and may include more or less components than those illustrated, or combine some components, or arrange different components.
Fig. 3 is a schematic structural diagram of a device for testing account opening function of a fee-control interactive terminal according to an embodiment of the present invention, where the device can be applied to any fee-control interactive terminal. As shown in fig. 3, the device for testing account opening function of the fee-control interactive terminal of the embodiment includes:
the card swiping detection module 301 is configured to detect card swiping operation information of each account opening card of at least two preset account opening cards, and acquire parameter information of each account opening card according to the card swiping operation information.
And the command detection module 302 is configured to obtain an account opening command sent by the fee control interaction terminal to the corresponding electric energy meter according to the parameter information of each account opening card.
And the execution information detection module 303 is configured to obtain response information of the fee control interaction terminal after receiving the electric energy meter account opening response information.
And the judging module 304 is configured to judge whether the account opening function of the fee-control interaction terminal is qualified according to the parameter information, the account opening command and the response information.
In an optional embodiment, the device for testing the account opening function of the fee-control interaction terminal further includes: the account opening card setting module is used for presetting at least two account opening cards, and the at least two account opening cards comprise account opening cards with wrong parameters and account opening cards with correct parameters.
In an optional embodiment, the determining module 304 is configured to perform the following steps:
l1, detecting whether the parameter information is correct, if not, detecting whether the account opening command is empty, if not, judging that the account opening function of the fee control interactive terminal is unqualified, and if so, executing a step L3; if the parameter information is correct, executing the step L2;
l2, detecting whether the account opening command is correct; if the account opening command is incorrect, judging that the account opening function of the cost control interaction terminal is unqualified, and if the account opening command is correct, executing the step L3;
l3, comparing the response information with preset reference response information, and if the response information is not consistent with the preset reference response information, judging that the account opening function of the fee control interactive terminal is unqualified; and if the two are not consistent, judging that the account opening function of the charge control interactive terminal is qualified.
In an optional embodiment, the device for testing the account opening function of the fee-control interaction terminal further includes: and the initialization module is used for carrying out time synchronization on the fee control interactive terminal in a formal key state in advance and carrying out initialization on the fee control interactive terminal. And/or the file management module is used for establishing a corresponding account opening card file for each account opening card in the fee control interactive terminal in advance, and establishing an electric energy meter file for each electric energy meter connected with the fee control interactive terminal in a distributed mode.
Furthermore, the archive management module can be used for writing the parameter information into the corresponding account opening card archive after acquiring the parameter information of each account opening card; and the account opening card file is used for writing the account opening response information of the electric energy meter into the corresponding electric energy meter file and updating the account opening card file according to the response information of the fee control interaction terminal.
It should be noted that, in the embodiment of the device for testing an account opening function of a fee-control interaction terminal in the foregoing example, because the contents of information interaction, execution process, and the like between modules are based on the same concept as the foregoing method embodiment of the present invention, the technical effect brought by the contents is the same as the foregoing method embodiment of the present invention, and specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
In addition, in the above-mentioned exemplary embodiment of the device for testing the fee-controlled interaction terminal account opening function, the logical division of each program module is only an example, and in practical applications, the above-mentioned function distribution may be completed by different program modules according to needs, for example, due to the configuration requirements of corresponding hardware or the convenience of implementation of software, that is, the internal structure of the device for testing the fee-controlled interaction terminal account opening function is divided into different program modules so as to complete all or part of the above-mentioned functions.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which is stored in a computer readable storage medium and sold or used as a stand-alone product. The program, when executed, may perform all or a portion of the steps of the embodiments of the methods described above. In addition, the storage medium may be provided in a computer device, and the computer device further includes a processor, and when the processor executes the program in the storage medium, all or part of the steps of the embodiments of the methods described above can be implemented. The storage medium may be a magnetic disk, an optical disk, a Read-only Memory (ROM), a Random Access Memory (RAM), or the like.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. It will be understood that the terms "first," "second," and the like as used herein are used herein to distinguish one object from another, but the objects are not limited by these terms.
The above-described examples merely represent several embodiments of the present invention and should not be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.