CN109144579B - Method for reading hardware by Web system and computer readable storage medium - Google Patents

Method for reading hardware by Web system and computer readable storage medium Download PDF

Info

Publication number
CN109144579B
CN109144579B CN201810782652.3A CN201810782652A CN109144579B CN 109144579 B CN109144579 B CN 109144579B CN 201810782652 A CN201810782652 A CN 201810782652A CN 109144579 B CN109144579 B CN 109144579B
Authority
CN
China
Prior art keywords
web system
hardware
windows
web
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810782652.3A
Other languages
Chinese (zh)
Other versions
CN109144579A (en
Inventor
杨雄
张擘凌
温志超
温其术
刘瑞城
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Reabam Infotech Co ltd
Original Assignee
Guangzhou Reabam Infotech 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 Guangzhou Reabam Infotech Co ltd filed Critical Guangzhou Reabam Infotech Co ltd
Priority to CN201810782652.3A priority Critical patent/CN109144579B/en
Publication of CN109144579A publication Critical patent/CN109144579A/en
Application granted granted Critical
Publication of CN109144579B publication Critical patent/CN109144579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for reading hardware by a Web system, which comprises the following steps: responding to an online connection monitoring request of the Web system, running Windows monitoring service and returning online running state information to the Web system; responding to a hardware call request of the Web system, and calling a corresponding function of the Windows system to enable the Windows operating system to execute the function so as to operate corresponding hardware and return a call result; and receiving the calling result and returning the calling result to the Web system so that the Web system processes the business logic according to the calling result. The method and the device can realize the control of the hardware of the client by the Web system, do not need to depend on a browser, and enhance the stability and the persistence of the reading of the hardware by the Web system.

Description

Method for reading hardware by Web system and computer readable storage medium
Technical Field
The present invention relates to the field of control hardware of a Web system, and in particular, to a method for reading hardware by a Web system and a computer readable storage medium.
Background
The Web system of the B/S architecture is based on a program operated by a browser, and a client can only do some simple interactions through scripts so as not to directly control hardware, but along with the development of business, the hope of solving the problem of controlling hardware of the Web system is more and more intense. Therefore, the Web field promotes the reusable software of the ActiveX, and the ActiveX control is written in the language of the C/S architecture, so that the problem that most Web systems cannot operate client hardware is solved, and the application field of Web programs is widened.
However, if the ActiveX control is disabled at the browser end, the corresponding function cannot be realized; in addition, the ActiveX control is based on a browser mode, and the problem that a program reads hardware such as a COM interface and the like cannot be solved; in addition, the implementation cost and the communication cost of the Web system are increased due to the dependence on the setting of the browser.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide a method for reading hardware by a Web system, which can realize the hardware of a control client of the Web system, does not need to depend on a browser, and enhances the stability and the persistence of the hardware read by the Web system.
The second objective of the present invention is to provide a computer readable storage medium, in which a computer program can implement hardware of a Web system for controlling a client when running, without depending on a browser, so as to enhance stability and persistence of reading hardware by the Web system.
One of the purposes of the invention is realized by adopting the following technical scheme:
a method for a Web system to read hardware, comprising the steps of:
responding to an online connection monitoring request of the Web system, running Windows monitoring service and returning online running state information to the Web system;
responding to a hardware call request of the Web system, calling a corresponding function of the Windows system to enable the Windows operating system to execute the function so as to operate the corresponding hardware and return a call result;
and receiving the calling result and returning the calling result to the Web system so that the Web system processes the service logic according to the calling result.
Further, the step of calling the corresponding function of the Windows system to enable the Windows operating system to execute the function so as to operate the corresponding hardware and return the calling result is specifically as follows: and calling a dynamic link library of the Windows system through the mean function to enable the dynamic link library to call a com interface function of the Windows system, and further enabling the Windows operating system to execute the function so as to operate corresponding hardware and return a calling result.
Further, the dynamic link library calls com interface functions of the Windows system specifically as follows: the dynamic link library calls com interface functions of the Windows system through the APIs of the Windows system.
Further, the method for responding to the online connection monitoring request of the Web system is to connect through a Websocket communication protocol.
The second purpose of the invention is realized by adopting the following technical scheme:
a computer readable storage medium storing an executable computer program which when run implements a method of reading hardware for a Web system as described above.
Compared with the prior art, the invention has the beneficial effects that:
a method for a Web system to read hardware, comprising the steps of: responding to an online connection monitoring request of the Web system, running Windows monitoring service and returning online running state information to the Web system; responding to a hardware call request of the Web system, and calling a corresponding function of the Windows system to enable the Windows operating system to execute the function so as to operate corresponding hardware and return a call result; and receiving the calling result and returning the calling result to the Web system so that the Web system processes the service logic according to the calling result. Through the steps, the method can realize that the Web system controls the hardware of the client, does not depend on a browser, and enhances the stability and the persistence of reading the hardware by the Web system.
Drawings
Fig. 1 is a flow chart of a method for reading hardware by a Web system according to the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and detailed description, wherein it is to be understood that, on the premise of no conflict, the following embodiments or technical features may be arbitrarily combined to form new embodiments.
Referring to fig. 1, a method for reading hardware by a Web system includes the following steps:
s1, responding to an online connection monitoring request of a Web system, running Windows monitoring service and returning online running state information to the Web system;
s2, responding to a hardware call request of the Web system, and calling a corresponding function of the Windows system to enable the Windows operating system to execute the function so as to operate corresponding hardware and return a call result;
s3, receiving the calling result and returning the calling result to the Web system so that the Web system processes the service logic according to the calling result.
The method can solve the problem that the Web system reads the hardware of the local computer, does not need to depend on a browser, and enhances the stability and the persistence of the Web system reading the hardware.
As a preferred embodiment, the method for calling the corresponding function of the Windows system to enable the Windows operating system to execute the function so as to operate the corresponding hardware and return the calling result is specifically as follows: and calling a dynamic link library of the Windows system through the mean function to enable the dynamic link library to call a com interface function of the Windows system, and further enabling the Windows operating system to execute the function so as to operate corresponding hardware and return a calling result.
As a preferred embodiment, the com interface function of the Windows system is specifically: the dynamic link library calls com interface functions of the Windows system through the APIs of the Windows system.
As a preferred embodiment, the manner of responding to online connections in online connection listening requests of the Web system is to connect through Websocket communication protocol. In this embodiment, the Web system and the Windows system are connected by a Websocket communication protocol. Because of the limitation of Windows system operation authority, the Web system cannot directly access and call the functions of the Windows system. Websocket is a protocol built on top of the TCP/IP protocol, belonging to the application layer, while Websocket is an abstraction layer in the application layer and transport layer, abstracting the complex operations of the TCP/IP layer into several simple interfaces to provide for application layer calls. Due to the persistent connection of the Websocket, the persistent connection request of the Web system and the Windows system is realized, so that the Web system can call the hardware of the Windows system permanently and stably.
Furthermore, the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores an executable computer program, and the computer program realizes the method for reading hardware by the Web system when running. The computer program is an executable program depending on Windows, has no interface, is a program in the form of a service console of a system, and has the functions of monitoring Web requests and calling a dynamic link library of the Windows system so as to realize the purpose of reading hardware by the Web system. The computer program is connected with the Web system through websocket communication protocol to achieve the purpose of connecting the Web system with the Windows system.
The application of the method for reading hardware by the Web system is described by taking the payment function of the physical shopping card realized by the cashing system of the B/S architecture as an example: the client of the cashing system is provided with the executable computer program, the cashing system inputs the payment amount and initiates an online connection monitoring request, and after receiving the online connection success information, the cashing system initiates an entity shopping card payment request to call a dynamic link library function of the Windows system and further call a reading and writing function of a card reader to deduct the balance of the entity card, and the cashing system completes the entity shopping card payment function when receiving the balance deduction result.
The above embodiments are only preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, but any insubstantial changes and substitutions made by those skilled in the art on the basis of the present invention are intended to be within the scope of the present invention as claimed.

Claims (4)

1. A method for reading hardware by a Web system is characterized in that,
the method comprises the following steps:
responding to an online connection monitoring request of the Web system, running Windows monitoring service and returning online running state information to the Web system;
responding to a hardware call request of the Web system, calling a corresponding function of the Windows system to enable the Windows operating system to execute the function so as to operate the corresponding hardware and return a call result;
the dynamic link library of the Windows system is called through the mean function so that the dynamic link library calls the com interface function of the Windows system, and the Windows operating system executes the function to operate corresponding hardware and return a calling result;
and receiving the calling result and returning the calling result to the Web system so that the Web system processes the service logic according to the calling result.
2. The method for reading hardware of a Web system as recited in claim 1, wherein,
the dynamic link library calls the com interface function of the Windows system specifically as follows: the dynamic link library calls com interface functions of the Windows system through the APIs of the Windows system.
3. The method for reading hardware of a Web system as recited in claim 1, wherein,
the online connection mode in the online connection monitoring request of the response Web system is to connect through a Websocket communication protocol.
4. A computer-readable storage medium comprising,
the computer readable storage medium stores an executable computer program which when run implements a method of reading hardware by a Web system as claimed in any one of claims 1 to 3.
CN201810782652.3A 2018-07-17 2018-07-17 Method for reading hardware by Web system and computer readable storage medium Active CN109144579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810782652.3A CN109144579B (en) 2018-07-17 2018-07-17 Method for reading hardware by Web system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810782652.3A CN109144579B (en) 2018-07-17 2018-07-17 Method for reading hardware by Web system and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109144579A CN109144579A (en) 2019-01-04
CN109144579B true CN109144579B (en) 2023-09-29

Family

ID=64800724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810782652.3A Active CN109144579B (en) 2018-07-17 2018-07-17 Method for reading hardware by Web system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109144579B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6550021B1 (en) * 1999-09-30 2003-04-15 Western Digital Ventures, Inc. Internet-implemented method supporting component repair services
CN101132413A (en) * 2007-09-18 2008-02-27 中兴通讯股份有限公司 ActiveX component multiplexing method based on Web application
CN102546630A (en) * 2012-01-04 2012-07-04 北京七星华创电子股份有限公司 Io communication method
CN103544095A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Server program monitoring method and system of server program
CN105242960A (en) * 2015-09-21 2016-01-13 青岛海信电器股份有限公司 Method for processing system function call request and browser
CN105447153A (en) * 2015-11-28 2016-03-30 讯美电子科技有限公司 Local hardware device and Web application real-time communication system
CN106027487A (en) * 2016-04-28 2016-10-12 广州广电运通金融电子股份有限公司 Hardware equipment access management method and system
CN106257887A (en) * 2015-06-18 2016-12-28 中国科学院声学研究所 A kind of method that obtains client hardware information of sing on web Socket
CN107195144A (en) * 2017-05-25 2017-09-22 深圳市百富智能新技术有限公司 Method, device and the computer-readable recording medium of managing payment terminal hardware module

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10185964B2 (en) * 2009-12-23 2019-01-22 International Business Machines Corporation Unification of web page reporting and updating through a page tag

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6550021B1 (en) * 1999-09-30 2003-04-15 Western Digital Ventures, Inc. Internet-implemented method supporting component repair services
CN101132413A (en) * 2007-09-18 2008-02-27 中兴通讯股份有限公司 ActiveX component multiplexing method based on Web application
CN102546630A (en) * 2012-01-04 2012-07-04 北京七星华创电子股份有限公司 Io communication method
CN103544095A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Server program monitoring method and system of server program
CN106257887A (en) * 2015-06-18 2016-12-28 中国科学院声学研究所 A kind of method that obtains client hardware information of sing on web Socket
CN105242960A (en) * 2015-09-21 2016-01-13 青岛海信电器股份有限公司 Method for processing system function call request and browser
CN105447153A (en) * 2015-11-28 2016-03-30 讯美电子科技有限公司 Local hardware device and Web application real-time communication system
CN106027487A (en) * 2016-04-28 2016-10-12 广州广电运通金融电子股份有限公司 Hardware equipment access management method and system
CN107195144A (en) * 2017-05-25 2017-09-22 深圳市百富智能新技术有限公司 Method, device and the computer-readable recording medium of managing payment terminal hardware module

Also Published As

Publication number Publication date
CN109144579A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
US10977062B2 (en) System for starting virtual machine using mirror image file stored in units of a distributed block storage system mapped to units of a logical volume
CN108287708B (en) Data processing method and device, server and computer readable storage medium
CN109857409A (en) Data processing method, device and computer equipment based on micro services gateway
CN112491604A (en) Remote management implementation method, device and system for Internet of things equipment
CN111090431B (en) Data processing method and device
CN104428822A (en) Contactless payment method, device and system
CN110198351A (en) Storage method, device, server-side and the readable storage medium storing program for executing of offline message
WO2016202108A1 (en) Nfc payment method, nfc payment system and mobile terminal
CN104516885A (en) Implementation method and device of browse program double-kernel assembly
CN112162925A (en) Test method and system based on service virtualization
CN111913920A (en) Electronic business card generating method, device, computer system and computer readable medium
CN109144579B (en) Method for reading hardware by Web system and computer readable storage medium
CN110175833A (en) A kind of computer installation, method, system and medium for binding bank card information
EP2793201A1 (en) Safety information transfer system, device and method based on extended parameter set
CN113553214A (en) Idempotent checking method and device
US11157690B2 (en) Techniques for asynchronous execution of computationally expensive local spreadsheet tasks
CN108664343A (en) A kind of stateful call method and device of micro services
US9032326B2 (en) Late instantiation of dependent objects
CN109088948A (en) A kind of methods of exhibiting of PUSH message, equipment and storage medium
US8554798B2 (en) Asynchronous state engine with plug-ins for flexible application development
CN112261072B (en) Service calling method, device, equipment and storage medium
KR102340881B1 (en) Method and system for providing platform for IoT service based on block-chain
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN107169760B (en) Mapping card management method based on multiple media, data processing method and device
US20070174098A1 (en) Business context sensitive attribute override

Legal Events

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