CN110032671A - Processing method, device, computer equipment and the storage medium of user trajectory information - Google Patents

Processing method, device, computer equipment and the storage medium of user trajectory information Download PDF

Info

Publication number
CN110032671A
CN110032671A CN201910294033.4A CN201910294033A CN110032671A CN 110032671 A CN110032671 A CN 110032671A CN 201910294033 A CN201910294033 A CN 201910294033A CN 110032671 A CN110032671 A CN 110032671A
Authority
CN
China
Prior art keywords
user
state
information
cache table
trajectory information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910294033.4A
Other languages
Chinese (zh)
Other versions
CN110032671B (en
Inventor
贾辰飞
王亦乐
刘勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910294033.4A priority Critical patent/CN110032671B/en
Publication of CN110032671A publication Critical patent/CN110032671A/en
Application granted granted Critical
Publication of CN110032671B publication Critical patent/CN110032671B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location

Abstract

The embodiment of the invention discloses processing method, device, computer equipment and the storage mediums of a kind of user trajectory information, wherein real-time acquisition user trajectory information is simultaneously cached this method comprises: the map match in response to user is requested;The corresponding index information of the user trajectory information is stored in the cache table for enlivening state, at least three cache tables are provided with to store index information, at least three cache table interval setting time carries out rotation between state enlivening state, state to be deleted and delete;For in the cache table for deleting state, the user trajectory information of all inactive users in the cache table is deleted.The embodiment of the present invention is cleared up by the dynamic that the status wheel of at least three cache tables rotates into user trajectory information in row memory, reduce memory usage, reduce the memory pressure of map match cluster, it avoids frequently locking release lock simultaneously, reduce CPU fluctuation, map match performance is improved, meets the needs of real-time matching.

Description

Processing method, device, computer equipment and the storage medium of user trajectory information
Technical field
The present embodiments relate to data processing technique more particularly to a kind of processing method of user trajectory information, device, Computer equipment and storage medium.
Background technique
Map match refers to that (can be and drive vehicle or walking) coordinate sequence in traveling for user is matched to road network In suitable section process.The input of map match includes: user location point sequence and basic road network.User location point is usually GPS (Global Positioning System, global positioning system) anchor point or Wi-Fi (WIreless-Fidelity, Wireless Fidelity) anchor point, user location point includes: the information such as latitude and longitude coordinates, speed and the angle of point.Basic road net data table Show the information of entire road network, the main geometry point including the attribute information of road, the attribute information of road node, road is believed Breath etc..The work of map match is exactly that user location point sequence and basic road network link together.
The GPS point information content that Floating Car is collected into is huge and precision is different, and complicated road network makes electricity in city Sub- map also includes mass data, therefore it is required that map-matching algorithm has compared with high matching precision, matching efficiency and good Shandong Stick, in face of the challenge of large-scale data processing.At the same time, traveler is to obtaining the requirement of real-time of information also increasingly Height, optimization map-matching algorithm still can not solve bottleneck existing for goodput, and matched real-time still needs to improve.
Currently, the Memory Management in map-matching algorithm is as follows:
(1) EMS memory management process based on more queues
As shown in Figure 1, this method distributes the buffer queue of multiple state consistencies, when clearing up memory, locking is slow Area is rushed to be cleared up.The disadvantages of the method are as follows easily causing thread when data are uneven in buffer area and dying of hunger situation, Wu Fachong Divide the multi-core resource using CPU.
(2) EMS memory management process based on whole section of track
The track of this method default input is the complete trajectory of user, when user trajectory is disposed, whole rail Mark is cleaned.This method has two: 1) timeliness is too poor, the track of user be using 3s as interval real-time Transmission, this Scheme is unable to real-time matching, is unsatisfactory for the demand of the arithmetic for real-time traffic flow such as road conditions;2) the method will lead to the waiting of CPU indirect, The handling capacity of system is not high, is unable to fully utilize computing resource.
To sum up, the memory management of existing map match has the following problems:
(1) EMS memory occupation is high, uses the cluster of 300 128G memories, memory usage 99%, track scale wave at present After dynamic, it is easy to that server resets is caused to lose track data.
(2) real time history user trajectory eliminate, peak period 500,000 tracks of real-time matching per second, to life cycle algorithm performance It is required that high.Existing life cycle algorithm frequently locks for data consistency, and CPU fluctuation is obvious, as shown in Figure 2;Line Upper QPS (Query Per Second, query rate per second) can significantly decrease, and lead to matching delay, concurrent capability decline, nothing Method meets traveler to the requirement of real-time for obtaining information.
(3) buffer queue unreasonable distribution easily causes the situation hungry to death in scheduling, causes partition queue element very empty, portion Unit's column are very full, are unable to fully the multi-core resource using CPU.
Summary of the invention
The embodiment of the present invention provides processing method, device, computer equipment and the storage medium of a kind of user trajectory information, To optimize the matched memory management of map, memory usage is reduced, CPU fluctuation is reduced, rationally utilizes cpu resource, improve map Matching performance.
In a first aspect, the embodiment of the invention provides a kind of processing methods of user trajectory information, comprising:
In response to the map match request of user, user trajectory information is obtained in real time and is cached;
The corresponding index information of the user trajectory information is stored in enlivening in the cache table of state, be provided with to Few three cache tables store index information, at least three cache table interval setting time enliven state, state to be deleted and It deletes and carries out rotation between state;
For in the cache table for deleting state, the user trajectory information of all inactive users in the cache table is deleted.
Second aspect, the embodiment of the invention also provides a kind of processing units of user trajectory information, comprising:
Information cache module obtains user trajectory information in real time and carries out for the map match request in response to user Caching;
Memory module is indexed, enlivens the slow of state for being stored in the corresponding index information of the user trajectory information to be in It deposits in table, is provided at least three cache tables to store index information, at least three cache table interval setting time exists It enlivens state, state to be deleted and deletes and carry out rotation between state;
Trace information removing module, for deleting all inactive in the cache table in the cache table for deleting state The user trajectory information of user.
The third aspect, the embodiment of the invention also provides a kind of computer equipment, the computer equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the processing method of the user trajectory information as described in any embodiment of that present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes the processing method of the user trajectory information as described in any embodiment of that present invention when the program is executed by processor.
The technical solution of the embodiment of the present invention rotates into user trajectory in row memory by the status wheel of at least three cache tables The dynamic of information is cleared up, and reduces memory usage, the memory pressure of map match cluster is decreased obviously, and no longer becomes real-time The bottleneck of map match.It avoids frequently locking release lock simultaneously, reduces CPU fluctuation, rationally utilize cpu resource, improve map Matching performance meets the needs of real-time matching.
Detailed description of the invention
Fig. 1 is the schematic diagram of the multiple buffer queuing memory management of the prior art;
Fig. 2 is the fluctuation schematic diagram of CPU caused by the map match life cycle algorithm of the prior art;
Fig. 3 is the flow chart of the processing method for the user trajectory information that the embodiment of the present invention one provides;
Fig. 4 is the schematic diagram for triple cache tables that the embodiment of the present invention one provides;
Fig. 5 is the flow chart of the processing method of user trajectory information provided by Embodiment 2 of the present invention;
Fig. 6 is the structural body schematic diagram one of user trajectory information provided by Embodiment 2 of the present invention;
Fig. 7 is the structural body schematic diagram two of user trajectory information provided by Embodiment 2 of the present invention;
Fig. 8 is the structural body schematic diagram three of user trajectory information provided by Embodiment 2 of the present invention;
Fig. 9 is the structural schematic diagram of the processing unit for the user trajectory information that the embodiment of the present invention three provides;
Figure 10 is another structural schematic diagram of the processing unit for the user trajectory information that the embodiment of the present invention three provides;
Figure 11 is the structural schematic diagram for the computer equipment that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 3 is the flow chart of the processing method for the user trajectory information that the embodiment of the present invention one provides, and the present embodiment can fit For in map match scene the case where memory management, specifically removing user's history trace information in time, application scenarios can be with Be intelligent transportation (such as road conditions, ETA (Event Tree Analysis, Event Tree Analysis)), navigation (such as route excavate, tie up road), Data engine information (is such as opened, is blocked, mounting, new Lu Faxian, traffic limitation).This method can be by user trajectory information Device is managed to execute, which can be realized by software and/or hardware, can generally be integrated in server etc. and have calculation processing In the computer equipment of function.As shown in figure 3, this method specifically includes:
S310, is requested in response to the map match of user, is obtained user trajectory information in real time and is cached.
Wherein, user positioned using map, search pattern or navigation when, user terminal input target position after, Terminal to server issues map match request, and server obtains user according to user current location real-time perfoming map match Trace information.User trajectory information refers to for the user location and road network that user is obtained during traveling by map match Volume of data with relationship.It, can be according to the use for each user for thering is map match to request in map matching process The current location at family obtains corresponding user trajectory information in real time, then will obtain a large amount of data, example for a large number of users Not only include a large amount of operations such as peak period 500,000 tracks of real-time matching per second, system also need cache user track and Matched multipath information helps to match, and to prevent cache information beyond machine limit, needs to fail to old user trajectory It eliminates, with releasing memory space.
The corresponding index information of the user trajectory information is stored in the cache table for enlivening state by S320, wherein At least three cache tables are set to store index information, at least three cache table interval setting time enliven state, wait delete Except state and delete state between carry out rotation.
Wherein, cache table is for storing the corresponding index information of user trajectory information.Index information is for indexing in memory User trajectory information, specifically can be pointer.Setting time can clear up demand according to memory and be configured, such as 5 minutes, 10 minutes etc..
Enliven state it is corresponding be any active ues user trajectory, i.e., the user location point that newly enters carries out the rail of map match Mark;What is stored in the cache table for enliven state is the corresponding index information of user trajectory information of any active ues.State to be deleted Corresponding is the user trajectory of the user location point of non-new entrance, these user trajectories will be deleted;In state to be deleted What is stored in cache table is the corresponding index information of user trajectory information that will be deleted.It is to delete that it is corresponding, which to delete state, With the user trajectory of releasing memory, what is stored in the cache table for deleting state is the user trajectory deleted with releasing memory The corresponding index information of information.
Cache table enliven state, state to be deleted and delete state between carry out rotation, sequentially rotation is referred to, specifically according to work Jump state, state to be deleted and the sequence progress rotation for deleting state, for example, three cache tables of setting, cache table 1 is delayed in state is enlivened It deposits table 2 and is in state to be deleted, cache table 3, which is in, deletes state, and after ten minutes, cache table 1 becomes state to be deleted, cache table 2 at interval Become deleting state, cache table 3 becomes active state;It is spaced 10 minutes again, cache table 1 becomes deleting state, and cache table 2 becomes active State, cache table 3 become state to be deleted.
When three cache tables are arranged, state of three cache tables in the same time is different, respectively enliven state, to It deletes state and deletes state.And the state interval setting time of three cache tables carries out sequentially rotation.
When three or more cache tables are arranged, in the same time, a cache table, which is in, enlivens state, at a cache table In deleting state, remaining cache table is in state to be deleted.Likewise, the state interval setting time of each cache table carries out sequentially Rotation.For example, cache table 1, which is in, enlivens state, cache table 2 and 3 be in state to be deleted (sequentially rotation in order to facilitate understanding, this In divide into state A to be deleted and state B to be deleted), cache table 4 be in delete state, interval after ten minutes, cache table 1 becomes wait delete Except state A, cache table 2 becomes state B to be deleted, and cache table 3 becomes deleting state, and cache table 4 becomes active state.
S330 deletes the user trajectory letter of all inactive users in the cache table in the cache table for deleting state Breath.
Wherein, inactive users involved in the cache table in deletion state, that is, currently without progress map match User, user trajectory information can delete, with releasing memory space.Inactive users in the cache table can specifically be passed through Corresponding index information finds corresponding user trajectory information in memory, and deletes the user trajectory information found.
For data cached in memory, triple buffer structures (corresponding three cache tables) or triple above cachings are used Structure (three corresponding or more cache table) carries out map match memory management, avoids data copy relative to dual caching, And the state switching of cache table is almost without time-consuming, therefore the cleaning of legacy data not will cause a large amount of read-write of service and operation Influence in performance, map match performance improve two to three times.
The technical solution of the present embodiment rotates into user trajectory information in row memory by the status wheel of at least three cache tables Dynamic cleaning, reduce memory usage, the memory pressure of map match cluster is decreased obviously, no longer become real-time map Matched bottleneck.It avoids frequently locking release lock simultaneously, reduces CPU fluctuation, rationally utilize cpu resource, improve map match Performance, QPS rise 50%, meet the needs of real-time matching.
In an optional embodiment, S330 includes:
For each user in the cache table for deleting state, the corresponding index of user trajectory information of the user is judged Information whether there is in being currently in the cache table for enlivening state;
If not, determining that the user is inactive users, user's rail of the user in memory is indexed according to index information Mark information is simultaneously deleted;
If so, any active ues are determined that the user is, in all inactive users in the cache table for deleting state After user trajectory information deletion, empty described in the cache table for deleting state.
Wherein, cache table carries out state rotation according to setting time, and the same user is likely to appear in last round of be in It enlivens in the cache table of state, it is also possible to appear in epicycle and be in the cache table for enlivening state, indicate that user is still active at this time, still Map match is being carried out, then the user trajectory information of this user cannot delete.If user does not appear at epicycle In the cache table for enlivening state, indicates that user is currently no longer active, all user trajectory information of the user can be deleted, thus Releasing memory space.In addition, the user trajectory information deletion in all inactive users in the cache table for deleting state is complete Bi Hou, the corresponding index information of any active ues in the table have been transferred to epicycle and are in the cache table for enlivening state, therefore can be with It empties in the cache table for deleting state, to guarantee the storage of the index information of next round.
Present embodiment, in conjunction with current deletion table and active list, judges in deletion table when deleting user trajectory information User it is whether still active currently, if inactive, the user trajectory information can be just deleted, in order to avoid accidentally deleting influences user Figure matching.In addition, emptying the content in deletion table, in time to guarantee the index information storage of next round.
Illustratively, Fig. 4 is the schematic diagram for triple cache tables that the embodiment of the present invention one provides, as shown in figure 4, setting three A cache table is changed to example with three-wheel status wheel, and in state 1, the location point of user 1 enters map match, therefore, 1 rail of user The corresponding index information of mark information is stored in active list.When the state 2 of being switched to, the location point of user 2 enters map match, uses The corresponding index information in family 2 is stored in the active list of epicycle;User 1 continues actively, then the corresponding index information of user 1 (not shown) in the active list of epicycle can be added to.
When the state 3 of being switched to, the location point of user 3 enters map match, and the corresponding index information of user 3 is stored in epicycle Active list in.User 2 is no longer active, and index information only occurs in the table to be deleted of epicycle.If user 1 is no longer living Jump, the index information of user 1 should be in the deletion table (i.e. the active list of state 1) and table to be deleted for appear in simultaneously epicycle (i.e. the active list of state 2 indicates that user 1 is active in state 2), in this case, the trace information of user 1 can be deleted It removes.If user 1 is still active, the corresponding index information of user 1 can be also added in the active list of epicycle (in figure not It shows).
When deleting user trajectory information, the index information for considering whether to store relative users in current active table is also needed, with Exempt from accidentally to delete any active ues track, influences user's map match.
Embodiment two
Fig. 5 is the flow chart of the processing method of user trajectory information provided by Embodiment 2 of the present invention, and the present embodiment is upper On the basis of stating embodiment, the embodiment for deleting user's Invalid path at any time in map matching process is provided.Such as Fig. 5 institute Show, this method specifically includes:
S510, is requested in response to the map match of user, is obtained user trajectory information in real time and is cached.
The corresponding index information of the user trajectory information is stored in the cache table for enlivening state by S520, wherein At least three cache tables are set to store index information, at least three cache table interval setting time enliven state, wait delete Except state and delete state between carry out rotation.
S530 deletes the user trajectory letter of all inactive users in the cache table in the cache table for deleting state Breath.
S540, after the completion of each user's sampled point matching, according to the LS (Link in the user trajectory information Sequence, road sequence) reference count of object determines the Invalid path information of the user, wherein and the LS object is protected It is corresponding with a upper sampled point there is the corresponding LP of current sampling point (Link Sample Point, road sampled point) object State transfer between LS object set is as a result, the LP object indicates the corresponding relationship of sampled point and road.
Wherein, map match is realized based on Viterbi (Viterbi) algorithm, and viterbi algorithm is a kind of Dynamic Programming calculation Method, for finding the most possible hidden state sequence for generating observed events sequence.The primary complete map match of user is It is made of the matching of sampled point one by one.Each sampled point can have the corresponding relationship with road in road network, i.e., each adopt Sampling point corresponds to a LP object.Each sampled point corresponds at least one LS object, and state transfer result includes: the radiation after transfer Probability, transition probability and optimal transfer LS object set;Wherein, radiation probability, which refers to, observes sampled point in present road Probability, transition probability refer to that present road leads to the probability of another road, and in simple terms, LS object can be understood as sampled point The road sequence that may be transferred to.User trajectory information stored in memory includes LP object and LS object.
Reference count is explained as follows: during user's sampled point is matched, if current LS object exists to next Effective transfer of LS object corresponding to sampled point then adds 1 to the reference count of current LS object.Invalid path information refer to The routing information effectively shifted is not present in the currently used track data of user, it can be understood as in user's map matching process The stale data of generation.
S550 deletes the Invalid path information.
It should be noted that user's Invalid path (S540 and S550) is deleted at any time in map matching process, with deletion All user trajectory information (S520 and S530) of inactive users, the two operations do not conflict, and belong to operation arranged side by side, and two Person combines can efficiently eliminate historical data, releasing memory space much sooner.
The technical solution of the present embodiment rotates into user trajectory information in row memory by the status wheel of at least three cache tables Dynamic cleaning, meanwhile, using reference count identification path isolated island (i.e. Invalid path information), in map matching process in real time User's Invalid path is deleted, historical data can be efficiently eliminated much sooner, reduce memory usage, avoid frequently locking Release lock reduces CPU fluctuation, rationally utilizes cpu resource, improves map match performance, meet the needs of real-time matching.
In an optional embodiment, S540 includes: to adjust in the user trajectory information according to preset rules The reference count of LS object;The LP object for determining the reference count LS object for being 0 and its direction, as Invalid path information.
Wherein, the LS object that reference count is 0, there is no effectively turning to LS object corresponding to next sampled point It moves, that is to say, that in subsequent trace information, this LS object is invalid.Because it is adjacent that reference count is related to front and back Two sampled points, therefore when determining Invalid path information according to reference count, the reference count to LS object is needed to adjust Whole, guarantee accurately determines Invalid path information, avoids accidentally deleting valid data, influences the map match of user.Preset rules can To be to carry out positive traversal or reverse traversal for LS object, to be drawn according to effective transfer relationship of neighbouring sample point to adjust With counting.
Further, the reference count of the LS object in the user trajectory information is adjusted according to preset rules, comprising: inverse To the reference count for traversing each LS object in the user trajectory information, the LS object for being 0 for reference count will be with this The reference count that LS object has the preposition LS object effectively shifted subtracts 1.Present embodiment facilitates calculating using reverse traversal, Save the time.
In an optional embodiment, after deleting the Invalid path information, further includes: delete to load and own The pond of LP object.In memory, two ponds are set, and a pond loads all LS objects, another pond loads all LP objects, also It is stored with the corresponding relationship of LS object and LP object (with reference to Fig. 6).After removing Invalid path information, removes and load all LP pairs The pond of elephant, thus, it is possible to largely releasing memory space, and due to that can be closed by the way that LS object is corresponding with LP object System finds corresponding LP object by LS object, therefore the pond to map matching for removing all LP objects of loading will not generate shadow It rings.
The storage of user trajectory information and the deletion of Invalid path information are illustrated below with reference to Fig. 6 to Fig. 8.
P indicates sampled point (Sample Ponit), i.e. user location point, specifically can be GPS positioning point or Wi-Fi is fixed Site, the attribute of sampled point include: longitude, latitude, spot speed, positioning accuracy, angle, linear velocity and line angle degree.
L indicates road (Link), and every road all has unique identification.
LP indicates the corresponding relationship of road in sampled point and road network.It is considered that sampled point corresponds in Viterbi algorithm Observation, road corresponding states, LP class safeguard the matching relationship between observation and state.
LS is the class that result is shifted for each LP object maintenance state.The corresponding LP object of current sampling point is saved in such State between the corresponding LS object set of a upper sampled point shifts result.State transfer result includes: putting after shifting Penetrate probability, transition probability and optimal transfer LS object set.One or more can be saved in optimal transfer LS object set A optimal transfer LS object.When saving an optimal transfer LS object, the radiation probability and transition probability of current LS is straight It connects and is gone out by optimal transfer LS calculation and object;When saving multiple optimal transfer LS objects, need to consider all optimal turns LS object is moved, COMPREHENSIVE CALCULATING obtains the radiation probability and transition probability of current LS.
Wherein, radiation probability, which refers to, observes the probability of observation P in current state L.Transfer includes observation transfer and shape State transfer, observation transfer refer to that the transfer of sampled point, state transfer refer to the transfer between road.It specifically can be by two roads Between most short transit time as the transition probability between two roads.
LTI (Link Transition Information, road transinformation) is to calculate to radiate generally between LS object Rate, transition probability and the method for calculating optimal transfer LS object.
Two ponds are set in memory, load all LS objects and all LP objects respectively.
As shown in fig. 6, three sampled points P1, P2 and P3 involved in the map matching process of certain user.Sampled point P1 is corresponding Two LS objects, the corresponding two LS objects of sampled point P2, the corresponding LS object of sampled point P3.Two LS objects of the second row are not In the presence of the transfer for arriving the corresponding LS object of sampled point P3, it is, two LS objects of the second row are isolated island LS, they are corresponding LP object i.e. isolated island LP, isolated island LS and isolated island LP belong to Invalid path information.
Whenever a LS object exists to when effective transfer of LS object corresponding to next sampled point, to it Reference count adds 1.After the completion of the map match of each sampled point, all LS objects are inversely traversed, when drawing for LS object When with being counted as 0, all reference counts that there is the preposition LS object effectively shifted to the LS object will also subtract 1.Such as Fig. 7 institute Show, effective transfer to next sampled point (P3), reference count 0 is not present in second LS object of the second row.In P3 Map match after the completion of, inversely traverse all LS objects, second LS object reference of the second row is counted as 0, the second row There is effectively transfer with it in first LS object, therefore, the reference count of first LS object of the second row subtracts 1, become 0, because The reference count of two LS objects of this second row is 0.
After the reference count for having adjusted all LS objects, the LS object for being counted as 0 to all references is purged, and by it The LP object that is directed toward be purged, then remove the pond for loading LP.As shown in figure 8, deleting Invalid path after memory cleaning Information releases memory headroom significantly.
Embodiment three
Fig. 9 is the structural schematic diagram of the processing unit for the user trajectory information that the embodiment of the present invention three provides, such as Fig. 9 institute Show, which includes:
Information cache module 910 obtains user trajectory information in real time and goes forward side by side for the map match request in response to user Row caching;
Memory module 920 is indexed, enlivens state for the corresponding index information of the user trajectory information to be stored in be in Cache table in, be provided at least three cache tables to store index information, when at least three cache table interval is set Between enliven state, state to be deleted and delete state between carry out rotation;
Trace information removing module 930, for deleting all non-live in the cache table in the cache table for deleting state The user trajectory information of jump user.
Optionally, the trace information removing module 930 includes:
Judging unit, for judging the user trajectory of the user for each user in the cache table for deleting state The corresponding index information of information whether there is in being currently in the cache table for enlivening state;
Unit is deleted, for if the determination result is NO, determining that the user is inactive users, is believed according to index Breath indexes the user trajectory information of the user in memory and deletes;
Unit is emptied, in the case where the judgment result is yes, determining that the user is any active ues, in deletion state Cache table in all inactive users user trajectory information deletion after, empty described in the caching for deleting state Table.
Optionally, as shown in Figure 10, described device further include:
Invalid information determining module 940, after the completion of the matching of each user's sampled point, according to the user trajectory information In the reference count of road sequence LS object determine the Invalid path information of the user, wherein the LS object is road The state of sampled point LP object shifts as a result, the LP object indicates the corresponding relationship of sampled point and road;
Invalid information removing module 950, for deleting the Invalid path information.
Optionally, the invalid information determining module 940 includes:
Reference count adjustment unit, for adjusting the reference of the LS object in the user trajectory information according to preset rules It counts;
Invalid information determination unit, for determining the LP object of the reference count LS object for being 0 and its direction, as invalid Routing information.
Further, the reference count adjustment unit is specifically used for: inversely traversing each in the user trajectory information To there is preposition LS pairs effectively shifted with the LS object in the reference count of a LS object, the LS object for being 0 for reference count The reference count of elephant subtracts 1.
Further, the invalid information removing module 950 is also used to: after deleting the Invalid path information, being deleted Except the pond for loading all LP objects.
Optionally, described device further include: reference count computing module is used for the needle in user's sampled point matching process To each LS object in the user trajectory information, when the LS object exists to LS object corresponding to next sampled point When effectively shifting, 1 is added to the reference count of the LS object.
Optionally, when three cache tables are arranged, state of three cache tables in the same time is different, respectively living Jump state, state to be deleted and deletion state;When three or more cache tables are arranged, in the same time, a cache table is in active State, a cache table, which is in, deletes state, remaining cache table is in state to be deleted.
The processing unit of user trajectory information provided by the embodiment of the present invention can be performed any embodiment of that present invention and be mentioned The processing method of the user trajectory information of confession has the corresponding functional module of execution method and beneficial effect.Not in the present embodiment In detailed description technical detail, reference can be made to any embodiment of that present invention provide user trajectory information processing method.
Example IV
Present embodiments provide a kind of computer equipment, comprising:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the processing method of the user trajectory information as described in any embodiment of that present invention.
Figure 11 is the structural schematic diagram for the computer equipment that the embodiment of the present invention four provides.Figure 11, which is shown, to be suitable for being used in fact The block diagram of the exemplary computer device 12 of existing embodiment of the present invention.The computer equipment 12 that Figure 11 is shown is only one and shows Example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 11, computer equipment 12 is showed in the form of universal computing device.The component of computer equipment 12 can To include but is not limited to: one or more processor or processing unit 16, system storage 28 connect different system components The bus 18 of (including system storage 28 and processing unit 16).
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Computer equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be by The usable medium that computer equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access Memory (RAM) 30 and/or cache memory 32.Computer equipment 12 may further include it is other it is removable/can not Mobile, volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for reading and writing not Movably, non-volatile magnetic media (Figure 11 do not show, commonly referred to as " hard disk drive ").It, can although being not shown in Figure 11 To provide the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk "), and it is non-volatile to moving Property CD (such as CD-ROM, DVD-ROM or other optical mediums) read and write CD drive.In these cases, each drive Dynamic device can be connected by one or more data media interfaces with bus 18.System storage 28 may include at least one Program product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform this Invent the function of each embodiment.
Program/utility 40 with one group of (at least one) program module 42 can store and store in such as system In device 28, such program module 42 includes but is not limited to operating system, one or more application program, other program modules And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 42 Usually execute the function and/or method in embodiment described in the invention.
Computer equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 Deng) communication, can also be enabled a user to one or more equipment interact with the computer equipment 12 communicate, and/or with make The computer equipment 12 any equipment (such as network interface card, the modulatedemodulate that can be communicated with one or more of the other calculating equipment Adjust device etc.) communication.This communication can be carried out by input/output (I/O) interface 22.Also, computer equipment 12 may be used also To pass through network adapter 20 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network Network, such as internet) communication.As shown in figure 11, network adapter 20 passes through other modules of bus 18 and computer equipment 12 Communication.It should be understood that although not shown in the drawings, other hardware and/or software module, packet can be used in conjunction with computer equipment 12 It includes but is not limited to: microcode, device driver, redundant processing unit, external disk drive array, RAID system, magnetic tape drive Device and data backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and Data processing, such as realize the processing method of user trajectory information provided by the embodiment of the present invention.
Embodiment five
The embodiment of the present invention five provides a kind of computer readable storage medium, is stored thereon with computer program, the journey The processing method of the user trajectory information as described in any embodiment of that present invention is realized when sequence is executed by processor.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (15)

1. a kind of processing method of user trajectory information characterized by comprising
In response to the map match request of user, user trajectory information is obtained in real time and is cached;
The corresponding index information of the user trajectory information is stored in the cache table for enlivening state, is provided at least three A cache table stores index information, and at least three cache table interval setting time enlivening state, state to be deleted and deletion Rotation is carried out between state;
For in the cache table for deleting state, the user trajectory information of all inactive users in the cache table is deleted.
2. the method according to claim 1, wherein deleting the cache table in the cache table for deleting state In all inactive users user trajectory information, comprising:
For each user in the cache table for deleting state, the corresponding index information of user trajectory information of the user is judged With the presence or absence of in being currently in the cache table for enlivening state;
If not, determining that the user is inactive users, believe according to the user trajectory that index information indexes the user in memory It ceases and is deleted;
If so, any active ues are determined that the user is, in the user of all inactive users in the cache table for deleting state After trace information is deleted, empty described in the cache table for deleting state.
3. the method according to claim 1, wherein obtaining user trajectory information in real time and carrying out caching it Afterwards, further includes:
After the completion of each user's sampled point matching, according to the reference count of the road sequence LS object in the user trajectory information Determine the Invalid path information of the user, wherein the LS object is that the state of road sampled point LP object shifts as a result, institute Stating LP object indicates the corresponding relationship of sampled point and road;
Delete the Invalid path information.
4. according to the method described in claim 3, it is characterized in that, according to the reference of the LS object in the user trajectory information Count the Invalid path information for determining the user, comprising:
The reference count of the LS object in the user trajectory information is adjusted according to preset rules;
The LP object for determining the reference count LS object for being 0 and its direction, as Invalid path information.
5. according to the method described in claim 4, it is characterized in that, being adjusted in the user trajectory information according to preset rules The reference count of LS object, comprising:
The reference count for inversely traversing each LS object in the user trajectory information, the LS object for being 0 for reference count, Reference count with the LS object in the presence of the preposition LS object effectively shifted is subtracted 1.
6. according to the method described in claim 3, it is characterized in that, after deleting the Invalid path information, further includes:
Delete the pond for loading all LP objects.
7. according to the method described in claim 3, it is characterized in that, user's sampled point matches, comprising: be directed to the user trajectory Each LS object in information, it is right when the LS object exists to when effective transfer of LS object corresponding to next sampled point The reference count of the LS object adds 1.
8. according to claim 1 to any method in 7, it is characterised in that:
When three cache tables are arranged, state of three cache tables in the same time is different, and respectively enlivens state, to be deleted State and deletion state;
When three or more cache tables are arranged, in the same time, a cache table, which is in, enlivens state, and a cache table, which is in, deletes Except state, remaining cache table is in state to be deleted.
9. a kind of processing unit of user trajectory information characterized by comprising
Information cache module obtains user trajectory information in real time and is cached for the map match request in response to user;
Memory module is indexed, for being stored in the corresponding index information of the user trajectory information in the cache table for enlivening state In, at least three cache tables are provided with to store index information, and at least three cache table interval setting time is active Rotation is carried out between state, state to be deleted and deletion state;
Trace information removing module, for deleting all inactive users in the cache table in the cache table for deleting state User trajectory information.
10. device according to claim 9, which is characterized in that the trace information removing module includes:
Judging unit, for judging the user trajectory information of the user for each user in the cache table for deleting state Corresponding index information whether there is in being currently in the cache table for enlivening state;
Unit is deleted, for if the determination result is NO, inactive users being determined that the user is, according to index information rope It guides to the user trajectory information of the user in memory and deletes;
Unit is emptied, in the case where the judgment result is yes, determining that the user is any active ues, in the slow of deletion state After the user trajectory information deletion for depositing all inactive users in table, empty described in the cache table for deleting state.
11. device according to claim 9, which is characterized in that described device further include:
Invalid information determining module, after the completion of the matching of each user's sampled point, according to the road in the user trajectory information The reference count of road sequence LS object determines the Invalid path information of the user, wherein the LS object is road sampled point The state of LP object shifts as a result, the LP object indicates the corresponding relationship of sampled point and road;
Invalid information removing module, for deleting the Invalid path information.
12. device according to claim 11, which is characterized in that the invalid information determining module includes:
Reference count adjustment unit, based on the reference by adjusting the LS object in the user trajectory information according to preset rules Number;
Invalid information determination unit, for determining the LP object of the reference count LS object for being 0 and its direction, as Invalid path Information.
13. device according to claim 12, which is characterized in that the reference count adjustment unit is specifically used for:
The reference count for inversely traversing each LS object in the user trajectory information, the LS object for being 0 for reference count, Reference count with the LS object in the presence of the preposition LS object effectively shifted is subtracted 1.
14. a kind of computer equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now processing method of the user trajectory information as described in any in claim 1 to 8.
15. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The processing method of the user trajectory information as described in any in claim 1 to 8 is realized when execution.
CN201910294033.4A 2019-04-12 2019-04-12 User track information processing method and device, computer equipment and storage medium Active CN110032671B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910294033.4A CN110032671B (en) 2019-04-12 2019-04-12 User track information processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910294033.4A CN110032671B (en) 2019-04-12 2019-04-12 User track information processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110032671A true CN110032671A (en) 2019-07-19
CN110032671B CN110032671B (en) 2021-06-18

Family

ID=67238128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910294033.4A Active CN110032671B (en) 2019-04-12 2019-04-12 User track information processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110032671B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387169A (en) * 2010-08-26 2012-03-21 阿里巴巴集团控股有限公司 Delete method, system and delete server for distributed cache objects
US20130138667A1 (en) * 2003-11-26 2013-05-30 Loglogic, Inc. System and method for parsing, summarizing and reporting log data
CN103136121A (en) * 2013-03-25 2013-06-05 中国人民解放军国防科学技术大学 Cache management method for solid-state disc
CN106227679A (en) * 2016-07-25 2016-12-14 北京邮电大学 A kind of data buffer storage replacement method and device
CN107391398A (en) * 2016-05-16 2017-11-24 中国科学院微电子研究所 A kind of management method and system in flash cache area
CN108055302A (en) * 2017-12-05 2018-05-18 竞技世界(北京)网络技术有限公司 A kind of image cache processing method, system and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130138667A1 (en) * 2003-11-26 2013-05-30 Loglogic, Inc. System and method for parsing, summarizing and reporting log data
CN102387169A (en) * 2010-08-26 2012-03-21 阿里巴巴集团控股有限公司 Delete method, system and delete server for distributed cache objects
CN103136121A (en) * 2013-03-25 2013-06-05 中国人民解放军国防科学技术大学 Cache management method for solid-state disc
CN107391398A (en) * 2016-05-16 2017-11-24 中国科学院微电子研究所 A kind of management method and system in flash cache area
CN106227679A (en) * 2016-07-25 2016-12-14 北京邮电大学 A kind of data buffer storage replacement method and device
CN108055302A (en) * 2017-12-05 2018-05-18 竞技世界(北京)网络技术有限公司 A kind of image cache processing method, system and server

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JESUNG KIM等: ""TLB Index-Based Tagging for Reducing Data Cache and TLB Energy Consumption"", 《IEEE TRANSACTIONS ON COMPUTERS》 *
谢杰涛等: ""Web 系统高性能本地数据缓存实现机制"", 《计算机应用研究》 *
龚俊等: ""一种集成R树、哈希表和B*树的高效轨迹数据索引方法"", 《测绘学报》 *

Also Published As

Publication number Publication date
CN110032671B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN104516825B (en) Cache memory system and its operating method
US10593110B2 (en) Method and device for computing a path in a game scene
CN106225791B (en) A kind of GPS positioning and road matching method based on grid dividing
CN102693198B (en) DMA (direct memory access) transmission method and system
CN100491918C (en) Two-step multi-path optimization method for central controlled vehicle information system
US8681635B2 (en) Computer-implemented systems and methods for planning a route
CN106969777A (en) Path prediction meanss and path Forecasting Methodology
CN110553658B (en) Navigation path recommendation method, navigation server, computer device and readable medium
CN103853725B (en) A kind of traffic track data noise-reduction method and system
CN109710184B (en) Hierarchical hybrid storage method and system for tile record disk perception
CN106959928B (en) A kind of stream data real-time processing method and system based on multi-level buffer structure
CN106708626A (en) Low power consumption-oriented heterogeneous multi-core shared cache partitioning method
CN113190515B (en) Heterogeneous parallel computing-based urban mass point cloud coordinate transformation method
CN107590226A (en) A kind of map vector rendering intent based on tile
CN108492608A (en) A kind of analysis method and system of the bus passenger flow volume based on cloud model
CN110555432B (en) Method, device, equipment and medium for processing interest points
CN110297787A (en) The method, device and equipment of I/O equipment access memory
CN106156245A (en) Line feature in a kind of electronic chart merges method and device
CN110032671A (en) Processing method, device, computer equipment and the storage medium of user trajectory information
CN103677971B (en) Multithreaded processing system and method
CN109492005A (en) A kind of B+ tree read buffer method and relevant apparatus
CN113124849B (en) Indoor path planning method and device, electronic equipment and storage medium
CN107977450A (en) The analysis integrated application platform of road traffic based on video big data
JP7198473B2 (en) Information processing system, information processing program, information processing apparatus, and information processing method
CN106547488A (en) A kind of hybrid cache management method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant