CN113486682A - U shield testing method, device, equipment and medium - Google Patents

U shield testing method, device, equipment and medium Download PDF

Info

Publication number
CN113486682A
CN113486682A CN202110764934.2A CN202110764934A CN113486682A CN 113486682 A CN113486682 A CN 113486682A CN 202110764934 A CN202110764934 A CN 202110764934A CN 113486682 A CN113486682 A CN 113486682A
Authority
CN
China
Prior art keywords
shield
fault
click
standby
spare
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.)
Pending
Application number
CN202110764934.2A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110764934.2A priority Critical patent/CN113486682A/en
Publication of CN113486682A publication Critical patent/CN113486682A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0095Testing the sensing arrangement, e.g. testing if a magnetic card reader, bar code reader, RFID interrogator or smart card reader functions properly
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The disclosure provides a U shield testing method, which can be applied to the technical field of information security and big data, and comprises the following steps: matching a spare U shield corresponding to the fault U shield; filling original data of the fault U shield into the spare U shield; and controlling the clicker to execute a click operation on the standby U shield so as to complete the test of the standby U shield. Therefore, compared with the condition that the test efficiency is low due to the fact that only manual replacement can be carried out on the fault or abnormal U shield equipment in the prior art, the fault or abnormal U shield equipment can be automatically detected, equivalent replacement between the fault U shield and the spare U shield can be automatically carried out, the spare replacement process of the fault U shield with high automation, intelligence and precision is achieved, the workload of U shield test maintenance is greatly reduced, and the automatic test efficiency is further improved. In addition, the disclosure also provides a U shield testing device, electronic equipment and a computer readable storage medium.

Description

U shield testing method, device, equipment and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for testing a U-shield, an electronic device, and a computer-readable storage medium.
Background
In a business application system provided by a financial enterprise such as a bank, a U shield is generally provided as an identification for authenticating a transaction client in order to ensure security of transactions and prevent impersonation for business transactions involving account change. Specifically, when a customer performs a business transaction, a U shield needs to be inserted into an electronic device to perform the relevant business transaction in a business application system. The U shield is used as an important customer identity certificate and has a very important role in the business transaction operation process of a business application system, and particularly the U shield is used for business transactions of public enterprises which are more frequently used. However, with the accelerated rhythm of version development, the automatic verification operation based on the service application system needs to consider the automatic test of the U shield.
Disclosure of Invention
Technical problem to be solved
In order to solve at least one of the technical problems in the prior art in the process of automatic testing of the U shield, the disclosure provides a U shield testing method, a U shield testing device, electronic equipment and a computer readable storage medium.
(II) technical scheme
One aspect of the present disclosure provides a U shield testing method, including: matching a spare U shield corresponding to the fault U shield; filling original data of the fault U shield into the spare U shield; and controlling the clicker to execute a click operation on the standby U shield so as to complete the test of the standby U shield.
According to the embodiment of the present disclosure, before matching the spare U shield corresponding to the failed U shield, the method includes: responding to the first test instruction, and parameterizing the automation script to form a parameterized script; and executing the parameterized script to detect the fault U shield.
According to the embodiment of the disclosure, in executing the parameterized script and detecting the fault U shield, the method comprises the following steps: detecting a test log record of the current U shield; and determining the current U shield as a fault U shield according to the test log record and a preset fault analysis rule.
According to the embodiment of the disclosure, matching the spare U shield corresponding to the failed U shield comprises: responding to the detection of the fault U shield, and inquiring an idle U shield in the U shield array; and matching the idle U shield corresponding to the fault U shield into a spare U shield according to a preset position matching rule.
According to the embodiment of the present disclosure, in a U shield spare for an idle U shield that matches a corresponding failed U shield according to a preset position matching rule, the method includes: determining a first array position of a fault U shield; and matching the spare U shield with the idle U shield according to the matching rule of the first array position and the preset position.
According to the embodiment of the disclosure, the flooding of the original data of the failed U shield into the spare U shield comprises: determining a standby binding relationship between the identity information of the standby U shield and the identity information of the fault U shield; and executing the filling operation of the original data to the standby U shield according to the standby binding relationship.
According to the embodiment of the disclosure, in determining the backup binding relationship between the identity information of the backup U shield and the identity information of the failed U shield, the method includes: inquiring identity information of a fault U shield; canceling the original binding relationship between the fault U shield and the identity information; and activating a standby binding relationship between the standby U shield and the identity information.
According to the embodiment of the disclosure, before the controlling the clicker to perform the click operation on the standby U shield, the method further includes: increasing a switching mapping relation between the identity information of the corresponding standby U shield and the identity information of the fault U shield; and updating the service information of the standby U shield according to the switching mapping relation.
According to the embodiment of the disclosure, in the step of controlling the clicker to click the standby U shield, the method further includes: responding to the second test instruction, and determining a standby U shield corresponding to the fault U shield according to the switching mapping relation; and the control clicker executes click operation for a fixed number of times on the standby U shield based on a fixed period so as to execute service test aiming at the service information.
According to the embodiment of the present disclosure, in executing the parameterized script to detect the faulty U shield, the method further includes: responding to the execution of the parameterized script, and sending a use request to the current U shield; and establishing the control connection between the current U shield and the execution machine according to the use request.
Another aspect of the present disclosure provides a U-shield testing apparatus, which includes a standby matching module, a data injection module, and a click control module. The standby matching module is used for matching a standby U shield corresponding to the fault U shield; the data injection module is used for injecting original data of the fault U shield into the standby U shield; and the click control module is used for controlling the clicker to execute click operation on the standby U shield so as to finish the test of the standby U shield.
Another aspect of the disclosure provides an electronic device, comprising one or more processors and memory; the memory is used for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the instructions, when executed, are for implementing the above-described method.
(III) advantageous effects
The disclosure provides a U shield testing method, which includes: matching a spare U shield corresponding to the fault U shield; filling original data of the fault U shield into the spare U shield; and controlling the clicker to execute a click operation on the standby U shield so as to complete the test of the standby U shield. Therefore, compared with the condition that the test efficiency is low due to the fact that only manual replacement can be carried out on the fault or abnormal U shield equipment in the prior art, the fault or abnormal U shield equipment can be automatically detected, equivalent replacement between the fault U shield and the spare U shield can be automatically carried out, the spare replacement process of the fault U shield with high automation, intelligence and precision is achieved, the workload of U shield test maintenance is greatly reduced, and the automatic test efficiency is further improved. In addition, the disclosure also provides a U shield testing device, electronic equipment and a computer readable storage medium.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which a Udun test method may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates another exemplary system architecture to which a Udun test method may be applied, according to an embodiment of the present disclosure;
FIG. 3 schematically shows a flow chart of a method for testing a Ushield according to an embodiment of the present disclosure;
fig. 4 schematically shows an application scene diagram applied to the U shield testing method according to the embodiment of the present disclosure;
fig. 5 schematically illustrates a block diagram of a U shield testing apparatus according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates another exemplary system architecture to which a Udun test method may be applied, according to another embodiment of the present disclosure;
FIG. 7 schematically shows a flow chart of a method for testing a Ushield according to another embodiment of the present disclosure;
fig. 8 schematically shows an application scenario applied to the U shield testing method according to another embodiment of the present disclosure;
fig. 9 schematically shows a block diagram of a U shield testing apparatus according to another embodiment of the present disclosure; and
FIG. 10 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
< example 1>
With the accelerated development rhythm of the system application version, the automatic verification of the business application system becomes a preferred scheme in the testing process. The business transaction which needs the local device to insert the U shield as the security medium is generally a high-risk key transaction and is also the content which needs key verification in the version test at each stage.
In the traditional automatic testing process, due to the limitation of hardware safety medium operation (plugging and unplugging and physical key clicking), more manual operation links are required to be added to normally complete the operation process of one transaction, so that the automation of the transaction always needs manual intervention to be linked, the automation cost is higher, and the automatic testing can not be efficiently realized. However, the U shield used for various business transactions is increasingly frequent, and the U shield is an important proof of the identity of a client, and is very important in the process of performing system transaction operation, especially for the transactions of public enterprises.
The existing automatic test scene related to the U shield mainly faces two problems: (1) and clicking physical keys on the U shield equipment. In the conventional solution, the physical peripheral scheme is used, and in the whole transaction process, the operation mode of repeatedly and uninterruptedly clicking the physical button on the U shield is performed by the external device to realize the operation of the physical button of the U shield. (2) And performing switching operation on the current U shield in use. However, in the current practical work, the operation can be realized only by manually plugging and unplugging the switching U-shield, or by developing a U-shield routing connection module.
There are generally two U shield button clicking modes: one is uncontrolled blind click mode and the other is controlled targeted click scheme.
On the one hand, in the uncontrolled blind click mode, a physical peripheral (e.g., a clicker) is used to continuously click a physical button on the U-shield. Because the clicking of the physical button is not targeted, even if no or only a few U shields need to be clicked in a certain time period, all the U shield devices need to be in a clicked state, a huge invalid clicking operation amount is generated, so that waste of resources such as electric energy and meaningless device loss are caused, especially, more U shield keys are damaged due to multiple times of clicking, and test resources are greatly wasted.
On the other hand, in the controlled targeted click mode, an operation scheme that each U shield device corresponds to one clicker is usually adopted, with the expansion of the test scale, the number of test U shield devices to be prepared gradually increases, and when the number of U shield devices reaches a certain scale, the mode that each U shield is provided with one clicker generates certain difficulty in deployment and management of the clicker, and meanwhile, since not all U shields need to be clicked at the same time, more resources of the U shield clicker devices are wasted.
In order to solve at least one of the above technical problems in the prior art in the process of automatic testing of the U shield, the present disclosure provides a U shield testing method, apparatus, electronic device and computer-readable storage medium.
It should be noted that the U shield testing method and apparatus provided by the present disclosure may be applied to the technical field of information security, the technical field of big data, the technical field of finance, and any technical field other than the above technical fields.
Fig. 1 schematically shows an exemplary system architecture to which a U-shield test method may be applied according to an embodiment of the present disclosure.
It should be noted that fig. 1 is only an application example to which the embodiment of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the U shield test method of the embodiment of the present disclosure may not be used in other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to the embodiment may include a data request system 110, and a server system 120 that establishes data communication with the data request system 110, wherein the server system includes servers M, 121, 122, 123, 124, and 125 that establish a data transmission channel with the data request system 110, and wherein the server M is a main access server (i.e., a main server) and may obtain instruction information from a user (e.g., a tester). The servers 121, 122, 123, 124 and 125 are secondary access servers (i.e. sub-servers), and the data request system 110 and the servers M, 121, 122, 123, 124 and 125 can be implemented based on an internal cloud network server C. Alternatively, when the main server M of the servers M, 121, 122, 123, 124 and 125 is a network server, that is, an intranet of the other terminal devices 111, 112, 113, 114 and 115, the main server M of the server system 120 may be located in an extranet. At this time, the cloud network server C is used here as a medium for providing communication links between the other terminal devices 111, 112, 113, 114 and 115. The data transmission path between the server system 120 and the plurality of terminal devices may be implemented by various communication connection types, such as wired, wireless communication links, or fiber optic cables. The cloud network server C may be a web server to provide a graphical display and input interface for a user.
It should be noted that, according to the embodiment of the present disclosure, the servers 121, 122, 123, 124, and 125 may implement a secret-less interconnection, and are applied to a large U shield test service capable of ensuring information security.
The user may use the terminal devices 111, 112, 113, 114 and 115 to interact with the server system 120 to receive or send messages or the like to implement the U-shield test or process, in particular with respect to access to the database in the main server M in the server system. For example, the terminal device 111 sends access request content such as U shield test data to the terminal device 112, and after receiving the U shield test data of the terminal device 111, the server system 120 performs forwarding processing on the corresponding U shield test data, and encrypts the U shield test data under specific requirements, so that the U shield test data finally reaching the terminal device 111 is secured. Various messenger client applications, such as management-type applications, web browser applications, search-type applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on terminal devices 111, 112, 113, 114, and 115.
The terminal devices 111, 112, 113, 114, and 115 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop and desktop computers, and various types of application servers, and so on.
The server system 120 may include various types of firewalls that provide various services, such as filtering-type firewalls (by way of example only) that provide support for websites browsed by users using the terminal devices 111, 112, 113, 114, and 115. The filtering firewall can analyze and process the received data such as the user request, analyze the data based on the address of the data source, the protocol type and other mark characteristics, and determine whether the data can pass through, so that unsafe factors are filtered or blocked.
It should be noted that the U shield testing method provided by the embodiment of the present disclosure may be generally executed by the server system 120. Accordingly, the U shield testing apparatus provided by the embodiment of the present disclosure can be generally disposed in the server system 120. The U-shield testing method provided by the embodiment of the present disclosure may also be performed by other server systems different from the server system 120 and capable of communicating with the terminal devices 111, 112, 113, 114, 115 and/or the server system 120. Accordingly, the U shield testing apparatus provided by the embodiment of the present disclosure may also be disposed in other server systems different from the server system 120 and capable of communicating with the terminal devices 111, 112, 113, 114, 115 and/or the server system 120.
It should be understood that the number of terminal devices and servers in fig. 1 is merely illustrative. Any number of terminal devices and servers may be provided according to implementation needs.
Fig. 2 schematically illustrates another exemplary system architecture in which a U-shield testing method may be implemented according to an embodiment of the present disclosure.
As shown in fig. 2, the exemplary system architecture mainly includes an external execution machine equipment management module 220, a U shield equipment routing connection module 230, a one-to-one U shield click management module 230, and a cloud service U shield click management module 250.
The execution machine external device management module 220 is connected to the execution machine pool 210, and sends U shield usage communication message information to the U shield device routing connection module 230 according to different business processes. Wherein the pool of execution machines 210 includes a plurality of execution machines 1-n. The U shield uses the communication message information to contain the U shield serial number, the operation instruction, the sending time, the executive machine name, the sending IP and other contents. The operation instruction comprises specific instruction information such as establishing USB interface connection, releasing the USB interface connection, initializing U shield routing configuration, resetting physical U shield connection, updating the physical U shield connection and the like.
Meanwhile, the execution machine external device management module 220 is also responsible for sending the U shield click control communication message information to the U shield click management module, and the specific form of the click control communication message information is as follows:
Figure BDA0003149730740000081
as can be seen, the U-shield click control communication message information includes information such as the NAME of the execution MACHINE, MACHINE-NAME, U-shield number UKEYID, U-shield deployment category (cloud service U-shield/non-cloud service U-shield) ISCLOUD, sending time SENDTIME, sending IP, number of clicks FREQUENCY, and click INTERVAL duration INTERVAL.
The U shield device routing connection module 230 is used to establish a physical connection path between the automation executing machine and the U shield device, and perform instruction transmission. The U shield device route connection module 230 is mainly composed of a U shield information management submodule 232, a U shield device connection submodule 233, and a U shield data switching route submodule 231. The U shield information management submodule 232 mainly manages information such as a U shield number, comparison information of a USB interface connected with a U shield device, service usage of the U shield, and the like, and provides a maintenance function; the U shield device connection submodule 233 is mainly used for managing and maintaining the mapping relationship between the USB interface and the physical U shield; the U shield data switching routing sub-module 231 is configured to receive the U shield usage communication message information sent by the external connection device management module 220 from the execution machine, establish or interrupt connection between the execution machine and the USB physical interface, and synchronously update the U shield routing configuration table with fields such as connection state, start time, end time, currently occupied execution machine name, currently occupied execution machine IP, and the like.
The one-to-one U shield click management module 240 is mainly configured to receive an operation instruction of a U shield device, which is submitted by an execution machine and has a deployment mode of "one U shield device corresponds to one clicker", and perform a click operation on an assigned U shield according to the click operation instruction. The one-to-one U shield click management module 240 mainly comprises a 1-to-1U shield click instruction processing sub-module 241, a clicker configuration information management sub-module 242, a click operation control sub-module 243 and a click operation log recording sub-module 244. The 1-to-1U shield click instruction processing submodule 241 is mainly used for receiving a non-cloud service U shield click control communication message sent by the executor external device management module 220 and analyzing and processing a message instruction; the clicker configuration information management submodule 242 is mainly used for storing the corresponding mapping relationship between the clicker and the physical U shield; the click operation control sub-module 243 is mainly used for operating the designated clicker to perform a click operation according to the click instruction. The click operation log recording sub-module 244 is mainly used for recording the click operation log of the clicker, and includes information such as an execution machine name, a U shield number, an execution machine IP, a click operation start time, a click operation frequency, a click interval duration, and the like.
Specifically, when the executing machine executes the step that the U shield click is required in the automation script, the executing machine external device management module 220 sends a non-cloud service U shield click control communication message to the 1-to-1U shield click instruction processing submodule 241, the 1-to-1U shield click instruction processing submodule 241 receives the message and then analyzes the message, finds the clicker number corresponding to the physical U shield in the clicker configuration information management submodule 242 according to the U shield number in the message, and then controls the corresponding clicker by the click operation control submodule 243 to complete the U shield click operation. And the logging sub-module 244 is clicked to complete the logging operation in the whole process.
The cloud service U shield click management module 250 is mainly used for receiving an operation instruction of a U shield with a deployment mode of "cloud centralized deployment" submitted by the execution machines 1-n, and performing click operation on the specified U shield according to the click operation instruction. The cloud service U shield click management module 250 mainly comprises a U shield device placement configuration management submodule 251, a U shield device click addressing submodule 253, a U shield device click operation control submodule 254 and a cloud service U shield click instruction processing submodule 252.
It should be noted that, in the embodiment of the present disclosure, the U shield is set in the U shield equipment placement cabinets 1-n in a massively parallel manner as a test object. The U shield equipment distribution cabinets 1-n are hardware equipment and are mainly used for distributing and fixing U shield equipment, any one of the U shield equipment distribution cabinets 1-n with different sizes can be used for placing physical U shield equipment with different quantities, different shapes, different specifications and different brands, for example, 100 USB equipment can be placed in 10 × 10-bit cabinets, 80 USB equipment can be placed in 8 × 10-bit cabinets, and the USB equipment is a target U shield to be tested. Each U-shield device placement cabinet performs horizontal and vertical coordinate definition according to the setting position of the USB device, for example, a 10 × 10-bit cabinet has 100 setting coordinates, each coordinate corresponds to one USB interface, each interface can be provided with one USB device, and if the setting coordinate is (3, 5), that is, the setting coordinate corresponds to the USB interface in row 3 and column 5, when the USB device and the USB interface are correspondingly inserted, the insertion coordinate of the USB device is determined to be (3, 5). Furthermore, at least one set of U shield equipment physical clicker 1-n can be installed on one U shield equipment placement cabinet, and the clicker 1-n supports physical click operation aiming at the specified coordinate positions of the horizontal coordinate and the vertical coordinate.
The cloud service U shield click instruction processing submodule 252 is mainly configured to receive a cloud service U shield click control communication message sent by the external execution machine equipment management module 220, and analyze and process a message instruction.
The U-shield device placement configuration management submodule 251 is mainly used for recording relevant configuration information of each U-shield, including a physical U-shield number, a physical grid number where the U-shield is located, and a horizontal and vertical coordinate position of a click inside each physical grid.
Therefore, when all the U shields to be tested are arranged and enter the U shield equipment placement cabinet, and the number of the arrangement positions of the U shield equipment placement cabinet can reach 10 × 10 or more, even 100 × 100, that is, the U shield equipment placement cabinet can be provided with 100 or more than 10000U shields to be tested, so as to form the super intelligent management cabinet for U shield testing. At this time, the U-shield device placement configuration management sub-module 251 may form a mapping relationship between the physical U-shield number, the placement cabinet number, the grid number, and the coordinates in the grid, which is specifically referred to as table 1 below.
Figure BDA0003149730740000101
Figure BDA0003149730740000111
TABLE 1
The U shield device clicker addressing submodule 253 calculates the sliding distance of the clicker according to the click position of the physical target U shield in the click instruction, and controls the clicker to slide to the established position. The U shield device clicker addressing sub-module 253 stores absolute position reference coordinate values of each physical grid on the U shield device placement cabinet, divides the inside of each physical grid by 100 according to the length and the width, divides the inside of each physical grid into horizontal and vertical coordinates of 100 x 100, and forms a sliding distance of one unit coordinate in each physical grid of the horizontal and vertical coordinates, such as (58,60) coordinates of the current clicker position at 35 grids, when a (68,79) coordinate command of the click-off position at 36 grids is received, based on the reference coordinate values of the target 36 grids, the sliding distance from the 35 grid reference coordinate to the 36 grid reference coordinate is calculated, then the sliding distance of (68.79) coordinates inside the 36 grids is calculated according to the 36 grid reference coordinate, and the sliding distance reaches the specified U shield key position, so as to achieve the purpose of controlling the clicker to slide to the set position.
The U-shield device click operation control sub-module 254 is mainly configured to operate the clicker 1-n to perform a click operation at a corresponding designated position, record a click log in the click operation log sub-module, and specifically refer to the click operation log record content in the U-shield device click operation control sub-module 254 shown in table 2 below.
Figure BDA0003149730740000112
Figure BDA0003149730740000121
TABLE 2
When the executor 1-n executes the step that the cloud service U shield click is needed in the automation script, the executor external device management module 220 sends a cloud service U shield click control communication message to the cloud service U shield click instruction processing submodule 252, the cloud service U shield click instruction processing submodule 252 receives the message and then analyzes the message, finds the position of the physical U shield needing to be clicked in the U shield device placement configuration management submodule 251 according to the U shield number in the message, calculates the sliding distance of the U shield clicker through the U shield device clicker addressing submodule 253, and then operates the clicker through the U shield device click operation control submodule 254 to complete the click operation of the U shield. And the logging sub-module 244 is clicked to complete the logging operation in the whole process.
Therefore, the test system architecture 200 according to the embodiment of the present disclosure can automatically and flexibly establish the connection between the execution machines 1-n and the U shield to be tested according to the actual service test requirements, and implement controllable key clicking on the physical U shield device, thereby avoiding generating a large amount of invalid click operation amount, and preventing waste of resources such as electric energy and meaningless device loss.
The U shield testing method, the U shield testing apparatus, the electronic device and the computer readable storage medium provided by the present disclosure are further described in detail below with reference to fig. 3 to 5 and 10.
Fig. 3 schematically shows a flowchart of a U-shield testing method according to an embodiment of the present disclosure.
As shown in fig. 3, an aspect of the present disclosure provides a U shield testing method, including:
in step S301, determining click coordinate information of the U shield according to reference coordinate information of the USB interface corresponding to the U shield;
in step S302, a clicker corresponding to the click coordinate information is called; and
in step S303, the pointing device is controlled to perform a pointing operation on the U shield according to the pointing coordinate information, so as to complete the test of the U shield.
As shown in fig. 2, any one of the U-shield equipment placement cabinets 1-n may have USB interfaces of 10 × 10, and each USB interface is disposed at a certain distance from an adjacent USB interface in the placement cabinet according to the extending direction of the horizontal and vertical axes, so that an array of USB interfaces is formed according to the grid positions divided by the horizontal and vertical axes. Therefore, each USB interface has a coordinate corresponding to the array according to the grid position where the USB interface is located, for example, for a 10 × 10 array placement cabinet, the position of the coordinate (1, 5) in row 1 and column 5 corresponds to the USB interface coordinate of the 5 th grid position, the USB interface corresponds to the position coordinate in the array of the U shield device placement cabinet where the USB interface is located, that is, the reference position coordinate, and the reference coordinate information includes mapping information such as the reference position coordinate, the serial number of the USB interface, and the serial number of the execution machine corresponding to the USB interface.
In addition, each USB interface is correspondingly used for inserting one USB device to be tested, namely a USB shield to be tested. When the plug of the U shield to be tested is inserted into the socket of one USB interface disposed in the U shield device placement cabinet, the coordinate of the USB interface corresponding to the plug of the U shield to be tested may generally be the reference position coordinate of the USB interface. However, due to differences of brands, models, specifications and the like, positions for clicking of the clicker on the U shield to be tested, such as an OK key and the like, have deviations from the reference position coordinates of the USB interface. Therefore, when the offset distance between the click position of the clicker and the plug of the U shield can be clear, the click position coordinate of the U shield can be determined according to the relationship between the offset distance and the reference position coordinate of the USB interface corresponding to the plug of the U shield. The click position coordinate is a coordinate of the click position (such as an OK key) of the U shield to be tested relative to the U shield equipment placement cabinet where the U shield is located. The click coordinate information comprises the click position coordinate, the U shield number, the U shield model, the U shield brand and other information.
Because each U shield equipment placement cabinet can be correspondingly provided with at least one clicker to be tested, the number of the clickers of each U shield equipment placement cabinet can be set according to the scale of the number of the U shield tests carried by the clicker. For example, a clicker can be correspondingly arranged in a U shield equipment placement cabinet with the specification of 10 × 10, and each U shield in the U shield equipment placement cabinet is tested and clicked by controlling one clicker; in addition, if a plurality of clickers can be correspondingly arranged on a 100 × 100 specification U shield device placement cabinet, specifically, an array of USB interfaces in the U shield device placement cabinet is partitioned to form a plurality of partitions, each partition corresponds to one clicker for control, and when the reference position coordinate or the click position coordinate of the USB interface into which the U shield to be tested is inserted is determined to be located in the partition, the clicker corresponding to the partition is controlled to be called.
The clicker can be controlled to execute a click operation on the corresponding U shield according to the click position coordinate, and click testing of the U shield is achieved.
Therefore, compared with an uncontrolled blind and controlled targeted click test scheme in the prior art, the method has the advantages that the U shield equipment is managed in a centralized and unified mode, the cloud mode automatic test click service is provided based on the cloud mode, the number of the needed U shield clicks is reduced, the resource cost is saved, the workload of equipment maintenance is reduced, and the flexible deployment requirement that one U shield equipment corresponds to one click is met.
Therefore, according to the method provided by the embodiment of the disclosure, a clicker does not need to be correspondingly arranged for each U shield, and even if the number of the U shields corresponding to the automatic test is large, accurate and efficient U shield click test operation can be realized, clicker resources are saved, and test and maintenance work is facilitated. Therefore, centralized and unified management of the U shield equipment to be tested is realized, under the control condition that the distribution cabinet of the U shield equipment is in the cloud mode, automatic U shield click service testing in the cloud mode can be realized, the testing difficulty is greatly simplified, the problem of poor testing precision caused by subjective factors of artificial management is solved, and the flexible distribution requirement that one U shield equipment corresponds to one clicker is also met.
Fig. 4 schematically shows an application scene diagram applied to the U shield testing method according to the embodiment of the present disclosure.
As shown in fig. 2 to 4, according to the embodiment of the present disclosure, before determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield in step S301, the method further includes:
parameterizing the automation script in response to the test instruction to form a parameterized script;
and executing the parameterization script and determining the U shield number of the U shield.
The automatic script is used for meeting maintainability, reliability and transportability of the automatic test of the U shield, the natural language is used as the test script of the language for compiling the test script, the test script is used as an executable file, the compiling mode accords with the natural language description habit, is equal to a test case, does not need to convert the test case and the test script, and is relatively simple and convenient to maintain the test case, so that the test process described by the case is unified with the actual test operation and the test result judgment.
When the U shield is inserted into the USB interface, an execution machine corresponding to the USB interface needs to be determined according to the U shield to be tested. Therefore, in the process of compiling the automation script, the U shield number to be tested needs to be parameterized. Then, the USB interface, the execution engine, and the corresponding U shield are physically connected through the U shield device routing connection module 230, that is, the USB interface and the U shield are physically connected.
After the physical connection among the USB interface, the execution machine, and the physical U shield is realized, the execution machine may be controlled to execute the automatic script, so as to realize the file parsing of the automatic script, obtain the U shield number to be used from the parameters of the automatic script, and obtain the USB interface logic number corresponding to the U shield number from the U shield routing configuration table corresponding to the U shield device routing connection module 230.
As shown in fig. 2 to 4, according to the embodiment of the present disclosure, before determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield in step S301, the method further includes:
responding to the execution of the parameterized script, and generating a click control communication message corresponding to the U shield according to the U shield number;
responding to the click control communication message, and determining a USB interface corresponding to the U shield;
determining a physical connection relation between the USB interface and the U shield according to the current connection state of the USB interface; and
and acquiring reference coordinate information corresponding to the USB interface according to the physical connection relation.
When the parameterized script is executed, the external equipment management module 220 connected to the execution machine pool 210 generates a click control communication message corresponding to the U-shield number according to different test service requirements, and sends the click control communication message information to the U-shield equipment routing connection module 230.
And analyzing the click control communication message and executing operation on an operation instruction in the click control communication message, so as to determine the USB interface correspondingly connected with the U shield and determine information such as the USB interface number and the current connection state of the USB interface. The click control communication message may be further configured to enable the U-shield device routing connection module 230 to physically connect the USB interface with the physical U-shield when the current connection state of the USB interface is null, that is, determine a physical connection relationship between the USB interface and the physical U-shield.
After the physical connection relationship between the USB interface and the U shield is determined, the reference position coordinate of the USB interface can be determined through the coordinate relationship of the position of the USB interface in the U shield equipment placement cabinet, and then reference coordinate information is formed. Therefore, it can be used to obtain the corresponding relationship between the U shield and the USB interface as shown in step S402.
It should be noted that, when the execution machine 1-n executes the automation script, the U shield number to be used is obtained from the parameters of the automation script, and when the step of U shield click is required in the automation script, as in step S401, the execution machine external device management module 250 sends a click instruction to the cloud service U shield click instruction processing submodule 252, where the click instruction corresponds to the click control communication message of the cloud service U shield. After receiving the message, the cloud service U shield click instruction processing sub-module first obtains the correspondence between the physical U shield and the USB interface from the U shield routing configuration table 221 in step S402, and checks whether the physical U shield is already connected to the specific USB interface.
According to the reference position coordinates of the USB interface connected to the U shield, the position of the U shield in the array coordinates of the U shield device placement cabinet can be further determined, as shown in step S403.
According to the embodiment of the present disclosure, in step S301, determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield includes:
determining the position offset information of the clicking position of the U shield relative to the USB interface;
and determining the click coordinate information of the U shield according to the position offset information of the USB interface.
According to a preset offset relationship between a click position (such as an OK key) of the U shield and a plug position of the U shield, for example, a reference position coordinate of the USB interface corresponding to the plug of the U shield and an offset distance between the plug of the U shield and the click position can be used to obtain position offset information corresponding to the click position. The positional offset information actually includes an offset distance of the click position with respect to the abscissa and the ordinate of the click position coordinate with respect to the reference position coordinate of the USB interface, and the like.
By using the determined position offset information, the click position coordinate of the U shield in the array coordinate system of the U shield device placement cabinet can be determined based on the reference position coordinate of the USB interface relative to the array of the U shield device placement cabinet. The click coordinate information may include a click position coordinate of the U-shield to be tested relative to the U-shield equipment placement cabinet, a click position name (such as the name "OK key") corresponding to the click position coordinate, and the like.
As shown in fig. 2 to 4, according to the embodiment of the present disclosure, the invoking of the clicker corresponding to the click coordinate information in step S302 includes:
determining the calling range of the clicker according to the click coordinate information;
and calling the clicker meeting the calling range of the clicker.
When a clicker is correspondingly arranged on a U-shield equipment placement cabinet, the placement cabinet number of the U-shield equipment placement cabinet where the corresponding click position coordinate is located can be determined according to the click coordinate information of the U-shield, and the placement cabinet number determines the clicker. Wherein, the clicker calling range comprises the number of the distribution cabinet.
In addition, when a plurality of clickers are simultaneously arranged on one U shield device placement cabinet, the array of the USB interface in the U shield device placement cabinet may be partitioned to form a plurality of partitions, each partition corresponds to one clicker control, and when the click position coordinate of the U shield to be tested inserted into the U shield device placement cabinet is located in a corresponding partition of the U shield device placement cabinet, the partition may serve as the clicker retrieval range, and the clicker of the corresponding partition satisfying the clicker retrieval range is retrieved as the clicker corresponding to the click position coordinate for performing the click operation on the click position coordinate.
As shown in fig. 2 to 4, according to the embodiment of the present disclosure, in invoking a clicker satisfying a clicker invocation range, the method further includes:
judging the current running state of the clicker;
and calling the clicker according to the current running state.
After determining the clicker, the execution machine is required to determine the current operating state of the clicker to ensure whether there is an unfinished clicking operation in the current state of the clicker, as in step S404.
And if the current running state of the clicker is idle, determining that the clicker can be used for executing the clicking operation of the U shield, and executing invoking control on the clicker. If the current running state of the clicker is busy, it indicates that the clicker is performing click operations of other U shields, and it is impossible to perform invoking control on the clicker, and it is necessary to further wait for the current busy state of the clicker to end, or invoke other clickers in idle states to perform click operations.
According to the embodiment of the present disclosure, in step S303, the clicker is controlled to execute a click operation on the U shield according to the click coordinate information, including:
controlling the clicker to move according to a track formed by the click coordinate information, so that the clicker corresponds to the click position of the U shield;
and controlling the clicker to execute a clicking operation on the clicking position.
According to the embodiment of the disclosure, in controlling the clicker to execute the click operation on the click position, the method includes:
and executing the click operation of a fixed number of times on the click position of the U shield based on a fixed period.
When the current operating state of the clicker is determined to be idle, then call control may be performed on the clicker. Specifically, an execution operation track may be generated according to an initial position coordinate of the click execution end of the clicker relative to an array coordinate system of the U shield device placement cabinet and the click position coordinate corresponding to the click position of the determined U shield to be tested, and the click execution end of the clicker is controlled to move to the click position along the operation track, so that the click execution end corresponds to the click position.
Further, the click operation is performed on the click position of the U shield according to preset simulated click data, where the simulated click data includes preset rule information that the clicker can perform the click operation, such as click time, click times, click cycle, and time to end the click, so as to determine that when the data is executed by the clicker, the click operation with the preset rule can be performed on the U shield to be tested, such as performing the click operation with the fixed times on the click position of the U shield based on the fixed cycle. Therefore, the click test can be efficiently and accurately completed for the test of the U shield, so that the whole click test operation is completed, as shown in step S406.
In the process of the pointing device performing the pointing operation on the pointing position of the U-shield, the pointing operation of the pointing device needs to be determined, that is, the pointing position, the pointing strength, the pointing times, the pointing time, the pointing period, and the like of the pointing operation are determined, as in step S405. When the abnormal values of the data appear, the continuous clicking operation needs to be stopped.
As shown in fig. 2-4, according to an embodiment of the present disclosure, the method further comprises:
recording the click operation of the corresponding U shield to form a click operation log;
and storing a click operation log.
For the method of the embodiment of the present disclosure, in the process of implementing each click operation, data related to each control progress needs to be recorded, each record may be used to form a click operation log, and when the click operation log is stored in a centralized manner, the record content of the click operation log in the U shield device click operation control submodule 254 shown in table 2 may be formed.
Specifically, in step S407, when it is determined that the clicker has an unfinished click command and cannot click, the error information may be recorded in the click operation log table. Similarly, when the clicker does not have the unfinished clicking operation currently, the clicker is controlled to finish the clicking operation on the U shield, and the clicking operation log is recorded in the clicking operation log table. In step S408, when it is determined that the data of the click operation occurs an abnormal value in the process of the click operation of the U shield by the clicker, it is determined that the click operation is abnormal, and the abnormal information of the click operation is recorded in the click operation log table, as in step S408.
In step S409, the click operation log recording sub-module 244 may store the log data generated during the implementation of the click operation control.
Therefore, according to the U-shield testing method of the embodiment of the present disclosure, compared to the situation that an uncontrolled blind click scheme in the prior art would cause huge invalid click operation amount, resource waste, equipment loss, and even damage to U-shield keys, and a controlled targeted click scheme would cause large management difficulty and large manpower consumption, the following technical effects can be achieved:
(1) the mass automatic, intelligent and accurate test of large-scale U shields can be realized, the accurate and efficient automatic test of a large number of U shields can be realized, and compared with a traditional one-to-one mode that the U shields correspond to the clicker, the resource quantity of the U shield clicker is greatly saved.
(2) The large-quantity U shields to be tested of multiple different brands and models can be simultaneously and compatibly supported in the same U shield equipment placement cabinet, the compatibility is stronger, intelligent identification can be realized, and the test efficiency of different types of U shields is improved.
(3) The U shield equipment placement cabinet can realize centralized and unified management on large-scale U shields to be tested, and the automatic U shield click testing service in a cloud mode is provided by multiplexing the mode of the same set of clicker by the U shield equipment in the same U shield equipment cabinet, so that the cost is greatly saved, and the workload of U shield equipment maintenance is reduced.
Fig. 5 schematically shows a block diagram of a U shield testing apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, another aspect of the present disclosure provides a U shield testing apparatus 500, which includes a coordinate determination module 510, a clicker retrieving module 520, and an operation control module 530. The coordinate determination module 510 is configured to determine, according to reference coordinate information of a USB interface corresponding to a U shield, click coordinate information of the U shield; the clicker calling module 520 is configured to call a clicker corresponding to the click coordinate information; and the operation control module 530 is configured to control the clicker to perform a click operation on the U shield according to the click coordinate information, so as to complete the test of the U shield.
It should be noted that the embodiment of the U shield testing apparatus 500 shown in fig. 5 is similar to the embodiment of the U shield testing method, and the achieved technical effects are also similar, which are not repeated herein.
< example 2>
With the accelerated development rhythm of the system application version, the automatic verification of the business application system becomes a preferred scheme in the testing process. The business transaction which needs the local device to insert the U shield as the security medium is generally a high-risk key transaction and is also the content which needs key verification in the version test at each stage.
In the traditional automatic testing process, due to the limitation of hardware safety medium operation (plugging and unplugging and physical key clicking), more manual operation links are required to be added to normally complete the operation process of one transaction, so that the automation of the transaction always needs manual intervention to be linked, the automation cost is higher, and the automatic testing can not be efficiently realized. However, the U shield used for various business transactions is increasingly frequent, and the U shield is an important proof of the identity of a client, and is very important in the process of performing system transaction operation, especially for the transactions of public enterprises.
The existing automatic test scene related to the U shield mainly faces two problems: (1) and clicking physical keys on the U shield equipment. In the conventional solution, the physical peripheral scheme is used, and in the whole transaction process, the operation mode of repeatedly and uninterruptedly clicking the physical button on the U shield is performed by the external device to realize the operation of the physical button of the U shield. (2) And performing switching operation on the current U shield in use. However, in the current practical work, the operation can be realized only by manually plugging and unplugging the switching U-shield, or by developing a U-shield routing connection module.
There are generally two U shield button clicking modes: one is uncontrolled blind click mode and the other is controlled targeted click scheme.
On the one hand, in the uncontrolled blind click mode, a physical peripheral (e.g., a clicker) is used to continuously click a physical button on the U-shield. Because the clicking of the physical button is not targeted, even if no or only a few U shields need to be clicked in a certain time period, all the U shield devices need to be in a clicked state, a huge invalid clicking operation amount is generated, so that waste of resources such as electric energy and meaningless device loss are caused, especially, more U shield keys are damaged due to multiple times of clicking, and test resources are greatly wasted.
On the other hand, in the controlled targeted click mode, an operation scheme that each U shield device corresponds to one clicker is usually adopted, with the expansion of the test scale, the number of test U shield devices to be prepared gradually increases, and when the number of U shield devices reaches a certain scale, the mode that each U shield is provided with one clicker generates certain difficulty in deployment and management of the clicker, and meanwhile, since not all U shields need to be clicked at the same time, more resources of the U shield clicker devices are wasted.
In order to solve the technical problems of the two modes, a mode of U shield click management based on cloud service can be considered.
However, no matter which mode of the U shield equipment automatic click test scheme is used, when the used test U shield equipment fails or is damaged, manual intervention is needed, the failed U shield equipment is manually removed, then the data filling platform is used for filling the new U shield equipment with data consistent with the failed U shield, the new U shield equipment is connected into the U shield equipment connection module, the configurations of the U shield equipment connection information, the U shield equipment routing information, the U shield equipment click information and the like are manually updated, and meanwhile, the U shield physical number information used by the corresponding automatic test script needs to be synchronously updated, so that a replacement process for the failed U shield can be completed.
However, in the automatic test process, the time points of occurrence of the faults of the U shield are random, after the faults occur, manual intervention is needed, a series of preparation work is carried out, and then the test can be recovered, so that a long recovery period is needed; meanwhile, in the automatic test service mode of 7 × 24 hours, when a fault occurs in the non-manual working time, the corresponding automatic test script cannot be executed or fails to be executed, and the test can be continuously used after the manual preparation is performed until the working time (such as after work) of a tester; moreover, after the new U shield is replaced, the physical number of the U shield used in the original automated testing script needs to be modified synchronously to recover the testing program, which results in the reduction of the efficiency of the whole automated testing.
In order to solve at least one of the above technical problems in the prior art in the process of automatic testing of the U shield, the present disclosure provides a U shield testing method, apparatus, electronic device and computer-readable storage medium.
It should be noted that the U shield testing method and apparatus provided by the present disclosure may be applied to the technical field of information security, the technical field of big data, the technical field of finance, and any technical field other than the above technical fields.
Fig. 6 schematically shows another exemplary system architecture to which the U shield test method can be applied according to another embodiment of the present disclosure.
As shown in fig. 6, the exemplary system architecture 600 mainly includes an external execution machine device management module 620, a U shield device routing connection module 630, a one-to-one U shield click management module 640, a cloud service U shield click management module 650, a standby U shield monitoring management module 660, and the like, where the standby U shield monitoring management module 660 includes a standby U shield switching information management module 661, a standby U shield device information management module 663, a standby U shield data injection management module 662, a standby U shield switching management module 665, a standby U shield data switching log recording module 664, and the like.
The execution machine external device management module 620 is connected to the execution machine pool 610, and can query whether the U shield is switched over or not from the standby U shield switching information management module 661 according to the U shield number in the communication message used by the U shield of the U shield to be tested. If the U shield is automatically switched, inquiring the U shield physical number of the switched U shield with equivalent data value after the data switching is finished, and obtaining the physical U shield number of the spare U shield; and if the U shield is not automatically switched, directly using the U shield as a test USB device, and recording the U shield physical number of the U shield. Then, the execution machine external device management module 620 sends the U shield usage communication message information to the U shield device routing connection module 630 according to different business processes. Wherein the pool of execution machines 610 includes a plurality of execution machines 1-n. 1. The U-shield usage communication message information contains U-shield number, operation instruction, sending time, execution machine name, sending IP and other contents. The operation instruction comprises the steps of establishing USB interface connection, releasing the USB interface connection, initializing U shield routing configuration, resetting physical U shield connection, updating the physical U shield connection and the like.
Meanwhile, the execution machine external device management module 620 is also responsible for sending the U shield click control communication message information to the U shield click management module. The U-shield click control communication message information includes information such as an execution engine name, a U-shield number, a U-shield deployment category (cloud service U-shield/non-cloud service U-shield), sending time, sending IP, click times, and click interval duration.
The U shield device routing connection module 630 is used to establish a physical connection path between the automation execution machines 1-n and the U shield device to be tested, and perform instruction transmission. The U-shield device routing connection module 630 is mainly composed of a U-shield information management submodule 632, a U-shield device connection submodule 633 and a U-shield data switching routing submodule 631. The U shield information management submodule 632 is mainly used for managing information such as a U shield number, comparison information of a USB interface connected to a U shield device, service usage of the U shield, and the like, and providing a corresponding maintenance function; the U shield equipment connection sub-module 633 is used for managing and maintaining the mapping relation between the USB interface and the physical U shield; the U shield data switching routing sub-module 631 is configured to receive the U shield usage communication message information sent from the external connection device management module 620, establish or interrupt the connection between the execution machines 1-n and the USB physical interface, and synchronously update fields such as the connection status, the start time, the end time, the name of the currently occupied execution machine, and the IP of the currently occupied execution machine to the U shield routing configuration table.
The one-to-one U shield click management module 640 is mainly used for receiving an operation instruction of a U shield device, which is submitted by the execution machines 1-n and has a deployment mode of "one U shield device corresponds to one clicker", and performing a click operation on an assigned U shield according to the click operation instruction.
When the executor 1-n executes the step that the U shield click is needed in the automation script, the executor external device management module 620 sends a non-cloud service U shield click control communication message to the 1-to-1U shield click instruction processing submodule 641, the 1-to-1U shield click instruction processing submodule 641 receives the message and then analyzes the message, finds the clicker number corresponding to the physical U shield in the clicker configuration information management submodule 642 according to the U shield number in the message, and then controls the corresponding clicker by the click operation control submodule 643 to complete the U shield click operation. Finally, the clicking operation logging submodule 644 completes the logging operation in the whole process.
The cloud service U shield click management module 650 is mainly used for receiving an operation instruction of the U shield in a 'cloud centralized deployment' deployment mode submitted by the execution machines 1-n, performing click operation on the specified U shield according to the click operation instruction, and recording a U shield click operation log. The U-shield click management module 650 may mainly include a U-shield device placement configuration management sub-module 651, a U-shield device click addressing sub-module 653, a U-shield device click operation control sub-module 654, and a cloud service U-shield click instruction processing sub-module 652.
It should be noted that, in the embodiment of the present disclosure, the U shield is set in the U shield equipment placement cabinets 1-n in a massively parallel manner as a test object. The U shield equipment placement cabinets 1-n are hardware equipment and are mainly used for placing and fixing U shield equipment, and physical U shield equipment with different quantities, different shapes, different specifications and different brands can be placed in any one of the U shield equipment placement cabinets 1-n with different sizes. Each U-shield device placement cabinet can define an array coordinate system of physical U-shield devices in the placement cabinet according to the horizontal and vertical directions.
When the executing machine 1-n executes the step of needing to click the cloud service U shield in the automation script, the executing machine external device management module 620 sends a cloud service U shield click control communication message to the cloud service U shield click instruction processing submodule 652, the cloud service U shield click instruction processing submodule 652 receives the message and then analyzes the message, the position of the physical U shield needing to be clicked in the U shield device placement configuration management submodule 651 is found out in the U shield device placement configuration management submodule 651 according to the number of the U shield in the message, the U shield device clicker addressing submodule 653 calculates the sliding distance of the U shield clicker, the U shield device click operation control submodule 654 operates the clicker to complete the click operation of the U shield, and finally the click operation log recording submodule 654 completes the log recording operation in the whole process.
The backup U shield switching information management module 660 is mainly configured to register a mapping relationship of U shield numbers of the current backup U shield switching, where the mapping relationship is mainly formed by fields such as an original U shield physical number, a current failure U shield physical number, a new U shield physical number, and whether the mapping relationship is valid, and the following table 3 may be referred to specifically.
Figure BDA0003149730740000231
TABLE 3
As shown in table 1, the original U-shield physical number is used to store the original U-shield physical number for the first switching, and corresponds to the physical U-shield number used in the automation script; the current fault U shield physical number is mainly used for storing the fault U shield number; the new U shield physical number is mainly used for storing the switched new U shield number; whether valid is mainly used to identify whether the handover information is valid. Wherein, only when only one record of 'whether the field value is valid' is in the records of the same original U shield physical number, the switching information is judged to be valid.
The spare U shield device information management module 663 is configured to store spare blank U shield related information, which includes field information such as a physical number of the U shield, a U shield brand, a use status (used or unused), an available status (available or unavailable), and a change time, as shown in table 4 below.
Figure BDA0003149730740000241
TABLE 4
The standby U shield switching management module 665 is mainly used to monitor usage and click conditions of U shields, when it is monitored that a certain U shield device finds a fault, trigger a switching process, call the standby U shield device information management module 663, obtain a list of currently available idle U shield devices, select 1 standby U shield according to a policy with the same brand priority, and set identification information (such as available state or unavailable state) of the selected standby U shield as used; next, the standby U shield data injection management module 662 is called to inject the new U shield data into the test data equivalent to the old U shield. After the data is successfully filled, a U shield switching mapping relationship is added to the standby U shield switching information management module 661, and the U shield data switching routing submodule 631 in the U shield device routing connection module 630 is updated, and the U shield information management submodule 632 in the U shield device routing connection module 630 is updated, so that service information such as the U shield ID certificate number, the U shield type, and the U shield usage of the new U shield device is supplemented, and the routing information and connection information of the old U shield device are deleted.
The standby U shield data injection management module 662 is mainly used for updating and injecting data in the new U shield device, and mainly includes information such as a customer number, a customer account number, an authorization mode, a service type, and the like. When data filling and updating of the U shield equipment are carried out, firstly, a client number and a client account number in an original fault U shield are obtained, a corresponding certificate ID is searched according to the client number and the client account number, then, the binding relationship between the certificate ID and the original fault U shield is frozen and cancelled, and after the binding relationship is cancelled successfully, the certificate ID and new U shield equipment are bound and the binding relationship between the certificate ID and the new U shield equipment is activated.
The standby U shield data switching log recording module 664 is mainly configured to record a standby U shield switching operation log, which includes information such as an execution machine name, an execution machine IP, an original U shield number, a standby U shield number, switching time, and a switching log, and may specifically refer to table 5 below.
Figure BDA0003149730740000251
TABLE 5
Therefore, based on the system architecture 600 shown in fig. 6, the standby U shield switching management module 665 monitors the use and click condition of the U shield, and if it is detected that a certain U shield device fails, triggers a switching process, searches for an available idle U shield device in the standby U shield device information management module 663, cancels the binding relationship between the original failed U shield and the certificate ID by the standby U shield data injection management module 662, and binds and activates the binding relationship between the new U shield device and the certificate. Meanwhile, a mapping relation between the serial numbers of the failed U shield and the U shield switched by the standby U shield switching information management module 661 is newly added, and the service data of the U shield in the U shield information management submodule 632 in the U shield device routing connection module 630 is synchronously updated. The standby U shield data switching logging module 664 completes the logging operation in the whole process.
Therefore, the system architecture of the embodiment of the disclosure can realize intelligent automatic data replacement and test recovery, realize intelligent automatic equivalent replacement of the failed U shield equipment, and the whole process does not need manual intervention, thereby avoiding the failure recovery period caused by manual intervention replacement recovery when a single U shield fails in the existing mode, reducing the maintenance workload of automatic test script modification, and improving the automatic test efficiency.
The U shield testing method, the U shield testing apparatus, the electronic device and the computer readable storage medium provided by the present disclosure are further described in detail below with reference to fig. 6 to 9 and 10.
Fig. 7 schematically shows a flowchart of a U shield testing method according to another embodiment of the present disclosure.
As shown in fig. 7, an aspect of the present disclosure provides a U shield testing method, which includes steps S701 to S703.
In step S701, a spare U shield corresponding to the failed U shield is matched;
in step S702, the original data of the failed U shield is poured into the spare U shield; and
in step S703, the control clicker performs a click operation on the standby U shield to complete the test of the standby U shield.
The fault U shield is an abnormal U shield which has a test behavior abnormity (such as physical faults like key damage and logic faults like unstable connection or errors) so as to cause that the U shield test cannot be continuously and effectively carried out. The spare U shield is an idle U shield which can realize equivalent replacement of internal data of the failed U shield so as to replace the failed U shield to continue the U shield testing process. Therefore, after the failed U shield is confirmed, the spare U shield can be matched with the failed U shield, the matching process involves determining the basic test contents such as the position, the model and the compatibility of the spare U shield, and when the basic characteristics of the spare U shield are confirmed to be the same as or similar to the failed U shield, the spare U shield can be confirmed to be used for replacing the failed U shield to perform the test operation. At this time, the failed U shield may be the original U shield, as shown in table 5 above.
The original data of the fault U shield is data related to the aspects of service requirements, test requirements, operation and maintenance support and the like based on an internal logic architecture of the original U shield. When it is determined that the backup U shield can be used to replace the failed U shield, the data in the failed U shield needs to be migrated as a whole to be copied or moved into the backup U shield, so that the backup U shield can be used to perform corresponding test operations in place of the failed U shield. Data flooding may be a migration action performed on raw data based on a manner like data copying, moving, or downloading. Specifically, in the testing process, data in the original U shield may be backed up to a data platform in real time or periodically, then the original data is queried and confirmed from the data platform according to the U shield number of the original U shield, and when the original U shield confirms that the U shield is a failed U shield, the original data is filled (e.g., downloaded) into the spare U shield, thereby completing the data filling process.
Further, a click operation is performed on the standby U shield through the clicker, so that the test operation of the standby U shield is completed. The clicker is an execution mechanism for U shield test operation, and can execute click operation with fixed times and fixed frequency on the spare U shield when being controlled by an instruction, so that the click test on the spare U shield is completed.
According to the method, the problem that in the prior art, due to the fact that the used U shield equipment is failed or damaged, before manual intervention replacement recovery, the execution task of the automatic test script is suspended or the execution fails is solved, the intelligent and automatic replacement recovery of the fault U shield is achieved, equivalent replacement of the spare U shield on the fault U shield equipment is achieved, manual intervention is not needed in the whole process, the fault recovery period caused by the fact that manual intervention replacement recovery is needed when a single U shield is in fault in the existing mode is avoided, the maintenance workload of modification of the automatic test script is reduced, and the automatic test efficiency is improved.
Therefore, compared with the condition that the test efficiency is low due to the fact that only manual replacement can be carried out on the fault or abnormal U shield equipment in the prior art, the fault or abnormal U shield equipment can be automatically detected, equivalent replacement between the fault U shield and the spare U shield can be automatically carried out, the spare replacement process of the fault U shield with high automation, intelligence and precision is achieved, the workload of U shield test maintenance is greatly reduced, and the automatic test efficiency is further improved.
Fig. 8 schematically shows an application scene diagram applied to the U shield testing method according to another embodiment of the present disclosure.
As shown in fig. 6 to 8, according to an embodiment of the present disclosure, before matching a spare U shield corresponding to a failed U shield in step S701, the method includes:
responding to the first test instruction, and parameterizing the automation script to form a parameterized script;
and executing the parameterized script to detect the fault U shield.
The automatic script is used for meeting maintainability, reliability and transportability of the automatic test of the U shield, the natural language is used as the test script of the language for compiling the test script, the test script is used as an executable file, the compiling mode accords with the natural language description habit, is equal to a test case, does not need to convert the test case and the test script, and is relatively simple and convenient to maintain the test case, so that the test process described by the case is unified with the actual test operation and the test result judgment.
Before performing an equivalent replacement process on the failed U shield, the failed U shield needs to be detected and confirmed first. The first test instruction is instruction data sent by an operation and maintenance person or a tester to the system architecture 600 through a terminal device for executing a test on the original U shield. After receiving the instruction data, firstly, the automatic script needs to be compiled, and the U shield number of the original U shield to be tested is parameterized to form a parameterized script.
And then, after confirming the physical connection state among the USB interface, the execution machine and the original U shield, executing the automatic script through the execution machine to realize the file analysis of the automatic script, acquiring the basic information content of the original U shield such as the U shield number required to be used from the parameters of the automatic script, and detecting the original U shield to determine whether the original U shield is a fault U shield.
In the execution process of the automatic script, whether the original U shield is a U shield that has undergone switching can be determined by acquiring the basic information content of the original U shield. If the original U shield is automatically switched over, the U shield number of the U shield with the data completing preparation and the data value equivalent can be inquired, and the physical U shield number of the standby U shield can be obtained. If the automatic switching of the U shield does not occur, the original U shield number is directly used.
Further, the U shield use application may be sent by the external device management module 620 of the execution machine, so as to establish a connection between the execution machine and the corresponding U shield.
As shown in fig. 6-8, in executing the parameterized script to detect the malfunctioning usb shield, according to an embodiment of the present disclosure, the method further includes:
responding to the execution of the parameterized script, and sending a use request to the current U shield;
and establishing a control connection between the current U shield and the execution machine according to the use request.
In the above parameterized script execution process, a use request may be sent to the current U shield according to the script execution, where the use request is a request instruction, and is applied in a test operation process, so that the execution machine may implement logic control on the current U shield.
And according to the use request, a logical connection relation between the current U shield and the corresponding execution machine can be established, so that the execution machine can transmit and forward the control instruction to the current U shield according to the logical connection relation, and the test operation of the current U shield is realized.
As shown in fig. 6-8, in executing a parameterized script and detecting a failed U shield according to an embodiment of the present disclosure, the method includes:
detecting a test log record of the current U shield;
and determining the current U shield as a fault U shield according to the test log record and a preset fault analysis rule.
In the process of executing the automation script, the standby U-shield switching management module 665 monitors the use and click condition of the current U-shield, and checks whether the U-shield use and click abnormal condition exists.
Specifically, as the use of each U shield and the process of testing the click form log data, the log data are collected to a data platform (such as a memory or a server like a cloud database or a storage server) to form a test log record, and the log data are used for reflecting the real-time state and the historical state of the current U shield. Therefore, when the standby U shield switching management module 665 can query the data platform, the test log record of the current U shield can be correspondingly obtained, and a specific query manner may be a periodic query process.
The preset fault analysis rule is a judgment rule for judging whether the test behavior of the U shield is abnormal or not according to experience and log data analysis of the U shield, and particularly relates to a corresponding relation between behaviors and faults, such as a physical fault of key damage and the like, a logic fault of unstable interface connection or error and the like, and a relation between whether the U shield test behavior can be continuously and effectively carried out or not. For example, when it is determined that one piece of log data of the U shield is abnormal data and belongs to a physical fault, and it is determined by a preset fault analysis rule that the current U shield cannot continue to effectively perform a U shield test behavior, the current U shield is a faulty U shield, in step S801.
If the abnormal condition of the current U shield equipment is not monitored, the inquiry monitoring process is continued.
As shown in fig. 6 to 8, according to the embodiment of the present disclosure, the matching of the spare U shield corresponding to the failed U shield in step S701 includes:
responding to the detection of the fault U shield, and inquiring an idle U shield in the U shield array;
and matching the idle U shield corresponding to the fault U shield into a spare U shield according to a preset position matching rule.
As described in the foregoing embodiments, in the embodiments of the present disclosure, the U shield is set in the U shield equipment placement cabinets 1-n in a massively parallel manner as a test object. The U shield equipment distribution cabinets 1-n are hardware equipment and are mainly used for distributing and fixing U shield equipment, any one of the U shield equipment distribution cabinets 1-n with different sizes can be used for placing physical U shield equipment with different quantities, different shapes, different specifications and different brands, for example, 100 USB equipment can be placed in 10 × 10-bit cabinets, 80 USB equipment can be placed in 8 × 10-bit cabinets, and the USB equipment is a target U shield to be tested. Each U-shield device placement cabinet performs horizontal and vertical coordinate definition according to the setting position of the USB device, for example, a 10 × 10-bit cabinet has 100 setting coordinates, each coordinate corresponds to one USB interface, each interface can be provided with one USB device, and if the setting coordinate is (3, 5), that is, the setting coordinate corresponds to the USB interface in row 3 and column 5, when the USB device and the USB interface are correspondingly inserted, the insertion coordinate of the USB device is determined to be (3, 5). Furthermore, at least one set of U shield equipment physical clicker 1-n can be installed on one U shield equipment placement cabinet, and the clicker 1-n supports physical click operation aiming at the specified coordinate positions of the horizontal coordinate and the vertical coordinate.
Therefore, when all the U shields to be tested are arranged and enter the U shield equipment placement cabinet, and the number of the arrangement positions of the U shield equipment placement cabinet can reach 10 × 10 or more, even 100 × 100, that is, the U shield equipment placement cabinet can be provided with 100 or more than 10000U shields to be tested, so as to form the super intelligent management cabinet for U shield testing.
For each U shield equipment placement cabinet, the U shield to be tested and the spare U shield can be simultaneously prevented, specifically, the setting partitions of the test U shield and the spare U shield can be defined in the U shield equipment placement cabinet according to coordinate distribution, the spare area is used for placing the spare U shield to form a spare array, and the test area is used for placing the test U shield to form a test array. For example, for the same U shield equipment placement cabinet with 10 × 10 arrays, 90 test U shields can be set in the test partition, and 10 spare U shields can be set in the spare partition at the same time. Therefore, the area ratio of the spare partition in the array area of the distribution cabinet is smaller than that of the test partition.
Therefore, after a failed U shield is determined, only one spare U shield in the spare partition of the U shield array of the U shield equipment placement cabinet needs to be determined as the spare U shield. And any one of the original plurality of spare U shields in the spare partition may already be in a replacement state or have completed replacement as a test U shield at the current time, and therefore, query analysis needs to be performed on each original spare U shield in the spare partition to determine whether the original spare U shield is an idle U shield. Specifically, the log data corresponding to the U shield in the data platform may be queried according to the U shield number of the corresponding U shield, and whether the U shield is an idle U shield is queried and obtained according to the log data.
For a plurality of idle U shields in the standby partition, when only one idle U shield is needed as the standby U shield, the idle U shield needs to be matched according to a preset position matching rule. The preset position matching rule can be used for reflecting the distance between each idle U shield and each test U shield or fault U shield in the test partition and the corresponding relation between the distance and whether the idle U shield is matched as a spare U shield. For example, when the distance between the array coordinate of the storage cabinet where a failed U shield is located and the array coordinate of each idle U shield in the spare partition is determined, the idle U shield corresponding to the smallest distance value is determined as a condition for matching the idle U shield with the spare U shield, and the reflected matching rule is the preset position matching rule.
Therefore, if it is monitored that a current U shield device fails, a switching process corresponding to the failed U shield is triggered to check whether the spare U shield device information management module 663 can provide available spare U shield devices in the spare partition, and an available spare U shield is selected as a spare U shield according to the preset position matching rule, in step S802.
Therefore, full-automatic and intelligent selection of the standby U shield can be realized, manual subjective judgment and selection are completely replaced, and the efficiency is higher.
As shown in fig. 6 to 8, according to an embodiment of the present disclosure, in matching an idle U shield corresponding to a failed U shield according to a preset location matching rule as a spare U shield, the method includes:
determining a first array position of a fault U shield;
and matching the spare U shield with the idle U shield according to the matching rule of the first array position and the preset position.
As mentioned above, the first array position of the failed U shield can be determined by the USB interface having a physical connection relationship with the failed U shield and the coordinate position in the U shield array of the U shield device placement cabinet where the USB interface is located, that is, the first array position and the array coordinate position of the USB interface can be the same.
According to the coordinate position in the spare partition where each idle U shield is located, determining the distance between the first array position of the failed U shield and the array position of each idle U shield, and according to the distance and the preset position matching rule, determining the idle U shield with the smallest distance value as a matching object of the spare U shield of the failed U shield, in step S802.
If the U shield device information management module 663 cannot provide available idle U shield devices, a message "no available idle U shield is currently available and U shield switching cannot be performed" is returned, and error information is recorded to the standby U shield data switching log recording module 664, in step S803.
Therefore, the standby U shield can be intelligently and accurately matched, the shortest distance between the standby U shield and the fault U shield is ensured, the standby U shield and the fault U shield are more reasonably distributed in the distribution cabinet array, and management and operation and maintenance are facilitated.
As shown in fig. 6 to 8, according to the embodiment of the present disclosure, the step S702 of filling the original data of the failed U shield into the spare U shield includes:
determining a standby binding relationship between the identity information of the standby U shield and the identity information of the fault U shield;
and executing the filling operation of the original data to the standby U shield according to the standby binding relationship.
If the spare U shield is determined, an identity relationship, i.e., a spare binding relationship, may be established between the spare U shield and the identity information of the failed U shield. After the backup binding relationship is bound and activated, the current data and the historical data of the original failed U shield can be all downloaded from the data platform to the backup U shield through the backup binding relationship, so as to complete the flooding process of the original data, as in step S804. The original data includes current data and historical data of the fault U shield, and specifically relates to data related to aspects of service requirements, test requirements, operation and maintenance support and the like based on an internal logic architecture of the original U shield.
Therefore, data filling of the standby U shield can be achieved, the data of the standby U shield and the original data of the replaced fault U shield are kept consistent, the automation and the higher intelligent degree of the switching process of the whole U shield are ensured, and data are not missed. Therefore, the efficiency of the data injection process of the whole U shield test process is better.
As shown in fig. 6 to 8, in determining the backup binding relationship between the identity information of the backup U shield and the identity information of the failed U shield according to the embodiment of the present disclosure, the method includes:
inquiring identity information of a fault U shield;
canceling the original binding relationship between the fault U shield and the identity information; and
and activating a standby binding relationship between the standby U shield and the identity information.
When a data filling operation is performed through the standby U shield data filling management module 662, first, a customer number and a customer account number corresponding to basic information of a failed U shield in a data platform are determined according to the basic information, such as a U shield number of the failed U shield, where each U shield number may correspond to one customer number, and each customer number may have multiple customer account numbers. Then, identity information corresponding to the fault U shield, such as certificate IDs, is searched according to the client number and the client account, and each certificate ID uniquely determines one U shield.
And freezing the original binding relationship between the fault U shield and the identity information and canceling the binding according to the identity information obtained by the query, and storing log data generated in the process so as to facilitate the later tracing. In addition, aiming at the identity information of which the original binding relationship is cancelled, a mapping relationship between the identity information and the standby U shield is established, and the mapping relationship is activated to realize the standby binding relationship between the identity information and the standby U shield, so that the identity information and the standby U shield have the standby binding relationship in an activated state. The data transmission operation between the data platform and the standby U shield can be realized through the standby binding relationship, so that the original data which are stored in the data platform and are related to the fault U shield are directly injected into the standby U shield.
Therefore, the original data in the original fault U shield can be accurately and efficiently transmitted to the standby U shield, the situations of data leakage or omission and the like are prevented, the whole process is completely automated, and the efficiency is extremely high.
It should be noted that, as shown in steps S803-S804, if there is an available spare U shield device in the U shield device information management module 663, the spare U shield data injection management module 662 cancels the original binding relationship between the original failed U shield and the identity information, binds the new spare U shield device and the identity information, and activates the spare binding relationship, that is, the switching process of the spare U shield is realized, as in step S805. If an abnormality occurs in the process of filling the data into the standby U shield, a message "U shield data filling fails, and U shield switching cannot be performed" is returned, and an error message is recorded to the standby U shield data switching log recording module 664, in step S806.
As shown in fig. 6 to 8, before the step S703 of controlling the clicker to perform a clicking operation on the standby U shield, the method further includes:
increasing a switching mapping relation between the identity information of the corresponding standby U shield and the identity information of the fault U shield;
and updating the service information of the standby U shield according to the switching mapping relation.
After the activation operation of the backup binding relationship between the identity information of the backup U shield and the original fault U shield is completed, it is indicated that the switching between the backup U shield and the fault U shield is completed. At this time, the mapping relationship of the identity information of the failed U-shield may be updated in the data platform, that is, the mapping relationship between the identity information and the original failed U-shield is switched to the mapping relationship between the original failed U-shield and the standby U-shield, that is, the mapping relationship is switched. And establishing a data relationship between the standby U shield and the client corresponding to the identity information through the switching mapping relationship.
Through the data relationship determined by the switching mapping relationship, the data platform can update the information related to the service requirement of the standby U shield when a client performs service related operation or operation and maintenance personnel and testers perform service related operation.
Therefore, the relation between the standby U shield and the service requirement information of the client corresponding to the original fault U shield can be realized, and the seamless connection of the standby U shield to the fault U shield in data updating is realized.
As shown in fig. 6 to 8, according to the embodiment of the present disclosure, in the step S703 of controlling the clicker to perform a click operation on the standby U shield, the method further includes:
responding to the second test instruction, and determining a standby U shield corresponding to the fault U shield according to the switching mapping relation;
and the control clicker executes click operation for a fixed number of times on the standby U shield based on a fixed period so as to execute service test aiming at the service information.
The second test instruction is instruction data that is sent by an operation and maintenance person or a tester through the terminal device to the system architecture 600 for executing a test on the standby U shield. After receiving the instruction data, firstly, the parameter update of the automation script needs to be performed, and the U shield number of the standby U shield to be tested is parameterized, so that the system architecture 600 can confirm the standby U shield based on the identity information related to the U shield number according to the switching mapping relationship.
And controlling a clicker corresponding to the placement cabinet of the U shield equipment where the standby U shield is located, and executing a test operation on the standby U shield, specifically, executing a fixed number of click operations on the standby U shield by the clicker based on a fixed period, so as to complete a service test for specific service information.
Therefore, according to the U-shield testing method of the embodiment of the present disclosure, compared to the situation that the execution task of the automated testing script is suspended or the execution fails and the testing efficiency is low before the replacement recovery of the manual intervention due to the failure or damage of the used U-shield device in the prior art, the following technical effects can be achieved:
(1) by the highly intelligent and automatic replacement and recovery method for the fault U shield, intelligent and automatic equivalent replacement of the fault U shield equipment is realized, manual intervention is not needed in the whole process, and the fault recovery period caused by manual intervention replacement and recovery when a single U shield is in fault in the existing mode is avoided.
(2) The maintenance workload of the modification of the automatic test script is reduced when the test physical U shield equipment is changed, and the automatic test efficiency is improved.
That is, the method of the embodiment of the present disclosure can implement intelligent automatic data replacement and test recovery, implement intelligent automatic equivalent replacement of a failed U shield device, and the whole process does not need manual intervention, thereby avoiding a failure recovery period generated by manual intervention replacement recovery when a single U shield fails in the existing mode, reducing the maintenance workload of automatic test script modification, and improving the automatic test efficiency.
Fig. 9 schematically shows a block diagram of a U shield testing apparatus according to another embodiment of the present disclosure.
As shown in fig. 9, another aspect of the present disclosure provides a U-shield testing apparatus 900, which includes a standby matching module 910, a data filling module 920 and a click control module 930. The standby matching module 910 is configured to match a standby U shield corresponding to the failed U shield; the data injection module 920 is configured to inject the original data of the failed U shield into the standby U shield; and the click control module 930 is configured to control the clicker to perform a click operation on the standby U shield, so as to complete a test of the standby U shield.
It should be noted that, the embodiment of the U shield testing apparatus 900 portion shown in fig. 9 is similar to the embodiment of the U shield testing method portion, and the achieved technical effects are also similar, which are not repeated herein.
FIG. 10 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
Another aspect of the present disclosure provides an electronic device comprising one or more processors and memory; the memory is used for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of the embodiments of the present disclosure.
As shown in fig. 10, a computer system 1000 according to an embodiment of the present disclosure includes a processor 1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. Processor 1001 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the present disclosure.
In the RAM 1003, various programs and data necessary for the operation of the system 1000 are stored. The processor 1001, ROM 1002, and RAM 1003 are connected to each other by a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 1002 and/or the RAM 1003. Note that the programs may also be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
System 1000 may also include an input/output (I/O) interface 1005, the input/output (I/O) interface 1005 also being connected to bus 1004, according to an embodiment of the present disclosure. The system 1000 may also include one or more of the following components connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1008 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. The computer program performs the above-described functions defined in the system of the embodiment of the present disclosure when executed by the processor 1001. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
According to an embodiment of the present disclosure, at least one of the coordinate determination module 510, the clicker invocation module 520 and the operation control module 530, and the backup matching module 910, the data injection module 920 and the click control module 930 may be implemented as a computer program module described with reference to fig. 10, which, when executed by a processor, may implement the respective operations of the U-shield testing method described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, implement the method of embodiments of the present disclosure.
Specifically, the computer-readable storage medium may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer readable storage medium carries one or more programs which, when executed, implement the U shield testing method according to an embodiment of the present disclosure.
Alternatively, the computer-readable storage medium may be included in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer readable storage medium carries one or more programs which, when executed, implement the U shield testing method according to an embodiment of the present disclosure.
Another aspect of the present disclosure provides a computer program including computer executable instructions, which when executed, are used to implement the U shield testing method according to the embodiments of the present disclosure.
So far, the embodiments of the present disclosure have been described in detail with reference to the accompanying drawings.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be understood by those skilled in the art that while the present disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.
The above-mentioned embodiments are intended to illustrate the objects, aspects and advantages of the present disclosure in further detail, and it should be understood that the above-mentioned embodiments are only illustrative of the present disclosure and are not intended to limit the present disclosure, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (13)

1. A U shield testing method comprises the following steps:
matching a spare U shield corresponding to the fault U shield;
filling the original data of the fault U shield into the spare U shield; and
and controlling the clicker to execute a click operation on the spare U shield so as to finish the test of the spare U shield.
2. The method of claim 1, wherein prior to said matching a spare U shield corresponding to a failed U shield, comprising:
responding to the first test instruction, and parameterizing the automation script to form a parameterized script;
and executing the parameterized script to detect a fault U shield.
3. The method of claim 2, wherein in said executing the parameterized script and detecting a failed U shield, comprises:
detecting a test log record of the current U shield;
and determining the current U shield as the fault U shield according to the test log record and a preset fault analysis rule.
4. The method of claim 1, wherein the matching of the spare U shield corresponding to the failed U shield comprises:
responding to the detection of the fault U shield, and inquiring an idle U shield in the U shield array;
and matching an idle U shield corresponding to the fault U shield into the spare U shield according to a preset position matching rule.
5. The method of claim 4, wherein, in the step of matching the idle U shield corresponding to the failed U shield according to the preset position matching rule into the standby U shield, the method comprises:
determining a first array position of the fault U shield;
and matching the spare U shield with the spare U shield according to the matching rule of the first array position and a preset position.
6. The method of claim 1, wherein the flooding the original data of the failed U shield into the spare U shield comprises:
determining a standby binding relationship between the identity information of the standby U shield and the identity information of the fault U shield;
and executing the filling operation of the original data to the standby U shield according to the standby binding relationship.
7. The method of claim 6, wherein the determining the backup binding relationship between the identity information of the backup U shield and the identity information of the failed U shield comprises:
inquiring the identity information of the fault U shield;
canceling the original binding relationship between the fault U shield and the identity information; and
and activating a standby binding relationship between the standby U shield and the identity information.
8. The method of claim 1, wherein before the controlling the clicker to perform a clicking operation on the standby Ushield, further comprising:
increasing a switching mapping relation between the identity information corresponding to the standby U shield and the fault U shield;
and updating the service information of the standby U shield according to the switching mapping relation.
9. The method of claim 8, wherein in the controlling the clicker to click on the spare U shield, further comprising:
responding to a second test instruction, and determining a standby U shield corresponding to the fault U shield according to the switching mapping relation;
and controlling the clicker to execute click operation of a fixed number of times on the standby U shield based on a fixed period so as to execute a service test aiming at the service information.
10. The method of claim 3, wherein, in said executing the parameterized script to detect a failed Ushield, further comprising:
sending a usage request to the current U shield in response to execution of the parameterized script;
and establishing the control connection between the current U shield and the execution machine according to the use request.
11. A U shield testing arrangement, wherein includes:
the standby matching module is used for matching a standby U shield corresponding to the fault U shield;
the data injection module is used for injecting the original data of the fault U shield into the spare U shield; and
and the click control module is used for controlling the clicker to execute click operation on the spare U shield so as to finish the test of the spare U shield.
12. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-10.
13. A computer-readable storage medium storing computer-executable instructions, wherein the instructions, when executed, are for implementing the method of any one of claims 1 to 10.
CN202110764934.2A 2021-07-06 2021-07-06 U shield testing method, device, equipment and medium Pending CN113486682A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110764934.2A CN113486682A (en) 2021-07-06 2021-07-06 U shield testing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110764934.2A CN113486682A (en) 2021-07-06 2021-07-06 U shield testing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113486682A true CN113486682A (en) 2021-10-08

Family

ID=77941476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110764934.2A Pending CN113486682A (en) 2021-07-06 2021-07-06 U shield testing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113486682A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102768646A (en) * 2012-07-06 2012-11-07 王景春 Serial port hard disk encryption and decryption device
CN110347539A (en) * 2019-07-11 2019-10-18 中国工商银行股份有限公司 Applied to the test method of server, device, system, calculate equipment, medium
CN110457170A (en) * 2019-07-31 2019-11-15 中国工商银行股份有限公司 For testing the method, apparatus, system and medium of U-shield

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102768646A (en) * 2012-07-06 2012-11-07 王景春 Serial port hard disk encryption and decryption device
CN110347539A (en) * 2019-07-11 2019-10-18 中国工商银行股份有限公司 Applied to the test method of server, device, system, calculate equipment, medium
CN110457170A (en) * 2019-07-31 2019-11-15 中国工商银行股份有限公司 For testing the method, apparatus, system and medium of U-shield

Similar Documents

Publication Publication Date Title
US10430319B1 (en) Systems and methods for automatic software testing
KR102268355B1 (en) Cloud deployment infrastructure validation engine
CN113206763B (en) Simulation test system and method suitable for Internet of things management platform
KR102018926B1 (en) Deploying environments for testing by providing instantaneous availability of prebuilt environments
US7698391B2 (en) Performing a provisioning operation associated with a software application on a subset of the nodes on which the software application is to operate
EP3311529B1 (en) Resilience as a service
CN102622298B (en) Software testing system and method
CN107660289B (en) Automatic network control
US20080320071A1 (en) Method, apparatus and program product for creating a test framework for testing operating system components in a cluster system
CN100461130C (en) Method for testing a software application
US7512933B1 (en) Method and system for associating logs and traces to test cases
US20150100832A1 (en) Method and system for selecting and executing test scripts
CN112631846A (en) Fault drilling method and device, computer equipment and storage medium
KR20010072379A (en) Fault tolerant computer system
CN105740093A (en) Backup Method, Pre-Testing Method For Environment Updating And System Thereof
US20150100831A1 (en) Method and system for selecting and executing test scripts
CN111324599B (en) Block chain experiment system and management method
CN110063042A (en) A kind of response method and its terminal of database failure
CN116414521A (en) Virtual machine remote command interaction method, device and medium for distributed heterogeneous shooting ranges
CN103778026A (en) Object calling method and device
CN113127009A (en) Automatic deployment method and device for big data management platform
CN116097226A (en) Apparatus and method for injecting faults into a distributed system
CN113448790A (en) U shield testing method, device, equipment and medium
CN113486682A (en) U shield testing method, device, equipment and medium
US20100094949A1 (en) Method of Backing Up Library Virtual Private Database Using a Web Browser

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