CN114138205A - Data card reading and writing method and device and related equipment - Google Patents

Data card reading and writing method and device and related equipment Download PDF

Info

Publication number
CN114138205A
CN114138205A CN202111489766.7A CN202111489766A CN114138205A CN 114138205 A CN114138205 A CN 114138205A CN 202111489766 A CN202111489766 A CN 202111489766A CN 114138205 A CN114138205 A CN 114138205A
Authority
CN
China
Prior art keywords
data
data card
card
client
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111489766.7A
Other languages
Chinese (zh)
Inventor
沈焕东
夏星桥
彭慧娉
张旭萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Deeking Cloud Computing Co ltd
Original Assignee
Kingdee Deeking Cloud Computing 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 Kingdee Deeking Cloud Computing Co ltd filed Critical Kingdee Deeking Cloud Computing Co ltd
Priority to CN202111489766.7A priority Critical patent/CN114138205A/en
Publication of CN114138205A publication Critical patent/CN114138205A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data card reading and writing method, which is applied to a server and comprises the steps of obtaining data card state information from a client according to a data card operation command; when the data card state information is a card to be written, acquiring target data, and sending the target data to the client so that the client writes the target data into the data card; when the data card state information is the card to be read, reading a first storage directory of the client to obtain read data; the read data is obtained by the client reading the data card; the data card reading and writing method can effectively improve the data card reading and writing efficiency and improve the user experience. The application also discloses another data card reading and writing method, a data card reading and writing device, computer equipment and a computer readable storage medium, which have the beneficial effects.

Description

Data card reading and writing method and device and related equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data card read/write method and apparatus, a computer device, and a computer-readable storage medium.
Background
In retail stores, a card reader is a very important device, mainly for reading membership cards, bank cards, and the like. As shown in fig. 1, fig. 1 is a timing diagram Of remotely reading and writing an IC card in a retail POS (Point Of Sale) system in the prior art, and in the case Of remote connection, a card reader is connected to read and write the IC card by opening a port Of a remote computer.
Disclosure of Invention
The data card reading and writing method can effectively improve the reading and writing efficiency of the data card and improve the user experience; another object of the present application is to provide another data card reading and writing method, a data card reading and writing device, a computer device, and a computer readable storage medium, all having the above beneficial effects.
In a first aspect, the present application provides a data card read-write method, applied to a server, including:
acquiring data card state information from a client according to a data card operation command;
when the data card state information is a card to be written, acquiring target data, and sending the target data to the client so that the client writes the target data into the data card;
when the data card state information is the card to be read, reading a first storage directory of the client to obtain read data; and the read data is obtained by reading the data card by the client.
Optionally, the obtaining the data card status information from the client according to the data card operation command includes:
reading the state information of the data card from a second storage directory of the client according to the data card operation command; and the data card state information is obtained by reading from the data card after the client receives the data card connection information.
Optionally, the reading the first storage directory of the client, and after obtaining the read data, further includes:
sending a data reading success instruction to the client so that the client modifies the state information of the data card according to the data reading success instruction;
the above scheme further comprises:
and when the read data is not obtained from the first storage directory, sending a data reading failure instruction to the client so that the client modifies the state information of the data card according to the data reading failure instruction.
Optionally, before obtaining the data card status information from the client according to the data card operation command, the method further includes:
and receiving the data card operation command sent by the client based on the data card connection information.
Optionally, before obtaining the data card status information from the client according to the data card operation command, the method further includes:
and responding to the data card operation command according to a preset time interval.
In a second aspect, the present application further discloses another data card read-write method, applied to a client, including:
when receiving the data card connection information, acquiring the data card state information;
when the state information of the data card is the card to be read, reading the data card to obtain read data, and storing the read data into a first storage directory for a server to read;
and when the state information of the data card is the card to be written, writing the target data into the data card under the condition of receiving the target data sent by the server.
Optionally, the writing the target data into the data card includes:
writing the target data into the data card through a preset reading and writing tool;
the reading the data card to obtain read data, including:
and reading the data card by the preset reading and writing tool to obtain the read data.
Optionally, after writing the target data into the data card, the method further includes:
acquiring a data writing result fed back by the data card;
and modifying the state information of the data card according to the data writing result.
In a third aspect, the present application further discloses a data card read/write apparatus, applied to a server, including:
the server side information acquisition module is used for acquiring the state information of the data card from the client side according to the data card operation command;
the server card writing module is used for acquiring target data when the data card state information is a card to be written, and sending the target data to the client so that the client writes the target data into the data card;
the server-side card reading module is used for reading a first storage directory of the client side to obtain read data when the state information of the data card is to be read; and the read data is obtained by reading the data card by the client.
In a fourth aspect, the present application further discloses another data card read/write apparatus, which is applied to a client, and includes:
the client side information acquisition module is used for acquiring the state information of the data card when receiving the data card connection information;
the client card reading module is used for reading the data card to obtain read data when the state information of the data card is to be read, and storing the read data into a first storage directory for the server to read;
and the client card writing module is used for writing the target data into the data card under the condition of receiving the target data sent by the server when the state information of the data card is the card to be written.
In a fifth aspect, the present application further discloses a computer device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of any data card reading and writing method when the computer program is executed.
In a sixth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any of the data card reading and writing methods described above.
In a seventh aspect, the present application further discloses a computer program product, where the computer program product includes a computer program, and the computer program is executed by a processor to implement the steps of any of the data card reading and writing methods described above.
The data card reading and writing method is applied to a server and comprises the steps of obtaining data card state information from a client according to a data card operation command; when the data card state information is a card to be written, acquiring target data, and sending the target data to the client so that the client writes the target data into the data card; when the data card state information is the card to be read, reading a first storage directory of the client to obtain read data; and the read data is obtained by reading the data card by the client.
Therefore, according to the data card reading and writing method provided by the application, the server side is connected with the client side, when the data card needs to be written, the server side sends the target data to the client side, and the client side writes the target data into the data card; when the data card needs to be read, the client side directly reads the data card to obtain read data, and local storage is performed, so that the server side can directly read the local storage of the client side to obtain the read data. Therefore, the read-write operation of the data card is realized directly based on the local client, the data card read-write operation is not required to be carried out by opening a remote computer port, the read-write efficiency of the data card is effectively improved, and the user experience is further improved.
Another data card reading and writing method, another data card reading and writing device, a computer readable storage medium, and a computer program product provided by the present application all have the above beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
FIG. 1 is a timing diagram of a prior art retail POS system for remotely reading and writing an IC card;
fig. 2 is a schematic flow chart of a data card read/write method provided in the present application;
FIG. 3 is a schematic flow chart illustrating another method for reading and writing a data card according to the present application;
FIG. 4 is a flow chart of reading and writing an IC card provided by the present application;
FIG. 5 is a timing diagram illustrating a method for reading and writing an IC card according to the present application;
fig. 6 is a schematic structural diagram of a data card read/write apparatus provided in the present application;
FIG. 7 is a schematic structural diagram of another data card reading/writing apparatus provided in the present application;
fig. 8 is a schematic structural diagram of a computer device provided in the present application.
Detailed Description
The core of the application is to provide a data card reading and writing method, which can effectively improve the reading and writing efficiency of the data card and improve the user experience; another core of the present application is to provide another data card reading and writing method, a data card reading and writing device, a computer device, and a computer readable storage medium, all having the above beneficial effects.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data card reading and writing method.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data card reading and writing method provided in the present application, where the data card reading and writing method is applied to a server and may include:
s101: acquiring data card state information from a client according to a data card operation command;
the method comprises the steps of obtaining data card state information, wherein the data card state information is the current state of the data card and comprises a card to be written state and a card to be read state, the card to be written state indicates that the data card needs to be written currently, and the card to be read state indicates that the data card needs to be read currently.
In the embodiment of the present application, the data card is also called an electronic data card, and can support reading and writing of electronic data, for example, the data card includes, but is not limited to, a magnetic card, a barcode card, an Integrated Circuit (IC) card, and an Identification (ID) card.
In some embodiments, when the server receives a data card operation command, the server may obtain data card status information from a client according to the data card operation command, where the client is a local client directly connected to a card reader and may be connected to the server to implement data communication; the server is connected to the client through a network, which may be a local area network or a wide area network, and may be an internet network (e.g., an edge network, a cloud network, etc.). When the server is connected with the client through the internet, the server is a remote server at the moment, and the data card reading and writing are realized based on the remote connection. For example, in a cash register system, a local client is connected with a remote server to implement read-write operation of an IC card, and the remote server can obtain state information of the IC card from the local client when receiving a data card operation command, and then implement read-write operation of the IC card according to the state information. In some embodiments, the remote server may also be operated by the remote client, so as to affect the read-write process of the data card.
The data card operation command is used to notify the server that the data card needs to be read and written, and of course, whether the read operation or the write operation is determined by the server is not determined, and the determination needs to be further performed by acquiring the state information of the data card.
It should be noted that the client related to the embodiments of the present application may be provided by a terminal device, and the server related to the embodiments of the present application may be provided by a server. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data and an artificial intelligence platform. The terminal device may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, and the embodiment of the present application is not limited.
In an embodiment of the application, the acquiring of the data card status information from the client according to the data card operation command may include: reading and obtaining data card state information from a second storage directory of the client according to the data card operation command; the data card state information is obtained by the client end through reading from the data card after receiving the data card connection information.
The embodiment of the application provides an implementation method for reading data card state information, namely, a server reads a local storage of a client, namely the second storage directory, so as to obtain the data card state information. When the client senses the data card connection information, that is, when it senses that a data card is inserted (or connected), the client reads the information of the data card to determine the state of the data card, for example, if the data card is an empty card, it indicates that the data card is in a card writing state, and if the data card is not an empty card, it indicates that the data card is in a card reading state, so that after the data card state information is obtained, the data card state information can be stored in a local second storage directory for the server to read.
Of course, the second storage directory is only an implementation manner for storing the data card status information provided in the preferred embodiment, and is not unique, and any storage medium may be selected to implement storage of the data card status information, which is not limited in this application.
In an embodiment of the application, before obtaining the data card status information from the client according to the data card operation command, the method may further include: and receiving a data card operation command sent by the client based on the data card connection information.
The embodiment of the application provides a method for acquiring a data card operating command, namely, the data card operating command can be sent to a server by a client, so that the server can acquire data card state information based on the data card operating command. As described above, after the client senses the data card connection information, the client may determine the data card status information by reading the data card and store the data card status information in the second storage directory, and based on this, may simultaneously initiate a data card operation command to the server to notify the server of acquiring the data card status information.
In an embodiment of the application, before obtaining the data card status information from the local client according to the data card operation command, the method may further include: and responding to the data card operation command according to a preset time interval.
The embodiment of the application provides another method for acquiring the data card operating command, which can set a timing mechanism for the server, so that the server can respond to the data card operating command according to a preset time interval, and further acquire the state information of the data card. The specific value of the preset time interval does not affect the implementation of the technical scheme, and the specific value is set by a technician according to the actual situation, which is not limited by the application.
It can be understood that, the two implementation manners may be set by a skilled person according to an actual requirement, or may be set simultaneously, which is not limited in this application.
S102: when the data card state information is a card to be written, acquiring target data, and sending the target data to a client so that the client writes the target data into the data card;
this step is intended to implement the write operation of the data card. When the data card state information is the card to be written, the server side can acquire target data (namely data information needing to be written into the data card) and send the target data to the client side; further, the client can send the target data to the data card, and the data card writing operation based on the client is realized. The implementation process of the server acquiring the target data may include: the server initiates a data acquisition request to a corresponding client (namely, a remote client) based on the data card state information, the remote client displays prompt information for requesting to acquire target data on a front-end interface, so that a technician can input the target data on the front-end interface according to the prompt information and feed the target data back to the server by the remote client, and therefore, the target data is acquired at the server. For example, the target data includes, but is not limited to, user information, financial information, and rights information associated with the data card.
S103: when the state information of the data card is the card to be read, reading a first storage directory of the client to obtain read data; and the read data is obtained by reading the data card by the client.
This step is intended to enable a read operation of the data card. As described above, after the client senses the data card connection information, the client may determine the data card status information by reading the data card and store the data card status information in the second storage directory, and meanwhile, when the data card status information is the card to be read, the client may simultaneously read the data information stored in the data card, obtain the read data, and locally store the read data, that is, store the read data in the first storage directory. Therefore, when the state information of the data card is the card to be read, the server side can directly read the first storage directory of the client side to obtain the read data of the data card. Of course, the first storage directory and the second storage directory may be the same storage directory or different storage directories, which is not limited in this application. After the server side obtains the read data, the read data can be stored to a specific storage location, such as a database or a block chain, and corresponding services, such as banking services, can also be executed according to the read data.
In an embodiment of the application, after obtaining the read data, the reading the first storage directory of the client further includes: and sending a data reading success instruction to the client so that the client modifies the state information of the data card according to the data reading success instruction.
The data card reading and writing method provided by the embodiment of the application aims to realize the updating function of the state information of the data card. After the server side obtains the read data, a data reading success instruction can be sent to the client side, and therefore the client side can modify the state information of the data card from the card to be read to the card reading success according to the data reading success instruction. Certainly, when the server side reads the client side and fails to obtain the read data, a data reading failure instruction can be fed back to the client side, and therefore the client side can modify the state information of the data card from the card to be read into card reading failure according to the data reading failure instruction, and technicians can obtain the data reading result of the data card in time. In addition, under the condition of card reading failure, the client can further output a card reading failure prompt so that technicians can trace the source of the abnormality in time.
Therefore, according to the data card reading and writing method provided by the application, the server side is connected with the client side, when the data card needs to be written, the server side sends the target data to the client side, and the client side writes the target data into the data card; when the data card needs to be read, the client side directly reads the data card to obtain read data, and local storage is performed, so that the server side can directly read the local storage of the client side to obtain the read data. Therefore, the read-write operation of the data card is directly realized based on the local client, and the data card read-write operation is not required to be carried out by opening a remote computer port, so that the read-write efficiency of the data card is effectively improved, and the user experience is further improved.
The embodiment of the application provides another data card reading and writing method.
Referring to fig. 3, fig. 3 is a schematic flow chart of a data card reading and writing method provided in the present application, where the data card reading and writing method is applied to a client and may include:
s201: when receiving the data card connection information, acquiring the data card state information;
this step is intended to achieve the acquisition of data card status information. When the client senses the connection information of the data card, namely senses the insertion (connection) of the data card, the client can read the information of the data card to determine the state of the data card, so that the state information of the data card is obtained. Furthermore, the client can locally store the state information of the data card for the server to read, and then perform corresponding read-write operation on the data card.
S202: when the state information of the data card is the card to be read, reading the data card to obtain read data, and storing the read data into a first storage directory for a server to read;
this step is intended to enable a read operation of the data card. When the data card state information is the card to be read, the client can directly read the data card to obtain corresponding read data, and locally store the read data, namely store the read data in the first storage directory for the server to read.
S203: and when the state information of the data card is the card to be written, writing the target data into the data card under the condition of receiving the target data sent by the server.
This step is intended to implement the write operation of the data card. When the data card state information is the card to be written, the server side sends target data to the client side according to the data card state information, the target data is the data needing to be written into the data card, therefore, the client side can write the received target data into the data card, and therefore writing operation on the data card is completed.
In an embodiment of the application, the writing the target data into the data card may include: writing the target data into the data card through a preset reading and writing tool; the obtaining of the read data by the read data card may include: and reading the data card by a preset reading and writing tool to obtain read data. For example, the client may store a preset read/write tool, which operates a serial interface (SerialPort) to read and write data.
It can be understood that the data card read-write method provided by the embodiment of the application aims to realize the read-write operation of the data card through the client, and when the data card is read-write operated through the client, the read-write tool preset at the client can be specifically used for performing the read-write operation on the data card, so that when the data card is written, the preset read-write tool is operated to write target data into the data card; when the data card is read, the data card can be read by operating a preset reading and writing tool to obtain read data. Of course, the setting and updating of the data card status information at the client may also be implemented by the preset read-write tool.
The client can establish a shared folder to store the preset read-write tool in the shared folder, and further, the client can realize the operation of the preset read-write tool through the corresponding plug-in. In addition, the data card state information acquired by the client and the read data acquired when the data card is read can be respectively stored in different storage directories in the shared folder.
It should be noted that the preset read/write tool integrates two functions of reading and writing at the same time, but in some embodiments, the preset read/write tool may be subdivided into a preset read tool and a preset write tool, where the preset read tool is dedicated to the function of reading data, and the preset write tool is dedicated to the function of writing data.
In an embodiment of the application, after writing the target data into the data card, the method may further include: acquiring a data writing result fed back by the data card; and modifying the state information of the data card according to the data writing result.
The data card reading and writing method provided by the embodiment of the application can realize the updating function of the state information of the data card. After writing the target data into the data card, the data card will feed back the result of the write data to the client, such as a successful card write or a failed card write. Therefore, the client can modify the state information of the data card according to the data writing result, when the data writing result is the card writing failure, the state information of the data card can be changed from the card to be written to the card writing failure, and when the data writing result is the card writing success, the state information of the data card can be changed from the card to be written to the card writing success, so that a technician can timely know the data writing result of the data card. In addition, under the condition of card writing failure, the client can further output a card writing failure prompt so that technicians can trace the source of the abnormality in time.
Therefore, according to the data card reading and writing method provided by the application, the server side is connected with the client side, when the data card needs to be written, the server side sends the target data to the client side, and the client side writes the target data into the data card; when the data card needs to be read, the client side directly reads the data card to obtain read data, and local storage is performed, so that the server side can directly read the local storage of the client side to obtain the read data. Therefore, the read-write operation of the data card is directly realized based on the local client, and the data card read-write operation is not required to be carried out by opening a remote computer port, so that the read-write efficiency of the data card is effectively improved, and the user experience is further improved.
Based on the above embodiments, taking an IC card as an example, the present application provides an IC card read-write method.
Referring to fig. 4 and fig. 5, fig. 4 is a read-write flow chart of an IC card provided in the present application, where a server is a remote server (for example, a server of a cash register system), and a client is a local client (for example, a client of the cash register system); fig. 5 is a timing chart of an IC card read/write method provided in the present application, in which an S-disk sharing folder is installed in a local client, and the local client is remotely connected to a server (remote server).
For example, when a retail POS is remotely connected, a shared folder may be added at a local client, and a tool (a preset read/write tool) for reading and writing an IC card is provided in the shared folder and serves as a bridge between a cash register system and a card reader, on this basis, the IC card read/write method is implemented as follows:
(1) all parameter information (parameter information of serial ports for inserting the IC card) is written into a configuration file \ \ tsclient \ s \ SerialPort \ setting. The 'SerialPort' directory is manually created in advance, and in the actual operation process, the client plug-in is automatically created; ini is the configuration file name.
(2) The read/write tool is transferred to the \ \ tsclient \ s \ SerialPort directory (the storage directory for storing the read/write tool, which may be considered a third storage directory). Wherein if the read-write tool has already been transmitted to the local client, no retransmission is required.
(3) And the plug-in unit of the cloud client (the client corresponding to the server, namely the remote client) runs the read-write tool, and the read-write tool reads the configuration file and restores all the parameter information.
(4) The serial port reading operation is executed through the reading and writing tool, and the read result is stored in the S: \ SerialPort \ result.
(5) Ini has a state status value of 3: when the card information is to be read, the remote server side continues to read \ \ tsclient \ s \ SerialPort \ result.ini to obtain read data, the read data is displayed on the remote client side, meanwhile, the local client side is informed that the data is successfully read, and a read-write tool rewrites the result.ini to have a state value of 4: the card information is successfully read.
(6) Ini is 0: and (3) preparing the card to be manufactured, wherein the remote server side acquires data to be written (corresponding to the target data) and feeds the data back to the local client side, the local client side writes the data to be written into the IC card through a read-write tool, and rewrites the state value of result.ini to be 1: the card making is successful.
Ini, the state of result:
0: card preparation waiting, 1: successful card making, 2: card making failure, 3: card information to be read, 4: card information reading success, 5: reading the card information fails.
In addition, the remote server can poll the result of the S disk every 3 to 5 seconds, and inform the read-write tool in the shared folder to perform read-write work according to the state value of 3 or 0. In the above example, the storage directory in which result.ini is located is both the first storage directory and the second storage directory.
Therefore, in the IC card read-write method provided by the embodiment of the present application, the server establishes a connection with the client, and when the IC card needs to be written, the server sends the target data to the client, and the client writes the target data into the IC card; when the IC card needs to be read, the client side directly reads the IC card to obtain read data, and local storage is performed, so that the server side can directly read the local storage of the client side to obtain the read data. Therefore, the read-write operation of the IC card is directly realized based on the local client, and the IC card read-write operation is not required to be carried out by opening a remote computer port, so that the read-write efficiency of the IC card is effectively improved, and the user experience is further improved.
The embodiment of the application provides a data card reading and writing device.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data card reading/writing device provided in the present application, where the data card reading/writing device is applied to a server, and may include:
the server side information obtaining module 1 is used for obtaining the state information of the data card from the client side according to the data card operation command;
the server card writing module 2 is used for acquiring target data when the data card state information is a card to be written, and sending the target data to the client so that the client writes the target data into the data card;
the server card reading module 3 is used for reading a first storage directory of the client to obtain read data when the state information of the data card is to be read; and the read data is obtained by reading the data card by the client.
Therefore, in the data card reading and writing device provided by the embodiment of the application, the server establishes connection with the client, when the data card needs to be written, the server sends the target data to the client, and the client writes the target data into the data card; when the data card needs to be read, the client side directly reads the data card to obtain read data, and local storage is performed, so that the server side can directly read the local storage of the client side to obtain the read data. Therefore, the read-write operation of the data card is directly realized based on the local client, and the data card read-write operation is not required to be carried out by opening a remote computer port, so that the read-write efficiency of the data card is effectively improved, and the user experience is further improved.
In an embodiment of the present application, the server-side information obtaining module 1 may be configured to read and obtain data card status information from a second storage directory of the client according to a data card operation command; the data card state information is obtained by the client end through reading from the data card after receiving the data card connection information.
In an embodiment of the present application, the data card reading/writing device may further include a card reading feedback module, configured to: after the first storage directory of the client is read and the read data is obtained, a data reading success instruction is sent to the client, so that the client modifies the state information of the data card according to the data reading success instruction; and when the read data is not obtained from the first storage directory, sending a data reading failure instruction to the client so that the client modifies the state information of the data card according to the data reading failure instruction.
In an embodiment of the present application, the data card reading/writing device may further include a command receiving module, configured to receive a data card operating command sent by the client based on the data card connection information before the data card status information is obtained from the client according to the data card operating command.
In an embodiment of the present application, the data card reading/writing device may further include a command response module, configured to respond to the data card operation command at a preset time interval.
For the introduction of the device provided in the present application, reference is made to the above-described method embodiments.
The embodiment of the application provides a data card reading and writing device.
Referring to fig. 7, fig. 7 is a schematic structural diagram of another data card read/write apparatus provided in the present application, where the data card read/write apparatus is applied to a client, and the data card read/write apparatus may include:
the client side information acquisition module 4 is used for acquiring the state information of the data card when receiving the data card connection information;
the client card reading module 5 is used for reading the data card to obtain read data when the state information of the data card is the card to be read, and storing the read data into a first storage directory for the server to read;
and the client card writing module 6 is used for writing the target data into the data card when the state information of the data card is the card to be written and the target data sent by the server is received.
In an embodiment of the present application, the client card writing module 6 may be specifically configured to write target data into a data card through a preset read/write tool; the client card reading module 5 may be specifically configured to read a data card through a preset reading/writing tool to obtain read data.
In an embodiment of the present application, the data card reading/writing device may further include a card writing feedback module, configured to obtain a data writing result fed back by the data card after the target data is written into the data card; and modifying the state information of the data card according to the data writing result.
For the introduction of the device provided in the present application, reference is made to the above-described method embodiments.
The embodiment of the application provides computer equipment.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a computer device provided in the present application, where the computer device may include:
a memory 10 for storing a computer program;
the processor 20, when executing the computer program, may implement the steps of any of the above-described data card reading and writing methods.
As shown in fig. 8, which is a schematic diagram of a constituent structure of a computer device, the computer device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through a communication bus 13.
In the embodiment of the present application, the processor 10 may be a Central Processing Unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
The processor 10 may call a program stored in the memory 11, and in particular, the processor 10 may perform operations in an embodiment of a data card reading and writing method.
The memory 11 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, in this embodiment, the memory 11 stores at least the program for implementing the following functions:
acquiring data card state information from a client according to a data card operation command;
when the data card state information is a card to be written, acquiring target data, and sending the target data to a client so that the client writes the target data into the data card;
when the state information of the data card is the card to be read, reading a first storage directory of the client to obtain read data; and the read data is obtained by reading the data card by the client.
In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created during use.
Further, the memory 11 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The communication interface 12 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 8 does not constitute a limitation of the computer device in the embodiment of the present application, and in practical applications, the computer device may include more or less components than those shown in fig. 8, or some components may be combined.
The embodiment of the application provides a computer-readable storage medium, a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program can realize the steps of any one of the data card reading and writing methods.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the methods for reading and writing a data card as described above.
It should be noted that, the information (including but not limited to user information, device information, etc.) and data (including but not limited to read data, target data, etc.) referred to in the embodiments of the present application are information and data authorized by the user or sufficiently authorized by each party, and the processing procedure of the information and data also complies with the regulations of the relevant laws and regulations.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall into the protection scope of the present application.

Claims (10)

1. A data card read-write method is characterized in that the method is applied to a server and comprises the following steps:
acquiring data card state information from a client according to a data card operation command;
when the data card state information is a card to be written, acquiring target data, and sending the target data to the client so that the client writes the target data into the data card;
when the data card state information is the card to be read, reading a first storage directory of the client to obtain read data; and the read data is obtained by reading the data card by the client.
2. The method for reading and writing the data card according to claim 1, wherein the obtaining the status information of the data card from the client according to the operation command of the data card comprises:
reading the state information of the data card from a second storage directory of the client according to the data card operation command; and the data card state information is obtained by reading from the data card after the client receives the data card connection information.
3. The data card read-write method according to claim 1, wherein after reading the first storage directory of the client and obtaining the read data, the method further comprises:
sending a data reading success instruction to the client so that the client modifies the state information of the data card according to the data reading success instruction;
the method further comprises the following steps:
and when the read data is not obtained from the first storage directory, sending a data reading failure instruction to the client so that the client modifies the state information of the data card according to the data reading failure instruction.
4. The data card reading and writing method according to claim 1, wherein before obtaining the data card status information from the client according to the data card operation command, the method further comprises:
and receiving the data card operation command sent by the client based on the data card connection information.
5. A data card read-write method is applied to a client and comprises the following steps:
when receiving the data card connection information, acquiring the data card state information;
when the state information of the data card is the card to be read, reading the data card to obtain read data, and storing the read data into a first storage directory for a server to read;
and when the state information of the data card is the card to be written, writing the target data into the data card under the condition of receiving the target data sent by the server.
6. The method as claimed in claim 5, further comprising, after writing the target data to the data card:
acquiring a data writing result fed back by the data card;
and modifying the state information of the data card according to the data writing result.
7. A data card read-write equipment, characterized by that, apply to the server, comprising:
the server side information acquisition module is used for acquiring the state information of the data card from the client side according to the data card operation command;
the server card writing module is used for acquiring target data when the data card state information is a card to be written, and sending the target data to the client so that the client writes the target data into the data card;
the server-side card reading module is used for reading a first storage directory of the client side to obtain read data when the state information of the data card is to be read; and the read data is obtained by reading the data card by the client.
8. A data card read-write equipment, characterized by that, apply to the customer end, comprising:
the client side information acquisition module is used for acquiring the state information of the data card when receiving the data card connection information;
the client card reading module is used for reading the data card to obtain read data when the state information of the data card is to be read, and storing the read data into a first storage directory for the server to read;
and the client card writing module is used for writing the target data into the data card under the condition of receiving the target data sent by the server when the state information of the data card is the card to be written.
9. A computer device, comprising:
a memory for storing a computer program;
processor for implementing the steps of the data card reading and writing method according to any one of claims 1 to 4, or the steps of the data card reading and writing method according to claim 5 or 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data card reading and writing method according to any one of claims 1 to 4, or the steps of the data card reading and writing method according to claim 5 or 6.
CN202111489766.7A 2021-12-07 2021-12-07 Data card reading and writing method and device and related equipment Pending CN114138205A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111489766.7A CN114138205A (en) 2021-12-07 2021-12-07 Data card reading and writing method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111489766.7A CN114138205A (en) 2021-12-07 2021-12-07 Data card reading and writing method and device and related equipment

Publications (1)

Publication Number Publication Date
CN114138205A true CN114138205A (en) 2022-03-04

Family

ID=80384895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111489766.7A Pending CN114138205A (en) 2021-12-07 2021-12-07 Data card reading and writing method and device and related equipment

Country Status (1)

Country Link
CN (1) CN114138205A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049776A (en) * 2012-12-31 2013-04-17 中国电子科技集团公司第十五研究所 File exchange based B/S system card reading and writing method
CN109697489A (en) * 2018-12-24 2019-04-30 郑州畅想高科股份有限公司 A kind of engineering remote data interaction emergency method and system
CN111931883A (en) * 2020-07-28 2020-11-13 西安奥枫软件有限公司 IC card system capable of cloud reading and writing and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049776A (en) * 2012-12-31 2013-04-17 中国电子科技集团公司第十五研究所 File exchange based B/S system card reading and writing method
CN109697489A (en) * 2018-12-24 2019-04-30 郑州畅想高科股份有限公司 A kind of engineering remote data interaction emergency method and system
CN111931883A (en) * 2020-07-28 2020-11-13 西安奥枫软件有限公司 IC card system capable of cloud reading and writing and method thereof

Similar Documents

Publication Publication Date Title
US10540273B2 (en) Simulator for system testing
US7472394B1 (en) System and method for programming point of sale devices
CN111507717B (en) Data processing method, device, block node and computer readable storage medium
US20220414175A1 (en) System and Method for Sharing Information Using a Machine-Readable Code on a Mobile Device
CN110895472A (en) Method and device for identifying service change
CN111222869A (en) Transaction data processing method, device, computer equipment and medium
CN111078506A (en) Business data batch running task monitoring method and device
US11593770B2 (en) System for transmitting payment information using mobile terminal and method thereof
CN114036495B (en) Method and device for updating privatized deployment verification code system
CN113986747A (en) Data generation method and device, electronic equipment and storage medium
CN112187829B (en) Online transaction message processing method, device and system
CN113672488A (en) Log text processing method and device
EP2953078B1 (en) Secure access system and operating method method thereof
CN116661932A (en) Method, device, system and medium for preventing interface repeated submission based on tangent plane
CN116244764A (en) Method and system for generating device unique ID of Android device
CN108038403B (en) Card reading method based on NFC technology and client
CN114138205A (en) Data card reading and writing method and device and related equipment
WO2017143931A1 (en) Method and apparatus for identifying smart card, method and apparatus for processing smart card identification data, and device
CN112333262A (en) Data updating prompting method and device, computer equipment and readable storage medium
CN107169760B (en) Mapping card management method based on multiple media, data processing method and device
KR20180025402A (en) Off-line document tracking method and document tracking system
WO2021081704A1 (en) Two-dimensional payment code management method and device, payment system, and storage medium
CN108171027B (en) Online banking login method and device, computer equipment and storage medium
CN111585897A (en) Request route management method, system, computer system and readable storage medium
JP2001250087A (en) Method of processing sending of command apdu to ic card

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