CN112699974A - Gas card reading and writing method and system based on browser - Google Patents

Gas card reading and writing method and system based on browser Download PDF

Info

Publication number
CN112699974A
CN112699974A CN202011583870.8A CN202011583870A CN112699974A CN 112699974 A CN112699974 A CN 112699974A CN 202011583870 A CN202011583870 A CN 202011583870A CN 112699974 A CN112699974 A CN 112699974A
Authority
CN
China
Prior art keywords
card
read
service
write
inflation
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
CN202011583870.8A
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.)
Zhuhai Port Information Technology Co ltd
Original Assignee
Zhuhai Port Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Port Information Technology Co ltd filed Critical Zhuhai Port Information Technology Co ltd
Priority to CN202011583870.8A priority Critical patent/CN112699974A/en
Publication of CN112699974A publication Critical patent/CN112699974A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • General Engineering & Computer Science (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a gas card reading and writing method and system based on a browser. The invention discloses a gas card reading and writing method and system based on a browser.

Description

Gas card reading and writing method and system based on browser
Technical Field
The invention relates to the field of XX, in particular to a gas card reading and writing method and system based on a browser.
Background
In the current gas industry, a large number of IC card meter users still exist, the use of gas of the users mainly depends on IC cards, the IC cards are read and written with gas information into the IC cards, then the cards are inserted into the meters, and the gas readings are finally written into the gas meters, so that the gas is normally used. The mainstream of IC card reading and writing currently depends on CS system, such as CS system developed in Java language, and the read/write card operation is realized by calling Dynamic Link Library (DLL), i.e. calling read/write card function provided by manufacturer, mainly in a Java manner. But due to the rise of the internet, the office environment of people increasingly depends on the wide area network, the client environment is simpler and simpler, all system operations can be completed only by a browser, and great convenience is brought to users. Therefore, many systems are gradually being modified from the CS structure to the BS structure. However, in the BS-structured system, there are many restrictions in using physical hardware, and a web page cannot directly call Dynamic Link Library (DLL) driver hardware. In order to solve the problem, special functions can be quickly added to network applications, desktop applications and development tools by embedding plug-ins into browsers, such as based on ActiveX technology, but the ocx control solved by the ActiveX technology can only be used on IEs and cannot be used in chrome and fire foxs, which brings great inconvenience to users. In addition, the BS program can read and write the IC card through the JS technology, for example, the JS-based window. Aiming at all the problems, the patent aims to design a gas card reading and writing method and system based on a browser, so that a user does not need to rely on a specific browser, does not need to use a CS system, and only needs to finish the reading and writing operation of a gas IC card in the browser like using other BS system functions.
Disclosure of Invention
The invention mainly aims to provide a browser-based gas card reading and writing method and a browser-based gas card reading and writing system, which can effectively solve the problems in the background art.
In order to achieve the purpose, the invention adopts the technical scheme that:
a gas card reading and writing method and system based on a browser comprises the following operation steps:
s1, a salesman downloads and installs the IC card read-write service;
s2, judging whether the current IC card read-write service is installed;
s3, unloading the IC card read-write service installed on the machine;
s4, installing a local hardware device driver, installing an IC card read-write service, registering the IC card read-write service into a windows system service, starting up the system for self-starting, starting a service monitoring port after the installation is finished, and waiting for a service interface to initiate a call request;
s5, the salesman inserts the user card into the card reader and clicks to read the card;
s6, the webpage side initiates an http request through JS and calls a card reading method of the local IC card read-write service;
s7, judging whether the current request can be normally connected to the IC card read-write service;
s8, prompting the abnormal reason: if the card reading drive is not installed or the card reading and writing service is not started, please check;
s9, after the IC card read-write service receives the request, loading the local dynamic link library file, initializing the card reader function, acquiring the handle of the card reader, and judging whether the handle value is greater than 0;
s10, prompting the abnormal reason: please check if no card reader is inserted;
s11, loading dynamic link library files provided by each manufacturer in sequence, calling a function for detecting whether the dynamic link library files are the home cards of the manufacturer in sequence, and acquiring the names of the card manufacturers;
s12, calling a card reading function corresponding to the manufacturer dynamic link library file according to the acquired card manufacturer name, and returning a card reading result to the requester;
s13, the webpage terminal calls the main system service interface to inquire the user address information corresponding to the card number according to the card number in the request return result and displays the user address information to the interface;
s14, after confirming that the user information is correct, clicking and inflating on a tab of an IC card information interface, inputting the cubic number of the user needing inflating, and clicking and determining;
s15, the webpage side initiates an http request again through JS, and an inflation method of the local IC card read-write service is called;
s16, after the IC card read-write service receives the request, the handle of the card reader is obtained again, and whether the handle value is larger than 0 is judged;
s17, the read-write service calls an inflation function corresponding to the manufacturer dynamic link library file according to the card factory, the card number and the inflation quantity transmitted by the requester, and returns an inflation result to the requester;
s18, judging whether the current inflation is successful according to the inflation result;
s19, prompting the error reason to a user, and then performing corresponding operation according to the error prompt;
s20, calling a main system service interface to write the inflation record into the server, and refreshing the interface after success;
s21, after seeing that the inflation record is successfully written in the IC card filling and returning record tab, the salesman clicks the card checking;
s22, initiating the http request again by the webpage end through JS, calling a card reading method of the local IC card read-write service, and executing from S6 to S12 to obtain a return result;
s23, displaying a return result by a pop-up box, and checking whether the number of remaining cubes in the card displayed by the pop-up box corresponds to the number of inflation gas.
Preferably, in the step S2, if the service is determined to be installed, S3 is executed, then S4 is executed, and if the service is determined not to be installed, S4 is executed.
Preferably, in the step S7, if the IC card read/write service cannot be normally connected, S8 is executed, and if the IC card read/write service can be normally connected, S9 is executed.
Preferably, in the step S9, if the card reader handle value is not greater than 0, then S10 is executed, and if the card reader handle value is greater than 0, then S11 is executed.
Preferably, in the step S16, if the card reader handle value is not greater than 0, then S10 is executed, and if the card reader handle value is greater than 0, then S17 is executed.
Preferably, in the step S18, if the inflation is unsuccessful, S19 is performed, and if the inflation is successful, S20 is performed.
A gas read-write card system based on a browser comprises an input unit, a request unit, a read-write card unit and an output unit, wherein the input unit is used for inputting the cubic number of a user needing to be inflated and selecting read-write operation, the request unit is used for initiating a calling request to a local read-write service according to input information of the input unit under the condition that hardware equipment is connected, the read-write card unit is used for installing a local hardware equipment driver, monitoring the calling request and loading a function in a corresponding dynamic link library according to the calling information to drive the hardware equipment to finish the read-write card operation, and the output unit is used for outputting the result of calling the read-write service unit by the request unit.
Compared with the prior art, the invention has the following beneficial effects:
1. because the communication between the browser and the IC card read-write service is based on the HTTP protocol, any browser supports the HTTP protocol, and the mode of calling an ActiveX control is replaced by the mode of requesting API, the problem that hardware equipment can be driven only by a specific browser is avoided, and the limitation of strongly depending on an IE browser is broken.
2. The IC card read-write service and the hardware device driver provided by a hardware developer are integrated together in a software installation package mode, one-key installation is carried out, automatic registration is carried out, starting-up and self-starting of the windows system service are achieved, and user operation is greatly simplified.
3. The gas company only needs to pay attention to the business operation, and does not need to pay attention to the hardware card reading and writing process, so that the attention complexity of the gas company is reduced.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
The first embodiment is as follows:
the embodiment is a gas card reading and writing method and system based on a browser.
A gas card reading and writing method and system based on a browser comprises the following operation steps:
s1, a salesman downloads and installs the IC card read-write service;
s2, judging whether the current IC card read-write service is installed or not, if so, executing S3, then executing S4, and if not, executing S4;
s3, unloading the IC card read-write service installed on the machine;
s4, installing a local hardware device driver, installing an IC card read-write service, registering the IC card read-write service into a windows system service, starting up the system for self-starting, starting a service monitoring port after the installation is finished, and waiting for a service interface to initiate a call request;
s5, the salesman inserts the user card into the card reader and clicks to read the card;
s6, the webpage side initiates an http request through JS and calls a card reading method of the local IC card read-write service;
s7, judging whether the current request can be normally connected to the IC card read-write service, if not, executing S8, and if so, executing S9;
s8, prompting the abnormal reason: if the card reading drive is not installed or the card reading and writing service is not started, please check;
s9, after the IC card read-write service receives the request, loading a local dynamic link library file, initializing a card reader function, acquiring a card reader handle, judging whether a handle value is greater than 0, if the card reader handle value is not greater than 0, executing S10, and if the card reader handle value is greater than 0, executing S11;
s10, prompting the abnormal reason: please check if no card reader is inserted;
s11, loading dynamic link library files provided by each manufacturer in sequence, calling a function for detecting whether the dynamic link library files are the home cards of the manufacturer in sequence, and acquiring the names of the card manufacturers;
s12, calling a card reading function corresponding to the manufacturer dynamic link library file according to the acquired card manufacturer name, and returning a card reading result to the requester;
s13, the webpage terminal calls the main system service interface to inquire the user address information corresponding to the card number according to the card number in the request return result and displays the user address information to the interface;
s14, after confirming that the user information is correct, clicking and inflating on a tab of an IC card information interface, inputting the cubic number of the user needing inflating, and clicking and determining;
s15, the webpage side initiates an http request again through JS, and an inflation method of the local IC card read-write service is called;
s16, after the IC card read-write service receives the request, the handle of the card reader is obtained again, whether the handle value is larger than 0 or not is judged, if the handle value of the card reader is not larger than 0, S10 is executed, and if the handle value of the card reader is larger than 0, S17 is executed;
s17, the read-write service calls an inflation function corresponding to the manufacturer dynamic link library file according to the card factory, the card number and the inflation quantity transmitted by the requester, and returns an inflation result to the requester;
s18, judging whether the current inflation is successful or not according to the inflation result, if the current inflation is unsuccessful, executing S19, and if the current inflation is successful, executing S20;
s19, prompting the error reason to a user, and then performing corresponding operation according to the error prompt;
s20, calling a main system service interface to write the inflation record into the server, and refreshing the interface after success;
s21, after seeing that the inflation record is successfully written in the IC card filling and returning record tab, the salesman clicks the card checking;
s22, initiating the http request again by the webpage end through JS, calling a card reading method of the local IC card read-write service, and executing from S6 to S12 to obtain a return result;
s23, displaying a return result by a pop-up box, and checking whether the number of remaining cubes in the card displayed by the pop-up box corresponds to the number of inflation gas.
Example two:
the embodiment is an embodiment of a gas read-write card system based on a browser.
A gas read-write card system based on a browser comprises an input unit, a request unit, a read-write card unit and an output unit, wherein the input unit is used for inputting the cubic number of a user needing to be inflated and selecting read-write operation, the request unit is used for initiating a calling request to a local read-write service according to input information of the input unit under the condition that hardware equipment is accessed, the read-write card unit is used for installing a local hardware equipment driver, monitoring the calling request and loading a function in a corresponding dynamic link library according to the calling information to drive the hardware equipment to complete the read-write card operation, and the output unit is used for outputting the result of calling the read-write service unit by the request unit.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (7)

1. A gas card reading and writing method based on a browser is characterized in that: the method comprises the following operation steps:
s1, a salesman downloads and installs the IC card read-write service;
s2, judging whether the current IC card read-write service is installed;
s3, unloading the IC card read-write service installed on the machine;
s4, installing a local hardware device driver, installing an IC card read-write service, registering the IC card read-write service into a windows system service, starting up the system for self-starting, starting a service monitoring port after the installation is finished, and waiting for a service interface to initiate a call request;
s5, the salesman inserts the user card into the card reader and clicks to read the card;
s6, the webpage side initiates an http request through JS and calls a card reading method of the local IC card read-write service;
s7, judging whether the current request can be normally connected to the IC card read-write service;
s8, prompting the abnormal reason: if the card reading drive is not installed or the card reading and writing service is not started, please check;
s9, after the IC card read-write service receives the request, loading the local dynamic link library file, initializing the card reader function, acquiring the handle of the card reader, and judging whether the handle value is greater than 0;
s10, prompting the abnormal reason: please check if no card reader is inserted;
s11, loading dynamic link library files provided by each manufacturer in sequence, calling a function for detecting whether the dynamic link library files are the home cards of the manufacturer in sequence, and acquiring the names of the card manufacturers;
s12, calling a card reading function corresponding to the manufacturer dynamic link library file according to the acquired card manufacturer name, and returning a card reading result to the requester;
s13, the webpage terminal calls the main system service interface to inquire the user address information corresponding to the card number according to the card number in the request return result and displays the user address information to the interface;
s14, after confirming that the user information is correct, clicking and inflating on a tab of an IC card information interface, inputting the cubic number of the user needing inflating, and clicking and determining;
s15, the webpage side initiates an http request again through JS, and an inflation method of the local IC card read-write service is called;
s16, after the IC card read-write service receives the request, the handle of the card reader is obtained again, and whether the handle value is larger than 0 is judged;
s17, the read-write service calls an inflation function corresponding to the manufacturer dynamic link library file according to the card factory, the card number and the inflation quantity transmitted by the requester, and returns an inflation result to the requester;
s18, judging whether the current inflation is successful according to the inflation result;
s19, prompting the error reason to a user, and then performing corresponding operation according to the error prompt;
s20, calling a main system service interface to write the inflation record into the server, and refreshing the interface after success;
s21, after seeing that the inflation record is successfully written in the IC card filling and returning record tab, the salesman clicks the card checking;
s22, initiating the http request again by the webpage end through JS, calling a card reading method of the local IC card read-write service, and executing from S6 to S12 to obtain a return result;
s23, displaying a return result by a pop-up box, and checking whether the number of remaining cubes in the card displayed by the pop-up box corresponds to the number of inflation gas.
2. The gas card reading and writing method based on the browser as claimed in claim 1, wherein: in the step S2, if the service is determined to be installed, S3 is executed, and then S4 is executed, and if the service is determined not to be installed, S4 is executed.
3. The gas card reading and writing method based on the browser as claimed in claim 1, wherein: in the step S7, if the IC card read/write service cannot be normally connected, S8 is executed, and if the IC card read/write service can be normally connected, S9 is executed.
4. The gas card reading and writing method based on the browser as claimed in claim 1, wherein: in the step S9, if the card reader handle value is not greater than 0, S10 is executed, and if the card reader handle value is greater than 0, S11 is executed.
5. The gas card reading and writing method based on the browser as claimed in claim 1, wherein: in the step S16, if the card reader handle value is not greater than 0, S10 is executed, and if the card reader handle value is greater than 0, S17 is executed.
6. The gas card reading and writing method based on the browser as claimed in claim 1, wherein: if the inflation in the step S18 is unsuccessful, S19 is performed, and if the inflation is successful, S20 is performed.
7. The utility model provides a gas card system of reading and writing based on browser which characterized in that: the system comprises an input unit, a request unit, a read-write card unit and an output unit, wherein the input unit is used for inputting the cubic number of a user needing inflation and selecting read-write operation, the request unit is used for initiating a calling request to a local read-write service according to input information of the input unit under the condition that hardware equipment is accessed, the read-write card unit is used for installing a local hardware equipment driver, monitoring the calling request and loading a function in a corresponding dynamic link library according to the calling information to drive the hardware equipment to finish the read-write card operation, and the output unit is used for outputting the result of calling the read-write service unit by the request unit.
CN202011583870.8A 2020-12-28 2020-12-28 Gas card reading and writing method and system based on browser Pending CN112699974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011583870.8A CN112699974A (en) 2020-12-28 2020-12-28 Gas card reading and writing method and system based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011583870.8A CN112699974A (en) 2020-12-28 2020-12-28 Gas card reading and writing method and system based on browser

Publications (1)

Publication Number Publication Date
CN112699974A true CN112699974A (en) 2021-04-23

Family

ID=75511231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011583870.8A Pending CN112699974A (en) 2020-12-28 2020-12-28 Gas card reading and writing method and system based on browser

Country Status (1)

Country Link
CN (1) CN112699974A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506901A (en) * 2002-12-12 2004-06-23 中国科学院计算技术研究所 Intelligent card read/write device based on the technology of obtaining power source from the serial port signal line
CN102202092A (en) * 2011-04-28 2011-09-28 李波 Television bank public service platform
KR101272680B1 (en) * 2011-11-30 2013-06-10 (주)대합하이퍼텍 Emv terminal apparatus used in card settlement system using operating system for mobile communication terminal
CN103327086A (en) * 2013-06-09 2013-09-25 博彦网鼎信息技术有限公司 Fuel gas sale transaction method and gas sale client

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506901A (en) * 2002-12-12 2004-06-23 中国科学院计算技术研究所 Intelligent card read/write device based on the technology of obtaining power source from the serial port signal line
CN102202092A (en) * 2011-04-28 2011-09-28 李波 Television bank public service platform
KR101272680B1 (en) * 2011-11-30 2013-06-10 (주)대합하이퍼텍 Emv terminal apparatus used in card settlement system using operating system for mobile communication terminal
CN103327086A (en) * 2013-06-09 2013-09-25 博彦网鼎信息技术有限公司 Fuel gas sale transaction method and gas sale client

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭远刚;阎广华;: "燃气营业收费管理信息系统的应用与研究", 电脑知识与技术(学术交流), no. 32, pages 24 - 25 *

Similar Documents

Publication Publication Date Title
CN109656807B (en) Information security-based interface mock testing method, device, equipment and storage medium
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN109922132B (en) Form request processing method and device, electronic equipment and storage medium
US8983935B2 (en) Methods for utilizing a javascript emulator in a web content proxy server and devices thereof
EP3570170A1 (en) Error detection method and apparatus for transaction system, storage medium and computer device
CN112685211A (en) Error information display method and device, electronic equipment and medium
CN112613288B (en) Method, device, computer equipment and storage medium for generating bill
CN112861033B (en) Method and device for executing service
CN112699974A (en) Gas card reading and writing method and system based on browser
CA2857633C (en) Systems and methods to facilitate a request for oilfield services using a data transfer protocol
CN116737535A (en) Interface test method, device, computer equipment and storage medium
CN111124545A (en) Application program starting method and device, electronic equipment and storage medium
CN115793924A (en) Method, device and equipment for maintaining bank front-end dynamic menu
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN114968822A (en) Interface testing method and device, computer equipment and storage medium
CN112261072A (en) Service calling method, device, equipment and storage medium
CN112000579B (en) Software interface testing method, system, equipment and medium
CN110300111A (en) Page display method, device, terminal device and server
CN115129355B (en) Page repair method, system and computer equipment thereof
CN115065670B (en) IOS APP automatic release method, macOS server and system
CN112261170B (en) Method, system, equipment and medium for reading MAC address
CN110764792B (en) Application program installation method, device, equipment and storage medium
CN116302845A (en) Method and device for determining transaction operation mode, electronic equipment and storage medium
CN116361870A (en) Password keyboard control method, device, equipment and storage medium
CN114817007A (en) Information processing method and device, electronic equipment and computer readable 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210423

RJ01 Rejection of invention patent application after publication