Track data pushing method and device, electronic equipment and storage medium

By using the conversion mechanism of polling connection and real-time connection in the trajectory data processing system, combined with user subscription situation and business needs, the problem of insufficient flexibility and real-time push strategy in the existing system is solved, and efficient and real-time trajectory data push is achieved.

CN119892918AActive Publication Date: 2025-04-25CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing track data processing system lacks intelligence and cannot flexibly adjust push strategies based on user subscription situation and business needs. The query efficiency is low, which cannot meet users' real-time requirements for track data push.

Method used

By responding to the user's track data subscription operation, use the polling connection to push the track data to the user and record the polling frequency. When the polling frequency exceeds the preset threshold, the polling connection is converted into a real-time connection to achieve instant push of updated data. At the same time, the push strategy is determined based on the user's subscription situation and business needs, and the push method is adaptively adjusted.

Benefits of technology

It realizes adaptive adjustments to the trajectory data push method based on the actual subscription situation and business needs of users, improves the real-time nature of trajectory data push, improves user satisfaction and push efficiency, and ensures the system's response speed and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892918A_ABST
    Figure CN119892918A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a trajectory data pushing method and device, electronic equipment and a storage medium, and the method comprises the steps: pushing trajectory data to a user through polling connection in response to a trajectory data subscription operation of the user, and recording the polling frequency of the user; then, whether the polling frequency exceeds a preset threshold value or not is judged, and under the condition that the polling frequency exceeds the preset threshold value, polling connection is converted into real-time connection; wherein the real-time connection is used for immediately pushing updated track data to a user when the track data is updated; and further determining a pushing strategy, and pushing the trajectory data to the user according to the real-time connection and the pushing strategy. According to the method and the device, adaptive adjustment on the pushing mode of the track data according to the actual subscription condition and the service requirement of the user is realized, the real-time performance of track data pushing is improved, the user satisfaction and the pushing efficiency are improved, and the response speed and the stability of the system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of trajectory data push, and in particular to a trajectory data push method and device, electronic equipment, and storage medium. Background Art

[0002] Trajectory data refers to data collected by IoT devices (such as GPS locators, mobile phones, etc.), including location information (longitude, latitude), timestamp, speed, etc. With the rapid development of IoT, big data and cloud computing technologies, the collection, processing and push of trajectory data have become key requirements in many application scenarios.

[0003] However, the trajectory data processing systems in related technologies often lack intelligence. Not only are they unable to flexibly adjust push strategies based on user subscriptions and business needs, but they also have low query efficiency and cannot meet users' real-time requirements for trajectory data push. Summary of the invention

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

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

[0006] In response to a track data subscription operation of a user, push the track data to the user through a polling connection, and record the polling frequency of the user;

[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 according to the real-time connection and the push strategy.

[0009] Optionally, determining the push strategy includes:

[0010] Determine the polling frequency information, push mode requirement information and track data type information subscribed by the user;

[0011] The push strategy is determined according to one or more of the polling frequency information, the push mode requirement information, and the type of trajectory data subscribed by the user.

[0012] Optionally, the method further includes:

[0013] Parsing the trajectory data, and performing a comparison process on the parsed trajectory data according to a preset comparison algorithm to obtain a comparison result;

[0014] The trajectory data is stored in a cache, and in response to the customer's demand for obtaining a comparison result, the comparison result is pushed to the user.

[0015] Optionally, the method further includes:

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

[0017] Optionally, in response to the customer's demand for obtaining the comparison result, pushing the comparison result to the user includes:

[0018] In response to the comparison result acquisition requirement of the customer, determining a target comparison result corresponding to the comparison result acquisition requirement, and determining a location of the target comparison result;

[0019] According to 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 the step of pushing the trajectory data to the user through the polling connection in response to the user's trajectory data subscription operation, the step further includes:

[0021] In response to the initialization operation of the server, 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 a trajectory data screening rule, a trajectory data push time interval, and a trajectory data push mode.

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

[0024] A polling frequency recording module, configured to, in response to a user's track data subscription operation, push track data to the user through a polling connection, and record the user's polling frequency;

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

[0026] The trajectory data push module is used to determine a 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 pushing module includes:

[0028] An information determination submodule, used to determine the user's polling frequency information, push mode requirement information, and track data type information subscribed by the user;

[0029] The push strategy determination submodule is used to determine the push strategy according to one or more of the polling frequency information, the push mode requirement information and the track data type information subscribed by the user.

[0030] Optionally, the device further comprises:

[0031] A comparison result acquisition module is used to analyze the trajectory data and perform comparison processing on the analyzed trajectory data according to a preset comparison algorithm to obtain a comparison result;

[0032] The comparison result push module is used to store the trajectory data in a cache and, in response to the comparison result acquisition demand of the customer, push the comparison result to the user.

[0033] Optionally, the device further comprises:

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

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

[0036] A location determination submodule, configured to determine, in response to the comparison result acquisition requirement of the customer, a target comparison result corresponding to the comparison result acquisition requirement, and determine a location of the target comparison result;

[0037] The target comparison result pushing 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 comprises:

[0039] The polling connection establishing module is used to establish the polling connection between the server and each of the users in response to the initialization operation of the server.

[0040] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above-mentioned trajectory data pushing method when executed by the processor.

[0041] 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, the trajectory data pushing method as described above is implemented.

[0042] A computer program product includes a computer program, and when the computer program is executed by a processor, the trajectory data pushing method described above is implemented.

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

[0044] The present invention provides a method for pushing trajectory data, which pushes trajectory data to users through polling connections and records the polling frequency of users in response to the trajectory data subscription operation of users; then determines whether the polling frequency exceeds a preset threshold, and converts the polling connection into a real-time connection when the polling frequency exceeds the preset threshold; wherein the real-time connection is used to push updated trajectory data to users immediately when the trajectory data is updated; and then determines the push strategy, and pushes the trajectory data to users according to the real-time connection and the push strategy. The method realizes adaptive adjustment of the push mode of trajectory data according to the actual subscription situation and business needs of users, improves the real-time nature of trajectory data push, improves user satisfaction and push efficiency, and ensures the response speed and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

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

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

[0048] Figure 3 is an example diagram of a trajectory data push-related process of a trajectory data push method provided by some embodiments of the present invention;

[0049] Figure 4 is an example diagram of a comparison result-related process of a trajectory data pushing method provided in some embodiments of the present invention;

[0050] Figure 5 is a flowchart of another method for pushing trajectory data provided by some embodiments of the present invention;

[0051] Figure 6 is a structural schematic diagram of a trajectory data pushing device provided by some embodiments of the present invention;

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

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

[0054] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] In the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with basically the same functions and effects. This is only for the purpose of clearly describing the technical solutions of the embodiments of the present application, and shall not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0056] In the embodiments of the present application, the terms "upper", "lower", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0057] For the sake of convenience, the following is a glossary of terms used in the embodiments of the present invention:

[0058] Trajectory data: refers to data collected by IoT devices (such as GPS (Global Positioning System) locators, mobile phones, etc.), containing location information (longitude, latitude), timestamp, speed, etc.

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

[0060] Comparison algorithm: Process trajectory data to generate comparison results with practical application value

[0061] (such as trajectory similarity, abnormal behavior detection, etc.)

[0062] Cache-database interaction: The process of storing the 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 IoT devices (such as GPS locators, mobile phones, etc.), which contains location information (longitude, latitude), timestamp, speed, etc.

[0064] With the rapid development of the Internet of Things, big data and cloud computing technologies, the collection, processing and push of trajectory data have become key requirements in many application scenarios.

[0065] However, the trajectory data processing systems in related technologies often lack intelligence. Not only are they unable to flexibly adjust push strategies based on user subscriptions and business needs, but they also have low query efficiency and cannot meet users' real-time requirements for trajectory data push.

[0066] In order to solve the above problems, the present invention is based on the core technical concept of adaptively adjusting the push mode of trajectory data according to the actual subscription situation and business needs of the user, and improves the trajectory data push method in the related art. The present invention will be described in detail in conjunction with the accompanying drawings below:

[0067] Reference Figure 1 , shows a flow chart of a method for pushing trajectory data provided by some embodiments of the present invention, which may specifically include the following steps:

[0068] Step 101, in response to a track data subscription operation of a user, pushing track data to the user through a polling connection, and recording the polling frequency of the user;

[0069] In the specific implementation, Figure 2 As shown, the embodiment 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 reception.

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

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

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

[0075] Data security module: encrypt and desensitize data information to ensure the security of user-related information.

[0076] (3) Cache and database interaction module: The comparison results are stored in the cache and refreshed to the database at regular intervals.

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

[0078] On this basis, the trajectory data from the IoT device can be received through the server and stored in the trajectory data storage table. Then the intelligent push module can formulate a push strategy based on the user 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 the update of trajectory data. When the client subscribes to trajectory data, it can request data from the server by long polling by default. When there is no new trajectory data update, the server can keep the connection open until new data arrives or the connection times out. The polling frequency of each user can also be recorded, including the time interval and number of requests for each request, for subsequent steps.

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

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

[0082] In actual applications, the server can create a long polling connection for each user during initialization. This long polling connection can be used to continuously monitor the update of trajectory data. When the client subscribes to trajectory data, it can request data from the server through long polling by default. When there is no new trajectory data update, the server can keep the connection open until new data arrives or the connection times out.

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

[0084] In the specific implementation, Figure 3As shown in the figure, when it is detected that the polling frequency of the user exceeds the preset threshold (such as frequent requests and a short interval between each request), the server can determine that the user needs a more real-time data update. At this time, 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). A long connection allows the server to push data to the client immediately when the data is updated, without the client making frequent requests. After the conversion, the server can maintain a long connection list, monitor the connection status in real time, and ensure that the data can be pushed to the user accurately and promptly. If the user's heartbeat detection fails, the long connection list can remove the user.

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

[0086] In the specific implementation, the server can formulate a push strategy based on the type of trajectory data subscribed by the user, the polling frequency, and the push method requirements. The push strategy may include data screening rules, push time 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. At the same time, 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 polling frequency information, push mode requirement information and track data type information subscribed by the user;

[0089] The push strategy is determined according to one or more of the polling frequency information, the push mode requirement information, and the type of trajectory data subscribed by the user.

[0090] In actual applications, the server can formulate a push strategy based on the type of trajectory data subscribed by the user, polling frequency, and push method requirements. The push strategy may include data screening rules, push time interval, and push method (such as SMS, email, APP push, etc.). Then, the corresponding push execution unit can push the trajectory data to the user in the specified way according to the formulated push strategy.

[0091] In some embodiments of the present invention, the push strategy includes at least one or more of a trajectory data screening rule, a trajectory data push time interval, and a trajectory data push mode.

[0092] In actual applications, the server can formulate a push strategy based on the type of trajectory data subscribed by the user, polling frequency, and push method requirements. The push strategy may include trajectory data screening rules, trajectory data push time interval, and trajectory data push method (such as SMS, email, APP push, etc.).

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

[0094] Parsing the trajectory data, and performing a comparison process on the parsed trajectory data according to a preset comparison algorithm to obtain a comparison result;

[0095] The trajectory data is stored in a cache, and in response to the customer's demand for obtaining a comparison result, the comparison result is pushed to the user.

[0096] In the specific implementation, Figure 4 As shown, after receiving the original trajectory data from the IoT device, including location information (longitude, latitude), timestamp, speed, etc., the server can parse the received trajectory data through the trajectory data parsing unit pre-set in the trajectory processing module, extract useful information (such as location information, distance information, etc.), and convert it into a unified data format within the system. And according to the comparison algorithm provided by the user (such as time comparison, location comparison and speed comparison algorithm, etc.), the parsed trajectory data can be processed by the comparison algorithm execution unit. Among them, the comparison algorithm can be customized according to business needs, such as calculating the distance between two points, judging whether two points are in the same area and comparing the speed size. After the comparison algorithm is executed, a comparison result with practical application value can be generated, such as trajectory similarity and abnormal behavior detection.

[0097] Furthermore, the comparison result generation unit pre-set in the cache and database interaction module can store the comparison result in the cache so as to quickly query and respond to the query request of the client. The pre-set cache management unit can also be responsible for maintaining the data in the cache, including operations such as data insertion, updating, and deletion. At the same time, the cache management unit can also monitor the performance indicators such as the cache hit rate and size to ensure the effectiveness and stability of the cache.

[0098] Furthermore, a refresh plan can be formulated according to a preset time interval and data change threshold by a preset refresh strategy formulation unit. When the data in the cache meets the refresh conditions (such as the time interval is reached, the data change exceeds the threshold, etc.), the refresh operation can be triggered. That is, the comparison results in the cache can be updated to the database through a preset database interaction unit to achieve persistent storage of data. At the same time, the database interaction unit can also record information such as the time and operation type of each data update to facilitate subsequent analysis and optimization of database performance; and when the user queries the comparison result, the target comparison result of the user's query can be determined first and the location of the target comparison result can be determined. For example, the cache can be queried to see whether there is a target comparison result of the user's query and pushed to the user; if the target comparison result is not found in the cache, the target comparison result can be queried from the database and pushed to the user.

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

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

[0101] In a specific implementation, a refresh plan can be formulated according to a preset time interval and data change threshold through a preset refresh strategy formulation unit. When the data in the cache meets the refresh conditions (such as the time interval is reached, the data change exceeds the threshold, etc.), the refresh operation can be triggered. That is, the comparison results in the cache can be updated to the database through a preset database interaction unit to achieve persistent storage of data. At the same time, the database interaction unit can also record information such as the time and operation type of each data update to facilitate subsequent analysis and optimization of database performance.

[0102] In some embodiments of the present invention, in response to the customer's demand for obtaining the comparison result, pushing the comparison result to the user includes:

[0103] In response to the comparison result acquisition requirement of the customer, determining a target comparison result corresponding to the comparison result acquisition requirement, and determining a location of the target comparison result;

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

[0105] In actual applications, a refresh plan can be formulated according to a preset time interval and data change threshold through a preset refresh strategy formulation unit. When the data in the cache meets the refresh conditions (such as the time interval is reached, the data change exceeds the threshold, etc.), the refresh operation can be triggered. That is, the comparison results in the cache can be updated to the database through a preset database interaction unit to achieve persistent storage of data. At the same time, the database interaction unit can also record information such as the time and operation type of each data update to facilitate subsequent analysis and optimization of database performance; and when the user queries the comparison result, the target comparison result of the user's query can be determined first and the location of the target comparison result can be determined. For example, the cache can be queried to see whether there is a target comparison result of the user's query and pushed to the user; if the target comparison result is not found in the cache, the target comparison result can be queried from the database and pushed to the user.

[0106] Based on the above, the trajectory data and comparison results can also be encrypted to ensure the security of the data 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 to encrypt and decrypt data. Different access rights can be set for different users to ensure that only authorized users can access trajectory data and comparison results. Strategies such as role-based access control (RBAC) or attribute-based access control (ABAC) can also be used to achieve fine-grained permission management.

[0107] Furthermore, sensitive data can be desensitized, such as replacing real location information with fuzzy location information, replacing real names with pseudonyms, etc. Desensitized data can still be used for analysis and comparison, but specific users or location information cannot be directly identified.

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

[0109] Step 501, in response to a track data subscription operation of a user, pushing track data to the user through a polling connection, and recording the polling frequency of the user;

[0110] In the specific implementation, Figure 2 As shown, the embodiment 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 reception.

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

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

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

[0116] Data security module: encrypt and desensitize data information to ensure the security of user-related information.

[0117] (3) Cache and database interaction module: The comparison results are stored in the cache and refreshed to the database at regular intervals.

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

[0119] On this basis, the trajectory data from the IoT device can be received through the server and stored in the trajectory data storage table. Then the intelligent push module can formulate a push strategy based on the user 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 the update of trajectory data. When the client subscribes to trajectory data, it can request data from the server by long polling by default. When there is no new trajectory data update, the server can keep the connection open until new data arrives or the connection times out. The polling frequency of each user can also be recorded, including the time interval and number of requests for each request, for subsequent steps.

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

[0122] In the specific implementation, Figure 3As shown in the figure, when it is detected that the polling frequency of the user exceeds the preset threshold (such as frequent requests and a short interval between each request), the server can determine that the user needs a more real-time data update. At this time, 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). A long connection allows the server to push data to the client immediately when the data is updated, without the client making frequent requests. After the conversion, the server can maintain a long connection list, monitor the connection status in real time, and ensure that the data can be pushed to the user accurately and promptly. If the user's heartbeat detection fails, the long connection list can remove the user.

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

[0124] In the specific implementation, the server can formulate a push strategy based on the type of trajectory data subscribed by the user, the polling frequency, and the push method requirements. The push strategy may include data screening rules, push time 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. At the same time, the server can record the success or failure of each push for subsequent analysis and optimization of the push strategy.

[0125] Step 504, parsing the trajectory data, and performing a comparison process on the parsed trajectory data according to a preset comparison algorithm to obtain a comparison result;

[0126] In the specific implementation, Figure 4 As shown, after receiving the original trajectory data from the IoT device, including location information (longitude, latitude), timestamp, speed, etc., the server can parse the received trajectory data through the trajectory data parsing unit pre-set in the trajectory processing module, extract useful information (such as location information, distance information, etc.), and convert it into a unified data format within the system. And according to the comparison algorithm provided by the user (such as time comparison, location comparison and speed comparison algorithm, etc.), the parsed trajectory data can be processed by the comparison algorithm execution unit. Among them, the comparison algorithm can be customized according to business needs, such as calculating the distance between two points, judging whether two points are in the same area and comparing the speed size. After the comparison algorithm is executed, a comparison result 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 in response to the customer's request for obtaining a comparison result, push the comparison result to the user.

[0128] In actual applications, the comparison result generation unit pre-set in the cache and database interaction module can store the comparison result in the cache to quickly query and respond to the query request of the client. The pre-set cache management unit can also be responsible for maintaining the data in the cache, including operations such as data insertion, update, and deletion. At the same time, the cache management unit can also monitor the cache hit rate, size and other performance indicators to ensure the effectiveness and stability of the cache.

[0129] Furthermore, a refresh plan can be formulated according to a preset time interval and data change threshold by a preset refresh strategy formulation unit. When the data in the cache meets the refresh conditions (such as the time interval is reached, the data change exceeds the threshold, etc.), the refresh operation can be triggered. That is, the comparison results in the cache can be updated to the database through a preset database interaction unit to achieve persistent storage of data. At the same time, the database interaction unit can also record information such as the time and operation type of each data update to facilitate subsequent analysis and optimization of database performance; and when the user queries the comparison result, the target comparison result of the user's query can be determined first and the location of the target comparison result can be determined. For example, the cache can be queried to see whether there is a target comparison result of the user's query and pushed to the user; if the target comparison result is not found in the cache, the target comparison result can be queried from the database and pushed to the user.

[0130] In general, the above embodiment of the present invention provides a method for pushing trajectory data, which pushes trajectory data to the user through a polling connection and records the user's polling frequency in response to the user's trajectory data subscription operation; then determines whether the polling frequency exceeds the preset threshold, and converts the polling connection into a real-time connection when the polling frequency exceeds the preset threshold; wherein the real-time connection is used to push the updated trajectory data to the user immediately when the trajectory data is updated; and then determines the push strategy, and pushes the trajectory data to the user according to the real-time connection and the push strategy. Adaptive adjustment of the push mode of trajectory data is achieved according to the actual subscription situation and business needs of the user, which improves the real-time nature of trajectory data push, improves user satisfaction and push efficiency, and ensures the response speed and stability of the system. In addition, a comparison result with practical application value is generated by processing the trajectory data according to the comparison business needs. And the response speed and stability of the system are improved by adopting an efficient data storage and query mechanism. The security and privacy of trajectory data and comparison results are also ensured by adopting technical means such as data encryption, access control and data desensitization.

[0131] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0132] Reference Figure 6 , shows a schematic diagram of the structure of a trajectory data pushing device provided by some embodiments of the present invention; specifically, it may include the following modules:

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

[0134] A 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 push the updated trajectory data to the user immediately when the trajectory data is updated;

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

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

[0137] An information determination submodule, used to determine the user's polling frequency information, push mode requirement information, and track data type information subscribed by the user;

[0138] The push strategy determination submodule is used to determine the push strategy according to one or more of the polling frequency information, the push mode requirement information and the track data type information subscribed by the user.

[0139] In some embodiments of the present invention, the device further comprises:

[0140] A comparison result acquisition module is used to analyze the trajectory data and perform comparison processing on the analyzed trajectory data according to a preset comparison algorithm to obtain a comparison result;

[0141] The comparison result push module is used to store the trajectory data in a cache and, in response to the comparison result acquisition demand of the customer, push the comparison result to the user.

[0142] In some embodiments of the present invention, the device further comprises:

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

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

[0145] A location determination submodule, configured to determine, in response to the comparison result acquisition requirement of the customer, a target comparison result corresponding to the comparison result acquisition requirement, and determine a location of the target comparison result;

[0146] The target comparison result pushing 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 device further comprises:

[0148] The polling connection establishing module is used to establish the polling connection between the server and each of the users in response to the initialization operation of the server.

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

[0150] In addition, an embodiment of the present invention further provides 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, used for storing computer programs;

[0152] The processor 701 is used to execute the program stored in the memory 703 to implement the following steps:

[0153] In response to a track data subscription operation of a user, push the track data to the user through a polling connection, and record the polling frequency of the user;

[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 according to the real-time connection and the push strategy.

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

[0157] Determine the polling frequency information, push mode requirement information and track data type information subscribed by the user;

[0158] The push strategy is determined according to one or more of the polling frequency information, the push mode requirement information, and the type of trajectory data subscribed by the user.

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

[0160] Parsing the trajectory data, and performing a comparison process on the parsed trajectory data according to a preset comparison algorithm to obtain a comparison result;

[0161] The trajectory data is stored in a cache, and in response to the customer's demand for obtaining a comparison result, the comparison result is 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 condition, and when the data in the cache meets the refresh condition, store the comparison result in the cache in a database.

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

[0165] In response to the comparison result acquisition requirement of the customer, determining a target comparison result corresponding to the comparison result acquisition requirement, and determining a location of the target comparison result;

[0166] According to 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 the step of pushing the trajectory data to the user through the polling connection in response to the user's trajectory data subscription operation, further includes:

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

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

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

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

[0172] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0173] like Figure 8 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 801 is further provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the trajectory data pushing method described in the above embodiment.

[0174] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

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

[0177] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product 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 codes.

[0178] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0179] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A 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 device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0181] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0182] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.

[0183] The above provides a detailed introduction to a trajectory data push method and device, an electronic device, and a storage medium. In this article, specific examples are used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A trajectory data pushing method, characterized in that: The method comprises: In response to a track data subscription operation of a user, push the track data to the user through a polling connection, and record the polling frequency of the user; 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; A push strategy is determined, and the trajectory data is pushed to the user according to the real-time connection and the push strategy.

2. The method according to claim 1, characterized in that The step of determining the push strategy includes: Determine the polling frequency information, push mode requirement information and track data type information subscribed by the user; The push strategy is determined according to one or more of the polling frequency information, the push mode requirement information, and the type of trajectory data subscribed by the user.

3. The method according to claim 1, characterized in that The method further comprises: Parsing the trajectory data, and performing a comparison process on the parsed trajectory data according to a preset comparison algorithm to obtain a comparison result; The trajectory data is stored in a cache, and in response to the customer's demand for obtaining a comparison result, the comparison result is pushed to the user.

4. The method according to claim 3, characterized in that The method further comprises: Determine whether the data in the cache meets the refresh condition, and when the data in the cache meets the refresh condition, store the comparison result in the cache in a database.

5. The method according to claim 4, characterized in that The step of pushing the comparison result to the user in response to the comparison result acquisition demand of the customer includes: In response to the comparison result acquisition requirement of the customer, determining a target comparison result corresponding to the comparison result acquisition requirement, and determining a location of the target comparison result; According to the location of the target comparison result, the target comparison result is pushed to the user through the cache or the database.

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

7. The method according to claim 1, characterized in that The push strategy includes at least one or more of a trajectory data screening rule, a trajectory data push time interval, and a trajectory data push method.

8. A trajectory data pushing device, characterized in that: The device comprises: A polling frequency recording module, configured to, in response to a user's track data subscription operation, push track data to the user through a polling connection, and record the user's polling frequency; A connection conversion module, used to determine whether the polling frequency exceeds a preset threshold, and convert the polling connection into a real-time connection when the polling frequency exceeds the preset threshold; wherein the real-time connection is used to push the updated trajectory data to the user immediately when the trajectory data is updated; The trajectory data push module is used to determine a push strategy and push the trajectory data to the user according to the real-time connection and the push strategy.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the trajectory data pushing method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the trajectory data pushing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Message processing method, apparatus and device

    CN109672735A

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

    CN111400619A

  • Data subscription method and device, electronic equipment and storage medium

    CN111654397A

  • Track data processing method, device and equipment and readable storage medium

    CN117370332A

  • Message pushing method and device, storage medium and processor

    CN118694815A

Cited By

  • Aggregation processing method and device of real-time trajectory data, electronic equipment and storage medium

    CN120316363A