CN114756440B - Data writing method, device and equipment of smart card and storage medium - Google Patents

Data writing method, device and equipment of smart card and storage medium Download PDF

Info

Publication number
CN114756440B
CN114756440B CN202210337629.XA CN202210337629A CN114756440B CN 114756440 B CN114756440 B CN 114756440B CN 202210337629 A CN202210337629 A CN 202210337629A CN 114756440 B CN114756440 B CN 114756440B
Authority
CN
China
Prior art keywords
data
field
exception
smart card
abnormal
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
CN202210337629.XA
Other languages
Chinese (zh)
Other versions
CN114756440A (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.)
Xinghan Intelligent Technology Co ltd
Original Assignee
Xinghan Intelligent 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 Xinghan Intelligent Technology Co ltd filed Critical Xinghan Intelligent Technology Co ltd
Priority to CN202210337629.XA priority Critical patent/CN114756440B/en
Publication of CN114756440A publication Critical patent/CN114756440A/en
Application granted granted Critical
Publication of CN114756440B publication Critical patent/CN114756440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3485Performance evaluation by tracing or monitoring for I/O devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K1/00Methods or arrangements for marking the record carrier in digital fashion
    • G06K1/12Methods or arrangements for marking the record carrier in digital fashion otherwise than by punching
    • G06K1/128Methods or arrangements for marking the record carrier in digital fashion otherwise than by punching by electric registration, e.g. electrolytic, spark erosion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to a data writing method, a device, equipment and a storage medium of a smart card, which comprises the following steps: analyzing the first data, and acquiring second data based on an analysis result, wherein the first data is any one data unit in the input data; the second data is any one data field in the first data; checking whether each field of the first data and the second data is abnormal or not based on the data format of the first data and the second data; and writing the field abnormal information of the first data or the second data into a log file, marking the field abnormal, and recording all the field abnormal information in the input data by the log file. The beneficial effect of this scheme does: the method helps personalized data developers to quickly and accurately find abnormal data and provide reasons for the abnormal data, reduces the difficulty of analyzing data set errors, and saves labor cost.

Description

Data writing method, device and equipment of smart card and storage medium
Technical Field
The invention relates to the technical field of intelligent card personalization, in particular to a data writing method, a data writing device, data writing equipment and a storage medium of an intelligent card.
Background
Two conditions must be met for a bank to issue a bank card: the method comprises the steps of using a bank smart card and writing personalized data, wherein the personalized data is an important component of information safety and correctness of business functions.
The existing personalized data development process is as follows: a first step of reporting a Profile document corresponding to the product type of the intelligent card by a card issuing mechanism through a card organization; secondly, the issuer develops a personalized data set based on the Profile document; thirdly, the card issuing bank organizes the personalized data set into a data frame supported by the intelligent card system software and writes the data frame into the card, and the data frame is submitted to the card organization of the region where the intelligent card is issued for networking test.
Practice shows that the method widely used for personalized data development at present is a process of iteratively updating a data set and repeating a third step, and on one hand, the method has the defects of complex operation and long development period; on the other hand, the method for correcting the error data requires developers to be familiar with the data processing logic of the smart card, and has high requirements on the developers.
Disclosure of Invention
The invention aims to solve at least one of the technical problems in the prior art, provides a writing method, a device, equipment and a storage medium of a smart card, and improves the development efficiency.
The technical scheme of the invention comprises a data writing method, a device, equipment and a storage medium of an intelligent card, wherein the writing method of the intelligent card comprises the following steps: analyzing the first data, and acquiring second data based on an analysis result, wherein the first data is any one data unit in the input data; the second data is any one data field in the first data; checking whether each field of the first data and the second data is abnormal or not based on the data format of the first data and the second data; and writing the field abnormal information of the first data or the second data into a log file, marking the field abnormal, and recording all the field abnormal information in the input data by the log file.
According to the data writing method of the smart card, before first data is analyzed, the method comprises the following steps: deleting the existing data of the smart card; and packaging the individualized data into input data according to a fixed format, wherein the first data is any data unit in the input data, and sending the first data to the intelligent card.
According to the data writing method of the smart card, each field of the first data and the second data comprises an encoding field, a length field and a numerical value field, and whether each field of the first data and the second data is abnormal or not is checked, which comprises the following steps: checking whether the coding format of the coding field is supported by the intelligent card; checking whether the value of the length field is within the range specified by the smart card; the data type and value of the value field are checked for compliance with the smart card definition.
According to the data writing method of the intelligent card, whether each field of the first data and the second data is abnormal or not is checked, and the method comprises the following steps: if the first data is the last data unit in the input data and the second data is the last data field in the first data, checking whether all necessary personalized data including the second data has been sent to the smart card.
According to the data writing method of the smart card, the abnormal field information of the first data and the second data is written into a log file, and the method comprises the following steps: generating a log record based on field exception information of the first data and the second data, wherein the log record comprises an exception data unit code and at least one exception unit, and the exception unit comprises position information of an exception and a type of the exception; the log records are dynamically added to the log file.
According to the data writing method of the smart card, the method comprises the following steps: reading a first log record, wherein the first log record is any one log record in a log file; and acquiring the position of the abnormality and the reason of the abnormality according to the format of the log record.
The technical scheme of the invention also comprises a writing device of the intelligent card, which is used for realizing any method, and comprises the following steps: the first module is used for analyzing the first data and acquiring second data based on an analysis result, wherein the first data is any one data unit in the input data; the second data is any one data field in the first data; the second module is used for checking whether each field of the first data and the second data is abnormal or not based on the data format of the first data and the second data; and the third module is used for writing the field abnormal information of the first data or the field abnormal information of the second data into the log file, marking the field abnormal information, and recording all the field abnormal information in the input data by the log file.
The technical scheme of the invention also comprises data writing equipment of the smart card, which is used for realizing any one of the methods, and comprises the following steps: at least one processor; at least one memory for storing at least one program; when executed by the at least one processor, cause the at least one processor to perform the method steps of any one of the above.
The technical solution of the present invention further includes a data write storage medium of the smart card, and the computer program implements any of the above method steps when executed by the processor.
The beneficial effects of the invention are as follows: the field abnormal information of the data unit is written into the log file, the position and the reason of the data error can be accurately located by checking the log file, and the personalized data developer is helped to quickly and accurately find the abnormal data and provide the reason of the abnormal data, so that the difficulty of analyzing the data set error is reduced, and the labor cost is saved; all abnormal data reflected by log file records are corrected uniformly based on the abnormal information of all individualized data collected by the log file, so that the operation complexity is reduced and the development period is shortened.
Drawings
The invention is further described below with reference to the drawings and examples;
fig. 1 is a flowchart illustrating a writing method of a smart card according to an embodiment of the present invention.
Fig. 2 is a sub-flowchart of a writing method of a smart card according to an embodiment of the present invention.
FIG. 3 is yet another sub-flow diagram according to an embodiment of the present invention.
FIG. 4 is a schematic diagram of an embodiment of the present invention.
Fig. 5 is yet another schematic diagram according to an embodiment of the present invention.
FIG. 6 is a further sub-flow diagram according to an embodiment of the present invention.
Fig. 7 is a block diagram illustrating a writing apparatus of a smart card according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the present embodiments of the present invention, preferred embodiments of which are illustrated in the accompanying drawings, wherein the drawings are provided for the purpose of visually supplementing the description in the specification and so forth, and which are not intended to limit the scope of the invention.
In the description of the present invention, unless otherwise specifically limited, the terms such as set forth and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meanings of the above terms in combination with the detailed contents of the technical solutions.
As shown in fig. 1, a data writing method for a smart card includes the following steps:
s100, analyzing the first data, and acquiring second data based on an analysis result, wherein the first data is any one data unit in input data; the second data is any one data field in the first data;
s200, checking whether each field of the first data and the second data is abnormal or not based on the data formats of the first data and the second data;
s300, writing the abnormal information of the first data field or the abnormal information of the second data field into a log file, marking the abnormal field, and recording all the abnormal field information in the input data by the log file.
According to the method, whether each field of the data unit is abnormal is checked, the field abnormal information of the data unit is written into the log file, different identifications are adopted in the data field, the position and the reason of the data error can be accurately located by checking the log file, an individualized data developer is helped to quickly and accurately find the abnormal data and provide the reason of the abnormal data, so that the difficulty of analyzing the data set error is reduced, and the labor cost is saved; when the personalized data is written into the smart card, after the abnormal conditions of all input data sent to the smart card are checked, all abnormal information of the personalized data is collected based on the log file, all abnormal data recorded in the log file are corrected in a unified manner, the operation complexity is reduced, and the development period is shortened.
Detailed embodiments of the above steps are described below in various embodiments.
As shown in fig. 2, S100 specifically includes:
s110, deleting the existing data of the smart card; the existing data may be personalized data previously stored on the smart card, and the existing data of the smart card is deleted to ensure that the smart card is in a white card state, so that writing of subsequent effective personalized data is facilitated. The personalized data is an important component of information security and service function correctness, and can be data related to a card holder, such as card holder information, card issuer information, a card key and the like.
S120, packaging the personalized data into input data according to a fixed format; the personalized DATA can be packaged into input DATA consisting of a plurality of DATA units, the first DATA is any one DATA unit in the input DATA, and the personalized DATA can be packaged according to a format supported by the STORE DATA command:
the DGI + length + data field specifically comprises:
1) Data format: DGI + length hs + Value;
2) Data format: DGI + length hs + TLV;
3) Data format: DGI + length hs + (TLV + TLV + ...).
Wherein the data fields have the following:
1) Data format: value;
2) Data format: TLV;
3) Data format: TLV + TLV + ....
Wherein, the Data Grouping Identifier (DGI) of the encoding field is used for identifying different Data units, that is, different Data units all have a unique DGI Identifier; length represents the total length of data in a data unit; the TLV is Tag + Length + Value, and represents a data structure of the data field, the sequence of the fields of the data fields with different structures can be different, wherein Tag encoding is used for identifying different data fields; in case all fields are determined to be correct, value is written to the smart card. For convenience of description, the data format commonly used by the bank smart card is exemplified as follows: DGI + length hs + TLV. Since the read-write capability of the smart card is limited to a certain extent, the smart card can only receive one data unit at a time, for example, the first data is sent to the smart card.
S130, analyzing the first data, and acquiring second data based on an analysis result; for example, the STORE DATA command is executed to parse first DATA, and second DATA is obtained based on the parsing result, wherein the second DATA is any one of the DATA fields of the first DATA. The data fields are composed of different fields, the data fields with different structures may have different sequences or field names, and the TLV represents the data structure of the data fields, so that effective personalized data can be extracted through the TLV. Whether the data field is abnormal or not is of great significance to subsequent writing of personalized data.
As shown in fig. 3, S200 specifically includes:
s210, checking whether the coding format of the coding field is supported by the intelligent card; illustratively, the encoding field comprises an encoding DGI of the data unit and an encoding Tag of the data field, whether the encoding formats of the DGI and Tag encoding fields conform to BER-TLV definition in EMV or not is checked, and whether the encoding formats of the DGI and Tag encoding fields can be supported by the smart card or not is checked;
s220, checking whether the value of the length field is in the range specified by the smart card; illustratively, the Length field includes the Length of the data unit, length, and the Length of the data field, and it is checked whether the value corresponding to the Length field, length, is within the setting range of the DGI or Tag.
S230, checking whether the data type and the value of the value field conform to the definition of the smart card. Illustratively, the Value field Value corresponds to the data type of the Value and whether the Value conforms to the definition of DGI and Tag.
S240, if the first data is the last data unit in the input data and the second data is the last data field in the first data, checking whether all necessary personalized data including the second data has been sent to the smart card. Usually, data such as a cardholder name, a password, an identification card number and the like are necessary data written into the smart card, when the last data unit is sent, all data fields of the last data unit are analyzed, including personalized data represented by the last data field, whether the necessary personalized data is sent or not is counted, and otherwise, an exception that the necessary personalized data is lacked is sent. For example, by parsing the data field, the Value corresponding to the TLV is read, and the name of the personalized data represented by the Value is checked.
In an embodiment, checking whether all necessary personalized data has been sent to the smart card, a list may be constructed, as shown in table 1, through which the name and sending condition of the necessary personalized data to be sent may be checked, for convenience of description, 1 may be used to indicate sent, 0 may be used to indicate not sent, and whether a value 0 exists in the table is checked to determine whether an exception lacking necessary personalized data should be sent.
TABLE 1 necessary personalized data transmission statistics
Name of necessary personalized data to be transmitted Situation of transmission
Name (I) 1
Personal identification code 0
Identity card number 1
In one embodiment, for convenience of description, various abnormal situations can be characterized by errors, wherein an error code is used to characterize an abnormal situation existing in a data unit or a data field, and table 2 illustrates an example of the error code.
TABLE 2 error code mapping table
Figure BDA0003576363290000061
Figure BDA0003576363290000071
It should be noted that the numerical exception includes a data type exception of the numerical value and a value exception of the numerical value, and the numerical exception may be further refined, and the present invention does not detail all exception cases, but still falls within the scope of the present invention.
S300, writing the field abnormal information of the first data and the second data into a log file, marking the field abnormal information, and recording all the field abnormal information in the input data by the log file;
in an embodiment, when the data field is checked to have an exception, the field may be marked, for example, a data check exception flag is set, and if the data field of one of the data units of the input data has an exception, the data check exception flag is set to '1', and the value information of the data field with the exception is not allowed to be written into the smart card; if the data fields are all abnormal, the abnormal data detection mark is set to be '0', and the numerical information of the normal data fields is written into the intelligent card.
The intelligent card stores a log file special for recording personalized data abnormity, the log file is different from a transaction log file defined by an application specification of a bank intelligent card, and is only used in the stage of processing personalized data by the intelligent card and supports dynamic addition of records, the Record format of the log file is shown in figure 4, and 'SFI + Record numbers + first Record object address' is the file header of the log file, wherein SFI is a mark bit and is used for identifying the log file, and the only log file can be found according to the SFI; the Record number field represents the total number (n) of Record objects, and the 1 st Record object address points to the 1 st Record object. The format of the record object is: record length + Record Data + next Record object address, the n-1 Record object address points to the n-1 Record object, wherein, the n-1 Record object stores the address information of the n Record object, and the address in the n Record object is empty. Record length field represents the length of the Record object; the Record Data field stores a log Record having a fixed format, such as an encoding and error code of a Data unit from which an exception can be read, etc.
S300, specifically comprising:
s310, generating a log record based on the field exception information of the second data, wherein the log record comprises an exception data unit code and at least one exception unit, and the exception unit comprises exception position information and an exception type; when the data format of the data field with the abnormality is Value, the abnormal position information can be the data unit code DGI with the abnormality; when the data format of the data field in which the exception occurs is at least one TLV, the location information of the exception may be the data field encoding Tag in which the exception occurs. The format of the log record is shown in table 3.
TABLE 3 Log record Format
DGI Exception unit 1 Exception unit 2 ...... Abnormal unit m
The log record comprises at least one abnormal unit, as shown in the table above, the DGI code is used for representing the abnormal data unit, and the abnormal data unit in the data unit can be inquired according to the DGI code; the specific position of the abnormal data unit in the data unit and the specific reason of the abnormality can be obtained through the abnormal unit, when the data format of the abnormal data field is at least one TLV, the format of the abnormal unit is shown in figure 5, tag represents the abnormal data field code, and specific abnormal description information read by combining the error code is combined, so that a technician can quickly locate the abnormal field and the reason of the abnormality, can timely and accurately correct abnormal data, and can accelerate development efficiency.
S400, reading a first record object, wherein the first record object is any one record object in a log file; and acquiring the specific position of the abnormal occurrence and the specific reason of the abnormal occurrence according to the format of the log record in the record object.
In an embodiment, the personalized data set developer reads the log file and executes an implementation flowchart of abnormal data analysis, as shown in fig. 6, specifically includes the following steps:
s410, finding out a corresponding log file through the file identifier, reading a file header of the log file, and acquiring the total number of the recorded objects;
s420, judging whether the current record number is less than or equal to the total number of the record objects, if so, executing a step S430, otherwise, executing a step S460, wherein the record number i is greater than 0 and less than or equal to the total number of the record objects;
s430, reading the record object according to the file identifier and the record number, and executing the step S440 if the smart card returns a status word of '6A 83'; otherwise, step S450 is performed. The status word '6a83' is used to represent that the record object corresponding to the file identifier and the record number is in a non-empty state, i.e. the abnormal information is written.
For example, the record of the personalized log file can be read according to a file reading command customized by the smart card, and the command parameters may include a file identifier SFI and a record number i;
s440, analyzing the log record of the record object, and correcting data abnormality by combining the abnormality description of the error code;
s450, adding 1 to the record number, and executing the step S420 by using the same file identifier;
and S460, finishing reading the log file.
In an embodiment, a method for processing personalized data by using bank smart card application software specifically includes:
s501, the external device initializes the smart card and sends the personalized DATA through a STORE DATA command.
The purpose of initializing the intelligent card is to delete the existing individualized data in the intelligent card and ensure that the intelligent card is in a blank state to prepare for writing data subsequently; the device sends the personalized DATA set to the smart card organizing the input DATA in a format supported by the smart card STORE DATA command.
S502, the smart card executes a STORE DATA command to acquire and analyze first DATA, and acquires second DATA based on an analysis result, wherein the first DATA is any one DATA unit in input DATA; the second data is any one data field in the first data.
S503, the smart card respectively checks the first data and the second data, and the checking range comprises the following steps:
whether the encoding of 'DGI' and 'Tag' conforms to the BER-TLV definition in EMV and the smart card supported DGI.
Whether the values of 'Length' and 'Length' satisfy the setting ranges of the corresponding DGI and Tag.
Whether the data type and Value of 'Value' conform to the definition of corresponding DGI and Tag.
S504, if the above-mentioned S503 inspection data is abnormal, the smart card firstly sets a data inspection abnormal flag, adds the abnormal data unit code DGI, the abnormal data field code Tag and the error code corresponding to the abnormal reason in the log file, such as the temporary personalized log file, and continues to execute S506.
And S505, if the data is not abnormal in the check of the S503, continuously judging whether the abnormal flag of the data check is set to 1, if not, writing the Value of the data field into the smart card, otherwise, not allowing the Value of the data field to be written into the smart card.
S506, judging whether all data fields in the first data are subjected to abnormal inspection, and if all data fields are not processed, continuing to S503; if the exception checking for all data fields has been completed, S507 is performed.
S507, if there is a temporary abnormal DATA processing log in the current STORE DATA command processing process, adding the log to the personalized log file.
S508, judge whether the present STORE DATA order is the last DATA unit, if not, carry out step S502; otherwise, step S509 is performed.
S509, judging whether the data check abnormal mark is set to be 1, if not, returning the successfully completed status word '9000' by the intelligent card, and ending the writing process of the personalized data set of the intelligent card; otherwise, the smart card returns the status word not '9000' indicating that the STORE DATA command failed to be processed, and performs step S510.
S510, the personalized data set developer reads the personalized log file, analyzes the log record, corrects data errors according to the abnormal data unit code, the abnormal data field code and the corresponding error code stored in the record, regenerates the personalized data set, and executes the step 501.
In a second aspect, as shown in fig. 7, an embodiment of the present invention further provides a data writing device for a smart card, which includes:
the first module is used for analyzing the first data and acquiring second data based on an analysis result, wherein the first data is any one data unit in the input data; the second data is any one data field in the first data;
the second module is used for checking whether each field of the first data and the second data is abnormal or not based on the data format of the first data and the second data;
and the third module is used for writing the field abnormal information of the first data or the field abnormal information of the second data into the log file, marking the field abnormal information, and recording all the field abnormal information in the input data by the log file.
The first module specifically includes:
and the packaging submodule is used for packaging the personalized data into input data according to a fixed format, the first data is any data unit in the input data, and the first data is sent to the intelligent card.
The second module specifically includes:
the checking sub-module is used for checking whether the coding format of the coding field is supported by the intelligent card; checking whether the value of the length field is within the range specified by the smart card; the data type and value of the value field are checked for compliance with the smart card definition.
The third module specifically includes:
the log record submodule is used for generating a log record based on field exception information of the first data and the second data, the log record comprises an exception data unit code and at least one exception unit, and the exception unit comprises exception position information and an exception type; the log records are dynamically added to the log file.
It should be recognized that the method steps in embodiments of the present invention may be embodied or carried out in computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The method may use standard programming techniques. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated onto a computing platform, such as a hard disk, optically read and/or write storage media, RAM, ROM, etc., so that it is readable by a programmable computer, which when read by the computer can be used to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (6)

1. A data writing method of a smart card is characterized by comprising the following steps:
the smart card executes a STORE DATA command to acquire and analyze first DATA, and acquires second DATA based on the analysis result, wherein the first DATA is any one DATA unit in input DATA; the second data is any one data field in the first data;
checking whether each field of the first data and the second data is abnormal based on the data format of the first data and the second data; each field of the first data and the second data comprises an encoding field, a length field and a value field;
writing the field abnormal information of the first data or the field abnormal information of the second data into a log file, marking the field abnormal information, and recording all the field abnormal information in the input data by the log file;
the checking whether each field of the first data and the second data is abnormal includes:
checking whether the coding format of the coding field is supported by the intelligent card;
checking whether the value of the length field is within a range specified by the smart card;
checking whether the data type and the value of the numerical field conform to the definition of the smart card;
if the first data is the last data unit in the input data and the second data is the last data field in the first data, checking whether all necessary personalized data including the second data have been sent to the smart card;
the writing of the field exception information of the first data and the second data into the log file includes:
generating a log record based on field exception information of the first data and the second data, wherein the log record comprises an exception data unit code and at least one exception unit, and the exception unit comprises exception position information and an exception type;
and dynamically adding the log record to the log file.
2. The data writing method of the smart card of claim 1, before parsing the first data, the method comprising:
deleting the existing data of the smart card;
and packaging personalized data into the input data according to a fixed format, wherein the first data is any one data unit in the input data, and sending the first data to the smart card.
3. A data writing method of the smart card according to claim 1, the method comprising:
reading a first log record, wherein the first log record is any one log record in the log file;
and acquiring the position and the reason of the abnormity according to the format of the log record.
4. A data writing apparatus for a smart card, comprising:
the intelligent card comprises a first module, a second module and a third module, wherein the first module is used for enabling the intelligent card to execute a STORE DATA command to acquire and analyze first DATA and acquiring second DATA based on an analysis result, and the first DATA is any DATA unit in input DATA; the second data is any one data field in the first data;
a second module, configured to check whether each field of the first data and the second data is abnormal based on a data format of the first data and the second data; each field of the first data and the second data comprises an encoding field, a length field and a value field;
a third module, configured to write the field exception information of the first data or the field exception information of the second data into a log file, and mark a field exception, where the log file records all field exception information in the input data;
the checking whether each field of the first data and the second data is abnormal includes:
checking whether the coding format of the coding field is supported by the intelligent card;
checking whether the value of the length field is within a range specified by the smart card;
checking whether the data type and the value of the numerical field conform to the definition of the smart card;
if the first data is the last data unit in the input data and the second data is the last data field in the first data, checking whether all necessary personalized data including the second data have been sent to the smart card;
the writing of the field exception information of the first data and the second data into the log file includes:
generating a log record based on field exception information of the first data and the second data, wherein the log record comprises an exception data unit code and at least one exception unit, and the exception unit comprises exception position information and an exception type;
dynamically adding the log record to the log file.
5. An electronic device, comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to carry out the method steps of any one of claims 1 to 3.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 3.
CN202210337629.XA 2022-03-31 2022-03-31 Data writing method, device and equipment of smart card and storage medium Active CN114756440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210337629.XA CN114756440B (en) 2022-03-31 2022-03-31 Data writing method, device and equipment of smart card and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210337629.XA CN114756440B (en) 2022-03-31 2022-03-31 Data writing method, device and equipment of smart card and storage medium

Publications (2)

Publication Number Publication Date
CN114756440A CN114756440A (en) 2022-07-15
CN114756440B true CN114756440B (en) 2023-04-18

Family

ID=82329334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210337629.XA Active CN114756440B (en) 2022-03-31 2022-03-31 Data writing method, device and equipment of smart card and storage medium

Country Status (1)

Country Link
CN (1) CN114756440B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479361A (en) * 2010-11-23 2012-05-30 天津中兴软件有限责任公司 Method for removing abnormal conditions of terminals of non-contact smart cards
CN106709386A (en) * 2016-12-30 2017-05-24 金邦达有限公司 Smart card data writing method and device
JP2020013212A (en) * 2018-07-13 2020-01-23 株式会社東芝 Portable electronic device, IC card, and issuing device
CN112269825A (en) * 2020-11-13 2021-01-26 中盈优创资讯科技有限公司 Method and device for ETL (extract transform and load) analysis abnormal data retention
CN112990729A (en) * 2021-03-26 2021-06-18 重庆烯宇新材料科技有限公司 Code scanning tracing interception operating system scheme

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440175A (en) * 2013-08-06 2013-12-11 北京数码视讯科技股份有限公司 Method and device for handling exception of intelligent card
US11455230B2 (en) * 2019-11-20 2022-09-27 International Business Machines Corporation Event specific log file generation
CN116361862A (en) * 2019-12-04 2023-06-30 楚天龙股份有限公司 Method and device for checking personalized data of IC card and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479361A (en) * 2010-11-23 2012-05-30 天津中兴软件有限责任公司 Method for removing abnormal conditions of terminals of non-contact smart cards
CN106709386A (en) * 2016-12-30 2017-05-24 金邦达有限公司 Smart card data writing method and device
JP2020013212A (en) * 2018-07-13 2020-01-23 株式会社東芝 Portable electronic device, IC card, and issuing device
CN112269825A (en) * 2020-11-13 2021-01-26 中盈优创资讯科技有限公司 Method and device for ETL (extract transform and load) analysis abnormal data retention
CN112990729A (en) * 2021-03-26 2021-06-18 重庆烯宇新材料科技有限公司 Code scanning tracing interception operating system scheme

Also Published As

Publication number Publication date
CN114756440A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
CN112181854B (en) Method, device, equipment and storage medium for generating process automation script
CN108763051B (en) Electronic device, transaction software running risk early warning method and storage medium
CN111026080A (en) Hardware-in-loop test method and device for controller
CN112948233A (en) Interface testing method, device, terminal equipment and medium
CN114816993A (en) Full link interface test method, system, medium and electronic equipment
CN111143434A (en) Intelligent data checking method, device, equipment and storage medium
CN111367890A (en) Data migration method and device, computer equipment and readable storage medium
CN110837429A (en) Intelligent repairing method and device for online codes of web terminal
CN113220568A (en) Method, device and medium for testing USIM card file system
CN114756440B (en) Data writing method, device and equipment of smart card and storage medium
CN112445490A (en) File sequence processing method and device, terminal equipment and storage medium
CN112559363A (en) Test case generation method, system, equipment and medium based on full link marking
CN109584091B (en) Generation method and device of insurance image file
CN111309746A (en) Asynchronous parallel data synchronization method and device
CN116166629A (en) File format conversion method, device, equipment and readable storage medium
CN110648219B (en) Method and device for standardizing input area of bank transaction system
CN113284141A (en) Model determination method, device and equipment for defect detection
CN112686019A (en) Vehicle sensor data analysis method, device and storage medium
CN113590581A (en) Data transmission method, device, equipment and storage medium
CN108415814B (en) Method for automatically recording field change, application server and computer readable storage medium
CN113238969B (en) Interface automation test method, device, equipment and storage medium
CN117076546B (en) Data processing method, terminal device and computer readable storage medium
CN117669518A (en) File generation method, system, computer device and storage medium
CN113743948A (en) Method and device for generating transaction information file, electronic equipment and storage medium
CN117094259A (en) Static time sequence analysis environment configuration method and device for integrated circuit

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