CN115589438A - Method and system for communication between terminal equipment and generator set controller - Google Patents

Method and system for communication between terminal equipment and generator set controller Download PDF

Info

Publication number
CN115589438A
CN115589438A CN202211189263.2A CN202211189263A CN115589438A CN 115589438 A CN115589438 A CN 115589438A CN 202211189263 A CN202211189263 A CN 202211189263A CN 115589438 A CN115589438 A CN 115589438A
Authority
CN
China
Prior art keywords
generator set
set controller
data
websocket
controller
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
CN202211189263.2A
Other languages
Chinese (zh)
Inventor
吴少龙
王庆华
薛刚
李强
宋晓莉
高捷朝
徐开通
吴磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Century Kanghua Electric Technology Co ltd
Zhengzhou Foguang Power Generation Equipment Co Ltd
Original Assignee
Beijing Century Kanghua Electric Technology Co ltd
Zhengzhou Foguang Power Generation Equipment 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 Beijing Century Kanghua Electric Technology Co ltd, Zhengzhou Foguang Power Generation Equipment Co Ltd filed Critical Beijing Century Kanghua Electric Technology Co ltd
Priority to CN202211189263.2A priority Critical patent/CN115589438A/en
Publication of CN115589438A publication Critical patent/CN115589438A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The present disclosure relates to the field of generator set controller communication technologies, and in particular, to a method and a system for communicating a terminal device with a generator set controller, where the method includes: initializing WEBSERVER and WEBSOCKETSERVER by a generator set controller; the terminal equipment is accessed to a network where the generator set controller is located, an HTML login page and a JS script of the generator set controller are obtained through WEBSERVER, and the terminal equipment logs in and is connected to WEBSOCKETSERVER; the generator set controller establishes new connection and monitors, and sends data required by a page according to different HTML pages browsed currently by WEBSOCKET; and if the current browsed page of WEBSOCKET is a quick guide or unit configuration page, sending a general statement to the generator unit controller. By adopting the invention, the communication efficiency of the generator set controller can be improved.

Description

Method and system for communication between terminal equipment and generator set controller
Technical Field
The present disclosure relates to the field of generator set controller communication technologies, and in particular, to a method and a system for communicating between a terminal device and a generator set controller.
Background
At present, communication between a generator set Controller and an upper computer (or terminal equipment) generally adopts the modes of USB, RS485, RS232, MODBUS TCP/IP, CAN (Controller Area Network) and the like, however, the three communication methods of USB, RS485 and RS232 cannot meet the requirement of long-distance transmission, so that the scenes of trains, factories and the like which need long-distance communication cannot be met; although MODBUS TCP/IP and CAN perform long-distance high-speed data transmission, the above methods all require a specific upper computer program to be installed at the PC end when in use, and require the PC to have a COM port, and if there is no COM port, a converter is required, which is very inconvenient and cannot meet the requirements of various users.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present disclosure provide a method and a system for a terminal device to communicate with a generator set controller. The technical scheme is as follows:
according to an aspect of the present disclosure, there is provided a method for a terminal device to communicate with a generator set controller, the method comprising:
s1, initializing WEBSERVER and WEBSOCKETSERVER by the generator set controller, and packaging data to be transmitted into a transmission list according to a preset format;
s2, the terminal equipment is accessed to a network where the generator set controller is located, an HTML login page and a JS script of the generator set controller are obtained through a WEBSERVER after initialization of an HTTP request, login is conducted, the terminal equipment is connected to the initialized WEBSOCKETSERVER, and a WEBSOCKET connection request is sent to the generator set controller;
s3, after receiving a WEBSOCKET connection request of the terminal equipment, the generator set controller establishes new connection and monitors the new connection;
s4, the generator set controller sends data required by the pages in the sending list to the WEBSOCKET according to different HTML pages browsed by the WEBSOCKET currently;
and S5, if the page browsed by the WEBSOCKET currently is a quick guide page or a unit configuration page, sending a general statement to the generator set controller to modify the parameters of the generator set controller.
According to another aspect of the present disclosure, a system for a terminal device to communicate with a generator set controller is provided, where the system for the terminal device to communicate with the generator set controller is used to perform the above method for the terminal device to communicate with the generator set controller, and the system includes the generator set controller, the terminal device, WEBSERVER, and WEBSOCKETSERVER, where:
the generator set controller is used for initializing WEBSERVER and WEBSOCKETSERVER and packaging data to be sent into a sending list according to a preset format; after a WEBSOCKET connection request of the terminal equipment is received, establishing new connection and monitoring; according to different HTML pages browsed currently by the WEBSOCKET, sending data required by the pages in the sending list to the WEBSOCKET;
the terminal equipment is used for accessing a network where the generator set controller is located, acquiring an HTML login page and a JS script of the generator set controller through a WEBSERVER after initialization of an HTTP request, logging in, connecting to the initialized WEBSOCKETSERVER, and sending a WEBSOCKET connection request to the generator set controller; if the current browsed page of the WEBSOCKET is a quick guide or unit configuration page, sending a general statement to the generator set controller to modify parameters of the generator set controller;
the WEBSERVER is used for acquiring an HTML login page and a JS script of the generator set controller;
the WEBSOCKETSERVER is used for sending a WEBSOCKET connection request to the generator set controller.
According to another aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing a program, wherein the program is stored in the memory,
wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the above method of communicating a terminal device with a generator set controller.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above method for a terminal device to communicate with a generator set controller.
According to one or more technical schemes provided by the embodiment of the application, the terminal equipment with the network function can be used for connection access at any time and any place, a specific application program is not required to be installed, steps and conditions required for establishing communication are greatly simplified, and the communication efficiency is improved.
Drawings
Further details, features and advantages of the disclosure are disclosed in the following description of exemplary embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 shows a flow chart of a method for a terminal device to communicate with a generator set controller according to an exemplary embodiment of the disclosure;
fig. 2 shows a block flow diagram of a method for a terminal device to communicate with a genset controller in accordance with an exemplary embodiment of the present disclosure;
fig. 3 shows a schematic block diagram of a system in which a terminal device communicates with a genset controller in accordance with an exemplary embodiment of the present disclosure;
FIG. 4 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description. It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following describes a method for a terminal device to communicate with a generator set controller according to the present disclosure with reference to fig. 1, where the method may be implemented by a system for a terminal device to communicate with a generator set controller, where the system includes the generator set controller and the terminal device, and the terminal device is an electronic device with a network function, and may be an electronic device such as a mobile phone, a computer, a tablet computer, and a server. The method comprises the following steps:
s1, the generator set controller initializes WEBSERVER and WEBSOCKETSERVER, and encapsulates data to be sent into a sending list according to a preset format.
The chinese name of WEBSERVER is called a web server or a web server, and may parse an HTTP (Hyper Text Transfer Protocol) Protocol, so that the WEBSERVER may be used to process an HTTP request. Webscocketserver may be used to send data, respond to general statements, and respond to query statements.
Wherein the routing list may include status indication data, timer data, engine data, sensor data, utility data, power generation data, load data, alarm data, input port data, output port data, history data, version data, and configuration data.
In a possible implementation manner, after initializing WEBSERVER and WEBSERVER, the generator set controller may wait for a connection request of the terminal device, and optionally, the method for initializing WEBSERVER and WEBSERVER in S1 may be as follows:
an object my _ websocket of the websocket server class is defined and instantiated.
The websocket server manager comprises the following steps: creating a SOCKET and listening, closing the SOCKET, establishing a new connection, disconnecting the connection, sending data and receiving data.
Optionally, when encapsulating the data to be transmitted, the data may be encapsulated according to the following string format:
"$ CT type, device model, 1, data content, < CR > < LF >".
In the above character string format, the type is an abbreviation of capital english of the data type in the transmission list (for example, the engine data is EDD); the equipment model is the model of the equipment corresponding to the data; the data content is the concrete content of the data to be sent, if the data content field contains a plurality of data, the data are arranged according to a fixed sequence, and each data is separated by commas, such as rotating speed, oil pressure, water temperature … ….
And S2, the terminal equipment accesses a network where the generator set controller is located, acquires an HTML login page and a JS script of the generator set controller through the initialized WEBSERVER requested by the HTTP protocol, logs in, is connected to the initialized WEBSOCKETSERVER, and sends a WEBSOCKET connection request to the generator set controller.
The WebSocket is a new persistent protocol under HTML5, which appoints a communication specification, and a connection similar to tcp can be established between a client and a server through a handshake mechanism, so that the communication between the client and the server is facilitated. The full-duplex communication between the browser and the server is realized, the server resource and the bandwidth can be better saved, and the purpose of real-time communication is achieved.
In a possible implementation manner, both HTML (Hyper Text Markup Language) and JS (JavaScript, a lightweight, interpreted, or just-in-time compiled programming Language with function priority) are deployed in advance in a NAND (Non-volatile Memory Device) of the generator set controller, and when a terminal Device accesses a network where the generator set controller is located, the terminal Device may access the network where the generator set controller is located in a wired, wireless, or routing manner.
After the access network, the terminal device opens the browser, and inputs the address of the generator set controller in the browser for sending, so that an acquisition request can be sent to the WEBSERVER through the browser based on the HTTP protocol, where the acquisition request at least includes information such as a Web name and a port number in a URL (Uniform Resource Locator) of a login page of the generator set controller, and after receiving the acquisition request, the WEBSERVER sends the HTML login page and the JS script of the generator set controller to the terminal device.
The terminal equipment receives and displays an HTML login page of the generator set controller, a user can input user information through the HTML login page displayed by the terminal equipment to log in, and the user is automatically connected to WEBSOCKETSERVER after the login is successful.
And S3, after the generator set controller receives a WEBSOCKET connection request of the terminal equipment, establishing new connection and monitoring.
Optionally, establishing a new connection and listening in S3 may include the following steps S31 to S34:
and S31, after the generator set controller receives a WEBSOCKET connection request of the terminal equipment, storing a WEBSOCKET descriptor to establish new connection.
S32, inserting WEBSOCKET descriptors of the new connection into the HASH table so as to maintain a plurality of connections simultaneously.
The HASH table is established by taking the IP address and the port as key values, so that the lookup is convenient.
S33, monitoring whether a new message comes in the new connection.
S34, monitoring whether the new connection is disconnected, and if the connection is disconnected, removing the descriptor of the new connection from the HASH table.
And S4, the generator set controller sends data required by the page in the sending list to the WEBSOCKET according to different HTML pages browsed currently by the WEBSOCKET.
In a feasible implementation manner, different HTML pages can be divided into two types, namely a monitoring page and other pages, if the currently browsed page is the monitoring page, the generator set controller determines the required data of the monitoring page in the sending list, and sends the required data to the new connection once per second to ensure the real-time performance of the monitoring page; if the current browsed page is other pages, the real-time performance of the page does not need to be considered, so that the generator set controller determines the data required by the page in the sending list and only sends the required data once when the connection is established.
The required data of the monitoring page comprises generator data, load data, commercial power data, engine data, state indication data and version data; the required data of other pages can comprise configuration data, version data and historical data according to the display content of different pages.
And S5, if the page browsed by the WEBSOCKET currently is a quick guide page or a unit configuration page, sending a general statement to the generator set controller to modify the parameters of the generator set controller.
In a possible implementation manner, when a user wants to modify the generator set controller through the terminal device, the user can browse a quick wizard or a unit configuration page through the terminal device, where the quick wizard or the unit configuration page is a page preset by the user, and thus, when the web browser recognizes that the currently browsed page is the quick wizard or the unit configuration page, the user can actively send a general sentence to the generator set controller.
Optionally, the universal statement may include a timer setting, an engine setting, a generator setting, a utility setting, a load setting, a switch setting, an input port setting, an output port setting, a sensor setting, a base setting, and a maintenance setting.
Alternatively, the string format of the universal sentence may be as follows:
"$ -configuration type, device model, 1, parameter content, < CR > < LF >".
The configuration type is a form written in lower case english (for example, the engine is set to edd), if the parameter content includes a plurality of parameters, the parameters are arranged according to a fixed sequence, and each parameter is separated by a comma, for example: engine type, number of engine teeth, rated speed, … ….
And after receiving the general statement, the generator set controller modifies the corresponding parameters according to the configuration type and the parameter content in the general statement.
Optionally, S2 to S5 are repeatedly performed, establishing a plurality of connections while accessing the genset controller.
In a feasible implementation manner, a plurality of terminal devices may access the generator set controller at the same time, as shown in the flow diagram of fig. 2 (the generator set controller is abbreviated as a controller in fig. 2), the device 1, the device 2, the device … …, and the device n may establish a connection with the generator set controller at the same time, and the connection establishment process of each terminal device may refer to the above steps S2 to S5, which is not described herein again.
According to the power generating set controller and the power generating set communication method, communication between the power generating set controller and the network terminal is achieved through WEBSOCKET, the terminal equipment with the network function can be connected and accessed at any time and any place, a specific application program does not need to be installed, steps and conditions needed for establishing communication are greatly simplified, and communication efficiency is improved; and in the same network, a plurality of connections can be established and accessed simultaneously, so that the working efficiency is improved. The invention simultaneously has the advantages of long communication distance, high speed and large data volume, has the advantages of simple operation, low time delay, reliable connection and low price, and has the advantages of scientificity, practicability and strong environment adaptability.
The embodiment of the disclosure provides a system for communicating a terminal device with a generator set controller, and the system is used for realizing the method for communicating the terminal device with the generator set controller. As shown in fig. 3, the system includes a generator set controller 310, a terminal device 320, a WEBSERVER 330, and a WEBSERVER 340, where:
the generator set controller 310 is configured to initialize WEBSERVER and WEBSOCKETSERVER, and encapsulate data to be sent into a sending list according to a preset format; after a WEBSOCKET connection request of the terminal equipment is received, establishing new connection and monitoring; according to different HTML pages browsed currently by WEBSOCKET, sending data required by the pages in the sending list to the WEBSOCKET;
the terminal device 320 is configured to access a network where the generator set controller is located, acquire an HTML login page and a JS script of the generator set controller through a WEBSERVER after initialization is requested by an HTTP protocol, log in, connect to a WEBSERVER after initialization, and send a WEBSERVER connection request to the generator set controller; if the current browsed page of the WEBSOCKET is a quick guide or unit configuration page, sending a general statement to the generator set controller to modify parameters of the generator set controller;
the WEBSERVER 330 is used for acquiring an HTML login page and a JS script of the generator set controller;
the WEBSOCKETSERVER 340 is used for sending a WEBSOCKET connection request to the generator set controller.
Optionally, the routing list includes status indication data, timer data, engine data, sensor data, utility data, power generation data, load data, alarm data, input port data, output port data, history data, version data, and configuration data.
Optionally, the genset controller 310 is further configured to:
an object my _ websocket of the websocket server class is defined and instantiated.
Optionally, the terminal device 320 is further configured to:
and the terminal equipment accesses the network where the generator set controller is positioned in a wired, wireless or routing mode.
Optionally, the genset controller 310 is further configured to:
s31, after a WEBSOCKET connection request of the terminal equipment is received, a WEBSOCKET descriptor is stored to establish new connection;
s32, inserting a WEBSOCKET descriptor of the new connection into the HASH table so as to maintain a plurality of connections simultaneously;
s33, monitoring whether a new message comes in the new connection;
and S34, monitoring whether the new connection is disconnected or not, and if the new connection is disconnected, removing the descriptor of the new connection from the HASH table.
Optionally, the universal statement includes a timer setting, an engine setting, a generator setting, a utility setting, a load setting, a switch setting, an input port setting, an output port setting, a sensor setting, a base setting, and a maintenance setting.
Optionally, the terminal device 320 is further configured to:
and S6, repeatedly executing the steps from S2 to S5, and establishing a plurality of connections and accessing the generating set controller.
According to the power generating set controller and the power generating set communication method, communication between the power generating set controller and the network terminal is achieved through WEBSOCKET, the terminal with the network function can be connected and accessed at any time and any place, a specific application program does not need to be installed, steps and conditions needed for establishing communication are greatly simplified, and communication efficiency is improved; and in the same network, a plurality of connections can be established and accessed simultaneously, so that the working efficiency is improved. The invention simultaneously takes the advantages of long communication distance, high speed and large data volume into consideration, has the advantages of simple operation, low time delay, reliable connection and low price, and has the advantages of scientificity, practicability and strong environment adaptability.
Referring to fig. 4, a block diagram of a structure of an electronic device 400, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 4, the electronic device 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in the electronic device 400 are connected to the I/O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. Output unit 407 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 404 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
Computing unit 401 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 401 executes the respective methods and processes described above. For example, in some embodiments, a method of communicating between a terminal device and a genset controller described above can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 400 via the ROM 402 and/or the communication unit 409. In some embodiments, the computing unit 401 may be configured by any other suitable means (e.g., by means of firmware) to perform the above-described method of communicating a terminal device with a generator set controller.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

Claims (10)

1. A method of a terminal device communicating with a genset controller, the method comprising:
s1, initializing WEBSERVER and WEBSOCKETSERVER by the generator set controller, and packaging data to be transmitted into a transmission list according to a preset format;
s2, the terminal equipment is accessed to a network where the generator set controller is located, an HTML login page and a JS script of the generator set controller are obtained through a WEBSERVER after initialization of an HTTP request, login is conducted, the terminal equipment is connected to the initialized WEBSOCKETSERVER, and a WEBSOCKET connection request is sent to the generator set controller;
s3, after receiving a WEBSOCKET connection request of the terminal equipment, the generator set controller establishes new connection and monitors the new connection;
s4, the generator set controller sends data required by the pages in the sending list to the WEBSOCKET according to different HTML pages browsed by the WEBSOCKET currently;
and S5, if the page browsed by the WEBSOCKET currently is a quick guide page or a unit configuration page, sending a general statement to the generator set controller to modify the parameters of the generator set controller.
2. The method of claim 1, wherein the routing list includes status indication data, timer data, engine data, sensor data, utility data, power generation data, load data, alarm data, input port data, output port data, history data, version data, and configuration data.
3. The method of claim 1, wherein the generating set controller in S1 initializes WEBSERVER and webscocketserver, comprising:
an object my _ websocket of the websocket server class is defined and instantiated.
4. The method of claim 1, wherein the accessing of the terminal device in S2 to the network of the generator set controller comprises:
and the terminal equipment accesses the network where the generator set controller is positioned in a wired, wireless or routing mode.
5. The method of claim 1, wherein the step of establishing a new connection and listening after the power generator controller in S3 receives a request for a webkey connection from the terminal device comprises:
s31, after the generator set controller receives a WEBSOCKET connection request of the terminal equipment, storing a WEBSOCKET descriptor to establish new connection;
s32, inserting a WEBSOCKET descriptor of the new connection into the HASH table so as to maintain a plurality of connections simultaneously;
s33, monitoring whether a new message comes in the new connection;
and S34, monitoring whether the new connection is disconnected or not, and if the connection is disconnected, removing the descriptor of the new connection from the HASH table.
6. The method of claim 1, wherein the generic statement comprises a timer setting, an engine setting, a generator setting, a utility setting, a load setting, a switch setting, an input port setting, an output port setting, a sensor setting, a base setting, and a maintenance setting.
7. The method of claim 1, wherein the method further comprises:
and S6, repeatedly executing the steps from S2 to S5, and establishing a plurality of connections and accessing the generating set controller.
8. A system for communicating terminal devices with a generator set controller, the system for communicating terminal devices with a generator set controller being configured to perform the above-mentioned method for communicating terminal devices with a generator set controller, the system comprising a generator set controller, terminal devices, WEBSERVER and webscocketserver, wherein:
the generator set controller is used for initializing WEBSERVER and WEBSOCKETSERVER and packaging data to be sent into a sending list according to a preset format; after a WEBSOCKET connection request of the terminal equipment is received, establishing new connection and monitoring; according to different HTML pages browsed currently by WEBSOCKET, sending data required by the pages in the sending list to the WEBSOCKET;
the terminal equipment is used for accessing a network where the generator set controller is located, acquiring an HTML login page and a JS script of the generator set controller through a WEBSERVER after initialization of an HTTP request, logging in, connecting to the initialized WEBSOCKETSERVER, and sending a WEBSOCKET connection request to the generator set controller; if the current browsed page of the WEBSOCKET is a quick guide or unit configuration page, sending a general statement to the generator set controller to modify the parameters of the generator set controller;
the WEBSERVER is used for acquiring an HTML login page and a JS script of the generator set controller;
the WEBSOCKETSERVER is used for sending a WEBSOCKET connection request to the generator set controller.
9. An electronic device, comprising:
a processor; and
a memory for storing a program, wherein the program is stored in the memory,
wherein the program comprises instructions which, when executed by the processor, cause the processor to carry out the method according to any one of claims 1-7.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-7.
CN202211189263.2A 2022-09-28 2022-09-28 Method and system for communication between terminal equipment and generator set controller Pending CN115589438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211189263.2A CN115589438A (en) 2022-09-28 2022-09-28 Method and system for communication between terminal equipment and generator set controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211189263.2A CN115589438A (en) 2022-09-28 2022-09-28 Method and system for communication between terminal equipment and generator set controller

Publications (1)

Publication Number Publication Date
CN115589438A true CN115589438A (en) 2023-01-10

Family

ID=84778262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211189263.2A Pending CN115589438A (en) 2022-09-28 2022-09-28 Method and system for communication between terminal equipment and generator set controller

Country Status (1)

Country Link
CN (1) CN115589438A (en)

Similar Documents

Publication Publication Date Title
EP2649500B1 (en) Methods and systems for accessing and controlling a remote desktop of a remote machine in real time by a web browser at a client device via http api utilizing a transcoding server
EP2649502B1 (en) Methods and systems for a remote desktop session utilizing a http handler and a remote desktop client common interface
EP2649532B1 (en) Methods and systems for remote desktop session redrawing via http headers
EP2649533B1 (en) Methods and systems for facilitating a remote desktop session utilizing long polling
CN110489192B (en) Remote communication method and device and electronic equipment
CN103812913A (en) Remote access method and device based on VNC (virtual network computing)
CN104009938A (en) Method and system for long connections based on router level
CN104994079A (en) Access request processing method, access request processing device and acceleration server
CN104010001B (en) In mobile terminal, the method and system connecting communication is carried out in similar networking request
CN106850384A (en) A kind of method and mobile terminal for realizing accessing equipment in LAN
JP7393468B2 (en) Data synchronization methods, devices, electronic devices, storage media and computer programs
CN103501295A (en) Virtual machine migration-based remote access method and equipment
WO2024061308A1 (en) Notification processing method, and terminal device, server side and computer storage medium
CN113206879A (en) Terminal IP address automatic synchronization method, electronic equipment and storage medium
CN115589438A (en) Method and system for communication between terminal equipment and generator set controller
CN105354128A (en) Computer resource monitoring method, device and system
CN112492055A (en) Method, device and equipment for redirecting transmission protocol and readable storage medium
CN112783597A (en) Remote desktop implementation method and related equipment
CN111831513A (en) Log query method and device, electronic equipment and storage medium
CN105490846B (en) Server virtualization management system and method
CN111885203A (en) Method for remote management based on CMSP
CN111629020A (en) Remote input method, device, PC (personal computer) terminal, android device and system
CN114281563A (en) Application program reconstruction method and device
CN101581984A (en) Equipment and method with virtual mouse guide based on remote cross-network
CN107544920A (en) A kind of design method of the simulation computer peripheral hardware platform based on Android intelligent

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