CN108270876B - Method for realizing proxy server in signal system - Google Patents

Method for realizing proxy server in signal system Download PDF

Info

Publication number
CN108270876B
CN108270876B CN201810287011.0A CN201810287011A CN108270876B CN 108270876 B CN108270876 B CN 108270876B CN 201810287011 A CN201810287011 A CN 201810287011A CN 108270876 B CN108270876 B CN 108270876B
Authority
CN
China
Prior art keywords
application server
message
proxy server
request message
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810287011.0A
Other languages
Chinese (zh)
Other versions
CN108270876A (en
Inventor
魏宁
钱江
周公建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casco Signal Ltd
Original Assignee
Casco Signal 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 Casco Signal Ltd filed Critical Casco Signal Ltd
Priority to CN201810287011.0A priority Critical patent/CN108270876B/en
Publication of CN108270876A publication Critical patent/CN108270876A/en
Application granted granted Critical
Publication of CN108270876B publication Critical patent/CN108270876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Train Traffic Observation, Control, And Security (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to a method for realizing a proxy server in a signal system, which comprises the following steps: step S1, reading a configuration file; step S2, registering the network event connected with the application server in the message queue; step S3, creating a management thread capable of connecting with the terminal according to the configuration file; step S4, after establishing connection with the application server to generate a network event, responding to the network event, and sending a request to the application server to obtain the current display data of the total station; step S5, storing the train number window object by adopting an index unique positioning mode and storing the station equipment state data by adopting a grading mode; and step S6, when a terminal establishes connection with the proxy server and sends a request, processing the request message and completing the forwarding of the station yard display data. Compared with the prior art, the method and the system increase the number of terminals capable of viewing the interface of the whole line station yard on the basis of not influencing the prior system and under the condition of not increasing the pressure of the application server.

Description

Method for realizing proxy server in signal system
Technical Field
The invention relates to a railway signal system, in particular to a method for realizing a proxy server in the signal system.
Background
For a subway line which is opened and operated for years, a used signal system is basically stable, and a user generally cannot agree to upgrade the whole signal system under the condition of no major change. However, with the opening of extension lines, the increase of the number of operating trains and the like, new demands are required. For example, more terminals are needed that can view the full line yard interface. However, generally, there is a limit to the number of terminals to which an application server in the ATS system can be connected. For some old versions of the ATS system, the number of terminals which can be connected by the application server is less than twenty, and the requirement of system expansion cannot be met.
Disclosure of Invention
The present invention aims to overcome the defects of the prior art and provide a method for implementing a proxy server in a signal system, which increases the number of terminals capable of viewing the interface of a full-line station yard on the basis of not influencing the prior system and without increasing the pressure of an application server.
The purpose of the invention can be realized by the following technical scheme:
a method for realizing a proxy server in a signal system comprises the following steps:
step S1, reading the configuration file and obtaining system configuration parameters;
step S2, establishing connection with the application server in the system in the role of 'terminal', and registering the network event connected with the application server in the message queue;
step S3, starting with the role of 'application server', and creating a management thread capable of connecting with the terminal according to the configuration file;
step S4, after establishing connection with the application server to generate a network event, responding to the network event, and sending a request to the application server to obtain the current display data of the total station;
step S5, storing the train number window object by adopting an index unique positioning mode and storing the station equipment state data by adopting a grading mode;
and step S6, when a terminal establishes connection with the proxy server and sends a request, processing the request message and completing the forwarding of the station yard display data.
Preferably, the system configuration parameters include: the number of GPCs connected with the proxy server, the configuration parameters of each GPC, the node name used by the proxy server connected with the application server, and the message queue name.
Preferably, the logic of the management thread in step S3 is: establishing bottom layer communication between a proxy server and an application server according to configuration, establishing and registering a message queue, and registering a network event; and circularly reading and processing the content of the message queue.
Preferably, the step S4 specifically includes:
step S41, sending a login request message to the application server;
step S42, after receiving the login success message returned by the application server, sending a vehicle number window whole request message and an equipment state whole request message;
step S43, receiving the whole message of the train number window and the whole message of the equipment state, wherein the train number window is stored in an index unique positioning mode, and the whole equipment state is stored in a grading mode, so that the searching and the management are convenient;
and step S44, updating the memory data after receiving the update message of the train number window and the equipment state update message.
Preferably, the login request message includes a user name and a password.
Preferably, the step S6 specifically includes:
step S61, when the proxy server is started, the management of all terminals connectable at most is started;
step S62, receiving a login request message after the terminal establishes connection, judging according to the user name and the password in the login request message, and judging whether a login success message is returned or not;
step S63, receiving the whole request message of the train number window of the terminal, and sending all the train number window data packets in the memory to the corresponding terminal;
step S64, receiving the request message of the whole device state of the terminal, and sending the device state data packet stored in the memory in a grading way to the corresponding terminal;
and step S65, timely forwarding the train number window updating and equipment state updating messages to all terminals connected with the proxy server.
Compared with the prior art, the invention has the following advantages:
1) in the invention, as for the application server, the proxy server is only a common terminal, and the addition of the proxy server in the system does not add any performance burden to the application server;
2) in the invention, the number of terminals which can be connected by the proxy server is 50 at most, thereby greatly expanding the capacity of the system;
3) according to the invention, the proxy server performs data caching on the train number window and the equipment state, and when the terminal is connected with the proxy server, the station yard data is directly acquired from the proxy server, so that the network flow and the load of an application server are reduced;
4) according to the invention, the proxy server updates the cache data according to the update messages of the train number window and the equipment state, and simultaneously forwards the update messages to all connected terminals in time, so that the station interface is ensured to be refreshed in time.
Drawings
FIG. 1 is a flow diagram of proxy server initiation;
FIG. 2 is a timing diagram illustrating interaction between a proxy server and an application server;
fig. 3 is a sequence diagram of interaction between the proxy server and the terminal.
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 some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
Referring to fig. 1-3, the technical solution of the present invention is illustrated. Referring first to fig. 1, the system start-up process of the present invention is described, comprising the steps of:
step 100, reading a configuration file, and acquiring system configuration parameters, including the number of GPCs connected to a proxy server, configuration parameters of each GPC, a node name used for connecting the proxy server to an application server, a message queue name, and the like;
step 101, creating and starting a comATS thread, wherein the thread logic is as follows: establishing bottom layer communication between a proxy server and an application server according to configuration, establishing and registering a message queue, and registering a network event; and circularly reading and processing the content of the message queue. The main implementation codes are as follows:
Figure BDA0001616302610000031
Figure BDA0001616302610000041
the communication between the proxy server and the application server is realized by a comATS thread, and the process refers to FIG. 2. the specific process is as follows:
1. when the CONNECTION state with the application server is changed, the communication management layer sends a CONNECTION _ RESET message to a message queue of the comATS;
2. after the commCATS thread of the proxy server reads the message, if the connection is established, firstly, the application service sends a login request, corresponding processing is carried out according to a login reply message, and if the login is successful, a request message for loading all the states of the equipment and all the train number windows is sent to the application server; if the connection is disconnected, the cache of the proxy server is emptied; the main implementation codes are as follows:
Figure BDA0001616302610000042
3. receiving all messages of the train number windows, circularly processing each train number window updating message, and updating the cache of the proxy server according to the messages; the train number window uses the train set number as the unique positioning mode for indexing and storing. Because the message is received only during software initialization/reinitialization, the processing of each train number window is an add process aiming at the message, and only an idle position needs to be found in the memory and the train number window object is added.
4. Receiving messages of all equipment states, circularly processing each equipment state updating message, and updating the cache of the proxy server according to the messages; the device states are all stored in a hierarchical mode, so that according to each message, a centralized station is positioned according to rtuId, and when a specific device is positioned according to iconHandle, the status of the device is updated.
5. And after receiving the train number window updating message and indexing and positioning according to the train set number, deleting or updating the train number window object according to the msgType after finding the corresponding train number window object.
6. And after receiving the equipment state updating message, positioning the centralized station according to the rtuId, and updating the status of the specific equipment when the specific equipment is positioned according to the iconHandle.
The communication process between the proxy server and the terminal refers to fig. 3, the specific process is as follows:
1. receiving a login request message of a terminal, verifying a user name and a password, if the user name and the password pass the verification, setting the ifLogin of the terminal to true, sending a login reply to the terminal, and adding the terminal into an update list;
2. receiving a whole train number window request message of a terminal, and sending all train number window packets in the cache to the terminal;
3. receiving a request message of all the equipment states of the terminal, and sending all the equipment state packets in the cache to the terminal;
4. when the state of a certain train number window or equipment is updated, the updating message is sent to all terminals in an updating list in time so that each terminal can update the interface display in time;
5. when the proxy server is disconnected with the application server, sending a station death message to all terminals in the update list to inform the cleaner of the state display of the equipment; and simultaneously emptying the proxy server cache, deleting all the train number window objects, and simultaneously sending train number window deletion messages to all the terminals in the update list, so that the effect of interface graying is achieved when the terminals are disconnected with the application server.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (4)

1. A method for realizing a proxy server in a signal system is characterized by comprising the following steps:
step S1, reading the configuration file and obtaining system configuration parameters;
step S2, establishing connection with the application server in the system in the role of 'terminal', and registering the network event connected with the application server in the message queue;
step S3, starting with the role of 'application server', and creating a management thread capable of connecting with the terminal according to the configuration file;
step S4, after establishing connection with the application server to generate a network event, responding to the network event, and sending a request to the application server to obtain the current display data of the total station;
step S5, storing the train number window object by adopting an index unique positioning mode and storing the station equipment state data by adopting a grading mode;
step S6, when a terminal establishes connection with the proxy server and sends a request, the request message is processed to complete the forwarding of the station yard display data;
the step S4 specifically includes:
step S41, sending a login request message to the application server;
step S42, after receiving the login success message returned by the application server, sending a vehicle number window whole request message and an equipment state whole request message;
step S43, receiving the whole message of the train number window and the whole message of the equipment state, wherein the train number window is stored in an index unique positioning mode, and the whole equipment state is stored in a grading mode, so that the searching and the management are convenient;
step S44, updating the memory data after receiving the message of updating the train number window and the equipment state;
the step S6 specifically includes:
step S61, when the proxy server is started, the management of all terminals connectable at most is started;
step S62, receiving a login request message after the terminal establishes connection, judging according to the user name and the password in the login request message, and judging whether a login success message is returned or not;
step S63, receiving the whole request message of the train number window of the terminal, and sending all the train number window data packets in the memory to the corresponding terminal;
step S64, receiving the request message of the whole device state of the terminal, and sending the device state data packet stored in the memory in a grading way to the corresponding terminal;
and step S65, timely forwarding the train number window updating and equipment state updating messages to all terminals connected with the proxy server.
2. The method of claim 1, wherein the system configuration parameters comprise: the number of GPCs connected with the proxy server, the configuration parameters of each GPC, the node name used by the proxy server connected with the application server, and the message queue name.
3. The method according to claim 1, wherein the logic for managing threads in step S3 is: establishing bottom layer communication between a proxy server and an application server according to configuration, establishing and registering a message queue, and registering a network event; and circularly reading and processing the content of the message queue.
4. The method of claim 1, wherein the login request message includes a username and password.
CN201810287011.0A 2018-03-30 2018-03-30 Method for realizing proxy server in signal system Active CN108270876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810287011.0A CN108270876B (en) 2018-03-30 2018-03-30 Method for realizing proxy server in signal system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810287011.0A CN108270876B (en) 2018-03-30 2018-03-30 Method for realizing proxy server in signal system

Publications (2)

Publication Number Publication Date
CN108270876A CN108270876A (en) 2018-07-10
CN108270876B true CN108270876B (en) 2021-03-09

Family

ID=62777477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810287011.0A Active CN108270876B (en) 2018-03-30 2018-03-30 Method for realizing proxy server in signal system

Country Status (1)

Country Link
CN (1) CN108270876B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495546B (en) * 2018-10-26 2021-11-23 北京车和家信息技术有限公司 Data processing method, system and server
CN111708586B (en) * 2020-06-22 2023-06-20 平安养老保险股份有限公司 Application starting configuration item loading method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1722663A (en) * 2004-07-13 2006-01-18 联想(北京)有限公司 A proxy server system and method for realizing proxy communication thereof
CN104484735A (en) * 2014-11-20 2015-04-01 上海富欣智能交通控制有限公司 Rail transportation comprehensive maintenance management information publishing system
CN105553694A (en) * 2015-12-08 2016-05-04 北京交控科技股份有限公司 Track traffic train-ground maintenance information communication system and method
CN105991568A (en) * 2015-02-09 2016-10-05 苏州精易会信息技术有限公司 Proxy realizing device
CN106934016A (en) * 2017-03-10 2017-07-07 深圳交控科技有限公司 The method for monitoring operation states and system of a kind of track traffic

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9635491B2 (en) * 2014-07-10 2017-04-25 Sap Se Transient mobile application capture in a restricted area

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1722663A (en) * 2004-07-13 2006-01-18 联想(北京)有限公司 A proxy server system and method for realizing proxy communication thereof
CN104484735A (en) * 2014-11-20 2015-04-01 上海富欣智能交通控制有限公司 Rail transportation comprehensive maintenance management information publishing system
CN105991568A (en) * 2015-02-09 2016-10-05 苏州精易会信息技术有限公司 Proxy realizing device
CN105553694A (en) * 2015-12-08 2016-05-04 北京交控科技股份有限公司 Track traffic train-ground maintenance information communication system and method
CN106934016A (en) * 2017-03-10 2017-07-07 深圳交控科技有限公司 The method for monitoring operation states and system of a kind of track traffic

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"CBTC综合维护管理系统中基于Web的实时通信方法";孔令发等;《科技资讯》;20180203(第4期);第43-45页 *
"发布与订阅机制在铁路信号集中监测系统中的应用";王圣根等;《中国铁路》;20131215;第89-91页 *

Also Published As

Publication number Publication date
CN108270876A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
US8060622B2 (en) System and method for session reestablishment between client terminal and server
CN108055157B (en) Service node acquisition method and device
US10313452B2 (en) Migrating a chat message service provided by a chat server to a new chat server
US9338118B2 (en) Apparatus and method for transmitting push notification message
CN110109766B (en) Data interaction method and device based on cross-department and cross-platform data sharing exchange
CN108270876B (en) Method for realizing proxy server in signal system
CN112565418B (en) Message retransmission method and device for service cluster, computer equipment and storage medium
CN112367182B (en) Configuration method and device of disaster recovery main and standby equipment
CN112218342A (en) Method, device and system for realizing core network sub-slice disaster tolerance
CN105978796A (en) Message communication method and system based on unstable mobile network
CN114363963A (en) Load balancing selection method and system for cloud-native UPF signaling plane
WO2017220021A1 (en) Short message processing method and apparatus
US7415276B2 (en) Presence management server and system
CN112260928B (en) Node switching method and device, electronic equipment and readable storage medium
CN114500237B (en) Communication method and system
CN113612735B (en) Secure storage system
CN113794622B (en) Message processing method and device, electronic equipment and storage medium
CN111614767B (en) Data storage method and device
CN108989467B (en) Centralized addressing method
CN110896414B (en) Method for realizing message notification between services by using IOT (Internet of things)
CN108804709B (en) Method and device for processing lock management message of shared file system and server
CN113596083A (en) High-availability cloud communication call recovery method and system based on state tracking
CN113810266B (en) Retry operation method, device, equipment and storage medium for message object
CN108259411B (en) Communication optimization method of video push service, cluster control function body and dispatching desk
CN104539442B (en) For improving method, the network equipment and the system of reliability

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1254245

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant