Online car-hailing background message pushing method and system based on ass

By using SSE technology in online ride-hailing services, the location information, order status and other data of passengers and drivers are pushed in real time, the problem of inefficient information push in the existing technology is solved, and an efficient and real-time user experience is achieved.

CN119892919APending Publication Date: 2025-04-25BEIJING BAILONG MAYUN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411937618.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In online ride-hailing services, existing technologies such as polling mechanisms and WebSocket technologies have problems such as inefficiency, high data latency and large resource utilization, making it difficult to achieve real-time information push, affecting efficient communication between drivers and passengers.

Method used

The online car-hailing backend push message method based on SSE (Server-Sent Events) is adopted, and data is collected through the API interface and GPS positioning system, formatted into an event format supported by SSE, and pushed to the client in real time through a persistent HTTP connection.

Benefits of technology

It realizes that without using WebSocket technology, dynamic updates and notifications are pushed to users in real time, improving real-timeness, reducing client burden, optimizing server resource usage, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892919A_ABST
    Figure CN119892919A_ABST
Patent Text Reader

Abstract

The invention discloses an online car-hailing background message pushing method and system based on ass. The invention relates to the technical field of online car hailing. When a client requests to establish SSE connection for the first time, the SSE connection is established based on HTTP long polling or HTTP stream (such as Server Push characteristics of HTTP / 2). The SSE server periodically sends heartbeat messages (null messages or messages only containing timestamps) to the client. The client server is informed of being still online and the connection is active. The SSE technology adopted by the invention allows the server to push events to the client in real time, and ensures that the user can receive the latest dynamic state and notification in real time, such as position update and order state change. Therefore, the user experience is improved, and the user can more accurately know the current service state. Compared with a traditional polling mechanism, the SSE technology adopted by the invention reduces the number of times of sending requests to the server by the client, so that the network burden and battery consumption of the client are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of online car-hailing, and in particular to a backend information push technology of online car-hailing, and in particular to a SASS-based online car-hailing backend message push method and system. Background Art

[0002] With the rapid development of mobile Internet technology, online car-hailing services have become an indispensable part of the modern urban transportation system. This emerging service model has not only changed people's travel habits, but also greatly improved the efficiency and convenience of urban transportation. However, in the operation of online car-hailing services, the transmission of real-time information has become a key link to ensure efficient and safe communication between drivers and passengers.

[0003] The polling mechanism is one of the earliest technologies used to implement real-time communication on the Web. Its basic principle is that the client sends requests to the server at fixed time intervals to query whether there is new data or events. Although it is simple to implement, the polling mechanism has significant defects: first, it is inefficient. When the server has no data to update, the frequent requests from the client will cause unnecessary waste of network resources; second, the data latency is high. Due to the existence of the request interval, new data cannot be pushed to the client immediately. In online car-hailing services, these problems may cause the driver to be unable to obtain timely updates on the passenger's location, and the passenger cannot understand the arrival time of the vehicle in real time, thus affecting the quality of service.

[0004] Compared with the polling mechanism, WebSocket provides a more efficient real-time communication solution. The WebSocket protocol allows full-duplex communication between the client and the server by establishing a persistent TCP connection, and can push data in real time without the client frequently initiating requests. However, WebSocket technology is relatively complex, requiring both the server and the client to support the protocol, and there may be unstable connections in certain network environments (such as NAT and firewall restrictions). In addition, the long-term maintenance of the WebSocket connection also poses certain challenges to the server's resource usage.

[0005] To this end, the present invention proposes a SASS-based online car-hailing backend message push method and system. Summary of the invention

[0006] In view of this, the present invention hopes to provide a method and system for pushing messages in the background of online car-hailing service based on SASS, so as to solve or alleviate the technical problems existing in the prior art, that is, how online car-hailing service can push dynamic updates and notifications to users in real time without using WebSocket technology, and at least provide a beneficial option for this; the technical solution of the present invention is implemented as follows:

[0007] First, a method for pushing messages to the backend of a car-hailing service based on Sass:

[0008] 1. Overview:

[0009] The present invention aims to solve the above-mentioned technical problems. The online car-hailing platform collects raw data such as passenger and driver location information, order status and trip details through an API interface and a GPS positioning system, and transmits it to a data processing center in real time. The data processing center parses and processes the received raw data, and then formats it into an event format supported by SSE (Server-SentEvents), including event type, data content and timestamp. These events are sent to the SSE server, which maintains a persistent HTTP connection with the client and pushes the events to the corresponding client in real time. The client uses HTML5's EventSource API to receive the event stream from the SSE server, and parses and processes the received events, including updating data and triggering notifications. Finally, the client application updates the user interface based on the received events and generates notification prompts to enhance the user experience.

[0010] (II) Technical solution:

[0011] In order to achieve the above technical objectives, the present invention selects to execute the following steps S1 to S4.

[0012] 2.1 Step S1, Data Engineering:

[0013] The online ride-hailing platform collects raw data through various interfaces, including the location information of passengers and drivers, order status and trip details. After receiving the raw data, the data processing center formats it into the event format supported by SSE (Server-Sent Events).

[0014] 2.1.1 Step S100, data collection:

[0015] The online ride-hailing platform collects raw data such as the location information of passengers and drivers, order status and trip details through API interfaces and GPS positioning systems. The raw data is transmitted to the data processing center in real time.

[0016] 2.1.2 Step S101, data analysis and processing:

[0017] The data processing center analyzes the received raw data and extracts useful information.

[0018] 2.1.3 Step S102, data formatting:

[0019] The original data is formatted into the event format supported by SSE (Server-Sent Events). The formatted event includes event type, data content and timestamp.

[0020] 2.2 Step S2, event push:

[0021] Events are sent to the SSE server. The SSE server maintains a persistent HTTP connection with the client and pushes events to the corresponding client in real time.

[0022] 2.2.1 Step S200, connection establishment:

[0023] When a client first requests to establish an SSE connection, it is established based on HTTP long polling or HTTP streaming (such as the Server Push feature of HTTP / 2).

[0024] 2.2.2 Step S201, execute the heartbeat mechanism:

[0025] The SSE server periodically sends heartbeat messages (empty messages or messages containing only timestamps) to the client. The purpose of the heartbeat message is to tell the client that the server is still online and the connection is active.

[0026] If the client does not receive a message from the server within a certain period of time, it assumes that the connection has been lost and tries to reestablish the connection. The SSE server can be configured with a timeout so that it can send a heartbeat message before the client times out.

[0027] 2.2.3 Step S202, event push:

[0028] S2020, Event Queue Management: The SSE server maintains an event queue to store events to be pushed to the client. When a new event is generated, it is added to the end of the queue.

[0029] S2021, Event Serialization: Before pushing events to the client, the SSE server serializes the events into a text format (JSON) for transmission over an HTTP connection.

[0030] S2022, event push: The SSE server takes the event from the event queue and pushes it to the client in the form of a stream through the HTTP connection. The push process can be continuous or based on a trigger condition (the event queue is not empty).

[0031] S2023, flow control: Implement flow control of the SSE server by adjusting the frequency of push events, batch push events, or implementing a client feedback mechanism to ensure that the client is not unable to handle the push events due to excessive push speed.

[0032] 2.3 Step S3, client receiving and processing:

[0033] The client receives and parses the event stream from the SSE server and processes it accordingly based on the event type.

[0034] 2.3.1 Step S300, receiving event stream:

[0035] The client application uses HTML5's EventSource API to receive the event stream from the SSE server, thereby ensuring the continuity and real-time nature of the event stream.

[0036] 2.3.2 Step S301, event analysis:

[0037] The client parses the received events and extracts the event type and data content information.

[0038] 2.3.3 Step S302, event processing:

[0039] Depending on the event type, the client performs corresponding processing, including updating data or triggering notifications.

[0040] S3020, execute data update logic: If the event type is a data update class (such as location information or order status change), the client merges the new data into the existing data structure or replaces the old data.

[0041] If the event type is notification-based (such as trip start, arrival at destination, or order completion), the client generates a local notification, sends a push notification to the user's device, or displays a notification message on the interface.

[0042] S3021, Interface Rendering: Based on the updated data, the client re-renders the user interface to reflect the latest status or information, including updating the location marker on the map and displaying the new order status.

[0043] S3022, user interaction processing: If the notification or update requires user interaction (such as click confirmation, input feedback, etc.), the client prepares the corresponding interactive elements and processes the user input.

[0044] 2.4 Step S4, user interface update and notification:

[0045] Based on the events received, the client application updates the user interface.

[0046] 2.4.1 Step S400, user interface update:

[0047] The client application updates the user interface based on the events received, displaying the latest location information and order status dynamic content.

[0048] 2.4.2 Step S401, notification prompt:

[0049] The client generates notifications to inform users of updates or changes to their itinerary, improving user experience.

[0050] (III) Mechanism for solving technical problems:

[0051] 3.1 Connection establishment:

[0052] When a client (such as a user's mobile device or web browser) first requests to establish an SSE connection, a persistent connection is established between the SSE server and the client via the HTTP protocol. This connection allows the server to continue to push events to the client while the client remains online. In order to keep the connection active, the SSE server periodically sends heartbeat messages to the client (usually empty messages or messages containing only a timestamp). The purpose of the heartbeat message is to tell the client that the server is still online and the connection is active. If the client does not receive a message from the server within a certain period of time, it may think that the connection has been lost and try to reestablish the connection. The SSE server can be configured with a timeout so that it can send a heartbeat message before the client times out.

[0053] 3.2 Event Queues and Serialization:

[0054] The SSE server maintains an event queue to store events to be pushed to the client. When a new event is generated, it is added to the end of the queue. Before pushing the event to the client, the SSE server serializes the event into a text format (JSON) for transmission over an HTTP connection.

[0055] 3.3 Event push and flow control:

[0056] The SSE server takes events from the event queue and pushes them to the client in the form of a stream through the HTTP connection. The push process can be continuous or based on some trigger conditions (such as the event queue is not empty). In order to ensure that the client is not overwhelmed by the push speed, the SSE server implements a flow control mechanism to control the push speed by adjusting the frequency of push events, batching push events, or implementing a client feedback mechanism.

[0057] 3.4 Client reception and processing:

[0058] The client uses HTML5's EventSource API to receive event streams from the SSE server. This API can automatically handle the persistence and reconnection logic of HTTP connections to ensure the continuity and real-time nature of the event stream. The client parses the received events and extracts the event type and data content information. Based on the event type, the client executes the corresponding processing logic, including updating data (such as location information, order status) or triggering notifications (such as the start of a trip, arrival at a destination, and order completion).

[0059] Second, a sass-based online car-hailing backend push message system:

[0060] The system includes a processor and a memory connected to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the above-mentioned method for pushing messages to the backend of online car-hailing. It also includes:

[0061] (1) Data processing center: responsible for collecting raw data from various interfaces (such as API, GPS positioning system, etc.) and conducting in-depth analysis and processing. This data covers key information such as passenger and driver location information, order status, and trip details. After processing, the data is converted into an event format supported by SSE (Server-Sent Events) to prepare for subsequent data push.

[0062] (2) SSE server connected to the processor: responsible for establishing and maintaining a persistent HTTP connection between the server and the client. Through this connection, the SSE server can push processed data to the client in real time in the form of an event stream.

[0063] (3) Client application: runs on their mobile devices and is responsible for receiving and processing data from the SSE server and providing users with real-time, accurate information and services.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] 1. Improved real-time performance: The SSE technology used in the present invention allows the server to push events to the client in real time, ensuring that users can instantly receive the latest dynamics and notifications, such as location updates, order status changes, etc. This improves the user experience and enables users to understand the current service status more accurately.

[0066] 2. Reduce the burden on the client: Compared with the traditional polling mechanism, the SSE technology adopted by the present invention reduces the number of times the client sends requests to the server, thereby reducing the client's network burden and battery consumption. The client only needs to establish a connection once to continuously receive updates from the server, which improves efficiency.

[0067] 3. Server resource optimization: The SSE technology used in the present invention allows the server to send data to the client when needed, rather than responding to the client's request as frequently as polling. This helps reduce the server load, optimize resource usage, and reduce operating costs.

[0068] 4. Wide compatibility: The SSE technology used in the present invention is based on the HTTP protocol, so it is compatible with the existing Web infrastructure and does not require additional protocol support, making the solution easy to deploy and maintain, while covering a wider range of user groups. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0070] Figure 1 It is a schematic diagram of the SSE interaction process of the present invention;

[0071] Figure 2 It is a schematic diagram comparing the round-robin training and SSE push processes of the present invention;

[0072] Figure 3 Schematic diagram of the system architecture of the present invention. DETAILED DESCRIPTION

[0073] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;

[0074] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0075] Example 1: Please refer to Figures 1-2 This embodiment discloses a method for pushing messages to a backend of a car-hailing service based on SASS, which includes the following implementation steps:

[0076] In this embodiment, regarding step S1, data engineering:

[0077] S100, Data Collection: The online ride-hailing platform uses API interfaces and GPS positioning systems to collect original data such as passenger and driver location information, order status, and trip details in real time.

[0078] S101, data analysis and processing: After receiving the raw data, the data processing center will analyze it and extract useful information from it, such as the specific location of passengers and drivers, the latest status of orders, etc. The purpose of this step is to convert raw data into valuable information that can be used for subsequent processing.

[0079] S102, data formatting: The processed data will be formatted into an event format supported by SSE (Server-Sent Events). The formatted event includes the event type (such as location update, order status change, etc.), data content (such as new location information, order status, etc.) and timestamp.

[0080] In this embodiment, regarding step S2, event push

[0081] S200, connection establishment: When the client first requests to establish an SSE connection, it is established based on HTTP long polling or HTTP streaming (such as the Server Push feature of HTTP / 2). This connection allows the server to push data to the client in real time when it is updated.

[0082] S201, execute the heartbeat mechanism: the SSE server will periodically send heartbeat messages to the client to ensure the activity of the connection. If the client does not receive a message from the server within a certain period of time, it will try to re-establish the connection.

[0083] S202, event push:

[0084] S2020, Event Queue Management: The SSE server maintains an event queue to store events to be pushed to the client.

[0085] S2021, Event serialization: Before pushing, the SSE server will serialize the event into a text format (such as JSON) for transmission over an HTTP connection.

[0086] S2022, event push: The SSE server takes the event from the event queue and pushes it to the client in the form of a stream through an HTTP connection.

[0087] S2023, Flow control: The SSE server controls the flow by adjusting the push frequency, batch push, or implementing a client feedback mechanism to ensure that the client can process the received events in a timely manner.

[0088] In this embodiment, regarding step S3, the client receives and processes:

[0089] S300, receiving event stream:

[0090] The client application uses HTML5's EventSource API to receive event streams from the SSE server, ensuring the continuity and real-time nature of events.

[0091] S301, event analysis: the client analyzes the received event and extracts the event type and data content information for subsequent processing.

[0092] S302, event processing: According to the event type, the client executes the corresponding processing logic:

[0093] S3020, execute data update logic: For data update events, the client merges the new data into the existing data structure or replaces the old data.

[0094] S3021, interface rendering: Based on the updated data, the client re-renders the user interface to reflect the latest status or information.

[0095] S3022, user interaction processing: If the notification or update requires user interaction, the client prepares the corresponding interactive elements and processes the user input.

[0096] In this embodiment, regarding step S4, the user interface updates and notifies

[0097] S400, user interface update: the client application updates the user interface according to the received event, and displays the latest location information and order status dynamic content.

[0098] S401, notification reminder: the client generates a notification to remind the user of updates or changes in the itinerary to improve the user experience. This may include local notification, push notification or displaying a notification message on the interface.

[0099] In this embodiment, regarding the server program:

[0100]

[0101]

[0102] In the above program, the core function of the server program is to start a server that can manage client connections, obtain data regularly, and push this data to all connected clients in real time. It includes:

[0103] (1) Initialize server and client management:

[0104] The start_server function is used to initialize the server. It creates an empty list clients to store all connected clients.

[0105] The register_client function allows new clients to register and be added to the clients list.

[0106] (2) Data acquisition and push mechanism:

[0107] The send_updates function is an infinite loop that periodically calls the fetch_data function to obtain the latest data and pushes this data to all registered clients.

[0108] The fetch_data function is responsible for retrieving data from a data source (such as a database) and returning a formatted string.

[0109] (3) Request processing and client interaction:

[0110] The :handle_request function is responsible for handling new client requests. When the request path is / events, it registers the client to the server and sends the necessary HTTP headers to maintain the connection.

[0111] The server will continue to listen for new requests and call the handle_request function for each request.

[0112] (4) Server startup and continuous operation:

[0113] In the main program block, the server will listen for and process new client requests in an infinite loop.

[0114] In this embodiment, regarding the front-end program:

[0115]

[0116]

[0117] In the above program, the front-end code is an HTML page that uses JavaScript's EventSource API to establish a persistent connection with the server and receive data pushed by the server in real time.

[0118] The connection is established by creating an EventSource object and specifying the / events path on the server side. When the server pushes data, the onmessage event is triggered, and the front-end code captures this event and displays the received data on the page. The received new data is created as a new list item and added to the page's element so that users can see updates from the server in real time.

[0119] Embodiment 2: Figure 3 As shown, this embodiment discloses a sass-based online car-hailing backend push message system:

[0120] The system includes a processor and a memory connected to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the above-mentioned method for pushing messages to the backend of online car-hailing. It also includes:

[0121] (1) Data processing center: responsible for collecting raw data from various interfaces (such as API, GPS positioning system, etc.) and conducting in-depth analysis and processing. This data covers key information such as passenger and driver location information, order status, and trip details. After processing, the data is converted into an event format supported by SSE (Server-Sent Events) to prepare for subsequent data push.

[0122] Key technologies and responsibilities:

[0123] (1.1) Data collection: Use API interface and GPS positioning system to collect required data in real time and accurately.

[0124] (1.2) Data parsing and processing: parse the raw data, extract useful information, and format it into SSE events.

[0125] (1.3) Data caching and management: In order to ensure the continuity and availability of data, effective data caching and management are required.

[0126] (2) SSE server: Responsible for establishing and maintaining a persistent HTTP connection between the server and the client. Through this connection, the SSE server can push processed data to the client in real time in the form of an event stream.

[0127] Key technologies and responsibilities:

[0128] (2.1) Connection management: Establish and maintain a persistent HTTP connection with the client to ensure real-time data push.

[0129] (2.2) Event queue management: Maintain an event queue to store events to be pushed and ensure that they are pushed in order.

[0130] (2.3) Data push: The processed data is pushed to the client in the form of SSE events to achieve real-time data update.

[0131] (2.4) Heartbeat mechanism: By sending heartbeat messages regularly, the connection with the client is kept active to ensure continuous data push.

[0132] (3) Client application: runs on their mobile devices and is responsible for receiving and processing data from the SSE server and providing users with real-time, accurate information and services.

[0133] Key technologies and responsibilities:

[0134] (3.1) Event reception: Use HTML5's EventSource API to receive the event stream from the SSE server.

[0135] (3.2) Event parsing and processing: Parse the received events and execute corresponding business logic according to the event type, such as updating location information, order status, etc.

[0136] (3.3) User interface update: Based on the processed data, the user interface is updated in real time to provide users with the latest updates and notifications.

[0137] All the above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

[0138] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0139] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Claims

1. A method for pushing messages to the backend of online car-hailing service based on SASS, characterized in that: include: S1, collects raw data through various interfaces, and the data processing center formats the received raw data into the event format supported by SSE; S2, the event is sent to the SSE server; the SSE server maintains a persistent HTTP connection with the client and pushes the event to the corresponding client in real time; S3, the client receives and parses the event stream from the SSE server and processes it accordingly based on the event type; S4, based on the received event, the client application updates the user interface.

2. The method for pushing messages to the backend of online car-hailing service according to claim 1, characterized in that: In S1, the original data includes the location information of the passenger and the driver, the order status and the trip details.

3. The method for pushing messages to the backend of online car-hailing service according to claim 2, characterized in that: The implementation method of S1 includes: S100, the online ride-hailing platform collects the original data of the location information, order status and trip details of passengers and drivers through the API interface and GPS positioning system; the original data is transmitted to the data processing center in real time; S101, the data processing center analyzes the received raw data; S102, the formatted event includes event type, data content and timestamp.

4. The method for pushing messages to the backend of online car-hailing service according to claim 1, characterized in that: The implementation method of S2 includes: S200, when the client first requests to establish an SSE connection, it is established based on HTTP long polling or HTTP streaming; S201, the SSE server periodically sends heartbeat messages to the client. If the client does not receive a message from the server within a certain period of time, the connection is reestablished.

5. The method for pushing messages to the backend of online car-hailing service according to claim 4, characterized in that: In S2, the event push method includes: S2020, the SSE server maintains an event queue; when a new event is generated, it is added to the end of the queue; S2021, the SSE server serializes the event into text format; S2022, the SSE server takes the event from the event queue and pushes it to the client in the form of a stream through the HTTP connection; S2023, implement flow control of the SSE server by adjusting the frequency of push events or pushing events in batches.

6. The method for pushing messages to the backend of online car-hailing service according to claim 5, characterized in that: In S2022, the push process is continuous or the event queue is not empty.

7. The method for pushing messages to the backend of online car-hailing service according to claim 1, 3 or 4, characterized in that: The implementation method of S3 includes: S300, the client application uses HTML5's EventSource API to receive an event stream from the SSE server; S301, the client parses the received event and extracts the event type and data content information; S302: According to the event type, the client performs corresponding processing, including updating data or triggering notification.

8. The method for pushing messages to the backend of online car-hailing service according to claim 7, characterized in that: In the S302, it includes: S3020, if the event type is data update, the client merges the new data into the existing data structure or replaces the old data; if the event type is notification, the client generates a local notification, sends a push notification to the user's device, or displays a notification message on the interface; S3021, based on the updated data, the client re-renders the user interface to reflect the latest status or information, including updating the location marker on the map and displaying the new order status.

9. A sass-based online car-hailing backend push message system, characterized by: The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory. When the program instructions are executed by the processor, the processor executes the method for pushing messages in the background of an online car-hailing service as described in any one of claims 1 to 8.

10. The online car-hailing backend message push system according to claim 9, characterized in that: Also includes: The data processing center is responsible for collecting and analyzing raw data from various interfaces; An SSE server connected to the processor and responsible for establishing and maintaining a persistent HTTP connection between the server and the client; A client application that is responsible for receiving and processing data from the SSE server and providing users with real-time, accurate information and services.

Citation Information

Cited By

  • Web-based vehicle arrival reminding method and system

    CN120128580A