CN113542408B - Method for interaction message between driver and passenger - Google Patents

Method for interaction message between driver and passenger Download PDF

Info

Publication number
CN113542408B
CN113542408B CN202110795505.1A CN202110795505A CN113542408B CN 113542408 B CN113542408 B CN 113542408B CN 202110795505 A CN202110795505 A CN 202110795505A CN 113542408 B CN113542408 B CN 113542408B
Authority
CN
China
Prior art keywords
public network
driver
service
socket
passenger
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
CN202110795505.1A
Other languages
Chinese (zh)
Other versions
CN113542408A (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.)
Shouyue Technology Beijing Co Ltd
Original Assignee
Shouyue Technology Beijing 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 Shouyue Technology Beijing Co Ltd filed Critical Shouyue Technology Beijing Co Ltd
Priority to CN202110795505.1A priority Critical patent/CN113542408B/en
Publication of CN113542408A publication Critical patent/CN113542408A/en
Application granted granted Critical
Publication of CN113542408B publication Critical patent/CN113542408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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/133Protocols for remote procedure calls [RPC]
    • 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/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a method for a driver to interact with passengers, which comprises the following steps: the proxy layer is called to acquire a public network IP, and the proxy layer calls an interface of a socket service to acquire a corresponding public network IP address; the socket service returns to the public network IP, and the proxy layer returns to the public network IP; building a long connection through the acquired public network IP and NETSERVER services of the socket, uploading heartbeats and subscribing the driver position; the heartbeat information is transmitted to lbs and merchants, and a service group sends information to socket service according to orders and other services; the socket service transmits messages of drivers and passengers to the respective drivers and passengers. By the method, the previous modes of time and labor waste and performance of order generation and flow forwarding interfaces are replaced; the driver and the passenger can conveniently and fast interact to save the expense generated by the short message and the telephone; the business interaction can adopt a push-pull combination mode to provide high-efficiency productivity; and the driver and passenger interaction is provided, so that reasonable management is facilitated.

Description

Method for interaction message between driver and passenger
Technical Field
The invention belongs to the field of data interaction, and particularly relates to a method for a driver to interact with a passenger to obtain information.
Background
The most important to the travel industry is to know the track of the driver so that passengers can conveniently place a bill to push the driver to the proper driver. The driver is required to report the heartbeat location in real time and thus create a TCP-based socks long connection service.
The long connection is implemented as follows:
1. the heartbeat positions of the driver and the passenger are reported, and meanwhile, the heartbeat of the driver can be used as a special attendance;
2. Business logic related message flows (including order arrival, order acceptance, etc.);
3. The driver and passenger chat messages and the like realize the transmission of the messages in the whole travel process.
Disadvantages:
1. The long connection establishment is verification, and bad long connection is stopped;
2. reasonably managing long connection, and separating the long connection from business;
3. And establishing a long connection white list and managing the message.
Disclosure of Invention
In view of the above technical problems in the related art, the present invention provides a method for a driver to interact with a passenger, which can overcome the above drawbacks of the prior art.
In order to achieve the technical purpose, the technical scheme of the invention is realized as follows:
A method of driver and passenger interaction messages, the method comprising:
The proxy layer is called to acquire a public network IP, and the proxy layer calls an interface of a socket service to acquire a corresponding public network IP address;
The socket service returns to the public network IP, and the proxy layer returns to the public network IP;
building a long connection through the acquired public network IP and NETSERVER services of the socket, uploading heartbeats and subscribing the driver position;
transmitting the heartbeat information to LBS geographic position basic service and commercial tenant, and sending information to socket service by service group according to order and other service;
The socket service transmits messages of drivers and passengers to the respective drivers and passengers.
Further, the calling agent layer obtains the public network IP address, including:
The APP calls an http interface of the proxy layer to acquire the public network IP address.
Further, the Socket service returns to the public network IP, and the Socket service returns to the public network IP according to a corresponding algorithm.
The invention has the beneficial effects that: by the method, the previous modes of time and labor waste and performance of order generation and flow forwarding interfaces are replaced; the driver and the passenger can conveniently and fast interact to save the expense generated by the short message and the telephone; the business interaction can adopt a push-pull combination mode to provide high-efficiency productivity; the system provides the driver and passenger interaction, also provides the driver and passenger with notification messages and the like, and is convenient for reasonable management; the corresponding message management background is provided, and can be adjusted appropriately.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flow chart of the steps of a method of driver and passenger interaction messages according to an embodiment of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a method of interacting messages between a driver and a passenger, the method comprising:
The proxy layer is called to acquire a public network IP, and the proxy layer calls an interface of a socket service to acquire a corresponding public network IP address;
The socket service returns to the public network IP, and the proxy layer returns to the public network IP;
building a long connection through the acquired public network IP and NETSERVER services of the socket, uploading heartbeats and subscribing the driver position;
transmitting the heartbeat information to LBS geographic position basic service and commercial tenant, and sending information to socket service by service group according to order and other service;
The socket service transmits messages of drivers and passengers to the respective drivers and passengers.
In some embodiments of the present invention, the calling agent layer obtains a public network IP address, including:
The APP calls an http interface of the proxy layer to acquire the public network IP address.
In some embodiments of the present invention, the Socket service returns to the public network IP, and the Socket service returns to the public network IP according to a corresponding algorithm.
In the present invention, the following points are included:
1. the APP terminal carries out long connection establishment according to the corresponding service obtained by logging in or not logging in;
2. after connection establishment, the server side performs management of corresponding long connection;
3. The APP end performs heartbeat uploading to ensure information interaction (the connection can hang up when the APP end is idle for a long time);
4. The APP end performs business interaction (such as heartbeat report, get-off point report, preset surrounding driver trolley positions and the like);
5. the service back end forwards the message to the APP end (such as new order arrival, order acceptance, order settlement, on-line time length and the like);
6. The message is also complemented and pushed during the period, so that the message is prevented from being lost;
7. the service is used as a double machine room to prevent network or machine room faults and other reasons from switching the machine rooms.
The method comprises the following specific steps:
1. The app calls an http interface of the proxy layer to acquire a public network IP;
2. The proxy layer calls the interface of the socket service to acquire a corresponding public network IP address;
3. the Socket service returns to the public network IP according to the corresponding algorithm;
4. the agent layer returns to the corresponding public network IP on the terminal;
5. the app establishes a long connection with NETSERVER services of the socket through the IP acquired in the first step, and the connection is similar to a telephone line;
6. The app continuously uploads heartbeats after being connected with a socket service, and subscribes to the position of a driver and other information;
7. the socket service gives heartbeat information of a driver to lbs and a merchant for special use of driver track and attendance;
8. service groups such as orders, dispatching orders, lbs and the like send messages to socket services according to the orders and other services;
9. Socket is responsible for correctly sending the driver and passenger messages to each driver and passenger.
The interaction among the services is convenient for message circulation, so that a driver can interact with passengers, and a platform can interact with the driver and the passengers. Maintaining long connection keeps instant reaching of message, and ensuring correct circulation of message.
1. The socket service internally comprises an http service, NETSERVER service, udpServer service and the like;
2. http service provides access to public network IP, message pushing, service detection data, etc
3. NETSERVCR the service provides the app to establish a long connection (telephone line) with the server and maintain it in the CacheManager memory;
4. udpServer carrying out the back display of the on-line time length attendance data of the driver and other message contents;
5. A verticle unit logic unit is arranged between each two services, and a Zookeeper manages the whole cluster;
message middleware is mainly used RocketMQ to push and buffer messages with redis.
By the method, the previous modes of time and labor waste and performance of order generation and flow forwarding interfaces are replaced; the driver and the passenger can conveniently and fast interact to save the expense generated by the short message and the telephone; the business interaction can adopt a push-pull combination mode to provide high-efficiency productivity; the system provides the driver and passenger interaction, also provides the driver and passenger with notification messages and the like, and is convenient for reasonable management; the corresponding message management background is provided, and can be adjusted appropriately.
Although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (3)

1. A method for driver and passenger interaction messages, comprising:
The proxy layer is called to acquire a public network IP, and the proxy layer calls an interface of a socket service to acquire a corresponding public network IP address;
The socket service returns to the public network IP, and the proxy layer returns to the public network IP;
building a long connection through the acquired public network IP and NETSERVER services of the socket, uploading heartbeats and subscribing the driver position;
transmitting the heartbeat information to LBS geographic position basic service and commercial tenant, and sending information to socket service by service group according to order and other service;
The socket service transmits messages of drivers and passengers to the respective drivers and passengers.
2. A method for driver and passenger interaction messages according to claim 1, wherein said invoking the agent layer to obtain the public network IP address comprises:
The APP calls an http interface of the proxy layer to acquire the public network IP address.
3. The method for exchanging messages between a driver and a passenger according to claim 1, wherein the Socket service returns to the public network IP, and the Socket service returns to the public network IP according to a corresponding algorithm.
CN202110795505.1A 2021-07-14 2021-07-14 Method for interaction message between driver and passenger Active CN113542408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110795505.1A CN113542408B (en) 2021-07-14 2021-07-14 Method for interaction message between driver and passenger

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110795505.1A CN113542408B (en) 2021-07-14 2021-07-14 Method for interaction message between driver and passenger

Publications (2)

Publication Number Publication Date
CN113542408A CN113542408A (en) 2021-10-22
CN113542408B true CN113542408B (en) 2024-04-19

Family

ID=78099086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110795505.1A Active CN113542408B (en) 2021-07-14 2021-07-14 Method for interaction message between driver and passenger

Country Status (1)

Country Link
CN (1) CN113542408B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610888A (en) * 2015-09-08 2016-05-25 华南师范大学 Method of using socket to push message based on Android and system thereof
CN105827720A (en) * 2016-04-18 2016-08-03 宁波轩悦行电动汽车服务有限公司 Mobile phone APP vehicle information obtaining system and load balancing method and vehicle renting method
WO2016130825A1 (en) * 2015-02-13 2016-08-18 Alibaba Group Holding Limited Method and apparatus for changing configurations
CN106231110A (en) * 2016-08-12 2016-12-14 北京东方车云信息技术有限公司 The offline service method of driver's client, driver's client and related system
WO2019028673A1 (en) * 2017-08-08 2019-02-14 深圳先进技术研究院 B/s architecture-based data communication system and method, web server, and monitoring system
CN110932924A (en) * 2019-10-28 2020-03-27 深圳市钱海网络技术有限公司 Message pushing method and device for communication between APP and server
CN112188438A (en) * 2020-09-22 2021-01-05 广州宸祺出行科技有限公司 Method and system for exchanging data between network booking APP and vehicle machine

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016130825A1 (en) * 2015-02-13 2016-08-18 Alibaba Group Holding Limited Method and apparatus for changing configurations
CN105610888A (en) * 2015-09-08 2016-05-25 华南师范大学 Method of using socket to push message based on Android and system thereof
CN105827720A (en) * 2016-04-18 2016-08-03 宁波轩悦行电动汽车服务有限公司 Mobile phone APP vehicle information obtaining system and load balancing method and vehicle renting method
CN106231110A (en) * 2016-08-12 2016-12-14 北京东方车云信息技术有限公司 The offline service method of driver's client, driver's client and related system
WO2019028673A1 (en) * 2017-08-08 2019-02-14 深圳先进技术研究院 B/s architecture-based data communication system and method, web server, and monitoring system
CN110932924A (en) * 2019-10-28 2020-03-27 深圳市钱海网络技术有限公司 Message pushing method and device for communication between APP and server
CN112188438A (en) * 2020-09-22 2021-01-05 广州宸祺出行科技有限公司 Method and system for exchanging data between network booking APP and vehicle machine

Also Published As

Publication number Publication date
CN113542408A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN102651773B (en) Terminal connection control system, transmission terminal, transfer system and terminal connection control method
CN102308532B (en) Method, system and server for processing point to multi-point push message
US20140115125A1 (en) Method for Receiving Data, Method for Sending Data, Mobile Terminal, and Server
CN103634490A (en) A gateway for the survivability of an enterprise network using SIP
CN104954446B (en) Information push method and system
US20220209878A1 (en) Method, system and device for pushing information, and storage medium thereof
CN104144098A (en) Information pushing method and system and pushing server equipment
CN101854703B (en) Method, server and system for acquiring status information
US10834033B2 (en) Method and system for transferring messages between messaging systems
CN107741884B (en) Method and device for realizing message pushing by hierarchical state machine
CN101167344B (en) Telephone apparatus
CN104852991A (en) Distributed push server system and data push method using the system
CN102130845A (en) Method for transmitting return receipt report and processing system
CN109600721A (en) A kind of communication means and device
CN101110789B (en) Method for sending instant message in instant message system
CN109996196A (en) Route addressing method, short message downlink processing method, apparatus and system
CN101909019A (en) Method and system for processing request message
CN101547214A (en) Method and network side equipment for pushing inside data of enterprise
CN113542408B (en) Method for interaction message between driver and passenger
CN110582757A (en) Intermediate device for network routing of data messages
CN101404674B (en) Call routing method, proxy server and relay device
CN103686863A (en) Control signaling transfer method and control signaling transfer system
CN111565235A (en) Method and device for obtaining address of multimedia message service server
CN101547213B (en) Method for realizing presence service and interconnecting gateway
CN104022941A (en) Meeting instant communication system and implementation method thereof

Legal Events

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