CN117408268A - Card reading method of card service system, electronic equipment, card service system and storage medium - Google Patents

Card reading method of card service system, electronic equipment, card service system and storage medium Download PDF

Info

Publication number
CN117408268A
CN117408268A CN202311243090.2A CN202311243090A CN117408268A CN 117408268 A CN117408268 A CN 117408268A CN 202311243090 A CN202311243090 A CN 202311243090A CN 117408268 A CN117408268 A CN 117408268A
Authority
CN
China
Prior art keywords
card
reading
card reading
dynamic library
serial port
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
CN202311243090.2A
Other languages
Chinese (zh)
Inventor
毛成元
莫林
李川筑
翟孝明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Lidaxin Digital Education Technology Co ltd
Original Assignee
Xiamen Lidaxin Digital Education 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 Xiamen Lidaxin Digital Education Technology Co ltd filed Critical Xiamen Lidaxin Digital Education Technology Co ltd
Priority to CN202311243090.2A priority Critical patent/CN117408268A/en
Publication of CN117408268A publication Critical patent/CN117408268A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves

Landscapes

  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a card reading method of a card service system, electronic equipment, the card service system and a storage medium. The method comprises the following steps: detecting whether a card reading request is received; when a card reading request is received, calling a dynamic library, and reading card information of a target smart card through the dynamic library; and analyzing the card information to obtain the card number of the target smart card, and performing service operation on the smart card according to the card number. The card reading compatibility can be improved.

Description

Card reading method of card service system, electronic equipment, card service system and storage medium
Technical Field
The present disclosure relates to the field of card reading technologies of card systems, and in particular, to a card reading method of a card system, an electronic device, a card system, and a storage medium.
Background
Existing smart cards are generally embedded with microchips, and the appearance of smart cards greatly facilitates users. In some scenarios, the smart card may give corresponding user rights, and the user may implement rights authentication by means of the smart card, for example, community access control, warehouse access control, security authentication, or the like. The smart card generally needs to realize the authentication function of corresponding rights or information by inputting related information in advance.
The existing smart card identification is generally based on a B/S (browser/server) architecture, and dynamic library call is realized through an ActiveX control embedded in a browser, so that a user can identify smart card information in a USB card reader through the browser. The B/S architecture is convenient for users, and the users can finish corresponding business operations by using a browser without downloading related clients.
However, because the ActiveX control can interact directly with the operating system, some browsers cancel the embedded ActiveX control to invoke the dynamic library in view of security issues. Some browsers still support the ActiveX control to call the dynamic library, but the security level of the browser needs to be increased, and some potential safety hazards exist. The support degree of various browsers to the ActiveX control is different, so that the compatibility problem exists when a user calls the ActiveX control, and the complexity of the card reading process of the intelligent card is increased.
Disclosure of Invention
The application provides a card reading method of a card service system, electronic equipment, the card service system and a storage medium, so as to solve the problem that compatibility exists when a user calls a dynamic library due to different degrees of support of various browsers on an ActiveX control, and increase the complexity of a card reading process of an intelligent card.
In a first aspect, the present application provides a card reading method of a card service system, including:
detecting whether a card reading request is received;
when a card reading request is received, calling a dynamic library, and reading card information of a target smart card through the dynamic library;
and analyzing the card information to obtain the card number of the target smart card, and performing service operation on the smart card according to the card number.
In one possible implementation, when a card reading request is received, invoking a dynamic library, including:
detecting whether the card reading request is valid or not when the card reading request is received;
when the card reading request is valid, the dynamic library is invoked.
In one possible implementation, the dynamic library includes a card reading function, calls the dynamic library, and reads card information of the target smart card through the dynamic library, including:
and calling a card reading function in the dynamic library, and reading card information of the target smart card through the card reading function.
In one possible implementation, when the card information of the target smart card is read through the card reading function, the card reading method further includes:
judging whether the card reading function is successful;
and outputting a card reading failure signal when the card reading function is unsuccessful.
In one possible implementation, invoking the dynamic library and reading card information of the target smart card through the dynamic library includes:
detecting whether a serial port of the card service system is in an initialized state;
outputting an initialization abnormal signal when the serial port is not in an initialization state;
when the serial port is in an initialized state, the dynamic library is called, and card information of the target smart card is read through the dynamic library.
In one possible implementation, before detecting whether the card reading request is received, the card reading method further includes:
acquiring a serial port of the card service system, and detecting the state of the serial port, wherein the state comprises a normal state and an abnormal state;
outputting a serial port abnormal signal when the serial port is in an abnormal state;
when the serial port is in a normal state, the serial port is marked as an initialized state.
In a second aspect, the present application provides a card reader of a card transaction system, including:
the detection module is used for detecting whether a card reading request is received or not;
the control module is used for calling the dynamic library when receiving a card reading request and reading card information of the target intelligent card through the dynamic library;
and the analysis module is used for analyzing the card information to obtain the card number of the target intelligent card, and carrying out service operation on the intelligent card according to the card number.
In a third aspect, the present application provides an electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, the processor implementing the steps of the card reading method of the card transaction system as described above in the first aspect or any one of the possible implementations of the first aspect when the computer program is executed.
In a fourth aspect, the present application provides a card transaction system, including an electronic device according to the above third aspect.
In a fifth aspect, the present application provides a computer readable storage medium storing a computer program which when executed by a processor implements the steps of the card reading method of the card transaction system as described above in the first aspect or any one of the possible implementations of the first aspect.
The application provides a card reading method of a card service system, electronic equipment, the card service system and a storage medium, and whether a card reading request is received or not is detected; when a card reading request is received, calling a dynamic library, and reading card information of a target smart card through the dynamic library; and analyzing the card information to obtain the card number of the target smart card, and performing service operation on the smart card according to the card number. And reading card information of the intelligent card by calling the dynamic library, and further performing business operation on the intelligent card. The card reading method is suitable for most browsers, does not need to utilize an ActiveX control, has higher compatibility, reduces the complexity of a user in the card reading process, and improves the intelligent card reading efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a card service system according to an embodiment of the present application;
fig. 2 is a flowchart of an implementation of a card reading method provided in an embodiment of the present application;
fig. 3 is a card reading interaction signaling diagram provided in an embodiment of the present application;
FIG. 4 is a flowchart of another implementation of a card reading method according to an embodiment of the present disclosure;
fig. 5 is a flowchart of serial port initialization implementation provided in an embodiment of the present application;
FIG. 6 is a schematic flow chart of a startup service provided in an embodiment of the present application;
fig. 7 is a schematic diagram of a stop service flow provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a card reader of the card transaction system according to an embodiment of the present application;
fig. 9 is a schematic diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following description will be made with reference to the accompanying drawings by way of specific embodiments.
With the development of the internet, the C/S (client/server) architecture has gradually decreased, and instead the B/S architecture has been used. The B/S architecture enables a user to realize corresponding business operation through a browser without downloading a client. Particularly in the field of smart cards, users can realize information input and authority distribution of the smart cards through webpage operation.
Most of the existing browsers need to embed an ActiveX control to enable users to interact with the smart card through the browser. However, the embedded actigraphy control of the browser may bring a certain security risk to the user, and as the browser is continuously updated and iterated, the embedded actigraphy control is gradually optimized, and the browser gradually does not support the embedded actigraphy control, so that the user needs to interact with the smart card again through the client. The incompatibility of the browser and the interaction of the downloading client bring a plurality of inconveniences to the user, so that the card reading process of the user is complex, the use experience of the user is reduced, and the workload of research and development personnel is improved.
In order to solve the above problems, the embodiment of the application provides a card reading method of a card service system, which enables a user to read a smart card from a webpage end by calling a dynamic library without downloading a client and embedding an ActiveX control, thereby greatly improving card reading efficiency of the smart card and optimizing use experience of the user.
Fig. 1 is a schematic structural diagram of a card service system according to an embodiment of the present application, and as shown in fig. 1, the card service system may include a card service application module, a card reading module, and a card reader.
The card application module can be displayed on a Web page, is a module for interacting with a user, and is an application module capable of providing intelligent card reading service, information writing service and other business functions.
The card reading module can receive a card reading request of the card service application module, interact with the card reader, realize the intelligent card reading function, and feed back relevant information of the intelligent card to the card service application module, and can be a VB card reading module.
The card reader may be a device for reading smart card information using RF technology, and may be a USB card reader.
Referring to fig. 2, a flowchart of an implementation of a card reading method according to an embodiment of the present application is shown. As shown in fig. 2, a card reading method of the card service system may include S101 to S103.
S101, detecting whether a card reading request is received.
The card service system can detect whether a card reading request is received or not in real time.
Optionally, when the user clicks the card reading request through the Web page, the card application module may identify that the user requests to read the card. Or after the card reader identifies the smart card, the card service application module can automatically consider that the smart card is read, namely, a card reading request is received.
S102, when a card reading request is received, the dynamic library is called, and card information of the target smart card is read through the dynamic library.
When the card service application module recognizes the card reading request, the card reading request can be sent to the card reading module, wherein the card reading request is usually an HTTP request and is an asynchronous request.
When receiving a card reading request sent by the card service application module, the card reading module can call a dynamic library, wherein the dynamic library can be a C++ dynamic library. The dynamic library is a shared library, and is an executable file, and all processes can share or reference the content in the dynamic library.
The dynamic library comprises a plurality of functions which can be directly called, and has wide application range and exists in most intelligent terminals. In embodiments of the present application, a card reading function may be included in the dynamic library. When receiving the card reading request, the card reading function in the dynamic library can be directly called to realize the reading of the smart card.
In the embodiment of the application, the card reading module can start the HTTP service of the designated port to monitor whether the card reading request sent by the card application module is received.
Specifically, after receiving the card reading request sent by the card service application module, the card reading module can call the dynamic library by using the VB to refer to the dynamic library so as to read the card information of the smart card through the card reader.
Alternatively, the card information may include identity information, authority information, configuration information, or the like of the target smart card.
S103, analyzing the card information to obtain the card number of the target smart card, and performing service operation on the smart card according to the card number.
And reading card information of the smart card through the related functions in the dynamic library. After the card information of the smart card is obtained, the card information is analyzed, and the card number of the target smart card is intercepted from the card information. After the card number of the target smart card is obtained, the card number can be packaged, and the packaged card number is returned to the card service application module, so that the card service application module outputs the card number of the target smart card.
After the card number is output by the Web browser, the card application module can facilitate the user to perform related business operations according to the displayed card number, for example, permission change, information input or other business operations on the target smart card according to the card number.
Exemplary, fig. 3 is a card reading interaction signaling diagram provided by an embodiment of the present application, and as shown in fig. 3, a card reading method of the embodiment of the present application may include:
the user can click the card reading on the card application module in the Web browser, and the card application module sends a card reading request to the card reading module. And the card reading module calls the dynamic library after receiving the card reading request so as to realize serial port communication with the card reader, reads the card through the card reader and receives card information of the target smart card fed back from the card reader.
After receiving the card information, the card reading module analyzes the parameters of the card information to obtain the card number of the target smart card, encapsulates the card number and feeds back the card number to the card application module.
And after receiving the card number sent by the card reading module, the card application module displays the target smart card number to the user at an interface of the Web browser so that the user performs business operations such as authority allocation or information input on the target smart card. Wherein, the card number can be 8 bits.
The card reading method provided by the embodiment of the application is suitable for most browsers, an ActiveX control is not needed to be utilized, compatibility is higher, complexity of a user in a card reading process is reduced, and intelligent card reading efficiency is improved.
In some embodiments of the present application, invoking the dynamic library upon receipt of a card read request includes:
detecting whether the card reading request is valid or not when the card reading request is received;
when the card reading request is valid, the dynamic library is invoked.
Optionally, when the card reading module receives the card reading request sent by the card service application module, the card reader can be identified whether the target smart card is placed or not so as to detect whether the card reading request is valid or not.
Specifically, when the card reader is identified as not placing the target smart card, the card reading request is judged to be invalid, and the dynamic library can not be called. When the smart card is identified to be placed on the target smart card, the validity of the card reading request is judged, and a dynamic library can be called.
The card reading module and the card reader can perform serial communication.
Illustratively, the card reading process may be as follows:
first, it is determined whether it is a cross-domain snoop request: httprequest.httpremethod.toupper () = "OPTIONS".
If so, code 200 is returned.
Then, it is judged whether the parameter action satisfies the condition: request.query string ("action") = "ReadCard".
And if the condition is met, performing card reading operation.
According to the method and the device for reading the card, whether the card reading request is effective is detected, invalid card reading requests can be avoided, the frequency of calling the dynamic library is reduced, and the card reading flow is optimized.
In some embodiments of the present application, the dynamic library includes a card reading function, calls the dynamic library, and reads card information of the target smart card through the dynamic library, including:
and calling a card reading function in the dynamic library, and reading card information of the target smart card through the card reading function.
In the embodiment of the application, the card reading function may be an ID card reading function, the card information of the target smart card may be read through the card reader by calling the ID card reading function, the card information may include a serial number of the target smart card, and after obtaining the serial number of the target smart card, the eight-bit decimal card number may be returned in a character string manner.
According to the method and the device for reading the card information of the target smart card, the card information of the target smart card can be accurately read by calling the card reading function, an ActiveX control is not required to be used, and the smart card reading efficiency is improved.
In some embodiments of the present application, when the card information of the target smart card is read by the card reading function, the card reading method further includes:
judging whether the card reading function is successful;
and outputting a card reading failure signal when the card reading function is unsuccessful.
In the embodiment of the application, whether the card reading is successful can be judged through the return value of the card reading function.
Specifically, when the card reading function returns card information, the card reading success of the card reading function is judged. When the card reading function returns the card reading failure identifier, the card reading function is judged to be unsuccessful in card reading, and a card reading failure signal is output to remind a user of the card reading failure, so that the user can check conveniently, and invalid card reading is avoided.
Optionally, when the card reading function fails to read the card, the card reading module may output a card reading failure signal to the card service application module, for example, a text frame flick prompt of "card reading failure, please check" or "card reading failure this time, please read the card again". Or when the card reading function is unsuccessful, the card reading module can output a voice prompt of 'please read the card again' through the card service application module.
For example, the process of determining whether a card is successfully read may be as follows:
and calling a readCardSerNum function of a third-party dynamic library to judge the return value, and judging that the card reading is successful if the return value is 8 bits.
According to the embodiment of the application, the reliability of card reading can be improved by judging whether the card reading function is successful.
In some embodiments of the present application, invoking a dynamic library and reading card information of a target smart card through the dynamic library includes:
detecting whether a serial port of the card service system is in an initialized state;
outputting an initialization abnormal signal when the serial port is not in an initialization state;
when the serial port is in an initialized state, the dynamic library is called, and card information of the target smart card is read through the dynamic library.
In the embodiment of the application, the card reading module is connected with the card reader through the serial port to perform information interaction.
Optionally, when the card reading module detects that the serial port is not in the initialized state, it indicates that the connection between the card reading module and the card reader is abnormal, and at this time, the card reading module may output an initialized abnormal signal, such as a voice prompt or a text frame such as "serial port is abnormal" or "serial port connection error", to the card service application module.
When the serial port is detected to be in an initialized state, a card reading function in the dynamic library is called, and card information of the target smart card is read through the card reading function.
Fig. 4 is a flowchart illustrating another implementation of a card reading method according to an embodiment of the present application, and as shown in fig. 4, a card reading process is as follows:
after card reading is started, judging whether the serial port is in an initialized state;
if not, outputting an initialization abnormal signal;
if yes, calling a card reading function in the dynamic library to read the card.
Judging whether the card reading is successful;
if not, outputting a card reading failure signal;
if yes, reading card information of the target smart card, and returning an 8-bit card number.
Finally, after the card is successfully read, the encapsulated data is returned and ended.
According to the method and the device for reading the intelligent card, whether serial port initialization is successful or not and whether card reading is successful or not is judged, the intelligent card reading flow is optimized, and card reading efficiency is improved.
In some embodiments of the present application, before detecting whether a card reading request is received, the card reading method further includes:
acquiring a serial port of the card service system, and detecting the state of the serial port, wherein the state comprises a normal state and an abnormal state;
outputting a serial port abnormal signal when the serial port is in an abnormal state;
when the serial port is in a normal state, the serial port is marked as an initialized state.
In the embodiment of the application, the serial port is a serial port in an intelligent terminal where the card service system is located.
The card reading module can test whether the serial port can be communicated or not by calling a test function in the dynamic library so as to judge the state of the serial port. Wherein the test function may be a SendBeep function.
When the serial port is tested to be capable of being connected by using the test function, the serial port is judged to be in a normal state, and the serial port is marked to be in an initialized state.
When the serial port is tested to be unable to be passed by using the test function, the serial port is judged to be in an abnormal state, and a serial port abnormal signal is output so as to prompt the user that the current serial port is initialized to be failed and avoid the invalid card reading of the user.
For example, when the card reading module detects that the serial port is in an abnormal state, the card reading module may output a serial port abnormal signal, such as a "serial port initialization abnormal" voice prompt or a text box to the card application module.
Specifically, fig. 5 is a flowchart for implementing serial port initialization according to the embodiment of the present application, where the serial port initialization process is as follows:
firstly, information of all serial ports of the intelligent terminal where the card service system is located is obtained.
Secondly, traversing all serial ports.
And finally, calling a SendBeep function, and judging whether the serial port is successfully initialized by judging whether the serial port can be completely initialized.
If yes, the serial port number of the current serial port is cached, and the serial port is marked as an initialization state.
If not, outputting a serial port abnormal signal.
According to the method and the device for detecting the serial port initialization, whether the serial port initialization is normal or not is detected by calling the test function in the dynamic library, the problem that the serial port error causes invalid card reading can be effectively avoided, the card reading flow is optimized, and the card reading reliability is improved.
The card reading method of the embodiment of the application can be as follows:
the user clicks a card reading button on a card application module of the Web page, and the card application module sends a card reading request to the card reading module, wherein the card reading request can be an asynchronous http request.
After receiving the card reading request, the card reading module analyzes parameters of the card reading request to judge whether the card reading request is an effective card reading request.
And after the effective card reading request is made, calling a card reading function by using a VB reference dynamic library mode so as to read card information of the target smart card through the card reader.
After receiving the returned card information, analyzing the card information to obtain a card number, packaging the card number, and returning the card number to the card service application module so that a user can perform service operation on the corresponding intelligent card.
By way of example, four processes may be included to start the service, initialize parameters, read card numbers, and stop the service.
Fig. 6 is a schematic flow chart of a startup service provided in an embodiment of the present application, where, as shown in fig. 6, the startup service belongs to an internal call, and the procedure is as follows:
the method comprises the following steps: startHttpServer.
Entering into the ginseng: httpServer port number.
And (3) ginseng: and successfully returning to the Boolean true.
(1) Firstly, judging whether the intelligent terminal where the card service system is located supports the HttpListener, and if not, prompting abnormality. The intelligent terminal where the card service system is located can be an intelligent computer, and the application environment is a Windows operating system.
(2) And setting an access path and a serial port.
(3) Setting a request parameter allowing cross-domain.
(4) Starting an http request and monitoring the http request.
The initialization parameter belongs to an internal call, and specifically can be as shown in fig. 5, and the process is as follows:
the method comprises the following steps: initread (initializing reader).
Entering into the ginseng: and no.
And (3) ginseng: serial port number of card reader.
(1) Firstly, all available serial port information of an intelligent terminal where a card service system is located is acquired.
(2) Traversing all serial ports and attempting to send a SendBeep function for testing, and if not met, failing to return an initialization exception signal.
(3) The current serial number is cached and the initialization state is marked.
The reading of the card number belongs to an external call, and specifically can be as shown in fig. 4, and the process is as follows:
the method comprises the following steps: readCard.
Entering into the ginseng: serial port number, communication baud rate.
And (3) ginseng: an 8-bit 16-ary card number is returned.
(1) Firstly, judging an initialization state, and if abnormal, returning to an initialization abnormal signal.
(2) And calling a C++ dynamic library card reading function, and returning a card reading failure signal if the card reading failure signal fails.
(3) And 8-bit card numbers are intercepted, and the assembly data is returned.
Fig. 7 is a schematic diagram of a stop service flow provided in the embodiment of the present application, where, as shown in fig. 7, the stop service belongs to an internal call, and the procedure is as follows:
the method comprises the following steps: stophttpServer.
Entering into the ginseng: httpListener, thread.
And (3) ginseng: and no.
(1) Turning off the current http snoop, listener close ()
(2) Terminating the current thread, thread. Abort ()
(3) Destroying windows/services
According to the embodiment of the application, the interaction between the browser and the Windows operating system dynamic library is effectively realized on the premise of ensuring information security, and then the intelligent card reading is realized. The method can be compatible with the main stream browser, and does not need additional adapting work. The browser is avoided, so that the security level of the browser is reduced, and the computer security of a user is effectively ensured. The http protocol is used to avoid the occupation of system resources by the long connection mode of the ws protocol, and meanwhile, the problem of multi-window concurrency is solved. The method can be convenient for a user technical engineer to implement projects, and only a corresponding card reader program is required to be installed, so that the method is convenient and quick.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
The following are device embodiments of the present application, for details not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 8 is a schematic structural diagram of a card reader of the card transaction system according to the embodiment of the present application, and for convenience of explanation, only the portions relevant to the embodiment of the present application are shown, which are described in detail below:
as shown in fig. 8, the card reader 20 of the card transaction system may include:
a detection module 201, configured to detect whether a card reading request is received;
the control module 202 is configured to invoke the dynamic library when receiving a card reading request, and read card information of a target smart card through the dynamic library;
and the analysis module 203 is configured to analyze the card information to obtain a card number of the target smart card, and perform service operation on the smart card according to the card number.
In some embodiments of the present application, the control module 202 is further configured to:
detecting whether the card reading request is valid or not when the card reading request is received;
when the card reading request is valid, the dynamic library is invoked.
In some embodiments of the present application, the control module 202 is further configured to:
and calling a card reading function in the dynamic library, and reading card information of the target smart card through the card reading function.
In some embodiments of the present application, the control module 202 is further configured to:
when the card information of the target smart card is read through the card reading function, judging whether the card reading function is successful;
and outputting a card reading failure signal when the card reading function is unsuccessful.
In some embodiments of the present application, the control module 202 is further configured to:
detecting whether a serial port of the card service system is in an initialized state;
outputting an initialization abnormal signal when the serial port is not in an initialization state;
when the serial port is in an initialized state, the dynamic library is called, and card information of the target smart card is read through the dynamic library.
In some embodiments of the present application, the card reader device 20 may further include: an initialization module for:
before detecting whether a card reading request is received, acquiring a serial port of a card service system, and detecting the state of the serial port, wherein the state comprises a normal state and an abnormal state;
outputting a serial port abnormal signal when the serial port is in an abnormal state;
when the serial port is in a normal state, the serial port is marked as an initialized state.
Fig. 9 is a schematic diagram of an electronic device provided in an embodiment of the present application. As shown in fig. 9, the electronic device 30 of this embodiment includes: a processor 300 and a memory 301, the memory 301 having stored therein a computer program 302 executable on the processor 300. The steps of the card reading method embodiments of the respective card service systems described above are implemented when the processor 300 executes the computer program 302. Alternatively, the processor 300, when executing the computer program 302, performs the functions of the modules/units of the apparatus embodiments described above.
By way of example, the computer program 302 may be partitioned into one or more modules/units, which are stored in the memory 301 and executed by the processor 300 to complete the present application. One or more of the modules/units may be a series of computer program instruction segments capable of performing particular functions to describe the execution of the computer program 302 in the electronic device 30.
The electronic device 30 may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. Electronic device 30 may include, but is not limited to, a processor 300, a memory 301. It will be appreciated by those skilled in the art that fig. 9 is merely an example of the electronic device 30 and is not meant to be limiting of the electronic device 30, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the electronic device may further include an input-output device, a network access device, a bus, etc.
The processor 300 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 301 may be an internal storage unit of the electronic device 30, such as a hard disk or a memory of the electronic device 30. The memory 301 may also be an external storage device of the electronic device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 30. Further, the memory 301 may also include both internal storage units and external storage devices of the electronic device 30. The memory 301 is used to store computer programs and other programs and data required by the electronic device. The memory 301 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a card service system, which comprises the electronic equipment 30.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. 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.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the foregoing embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of the card reading method embodiment of each card service system. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method for reading a card of a card transaction system, comprising:
detecting whether a card reading request is received;
when the card reading request is received, a dynamic library is called, and card information of a target intelligent card is read through the dynamic library;
and analyzing the card information to obtain the card number of the target smart card, and performing service operation on the smart card according to the card number.
2. The card reading method of the card service system according to claim 1, wherein the calling the dynamic library when the card reading request is received comprises:
detecting whether the card reading request is valid or not when the card reading request is received;
and calling a dynamic library when the card reading request is valid.
3. The card reading method of the card service system according to claim 1, wherein the dynamic library includes a card reading function, the calling the dynamic library, and reading card information of the target smart card through the dynamic library, comprises:
and calling a card reading function in the dynamic library, and reading card information of the target intelligent card through the card reading function.
4. A card reading method of a card transaction system according to claim 3, wherein when the card information of the target smart card is read by the card reading function, the card reading method further includes:
judging whether the card reading function is successful;
and outputting a card reading failure signal when the card reading function is unsuccessful in card reading.
5. The card reading method of the card transaction system according to claim 1, wherein the calling the dynamic library and reading the card information of the target smart card through the dynamic library comprises:
detecting whether a serial port of the card service system is in an initialized state;
outputting an initialization abnormal signal when the serial port is not in an initialization state;
and when the serial port is in an initialized state, calling a dynamic library, and reading card information of the target intelligent card through the dynamic library.
6. The card reading method of the card service system according to any one of claims 1 to 5, wherein before detecting whether a card reading request is received, the card reading method further comprises:
acquiring a serial port of the card service system, and detecting the state of the serial port, wherein the state comprises a normal state and an abnormal state;
outputting a serial port abnormal signal when the serial port is in an abnormal state;
when the serial port is in a normal state, marking the serial port as an initialized state.
7. A card reader device for a card transaction system, comprising:
the detection module is used for detecting whether a card reading request is received or not;
the control module is used for calling a dynamic library when receiving the card reading request and reading card information of a target intelligent card through the dynamic library;
and the analysis module is used for analyzing the card information to obtain the card number of the target smart card, and carrying out service operation on the smart card according to the card number.
8. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the card reading method of the card transaction system according to any of the preceding claims 1 to 6.
9. A card transaction system comprising the electronic device of claim 8.
10. A computer-readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the card reading method of the card transaction system according to any of the preceding claims 1 to 6.
CN202311243090.2A 2023-09-25 2023-09-25 Card reading method of card service system, electronic equipment, card service system and storage medium Pending CN117408268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311243090.2A CN117408268A (en) 2023-09-25 2023-09-25 Card reading method of card service system, electronic equipment, card service system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311243090.2A CN117408268A (en) 2023-09-25 2023-09-25 Card reading method of card service system, electronic equipment, card service system and storage medium

Publications (1)

Publication Number Publication Date
CN117408268A true CN117408268A (en) 2024-01-16

Family

ID=89493446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311243090.2A Pending CN117408268A (en) 2023-09-25 2023-09-25 Card reading method of card service system, electronic equipment, card service system and storage medium

Country Status (1)

Country Link
CN (1) CN117408268A (en)

Similar Documents

Publication Publication Date Title
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
CN112653618B (en) Gateway registration method and device of micro-service application API (application program interface) endpoint
US20190372804A1 (en) Method and apparatus for operating smart network interface card
US10389710B2 (en) Method and system for extracting characteristic information
CN111131221B (en) Interface checking device, method and storage medium
CN107797854B (en) Transaction file processing method and device, storage medium and computer equipment
CN109684008B (en) Card rendering method, device, terminal and computer readable storage medium
CN103269384A (en) Rich client abnormality processing method, processing device and processing system
CN109522021B (en) Parameter callback processing method and device, electronic equipment and storage medium
CN110647736A (en) Plug-in agent system login method and device, computer equipment and storage medium
CN113572763A (en) Data processing method and device, electronic equipment and storage medium
CN117408268A (en) Card reading method of card service system, electronic equipment, card service system and storage medium
CN112464176B (en) Authority management method and device, electronic equipment and storage medium
CN114205156A (en) Message detection method and device for tangent plane technology, electronic equipment and medium
CN111679885A (en) Method, device, medium and electronic equipment for determining virtual machine drift
TWM586494U (en) ID recognition system using network identification data through telecommunication server
CN112751799A (en) Verification method and device based on picture verification code
CN111489184A (en) Method, device, server, client and medium for verifying click behavior
CN110784551A (en) Data processing method, device, equipment and medium based on multiple tenants
CN110012023B (en) Poison-throwing type anti-climbing method, system, terminal and medium
CN112596838B (en) Method, device, equipment and storage medium for displaying universal Web page
TWI704796B (en) System for using network identification to sign in service server via telecommunication server and method thereof
TWI757925B (en) System for making two applications run simultaneously by calling input program and method thereof
CN113079110B (en) Message processing method, device, equipment and storage medium
CN113761508A (en) Information processing method, information processing device, electronic equipment and storage medium

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