CN108491745B - Data acquisition method and device and computer readable storage medium - Google Patents

Data acquisition method and device and computer readable storage medium Download PDF

Info

Publication number
CN108491745B
CN108491745B CN201810201008.2A CN201810201008A CN108491745B CN 108491745 B CN108491745 B CN 108491745B CN 201810201008 A CN201810201008 A CN 201810201008A CN 108491745 B CN108491745 B CN 108491745B
Authority
CN
China
Prior art keywords
data acquisition
protocol
program
smart card
upgrading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810201008.2A
Other languages
Chinese (zh)
Other versions
CN108491745A (en
Inventor
董云河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiede Jiangxi Technology Co ltd
Original Assignee
Jiede China Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiede China Information Technology Co ltd filed Critical Jiede China Information Technology Co ltd
Priority to CN201810201008.2A priority Critical patent/CN108491745B/en
Publication of CN108491745A publication Critical patent/CN108491745A/en
Application granted granted Critical
Publication of CN108491745B publication Critical patent/CN108491745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092
    • 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/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10118Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves the sensing being preceded by at least one preliminary step
    • G06K7/10138Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves the sensing being preceded by at least one preliminary step the step consisting of determining the type of record carrier, e.g. to determine if the record carrier is an RFID tag of the long or short range type, or to determine the preferred communication protocol of the RFID tag

Abstract

The application provides a data acquisition method and device and a computer storage medium, wherein the method comprises the following steps: acquiring information of a smart card to be tested; determining a data acquisition protocol corresponding to the smart card to be tested according to the information of the smart card to be tested; and acquiring data of transmission data between the intelligent card to be detected and the terminal by adopting the data acquisition protocol. The scheme realizes integration of different data acquisition protocols, realizes data acquisition of different types of smart cards by using the same data acquisition device conveniently and quickly, effectively improves the universality of the data acquisition scheme, does not need a tester to confirm the data acquisition device which needs to be used currently, can avoid manual misjudgment to cause incapability of carrying out data acquisition, and is convenient to use and manage.

Description

Data acquisition method and device and computer readable storage medium
Technical Field
The present application relates to the field of software, and in particular, to a data acquisition method and apparatus, and a computer-readable storage medium.
Background
A smart card, i.e. an Integrated circuit card (IC card), generally refers to a carrier embedded with an Integrated circuit chip, for example, the carrier may be a PVC (or ABS, etc.) plastic substrate. The appearance of the card can be a credit card, and certainly, in some application scenes, the card can also be packaged into special shapes such as buttons, keys, ornaments and the like. At present, smart cards are widely used in non-financial fields such as business, medical care, insurance, transportation, energy, communication, security management, and Identification, for example, medical insurance cards, subscriber identity modules (SIM cards), electronic Toll Collection (ETC), and are also increasingly used in financial fields such as bank IC cards.
With the continuous popularization of the application field, strict requirements are put forward on the stability of the smart card. Specifically, the smart card is used to communicate with the outside world, manage the storage space in the smart card, and process various commands, so that it is necessary to perform a sufficient and comprehensive test on the smart card during the development process. Furthermore, in order to test the smart card, it is necessary to collect interaction data between the smart card and the outside world. To this end, there is a data acquisition device for acquiring interactive data between the smart card and the outside, such as a terminal, and the acquisition of the interactive data of the smart card can be conveniently realized by using the data acquisition device.
The existing data acquisition device only supports data acquisition of a single type of smart card, and data acquisition of different smart cards needs to be realized through different data acquisition devices, so that the universality is poor, the data acquisition process is complicated, and management is inconvenient.
Disclosure of Invention
The application provides a data acquisition method and device and a computer readable storage medium, which are used for solving the problem of poor universality of the conventional data acquisition device.
A first aspect of the present application provides a data acquisition method, including: acquiring information of a smart card to be tested; determining a data acquisition protocol corresponding to the smart card to be tested according to the information of the smart card to be tested; and acquiring data of transmission data between the intelligent card to be detected and the terminal by adopting the data acquisition protocol.
A second aspect of the present application is to provide a data acquisition apparatus comprising: the acquisition module is used for acquiring the information of the smart card to be tested; the processing module is used for determining a data acquisition protocol corresponding to the intelligent card to be tested according to the information of the intelligent card to be tested; the processing module is further used for acquiring data of transmission data between the intelligent card to be detected and the terminal by adopting the data acquisition protocol.
A third aspect of the present application is to provide a data acquisition apparatus comprising: at least one processor and memory; the memory stores computer-executable instructions; the at least one processor executes computer-executable instructions stored by the memory to perform the method as previously described.
A fourth aspect of the present application is to provide a computer readable storage medium having stored therein program instructions, which when executed by a processor, implement the method as described above.
According to the data acquisition method and device and the computer readable storage medium, a plurality of data acquisition protocols are configured in advance, when the smart card is tested, information of the smart card to be tested is firstly obtained, the data acquisition protocol suitable for the smart card to be tested is determined according to the information, and the interaction data between the smart card to be tested and the outside world is acquired by adopting the determined data acquisition protocol. The integration of different data acquisition protocols is realized to above-mentioned scheme, utilizes same data acquisition device convenient and fast ground to realize the data acquisition to different grade type smart card, effectively improves the commonality of data acquisition scheme to need not the tester and confirm the data acquisition device that needs to use at present, can avoid artifical erroneous judgement to lead to unable data acquisition, convenient to use management.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1A to fig. 1D are schematic flow charts of a data acquisition method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a data acquisition method according to a second embodiment of the present application;
fig. 3A to fig. 3C are schematic flow charts of a data acquisition method according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a data acquisition device according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a data acquisition device according to a fifth embodiment of the present application;
fig. 6A to 6C are schematic structural diagrams of a data acquisition device according to a sixth embodiment of the present application;
fig. 7 is a schematic structural diagram of a data acquisition device according to a seventh embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims. The embodiments in the present application may be implemented individually or in combination without conflict.
Fig. 1A is a schematic flow chart of a data acquisition method according to an embodiment of the present application, and referring to fig. 1A, the embodiment provides a data acquisition method for implementing data acquisition on different types of smart cards and improving the generalization of a data acquisition scheme, and specifically, the embodiment exemplifies that the data acquisition method is applied to a data acquisition device, and the method includes:
101. acquiring information of a smart card to be tested;
102. determining a data acquisition protocol corresponding to the smart card to be tested according to the information of the smart card to be tested;
103. and acquiring data of transmission data between the intelligent card to be detected and the terminal by adopting the data acquisition protocol.
In practical applications, the execution subject of this embodiment may be a data acquisition device, and the data acquisition device may be a driver, program code software, or a medium storing related execution codes, such as a usb disk, a non-volatile memory (EEPROM, flash), or the like; alternatively, the data acquisition device may also be an entity device integrated or installed with a relevant execution code, for example, a chip, a micro controller Unit (MCU for short), a computer, and the like.
Combining the actual scene for example: the data acquisition device in this application supports multiple data acquisition protocol, and is specific, can install multiple data acquisition protocol in data acquisition device in advance, realizes the support to multiple data acquisition protocol. Subsequently, when the smart card needs to be tested, the data acquisition device selects a corresponding data acquisition protocol according to the currently connected smart card to be tested to acquire data. The information of the smart card to be tested is used to query a data acquisition protocol applicable to the smart card to be tested, and the content of the information may include, but is not limited to, the type and/or the identifier of the smart card to be tested. Correspondingly, 101 may specifically include: and acquiring the type of the smart card to be tested and/or the identification of the smart card to be tested.
In practical applications, the types of smart cards have diversified characteristics. For example, when the smart card performs data interaction with the outside, the data stream can be input and output in a data bit mode; the input and the output can be carried out according to a byte mode; the input and output can also be carried out in a data packet mode. Data transmission may employ different communication rates through negotiation. Because the data transmission protocols adopted by different intelligent cards are different, the data acquisition protocols supported by different intelligent cards are correspondingly different. According to the data acquisition scheme, multiple data acquisition protocols are configured in advance, when data acquisition is needed, the data acquisition protocols which correspondingly support the types of the smart cards are selected for data acquisition according to the smart cards needing data acquisition at present, and data acquisition of the smart cards of different types is achieved, so that the universalization of data acquisition is improved.
The terminal is used for interacting with the smart card to be tested and sending an execution command to be tested to the smart card to be tested. In practical applications, the terminal may include, but is not limited to, an electronic device capable of interacting with a smart card, such as a computer, a PAD, and a smart phone. In one embodiment, the test communication between the smart card and the terminal may be implemented by command-response pairs.
Correspondingly, as shown in fig. 1B, as an implementation manner, on the basis of any other implementation manner, 103 may specifically include:
1031. receiving a first execution command sent by a terminal;
1032. sending the first execution command to the smart card to be tested, and receiving first execution response data returned by the smart card to be tested;
1033. and generating corresponding log records aiming at the first execution command and the first execution response data, and sending the first execution response data to the terminal.
Specifically, the terminal sends an execution command to the smart card, for example, the execution command may be in the form of a C-APDU, and after receiving the execution command, the smart card executes corresponding processing and then returns execution response data (e.g., a processing result) to the terminal. Optionally, the smart card may package the execution response data into a response message, and return the response message to the terminal in the form of an R-APDU. With the adoption of the method and the device, in the process that the smart card performs the data interaction with the terminal through the data acquisition device, the data acquisition device generates and stores the log record about the current execution at the same time or before sending the execution response data returned by the smart card to the terminal. The content of the log record can be set according to the requirement of the smart card test. Alternatively, the log records may include execution command and execution response data.
As a further alternative, in order to save the storage space of the data acquisition device, as shown in fig. 1C, on the basis of the embodiment shown in fig. 1B, the log record may include the command identifier of the first execution command and the first execution response data; correspondingly, after 1031, it may further include:
1034. and determining the command identifier of the first execution command according to the command identifier of each execution command.
Specifically, a unique command identifier may be assigned to each execution command in the field of smart card testing in advance, and the form of the command identifier may be set to a format with small data, for example, a number code 01, 02, or the like, or may be a combination of letters and numbers, for example, a1, b3, or the like, or may be an abbreviation of the execution command, and the like, which is not limited herein. Subsequently, when the log record is generated, the command identification and the execution response data of the execution command can be recorded, and the data of the command identification is usually shorter, so that the data size of the log record and the data acquisition data volume can be effectively reduced, the data acquisition efficiency is improved, and the storage space is saved.
In addition, to facilitate subsequent reading of log records, a time dimension may also be added to each log record. Accordingly, in any embodiment, the log record further includes a log time; as shown in fig. 1D, the method further comprises:
104. and recording the moment of receiving the first execution command to obtain the log time.
Specifically, when the data acquisition device receives an execution command sent by the terminal, the data acquisition device records the time when the execution command is received, and forwards the received execution command to the smart card to be tested, and the smart card to be tested processes the execution command and returns execution response data to the terminal through the data acquisition device. When a certain log record needs to be read from all currently recorded log records subsequently, the log time can be used as an index, and the log record needing to be read can be conveniently and quickly found.
Based on the foregoing embodiment, optionally, the method further includes:
and returning a log record to the terminal according to the reading instruction sent by the terminal.
The terminal of the present embodiment is configured to read data in the data acquisition device by sending a reading instruction, and the terminal may be the same terminal as or different from a terminal used for data acquisition in other embodiments. In practical applications, the terminal of the present embodiment may also include, but is not limited to, an electronic device capable of interacting with a smart card, such as a computer, a PAD, and a smart phone. Specifically, the read data may be used for data unloading, data analysis, test analysis, and the like, and is not limited herein.
The data acquisition method provided by this embodiment is to pre-configure a plurality of data acquisition protocols, when a smart card test is performed, first obtain information of a smart card to be tested, determine a data acquisition protocol suitable for the smart card to be tested according to the information, and acquire interactive data between the smart card to be tested and the outside world by using the determined data acquisition protocol. The integration of different data acquisition protocols is realized to above-mentioned scheme, utilizes same data acquisition device convenient and fast ground to realize the data acquisition to different grade type smart card, effectively improves the commonality of data acquisition scheme to need not the tester and confirm the data acquisition device that needs to use at present, can avoid artifical erroneous judgement to lead to unable data acquisition, convenient to use management.
In practical applications, it may also be related to upgrading functions supported by the data acquisition device based on test requirements, and the software upgrading for the data acquisition device is exemplified below.
In practical application, by performing software upgrading, a good use effect can be achieved, for example, functions of data analysis, data reading and the like can be added, or a more optimized operation interface and the like can be provided, so that a user can use and operate the software conveniently. However, unlike other general software upgrades, in a special application scenario of the smart card, since the smart card generally relates to personal information and privacy of a user, security of the software upgrade needs to be considered while the software upgrade is performed.
To this end, fig. 2 is a schematic flow diagram of a data acquisition method provided in the second embodiment of the present application, and referring to fig. 2, this embodiment provides a data acquisition method for upgrading software on the premise of ensuring data security, and specifically, on the basis of the first embodiment, the data acquisition method further includes:
201. acquiring an upgrading program carrying authority encryption;
202. verifying by using an upgrading secret key corresponding to a pre-distributed unique serial number so as to obtain upgrading authority after successful verification;
203. decrypting the upgrading program by using the decryption secret key corresponding to the serial number to obtain the decrypted upgrading program;
204. and running the decrypted upgrading program according to the obtained upgrading authority so as to finish the firmware upgrading.
Specifically, in this embodiment, a unique serial number is assigned to each data acquisition device in advance, and in practical application, the serial number may be fixed and written in the data acquisition device, and an editing authority is set. Preferably, the serial number may be randomly generated and encrypted to further ensure the security of the software upgrade.
Combining the actual scene for example: in practical application, software upgrading management can be performed through a remote server. Specifically, the upgrade program for performing software upgrade may be issued by the server, and the issuing manner (i.e., the manner in which the data acquisition device acquires the upgrade program) may be multiple, for example, the data acquisition device may access the network to directly download the upgrade program, or the data acquisition device may support data transmission with a storage medium (e.g., a usb disk) to acquire the upgrade program from the storage medium. Preferably, in order to ensure the stability of software upgrade, the data acquisition device may be connected to a terminal (e.g., a personal computer), and a user downloads an upgrade program through the terminal and transmits the upgrade program to the data acquisition device, so that the data acquisition device is controlled by the terminal to execute an upgrade process, thereby finally implementing software upgrade on the data acquisition device.
In practical application, the serial numbers of all the data acquisition devices are stored in the server, when an upgrading program required by software upgrading is provided for a certain data acquisition device, upgrading authority verification is set for the upgrading program according to the serial numbers of the data acquisition devices, the upgrading program is encrypted to obtain an upgrading program with encrypted carrying authority, and the upgrading program with the encrypted carrying authority is subsequently provided for the data acquisition devices. Correspondingly, the legal data acquisition device carries out authority verification according to the upgrading key corresponding to the serial number of the legal data acquisition device, if the verification is successful, the upgrading authority is obtained, after the upgrading authority is obtained, the upgrading program is decrypted according to the decryption key corresponding to the serial number of the legal data acquisition device, the decrypted upgrading program is obtained, and then the software upgrading is realized by operating the upgrading program. Optionally, the upgrade program may be specifically configured to complete software upgrade by replacing a code program for implementing data acquisition in the data acquisition device.
In the data acquisition method provided by this embodiment, the server issues an upgrade program carrying authority encryption according to a unique serial number of the data acquisition device, and after acquiring the upgrade program, the data acquisition device acquires the upgrade authority and decrypts the upgrade program by using an upgrade key and a decryption key corresponding to its own serial number, thereby implementing software upgrade and ensuring security while implementing software upgrade.
In addition, the present solution also relates to the integration and management of data acquisition protocols.
Fig. 3A is a schematic flow chart of a data acquisition method provided in a third embodiment of the present application, and referring to fig. 3A, this embodiment provides a data acquisition method for performing protocol management on a newly-added data acquisition protocol, specifically, on the basis of any other embodiment, the data acquisition method further includes:
301. receiving a first protocol program, wherein the first protocol program is used for installing a newly-added data acquisition protocol;
302. and operating a first protocol program to install the newly added data acquisition protocol.
Combining the actual scene for example: in practical applications, a new data acquisition protocol may be added to the data acquisition device, for example, if a new type of smart card is available, a data acquisition protocol suitable for the smart card needs to be added, or if a new data acquisition protocol is developed for an existing smart card, the data acquisition protocol configured in the data acquisition device may be expanded. Specifically, the protocol program for installing the new data acquisition protocol may be obtained from the outside. For example, the data acquisition protocol with the new addition sent by the server may be received, or may be acquired from a storage medium, or may be acquired from the terminal. The terminal may be the same terminal as that in the foregoing embodiments or may be different terminals. And after a protocol program for installing the newly added data acquisition protocol is acquired, the newly added data acquisition protocol is installed by operating the protocol program.
Through the embodiment, the data acquisition protocol supported by the data acquisition device can be newly added according to the data acquisition requirement, and the universality and the reliability of data acquisition are further improved.
Fig. 3B is a schematic flow chart of another data collection method provided in the third embodiment of the present application, and referring to fig. 3B, this embodiment provides a data collection method for supporting data collection of a new smart card, specifically, on the basis of any other embodiment, the data collection method further includes:
303. if the data acquisition protocol corresponding to the smart card to be tested does not exist currently, sending the information of the smart card to be tested to a server;
304. receiving a second protocol program returned by the server, wherein the second protocol program is used for installing a data acquisition protocol corresponding to the smart card to be tested;
305. and operating the protocol program to install the data acquisition protocol corresponding to the intelligent card to be tested.
Combining the actual scene for example: and during actual data acquisition, if the current data acquisition protocol library is searched, and a data acquisition protocol suitable for the current intelligent card to be detected is not found, the information of the current intelligent card to be detected is sent to the server, the server searches the data acquisition protocol matched with the intelligent card to be detected from the local protocol library, generates a protocol program for installing the data acquisition protocol, and returns the protocol program to the data acquisition device. The data acquisition device completes the installation of the data acquisition protocol suitable for the current smart card to be tested by operating the protocol program.
Through the embodiment, when the local protocol library of the data acquisition device does not have the data acquisition protocol suitable for the current smart card to be detected, the server is requested to acquire the corresponding data acquisition protocol for installation, so that the universality and the reliability of data acquisition are further improved.
Fig. 3C is a schematic flow chart of another data acquisition method provided in a third embodiment of the present application, and referring to fig. 3C, the present embodiment provides a data acquisition method for achieving compatibility of a terminal in a data acquisition process, specifically, on the basis of any other embodiment, the data acquisition method further includes:
306. if a data acquisition protocol compatible with the terminal does not exist currently, sending information of the intelligent card to be detected and the terminal to a server;
307. receiving a third protocol program returned by the server, wherein the third protocol program is used for upgrading the current data acquisition protocol;
308. and running the third protocol program to upgrade the current data acquisition protocol, wherein the upgraded data acquisition protocol is compatible with the terminal.
Combining the actual scene for example: during data acquisition, interactive data between the intelligent card to be detected and the terminal are acquired, so that a data acquisition protocol in the data acquisition device needs to be configured with a data acquisition protocol suitable for the terminal besides a protocol suitable for the intelligent card. Specifically, if the current data acquisition protocol library is searched, and a data acquisition protocol compatible with the terminal is not found, the information of the current smart card to be tested and the terminal is sent to the server, the server searches for the data acquisition protocol compatible with the terminal from the local protocol library, generates a protocol program for installing the data acquisition protocol, and returns the protocol program to the data acquisition device. The data acquisition device completes the installation of the data acquisition protocol of the compatible terminal by operating the protocol program.
By the embodiment, when the local protocol library of the data acquisition device does not have the data acquisition protocol compatible with the current terminal, the server is requested to acquire the compatible data acquisition protocol for installation, so that the reliability of data acquisition is further improved.
According to the data acquisition method provided by the embodiment, the installation programs of the corresponding data acquisition protocols are acquired and installed aiming at different scenes, so that the universality and the reliability of data acquisition are further improved. The above embodiments may be implemented individually or in combination.
Fig. 4 is a schematic structural diagram of a data acquisition device according to a fourth embodiment of the present application, and referring to fig. 4, the embodiment provides a data acquisition device for acquiring data of different types of smart cards and improving the generalization of a data acquisition scheme, where the data acquisition device includes:
an obtaining module 41, configured to obtain information of a smart card to be tested;
the processing module 42 is configured to determine, according to the information of the to-be-tested smart card, a data acquisition protocol corresponding to the to-be-tested smart card;
the processing module 42 is further configured to perform data acquisition on transmission data between the smart card to be tested and the terminal by using the data acquisition protocol.
In practical application, the data acquisition device may be a driver, program code software, or a medium storing related execution codes, such as a usb disk, a non-volatile memory (EEPROM, flash), or the like; alternatively, the data acquisition device may also be an entity device integrated or installed with a relevant execution code, for example, a chip, a micro controller Unit (MCU for short), a computer, and the like.
Combining the actual scene for example: the data acquisition device is provided with a plurality of data acquisition protocols in advance, when data acquisition is needed, the acquisition module 41 acquires information of the smart card to be detected, and the processing module 42 selects the data acquisition protocol supporting the smart card to be detected to acquire data according to the information of the smart card to be detected, so that data acquisition of different types of smart cards is realized, and the generalization of data acquisition is improved. The information of the smart card to be tested is used to query a data acquisition protocol applicable to the smart card to be tested, and the content of the information may include, but is not limited to, the type and/or the identifier of the smart card to be tested. Correspondingly, the obtaining module 41 is specifically configured to obtain the type of the smart card to be tested and/or the identifier of the smart card to be tested.
The terminal is used for interacting with the smart card to be tested and sending an execution command to be tested to the smart card to be tested. In practical applications, the terminal may include, but is not limited to, an electronic device capable of interacting with a smart card, such as a computer, a PAD, and a smart phone.
As an implementable manner, on the basis of any other implementation, the processing module 41 includes:
the communication unit is used for receiving a first execution command sent by the terminal;
the communication unit is further configured to send the first execution command to the smart card to be tested, and receive first execution response data returned by the smart card to be tested;
the processing unit is used for generating corresponding log records aiming at the first execution command and the first execution response data;
the communication unit is further configured to send the first execution response data to the terminal.
Specifically, in the process that the smart card performs the data interaction with the terminal through the data acquisition device, the communication unit of the data acquisition device receives an execution command sent by the terminal and forwards the execution command to the smart card to be tested, then the communication unit receives execution response data of the smart card to be tested for executing the execution command, and the processing unit generates and stores a log record related to the execution at this time while or before the communication unit sends the execution response data returned by the smart card to the terminal. The content of the log record can be set according to the requirement of the smart card test. Alternatively, the log records may include execution command and execution response data.
Optionally, in order to save the storage space of the data acquisition device, on the basis of the foregoing embodiment, the log record may include the command identifier of the first execution command and the first execution response data; correspondingly, the processing unit is further configured to determine, after the communication unit receives the first execution command sent by the terminal, the command identifier of the first execution command according to the command identifier of each execution command.
Specifically, a unique command identifier may be assigned to each execution command in the field of smart card testing in advance. When the processing unit generates the log record, the command identification of the execution command and the execution response data can be recorded, the data size of the log record and the data volume of data acquisition can be effectively reduced, the data acquisition efficiency is improved, and the storage space is saved.
In addition, to facilitate subsequent reading of log records, a time dimension may also be added to each log record. Accordingly, in any embodiment, the log record further includes a log time; and the processing unit is also used for recording the moment of receiving the first execution command so as to obtain the log time.
Specifically, when a communication unit of the data acquisition device receives an execution command sent by the terminal, a processing unit records the time when the execution command is received, the communication unit forwards the received execution command to the smart card to be tested, the smart card to be tested processes the execution command according to the execution command, and execution response data is returned to the terminal through the communication unit of the data acquisition device. And the log time can be used as an index subsequently, so that the log record needing to be read can be conveniently and quickly found.
Based on the foregoing embodiment, optionally, the processing unit is further configured to return a log record to the terminal according to a read instruction sent by the terminal. The terminal of the present embodiment is configured to read data in the data acquisition device by sending a reading instruction, and the terminal may be the same terminal or a different terminal from the terminal used for data acquisition in other embodiments.
The data acquisition device that this embodiment provided realizes the integration of different data acquisition protocols, utilizes same data acquisition device convenient and fast ground to realize the data acquisition to different grade type smart card, effectively improves the commonality of data acquisition scheme to need not the tester and confirm the data acquisition device that needs to use at present, can avoid artifical erroneous judgement to lead to unable data acquisition, convenient to use management.
In practical application, good use effect can be realized by upgrading software. However, unlike other general software upgrades, in a special application scenario of the smart card, since the smart card generally relates to personal information and privacy of a user, security of the software upgrade needs to be considered while the software upgrade is performed.
To this end, fig. 5 is a schematic structural diagram of a data acquisition device provided in the fifth embodiment of the present application, and referring to fig. 5, the present embodiment provides a data acquisition method for performing software upgrade on the premise of ensuring data security, specifically, on the basis of the fourth embodiment, the data acquisition device further includes:
the firmware upgrading module 51 is used for acquiring an upgrading program carrying authority encryption;
the firmware upgrading module 51 is further configured to perform verification by using an upgrading key corresponding to a pre-assigned unique serial number, so as to obtain an upgrading right after the verification is successful;
the firmware upgrading module 51 is further configured to decrypt the upgrading program by using the decryption key corresponding to the serial number to obtain a decrypted upgrading program;
the firmware upgrading module 51 is further configured to run the decrypted upgrading program according to the obtained upgrading permission, so as to complete firmware upgrading.
Specifically, in this embodiment, a unique serial number is assigned to each data acquisition device in advance. Preferably, the serial number may be randomly generated and encrypted to further ensure the security of the software upgrade. In practical application, the upgrade program carrying the authority encryption is provided for the data acquisition device, the firmware upgrade module 51 of the data acquisition device performs authority verification according to the upgrade key corresponding to the serial number of the data acquisition device, if the verification is successful, the upgrade authority is obtained, after the upgrade authority is obtained, the upgrade program is decrypted according to the decryption key corresponding to the serial number of the upgrade module, the decrypted upgrade program is obtained, and then software upgrade is realized by running the upgrade program.
In the data acquisition device provided by this embodiment, the server issues the upgrade program carrying with permission encryption according to the unique serial number of the data acquisition device, and after acquiring the upgrade program, the data acquisition device acquires the upgrade permission and decrypts the upgrade program by using the upgrade key and the decryption key corresponding to its own serial number, thereby realizing software upgrade and ensuring security while realizing software upgrade.
In addition, the present solution also relates to the integration and management of data acquisition protocols.
Fig. 6A is a schematic structural diagram of a data acquisition device according to a sixth embodiment of the present application, and referring to fig. 6A, the present embodiment provides a data acquisition device for performing protocol management on a newly added data acquisition protocol, specifically, on the basis of any other embodiment, the data acquisition device further includes:
a first receiving module 61, configured to receive a first protocol program, where the first protocol program is used to install a newly added data acquisition protocol;
the processing module 42 is further configured to run the first protocol program to install the newly added data acquisition protocol.
Combining the actual scene for example: in practical application, a new data protocol may be added to the data acquisition device. Specifically, the protocol program for installing the new data acquisition protocol may be obtained from the outside. After the receiving module 61 obtains the protocol program for installing the new data acquisition protocol, the processing module 42 completes the installation of the new data acquisition protocol by operating the protocol program.
Through the embodiment, the data acquisition protocol supported by the data acquisition device can be newly added according to the data acquisition requirement, and the universality and the reliability of data acquisition are further improved.
Fig. 6B is a schematic structural diagram of another data acquisition device according to a sixth embodiment of the present application, and referring to fig. 6B, this embodiment provides a data acquisition device for supporting data acquisition of a new smart card, specifically, on the basis of any other embodiment, the data acquisition device further includes:
a first sending module 62, configured to send information of the to-be-tested smart card to a server if a data acquisition protocol corresponding to the to-be-tested smart card does not exist currently;
a second receiving module 63, configured to receive a second protocol program returned by the server, where the second protocol program is used to install a data acquisition protocol corresponding to the smart card to be tested;
and the processing module 42 is further configured to run the protocol program to install the data acquisition protocol corresponding to the smart card to be tested.
Combining the actual scene for example: during actual data acquisition, if the processing module searches the current data acquisition protocol library and does not find a data acquisition protocol suitable for the current smart card to be detected, the first sending module 62 sends the information of the current smart card to be detected to the server, the server searches the data acquisition protocol adapted to the smart card to be detected from the local protocol library, generates a protocol program for installing the data acquisition protocol, and returns the protocol program to the second receiving module 63. The processing module 42 completes the installation of the data acquisition protocol suitable for the current smart card to be tested by running the protocol program.
Through the embodiment, when the local protocol library of the data acquisition device does not have the data acquisition protocol suitable for the current smart card to be detected, the server is requested to acquire the corresponding data acquisition protocol for installation, so that the universality and the reliability of data acquisition are further improved.
Fig. 6C is a schematic structural diagram of another data acquisition device provided in a sixth embodiment of the present application, and referring to fig. 6C, this embodiment provides a data acquisition device for implementing compatibility of a terminal in a data acquisition process, specifically, on the basis of any other embodiment, the data acquisition device further includes:
a second sending module 64, configured to send information of the smart card to be tested and the terminal to a server if a data acquisition protocol compatible with the terminal does not exist currently;
a third receiving module 65, configured to receive a third protocol program returned by the server, where the third protocol program is used to upgrade a current data acquisition protocol;
the processing module 42 is further configured to run the third protocol program to upgrade a current data acquisition protocol, where the upgraded data acquisition protocol is compatible with the terminal.
Combining the actual scene as an example: if the processing module 42 searches the current data acquisition protocol library and does not find a data acquisition protocol compatible with the terminal, the second sending module 64 sends the information of the current smart card to be tested and the terminal to the server, and the server finds a data acquisition protocol compatible with the terminal from the local protocol library, generates a protocol program for installing the data acquisition protocol, and returns the protocol program to the third receiving module 65. The processing module 42 completes the installation of the data acquisition protocol of the compatible terminal by running the protocol program.
By the embodiment, when the local protocol library of the data acquisition device does not have the data acquisition protocol compatible with the current terminal, the server is requested to acquire the compatible data acquisition protocol for installation, so that the reliability of data acquisition is further improved.
The data acquisition device provided by the embodiment acquires and installs installation programs of corresponding data acquisition protocols aiming at different scenes so as to further improve the universality and reliability of data acquisition.
The above embodiments may be implemented individually or in combination without conflict. Alternatively, the modules may be separately or integrally arranged, for example, modules performing the same or similar functions may be implemented by the same module, and the division of the modules in the foregoing embodiments is only one example.
Fig. 7 is a schematic structural diagram of a data acquisition device according to a seventh embodiment of the present application, where the data acquisition device includes: a memory and at least one processor.
A memory for storing computer execution instructions. In particular, the program may include program code comprising computer operating instructions. The memory may comprise high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
The at least one processor executes computer-executable instructions stored by the memory to implement the data collection method in the above-described embodiments.
The processor may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Optionally, in a specific implementation, if the communication interface, the memory, and the processor are implemented independently, the communication interface, the memory, and the processor may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Optionally, in a specific implementation, if the communication interface, the memory, and the processor are integrated on a chip, the communication interface, the memory, and the processor may complete communication with each other through an internal interface.
An eighth embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a non-volatile Memory (EEPROM, flash), a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, are specifically, the computer-readable storage medium stores program instructions, and the program instructions are used in the program operation monitoring method in the above embodiments. Optionally, the computer readable storage medium may support writing functions, such as program upgrades, writing of log records.
It is clear to those skilled in the art that for the convenience and brevity of description, the specific working process of the above described apparatus may refer to the corresponding process in the foregoing method embodiments.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (14)

1. A data acquisition method is characterized by being applied to a data acquisition device and comprising the following steps:
acquiring the type of the smart card to be tested and/or the identification of the smart card to be tested;
determining a data acquisition protocol corresponding to the smart card to be tested according to the type of the smart card to be tested and/or the identification of the smart card to be tested, wherein the data acquisition protocol is a protocol adapted to the smart card and a terminal;
acquiring data of transmission data between the intelligent card to be detected and the terminal by adopting the data acquisition protocol;
the data acquisition protocol is adopted to carry out data acquisition on the transmission data between the intelligent card to be detected and the terminal, and the data acquisition protocol comprises the following steps:
receiving a first execution command sent by a terminal;
sending the first execution command to the smart card to be tested, and receiving first execution response data returned by the smart card to be tested;
generating corresponding log records aiming at the first execution command and the first execution response data, and sending the first execution response data to the terminal; wherein the log record comprises an execution command and execution response data;
the method further comprises the following steps:
acquiring an upgrading program which carries authority encryption and is sent by a server; the upgrading program carrying the authority encryption is obtained by setting upgrading authority verification for the upgrading program and encrypting the upgrading program according to the serial number of the data acquisition device by the server;
verifying by using an upgrading secret key corresponding to a pre-distributed unique serial number so as to obtain upgrading authority after successful verification;
decrypting the upgrading program by using the decryption secret key corresponding to the serial number to obtain the decrypted upgrading program;
according to the obtained upgrading authority, operating the decrypted upgrading program to complete firmware upgrading; if no data acquisition protocol compatible with the terminal exists at present, the information of the intelligent card to be tested and the terminal is sent to a server; receiving a third protocol program returned by the server, wherein the third protocol program is used for upgrading the current data acquisition protocol;
and running the third protocol program to upgrade the current data acquisition protocol, wherein the upgraded data acquisition protocol is compatible with the terminal.
2. The method of claim 1, wherein the log record comprises a command identification of the first execution command and the first execution response data; after receiving the first execution command sent by the terminal, the method further includes:
and determining the command identifier of the first execution command according to the command identifier of each execution command.
3. The method of claim 2, wherein the log record further comprises a log time; the method further comprises the following steps:
and recording the moment of receiving the first execution command to obtain the log time.
4. The method of claim 1, further comprising:
and returning a log record to the terminal according to the reading instruction sent by the terminal.
5. The method according to any one of claims 1-4, further comprising:
receiving a first protocol program, wherein the first protocol program is used for installing a newly-added data acquisition protocol;
and operating the first protocol program to install the newly added data acquisition protocol.
6. The method according to any one of claims 1-4, further comprising:
if the data acquisition protocol corresponding to the smart card to be tested does not exist currently, sending the information of the smart card to be tested to a server;
receiving a second protocol program returned by the server, wherein the second protocol program is used for installing a data acquisition protocol corresponding to the smart card to be tested;
and operating the protocol program to install the data acquisition protocol corresponding to the intelligent card to be tested.
7. A data acquisition device, comprising:
the acquisition module is used for acquiring the type of the smart card to be tested and/or the identification of the smart card to be tested;
the processing module is used for determining a data acquisition protocol corresponding to the to-be-detected smart card according to the type of the to-be-detected smart card and/or the identification of the to-be-detected smart card, wherein the data acquisition protocol is a protocol adaptive to the smart card and a terminal;
the processing module is further used for receiving a first execution command sent by the terminal;
sending the first execution command to the smart card to be tested, and receiving first execution response data returned by the smart card to be tested;
generating a corresponding log record aiming at the first execution command and the first execution response data, and sending the first execution response data to the terminal; wherein the log record comprises an execution command and execution response data;
the firmware upgrading module is used for acquiring an upgrading program carrying authority encryption; the upgrading program carrying the authority encryption is obtained by setting upgrading authority verification for the upgrading program and encrypting according to the serial number of the data acquisition device by the server;
the firmware upgrading module is also used for verifying by using an upgrading secret key corresponding to a pre-distributed unique serial number so as to obtain upgrading authority after verification is successful;
the firmware upgrading module is further configured to decrypt the upgrading program by using the decryption key corresponding to the serial number to obtain a decrypted upgrading program;
the firmware upgrading module is also used for operating the decrypted upgrading program according to the obtained upgrading authority so as to complete firmware upgrading;
the device further comprises:
the second sending module is used for sending the information of the intelligent card to be tested and the terminal to a server if a data acquisition protocol compatible with the terminal does not exist at present;
the third receiving module is used for receiving a third protocol program returned by the server, and the third protocol program is used for upgrading the current data acquisition protocol;
the processing module is further configured to run the third protocol program to upgrade a current data acquisition protocol, where the upgraded data acquisition protocol is compatible with the terminal.
8. The apparatus of claim 7, wherein the log record comprises a command identification of the first execution command and the first execution response data;
the processing module is further configured to determine, after the communication unit receives the first execution command sent by the terminal, a command identifier of the first execution command according to the command identifier of each execution command.
9. The apparatus of claim 8, wherein the log record further comprises a log time;
the processing module is further configured to record a time when the first execution command is received, so as to obtain the log time.
10. The apparatus of claim 7,
and the processing module is also used for returning the log record to the terminal according to the reading instruction sent by the terminal.
11. The apparatus according to any one of claims 7-10, further comprising:
the first receiving module is used for receiving a first protocol program, and the first protocol program is used for installing a newly-added data acquisition protocol;
the processing module is further configured to run the first protocol program to install the newly added data acquisition protocol.
12. The apparatus according to any one of claims 7-10, further comprising:
the first sending module is used for sending the information of the to-be-detected smart card to a server if the data acquisition protocol corresponding to the to-be-detected smart card does not exist currently;
the second receiving module is used for receiving a second protocol program returned by the server, and the second protocol program is used for installing a data acquisition protocol corresponding to the to-be-tested smart card;
the processing module is further used for operating the protocol program so as to install the data acquisition protocol corresponding to the intelligent card to be tested.
13. A data acquisition device comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes computer-executable instructions stored by the memory to perform the method recited in any of claims 1-6.
14. A computer-readable storage medium having stored therein program instructions which, when executed by a processor, implement the method of any one of claims 1-6.
CN201810201008.2A 2018-03-12 2018-03-12 Data acquisition method and device and computer readable storage medium Active CN108491745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810201008.2A CN108491745B (en) 2018-03-12 2018-03-12 Data acquisition method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810201008.2A CN108491745B (en) 2018-03-12 2018-03-12 Data acquisition method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108491745A CN108491745A (en) 2018-09-04
CN108491745B true CN108491745B (en) 2022-11-22

Family

ID=63338556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810201008.2A Active CN108491745B (en) 2018-03-12 2018-03-12 Data acquisition method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108491745B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111027082B (en) * 2019-12-04 2022-05-13 楚天龙股份有限公司 Extraction method, device and medium of personalized data applied to IC card

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339597A (en) * 2008-08-28 2009-01-07 北京飞天诚信科技有限公司 Method, system and equipment for upgrading read-write machine firmware
CN101887556A (en) * 2010-06-13 2010-11-17 候万春 System for exchanging data of multi-protocol selectivity radio frequency card reader and various radio frequency cards
CN102004892A (en) * 2009-08-31 2011-04-06 鸿富锦精密工业(深圳)有限公司 Multi-function card reader testing device and method
CN103186754A (en) * 2011-12-30 2013-07-03 国民技术股份有限公司 Method and device of multi-band frequency multi-protocol application expansion and card-reading device
CN107609330A (en) * 2017-08-31 2018-01-19 中国人民解放军国防科技大学 Access log mining-based internal threat abnormal behavior analysis method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105303135B (en) * 2015-07-31 2018-03-20 李明 Method for building up, device and the card reader of communication

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339597A (en) * 2008-08-28 2009-01-07 北京飞天诚信科技有限公司 Method, system and equipment for upgrading read-write machine firmware
CN102004892A (en) * 2009-08-31 2011-04-06 鸿富锦精密工业(深圳)有限公司 Multi-function card reader testing device and method
CN101887556A (en) * 2010-06-13 2010-11-17 候万春 System for exchanging data of multi-protocol selectivity radio frequency card reader and various radio frequency cards
CN103186754A (en) * 2011-12-30 2013-07-03 国民技术股份有限公司 Method and device of multi-band frequency multi-protocol application expansion and card-reading device
CN107609330A (en) * 2017-08-31 2018-01-19 中国人民解放军国防科技大学 Access log mining-based internal threat abnormal behavior analysis method

Also Published As

Publication number Publication date
CN108491745A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
US9880830B2 (en) On-board applet migration
EP2988470B1 (en) Automatic purposed-application creation
US9332060B2 (en) Methods, secure element, server, computer programs and computer program products for improved application management
US8391837B2 (en) Method, system and trusted service manager for securely transmitting an application to a mobile phone
CA2814007C (en) Secure application directory
CN100464313C (en) Mobile memory device and method for accessing encrypted data in mobile memory device
JP2008210301A (en) Storage medium, communication system, and control device
US8328104B2 (en) Storage device management systems and methods
CN111191252A (en) Encryption and decryption method and device for smart card operating system and storage medium
JP2005050306A (en) Information processor and information processing terminal
US20160014594A1 (en) Terminal read with smart card update list
JP4972706B2 (en) Method for managing unique memory device identification display, server and mobile communication device
US9298949B2 (en) Method for programming a mobile end device chip
JP2010506280A (en) Portable electronic entity and method for personalization of such electronic entity
CN101853351A (en) Automatically the method and apparatus of the selection application that can realize by equipment
JP5976458B2 (en) IC card and portable electronic device
CN108491745B (en) Data acquisition method and device and computer readable storage medium
WO2016063659A1 (en) Information processing device, information processing method, and program
CN101425120B (en) Card reader and executing method thereof
US20160241534A1 (en) Identifying service providers for integrating a secure element into a short-range wireless communication apparatus
US8276188B2 (en) Systems and methods for managing storage devices
CN103699994A (en) Method and system for loading credit over air for electronic purse of mobile terminal
EP2159711A1 (en) A method for managing data between a terminal and a token, corresponding token and system
CN115460161B (en) Optical module code changing method, device, equipment and storage medium
EP3876096B1 (en) Process implemented in an integrated circuit module, corresponding integrated circuit module, system including such a module and associated computer program

Legal Events

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

Effective date of registration: 20230626

Address after: 330096 Room 01, Floor 1, Complex Building, No. 399, Torch Street, Nanchang High tech Industrial Development Zone, Nanchang City, Jiangxi Province

Patentee after: Jiede (Jiangxi) Technology Co.,Ltd.

Address before: 330029 torch street, high tech Development Zone, Nanchang City, Jiangxi Province

Patentee before: Jiede (China) Information Technology Co.,Ltd.

TR01 Transfer of patent right