A method and device for processing location data

By using the Akka framework to obtain and store location data sets on the foreground server, the problems of discontinuous movement trajectory and slow processing speed are solved, and continuous movement trajectory is demonstrated on the client and data processing speed is improved.

CN113761088BActive Publication Date: 2025-02-21BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010620592.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-01
Publication Date
2025-02-21
Estimated Expiration
2040-07-01

AI Technical Summary

Technical Problem

In the prior art, when the client requests the location data of the delivery staff and the delivery vehicle, the server only returns the latest location data, causing the movement track to be displayed on the map as a sudden jump instead of continuous movement. In addition, the foreground server has only one receiving thread, which results in slow processing speed. If the thread is blocked, new client requests will be denied, causing the connection to timeout.

Method used

The foreground server is used to obtain the location data set based on the Akka framework and store it in the foreground database. Through the Akka framework's Actor model, activate threads in the thread pool to create an Actor framework, obtain the location data set and store it in the database. When the client requests, it determines whether there is a corresponding query result in the database. If so, it will be returned directly. Otherwise, it will be retrieved and stored and returned.

Benefits of technology

It realizes the continuous movement trajectory of the delivery vehicle and the deliveryman on the client, increases the user's true perception of the logistics delivery status, and improves the data processing speed, avoiding client connection timeout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761088B_ABST
    Figure CN113761088B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for processing location data, and relates to the field of computer technology. A specific implementation of the method includes: obtaining a location data set based on an Akka framework, and storing the location data set in a front-end database; receiving a query request sent by a client, and determining whether there is a query result corresponding to the query request in the front-end database; if so, directly returning the query result; if not, obtaining a location data set corresponding to the query request based on the Akka framework, storing the location data set in the front-end database, and returning the location data set. This implementation can solve the technical problem of discontinuous movement trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for processing position data. Background Art

[0002] Users can view the logistics information of items through text (order tracking page) and map (order track page). If the delivery vehicle or delivery person sets out, the movement of the vehicle or person icon can be seen on the map.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] When the client requests the location data of the delivery person and the delivery vehicle from the server, it obtains the time interval for the next request and the current location data, and draws the current location data on the map. When the time for the next request arrives, the client requests the location data of the delivery person and the delivery vehicle from the server again, and obtains the time interval for the next request and the current location data. The server only returns the latest location data each time, so the movement track displayed on the map is a sudden jump, not a continuous movement.

[0005] Since the foreground server has only one receiving thread to receive client access requests, the processing speed is slow. If the thread is blocked, new client request messages will be rejected, resulting in a large number of client connection timeouts. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a method and apparatus for processing position data to solve the technical problem of discontinuous movement trajectory.

[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for processing location data is provided, which is applied to a foreground server, and includes:

[0008] Acquire a location dataset based on the Akka framework, and store the location dataset in a front-end database;

[0009] Receive the query request sent by the client, and determine whether there is a query result corresponding to the query request in the foreground database; if so, directly return the query result;

[0010] If not, the location data set corresponding to the query request is obtained based on the Akka framework, the location data set is stored in the front-end database, and the location data set is returned.

[0011] Optionally, obtaining a location dataset based on an Akka framework and storing the location dataset in a front-end database includes:

[0012] Activate the thread in the thread pool and create the Actor framework through the thread;

[0013] An Actor object is created through the Actor framework, so as to obtain a position data set through the Actor object, and the position data set is stored in a foreground database.

[0014] Optionally, obtaining a position data set through the Actor object includes:

[0015] Call the service interface provided by the JSF framework through the Actor object;

[0016] Receive the location data set acquired by the JSF framework and returned by the service interface.

[0017] Optionally, obtaining a location dataset based on an Akka framework and storing the location dataset in a front-end database includes:

[0018] Determine whether the time difference between the current timestamp and the timestamp of the most recent acquisition of the location data set is greater than or equal to the interval time;

[0019] If so, obtain the location data set based on the Akka framework, and store the location data set in the front-end database;

[0020] The location data set includes latitude and longitude data uploaded by the terminal, and the timestamp of the latitude and longitude data is between the timestamp of the most recent acquisition of the location data set and the current timestamp.

[0021] Optionally, the query request carries an order identifier and a timestamp of when the client last acquired the location data set from the front-end database.

[0022] Optionally, determining whether there is a query result corresponding to the query request in the foreground database includes:

[0023] It is determined whether there is a target location dataset in the foreground database, the target location dataset having a timestamp later than the timestamp of the location dataset most recently obtained by the client from the foreground database.

[0024] Optionally, the target location data set includes longitude and latitude data with a timestamp between the timestamp of the last time the client obtained the location data set from the front-end database and the current timestamp, and the longitude and latitude data are uploaded by a terminal bound to the order identifier.

[0025] In addition, according to another aspect of an embodiment of the present invention, a device for processing location data is provided, which is arranged at a foreground server, and includes:

[0026] An acquisition module is used to acquire a location data set based on the Akka framework and store the location data set in a front-end database;

[0027] The query module is used to receive the query request sent by the client, determine whether there is a query result corresponding to the query request in the foreground database; if so, directly return the query result; if not, obtain the location data set corresponding to the query request based on the Akka framework, store the location data set in the foreground database, and return the location data set.

[0028] Optionally, the acquisition module is further used to:

[0029] Activate the thread in the thread pool and create the Actor framework through the thread;

[0030] An Actor object is created through the Actor framework, so as to obtain a position data set through the Actor object, and the position data set is stored in a foreground database.

[0031] Optionally, the acquisition module is further used to:

[0032] Call the service interface provided by the JSF framework through the Actor object;

[0033] Receive the location data set acquired by the JSF framework and returned by the service interface.

[0034] Optionally, the acquisition module is further used to:

[0035] Determine whether the time difference between the current timestamp and the timestamp of the most recent acquisition of the location data set is greater than or equal to the interval time;

[0036] If so, obtain the location data set based on the Akka framework, and store the location data set in the front-end database;

[0037] The location data set includes latitude and longitude data uploaded by the terminal, and the timestamp of the latitude and longitude data is between the timestamp of the most recent acquisition of the location data set and the current timestamp.

[0038] Optionally, the query request carries an order identifier and a timestamp of when the client last acquired the location data set from the front-end database.

[0039] Optionally, the query module is further used to:

[0040] It is determined whether there is a target location dataset in the foreground database, the target location dataset having a timestamp later than the timestamp of the location dataset most recently obtained by the client from the foreground database.

[0041] Optionally, the target location data set includes longitude and latitude data with a timestamp between the timestamp of the last time the client obtained the location data set from the front-end database and the current timestamp, and the longitude and latitude data are uploaded by a terminal bound to the order identifier.

[0042] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including:

[0043] one or more processors;

[0044] a storage device for storing one or more programs,

[0045] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above embodiments.

[0046] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0047] One embodiment of the above invention has the following advantages or beneficial effects: because the front-end server obtains the location data set based on the Akka framework and stores it in the front-end database, the technical problem of discontinuous movement trajectory in the prior art is overcome. In the embodiment of the present invention, the front-end server obtains the location data set containing multiple location data based on the Akka framework, and the front-end database stores a large amount of location data with continuous timestamps; when the client requests the front-end server, the front-end server can directly return multiple location data with continuous timestamps, so that the client can render these location data on the map view, thereby showing the continuous movement trajectory of the delivery vehicle and the deliveryman, which helps to increase the user's most realistic perception of the logistics delivery status. Moreover, the embodiment of the present invention obtains a large amount of location data based on the Akka framework, which can not only improve the data processing speed, but also avoid connection timeouts on the client.

[0048] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0050] Figure 1 is a schematic diagram of the main flow of a method for processing location data according to an embodiment of the present invention;

[0051] Figure 2 is a schematic diagram of a foreground server processing location data based on an Akka framework according to an embodiment of the present invention;

[0052] Figure 3 is a schematic diagram of the main flow of a method for processing position data according to a reference embodiment of the present invention;

[0053] Figure 4 is a schematic diagram of a process of rendering a moving track on a client page according to an embodiment of the present invention;

[0054] Figure 5 is a schematic diagram of main modules of an apparatus for processing position data according to an embodiment of the present invention;

[0055] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0056] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0058] Figure 1 FIG. 1 is a schematic diagram of the main flow of a method for processing location data according to an embodiment of the present invention. As an embodiment of the present invention, Figure 1 As shown, the method for processing location data is applied to the foreground server and may include:

[0059] Step 101, obtaining a location dataset based on the Akka framework, and storing the location dataset in a front-end database.

[0060] In an embodiment of the present invention, the terminal (installed on the delivery vehicle or carried by the delivery person) uploads the current location data to the middle platform database (i.e., the data middle platform) in real time. Optionally, the terminal uploads the current longitude and latitude data at preset time intervals (such as 10 seconds, 30 seconds or 1 minute, etc.). The front-end server periodically obtains the location data set of the delivery terminal from the middle platform database based on the Akka framework, and the location data set includes multiple sets of longitude and latitude data uploaded by the terminal. Akka is an asynchronous, non-blocking, high-performance event-driven programming model. It provides a concurrent model called Actor, which has a smaller granularity than threads. A large number of Actors can be enabled in the system, and the location data set is obtained from the middle platform database through Actors, and the location data set is stored in the front-end database, thereby improving the data processing speed. Optionally, the front-end database can be a database based on distributed file storage, such as MongoDB.

[0061] It should be noted that the terminal can also upload the current location data to the data warehouse in real time, then the front-end server obtains the location data set from the data warehouse based on the Akka framework, and stores the location data set in the front-end database.

[0062] Since the front-end server periodically obtains the location data set from the middle-end database, when the client requests location data from the front-end server, the front-end server can return the location data set containing multiple sets of longitude and latitude data to the client. The client no longer needs to obtain the time interval for the next request from the server, and the client can render multiple sets of longitude and latitude data on the map view (MapView) to form a continuous movement track. Optionally, if some longitude and latitude data have corresponding location names, the location data set also includes the location names corresponding to these longitude and latitude data, and the client can also render these location names on the MapView to help users better understand the logistics information.

[0063] Optionally, step 101 may include: determining whether the time difference between the current timestamp and the timestamp of the most recent acquisition of the location data set from the middle station database is greater than or equal to the interval time; if so, acquiring the location data set based on the Akka framework, and storing the location data set in the front-end database. Wherein, the location data set includes the longitude and latitude data uploaded by the distribution terminal, and the timestamp of the longitude and latitude data is the longitude and latitude data between the timestamp of the most recent acquisition of the location data set and the current timestamp. In an embodiment of the present invention, it is necessary to pre-configure the interval time (such as 10 minutes, 30 minutes or 1 hour, etc.), so that the front-end service end obtains the location data set from the middle station database based on the Akka framework according to the configured interval time, and stores the location data set in the front-end database. Whenever the preset interval time is reached, all the longitude and latitude data within this interval time are obtained from the middle station database. It should be noted that the longitude and latitude data uploaded by the distribution terminal carries a timestamp, so the longitude and latitude data within the corresponding interval time are obtained from the middle station database according to the size of the timestamp.

[0064] Optionally, obtaining the location data set based on the Akka framework and storing the location data set in the foreground database includes: activating a thread in a thread pool and creating an Actor framework through the thread; creating an Actor object through the Actor framework, thereby obtaining the location data set through the Actor object, and storing the location data set in the foreground database. It should be noted that if there is no available thread in the thread pool, it is necessary to create a thread first, and then create an Actor framework through the thread.

[0065] like Figure 2 As shown, the foreground server first activates the thread in the timing thread pool, the thread creates an ActorSystem (i.e., an Actor framework), the ActorSystem creates an Actor object, the Actor object obtains a location data set, and stores the location data set in the foreground database. A thread can create multiple Actor frameworks, and an Actor framework can also create multiple Actor objects, thereby significantly improving the data processing speed.

[0066] ActorSystem can be used to create or terminate Actor objects, and even close the entire Actor model. Actor objects are a hierarchical structure, and ActorSystem is similar to the role of java.lang.Object or scala.Any in Actor objects. In other words, ActorSystem is the root object of all Actors. When an Actor object is created through the ActorOf method of ActorSystem, an Actor object under ActorSystem is actually created.

[0067] Each Actor object has a mailbox. Actor objects pass task messages through the mailbox, and the mailbox will require the Actor object to complete its task. The mailbox also has a queue to store and process messages in a first-in-first-out manner. The mailbox takes a message and delegates it to the receive method of the Actor object, so that the Actor object obtains the location data set and stores the location data set in the front-end database.

[0068] Optionally, obtaining the location data set through the Actor object includes: calling the service interface provided by the JSF framework through the Actor object; and receiving the location data set obtained by the JSF framework returned by the service interface. In an embodiment of the present invention, the Actor object calls the service interface provided by JavaServer Faces (JSF, Jeff Service Framework), thereby receiving the location data set obtained by the JSF framework from the middle-end database returned by the service interface. The JSF framework queries the location data from the middle-end database through SQL statements, and returns the queried location data to the Actor object.

[0069] Step 102, receiving the query request sent by the client, and determining whether there is a query result corresponding to the query request in the foreground database; if so, directly returning the query result; if not, obtaining the location data set corresponding to the query request based on the Akka framework, storing the location data set in the foreground database, and returning the location data set.

[0070] When the client sends a query request to the front-end server, the front-end server first determines whether there is a query result corresponding to the query request in the front-end database. If it exists, the query result is returned directly. If it does not exist, the location data set of the terminal is obtained from the middle-end database based on the Akka framework, and the obtained location data set is returned to the client. It should be noted that the process of obtaining location data from the middle-end database based on the Akka framework is similar to step 101 and will not be repeated here.

[0071] Optionally, the query request may carry the timestamp of the last time the client acquired the location data set, and the query result is the longitude and latitude data between the timestamp of the last time the client acquired the location data set from the front-end database and the current timestamp. Optionally, the query request also needs to carry an order identifier, and the front-end server queries the longitude and latitude data uploaded by the terminal bound to the order identifier, and then filters out the longitude and latitude data between the timestamp of the last time the client acquired the location data set from the front-end database and the current timestamp.

[0072] Optionally, determining whether there is a query result corresponding to the query request in the foreground database includes: determining whether there is a target location data set in the foreground database, the timestamp of the target location data set being later than the timestamp of the last time the client obtained the location data set from the foreground database. If there is a target location data set in the foreground database with a timestamp later than the timestamp of the last time the client obtained the location data set from the foreground database, the foreground database does not need to obtain the location data from the middle-end database, and can directly return the location data set stored in the foreground database with a timestamp later than the timestamp of the last time the client obtained the location data set from the foreground database to the client, thereby improving the response speed of the request.

[0073] Optionally, the target location data set includes longitude and latitude data with a timestamp between the timestamp of the last time the client obtained the location data set from the front-end database and the current timestamp, and the longitude and latitude data is uploaded by a terminal bound to the order identifier.

[0074] Because the client needs to constantly refresh the current page for real-time query, and the query request will also consume network time, which will affect the user experience, the embodiment of the present invention returns multiple longitude and latitude data to the client at the same time, that is, the client can obtain multiple longitude and latitude data in one request, so that the client only needs to refresh the MapView to render a continuous movement trajectory.

[0075] According to the various embodiments described above, it can be seen that the embodiment of the present invention adopts the technical means that the foreground server obtains the location data set based on the Akka framework and stores it in the foreground database, which solves the technical problem of discontinuous movement trajectory in the prior art. The embodiment of the present invention obtains the location data set containing multiple location data based on the Akka framework through the foreground server, and the foreground database stores a large amount of location data with continuous timestamps; when the client requests the foreground server, the foreground server can directly return multiple location data with continuous timestamps, so that the client can render these location data on the map view, thereby showing the continuous movement trajectory of the delivery vehicle and the deliveryman, which helps to increase the user's most realistic perception of the logistics delivery status. Moreover, the embodiment of the present invention obtains a large amount of location data based on the Akka framework, which can not only improve the data processing speed, but also avoid connection timeouts on the client.

[0076] Figure 3 is a schematic diagram of the main flow of a method for processing location data according to a reference embodiment of the present invention. As another embodiment of the present invention, Figure 3 As shown, the method for processing location data may include:

[0077] Step 301, determine whether the time difference between the current timestamp and the timestamp of the most recent location data set obtained from the middle station database is greater than or equal to the interval time; if so, execute step 302; if not, end.

[0078] The interval time can be pre-configured, and the front-end server determines in real time according to the configured time interval whether the time difference between the current timestamp and the timestamp of the most recent location data set obtained from the middle-end database is greater than or equal to the interval time.

[0079] Step 302, based on the Akka framework, obtain the location data set from the middle-end database, and store the location data set in the front-end database.

[0080] Specifically, the foreground server activates a thread in a thread pool, creates an Actor framework through the thread, creates an Actor object through the Actor framework, and obtains a location data set from the middle-end database through the Actor object, and stores the location data set in the foreground database. Optionally, the service interface provided by the JSF framework is called through the Actor object; the location data set obtained by the JSF framework from the middle-end database and returned by the service interface is received.

[0081] like Figure 2As shown, the foreground server first activates the thread in the timing thread pool, the thread creates an ActorSystem, the ActorSystem creates an Actor object, the Actor object obtains the location data set from the middle database, and stores the location data set in the foreground database. A thread can create multiple Actor frameworks, and an Actor framework can also create multiple Actor objects, thereby significantly improving the data processing speed. Optionally, the foreground database can be a database based on distributed file storage, such as MongoDB.

[0082] In an embodiment of the present invention, the terminal (installed on a delivery vehicle or carried by a delivery person) uploads the current longitude and latitude data values ​​to the middle station database at preset time intervals. It should be noted that the longitude and latitude data uploaded by the terminal carries a timestamp, so the longitude and latitude data within the corresponding interval is obtained from the middle station database according to the size of the timestamp.

[0083] The location data set includes multiple sets of longitude and latitude data uploaded by the terminal and with timestamps between the timestamp of the most recent acquisition of the location data set from the middle station database and the current timestamp. Optionally, if some longitude and latitude data have corresponding location names, the location data set also includes the location names corresponding to these longitude and latitude data, and the client can also render these location names on the MapView to help users better understand the logistics information.

[0084] Step 303: Receive a query request sent by the client.

[0085] The query request carries an order identifier and a timestamp of the last time the client obtained the location data set from the front-end database.

[0086] Step 304, determine whether there is a location data set in the front-end database that is uploaded by the terminal bound to the order identifier and whose timestamp is later than the timestamp of the client's most recent acquisition of the location data set from the front-end database; if so, execute step 305; if not, execute step 306.

[0087] Step 305, directly return the query result.

[0088] Step 306, based on the Akka framework, obtain the location data set corresponding to the query request from the middle-end database, store the location data set in the front-end database, and return the location data set. The location data set corresponding to the query request includes the longitude and latitude data uploaded by the terminal bound to the order identifier and with a timestamp between the timestamp of the last time the client obtained the location data set from the front-end database and the current timestamp.

[0089] When the client sends a query request to the front-end server, the front-end server first determines whether there is a query result corresponding to the query request in the front-end database. If so, the query result is directly returned. If not, the terminal location dataset is obtained from the middle-end database based on the Akka framework and the obtained location dataset is returned to the client.

[0090] Specifically, the foreground server activates a thread in a thread pool, creates an Actor framework through the thread, creates an Actor object through the Actor framework, and thereby obtains a location data set corresponding to the query request from the middle-end database through the Actor object, stores the location data set in the foreground database, and stores the location data set in the foreground database.

[0091] Optionally, the service interface provided by the JSF framework is called by the Actor object; the location data set obtained by the JSF framework from the middle platform database is received and returned by the service interface. The JSF framework queries the location data from the middle platform database through SQL statements and returns the queried location data to the Actor object.

[0092] Since the foreground server periodically obtains the location data set from the middle-end database, when the client requests location data from the foreground server, the foreground server can return the location data set containing multiple sets of longitude and latitude data to the client. The client no longer needs to obtain the time interval for the next request from the server, and the client can render multiple sets of longitude and latitude data on the map view to form a continuous movement trajectory.

[0093] In addition, the specific implementation content of the method for processing position data in a reference embodiment of the present invention has been described in detail in the method for processing position data described above, so the repeated content will not be described here.

[0094] The client first resolves the IP address and port number of the foreground server and establishes a TCP connection, then sends a query request to the foreground server. The server returns multiple sets of corresponding longitude and latitude data to the client, and the client disconnects from the foreground server or maintains the connection to wait for the next request. After the client obtains multiple sets of longitude and latitude data, it renders the longitude and latitude data on the page in conjunction with the map view MapView. Figure 4 FIG. 1 is a flow chart of rendering a moving track on a client page according to an embodiment of the present invention. Figure 4As shown, first create a MapView and display it on the page; at the same time, add information such as the deliveryman's avatar or the delivery vehicle icon based on the MapView protocol, and MapView loads the location of the deliveryman or the delivery vehicle to the page; then customize the page dynamic layout, and then refresh the page, so that the movement trajectory of the deliveryman or the delivery vehicle is loaded into the page according to the multiple sets of latitude and longitude data obtained from the front-end database.

[0095] Figure 5 is a schematic diagram of main modules of an apparatus for processing position data according to an embodiment of the present invention, such as Figure 5 As shown, the device 500 for processing location data is arranged at the foreground service end, and includes an acquisition module 501 and a query module 502; wherein, the acquisition module 501 is used to acquire a location data set based on an Akka framework, and store the location data set in a foreground database; the query module 502 is used to receive a query request sent by a client, and determine whether there is a query result corresponding to the query request in the foreground database; if so, the query result is directly returned; if not, the location data set corresponding to the query request is acquired based on the Akka framework, the location data set is stored in the foreground database, and the location data set is returned.

[0096] Optionally, the acquisition module 501 is further used for:

[0097] Activate the thread in the thread pool and create the Actor framework through the thread;

[0098] An Actor object is created through the Actor framework, so as to obtain a position data set through the Actor object, and the position data set is stored in a foreground database.

[0099] Optionally, the acquisition module 501 is further used for:

[0100] Call the service interface provided by the JSF framework through the Actor object;

[0101] Receive the location data set acquired by the JSF framework and returned by the service interface.

[0102] Optionally, the acquisition module 501 is further used for:

[0103] Determine whether the time difference between the current timestamp and the timestamp of the most recent acquisition of the location data set is greater than or equal to the interval time;

[0104] If so, obtain the location data set based on the Akka framework, and store the location data set in the front-end database;

[0105] The location data set includes latitude and longitude data uploaded by the terminal, and the timestamp of the latitude and longitude data is between the timestamp of the most recent acquisition of the location data set and the current timestamp.

[0106] Optionally, the query request carries an order identifier and a timestamp of when the client last acquired the location data set from the front-end database.

[0107] Optionally, the query module 502 is further used to:

[0108] It is determined whether there is a target location dataset in the foreground database, the target location dataset having a timestamp later than the timestamp of the location dataset most recently obtained by the client from the foreground database.

[0109] Optionally, the target location data set includes longitude and latitude data with a timestamp between the timestamp of the last time the client obtained the location data set from the front-end database and the current timestamp, and the longitude and latitude data are uploaded by a terminal bound to the order identifier.

[0110] According to the various embodiments described above, it can be seen that the embodiment of the present invention adopts the technical means that the foreground server obtains the location data set based on the Akka framework and stores it in the foreground database, which solves the technical problem of discontinuous movement trajectory in the prior art. The embodiment of the present invention obtains the location data set containing multiple location data based on the Akka framework through the foreground server, and the foreground database stores a large amount of location data with continuous timestamps; when the client requests the foreground server, the foreground server can directly return multiple location data with continuous timestamps, so that the client can render these location data on the map view, thereby showing the continuous movement trajectory of the delivery vehicle and the deliveryman, which helps to increase the user's most realistic perception of the logistics delivery status. Moreover, the embodiment of the present invention obtains a large amount of location data based on the Akka framework, which can not only improve the data processing speed, but also avoid connection timeouts on the client.

[0111] It should be noted that the specific implementation content of the device for processing position data in the present invention has been described in detail in the method for processing position data described above, so the repeated content will not be described again here.

[0112] Figure 6 An exemplary system architecture 600 is shown to which the method for processing location data or the apparatus for processing location data according to the embodiments of the present invention can be applied.

[0113] like Figure 6As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0114] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0115] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0116] The server 605 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The backend management server may analyze and process the received data such as the item information query request, and feed back the processing results (such as target push information, item information - only an example) to the terminal device.

[0117] It should be noted that the method for processing location data provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device for processing location data is generally set in the server 605 .

[0118] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0119] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0120] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0121] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0122] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0123] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0125] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes an acquisition module and a query module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases.

[0126] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method: obtaining a location data set based on the Akka framework, and storing the location data set in a front-end database; receiving a query request sent by a client, and determining whether there is a query result corresponding to the query request in the front-end database; if so, directly returning the query result; if not, obtaining the location data set corresponding to the query request based on the Akka framework, storing the location data set in the front-end database, and returning the location data set.

[0127] According to the technical solution of the embodiment of the present invention, because the front-end server obtains the location data set based on the Akka framework and stores it in the front-end database, the technical problem of discontinuous movement trajectory in the prior art is overcome. The embodiment of the present invention obtains the location data set containing multiple location data based on the Akka framework through the front-end server, and the front-end database stores a large amount of location data with continuous timestamps; when the client requests the front-end server, the front-end server can directly return multiple location data with continuous timestamps, so that the client can render these location data on the map view, thereby showing the continuous movement trajectory of the delivery vehicle and the deliveryman, which helps to increase the user's most realistic perception of the logistics delivery status. Moreover, the embodiment of the present invention obtains a large amount of location data based on the Akka framework, which can not only improve the data processing speed, but also avoid connection timeouts on the client.

[0128] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for processing location data, characterized in that: include: Acquire a location dataset based on the Akka framework, and store the location dataset in a front-end database; Receive the query request sent by the client, determine whether there is a query result corresponding to the query request in the front-end database; if so, directly return the query result; if not, obtain the location data set corresponding to the query request based on the Akka framework, store the location data set in the front-end database, and return the location data set; Acquiring a location dataset based on the Akka framework and storing the location dataset in a front-end database includes: Determine whether the time difference between the current timestamp and the timestamp of the most recent acquisition of the location data set is greater than or equal to the preset interval time; If so, obtain the location data set based on the Akka framework, and store the location data set in the front-end database; The location data set includes latitude and longitude data uploaded by the terminal, and the timestamp of the latitude and longitude data is between the timestamp of the most recent acquisition of the location data set and the current timestamp.

2. The method according to claim 1, characterized in that Acquiring a location dataset based on the Akka framework and storing the location dataset in a front-end database includes: Activate the thread in the thread pool and create the Actor framework through the thread; An Actor object is created through the Actor framework, so as to obtain a position data set through the Actor object, and the position data set is stored in a foreground database.

3. The method according to claim 2, characterized in that Obtaining the position data set through the Actor object includes: Call the service interface provided by the JSF framework through the Actor object; Receive the location data set acquired by the JSF framework and returned by the service interface.

4. The method according to claim 1, characterized in that: The query request carries an order identifier and a timestamp of the last time the client acquired the location data set from the front-end database.

5. The method according to claim 4, characterized in that Determining whether there is a query result corresponding to the query request in the foreground database includes: It is determined whether there is a target location data set in the foreground database, wherein the timestamp of the target location data set is later than the timestamp of the location data set most recently obtained by the client from the foreground database.

6. The method according to claim 5, characterized in that The target location data set includes longitude and latitude data with a timestamp between the timestamp of the last time the client obtained the location data set from the front-end database and the current timestamp, and the longitude and latitude data is uploaded by a terminal bound to the order identifier.

7. A device for processing position data, characterized in that: include: An acquisition module is used to acquire a location data set based on the Akka framework and store the location data set in a front-end database; The query module is used to receive the query request sent by the client, determine whether there is a query result corresponding to the query request in the foreground database; if so, directly return the query result; if not, obtain the location data set corresponding to the query request based on the Akka framework, store the location data set in the foreground database, and return the location data set; The acquisition module is also used for: Determine whether the time difference between the current timestamp and the timestamp of the most recent acquisition of the location data set is greater than or equal to the interval time; If so, obtain the location data set based on the Akka framework, and store the location data set in the front-end database; The location data set includes latitude and longitude data uploaded by the terminal, and the timestamp of the latitude and longitude data is between the timestamp of the most recent acquisition of the location data set and the current timestamp.

8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and apparatus for obtaining and updating base station position data

    CN101378554A

  • Method and system for improving the positioning system performance during continuous positioning procedure

    WO2010075707A1