Driver position synchronization method, system, device, and medium
By identifying the network operators of the driver and passenger terminals and using direct communication or a management backend relay method, the problem of slow driver location synchronization was solved, and smooth updates of driver locations on the map were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PINGAN YIQIANBAO E COMMERCE CO LTD
- Filing Date
- 2022-11-15
- Publication Date
- 2026-05-19
AI Technical Summary
The driver's location is not syncing with the passenger terminal slowly, causing the icon to jump unevenly on the map.
By determining whether the driver and passenger terminals belong to the same network operator, if they do, they communicate directly; if they do not, the management backend selects a server from the same operator as the passenger terminal as a relay to send the driver's location information.
The synchronization speed of driver location has been improved, avoiding the problem of icons jumping on the map and achieving smooth location updates.
Smart Images

Figure CN115802290B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, system, device and medium for synchronizing driver position. Background Technology
[0002] With the rapid development of computer technology, mobile apps have gradually entered users' daily lives, and more and more users are getting used to using mobile apps to hail a ride. After a passenger hails a ride, the ride-hailing app usually displays a map for the passenger and uses an icon on the map to indicate the driver's current location. As the driver's location moves, the icon also moves on the map.
[0003] However, because the driver's location moves quickly while driving, and the driver's location is synchronized to the passenger's phone slowly, the icon representing the driver will jump on the map instead of sliding smoothly. Summary of the Invention
[0004] In view of this, this application provides a method, system, medium, and device for synchronizing driver position to solve the problem of slow driver position synchronization in existing synchronization methods.
[0005] A first aspect of this application provides a method for synchronizing driver location, the method comprising:
[0006] The driver's terminal sends its current location information to the management backend, which is distributed across multiple servers.
[0007] The management backend responds to the current location information sent by the driver terminal and sends the comparison result to the driver terminal. The comparison result is used to identify whether the first operator corresponding to the driver terminal is the same as the second operator corresponding to the passenger terminal.
[0008] If the comparison results are the same, the driver terminal establishes a communication connection with the passenger terminal, generates new current location information every preset time interval, and sends the new current location information to the passenger terminal through the communication connection.
[0009] If the comparison results are different, the driver terminal generates new current location information every preset time interval and sends the new current location information to the management backend;
[0010] The management backend selects a target server from the multiple servers and sends the new current location information to the passenger terminal through the target server. The third operator corresponding to the target server is the same as the second operator.
[0011] The passenger terminal receives the new current location information.
[0012] A second aspect of this application provides a driver location synchronization system, the system comprising:
[0013] A driver-side device, deployed on a driver's terminal, is used to send current location information to a management backend, wherein the management backend is distributed across multiple servers; it is also used to establish a communication connection with a passenger terminal if the comparison results are the same, generate new current location information every preset time interval, and send the new current location information to the passenger terminal through the communication connection; if the comparison results are different, generate the new current location information every preset time interval and send the new current location information to the server-side device.
[0014] The management backend device, distributed across multiple servers, is used to respond to the current location information sent by the driver terminal and send a comparison result to the driver terminal, wherein the comparison result is used to identify whether the first operator corresponding to the driver terminal is the same as the second operator corresponding to the passenger terminal; it is also used to select a target server among the multiple servers and send the new current location information to the passenger terminal through the target server, wherein the third operator corresponding to the target server is the same as the second operator;
[0015] A passenger-side device, deployed on the passenger terminal, is used to receive the new current location information.
[0016] A third aspect of this application provides an electronic device including a storage medium, a processor, and instructions or code stored on the storage medium and executable on the processor, wherein the processor executes the instructions or code to implement the aforementioned driver position synchronization method.
[0017] A fourth aspect of this application provides a storage medium having instructions or code stored thereon, which, when executed by a processor, implement the aforementioned method for synchronizing the driver's position.
[0018] The above-described driver location synchronization method, system, device, and medium demonstrate that, compared to existing driver location synchronization methods, this solution takes into account the slow communication speed between terminals of different operators. By determining whether the driver and passenger terminals are connected to the same network operator, and if the comparison result is different, a server connected to the same network operator as the passenger terminal is used as a relay to forward the new location information generated by the driver terminal. This ensures that the data received by the passenger is sent by a device within the same network operator, thereby improving the driver location synchronization speed.
[0019] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating a driver location synchronization method provided in an embodiment of this application is shown.
[0022] Figure 2 A flowchart illustrating another driver location synchronization method provided in an embodiment of this application is shown;
[0023] Figure 3 An interactive schematic diagram of another driver location synchronization method provided in an embodiment of this application is shown;
[0024] Figure 4 This paper shows a structural block diagram of a driver position synchronization system provided in an embodiment of this application;
[0025] Figure 5 A structural block diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] The driver location synchronization method provided in this application can be applied to mobile devices with command or program execution capabilities. These mobile devices can be, but are not limited to, various mobile phones, tablets, in-vehicle mobile terminals, wearable devices, etc. The difference in execution between different computing devices is merely a difference in the execution entity; those skilled in the art will foresee that running the solution on different computing devices will produce the same technical effect. The invention will now be described in detail through specific embodiments.
[0028] Please see Figure 1 As shown, Figure 1 A flowchart illustrating a driver location synchronization method provided in an embodiment of the present invention includes the following steps:
[0029] S10: The driver's terminal sends the current location information to the management backend, which is distributed across multiple servers;
[0030] The method provided by this invention is used to synchronize the driver's location with the passenger's terminal, so that the passenger knows the driver's real-time location while waiting for and riding the vehicle. Before synchronizing the location, the driver's terminal first sends its current location information to the management backend, so that the management backend is aware of the current location synchronization requirement, and then performs subsequent operations based on the current location information sent by the driver's terminal.
[0031] The management backend employs a distributed architecture deployed across multiple servers. These servers can connect to the same or different network providers, and their specific locations can also be the same or different. For example, the management backend can be distributed across two servers: one located in Shenzhen, connecting to a mobile operator's network; and the other located in Shanghai, connecting to a China Unicom operator's network.
[0032] The current location information includes current longitude and current latitude. Specifically, the longitude and latitude can be used to uniquely determine the location of the driver's terminal. The longitude and latitude information can be in the WGS84 geographic coordinate system, or other coordinate systems such as the GCJ02 geographic coordinate system or the BD09 coordinate system, as long as the coordinate system can be resolved by the passenger terminal. There is no limitation here.
[0033] Prior to step S10, the following steps are also included:
[0034] S01: The management backend receives the initial driver information sent by the driver terminal, parses the initial driver information, and obtains the initial location information and the first network address corresponding to the driver terminal.
[0035] S02: Send the initial location information to the passenger terminal and receive the second network address fed back by the passenger terminal, wherein the second network address corresponds to the passenger terminal;
[0036] In steps S01-S02, the management backend receives the first network address sent by the driver terminal and the second network address sent by the passenger terminal, and then, in subsequent operations, determines whether the network providers corresponding to the driver terminal and the passenger terminal are the same based on the first network address and the second network address.
[0037] Specifically, the driver terminal sends initial driver information to the management backend. The management backend parses the received initial driver information to obtain initial location information and the driver terminal's first network address. The initial location information is sent to the passenger terminal so that the passenger terminal knows the driver's initial location and triggers the passenger terminal's feedback mechanism to send back the second network address.
[0038] In step S02, after sending the initial location information to the passenger terminal, the method further includes the following steps:
[0039] In response to the received initial location information, the passenger terminal determines the initial display position corresponding to the initial location information on the passenger terminal screen and displays the driver icon at the initial display position. In fact, the driver icon corresponds to the driver terminal.
[0040] In this step, the management backend sends the initial location information to the passenger terminal, which then displays the driver's initial location on the screen. Specifically, the passenger terminal displays a map on the screen, determines the corresponding horizontal and vertical coordinates on the map based on the initial location information, and thus determines the initial display location. The driver's icon is then displayed at the initial display location, providing a clear visual representation of the driver's initial location.
[0041] S03: Determine the network operator to which the first network address belongs as the first operator and the network operator to which the second network address belongs as the second operator;
[0042] S04: Compare whether the first operator and the second operator are the same, and generate the comparison result.
[0043] In steps S03-S04, the management backend determines whether the network providers corresponding to the driver terminal and the passenger terminal are the same based on the first network address of the driver terminal and the second network address of the passenger terminal.
[0044] It is understandable that different network operators provide network addresses belonging to different network segments. Therefore, the network operator to which a network address belongs can be determined based on the network segment it corresponds to. Based on this, the operator to which the first network address belongs can be determined and designated as the first operator; similarly, the operator to which the second network address belongs can be determined and designated as the second operator. After determining the first and second operators, they can be compared to generate a comparison result, where the result is either identical or different.
[0045] The initial location information includes initial longitude information and initial latitude information.
[0046] In this embodiment, the management backend receives a first network address sent by the driver's terminal and a second network address sent by the passenger's terminal. Using these two network addresses, it determines the first network operator accessed by the driver's terminal and the second network operator accessed by the passenger's terminal, and then checks whether the network operators accessed by the driver's terminal and the passenger's terminal are the same. A comparison result is generated when the driver's terminal initially sends location information. Therefore, when the driver's terminal sends location information again, it can choose to communicate directly with the passenger's terminal or use the management backend as an intermediary based on the comparison result.
[0047] S20: The management backend responds to the current location information sent by the driver terminal and sends the comparison result to the driver terminal. The comparison result is used to identify whether the first operator corresponding to the driver terminal is the same as the second operator corresponding to the passenger terminal.
[0048] In this step, after comparing the first and second operators, the management backend stores the comparison result in the management backend. When the driver's terminal sends its current location information to the management backend, the management backend system provides feedback to the driver's terminal, sending the comparison result to the driver's terminal so that the driver's terminal knows whether it belongs to the same operator as the passenger's terminal, and thus selects the appropriate method to send new location information.
[0049] S30: If the comparison results are the same, the driver terminal establishes a communication connection with the passenger terminal, generates new current location information every preset time interval, and sends the new current location information to the passenger terminal through the communication connection.
[0050] In this step, if the comparison results are the same, it means that the driver's terminal and the passenger's terminal correspond to the same network operator. This is understandable, as in most ride-hailing scenarios, passengers and drivers are usually located in the same city, so the distance is not too far. Within the same network operator, communication speed between two mobile devices that are not far apart is relatively fast, and the problem of the driver's icon jumping around on the map is less likely to occur.
[0051] Therefore, in this scenario, the driver's terminal simply needs to send data directly to the passenger's terminal. Specifically, a communication connection is established between the driver's and passenger's terminals to transmit data. Subsequently, the driver's terminal generates new current location information and sends it to the passenger's terminal every preset time interval, allowing the passenger's terminal to update the driver's location every preset time interval, thus enabling the driver's icon to slide on the map. The preset time interval can be set based on historical experience; a shorter preset time interval results in more frequent driver location updates and more accurate driver positioning, while a longer preset time interval consumes fewer communication resources.
[0052] In this embodiment, when the network operators corresponding to the driver terminal and the passenger terminal are the same, the driver terminal directly connects to the passenger terminal and sends new location information, which can ensure communication speed and avoid using the management backend as a relay, thus avoiding the consumption of management backend resources.
[0053] In step S30, the driver terminal establishes a communication connection with the passenger terminal, including the following steps:
[0054] S31: The driver terminal receives the second network address sent by the management backend, locates the passenger terminal based on the second network address, and sends a connection request to the passenger terminal.
[0055] S32: The passenger terminal responds to the connection request and establishes a communication connection.
[0056] In this step, after the driver's terminal sends its current location information to the management backend, the management backend sends the comparison result and the passenger terminal's second network address back to the driver's terminal. Upon receiving the second network address, the driver's terminal can send a connection request to the passenger terminal based on that address. The passenger terminal responds to the connection request, establishing a communication connection. Afterward, the driver's terminal and passenger terminal can communicate directly and exchange data without going through the management backend.
[0057] S40: If the comparison results are different, the driver terminal generates new current location information every preset time interval and sends the new current location information to the management backend;
[0058] In this step, if the comparison results are different, it means that the driver's terminal and the passenger's terminal correspond to different network operators. However, communication speed between mobile devices belonging to different network operators is relatively slow, which can easily cause the icon representing the driver to jump around on the map.
[0059] Therefore, in this scenario, a management backend is used as an intermediary to improve data transmission speed. Specifically, the driver's terminal generates new current location information and sends it to the management backend every preset time interval. The management backend then forwards the received data to the passenger's terminal.
[0060] S50: The management backend selects a target server from multiple servers and sends the new current location information to the passenger terminal through the target server. The third operator corresponding to the target server is the same as the second operator.
[0061] In this step, the management backend acts as an intermediary, forwarding the received new current location information to the passenger terminal. It's understandable that, since the management backend is distributed across multiple servers, these servers may connect to different network operators. However, if the server and the passenger terminal belong to the same operator, the data transmission speed between them is faster.
[0062] Based on this, a server belonging to the same operator as the passenger terminal can be selected, and the new location information can be forwarded to the passenger terminal using this server. Specifically, the management backend determines a target server among multiple servers. The network operator corresponding to this target server is a third operator, which is the same as the second operator, meaning that the target server is the same operator as the passenger terminal.
[0063] For example, if the driver's terminal corresponds to a mobile operator and the passenger's terminal corresponds to a China Unicom operator, the management backend will select one of the servers connected to the China Unicom operator as the target server and use that target server to send the new location information to the passenger's terminal.
[0064] It is understandable that the server that communicates directly with the driver's terminal may belong to the same operator as the driver's terminal or to a different operator, and this server may not necessarily be the target server.
[0065] In this embodiment, when the driver terminal and passenger terminal correspond to different network operators, the management backend determines the target server. The driver terminal uses the target server as a relay to send new location information to the passenger terminal, avoiding direct communication between the driver terminal and passenger terminal across network operators and improving the synchronization speed of location information.
[0066] In step S50, the management backend selects a target server from multiple servers, including the following steps:
[0067] S51: The management backend determines the fourth operator corresponding to each server. If the fourth operator is the same as the second operator, the server corresponding to the fourth operator is determined as the alternative server.
[0068] S52: The management backend parses the new current location information to obtain the new driver's location, and determines the candidate server closest to the new driver's location as the target server from the candidate servers.
[0069] In steps S51-S52, the management backend selects a target server from multiple servers, and then forwards the received new current location information to the passenger terminal through the target server. It is understandable that, since the management backend is distributed across multiple servers, the locations of these servers may differ, and the closer the server is to the passenger terminal, the faster the data transmission speed between them.
[0070] Therefore, in addition to selecting a server belonging to the same operator as the passenger's terminal, a server located closer to the passenger's terminal can be chosen as the target server. However, since passengers and drivers are generally in the same city, a server located further away from the driver's terminal can be selected as the target server.
[0071] Specifically, the management backend determines the fourth network operator corresponding to each server. If the fourth network operator is the same as the second network operator, meaning the server and passenger terminal share the same network operator, then the server corresponding to the fourth network operator is designated as a backup server. This ensures that the target server selected from the backup servers will have the same network operator as the passenger terminal. After determining the backup servers, if there is only one backup server, it is designated as the target server. If there are multiple backup servers, the backup server closest to the new driver's location is designated as the target server. This ensures that the target server has the same network operator as the passenger terminal and is also close to the passenger's physical location.
[0072] For example, if the driver's terminal corresponds to a mobile operator and the passenger's terminal corresponds to a China Unicom operator, the management backend will determine the server connected to the China Unicom operator as the backup server. If the driver's location is in Shanghai, and backup server A is set up in Shanghai while backup server B is set up in Beijing, then backup server A will be determined as the target server.
[0073] In this embodiment, when the driver's terminal and the passenger's terminal correspond to different network operators, and the target server and the passenger's terminal correspond to the same operator, the alternative server that is closer to the driver's location is selected as the target server to avoid direct communication between the driver's terminal and the passenger's terminal across network operators. The target server is then used to forward the location information, which further improves the synchronization speed of the location information.
[0074] S60: The passenger terminal receives new current location information.
[0075] Following step S60, the following steps are also included:
[0076] S70: The passenger terminal determines the new current display location on the screen corresponding to the new current location information, and displays the driver icon at the new current display location.
[0077] In steps S60-S70, the target server or driver terminal sends the new location information to the passenger terminal, and the passenger terminal displays the driver's location on its screen accordingly. Specifically, the passenger terminal displays a map on its screen, determines the corresponding horizontal and vertical coordinates on the map based on the new current location information, and thus determines the new current location, displaying the driver's icon at the new current location. Since the driver terminal generates new location information every preset time interval and sends it directly or indirectly to the passenger terminal, the passenger terminal can update the driver's location every preset time interval, enabling the driver's icon to slide smoothly on the map. Furthermore, because the location information is sent quickly, the problem of the driver's icon jumping on the map in existing synchronization methods is avoided.
[0078] Figure 2 A flowchart illustrating a method for synchronizing driver location according to another embodiment of this application is shown.
[0079] As shown in the figure, this embodiment includes the following steps:
[0080] S101: The driver terminal sends the initial driver information to the management backend, which includes the initial location and the first network address;
[0081] S102: The management backend sends the initial location information to the passenger terminal;
[0082] S103: In response to the received initial position, the passenger terminal determines the initial display position corresponding to the initial position on the screen and displays the driver icon at the initial display position;
[0083] S104: The passenger terminal sends the second network address to the management backend;
[0084] S105: The management backend determines the first operator corresponding to the driver terminal and the second operator corresponding to the passenger terminal based on the first network address and the second network address, and judges whether the first operator and the second operator are the same, and obtains the comparison result.
[0085] S106: The driver terminal sends the current driver information to the management backend, where the current driver information includes the current location and the first network address;
[0086] S107: The management backend responds with the current driver information, sending the comparison result and the second network address to the driver's terminal;
[0087] S108: The driver's terminal generates a new current location every preset time interval;
[0088] S109: Are the comparison results the same? If the comparison results are the same, proceed to S110; if the comparison results are different, proceed to S111.
[0089] S110: The driver terminal establishes a communication connection with the passenger terminal based on the second network address, sends the new current location to the passenger terminal, and then jumps to S113;
[0090] S111: The driver's terminal sends the new current location to the management backend;
[0091] S112: The management backend determines the target server based on the second operator and the new current location, and sends the new current location to the passenger terminal through the target server;
[0092] S113: The passenger terminal determines a new display position on the screen corresponding to the new current position based on the new current position received, and displays the driver icon at the new display position.
[0093] In this embodiment, when the driver terminal pushes its location for the first time, it sends the initial location to the management backend, which then forwards it to the passenger terminal. Simultaneously, the management backend receives the first network address of the driver terminal and the second network address of the passenger terminal, analyzes these two network addresses to determine whether the driver terminal and passenger terminal correspond to the same operator, obtains the comparison result, and stores it in the management backend.
[0094] Specifically, upon initial location push, the driver's terminal sends the initial driver information to the management backend. The management backend parses the initial driver information to obtain the driver's terminal's initial location and first network address. The management backend then sends the initial location to the passenger terminal and stores the first network address within the management backend. Upon receiving the initial location from the management backend, the passenger terminal displays a map on its screen and determines the initial display location corresponding to the initial location on the map. The driver's icon is then displayed at the initial display location, allowing the user to visually see the driver's location on the map. Furthermore, the passenger terminal sends its corresponding second network address to the management backend. The management backend determines the first operator corresponding to the driver's terminal based on the first network address and the second operator corresponding to the passenger terminal based on the second network address. It then determines whether the first and second operators are the same, obtaining a comparison result, which is either the same or different.
[0095] When the driver's terminal pushes the location for the second time, it sends the current location information to the management backend. The management backend responds to the current location information sent by the driver's terminal and sends the comparison result back to the driver's terminal.
[0096] Specifically, during the second location push, the driver's terminal sends its current location information to the management backend. The management backend then sends the comparison result and the first network address back to the driver's terminal. Alternatively, the driver's terminal can also send the first network address along with the current location information to the management backend. The management backend analyzes whether the first network address sent this time is the same as the one sent during the first push, thus verifying the network address. If they are different, a new comparison result is generated. Furthermore, the management backend can send the passenger's terminal's second network address along with the comparison result to the driver's terminal, allowing the driver's terminal to know how to locate the passenger's terminal.
[0097] When the driver's terminal pushes the location later, it can choose to send the new location information directly to the passenger terminal based on the comparison results, or forward the new location information to the passenger terminal through the target server, so as to improve the synchronization speed of the driver's location.
[0098] Specifically, during subsequent location updates, the driver's terminal generates a new current location every preset time interval and pushes it directly or indirectly to the passenger's terminal. If the comparison results are the same, the driver's terminal locates the passenger's terminal using the second network address sent by the management backend, establishes a communication connection between the two, generates new location information every preset time interval, and sends it directly to the passenger's terminal through the communication connection. If the comparison results are different, the driver's terminal generates new location information every preset time interval and sends it to the management backend. The management backend selects a server with the same network operator as the passenger's terminal and the closest location to the driver as the target server, and uses the target server to send the new location information to the passenger's terminal.
[0099] After receiving new location information from the driver's terminal or the target server, the passenger terminal displays the driver icon on the screen accordingly. Since new location information is received periodically, the driver icon can move on the screen, creating a dynamic effect. Because this embodiment synchronizes the driver's location quickly, the driver icon movement is smooth, solving the problem of driver icon jumping caused by slow synchronization speeds in existing driver location synchronization methods.
[0100] Figure 3 The figure shows an interactive schematic diagram of a driver location synchronization method according to another embodiment of this application. As shown in the figure, ①②③④ is a typical latitude and longitude push. The driver terminal sends the latitude and longitude address to the management backend, and then the management backend pushes the driver's latitude and longitude to the passenger terminal. In this way, the passenger can see where the driver is on the map during the pick-up process.
[0101] ⑤ and ⑥ refer to the process where the management backend pushes data to the passenger terminal. The ride-hailing app on the passenger terminal can detect this. At this time, the passenger terminal obtains its current IP address, which is also its second network address, and sends this IP address back to the management backend (i.e., the ride-hailing backend system in the diagram). After receiving the passenger terminal's IP address, the management backend now has both the driver terminal's first network address and the passenger terminal's second network address. Based on the network operator's location, it determines whether the two network addresses belong to the same network operator.
[0102] Regarding ⑦ and ⑧, since ⑤ and ⑥ have already stored the passenger terminal's second network address in the management backend, when the driver terminal sends the latitude and longitude to the management backend the next time, the management backend will return two pieces of information to the driver terminal: "the passenger terminal's second network address" and "whether the driver terminal and the passenger terminal are from the same network operator".
[0103] In step 9, because the driver terminal already knows the "second network address of the passenger terminal" and "whether the driver terminal and the passenger terminal are the same network operator" from the return results of steps 7 and 8, if it is found that they are the same network operator, then the driver terminal will directly send the latitude and longitude information to the passenger terminal. The driver terminal and the passenger terminal are not only close to each other, but also in the same network operator environment, so the data synchronization speed is the fastest.
[0104] In step 10, the driver's terminal already knows the "passenger terminal's second network address" and "whether the driver and passenger terminals belong to the same network operator" from the results returned in steps 7 and 8. If the driver and passenger terminals do not belong to the same network operator, then the driver continues to send the latitude and longitude information to the ride-hailing backend. After receiving the latitude and longitude information from the driver's terminal, the ride-hailing backend internally locates the data center corresponding to the network operator with the same second network address, selects a server from that data center, and pushes the latitude and longitude information to the passenger terminal. Because the same operator's environment is used when sending data to the passenger terminal, the data synchronization speed is improved.
[0105] As can be seen, compared with existing driver location synchronization methods, the above scheme takes into account the slow communication speed between terminals of different operators. By determining whether the driver and passenger terminals are connected to the same network operator, and when the comparison result is different, the scheme uses a server connected to the same network operator as the passenger terminal as a relay to forward the new location information generated by the driver terminal. This ensures that the data received by the passenger is sent by a device within the same network operator, thereby improving the synchronization speed of the driver's location.
[0106] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0107] In one embodiment, a driver position synchronization system is provided, which corresponds one-to-one with the driver position synchronization methods described in the above embodiments. For example... Figure 4 As shown, the driver location synchronization system includes: a driver-side device, a management backend device, and a passenger-side device. Detailed descriptions of each functional module are as follows:
[0108] The driver-side device, deployed on the driver's terminal, is used to send the current location information to the management backend, which is distributed across multiple servers. It is also used to establish a communication connection with the passenger terminal if the comparison results are the same, generate new current location information at preset intervals, and send the new current location information to the passenger terminal via the communication connection; if the comparison results are different, generate new current location information at preset intervals and send the new current location information to the server-side device.
[0109] The management backend device is distributed across multiple servers. In response to the current location information sent by the driver terminal, it sends a comparison result to the driver terminal. The comparison result is used to identify whether the first operator corresponding to the driver terminal is the same as the second operator corresponding to the passenger terminal. It is also used to select a target server among the multiple servers and send the new current location information to the passenger terminal through the target server. The third operator corresponding to the target server is the same as the second operator.
[0110] A passenger-side device, deployed on a passenger terminal, is used to receive the new current location information.
[0111] In one embodiment, the management backend device is further configured to:
[0112] Receive the initial driver information sent by the driver terminal, parse the initial driver information, and obtain the initial location information and the first network address corresponding to the driver terminal;
[0113] The initial location information is sent to the passenger terminal, and the second network address fed back by the passenger terminal is received, wherein the second network address corresponds to the passenger terminal;
[0114] The network operator to which the first network address belongs is identified as the first operator, and the network operator to which the second network address belongs is identified as the second operator.
[0115] Compare whether the first and second operators are the same, and generate the comparison results.
[0116] In one embodiment, the passenger-side device is further configured to:
[0117] The passenger terminal determines the initial display position corresponding to the initial location information on the passenger terminal screen, and displays the driver icon at the initial display position. In fact, the driver icon corresponds to the driver terminal.
[0118] In one embodiment, the management backend device is further configured to:
[0119] The management backend determines the fourth operator corresponding to each server. If the fourth operator is the same as the second operator, the server corresponding to the fourth operator is determined as the alternative server.
[0120] The management backend parses the new current location information to obtain the new driver's location, and then selects the candidate server closest to the new driver's location as the target server from the candidate servers.
[0121] In one embodiment, the driver-side device is also used for:
[0122] Receive the second network address sent by the management backend, locate the passenger terminal based on the second network address, and send a connection request to the passenger terminal.
[0123] The passenger-side device is also used for:
[0124] In response to a connection request, a communication connection is established.
[0125] In one embodiment, the passenger-side device is further configured to:
[0126] In response to the received new current location information, the passenger terminal determines the new current display location on the screen corresponding to the new current location information and displays the driver icon at the new current display location.
[0127] In one embodiment, the current location information includes current longitude information and current latitude information;
[0128] Initial location information includes initial longitude information and initial latitude information.
[0129] In one embodiment, an electronic device is provided. This electronic device can be a mobile device such as a mobile phone, tablet, or in-vehicle mobile terminal, or other device with program execution capabilities. The internal structure diagram of this electronic device can be as follows: Figure 5As shown, the electronic device includes a processor, memory, and a network module. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores an operating system, instructions, or code. The internal memory provides an environment for the operation of the operating system and instructions or code in the non-volatile storage media. When executed by the processor, the instructions or code implement the functions or steps of the aforementioned driver position synchronization method. The network module may include a network interface and / or a wireless network module, allowing the electronic device to communicate with other devices or service platforms. Furthermore, the electronic device may also include a display screen and an input system.
[0130] In one embodiment, an electronic device is provided, including a memory, a processor, and instructions or code stored in the memory and executable on the processor, wherein the processor executes the instructions or code to perform the following steps:
[0131] The driver's terminal sends its current location information to the management backend, which is distributed across multiple servers.
[0132] The management backend responds to the current location information sent by the driver's terminal and sends the comparison result to the driver's terminal. The comparison result is used to identify whether the first operator corresponding to the driver's terminal is the same as the second operator corresponding to the passenger's terminal.
[0133] If the comparison results are the same, the driver terminal establishes a communication connection with the passenger terminal, generates new current location information every preset time interval, and sends the new current location information to the passenger terminal through the communication connection.
[0134] If the comparison results are different, the driver terminal will generate new current location information every preset time interval and send the new current location information to the management backend;
[0135] The management backend selects a target server from multiple servers and sends the new current location information to the passenger terminal through the target server. The third operator corresponding to the target server is the same as the second operator.
[0136] In one embodiment, a storage medium is provided on which instructions or code are stored, which, when executed by a processor, perform the following steps:
[0137] The driver's terminal sends its current location information to the management backend, which is distributed across multiple servers.
[0138] The management backend responds to the current location information sent by the driver's terminal and sends the comparison result to the driver's terminal. The comparison result is used to identify whether the first operator corresponding to the driver's terminal is the same as the second operator corresponding to the passenger's terminal.
[0139] If the comparison results are the same, the driver terminal establishes a communication connection with the passenger terminal, generates new current location information every preset time interval, and sends the new current location information to the passenger terminal through the communication connection.
[0140] If the comparison results are different, the driver terminal will generate new current location information every preset time interval and send the new current location information to the management backend;
[0141] The management backend selects a target server from multiple servers and sends the new current location information to the passenger terminal through the target server. The third operator corresponding to the target server is the same as the second operator.
[0142] It should be noted that the functions or steps that the storage medium or electronic device can achieve are described in the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0143] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through instructions or code. These instructions or code can be stored in a non-volatile readable storage medium. When executed, the instructions or code can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0144] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0145] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the units or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the units in the system within the embodiment can be distributed throughout the system as described in the embodiment, or they can be modified to reside in one or more systems different from this embodiment. The units in the above-described embodiment can be combined into one unit, or further divided into multiple sub-units.
[0146] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for synchronizing driver position, characterized in that, The method includes: The driver terminal sends its current location information to the management backend, which is distributed across multiple servers. These servers may connect to the same or different operators and have the same or different location settings. The management backend responds to the current location information sent by the driver terminal and sends the comparison result to the driver terminal. The comparison result is used to identify whether the first operator corresponding to the driver terminal is the same as the second operator corresponding to the passenger terminal. If the comparison results are the same, the driver terminal establishes a communication connection with the passenger terminal, generates new current location information every preset time interval, and sends the new current location information to the passenger terminal through the communication connection. If the comparison results are different, the driver terminal generates new current location information every preset time interval and sends the new current location information to the management backend; The management backend selects a target server from the multiple servers and sends the new current location information to the passenger terminal through the target server. The third operator corresponding to the target server is the same as the second operator. The passenger terminal receives the new current location information; The management backend selects a target server from the plurality of servers, including: The management backend determines the fourth operator corresponding to each of the servers. If the fourth operator is the same as the second operator, the server corresponding to the fourth operator is determined as a candidate server. The management backend parses the new current location information to obtain the new driver location, and determines the candidate server closest to the new driver location from the candidate servers as the target server.
2. The method according to claim 1, characterized in that, Before the driver terminal sends the current location information to the management backend, the method further includes: The management backend receives the initial driver information sent by the driver terminal, and parses the initial driver information to obtain the initial location information and the first network address corresponding to the driver terminal. The initial location information is sent to the passenger terminal, and the second network address fed back by the passenger terminal is received, wherein the second network address corresponds to the passenger terminal; The network operator to which the first network address belongs is determined to be the first operator, and the network operator to which the second network address belongs is determined to be the second operator; The comparison result is generated by comparing whether the first operator and the second operator are the same.
3. The method according to claim 2, characterized in that, After sending the initial location information to the passenger terminal, the method further includes: In response to the received initial location information, the passenger terminal determines an initial display position on its screen corresponding to the initial location information and displays a driver icon at the initial display position. In fact, the driver icon corresponds to the driver terminal.
4. The method according to claim 2, characterized in that, The driver terminal establishes a communication connection with the passenger terminal, including: The driver terminal receives the second network address sent by the management backend, locates the passenger terminal based on the second network address, and sends a connection request to the passenger terminal; The passenger terminal responds to the connection request and establishes the communication connection.
5. The method according to claim 3, characterized in that, After the passenger terminal receives the new current location information, the method further includes: The passenger terminal determines a new current display position on the screen corresponding to the new current location information, and displays the driver icon at the new current display position.
6. The method according to claim 2, characterized in that, The current location information includes current longitude and current latitude; The initial location information includes initial longitude information and initial latitude information.
7. A driver position synchronization system, characterized in that, The system includes: A driver-side device, deployed on a driver's terminal, is used to send current location information to a management backend, wherein the management backend is distributed across multiple servers; it is also used to establish a communication connection with a passenger terminal if the comparison results are the same, generate new current location information every preset time interval, and send the new current location information to the passenger terminal through the communication connection; if the comparison results are different, generate the new current location information every preset time interval and send the new current location information to the server-side device. A management backend device, distributed across multiple servers, is used to respond to the current location information sent by the driver terminal and send a comparison result to the driver terminal. The comparison result is used to identify whether the first operator corresponding to the driver terminal is the same as the second operator corresponding to the passenger terminal. It is also used to select a target server among the multiple servers and send the new current location information to the passenger terminal through the target server. The third operator corresponding to the target server is the same as the second operator. The multiple servers may connect to the same or different operators and have the same or different location settings. A passenger-side device, deployed on the passenger terminal, is used to receive the new current location information; The management backend device is also used for: The management backend determines the fourth operator corresponding to each server. If the fourth operator is the same as the second operator, the server corresponding to the fourth operator is determined as the alternative server. The management backend parses the new current location information to obtain the new driver's location, and then selects the candidate server closest to the new driver's location as the target server from the candidate servers.
8. A storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 6.
9. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the program, it implements the method of any one of claims 1 to 6.