CN114461427A - Method for sharing computer peripheral equipment by PMS (personal computer) in hotel - Google Patents
Method for sharing computer peripheral equipment by PMS (personal computer) in hotel Download PDFInfo
- Publication number
- CN114461427A CN114461427A CN202210387569.2A CN202210387569A CN114461427A CN 114461427 A CN114461427 A CN 114461427A CN 202210387569 A CN202210387569 A CN 202210387569A CN 114461427 A CN114461427 A CN 114461427A
- Authority
- CN
- China
- Prior art keywords
- pms
- peripheral
- preposed
- shared
- packet
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
- G06F9/548—Object oriented; Remote method invocation [RMI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/164—Adaptation or special uses of UDP protocol
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/541—Client-server
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/549—Remote execution
Abstract
The invention discloses a method for sharing computer peripherals by a PMS (personal computer system) in a hotel, which belongs to the technical field of network application and comprises a shared peripheral service center, a PMS preposition and a PMS shared peripheral use rule base table.
Description
Technical Field
The invention belongs to the technical field of network application, and relates to a method for sharing computer peripherals by a PMS (personal computer) in a hotel.
Background
With the development of computer network technology, the internet has been popularized to each hotel, a hotel management system (PMS) is also updated from an original stand-alone version to a network version, many computer peripherals of the hotel do not have network functions, such as a house card sender, an identity card reader, a value card device, a printer and the like, although network printers appear, many hotels save resources, and the PMS is still in a stand-alone mode when using the printers without the network functions. Then if the devices can realize network sharing, the problems existing in many usage scenes of the PMS in the hotel can be solved, and the user experience is greatly improved. Such as: when a hotel encounters a guest check-in peak in holidays, although only a single card sender and an identity card reader are provided, if equipment network sharing is realized, check-in can be handled on a plurality of PMS computers, and the working efficiency is improved; at present, a plurality of computer peripherals only have WINDOWS drive, PMS can only be used in a WINDOWS system, if equipment network sharing is realized, PMS can also be used in an apple computer MAC OS system, and the grade of a hotel is improved; when the computer peripheral fails, emergency treatment is performed by sharing the peripherals using other computers.
Disclosure of Invention
The invention aims to provide a method for sharing computer peripherals by a PMS in a hotel, which solves the technical problem of timely obtaining all computer peripherals in the hotel for sharing use by the PMS by utilizing network resources of the hotel.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for sharing computer peripherals by a PMS in a hotel comprises the following steps:
step 1: establishing a shared peripheral service center, establishing a PMS shared peripheral use rule base table in a PMS service end, installing a PMS preposition on each computer using a PMS client or each computer connected with a shared peripheral, and setting a hotel PMS as a BS framework;
establishing a PMS prepositive database in the PMS prepositive, and configuring peripheral information connected with a computer where the PMS prepositive is positioned and sharing a peripheral service center IP and a UDP service port;
all PMS prepositions send heartbeat packets to a shared peripheral service center, and data in the heartbeat packets comprise local peripheral information tables and local PMS prepositions;
the shared peripheral service center collects all the shared peripheral information and the preposed information of the hotel through heartbeat packets sent by the PMS in the preposed mode;
step 2: the PMS client side and the PMS front side adopt HTTP communication, and the PMS front side and the shared peripheral service center adopt UDP communication;
the PMS client sends a UDP request packet for inquiring the shared peripheral to the shared peripheral service center through the PMS front of the local machine, thereby inquiring the peripherals available for the hotel, and setting the use rule of the shared peripheral at the PMS server;
and step 3: the PMS prepositive receives a peripheral use request from a local PMS client, and determines whether to use a local peripheral or a non-local peripheral according to a prepositive ID bound by the peripheral in the peripheral use request;
if the local peripheral equipment is used, directly calling a local peripheral interface module API in the PMS front, and returning a calling result to a local PMS client;
if the non-local peripheral equipment is used, the non-local peripheral equipment is used through the cooperation of the front-end PMS of the local machine, the shared peripheral equipment service center and the front-end PMS in the computer connected with the peripheral equipment, and the result is returned to the PMS client side of the local machine;
and 4, step 4: the shared peripheral service center processes three data packets: a heartbeat package, a shared peripheral inquiry package and a shared peripheral use package;
and the shared peripheral service center forwards the request packet or the use result response packet for using the peripheral according to the source preposed ID and the target preposed ID contained in the shared peripheral use packet.
Preferably, when step 1 is executed, the method specifically includes the following steps:
step 1-1: any PMS front A immediately sends a heartbeat packet to a shared peripheral service center after being started, and then sends the heartbeat packet at regular time;
step 1-2: after receiving the PMS preposed A heartbeat packet, the shared peripheral service center analyzes a preposed IP and a preposed port, further analyzes a preposed ID and peripheral information in the heartbeat packet, and stores and updates a shared peripheral information table and a preposed information table of a central database;
step 1-3: if the shared peripheral service center does not receive the heartbeat packet of the PMS preposed A after overtime, the peripheral information of the PMS preposed A in the central database is deleted.
Preferably, when step 2 is executed, the method specifically includes the following steps:
step 2-1: any PMS client X uses the hotel ID as a parameter to be placed in an HTTP request for inquiring the shared peripheral and then sends the HTTP request to a PMS front X of the local machine;
step 2-2: after receiving the HTTP request for inquiring the shared peripheral, the PMS front X reads the hotel ID from the HTTP request, packages the hotel ID to generate a UDP request packet for inquiring the shared peripheral in front, and sends the UDP request packet to a shared peripheral service center;
step 2-3: after receiving the UDP request packet of the preposed query shared peripheral, the shared peripheral service center reads the hotel ID from the UDP request packet, queries a central database of the shared peripheral service center according to the hotel ID, acquires shared peripheral information of all available peripherals corresponding to the hotel ID, generates a UDP packet of the query shared peripheral response, and returns the UDP packet to the PMS preposed X;
step 2-4: after receiving a UDP (user Datagram protocol) packet returned by the center for inquiring the shared peripheral, the PMS front-end X returns the information of the shared peripheral as an inquiry result to the PMS client X;
step 2-5: the PMS client X acquires the shared peripheral information, and configures hotel peripheral use rules in a PMS peripheral use rule base table: the method comprises the following steps that a source preposed ID, a target preposed ID, a service code, a peripheral name and a type are adopted, when the source preposed ID is the same as the target preposed ID, the configured peripheral is a local peripheral, and otherwise, the configured peripheral is a non-local peripheral;
step 2-6: and the PMS client matches the source preposed ID and the service code configured in the PMS peripheral use rule base table according to the current local preposed ID and the service code to determine the used peripheral.
Preferably, when step 3 is executed, the method specifically includes the following steps:
step 3-1: the PMS prepositive A receives a request for using the shared peripheral HTTP sent by a local PMS client, and the prepositive ID consists of a hotel ID and a computer number, so that the hotel ID, the computer number, the peripheral type and the peripheral name are analyzed;
step 3-2: judging whether the peripheral information table in the database of the PMS prepositive A is a peripheral connected with a computer in which the PMS prepositive A is located or not by inquiring the peripheral information table in the database of the PMS prepositive A;
if yes, directly calling a peripheral interface module API of the PMS front A, and returning a calling result to the PMS client;
if not, the PMS preposed A generates a UDP packet for requesting the shared peripheral equipment, and sends the UDP packet to the service center of the shared peripheral equipment, the data in the UDP packet for requesting the shared peripheral equipment comprises a source preposed ID and a target preposed ID, the source preposed ID is the ID of the PMS preposed A, and the target preposed ID is the ID of the PMS preposed B;
step 3-3: the PMS front-end B receives a shared peripheral request UDP packet of the PMS front-end A sent by the shared peripheral service center, and resolves a hotel ID, a computer number, a peripheral type and a peripheral name from the UDP packet;
step 3-4: inquiring a peripheral information table in a PMS preposed B database to judge whether the peripheral information table is a peripheral connected with a computer where the PMS preposed B is located, if so, calling a peripheral interface module API of the PMS preposed B to generate a peripheral use result; if not, generating a peripheral use failure result;
step 3-5: generating a PMS preposed A response packet using a shared peripheral UDP (user Datagram protocol) according to the result obtained in the step 3-4, and sending the PMS preposed A response packet to a shared peripheral service center, wherein the target preposed ID in the packet is the ID of the preposed A;
step 3-6: after receiving the response packet of the PMS preposed A using the shared peripheral UDP, the PMS preposed A analyzes the response packet to obtain a result and returns the result to the PMS client of the local machine.
Preferably, when step 4 is executed, the shared peripheral usage packet specifically includes that the shared peripheral service center receives a shared peripheral UDP request packet and a shared peripheral UDP response packet, parses a source prefix ID and a target prefix ID from the shared peripheral usage packet, obtains an IP and a port used for source prefix and target prefix UDP communication by querying a database of the shared peripheral service center itself, and forwards the shared peripheral UDP request packet or the shared peripheral UDP response packet to the target prefix.
The invention has the beneficial effects that:
the invention relates to a method for sharing computer peripherals by a PMS (personal computer system) in a hotel, which solves the technical problem of timely obtaining all computer peripherals in the hotel for sharing use by the PMS by utilizing network resources of the hotel. The invention adopts the existing network environment of the hotel, does not need to be redeployed, and simultaneously has good capability of resisting network fluctuation. The method is not only used for sharing the computer peripherals in the hotel, but also can be applied to sharing scenes of various computer peripherals.
Drawings
FIG. 1 is a main flow diagram of the present invention;
FIG. 2 is a schematic diagram illustrating a context of a hotel PMS network sharing computer peripheral device in an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an implementation module in an embodiment of the present invention;
FIG. 4 is a flow chart of the inter-module communication process of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in 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.
As shown in fig. 1 to 4, a method for sharing computer peripherals by a hotel PMS includes the following steps:
step 1: establishing a shared peripheral service center, establishing a PMS shared peripheral use rule base table in a PMS service end, installing a PMS preposition on each computer using a PMS client or each computer connected with a shared peripheral, and setting a hotel PMS as a BS framework;
establishing a PMS prepositive database in the PMS prepositive, and configuring peripheral information connected with a computer where the PMS prepositive is positioned and sharing a peripheral service center IP and a UDP service port;
all PMS prepositions send heartbeat packets to a shared peripheral service center, and data in the heartbeat packets comprise local peripheral information tables and prepositive information of the local PMS prepositions; the preamble information includes a preamble ID, a communication IP, and a port.
The shared peripheral service center collects all the shared peripheral information and the preposed information of the hotel through heartbeat packets sent by the PMS in the preposed mode;
when step 1 is executed, the method specifically comprises the following steps:
step 1-1: any PMS front A immediately sends a heartbeat packet to a shared peripheral service center after being started, and then sends the heartbeat packet at regular time;
the heartbeat packet sent by the computer 101 to the shared peripheral service center is:
the heartbeat packet sent by the computer 101 to the shared peripheral service center is:
the heartbeat packet sent by the computer 103 to the shared peripheral service center is:
the shared peripheral service center returns an inquiry hotel shared peripheral information return packet as follows:
step 1-2: after receiving a heartbeat packet of a PMS client A, the shared peripheral service center analyzes a preposed IP and a port, further analyzes a preposed ID and peripheral information in the heartbeat packet, and stores and updates a shared peripheral information table (table fields comprise hotel ID, computer number, peripheral type, peripheral name and updating time) and a preposed information table (table fields comprise preposed ID, preposed IP and port) of a central database;
step 1-3: if the shared peripheral service center does not receive the heartbeat packet of the PMS preposed A after overtime, the peripheral information of the PMS preposed A in the central database is deleted.
The communication data packet between the PMS preposition and the shared peripheral service center comprises a heartbeat packet, a PMS inquiry shared peripheral request packet, a PMS inquiry shared peripheral response packet, a PMS shared peripheral request packet and a PMS shared peripheral response packet;
the data in the heartbeat packet comprises a data packet type and peripheral information of PMS preposition configuration;
the PMS client inquires data in the shared peripheral request packet, wherein the data comprises a data packet type and a hotel code;
the PMS client inquires data in the shared peripheral response packet, wherein the data comprises the type of the data packet and the shared peripheral information available for the hotel;
the data in the PMS prepositive use shared peripheral request packet comprises a data packet type, sub-packet information, routing information and service data, wherein the sub-packet information comprises a serial number, a total packet number and a sub-packet serial number, the routing information comprises a source prepositive ID and a target prepositive ID, and the service data is PMS request data;
the data in the PMS prepositive use shared peripheral response packet comprises a data packet type, sub-packet information, routing information and a peripheral use result;
the request sent by the PMS client to the PMS prefix HTTP comprises the following steps: inquiring the preposed ID of the local computer, inquiring a request for sharing the peripheral and a request for using the peripheral;
the data for inquiring the preposed ID of the local computer comprises the following steps: a request type;
querying the shared peripheral requested data includes: request type and hotel code;
the data of the request for using the peripheral includes: the method comprises the steps of request type, hotel code, used peripheral information and peripheral interface parameters, wherein the used peripheral information comprises a computer number, a peripheral type and a peripheral name.
Step 2: the PMS client side and the PMS front side adopt HTTP communication, and the PMS front side and the shared peripheral service center adopt UDP communication; HTTP communication is adopted between the PMS server and the PMS client;
the PMS client sends a front inquiry shared peripheral UDP request packet to a shared peripheral service center through a PMS of a local machine, so that peripherals available for a hotel are inquired, the PMS client communicates with a PMS server, and the PMS client is set in a PMS shared peripheral usage rule base table of the PMS server: using the pre-ID (source pre-ID) of the computer where the PMS client is located, the pre-ID (target pre-ID) of the computer where the used peripheral is located, a service code, a peripheral type and a name;
when step 2 is executed, the method specifically comprises the following steps:
step 2-1: any PMS client X uses the hotel ID as a parameter to be placed in an HTTP request for inquiring the shared peripheral and then sends the HTTP request to a PMS front X of the local machine;
the request for inquiring the shared peripheral sent by the PMS front end is as follows: { "ReqType": 1"," HotelID ": MYHOTEL" }.
Step 2-2: after receiving the HTTP request for inquiring the shared peripheral, the PMS front X reads the hotel ID from the HTTP request, packages the hotel ID to generate a UDP request packet for inquiring the shared peripheral in front, and sends the UDP request packet to a shared peripheral service center;
the pre-query shared peripheral UDP request packet { "Type": 1"," BizData ": MYHOTEL" }.
Step 2-3: after receiving the UDP request packet of the preposed query shared peripheral, the shared peripheral service center reads the hotel ID from the UDP request packet, queries a central database of the shared peripheral service center according to the hotel ID, acquires shared peripheral information of all available peripherals corresponding to the hotel ID, generates a UDP packet of the query shared peripheral response, and returns the UDP packet to the PMS preposed X;
step 2-4: after receiving a UDP (user Datagram protocol) packet returned by the center for inquiring the shared peripheral, the PMS front-end X returns the information of the shared peripheral as an inquiry result to the PMS client X;
step 2-5: the PMS client X acquires the shared peripheral information, and configures hotel peripheral use rules in a PMS peripheral use rule base table: the method comprises the following steps that a source preposed ID, a target preposed ID, a service code, a peripheral name and a type are adopted, when the source preposed ID is the same as the target preposed ID, the configured peripheral is a local peripheral, and otherwise, the configured peripheral is a non-local peripheral.
The specific examples of the rules in this embodiment are: the system comprises a first party preposed ID, a second party preposed ID, a service code, a second party peripheral type and a second party peripheral name, wherein the first party represents a computer where a PMS client needing to use hotel peripherals is located, and the second party represents a computer where the used peripherals are located. If the computer 102 uses the card sender on 103, the rules are: MYHOTEL-102, MYHOTEL-103, 0 and a card sender;
the front end of the PMS obtains the preposed ID of the computer, and determines the used peripheral equipment according to the rule. If the PMS front end on the computer 102 wants to use the card sender, the front ID ' MYHOTEL-102 ' is obtained first, then the rule is referred to obtain the card sender at MYHOTEL-103 ', and an HTTP request for using the card sender is generated.
Step 2-6: and the PMS client matches the source preposed ID and the service code configured in the PMS peripheral use rule base table according to the current local preposed ID and the service code to determine the used peripheral.
Step 3, the PMS receives a peripheral use request from the local PMS client side in a front-mounted mode, and determines whether to use the local peripheral or use the non-local peripheral according to the front-mounted ID bound to the peripheral in the peripheral use request;
if the local peripheral equipment is used, directly calling a local peripheral interface module API in the PMS front, and returning a calling result to a local PMS client;
if the non-local peripheral equipment is used, the non-local peripheral equipment is used through the cooperation of the front-end PMS of the local machine, the shared peripheral equipment service center and the front-end PMS in the computer connected with the peripheral equipment, and the result is returned to the PMS client side of the local machine;
in this embodiment, the PMS front-end X may determine that the HTTP request of the PMS client X is received: if a request for inquiring the preposed ID of the local computer PMS is received, the preposed ID is obtained from the PMS preposed configuration and directly returned;
if a request for inquiring the shared peripheral equipment is received, the request is forwarded to a shared peripheral equipment service center, and the shared peripheral equipment service center is used for transmitting the request to the shared peripheral equipment service center
Acquiring all the shared peripheral information of the hotel from a heart database, and returning a query result;
if the request for using the shared peripheral is received, the peripheral attributes (the preposed ID, the peripheral type and the name) in the request parameters are taken out, and the peripheral using result is returned after the corresponding processing is carried out.
Comparing whether the preposed ID of the peripheral used in the PMS request is the same as the preposed ID set in the preposed ID: if the request is different, the request is forwarded to the PMS preposition where the peripheral equipment is used in the request parameters through the shared peripheral service center, the preposition calls the peripheral interface module, the result is returned to the preposition through the center, and the result of using the peripheral equipment of the PMS is returned;
if the local computer peripheral interface module is the same as the PMS peripheral interface module, directly calling the local computer peripheral interface module and returning a PMS peripheral use result;
the PMS preposition calls the local computer peripheral interface module to be mutual exclusion operation, so as to prevent a plurality of computers from using one peripheral to generate conflict.
When step 3 is executed, the method specifically comprises the following steps:
step 3-1: the PMS prepositive A receives a request for using the shared peripheral HTTP sent by a local PMS client, and the prepositive ID consists of a hotel ID and a computer number, so that the hotel ID, the computer number, the peripheral type and the peripheral name are analyzed;
step 3-2: judging whether the peripheral information table in the database of the PMS prepositive A is a peripheral connected with a computer in which the PMS prepositive A is located or not by inquiring the peripheral information table in the database of the PMS prepositive A;
if yes, directly calling a peripheral interface module API of the PMS front A, and returning a calling result to the PMS client;
if not, the PMS preposed A generates a UDP packet for requesting the shared peripheral equipment, and sends the UDP packet to the service center of the shared peripheral equipment, the data in the UDP packet for requesting the shared peripheral equipment comprises a source preposed ID and a target preposed ID, the source preposed ID is the ID of the PMS preposed A, and the target preposed ID is the ID of the PMS preposed B;
step 3-3: the PMS front-end B receives a shared peripheral request UDP packet of the PMS front-end A sent by the shared peripheral service center, and resolves a hotel ID, a computer number, a peripheral type and a peripheral name from the UDP packet;
step 3-4: inquiring a peripheral information table in a PMS preposed B database to judge whether the peripheral information table is a peripheral connected with a computer where the PMS preposed B is located, if so, calling a peripheral interface module API of the PMS preposed B to generate a peripheral use result; if not, generating a peripheral use failure node;
step 3-5: generating a PMS preposed A response packet using a shared peripheral UDP (user datagram protocol) according to the result obtained in the step 3-4, and sending the PMS preposed A response packet to a shared peripheral service center, wherein the target preposed ID in the packet is the ID of the preposed A;
step 3-6: after receiving the response packet of the PMS preposed A using the shared peripheral UDP, the PMS preposed A analyzes the response packet to obtain a result and returns the result to the PMS client of the local machine.
And 4, step 4: the shared peripheral service center processes three data packets: a heartbeat package, a shared peripheral inquiry package and a shared peripheral use package;
and when the shared peripheral service center processes the shared peripheral package, forwarding a request package or a use result response package for using the peripheral according to the source preposed ID and the target preposed ID contained in the data package.
When the step 4 is executed, the shared peripheral usage packet specifically includes that the shared peripheral service center receives a shared peripheral UDP request packet and a shared peripheral UDP response packet, analyzes a source prefix ID and a target prefix ID from the shared peripheral usage packet, obtains an IP and a port used for source prefix and target prefix UDP communication by querying a database of the shared peripheral service center, and forwards the shared peripheral UDP request packet or the shared peripheral UDP response packet to the target prefix.
Using the shared peripherals rule configuration: a source preposed ID, a target preposed ID, a service code, a peripheral type and a peripheral name;
the PMS usage rule comprises the following steps:
step S1: the PMS client sends a request for inquiring the preposed ID of the local computer to the preposed PMS of the local computer;
step S2: matching a source preposed ID and a service code in a shared peripheral rule according to the preposed ID of the local computer and the current service code, and determining a target preposed ID, a peripheral type and a peripheral name;
step S3: a request for using the shared peripheral is sent to the local computer PMS front-end and the result is awaited.
The PMS prepositive receives HTTP requests for inquiring the prepositive ID of the local machine, inquiring hotel sharing peripheral equipment and using the sharing peripheral equipment, which are sent by a local PMS client, and returns a processing result;
the shared peripheral service center is used for managing local peripheral information and PMS front information configured in front of all PMS in the hotel, and rules of hotel computers for using the shared peripherals are configured in a PMS shared peripheral use rule base table.
The invention completes the sharing use of hotel computer peripheral equipment by formulating a communication protocol between PMS client configuration and PMS preposition and a communication protocol between PMS preposition and a shared peripheral service center;
the shared peripheral agent module creates an HTTP server side and a UDP client side, receives a shared peripheral HTTP request used by the PMS client side, and completes the shared peripheral request used by the PMS through calling a peripheral interface at the front of the local PMS or remotely calling peripheral interfaces at the front of PMS of other computers through a shared peripheral service center.
An applicable scenario of this embodiment is: the system is used in a scene of a system for sharing computer peripherals by a PMS of a hotel, the system for sharing computer peripherals by the PMS of the hotel can comprise a shared peripheral service center, a PMS cloud service end and a plurality of PMS client ends deployed in the hotel, and each computer in the hotel is respectively deployed with a PMS preposition;
the PMS preposition comprises a local peripheral interface module and a shared peripheral agent module, wherein the local peripheral interface module provides an API interface for the shared peripheral agent module to call, the local peripheral interface module adopts a drive and an interface package provided by a peripheral manufacturer to realize the use of peripheral equipment, and the shared peripheral agent module is respectively communicated with a shared peripheral service center and a PMS client through the Internet;
any two PMS prepositions transmit UDP packets to communicate with each other through a shared peripheral service center.
In this embodiment, as shown in fig. 2, a usage scenario commonly used by a hotel is adopted as an example of the present invention, a PMS of the hotel adopts a BS architecture, a PMS cloud service end and a shared peripheral service center are deployed in a cloud end, and it is assumed that an IP and a port of a central UDP service are: 218.2.115.179, 12345. The hotel uses the wireless router 109 to connect the internet, equipped with three computers: 101. 103 for WINDOWS systems, 102 with MAC OS operating systems, each computer with a PMS front, and central IP and port in the front (218.2.115.179, 12345).
A printer 104 is arranged outside the hotel computer, and is connected with a computer 101; the stored-value card reader-writer 105 is connected with the computer 101 through a USB port and is used for recharging hotel membership cards; the house card sender 106 is connected with the computer 103 through a serial port and used for making cards, presenting cards, reading cards and clearing cards; the ID card reader 107 and the USB port are connected with the computer 103 and used for reading the information of the guest ID card during the check-in. After the method is adopted, the PMS client on any computer can use the computer peripherals in a sharing mode by configuring the use rules of the shared peripherals on the computers 101, 102 and 103.
The PMS client side and the front part of the local PMS adopt HTTP communication, and the front part of the PMS is used as an HTTP server side;
the shared peripheral service center manages UDP communication between any two PMS preambles based on the preamble ID.
The IP of a computer deploying the PMS client can be set as a fixed IP or a dynamic IP acquisition; the shared peripheral service center establishes a UDP server, adopts a public network to fix an IP and a port, and is configured in each PMS preposition.
The local computer peripheral interface module adopts an interface development kit and equipment drive provided by a computer peripheral supplier, and is packaged into a uniform interface API for the shared peripheral agent module to use;
the shared peripheral agent module provides HTTP service and UDP client, and respectively communicates with the PMS client and the shared peripheral service center.
As shown in fig. 3, in this embodiment, the hotel computer peripheral sharing is implemented through a PMS front service 203 and a shared peripheral service center 206, the PMS is installed in front of the computers 101, 102, and 103, the center is deployed in the cloud, and the PMS front service is configured with parameters: front ID, central IP and port, front database (SQLITE) creates local peripheral information table, table fields are: hotel ID, computer number, peripheral type, and peripheral name. The pre-ID consists of a hotel ID and a computer number, the hotel ID is defined and unique in the PMS, the pre-ID of the computer 101 is MYHOTEL-101 if the hotel ID is MYHOTEL, and the pre-IDs of other computers are analogized. The peripheral types are: 0. 1, 2, 3, respectively representing: the system comprises a house card sender, an identity card reader, a printer and a stored value card reader-writer, wherein the peripheral names of the house card sender, the identity card reader and the stored value card reader-writer are device models, and the printed peripheral name is a printer driver name.
The PMS front is composed of a local peripheral interface module 204 and a shared peripheral agent module 205, and the local peripheral interface module uses development kits (such as DLL, OCX and the like) provided by equipment drivers and equipment manufacturers to realize computer peripheral interface services. The shared peripheral agent module realizes HTTP service and UDP client, the HTTP service is called by the local PMS client through url (such as HTTP:// localhost: 12345), and the UDP client communicates with the center through the center IP and the port which are configured in front.
The format of HTTP request data sent to the front-end by the hotel PMS client adopts json, and the request types are as follows: 0. 1 and 2, respectively representing: query native pre-ID, query shared peripheral request, and request to use peripheral. The 3 requests are defined as follows:
inquiring the local preposed ID request: { "ReqType": 0 "};
the request for querying the shared peripheral is: { "ReqType": 1"," HotelID ": Hotel ID" };
the request to use the shared peripheral is: { "ReqType": 2"," HotelID ": Hotel ID", "DevAttr": [ "PCNo": computer number "," DevType ": peripheral type", "DevName": peripheral name "]", DevData ": peripheral interface parameter" }.
Front UDP packet data format interacting with the center also adopts json, and the packet types are as follows: 0. 1, 2, 3, 4, respectively representing: the heartbeat package, the PMS inquire the request and response package of the shared peripheral, and the PMS uses the request and response package of the shared peripheral. The 5-type packet format is defined as follows:
heartbeat package: { "Type": 0"," HotelID ": Hotel ID", "PCNo": computer number "," BizData ": Pre-configured peripheral List" };
query shared peripheral request packet: { "Type": 1"," BizData ": Hotel ID" };
inquiring a shared peripheral response packet: { "Type": 2"," BizData ": a" shared peripherals list available for use by the hotel "};
using a shared peripheral request packet: { "Type": 3"," Info ": [" Serial ":" Serial number "," Sum ": total", "No": "Serial number" ], "Route": [ "SrcID": "Source PreID", "TgtID": "target PreID" ], "BizData": PMS request data "};
using a shared peripheral response packet: { "Type": 4"," Info ": [" Serial ":" Serial number "," Sum ": total", "No": "Serial number" ], "Route": [ "SrcID": "source pre ID", "TgtID": "target pre ID" ], "BizData": peripheral interface module returns result data "}.
The invention relates to a method for sharing computer peripherals by a PMS (personal computer system) in a hotel, which solves the technical problem of timely obtaining all computer peripherals in the hotel for sharing use by the PMS by utilizing network resources of the hotel. The invention adopts the existing network environment of the hotel, does not need to be redeployed, and simultaneously has good capability of resisting network fluctuation. The method is not only used for sharing the computer peripherals in the hotel, but also can be applied to sharing scenes of various computer peripherals.
Claims (5)
1. A method for sharing computer peripherals by a hotel PMS is characterized by comprising the following steps: the method comprises the following steps:
step 1: establishing a shared peripheral service center, establishing a PMS shared peripheral use rule base table in a PMS service end, installing a PMS preposition on each computer using a PMS client or each computer connected with a shared peripheral, and setting a hotel PMS as a BS framework;
establishing a PMS prepositive database in the PMS prepositive, and configuring peripheral information connected with a computer where the PMS prepositive is positioned and sharing a peripheral service center IP and a UDP service port;
all PMS prepositions send heartbeat packets to a shared peripheral service center, and data in the heartbeat packets comprise a local peripheral information table and local PMS preposition information;
the shared peripheral service center collects all the shared peripheral information and the preposed information of the hotel through heartbeat packets sent by the PMS in the preposed mode;
step 2: the PMS client side and the PMS front side adopt HTTP communication, and the PMS front side and the shared peripheral service center adopt UDP communication;
the PMS client sends a UDP request packet for inquiring the shared peripheral to the shared peripheral service center through the PMS front of the local machine, thereby inquiring the peripherals available for the hotel, and setting the use rule of the shared peripheral at the PMS server;
and step 3: the PMS prepositive receives a peripheral use request from a local PMS client, and determines whether to use a local peripheral or a non-local peripheral according to a prepositive ID bound by the peripheral in the peripheral use request;
if the local peripheral equipment is used, directly calling a local peripheral interface module API in the PMS front, and returning a calling result to a local PMS client;
if the non-local peripheral equipment is used, the non-local peripheral equipment is used through the cooperation of the front-end PMS of the local machine, the shared peripheral equipment service center and the front-end PMS in the computer connected with the peripheral equipment, and the result is returned to the PMS client side of the local machine;
and 4, step 4: the shared peripheral service center processes three data packets: a heartbeat package, a shared peripheral inquiry package and a shared peripheral use package;
and the shared peripheral service center forwards the request packet or the use result response packet for using the peripheral according to the source preposed ID and the target preposed ID contained in the shared peripheral use packet.
2. The method for sharing computer peripherals by the hotel PMS as claimed in claim 1, wherein: when step 1 is executed, the method specifically comprises the following steps:
step 1-1: any PMS front A immediately sends a heartbeat packet to a shared peripheral service center after being started, and then sends the heartbeat packet at regular time;
step 1-2: after receiving the PMS preposed A heartbeat packet, the shared peripheral service center analyzes a preposed IP and a preposed port, further analyzes a preposed ID and peripheral information in the heartbeat packet, and stores and updates a shared peripheral information table and a preposed information table of a central database;
step 1-3: if the shared peripheral service center does not receive the heartbeat packet of the PMS preposed A after overtime, the peripheral information of the PMS preposed A in the central database is deleted.
3. The method for sharing computer peripherals by the hotel PMS as claimed in claim 1, wherein: when step 2 is executed, the method specifically comprises the following steps:
step 2-1: any PMS client X uses the hotel ID as a parameter to be placed in an HTTP request for inquiring the shared peripheral and then sends the HTTP request to a PMS front X of the local machine;
step 2-2: after receiving the HTTP request for inquiring the shared peripheral, the PMS front X reads the hotel ID from the HTTP request, packages the hotel ID to generate a UDP request packet for inquiring the shared peripheral in front, and sends the UDP request packet to a shared peripheral service center;
step 2-3: after receiving the UDP request packet of the preposed query shared peripheral, the shared peripheral service center reads the hotel ID from the UDP request packet, queries a central database of the shared peripheral service center according to the hotel ID, acquires shared peripheral information of all available peripherals corresponding to the hotel ID, generates a UDP packet of the query shared peripheral response, and returns the UDP packet to the PMS preposed X;
step 2-4: after receiving a UDP (user Datagram protocol) packet returned by the center for inquiring the shared peripheral, the PMS front-end X returns the information of the shared peripheral as an inquiry result to the PMS client X;
step 2-5: the PMS client X acquires the shared peripheral information, and configures hotel peripheral use rules in a PMS peripheral use rule base table: the method comprises the following steps that a source preposed ID, a target preposed ID, a service code, a peripheral name and a type are adopted, when the source preposed ID is the same as the target preposed ID, the configured peripheral is a local peripheral, and otherwise, the configured peripheral is a non-local peripheral;
step 2-6: and the PMS client matches the source preposed ID and the service code configured in the PMS peripheral use rule base table according to the current local preposed ID and the service code to determine the used peripheral.
4. The method for sharing computer peripherals by the hotel PMS as claimed in claim 1, wherein: when step 3 is executed, the method specifically comprises the following steps:
step 3-1: the PMS prepositive A receives a request for using the shared peripheral HTTP sent by a local PMS client, and the prepositive ID consists of a hotel ID and a computer number, so that the hotel ID, the computer number, the peripheral type and the peripheral name are analyzed;
step 3-2: judging whether the peripheral information table in the database of the PMS prepositive A is a peripheral connected with a computer in which the PMS prepositive A is located or not by inquiring the peripheral information table in the database of the PMS prepositive A;
if yes, directly calling a peripheral interface module API of the PMS front A, and returning a calling result to the PMS client;
if not, the PMS preposed A generates a UDP packet for requesting the shared peripheral equipment, and sends the UDP packet to the service center of the shared peripheral equipment, the data in the UDP packet for requesting the shared peripheral equipment comprises a source preposed ID and a target preposed ID, the source preposed ID is the ID of the PMS preposed A, and the target preposed ID is the ID of the PMS preposed B;
step 3-3: the PMS front-end B receives a shared peripheral request UDP packet of the PMS front-end A sent by the shared peripheral service center, and resolves a hotel ID, a computer number, a peripheral type and a peripheral name from the UDP packet;
step 3-4: inquiring a peripheral information table in a PMS preposed B database to judge whether the peripheral information table is a peripheral connected with a computer where the PMS preposed B is located, if so, calling a peripheral interface module API of the PMS preposed B to generate a peripheral use result; if not, generating a peripheral use failure result;
step 3-5: generating a PMS preposed A response packet using a shared peripheral UDP (user Datagram protocol) according to the result obtained in the step 3-4, and sending the PMS preposed A response packet to a shared peripheral service center, wherein the target preposed ID in the packet is the ID of the preposed A;
step 3-6: after receiving the response packet of the PMS preposed A using the shared peripheral UDP, the PMS preposed A analyzes the response packet to obtain a result and returns the result to the PMS client of the local machine.
5. The method for sharing computer peripherals by the hotel PMS as claimed in claim 1, wherein: when the step 4 is executed, the shared peripheral use packet specifically includes that the shared peripheral service center receives a shared peripheral use UDP request packet and a shared peripheral use UDP response packet, analyzes a source prefix ID and a target prefix ID from the shared peripheral use packet, obtains an IP and a port used for source prefix and target prefix UDP communication by querying a database of the shared peripheral service center itself, and forwards the shared peripheral use UDP request packet or the shared peripheral use UDP response packet to the target prefix.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210387569.2A CN114461427A (en) | 2022-04-14 | 2022-04-14 | Method for sharing computer peripheral equipment by PMS (personal computer) in hotel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210387569.2A CN114461427A (en) | 2022-04-14 | 2022-04-14 | Method for sharing computer peripheral equipment by PMS (personal computer) in hotel |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114461427A true CN114461427A (en) | 2022-05-10 |
Family
ID=81418433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210387569.2A Pending CN114461427A (en) | 2022-04-14 | 2022-04-14 | Method for sharing computer peripheral equipment by PMS (personal computer) in hotel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114461427A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116541107A (en) * | 2023-06-26 | 2023-08-04 | 平安银行股份有限公司 | Peripheral calling method, device, terminal and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1567284A (en) * | 2003-06-13 | 2005-01-19 | 北京北佳信息系统有限公司 | Method for controlling using of printer under network environment |
CN101004721A (en) * | 2007-01-23 | 2007-07-25 | 福建升腾资讯有限公司 | Control method for sharing server by peripheral equipments of computer |
CN102541482A (en) * | 2010-12-27 | 2012-07-04 | 北大方正集团有限公司 | Method and system for document printing control and document tracing |
CN105872096A (en) * | 2016-06-02 | 2016-08-17 | 江苏辰云信息科技有限公司 | Far-end sharing system for external equipment |
CN106201375A (en) * | 2016-07-01 | 2016-12-07 | 浪潮通用软件有限公司 | The method that the network of a kind of sing on web Socket shares print control |
CN112150674A (en) * | 2020-09-25 | 2020-12-29 | 哈尔滨学院 | Shared intelligent door lock reader-writer interface system based on UDP protocol |
-
2022
- 2022-04-14 CN CN202210387569.2A patent/CN114461427A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1567284A (en) * | 2003-06-13 | 2005-01-19 | 北京北佳信息系统有限公司 | Method for controlling using of printer under network environment |
CN101004721A (en) * | 2007-01-23 | 2007-07-25 | 福建升腾资讯有限公司 | Control method for sharing server by peripheral equipments of computer |
CN102541482A (en) * | 2010-12-27 | 2012-07-04 | 北大方正集团有限公司 | Method and system for document printing control and document tracing |
CN105872096A (en) * | 2016-06-02 | 2016-08-17 | 江苏辰云信息科技有限公司 | Far-end sharing system for external equipment |
CN106201375A (en) * | 2016-07-01 | 2016-12-07 | 浪潮通用软件有限公司 | The method that the network of a kind of sing on web Socket shares print control |
CN112150674A (en) * | 2020-09-25 | 2020-12-29 | 哈尔滨学院 | Shared intelligent door lock reader-writer interface system based on UDP protocol |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116541107A (en) * | 2023-06-26 | 2023-08-04 | 平安银行股份有限公司 | Peripheral calling method, device, terminal and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1748661B1 (en) | System and method to configure the parameters of a mobile system | |
US8732280B2 (en) | Device management server, device management client, and method for locating a target operation object | |
EP3422656B1 (en) | Udp protocol acceleration method and system | |
US6377808B1 (en) | Method and apparatus for routing data in a communication system | |
CN113810438B (en) | Service computing resource scheduling and requesting method, node equipment and terminal | |
US20210345221A1 (en) | Message sending method and related device | |
CN101848107B (en) | SNMP (Simple Network Management Protocol) network element and communication method of SNMP network element and proprietary protocol network element | |
CA2539468A1 (en) | System and method for asynchronous wireless services using reverse service schema generation | |
CN101141420A (en) | Method and system for performing data communication between private network and public network | |
WO2009111965A1 (en) | Method, device and system of data synchronization | |
CN108366356B (en) | Method and device for intercommunication between M2M system and identification analysis system | |
CN114461427A (en) | Method for sharing computer peripheral equipment by PMS (personal computer) in hotel | |
JP2004535743A (en) | Domain naming system (DNS) for accessing databases | |
CN101345657A (en) | Method and system for cluster management of multiple network elements based on simple network management protocol | |
CN111884938B (en) | Router information acquisition method and device | |
CN101567879A (en) | Method, server, equipment and system for treating terminal request | |
CN102088401B (en) | Addressing processing method and system thereof and network interface device | |
WO2015085573A1 (en) | Method and device for communication using white spectrum | |
CN113994649A (en) | Method, device, equipment and storage medium for accessing BLE Mesh equipment | |
CN105721584B (en) | A kind of state information searching system and method | |
CN114079974A (en) | Network capability opening method and device, UPF entity and CPE network element | |
CN103297556A (en) | Addressing processing method and system and network interface device | |
US8036218B2 (en) | Technique for achieving connectivity between telecommunication stations | |
KR100795924B1 (en) | Client identity system of wireless data service and method for the same | |
WO2024067148A1 (en) | Edge interconnection service execution method, apparatus and system, electronic device, and 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: 20220510 |
|
RJ01 | Rejection of invention patent application after publication |