A method and apparatus for pushing trajectory data, an electronic device, and a storage medium.

By converting polling connections to real-time connections in the trajectory data processing system and adjusting the push strategy according to user needs, the intelligent and real-time issues of existing trajectory data processing systems are solved, achieving efficient and secure trajectory data push.

CN119892918BActive Publication Date: 2025-10-31CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411808697.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-10-31
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

Existing trajectory data processing systems lack intelligence, cannot flexibly adjust according to user subscriptions and business needs, have low query efficiency, and cannot meet real-time requirements.

Method used

By responding to users' trajectory data subscription operations, data is pushed using a polling connection and the frequency is recorded. When the frequency exceeds a threshold, it is converted to a real-time connection. The push strategy is determined based on user subscription status and business needs, and updated trajectory data is pushed in real time. The data is then parsed and compared to generate comparison results.

Benefits of technology

It enables adaptive adjustments based on user subscriptions and business needs, improving the real-time performance and efficiency of trajectory data push, enhancing user satisfaction, ensuring system response speed and stability, and safeguarding data security through data encryption and access control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892918B_ABST
    Figure CN119892918B_ABST
Patent Text Reader

Abstract

This invention provides a trajectory data push method, apparatus, electronic device, and storage medium. Responding to a user's trajectory data subscription operation, the method pushes trajectory data to the user via a polling connection and records the user's polling frequency. It then determines whether the polling frequency exceeds a preset threshold, and if so, converts the polling connection to a real-time connection. The real-time connection ensures that updated trajectory data is immediately pushed to the user when updated. A push strategy is then determined, and the trajectory data is pushed to the user according to the real-time connection and the push strategy. This allows for adaptive adjustment of the trajectory data push method based on the user's actual subscription status and business needs, improving the real-time performance of trajectory data push, increasing user satisfaction and push efficiency, and ensuring system response speed and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of trajectory data push technology, and in particular to a trajectory data push method and apparatus, electronic device, and storage medium. Background Technology

[0002] Trajectory data refers to data collected by IoT devices (such as GPS trackers and mobile phones) that includes location information (longitude and latitude), timestamps, speed, and other information. With the rapid development of IoT, big data, and cloud computing technologies, the collection, processing, and delivery of trajectory data have become critical requirements in numerous application scenarios.

[0003] However, trajectory data processing systems in related technologies often lack intelligence, failing to flexibly adjust push strategies based on user subscriptions and business needs; and their query efficiency is low, failing to meet users' real-time requirements for trajectory data push. Summary of the Invention

[0004] In view of the above problems, a trajectory data push method, apparatus, electronic device, and storage medium are proposed to overcome or at least partially solve the above problems, including:

[0005] A method for pushing trajectory data, the method comprising:

[0006] In response to a user's trajectory data subscription operation, trajectory data is pushed to the user via a polling connection, and the user's polling frequency is recorded;

[0007] Determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated;

[0008] A push strategy is determined, and the trajectory data is pushed to the user based on the real-time connection and the push strategy.

[0009] Optionally, determining the push strategy includes:

[0010] Determine the user's polling frequency information, push method requirements information, and the trajectory data type information subscribed to by the user;

[0011] The push strategy is determined based on one or more of the polling frequency information, push method requirement information, and the user's subscribed trajectory data type information.

[0012] Optionally, the method further includes:

[0013] The trajectory data is parsed, and the parsed trajectory data is compared according to a preset comparison algorithm to obtain the comparison result;

[0014] The trajectory data is stored in a cache, and in response to the customer's request to obtain the comparison results, the comparison results are pushed to the user.

[0015] Optionally, the method further includes:

[0016] Determine whether the data in the cache meets the refresh conditions, and when the data in the cache meets the refresh conditions, store the comparison result in the cache into the database.

[0017] Optionally, the step of pushing the comparison results to the user in response to the customer's request for comparison results includes:

[0018] In response to the customer's request to obtain comparison results, determine the target comparison result corresponding to the request, and determine the location of the target comparison result;

[0019] Based on the location of the target comparison result, the target comparison result is pushed to the user through the cache or the database.

[0020] Optionally, before pushing trajectory data to the user via a polling connection in response to the user's trajectory data subscription operation, the method further includes:

[0021] In response to the server's initialization operation, the polling connection is established between the server and each of the users.

[0022] Optionally, the push strategy includes at least one or more of the following: trajectory data filtering rules, trajectory data push time interval, and trajectory data push method.

[0023] A trajectory data push device, the device comprising:

[0024] The polling frequency recording module is used to respond to the user's trajectory data subscription operation, push trajectory data to the user through a polling connection, and record the user's polling frequency;

[0025] A connection conversion module is used to determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated;

[0026] The trajectory data push module is used to determine the push strategy and push the trajectory data to the user according to the real-time connection and the push strategy.

[0027] Optionally, the trajectory data push module includes:

[0028] The information determination submodule is used to determine the user's polling frequency information, push method requirement information, and the trajectory data type information subscribed to by the user;

[0029] The push strategy determination submodule is used to determine the push strategy based on one or more of the polling frequency information, push method requirement information, and the user's subscribed trajectory data type information.

[0030] Optionally, the device further includes:

[0031] The comparison result acquisition module is used to parse the trajectory data and perform comparison processing on the parsed trajectory data according to a preset comparison algorithm to obtain the comparison result;

[0032] The comparison result push module is used to store the trajectory data in a cache and push the comparison result to the user in response to the customer's request for comparison result retrieval.

[0033] Optionally, the device further includes:

[0034] The comparison result storage module is used to determine whether the data in the cache meets the refresh conditions, and when the data in the cache meets the refresh conditions, to store the comparison result in the cache into the database.

[0035] Optionally, the comparison result push module includes:

[0036] The location determination submodule is used to respond to the customer's request to obtain comparison results, determine the target comparison result corresponding to the request, and determine the location of the target comparison result.

[0037] The target comparison result push submodule is used to push the target comparison result to the user through the cache or the database according to the location of the target comparison result.

[0038] Optionally, the device further includes:

[0039] A polling connection establishment module is used to establish the polling connection between the server and each of the users in response to the server's initialization operation.

[0040] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the trajectory data push method as described above.

[0041] A computer-readable storage medium is characterized in that a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the trajectory data push method as described above.

[0042] A computer program product includes a computer program that, when executed by a processor, implements the trajectory data push method described above.

[0043] The embodiments of the present invention have the following advantages:

[0044] This invention provides a trajectory data push method. In response to a user's trajectory data subscription operation, trajectory data is pushed to the user via a polling connection, and the user's polling frequency is recorded. Then, it is determined whether the polling frequency exceeds a preset threshold. If the polling frequency exceeds the preset threshold, the polling connection is converted to a real-time connection. The real-time connection is used to immediately push updated trajectory data to the user when it is updated. A push strategy is then determined, and the trajectory data is pushed to the user according to the real-time connection and the push strategy. This method adaptively adjusts the trajectory data push method based on the user's actual subscription status and business needs, improving the real-time performance of trajectory data push, increasing user satisfaction and push efficiency, and ensuring the system's response speed and stability. Attached Figure Description

[0045] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart of the steps of a trajectory data push method provided in some embodiments of the present invention;

[0047] Figure 2 This is a system architecture example diagram provided by some embodiments of the present invention;

[0048] Figure 3 This is an example flowchart of a trajectory data push method provided in some embodiments of the present invention;

[0049] Figure 4 This is a flowchart illustrating the comparison results of a trajectory data push method provided in some embodiments of the present invention.

[0050] Figure 5 This is a flowchart of another trajectory data push method provided in some embodiments of the present invention;

[0051] Figure 6 This is a schematic diagram of the structure of a trajectory data push device provided in some embodiments of the present invention;

[0052] Figure 7 This is a block diagram of an electronic device provided in some embodiments of the present invention;

[0053] Figure 8 This is a schematic diagram of a computer-readable medium provided in some embodiments of the present invention. Detailed Implementation

[0054] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0055] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect, only for the purpose of clearly describing the technical solution of the embodiments of this application, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0056] In the embodiments of this application, the terms "upper" and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0057] For ease of explanation, the following will provide explanations of the relevant terms used in the embodiments of the present invention:

[0058] Track data refers to data collected by Internet of Things (IoT) devices (such as GPS (Global Positioning System) locators, mobile phones, etc.) that includes location information (longitude, latitude), timestamps, speed, and other information.

[0059] Intelligent push: The process of dynamically adjusting the push strategy based on user subscriptions and system status to push trajectory data to users in a specified manner.

[0060] Comparison Algorithm: Processes trajectory data to generate comparison results with practical application value.

[0061] Algorithms such as trajectory similarity and abnormal behavior detection.

[0062] Cache and database interaction: The process of storing comparison results in the cache to improve query efficiency and periodically refreshing the data in the cache to the database.

[0063] Trajectory data refers to data collected by Internet of Things (IoT) devices (such as GPS locators, mobile phones, etc.) that includes location information (longitude, latitude), timestamps, speed, and other information.

[0064] With the rapid development of IoT, big data and cloud computing technologies, the collection, processing and delivery of trajectory data has become a key requirement in many application scenarios.

[0065] However, trajectory data processing systems in related technologies often lack intelligence, failing to flexibly adjust push strategies based on user subscriptions and business needs; and their query efficiency is low, failing to meet users' real-time requirements for trajectory data push.

[0066] To address the aforementioned problems, this invention, based on the core technical concept of adaptively adjusting the trajectory data push method according to the user's actual subscription status and business needs, improves upon the trajectory data push method in related technologies. The invention will be described in detail below with reference to the accompanying drawings:

[0067] Reference Figure 1 The diagram illustrates a flowchart of a trajectory data push method according to some embodiments of the present invention, which may specifically include the following steps:

[0068] Step 101: In response to the user's trajectory data subscription operation, push trajectory data to the user through a polling connection and record the user's polling frequency;

[0069] In specific implementations, such as Figure 2 As shown, embodiments of the present invention can be implemented based on the following system architecture:

[0070] System Architecture:

[0071] (1) Client: Responsible for user subscription management and push notification reception.

[0072] (2) Server: including intelligent push module, trajectory processing module and caching and data security module.

[0073] Intelligent push module: Formulates push strategies based on user subscriptions and the current system status, and pushes them to users.

[0074] Trajectory processing module: Processes trajectory data according to comparison business requirements and generates comparison results.

[0075] Data security module: Encrypts and de-identifies data information to ensure the security of user-related information.

[0076] (3) Cache and database interaction module: Store the comparison results in the cache and refresh them to the database periodically.

[0077] (6) Database: Responsible for persistent storage of data.

[0078] Based on this, the server can receive trajectory data from IoT devices and store it in the trajectory data storage table. Then, the smart push module can formulate a push strategy based on the user's subscription status and the current system status, and push the trajectory data to the user according to the push strategy.

[0079] Specifically, the server can create a long-polling connection for each user during initialization. This long-polling connection can be used to continuously monitor for updates to trajectory data. When a client subscribes to trajectory data, it can request data from the server via long-polling by default. The server can keep the connection open until new data arrives or the connection times out, provided there are no new trajectory data updates. It can also record the polling frequency for each user, including the time interval between each request and the number of requests, for use in subsequent steps.

[0080] In some embodiments of the present invention, before pushing trajectory data to the user via a polling connection in response to the user's trajectory data subscription operation, the method further includes:

[0081] In response to the server's initialization operation, the polling connection is established between the server and each of the users.

[0082] In practical applications, the server can create a long-polling connection for each user during initialization. This long-polling connection can be used to continuously monitor for updates to trajectory data. When subscribing to trajectory data, clients can, by default, request data from the server using long-polling. The server can keep the connection open until new data arrives or the connection times out, provided there are no new trajectory data updates.

[0083] Step 102: Determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated;

[0084] In specific implementations, such as Figure 3As shown, when the server detects that a user's polling frequency exceeds a preset threshold (e.g., frequent requests with short intervals between requests), it can determine that the user needs more real-time data updates. In this case, the server can convert the user's connection from a long polling connection to a long connection (i.e., a real-time connection, such as a WebSocket connection). Long connections allow the server to push data to the client immediately upon data updates, without requiring the client to frequently initiate requests. After the conversion, the server can maintain a long connection list, monitoring the connection status in real time to ensure that data is pushed to the user accurately and promptly. If a user's heartbeat fails, the user can be removed from the long connection list.

[0085] Step 103: Determine the push strategy and push the trajectory data to the user according to the real-time connection and the push strategy.

[0086] In practical implementation, the server can formulate a push strategy based on information such as the type of trajectory data subscribed to by the user, the polling frequency, and the push method requirements. The push strategy can include data filtering rules, push intervals, and push methods (such as SMS, email, app push, etc.). Then, the corresponding push execution unit can push the trajectory data to the user in the specified manner according to the formulated push strategy. Simultaneously, the server can record the success or failure of each push for subsequent analysis and optimization of the push strategy.

[0087] In some embodiments of the present invention, determining the push strategy includes:

[0088] Determine the user's polling frequency information, push method requirements information, and the trajectory data type information subscribed to by the user;

[0089] The push strategy is determined based on one or more of the polling frequency information, push method requirement information, and the user's subscribed trajectory data type information.

[0090] In practical applications, the server can formulate a push strategy based on information such as the type of trajectory data subscribed to by the user, the polling frequency, and the push method requirements. The push strategy can include data filtering rules, push intervals, and push methods (such as SMS, email, and app push). Subsequently, the corresponding push execution unit can push the trajectory data to the user in the specified manner according to the formulated push strategy.

[0091] In some embodiments of the present invention, the push strategy includes at least one or more of trajectory data filtering rules, trajectory data push time intervals, and trajectory data push methods.

[0092] In practical applications, servers can formulate push strategies based on information such as the type of trajectory data subscribed by users, polling frequency, and push method requirements. Push strategies can include trajectory data filtering rules, trajectory data push intervals, and trajectory data push methods (such as SMS, email, APP push, etc.).

[0093] In some embodiments of the present invention, the method further includes:

[0094] The trajectory data is parsed, and the parsed trajectory data is compared according to a preset comparison algorithm to obtain the comparison result;

[0095] The trajectory data is stored in a cache, and in response to the customer's request to obtain the comparison results, the comparison results are pushed to the user.

[0096] In specific implementations, such as Figure 4 As shown, after receiving raw trajectory data from IoT devices, including location information (longitude, latitude), timestamps, and speed, the server can parse the received trajectory data through a pre-set trajectory data parsing unit in the trajectory processing module, extracting useful information (such as location information, distance information, etc.) and converting it into a unified data format within the system. It can also process the parsed trajectory data through a comparison algorithm execution unit based on user-provided comparison algorithms (such as time comparison, location comparison, and speed comparison algorithms). The comparison algorithms can be customized according to business needs, such as calculating the distance between two points, determining whether two points are in the same area, and comparing speeds. After the comparison algorithm is executed, comparison results with practical application value can be generated, such as trajectory similarity and abnormal behavior detection.

[0097] Furthermore, the comparison results can be stored in the cache through a pre-configured comparison result generation unit in the cache and database interaction module, enabling rapid querying and response to client query requests. A pre-configured cache management unit can also be responsible for maintaining the data in the cache, including data insertion, updating, and deletion operations. Simultaneously, the cache management unit can monitor performance metrics such as cache hit rate and size to ensure the effectiveness and stability of the cache.

[0098] Furthermore, a refresh plan can be formulated by a pre-set refresh strategy formulation unit based on preset time intervals and data change thresholds. When the data in the cache meets the refresh conditions (such as the time interval being reached, or the data change exceeding the threshold), a refresh operation can be triggered. That is, the comparison results in the cache can be updated to the database through a pre-set database interaction unit, achieving persistent data storage. Simultaneously, the database interaction unit can record information such as the time and operation type of each data update for subsequent analysis and optimization of database performance. When a user queries the comparison results, the target comparison result can be determined first, along with its location. For example, the cache can be checked to see if the target comparison result exists, and then pushed to the user. If the target comparison result is not found in the cache, it can be retrieved from the database and pushed to the user.

[0099] In some embodiments of the present invention, the method further includes:

[0100] Determine whether the data in the cache meets the refresh conditions, and when the data in the cache meets the refresh conditions, store the comparison result in the cache into the database.

[0101] In practical implementation, a pre-defined refresh strategy formulation unit can formulate a refresh plan based on preset time intervals and data change thresholds. When the data in the cache meets the refresh conditions (such as the time interval being reached or the data change exceeding the threshold), a refresh operation can be triggered. That is, the comparison results in the cache can be updated to the database through a pre-defined database interaction unit, achieving persistent data storage. Simultaneously, the database interaction unit can also record information such as the time and operation type of each data update for subsequent analysis and optimization of database performance.

[0102] In some embodiments of the present invention, the step of pushing the comparison results to the user in response to the customer's request for comparison results includes:

[0103] In response to the customer's request to obtain comparison results, determine the target comparison result corresponding to the request, and determine the location of the target comparison result;

[0104] Based on the location of the target comparison result, the target comparison result is pushed to the user through the cache or the database.

[0105] In practical applications, a refresh plan can be formulated by a pre-set refresh strategy formulation unit based on preset time intervals and data change thresholds. When the data in the cache meets the refresh conditions (such as the time interval being reached, or the data change exceeding the threshold), a refresh operation can be triggered. This means that the comparison results in the cache can be updated to the database through a pre-set database interaction unit, achieving persistent data storage. Simultaneously, the database interaction unit can record information such as the time and operation type of each data update for subsequent analysis and optimization of database performance. When a user queries the comparison results, the target comparison result can be determined first, along with its location. For example, the cache can be checked to see if the target comparison result exists, and then pushed to the user. If the target comparison result is not found in the cache, it can be retrieved from the database and pushed to the user.

[0106] Building upon the above, trajectory data and comparison results can be encrypted to ensure data security during transmission and storage. Symmetric encryption algorithms (such as Advanced Encryption Standard, AES) or asymmetric encryption algorithms (such as RSA (Ron Rivest, Adi Shamir, Leonard Adleman algorithm)) can be used for encryption and decryption. Different access permissions can be set for different users, ensuring that only authorized users can access trajectory data and comparison results. Furthermore, role-based access control (RBAC) or attribute-based access control (ABAC) strategies can be employed to achieve fine-grained access control.

[0107] Furthermore, sensitive data can be anonymized, such as replacing real location information with ambiguous location information or real names with pseudonyms. The anonymized data can still be used for analysis and comparison, but it cannot directly identify specific users or location information.

[0108] Reference Figure 5 The diagram illustrates a flowchart of another trajectory data push method provided by some embodiments of the present invention, which may specifically include the following steps:

[0109] Step 501: In response to the user's trajectory data subscription operation, push trajectory data to the user through a polling connection and record the user's polling frequency;

[0110] In specific implementations, such as Figure 2 As shown, embodiments of the present invention can be implemented based on the following system architecture:

[0111] System Architecture:

[0112] (1) Client: Responsible for user subscription management and push notification reception.

[0113] (2) Server: including intelligent push module, trajectory processing module and caching and data security module.

[0114] Intelligent push module: Formulates push strategies based on user subscriptions and the current system status, and pushes them to users.

[0115] Trajectory processing module: Processes trajectory data according to comparison business requirements and generates comparison results.

[0116] Data security module: Encrypts and de-identifies data information to ensure the security of user-related information.

[0117] (3) Cache and database interaction module: Store the comparison results in the cache and refresh them to the database periodically.

[0118] (6) Database: Responsible for persistent storage of data.

[0119] Based on this, the server can receive trajectory data from IoT devices and store it in the trajectory data storage table. Then, the smart push module can formulate a push strategy based on the user's subscription status and the current system status, and push the trajectory data to the user according to the push strategy.

[0120] Specifically, the server can create a long-polling connection for each user during initialization. This long-polling connection can be used to continuously monitor for updates to trajectory data. When a client subscribes to trajectory data, it can request data from the server via long-polling by default. The server can keep the connection open until new data arrives or the connection times out, provided there are no new trajectory data updates. It can also record the polling frequency for each user, including the time interval between each request and the number of requests, for use in subsequent steps.

[0121] Step 502: Determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated;

[0122] In specific implementations, such as Figure 3As shown, when the server detects that a user's polling frequency exceeds a preset threshold (e.g., frequent requests with short intervals between requests), it can determine that the user needs more real-time data updates. In this case, the server can convert the user's connection from a long polling connection to a long connection (i.e., a real-time connection, such as a WebSocket connection). Long connections allow the server to push data to the client immediately upon data updates, without requiring the client to frequently initiate requests. After the conversion, the server can maintain a long connection list, monitoring the connection status in real time to ensure that data is pushed to the user accurately and promptly. If a user's heartbeat fails, the user can be removed from the long connection list.

[0123] Step 503: Determine the push strategy and push the trajectory data to the user according to the real-time connection and the push strategy.

[0124] In practical implementation, the server can formulate a push strategy based on information such as the type of trajectory data subscribed to by the user, the polling frequency, and the push method requirements. The push strategy can include data filtering rules, push intervals, and push methods (such as SMS, email, app push, etc.). Then, the corresponding push execution unit can push the trajectory data to the user in the specified manner according to the formulated push strategy. Simultaneously, the server can record the success or failure of each push for subsequent analysis and optimization of the push strategy.

[0125] Step 504: parse the trajectory data and perform comparison processing on the parsed trajectory data according to a preset comparison algorithm to obtain the comparison result;

[0126] In specific implementations, such as Figure 4 As shown, after receiving raw trajectory data from IoT devices, including location information (longitude, latitude), timestamps, and speed, the server can parse the received trajectory data through a pre-set trajectory data parsing unit in the trajectory processing module, extracting useful information (such as location information, distance information, etc.) and converting it into a unified data format within the system. It can also process the parsed trajectory data through a comparison algorithm execution unit based on user-provided comparison algorithms (such as time comparison, location comparison, and speed comparison algorithms). The comparison algorithms can be customized according to business needs, such as calculating the distance between two points, determining whether two points are in the same area, and comparing speeds. After the comparison algorithm is executed, comparison results with practical application value can be generated, such as trajectory similarity and abnormal behavior detection.

[0127] Step 505: Store the trajectory data in a cache, and push the comparison results to the user in response to the customer's request for comparison results.

[0128] In practical applications, comparison results can be stored in the cache through a pre-configured comparison result generation unit within the cache and database interaction module, enabling rapid querying and response to client query requests. A pre-configured cache management unit can also be responsible for maintaining the data in the cache, including operations such as data insertion, updating, and deletion. Simultaneously, the cache management unit can monitor performance metrics such as cache hit rate and size to ensure the effectiveness and stability of the cache.

[0129] Furthermore, a refresh plan can be formulated by a pre-set refresh strategy formulation unit based on preset time intervals and data change thresholds. When the data in the cache meets the refresh conditions (such as the time interval being reached, or the data change exceeding the threshold), a refresh operation can be triggered. That is, the comparison results in the cache can be updated to the database through a pre-set database interaction unit, achieving persistent data storage. Simultaneously, the database interaction unit can record information such as the time and operation type of each data update for subsequent analysis and optimization of database performance. When a user queries the comparison results, the target comparison result can be determined first, along with its location. For example, the cache can be checked to see if the target comparison result exists, and then pushed to the user. If the target comparison result is not found in the cache, it can be retrieved from the database and pushed to the user.

[0130] In summary, the trajectory data push method provided by the above embodiments of the present invention, in response to a user's trajectory data subscription operation, pushes trajectory data to the user through a polling connection and records the user's polling frequency; then it determines whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, it converts the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated; then, a push strategy is determined, and the trajectory data is pushed to the user according to the real-time connection and the push strategy. This achieves adaptive adjustment of the trajectory data push method according to the user's actual subscription status and business needs, improving the real-time performance of trajectory data push, increasing user satisfaction and push efficiency, and ensuring the system's response speed and stability. Furthermore, it generates comparison results with practical application value by processing the trajectory data according to comparison business needs. It also improves the system's response speed and stability by adopting an efficient data storage and query mechanism. Finally, it ensures the security and privacy of trajectory data and comparison results by employing data encryption, access control, and data anonymization technologies.

[0131] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0132] Reference Figure 6 The diagram shows a schematic representation of a trajectory data push device according to some embodiments of the present invention; specifically, it may include the following modules:

[0133] The polling frequency recording module 601 is used to respond to the user's trajectory data subscription operation, push trajectory data to the user through a polling connection, and record the user's polling frequency;

[0134] The connection conversion module 602 is used to determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated;

[0135] The trajectory data push module 603 is used to determine the push strategy and push the trajectory data to the user according to the real-time connection and the push strategy.

[0136] In some embodiments of the present invention, the trajectory data push module 603 includes:

[0137] The information determination submodule is used to determine the user's polling frequency information, push method requirement information, and the trajectory data type information subscribed to by the user;

[0138] The push strategy determination submodule is used to determine the push strategy based on one or more of the polling frequency information, push method requirement information, and the user's subscribed trajectory data type information.

[0139] In some embodiments of the present invention, the apparatus further includes:

[0140] The comparison result acquisition module is used to parse the trajectory data and perform comparison processing on the parsed trajectory data according to a preset comparison algorithm to obtain the comparison result;

[0141] The comparison result push module is used to store the trajectory data in a cache and push the comparison result to the user in response to the customer's request for comparison result retrieval.

[0142] In some embodiments of the present invention, the apparatus further includes:

[0143] The comparison result storage module is used to determine whether the data in the cache meets the refresh conditions, and when the data in the cache meets the refresh conditions, to store the comparison result in the cache into the database.

[0144] In some embodiments of the present invention, the comparison result push module includes:

[0145] The location determination submodule is used to respond to the customer's request to obtain comparison results, determine the target comparison result corresponding to the request, and determine the location of the target comparison result.

[0146] The target comparison result push submodule is used to push the target comparison result to the user through the cache or the database according to the location of the target comparison result.

[0147] In some embodiments of the present invention, the apparatus further includes:

[0148] A polling connection establishment module is used to establish the polling connection between the server and each of the users in response to the server's initialization operation.

[0149] Some embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the above trajectory data push method.

[0150] In addition, embodiments of the present invention also provide an electronic device, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0151] Memory 703 is used to store computer programs;

[0152] When processor 701 executes a program stored in memory 703, it performs the following steps:

[0153] In response to a user's trajectory data subscription operation, trajectory data is pushed to the user via a polling connection, and the user's polling frequency is recorded;

[0154] Determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated;

[0155] A push strategy is determined, and the trajectory data is pushed to the user based on the real-time connection and the push strategy.

[0156] In an optional embodiment of the present invention, determining the push strategy includes:

[0157] Determine the user's polling frequency information, push method requirements information, and the trajectory data type information subscribed to by the user;

[0158] The push strategy is determined based on one or more of the polling frequency information, push method requirement information, and the user's subscribed trajectory data type information.

[0159] In an optional embodiment of the present invention, the method further includes:

[0160] The trajectory data is parsed, and the parsed trajectory data is compared according to a preset comparison algorithm to obtain the comparison result;

[0161] The trajectory data is stored in a cache, and in response to the customer's request to obtain the comparison results, the comparison results are pushed to the user.

[0162] In an optional embodiment of the present invention, the method further includes:

[0163] Determine whether the data in the cache meets the refresh conditions, and when the data in the cache meets the refresh conditions, store the comparison result in the cache into the database.

[0164] In an optional embodiment of the present invention, the step of pushing the comparison results to the user in response to the customer's request for comparison results includes:

[0165] In response to the customer's request to obtain comparison results, determine the target comparison result corresponding to the request, and determine the location of the target comparison result;

[0166] Based on the location of the target comparison result, the target comparison result is pushed to the user through the cache or the database.

[0167] In an optional embodiment of the present invention, before pushing trajectory data to the user via a polling connection in response to the user's trajectory data subscription operation, the method further includes:

[0168] In response to the server's initialization operation, the polling connection is established between the server and each of the users.

[0169] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0170] The communication interface is used for communication between the aforementioned terminal and other devices.

[0171] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0172] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0173] like Figure 8 As shown, in another embodiment of the present invention, a computer-readable storage medium 801 is also provided, which stores instructions that, when run on a computer, cause the computer to execute the trajectory data push method described in the above embodiment.

[0174] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0176] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0177] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0178] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0179] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0180] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0181] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0182] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.

[0183] The above provides a detailed description of the trajectory data push method, device, electronic device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for pushing trajectory data, characterized in that, The method includes: In response to a user's trajectory data subscription operation, trajectory data is pushed to the user via a polling connection, and the user's polling frequency is recorded; Determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated; Determine a push strategy, and push the trajectory data to the user based on the real-time connection and the push strategy; The determination of the push strategy includes: Determine the user's polling frequency information, push method requirements information, and the trajectory data type information subscribed to by the user; The push strategy is determined based on one or more of the polling frequency information, push method requirement information, and the user's subscribed trajectory data type information.

2. The method according to claim 1, characterized in that, The method further includes: The trajectory data is parsed, and the parsed trajectory data is compared according to a preset comparison algorithm to obtain the comparison result; The trajectory data is stored in a cache, and the comparison results are pushed to the user in response to the user's request for comparison results.

3. The method according to claim 2, characterized in that, The method further includes: Determine whether the data in the cache meets the refresh conditions, and when the data in the cache meets the refresh conditions, store the comparison result in the cache into the database.

4. The method according to claim 3, characterized in that, The step of responding to the user's request for comparison results and pushing the comparison results to the user includes: In response to the user's request to obtain comparison results, the target comparison result corresponding to the request is determined, and the location of the target comparison result is determined. Based on the location of the target comparison result, the target comparison result is pushed to the user through the cache or the database.

5. The method according to claim 1, characterized in that, Before pushing trajectory data to the user via a polling connection in response to the user's trajectory data subscription operation, the method further includes: In response to the server's initialization operation, the polling connection is established between the server and each of the users.

6. The method according to claim 1, characterized in that, The push strategy includes at least one or more of the following: trajectory data filtering rules, trajectory data push time interval, and trajectory data push method.

7. A trajectory data push device, characterized in that, The device includes: The polling frequency recording module is used to respond to the user's trajectory data subscription operation, push trajectory data to the user through a polling connection, and record the user's polling frequency; A connection conversion module is used to determine whether the polling frequency exceeds a preset threshold, and if the polling frequency exceeds the preset threshold, convert the polling connection into a real-time connection; wherein, the real-time connection is used to immediately push the updated trajectory data to the user when the trajectory data is updated; The trajectory data push module is used to determine the push strategy and push the trajectory data to the user according to the real-time connection and the push strategy; The trajectory data push module includes: The information determination submodule is used to determine the user's polling frequency information, push method requirement information, and the trajectory data type information subscribed to by the user; The push strategy determination submodule is used to determine the push strategy based on one or more of the polling frequency information, push method requirement information, and the user's subscribed trajectory data type information.

8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the trajectory data push method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the trajectory data push method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Message processing method, apparatus and device

    CN109672735A

  • Logistics trajectory data pushing method, device and equipment and storage medium

    CN111400619A