WO2019041817A1 - 电子围栏分块方法和装置 - Google Patents

电子围栏分块方法和装置 Download PDF

Info

Publication number
WO2019041817A1
WO2019041817A1 PCT/CN2018/082425 CN2018082425W WO2019041817A1 WO 2019041817 A1 WO2019041817 A1 WO 2019041817A1 CN 2018082425 W CN2018082425 W CN 2018082425W WO 2019041817 A1 WO2019041817 A1 WO 2019041817A1
Authority
WO
WIPO (PCT)
Prior art keywords
base point
site
block
vehicle
electronic fence
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.)
Ceased
Application number
PCT/CN2018/082425
Other languages
English (en)
French (fr)
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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to US16/641,947 priority Critical patent/US11421994B2/en
Publication of WO2019041817A1 publication Critical patent/WO2019041817A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/123Traffic control systems for road vehicles indicating the position of vehicles, e.g. scheduled vehicles; Managing passenger vehicles circulating according to a fixed timetable, e.g. buses, trains, trams
    • G08G1/127Traffic control systems for road vehicles indicating the position of vehicles, e.g. scheduled vehicles; Managing passenger vehicles circulating according to a fixed timetable, e.g. buses, trains, trams to a central station ; Indicators in a central station
    • G08G1/13Traffic control systems for road vehicles indicating the position of vehicles, e.g. scheduled vehicles; Managing passenger vehicles circulating according to a fixed timetable, e.g. buses, trains, trams to a central station ; Indicators in a central station the indicator being in the form of a map
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/20Monitoring the location of vehicles belonging to a group, e.g. fleet of vehicles, countable or determined number of vehicles
    • G08G1/207Monitoring the location of vehicles belonging to a group, e.g. fleet of vehicles, countable or determined number of vehicles with respect to certain areas, e.g. forbidden or allowed areas with possible alerting when inside or outside boundaries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]

Definitions

  • the present invention relates to the field of computers, and in particular, to an electronic fence blocking method and apparatus.
  • the vehicle when judging whether the vehicle enters or leaves a certain station, the vehicle needs to upload real-time GPS (Global Positioning System) coordinates, and then the server program determines whether the vehicle enters or leaves the station, and the XOR has crossed.
  • a site There are two approaches to implementation. The first method is to compare the GPS coordinates of the vehicle with the electronic fence information of each site to determine whether it enters or leaves an electronic fence. The second method is to partition the site (by region and province), first map the GPS coordinates of the vehicle to the city, and then traverse all the electronic fences under the city to determine whether it enters or leaves an electronic fence.
  • the first method is to compare the GPS coordinates of the vehicle with the electronic fence information of each site to determine whether it enters or leaves an electronic fence.
  • the second method is to partition the site (by region and province), first map the GPS coordinates of the vehicle to the city, and then traverse all the electronic fences under the city to determine whether it enters or leaves an electronic fence.
  • each traversal complexity is O(n) (used to represent the time complexity and space complexity of the algorithm), and consumes a large number of Central Processing Units (CPUs). time.
  • each province and city is too rigid, and the number of sites covered in each region is not scalable.
  • an embodiment of the present invention provides an electronic fence blocking method and apparatus.
  • the coordinate system of the plane map is divided into blocks, and the site and the vehicle position are respectively mapped to the base points corresponding to the block according to the same rule, and the site where the vehicle may appear is determined through the base point, and then the vehicle position information may appear.
  • the electronic fence information of the site is compared to determine the entry or exit of the vehicle.
  • an electronic fence blocking method is provided.
  • An electronic fence blocking method includes: dividing a coordinate system of a planar map into blocks, and taking a vertex of the same direction in each of the blocks as a base point; and classifying the site to a block corresponding to the block according to a predetermined rule.
  • the vehicle location is mapped to a base point corresponding to the block in which the block is located, the site included in the base point is a site where the vehicle may appear; and an electronic fence of the site where the vehicle may appear is acquired.
  • the information compares the vehicle location information with the electronic fence information of the site where the vehicle may appear to determine whether the vehicle enters or leaves the site.
  • the base point is an upper right corner vertex of the partition; the abscissa of the coordinate system is longitude, and the ordinate is latitude; and the predetermined rule is: a rule of increasing longitude and increasing latitude.
  • the site is summarized according to a predetermined rule to the base point corresponding to the block in which it is located, including: converting all coordinates in each of the blocks into the points according to a predetermined rule by using a f(x, y) function.
  • the f(x, y) function is mapped to the base point corresponding to the block in which it is located; the base point coordinates and the electronic fence information of all stations included in the base point are stored.
  • storing the base point coordinates and the electronic fence information of all the sites included in the base point including: using the base point coordinates as a key, and storing the electronic fence information of all sites included in the base point as a value, and storing In the server.
  • mapping the vehicle location to the base point corresponding to the block in which it is located according to the predetermined rule comprises: mapping the vehicle location to the corresponding to the block in which the block is located via the f(x, y) function Base point.
  • the coordinate system of the plane map is divided into blocks, including: when the total number of stations in the block exceeds a preset multiple of the number of base points, each of the blocks is divided again.
  • the coordinate system of the plane map is divided into blocks, including: when the total number of stations in the block exceeds 4 times the number of base points, the corresponding blocks are equally divided into four blocks.
  • an electronic fence blocking device is provided.
  • An electronic fence blocking device includes: a coordinate system blocking unit, configured to divide a coordinate system of a planar map into blocks, and take a vertex in the same direction of each block as a base point; And the vehicle location mapping unit is configured to map the vehicle location to the base point corresponding to the block in which the block is located according to the predetermined rule, where the base point includes All stations are stations that may appear in the vehicle; the determining unit is configured to acquire electronic fence information of the station where the vehicle may appear, and compare the vehicle position information with the electronic fence information of the station where the vehicle may appear to determine Whether the vehicle enters or leaves the site.
  • the base point is an upper right corner vertex of the partition;
  • the horizontal coordinate of the coordinate system is longitude, and the vertical coordinate is latitude;
  • the predetermined rule is: a rule of increasing longitude and increasing latitude.
  • the station induction unit is further configured to: convert all coordinates in each of the partitions into a base point coordinate corresponding to the block according to a predetermined rule by using an f(x, y) function; wherein, adjacent All coordinates of the common edges of the two partitions are converted into base point coordinates corresponding to the two partitions, x is longitude, and y is latitude; the electronic fence information of the site is passed through the f(x, y) function Mapping to the base point corresponding to the block in which it is located; storing the base point coordinates and the electronic fence information of all stations included in the base point.
  • the station induction unit is further configured to: use the base point coordinates as a key, and store the electronic fence information of all sites included in the base point as a value in a server.
  • the vehicle location mapping unit is further configured to map the vehicle location to the base point corresponding to the block in which the vehicle is located via the f(x, y) function.
  • the coordinate system blocking unit is further configured to: when the total number of stations in the partition exceeds a preset multiple of the number of base points, divide each of the partitions into blocks again.
  • the coordinate system blocking unit is further configured to: when the total number of stations in the partition exceeds 4 times the number of base points, divide the corresponding partition into four blocks.
  • an electronic device is provided.
  • An electronic device includes: one or more processors; and storage means for storing one or more programs, when the one or more programs are executed by the one or more processors, The one or more processors are caused to implement an electronic fence blocking method of an embodiment of the present invention.
  • a computer readable medium is provided.
  • a computer readable medium of an embodiment of the present invention wherein a computer program is stored thereon, and the program is executed by a processor to implement an electronic fence blocking method according to an embodiment of the present invention.
  • One embodiment of the above invention has the advantage or benefit that by mapping the coordinate system, mapping the site and the vehicle location to the base point corresponding to the block, and then the vehicle location information and the electronic fence information of the site that may appear
  • the comparison is performed to determine the entry and exit of the vehicle, and the calculation time for judging the entry and exit of the vehicle is reduced, and the time complexity of the judgment program is reduced from approaching O(n) to approaching O(1);
  • the embodiment of the present invention only The vehicle location information needs to be compared with the electronic fence information of the possible sites, and the high-frequency network access cache server or the database server is not required to obtain the full amount of data, thereby reducing the occupation of the hard disk read resources;
  • each block is again partitioned, which solves the problem of low hash efficiency caused by uneven distribution of the site, and takes into account the efficiency and accuracy of the judgment.
  • FIG. 1 is a schematic diagram of main steps of an electronic fence blocking method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram showing a location of a station when no block is performed according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a location of a station after fragmentation according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of vehicle location mapping according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of main units of an electronic fence blocking device according to an embodiment of the present invention.
  • FIG. 6 is an exemplary system architecture diagram to which an embodiment of the present invention may be applied.
  • FIG. 7 is a schematic structural diagram of a computer apparatus suitable for implementing an electronic device according to an embodiment of the present invention.
  • the electronic fence in the embodiment of the present invention refers to the coverage area of the site circled on the map.
  • the electronic fence is generally a circular area, and may also be a square, a polygon, or the like.
  • the site includes a distribution station and a sorting center.
  • the electronic fence blocking method of the embodiment of the present invention has been put into trial use in the Jingdong transportation platform, and the effect is remarkable.
  • FIG. 1 is a schematic diagram of the main steps of an electronic fence blocking method in accordance with an embodiment of the present invention.
  • the electronic fence blocking method of the embodiment of the present invention mainly includes the following steps:
  • Step S101 The coordinate system of the plane map is divided into blocks, and one vertex of the same direction of each block is taken as a base point.
  • the coordinate system is divided into blocks, which are used to aggregate the scattered sites together, and the shape and size of each block can be customized.
  • the horizontal and vertical coordinates of the coordinate system are longitude and latitude, respectively, and the coordinate system is evenly divided into rectangular blocks from the horizontal and vertical directions, and the vertices of the upper right corner of the rectangular block are used as the base points.
  • Step S102 The site is summarized according to a predetermined rule to the base point corresponding to the block in which it is located. As long as the electronic fence of the site overlaps with the corresponding block of the base point, the site will be stored and stored by the base point.
  • the predetermined rule is a rule with increased longitude and increased latitude.
  • the irregular site distribution is mapped to the base point, and the mapped site distribution is stored by a key-value (key value) server.
  • key is the coordinate of each base point
  • value is the electronic fence information of all the sites included in the base point
  • the electronic fence information includes the central coordinates of the electronic fence, the service code and name of the electronic fence, and the like.
  • Step S103 Map the vehicle location to the base point corresponding to the block in which the block is located according to the predetermined rule, and all the sites included in the base point are sites where the vehicle may appear.
  • the vehicle location is mapped using the same rules as the site segmentation, which is also mapped to the base point. Then, the vehicle may only be in the electronic fence of the site contained at the base point.
  • Step S104 Acquire electronic fence information of the site where the vehicle may appear, compare the vehicle location information with the electronic fence information of the site where the vehicle may appear, to determine whether the vehicle enters or leaves the site.
  • the embodiment of the invention only needs to obtain the electronic fence information of the site where the vehicle may appear, reduces the pressure of acquiring the electronic fence information of all the sites to the database server and the cache server, and saves the network transmission resource.
  • the judgment range of the site is reasonably narrowed, and when the number of sites in the partition is appropriate, the time for judging whether the vehicle enters or leaves the electronic fence of the site is determined.
  • the complexity is almost constant.
  • the vehicle location information is location information of the vehicle at any location, such as the GPS coordinates of the vehicle.
  • step S102 the site is summarized according to a predetermined rule to the base point corresponding to the block in which it is located, and the specific implementation process includes:
  • Step S1021 Convert all coordinates in each of the partitions into base point coordinates corresponding to the block according to a predetermined rule by using a f(x, y) function; wherein all coordinates of the common side of the adjacent two blocks Converted to the coordinates of the base points corresponding to the two partitions, x is longitude and y is latitude.
  • This step uses a point instead of a face.
  • the number of coordinates that a block may contain is infinite. After all the coordinates of the block are calculated by the f(x, y) function, an infinite number of coordinates are converted into a base point coordinate. .
  • Step S1022 Mapping the electronic fence information of the site to the base point corresponding to the block in which the block is located according to the f(x, y) function; in the embodiment of the present invention, the electronic fence of the site is a circular area, and the site is The center coordinate of the circle is mapped to the base point corresponding to the block where it is located by the f(x, y) function to find out which base point the center coordinate of the station belongs to.
  • Step S1023 Store the base point coordinates and the electronic fence information of all the sites included in the base point. After mapping the site to the base point, the base point coordinates and the electronic fence information of all the sites included in the base point are saved in the form of a key-value.
  • step S103 includes: mapping a vehicle location to the base point corresponding to the block in which the vehicle is located via the f(x, y) function.
  • the vehicle may only be in the electronic fence contained in the base point.
  • dynamic block processing may be performed, specifically: when the total number of stations in the block exceeds a preset multiple of the number of base points, each of the points is divided. The block is again chunked.
  • the sites in one partition become too dense.
  • mapping by f(x, y) function the number of sites corresponding to one base point is too high, that is, the value of one key corresponds to too much. Then the value found by the key is too much.
  • the ideal hash is one-to-one. If you need to traverse to find the value, the hash efficiency will be reduced and the algorithm will lose its advantage.
  • the electronic fence blocking method of the embodiment of the present invention adopts a dynamic blocking method to re-block all sites to make the number of sites in the partition more balanced.
  • the block design is re-blocked, and the horizontal and vertical dicing density of the coordinate system are doubled, that is, the original one block. It is evenly divided into four pieces.
  • the preset multiple and the number of re-blocking can be customized.
  • a block is subdivided into four blocks in order to distribute the site to the base point relatively evenly. Medium, reducing computational complexity.
  • the initial state of the whole map is a block, and a block corresponds to a base point, that is, the upper right vertex of the block.
  • the number of sites exceeds 16 (that is, when the 17th site is added), the number of sites exceeds 4 times the number of base points (17>4*4). At this time, it needs to be re-blocked, and 4 blocks are Cut into 16 blocks.
  • FIG. 2 is a schematic diagram of a station location when no block is being used according to an embodiment of the present invention.
  • the abscissa is the longitude and the ordinate is the latitude; the coordinate system is divided by the dotted line, and the A, B, C, D, E and F bits are the intersections of the horizontal and vertical dashed lines, which are called the base points; the black circles are The electronic fence of the site, using 1 to 5 in the figure, represents 5 sites.
  • the site 3 is on a horizontal dashed line and the site 5 is at the intersection of the horizontal and vertical dashed lines.
  • FIG. 3 is a schematic diagram of a location of a station after fragmentation according to an embodiment of the present invention.
  • the random stations 1 to 5 in the coordinate system are summarized to the base points A to F in accordance with the principle that the longitude increases and the latitude increases (i.e., the abscissa increases and the ordinate increases).
  • the electronic fence of the site 1 overlaps with the block corresponding to the base point A, then the site 1 is summarized to the base point A; the electronic fence of the site 2 overlaps with the block corresponding to the base point A, and the site 2 is also summarized.
  • the station 4 is summarized to the base point B; the electronic fence of the station 3 overlaps with the two partitions corresponding to the base point A and the base point B, Then the two base points will contain the electronic fence information of the site 3; the electronic fence of the site 5 overlaps with the four blocks corresponding to the base point B, the base point C, the base point E and the base point F, then the four base points will accommodate the site. 5 electronic fence information.
  • FIG. 4 is a schematic diagram of vehicle location mapping in accordance with an embodiment of the present invention.
  • the vehicle position is mapped to the base point using the same rules as the site partitioning, that is, the principle of increasing longitude and increasing latitude.
  • the vehicle may only appear in the station 3, the station 4 and the station 5 (compared with Figure 2 to be verified).
  • the site and the vehicle location are mapped to the base point corresponding to the block, and then the vehicle location information and the electronic fence of the possible site are obtained.
  • the information is compared to determine the entry and exit of the vehicle, reducing the calculation time for judging the entry and exit of the vehicle, and reducing the time complexity of the judgment procedure from approaching O(n) to approaching O(1);
  • embodiments of the present invention Simply compare the vehicle location information with the electronic fence information of the site that may appear, without having to access the cache server or the database server through the high-frequency network to obtain the full amount of data, reducing the occupation of the hard disk read resources; dynamic partitioning, When the total number of stations in the block exceeds the preset multiple of the number of base points, each block is divided again, which solves the problem of low hash efficiency caused by uneven distribution of the site, and takes into account the efficiency and accuracy of the judgment.
  • FIG. 5 is a schematic illustration of the main elements of an electronic fence blocking device in accordance with an embodiment of the present invention.
  • the electronic fence blocking device of the embodiment of the present invention includes:
  • the coordinate system blocking unit 501 is configured to divide the coordinate system of the plane map into blocks, and take one vertex of the same direction in each of the blocks as a base point.
  • the coordinate system is divided into blocks, which are used to aggregate the scattered sites together, and the shape and size of each block can be customized.
  • the coordinate system of the embodiment of the present invention is divided.
  • the block unit 501 adopts a dynamic block mode, and when the total number of stations in the block exceeds a preset multiple of the number of base points, each of the blocks is divided again.
  • the site induction unit 502 is configured to summarize the site to the base point corresponding to the block in which it is located according to a predetermined rule. As long as the electronic fence of the site overlaps with the corresponding block of the base point, the site will be stored and stored by the base point.
  • the vehicle location mapping unit 503 is configured to map the vehicle location to the base point corresponding to the block in which the block is located according to the predetermined rule, and all the sites included in the base point are sites where the vehicle may appear.
  • the vehicle location is mapped using the same rules as the site segmentation, which is also mapped to the base point. Then, the vehicle may only be in the electronic fence of the site contained at the base point.
  • the determining unit 504 is configured to acquire electronic fence information of the site where the vehicle may appear, compare the vehicle location information with the electronic fence information of the site where the vehicle may appear, to determine whether the vehicle enters or leaves the site. By comparing the vehicle location information with the electronic fence information of the site where the vehicle may appear, the judgment range of the site is reasonably reduced.
  • the vehicle is judged.
  • the entry and exit reduces the calculation time for judging the vehicle entering and leaving, and reduces the time complexity of the judgment program from approaching O(n) to approaching O(1); the embodiment of the present invention only needs to locate the vehicle position information.
  • the electronic fence information of the existing sites is compared, and the high-frequency network access cache server or database server is not required to obtain the full amount of data, which reduces the occupation of the hard disk read resources; dynamic partitioning, when the total number of sites in the partition exceeds When the preset multiple of the number of base points is used, each block is divided into blocks again, which solves the problem of low hash efficiency caused by uneven distribution of the site, and takes into account the efficiency and accuracy of the judgment.
  • FIG. 6 illustrates an exemplary system architecture 600 of an electronic fence blocking method or an electronic fence blocking device to which embodiments of the present invention may be applied.
  • system architecture 600 can include terminal devices 601, 602, 603, network 604, and server 605.
  • Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605.
  • Network 604 can include various types of connections, such as wired, wireless communication links, fiber optic cables, and the like.
  • the user can interact with the server 605 via the network 604 using the terminal devices 601, 602, 603 to receive or send messages and the like.
  • Various communication client applications such as a shopping application, a web browser application, a search application, an instant communication tool, a mailbox client, a social platform software, and the like can be installed on the terminal devices 601, 602, and 603 (for example only).
  • the terminal devices 601, 602, 603 can be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop portable computers, desktop computers, and the like.
  • the server 605 may be a server that provides various services, such as a background management server (for example only) that provides support for a shopping site browsed by the user using the terminal devices 601, 602, 603.
  • the background management server may analyze and process data such as the received product information query request, and feed back the processing result (for example, target push information, product information--only examples) to the terminal device.
  • the electronic fence blocking method provided by the embodiment of the present application is generally performed by the server 605. Accordingly, the electronic fence blocking device is generally disposed in the server 605.
  • terminal devices, networks, and servers in FIG. 6 is merely illustrative. Depending on the implementation needs, there can be any number of terminal devices, networks, and servers.
  • the invention also provides an electronic device and a computer readable medium.
  • An electronic device of the present invention includes: one or more processors; storage means for storing one or more programs, when the one or more programs are executed by the one or more processors, such that the one or A plurality of processors implement an electronic fence blocking method of an embodiment of the present invention.
  • the computer readable medium of the present invention has stored thereon a computer program, and when the program is executed by the processor, an electronic fence blocking method of an embodiment of the present invention is implemented.
  • FIG. 7 a block diagram of a computer system 700 suitable for use in implementing an electronic device in accordance with an embodiment of the present invention is shown.
  • the electronic device shown in FIG. 7 is merely an example and should not impose any limitation on the function and scope of use of the embodiments of the present invention.
  • computer system 700 includes a central processing unit (CPU) 701 that can be loaded into a program in random access memory (RAM) 703 according to a program stored in read only memory (ROM) 702 or from storage portion 708. And perform various appropriate actions and processes.
  • RAM random access memory
  • ROM read only memory
  • RAM 703 various programs and data required for the operation of the computer system 700 are also stored.
  • the CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also coupled to bus 704.
  • the following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker; a storage portion 708 including a hard disk or the like And a communication portion 709 including a network interface card such as a LAN card, a modem, or the like.
  • the communication section 709 performs communication processing via a network such as the Internet.
  • Driver 710 is also connected to I/O interface 705 as needed.
  • a removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like, is mounted on the drive 710 as needed so that a computer program read therefrom is installed into the storage portion 708 as needed.
  • an embodiment of the present disclosure includes a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the method shown in the main step diagram.
  • the computer program can be downloaded and installed from the network via communication portion 709, and/or installed from removable media 711.
  • the central processing unit (CPU) 701 the above-described functions defined in the system of the present invention are performed.
  • the computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium or any combination of the two.
  • the computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer readable storage medium may be any tangible medium that can contain or store a program, which can be used by or in connection with an instruction execution system, apparatus or device.
  • a computer readable signal medium may include a data signal that is propagated in the baseband or as part of a carrier, in which computer readable program code is carried. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer readable signal medium can also be any computer readable medium other than a computer readable storage medium, which can transmit, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device.
  • Program code embodied on a computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
  • each block of the flowchart or block diagram can represent a unit, a program segment, or a portion of a code that comprises one or more Executable instructions.
  • the functions noted in the blocks may also occur in a different order than that illustrated in the drawings. For example, two successively represented blocks may in fact be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams or flowcharts, and combinations of blocks in the block diagrams or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be used A combination of dedicated hardware and computer instructions is implemented.
  • the units involved in the embodiments of the present invention may be implemented by software or by hardware.
  • the described unit may also be provided in the processor, for example, as a processor including a coordinate system blocking unit, a station induction unit, a vehicle position mapping unit, and a determination unit.
  • the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the coordinate system block unit may also be described as "used to group the coordinate system of the plane map into blocks. A vertex of the same direction is used as a unit of the base point.”
  • the present invention also provides a computer readable medium, which may be included in the apparatus described in the above embodiments, or may be separately present and not incorporated in the apparatus.
  • the computer readable medium carries one or more programs.
  • the device includes: dividing the coordinate system of the plane map into blocks, and taking the blocks in the same direction.
  • the site is summarized according to a predetermined rule to a base point corresponding to the block in which it is located; the vehicle position is mapped to a base point corresponding to the block in which the block is located according to the predetermined rule, and all sites included in the base point are a site where the vehicle may appear; obtaining electronic fence information of the site where the vehicle may appear, comparing the vehicle location information with electronic fence information of the site where the vehicle may appear to determine whether the vehicle enters or leaves the site.
  • the vehicle is judged.
  • the entry and exit reduces the calculation time for judging the vehicle entering and leaving, and reduces the time complexity of the judgment program from approaching O(n) to approaching O(1); the embodiment of the present invention only needs to locate the vehicle position information.
  • the electronic fence information of the existing sites is compared, and the high-frequency network access cache server or database server is not required to obtain the full amount of data, which reduces the occupation of the hard disk read resources; dynamic partitioning, when the total number of sites in the partition exceeds When the preset multiple of the number of base points is used, each block is divided into blocks again, which solves the problem of low hash efficiency caused by uneven distribution of the site, and takes into account the efficiency and accuracy of the judgment.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Traffic Control Systems (AREA)

Abstract

一种电子围栏分块方法和装置,涉及计算机技术领域。所述方法包括:将平面地图的坐标系分块,取各分块同一方向的一个顶点作为基点(S101);按照预定规则将站点归纳到其所在分块对应的基点上(S102);按照预定规则将车辆位置映射到其所在分块对应的基点上,基点包含的所有站点为车辆可能出现的站点(S103);获取车辆可能出现的站点的电子围栏信息,将车辆位置信息与车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开站点(S104)。通过将平面地图的坐标系分块,将车辆位置信息与可能出现的站点的电子围栏信息进行比对,降低了判断程序的时间复杂度,同时降低了对硬盘读取资源的占用。

Description

电子围栏分块方法和装置 技术领域
本发明涉及计算机领域,尤其涉及一种电子围栏分块方法和装置。
背景技术
随着互联网时代的兴起,各公司的运输业务也随之井喷式扩展。以京东运输为例,从起初只有七大区的干线运输,到现在的支线、传站、摆渡运输,大大小小的站点总共发展到几万个,并且随着业务的扩展,站点的布局越来越密集,站点数量也越来越多。要覆盖全国或全世界的配送,需要几十万甚至几百万的站点,数据量巨大。
现有技术在判断车辆是否进入或者离开某站点时,需由车辆上传实时GPS(Global Positioning System,全球定位系统)坐标,再由服务器程序判断,车辆是否进入或者离开了站点,异或是穿越了某个站点。在具体实现上,有两种做法。第一种做法是:将车辆的GPS坐标与每个站点的电子围栏信息进行比较,判断其是否进入或者离开某一个电子围栏。第二种做法是:将站点分区(以区域、省份划分),先将车辆的GPS坐标映射到城市,再遍历该城市下的所有电子围栏,判断其是否进入或者离开某一个电子围栏。
在实现本发明过程中,发明人发现现有技术中至少存在如下问题:
(1)如果站点的电子围栏信息过多,每次遍历复杂度为O(n)(用来表示算法的时间复杂度和空间复杂度),消耗中央处理器(Central Processing Unit,CPU)大量的时间。
(2)由于站点的电子围栏信息保存在缓存或者数据库中,高频访问站点的电子围栏信息会占用大量的硬盘读取资源。
(3)针对第二种做法,需要判断车辆的GPS坐标在哪个省或哪个市,会带来第三方接口额外消耗。
(4)针对第二种做法,每个省市划分过于死板,每个区域涵盖的 站点数量不具备伸缩性。
发明内容
有鉴于此,本发明实施例提供一种电子围栏分块方法和装置。本发明实施例中将平面地图的坐标系分块,将站点和车辆位置按照同一规则分别映射到所在分块对应的基点中,通过基点确定车辆可能出现的站点,再将车辆位置信息与可能出现的站点的电子围栏信息进行比对,以判断车辆的进入或者离开。通过上述方法降低了判断程序的时间复杂度,同时降低了对硬盘读取资源的占用。
为实现上述目的,根据本发明实施例的一个方面,提供了一种电子围栏分块方法。
本发明实施例的一种电子围栏分块方法,包括:将平面地图的坐标系分块,取各所述分块同一方向的一个顶点作为基点;按照预定规则将站点归纳到其所在分块对应的基点上;按照所述预定规则将车辆位置映射到其所在分块对应的基点上,所述基点包含的所有站点为所述车辆可能出现的站点;获取所述车辆可能出现的站点的电子围栏信息,将车辆位置信息与所述车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开所述站点。
可选地,所述基点为所述分块的右上角顶点;所述坐标系的横坐标为经度,纵坐标为纬度;所述预定规则为:经度增大且纬度增大的规则。
可选地,按照预定规则将站点归纳到其所在分块对应的所述基点上,包括:使用f(x,y)函数将各所述分块内的所有坐标按照预定规则转换为所述分块对应的基点坐标;其中,相邻的两个分块的公共边的所有坐标转换为所述两个分块对应的基点坐标,x为经度,y为纬度;将所述站点的电子围栏信息经所述f(x,y)函数映射到其所在分块对应的所 述基点上;将所述基点坐标和所述基点包含的所有站点的电子围栏信息进行存储。
可选地,将所述基点坐标和所述基点包含的所有站点的电子围栏信息进行存储,包括:将所述基点坐标作为键,将所述基点包含的所有站点的电子围栏信息作为值,存储在服务器中。
可选地,按照所述预定规则将车辆位置映射到其所在分块对应的所述基点上,包括:将车辆位置经所述f(x,y)函数映射到其所在分块对应的所述基点上。
可选地,将平面地图的坐标系分成分块,包括:当所述分块中的站点总数量超过基点数量的预设倍数时,把各所述分块再次分块。
可选地,将平面地图的坐标系分成分块,包括:当所述分块中的站点总数量超过基点数量的4倍时,将相应的分块均分为四块。
为实现上述目的,根据本发明实施例的另一方面,提供了一种电子围栏分块装置。
本发明实施例的一种电子围栏分块装置,包括:坐标系分块单元,用于将平面地图的坐标系分成分块,取各所述分块同一方向的一个顶点作为基点;站点归纳单元,用于按照预定规则将站点归纳到其所在分块对应的基点上;车辆位置映射单元,用于按照所述预定规则将车辆位置映射到其所在分块对应的基点上,所述基点包含的所有站点为所述车辆可能出现的站点;判断单元,用于获取所述车辆可能出现的站点的电子围栏信息,将车辆位置信息与所述车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开所述站点。
可选地,所述基点为所述分块的右上角顶点;所述坐标系的横坐 标为经度,纵坐标为纬度;所述预定规则为:经度增大且纬度增大的规则。
可选地,所述站点归纳单元,还用于:使用f(x,y)函数将各所述分块内的所有坐标按照预定规则转换为所述分块对应的基点坐标;其中,相邻的两个分块的公共边的所有坐标转换为所述两个分块对应的基点坐标,x为经度,y为纬度;将所述站点的电子围栏信息经所述f(x,y)函数映射到其所在分块对应的所述基点上;将所述基点坐标和所述基点包含的所有站点的电子围栏信息进行存储。
可选地,所述站点归纳单元,还用于:将所述基点坐标作为键,将所述基点包含的所有站点的电子围栏信息作为值,存储在服务器中。
可选地,所述车辆位置映射单元,还用于:将车辆位置经所述f(x,y)函数映射到其所在分块对应的所述基点上。
可选地,所述坐标系分块单元,还用于:当所述分块中的站点总数量超过基点数量的预设倍数时,把各所述分块再次分块。
可选地,所述坐标系分块单元,还用于:当所述分块中的站点总数量超过基点数量的4倍时,把相应的分块均分为四块。
为实现上述目的,根据本发明实施例的再一方面,提供了一种电子设备。
本发明实施例的一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明实施例的一种电子围栏分块方法。
为实现上述目的,根据本发明实施例的再一方面,提供了一种计算机可读介质。
本发明实施例的一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现本发明实施例的一种电子围栏分块方法。
上述发明中的一个实施例具有如下优点或有益效果:通过将坐标系分块,将站点和车辆位置映射到所在分块对应的基点中,再将车辆位置信息与可能出现的站点的电子围栏信息进行比对,来判断车辆的进入离开,降低了判断车辆进入离开的计算时间,将判断程序的时间复杂度由趋近O(n)降到趋近O(1);本发明的实施例只需将车辆位置信息与可能出现的站点的电子围栏信息进行比对,无需通过高频的网络访问缓存服务器或数据库服务器来获取全量数据,降低了对硬盘读取资源的占用;动态分块,当分块中的站点总数量超过基点数量的预设倍数时,把各分块再次分块,解决了站点分布不均带来的哈希效率低的问题,兼顾了判断的效率与准确率。
上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。
附图说明
附图用于更好地理解本发明,不构成对本发明的不当限定。其中:
图1是根据本发明实施例的电子围栏分块方法的主要步骤的示意图;
图2是根据本发明实施例的未分块时的站点位置示意图;
图3是根据本发明实施例的分块后的站点位置示意图;
图4是根据本发明实施例的车辆位置映射示意图;
图5是根据本发明实施例的电子围栏分块装置的主要单元的示意图;
图6是本发明实施例可以应用于其中的示例性系统架构图;
图7是适用于来实现本发明实施例的电子设备的计算机装置的结构示意图。
具体实施方式
以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
本发明实施例中的电子围栏是指在地图上圈定的站点的覆盖区域。电子围栏一般为圆形区域,也可以是方形、多边形等。站点包括配送站和分拣中心。本发明实施例的电子围栏分块方法已经在京东运输平台中已经开始试用,效果显著。
图1是根据本发明实施例的电子围栏分块方法的主要步骤的示意图。如图1所示,本发明实施例的电子围栏分块方法,主要包括如下步骤:
步骤S101:将平面地图的坐标系分块,取各所述分块同一方向的一个顶点作为基点。将坐标系分块,该分块用来将分散的站点聚集到一起存储,各分块的形状和大小可以自定义。本发明的实施例中坐标系的横纵坐标分别为经度和纬度,将坐标系从横纵方向上均匀切分为矩形块,以矩形块的右上角的顶点作为基点。
步骤S102:按照预定规则将站点归纳到其所在分块对应的基点上。只要站点的电子围栏与基点所对应的分块有重叠,该站点都会被该基点收纳存储。本发明的实施例中预定规则为经度增大且纬度增大的规则,按照该规则将不规则的站点分布映射到基点上,并用key-value(键 值)服务器存储映射后的站点分布。其中,key为每个基点的坐标,value为该基点包含的所有站点的电子围栏信息,所述电子围栏信息包括电子围栏的中心坐标、电子围栏的业务编码和名称等。
步骤S103:按照所述预定规则将车辆位置映射到其所在分块对应的基点上,所述基点包含的所有站点为所述车辆可能出现的站点。使用与站点分块相同的规则,对车辆位置进行映射,该车辆位置也会被映射到基点上。那么,该车辆只可能在该基点包含的站点的电子围栏之中。
步骤S104:获取所述车辆可能出现的站点的电子围栏信息,将车辆位置信息与所述车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开所述站点。本发明的实施例只需获取车辆可能出现的站点的电子围栏信息,降低了获取所有站点的电子围栏信息给数据库服务器、缓存服务器带来的压力,也节省了网络传输资源。通过将车辆位置信息与车辆可能出现的站点的电子围栏信息进行比对,合理的缩小了站点的判断范围,当分块中站点数量合适时,判断车辆是否进入或者离开站点的电子围栏的程序的时间复杂度几乎达到常数级别。其中,车辆位置信息为车辆在任何位置的定位信息,比如可以是车辆的GPS坐标。
其中,步骤S102中按照预定规则将站点归纳到其所在分块对应的基点上,具体实现过程包括:
步骤S1021:使用f(x,y)函数将各所述分块内的所有坐标按照预定规则转换为所述分块对应的基点坐标;其中,相邻的两个分块的公共边的所有坐标转换为所述两个分块对应的基点坐标,x为经度,y为纬度。该步骤使用一个点代替了一个面,一个分块可能包含的坐标数量是无穷的,将该分块的所有坐标经过f(x,y)函数计算后,将无穷数量的坐标转换成一个基点坐标。
步骤S1022:将所述站点的电子围栏信息经所述f(x,y)函数映射到其所在分块对应的所述基点上;本发明实施例中站点的电子围栏为圆形区域,将站点的圆心坐标经f(x,y)函数映射其所在分块对应的基点上,以此找到站点的圆心坐标属于哪个基点。
步骤S1023:将所述基点坐标和所述基点包含的所有站点的电子围栏信息进行存储。将站点映射在基点后,以key-value的形式保存基点坐标和该基点包含的所有站点的电子围栏信息。
其中,步骤S103的具体实现过程包括:将车辆位置经所述f(x,y)函数映射到其所在分块对应的所述基点上。车辆只可能在该基点包含的电子围栏之中。
另外,步骤S101中将平面地图的坐标系进行分块时,可以进行动态分块处理,具体包括:当所述分块中的站点总数量超过基点数量的预设倍数时,把各所述分块再次分块。当站点数量逐渐增加时,一个分块中的站点会变得过于密集,经f(x,y)函数映射后,一个基点对应的站点数量就会过高,即一个key对应的value过多。那么使用key查找到的value就过多,理想的哈希是一对一的,需要遍历查找到value,会使哈希效率降低,算法失去优势。因此本发明实施例的电子围栏分块方法采取了动态分块的方式,将所有站点重新分块,使分块中的站点数量更均衡。本发明实施例中设定当所述分块中的站点总数量超过基点数量的4倍时,重新分块规划,将坐标系的横纵切分密度各增加一倍,即原来的一个分块被均匀分成四块。这里的预设倍数以及再次分块的个数可以自定义,实施例中当站点总量超过基点数量的4倍时,把一个分块再分成四块,是为了将站点相对平均的分配到基点中,降低计算复杂度。
下面以站点总数量超过基点数量的4倍时重新分块为例,进行详 细说明:
初始态整张地图就是一个分块,一个分块对应有一个基点,也就是分块的右上顶点。
当站点数量超过4个(也就是第5个站点加进来时),站点数量超过基点数量的4倍了(5>1*4),这时要将整张地图的一个分块切成4块,4个分块对应有4个基点。
当站点数量超过16个(也就是第17个站点加进来时),站点数量又超过基点数量的4倍了(17>4*4),这时又需要重新分块了,4个分块被切成了16个块。
以此类推,每当站点数量到达4 n+1(n为正整数)时,就会重新分块。
图2是根据本发明实施例的未分块时的站点位置示意图。如图2所示,横坐标为经度,纵坐标为纬度;用虚线将坐标系分块,A、B、C、D、E和F位为横纵虚线交叉点,称为基点;黑色圆圈为站点的电子围栏,图中使用1~5分别代表5个站点。图中,站点3在一条横虚线上,站点5在横纵虚线交叉点上。
图3是根据本发明实施例的分块后的站点位置示意图。如图3所示,按照经度增大且纬度增大(即横坐标增大且纵坐标增大)的原则,将坐标系中随机的站点1至5归纳到基点A至F上。图中,站点1的电子围栏与基点A所对应的分块有重叠,则站点1被归纳到基点A;站点2的电子围栏与基点A所对应的分块有重叠,则站点2也被归纳到基点A;站点4的电子围栏与基点B所对应的分块有重叠,则站点4被归纳到基点B;站点3的电子围栏与基点A和基点B所对应的两个分块有重叠,那么这两个基点都会收纳站点3的电子围栏信息;站点5的电子围栏与基点B、基点C、基点E和基点F所对应的四个分块都有重叠,那么这四个基点都会收纳站点5的电子围栏信息。
图4是根据本发明实施例的车辆位置映射示意图。如图4所示, 使用与站点分块相同的规则,即经度增大且纬度增大的原则,将车辆位置映射到基点。将车辆的GPS坐标经该规则映射后,被映射到基点B,那么该车辆只可能出现在站点3、站点4和站点5之中(对比图2即可得到验证)。
通过本发明实施例的电子围栏分块方法可以看出,通过将坐标系分块,将站点和车辆位置映射到所在分块对应的基点中,再将车辆位置信息与可能出现的站点的电子围栏信息进行比对,来判断车辆的进入离开,降低了判断车辆进入离开的计算时间,将判断程序的时间复杂度由趋近O(n)降到趋近O(1);本发明的实施例只需将车辆位置信息与可能出现的站点的电子围栏信息进行比对,无需通过高频的网络访问缓存服务器或数据库服务器来获取全量数据,降低了对硬盘读取资源的占用;动态分块,当分块中的站点总数量超过基点数量的预设倍数时,把各分块再次分块,解决了站点分布不均带来的哈希效率低的问题,兼顾了判断的效率与准确率。
图5是根据本发明实施例的电子围栏分块装置的主要单元的示意图。如图5所示,本发明实施例的电子围栏分块装置包括:
坐标系分块单元501,用于将平面地图的坐标系分成分块,取各所述分块同一方向的一个顶点作为基点。将坐标系分块,该分块用来将分散的站点聚集到一起存储,各分块的形状和大小可以自定义。当站点数量逐渐增加时,一个分块中的站点会变得过于密集,经f(x,y)函数映射后,一个基点对应的站点数量就会过高,因此本发明实施例的坐标系分块单元501采取了动态分块的方式,当所述分块中的站点总数量超过基点数量的预设倍数时,把各所述分块再次分块。
站点归纳单元502,用于按照预定规则将站点归纳到其所在分块对应的基点上。只要站点的电子围栏与基点所对应的分块有重叠,该站点都会被该基点收纳存储。
车辆位置映射单元503,用于按照所述预定规则将车辆位置映射到其所在分块对应的基点上,所述基点包含的所有站点为所述车辆可能出现的站点。使用与站点分块相同的规则,对车辆位置进行映射,该车辆位置也会被映射到基点上。那么,该车辆只可能在该基点包含的站点的电子围栏之中。
判断单元504,用于获取所述车辆可能出现的站点的电子围栏信息,将车辆位置信息与所述车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开所述站点。通过将车辆位置信息与车辆可能出现的站点的电子围栏信息进行比对,合理的缩小了站点的判断范围。
从以上描述可以看出,通过将坐标系分块,将站点和车辆位置映射到所在分块对应的基点中,再将车辆位置信息与可能出现的站点的电子围栏信息进行比对,来判断车辆的进入离开,降低了判断车辆进入离开的计算时间,将判断程序的时间复杂度由趋近O(n)降到趋近O(1);本发明的实施例只需将车辆位置信息与可能出现的站点的电子围栏信息进行比对,无需通过高频的网络访问缓存服务器或数据库服务器来获取全量数据,降低了对硬盘读取资源的占用;动态分块,当分块中的站点总数量超过基点数量的预设倍数时,把各分块再次分块,解决了站点分布不均带来的哈希效率低的问题,兼顾了判断的效率与准确率。
图6示出了可以应用本发明实施例的电子围栏分块方法或电子围栏分块装置的示例性系统架构600。
如图6所示,系统架构600可以包括终端设备601、602、603,网络604和服务器605。网络604用以在终端设备601、602、603和服务器605之间提供通信链路的介质。网络604可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备601、602、603通过网络604与服务器605交互,以接收或发送消息等。终端设备601、602、603上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。
终端设备601、602、603可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。
服务器605可以是提供各种服务的服务器,例如对用户利用终端设备601、602、603所浏览的购物类网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果(例如目标推送信息、产品信息--仅为示例)反馈给终端设备。
需要说明的是,本申请实施例所提供的电子围栏分块方法一般由服务器605执行,相应地,电子围栏分块装置一般设置于服务器605中。
应该理解,图6中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
根据本发明的实施例,本发明还提供了一种电子设备和一种计算机可读介质。
本发明的电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明实施例的一种电子围栏分块方法。
本发明的计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现本发明实施例的一种电子围栏分块方法。
下面参考图7,其示出了适用于来实现本发明实施例的电子设备的计算机系统700的结构示意图。图7示出的电子设备仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图7所示,计算机系统700包括中央处理单元(CPU)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有计算机系统700操作所需的各种程序和数据。CPU 701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。
以下部件连接至I/O接口705:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。
特别地,根据本发明公开的实施例,上文主要步骤图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行主要步骤图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被中央处理单元 (CPU)701执行时,执行本发明的系统中限定的上述功能。
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个单元、程序段、或代码的一部分,上述单元、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的 是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本发明实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括坐标系分块单元、站点归纳单元、车辆位置映射单元和判断单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,坐标系分块单元还可以被描述为“用于将平面地图的坐标系分成分块,取各所述分块同一方向的一个顶点作为基点的单元”。
作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:将平面地图的坐标系分块,取各所述分块同一方向的一个顶点作为基点;按照预定规则将站点归纳到其所在分块对应的基点上;按照所述预定规则将车辆位置映射到其所在分块对应的基点上,所述基点包含的所有站点为所述车辆可能出现的站点;获取所述车辆可能出现的站点的电子围栏信息,将车辆位置信息与所述车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开所述站点。
从以上描述可以看出,通过将坐标系分块,将站点和车辆位置映射到所在分块对应的基点中,再将车辆位置信息与可能出现的站点的电子围栏信息进行比对,来判断车辆的进入离开,降低了判断车辆进入离开的计算时间,将判断程序的时间复杂度由趋近O(n)降到趋近O(1);本发明的实施例只需将车辆位置信息与可能出现的站点的电子围栏信息进行比对,无需通过高频的网络访问缓存服务器或数据库服务器来获取全量数据,降低了对硬盘读取资源的占用;动态分块,当分 块中的站点总数量超过基点数量的预设倍数时,把各分块再次分块,解决了站点分布不均带来的哈希效率低的问题,兼顾了判断的效率与准确率。
上述产品可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。

Claims (10)

  1. 一种电子围栏分块方法,其特征在于,包括:
    将平面地图的坐标系分块,取各所述分块同一方向的一个顶点作为基点;
    按照预定规则将站点归纳到其所在分块对应的基点上;
    按照所述预定规则将车辆位置映射到其所在分块对应的基点上,所述基点包含的所有站点为所述车辆可能出现的站点;
    获取所述车辆可能出现的站点的电子围栏信息,将车辆位置信息与所述车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开所述站点。
  2. 根据权利要求1所述的方法,其特征在于,所述基点为所述分块的右上角顶点;所述坐标系的横坐标为经度,纵坐标为纬度;所述预定规则为:经度增大且纬度增大的规则。
  3. 根据权利要求1或2所述的方法,其特征在于,按照预定规则将站点归纳到其所在分块对应的所述基点上,包括:
    使用f(x,y)函数将各所述分块内的所有坐标按照预定规则转换为所述分块对应的基点坐标;其中,相邻的两个分块的公共边的所有坐标转换为所述两个分块对应的基点坐标,x为经度,y为纬度;
    将所述站点的电子围栏信息经所述f(x,y)函数映射到其所在分块对应的所述基点上;
    将所述基点坐标和所述基点包含的所有站点的电子围栏信息进行存储。
  4. 根据权利要求3所述的方法,其特征在于,将所述基点坐标和所述基点包含的所有站点的电子围栏信息进行存储,包括:将所述基点坐标作为键,将所述基点包含的所有站点的电子围栏信息作为值,存储在服务器中。
  5. 根据权利要求3所述的方法,其特征在于,按照所述预定规则将车辆位置映射到其所在分块对应的所述基点上,包括:将车辆位置经所述f(x,y)函数映射到其所在分块对应的所述基点上。
  6. 根据权利要求1所述的方法,其特征在于,将平面地图的坐标系分成分块,包括:当所述分块中的站点总数量超过基点数量的预设倍数时,把各所述分块再次分块。
  7. 根据权利要求1所述的方法,其特征在于,将平面地图的坐标系分成分块,包括:当所述分块中的站点总数量超过基点数量的4倍时,将相应的分块均分为四块。
  8. 一种电子围栏分块装置,其特征在于,包括:
    坐标系分块单元,用于将平面地图的坐标系分成分块,取各所述分块同一方向的一个顶点作为基点;
    站点归纳单元,用于按照预定规则将站点归纳到其所在分块对应的基点上;
    车辆位置映射单元,用于按照所述预定规则将车辆位置映射到其所在分块对应的基点上,所述基点包含的所有站点为所述车辆可能出现的站点;
    判断单元,用于获取所述车辆可能出现的站点的电子围栏信息,将车辆位置信息与所述车辆可能出现的站点的电子围栏信息进行对比,以判断车辆是否进入或者离开所述站点。
  9. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的方法。
  10. 一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1-7中任一所述的方法。
PCT/CN2018/082425 2017-08-30 2018-04-10 电子围栏分块方法和装置 Ceased WO2019041817A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/641,947 US11421994B2 (en) 2017-08-30 2018-04-10 Method and apparatus for partitioning electronic fence

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710761781.X 2017-08-30
CN201710761781.XA CN110069579B (zh) 2017-08-30 2017-08-30 电子围栏分块方法和装置

Publications (1)

Publication Number Publication Date
WO2019041817A1 true WO2019041817A1 (zh) 2019-03-07

Family

ID=65524853

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/082425 Ceased WO2019041817A1 (zh) 2017-08-30 2018-04-10 电子围栏分块方法和装置

Country Status (3)

Country Link
US (1) US11421994B2 (zh)
CN (1) CN110069579B (zh)
WO (1) WO2019041817A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543536A (zh) * 2019-08-20 2019-12-06 浙江大华技术股份有限公司 时空轨迹向量构建方法、终端设备及计算机存储介质
CN114461692A (zh) * 2022-02-10 2022-05-10 吉旗(成都)科技有限公司 电子围栏推荐方法、装置、电子设备及存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111003367B (zh) * 2019-11-29 2022-04-15 江苏智冷物联技术有限公司 一种卸液控制方法、设备及存储介质
CN111323025A (zh) * 2020-02-25 2020-06-23 北京首汽智行科技有限公司 一种基于GeoHash算法的坐标判定方法
DE112021001727T5 (de) * 2020-03-19 2023-01-26 Wejo Ltd. System und verfahren zur filterlosen drosselung von fahrzeugereignisdaten
CN111695931A (zh) * 2020-05-11 2020-09-22 北京顺达同行科技有限公司 物流计费方法、相关装置及计算机可读存储介质
CN111967823B (zh) * 2020-08-14 2024-04-19 北京骑胜科技有限公司 物品的管理方法及设备
CN113393695B (zh) * 2021-06-15 2023-06-16 杭州数知梦科技有限公司 实时采集公交车班次运行状态的方法
CN113537886B (zh) * 2021-07-15 2023-09-05 北京京东振世信息技术有限公司 站点拆分方法和装置
CN115482649A (zh) * 2022-09-16 2022-12-16 上海华兴数字科技有限公司 监控方法、系统、作业机械及电子设备
CN115828127A (zh) * 2022-12-12 2023-03-21 北京京东振世信息技术有限公司 一种配送信息处理方法和装置
CN118248307A (zh) * 2024-05-20 2024-06-25 天津市急救中心 紧急医疗服务自动派车系统及方法
CN119762517B (zh) * 2024-12-31 2026-01-27 沃行科技(南京)有限公司 自动驾驶车辆的电子围栏生成方法、装置、设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150768A (zh) * 2012-12-11 2013-06-12 海华电子企业(中国)有限公司 一种计算高速公路行车费用的方法
CN103236091A (zh) * 2013-04-03 2013-08-07 海华电子企业(中国)有限公司 一种基于ic卡和卫星定位的行车费用计算方法
CN104053127A (zh) * 2013-03-14 2014-09-17 福特全球技术公司 用于包括动态poi识别的增强驾驶体验的方法和设备
CN104931991A (zh) * 2015-06-12 2015-09-23 北京合众思壮科技股份有限公司 用于交通工具的定位方法、定位装置、监控设备及监控系统
WO2016061283A1 (en) * 2014-10-14 2016-04-21 Skytree, Inc. Configurable machine learning method selection and parameter optimization system and method

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3267463B2 (ja) * 1995-01-23 2002-03-18 松下電器産業株式会社 景色表示装置
KR100235239B1 (ko) * 1995-09-29 1999-12-15 모리 하루오 가형정보의 출력장치, 가형정보의 출력방법, 지도표시장치, 지도표시방법, 네비게이션장치 및 네비게이션방법
JP3532492B2 (ja) * 1999-06-25 2004-05-31 株式会社ザナヴィ・インフォマティクス 道路交通情報提供システム、情報提供装置、およびナビゲーション装置
JP2004340825A (ja) * 2003-05-16 2004-12-02 Xanavi Informatics Corp ナビゲーション装置
US7548814B2 (en) * 2006-03-27 2009-06-16 Sony Ericsson Mobile Communications Ab Display based on location information
CN102162854A (zh) * 2011-01-11 2011-08-24 厦门雅迅网络股份有限公司 基于gps数据实时获得位置信息的方法
KR101798852B1 (ko) * 2014-07-28 2017-11-17 민경국 도로명 주소체계의 도로번호를 이용한 도로명 색인부 및 도로명 노선표
CN105491124B (zh) * 2015-12-03 2018-11-02 北京航空航天大学 移动车辆分布式聚合方法
CN105975627A (zh) * 2016-05-26 2016-09-28 成都正合地产顾问股份有限公司 选房方法及装置
WO2018017793A1 (en) * 2016-07-21 2018-01-25 Intelligent Technologies International, Inc. System and method for creating, updating, and using maps generated by probe vehicles
CN106780827A (zh) * 2016-11-10 2017-05-31 深圳市海云天科技股份有限公司 车辆运输监控系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150768A (zh) * 2012-12-11 2013-06-12 海华电子企业(中国)有限公司 一种计算高速公路行车费用的方法
CN104053127A (zh) * 2013-03-14 2014-09-17 福特全球技术公司 用于包括动态poi识别的增强驾驶体验的方法和设备
CN103236091A (zh) * 2013-04-03 2013-08-07 海华电子企业(中国)有限公司 一种基于ic卡和卫星定位的行车费用计算方法
WO2016061283A1 (en) * 2014-10-14 2016-04-21 Skytree, Inc. Configurable machine learning method selection and parameter optimization system and method
CN104931991A (zh) * 2015-06-12 2015-09-23 北京合众思壮科技股份有限公司 用于交通工具的定位方法、定位装置、监控设备及监控系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543536A (zh) * 2019-08-20 2019-12-06 浙江大华技术股份有限公司 时空轨迹向量构建方法、终端设备及计算机存储介质
CN114461692A (zh) * 2022-02-10 2022-05-10 吉旗(成都)科技有限公司 电子围栏推荐方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN110069579A (zh) 2019-07-30
CN110069579B (zh) 2021-02-26
US11421994B2 (en) 2022-08-23
US20200249030A1 (en) 2020-08-06

Similar Documents

Publication Publication Date Title
WO2019041817A1 (zh) 电子围栏分块方法和装置
WO2015078238A1 (en) Dispatching map matching tasks by cluster server in internet of vehicles
CN110209748B (zh) 索引地理围栏的方法和装置
US20190057109A1 (en) Scalable space-time density data fusion
CN112069285A (zh) 基于三维高精地图切片的地图生成方法、装置及电子设备
CN111274341A (zh) 一种网点选址方法和装置
CN109992640A (zh) 位置网格的确定方法及装置、设备及存储介质
US20140370920A1 (en) Systems and methods for generating and employing an index associating geographic locations with geographic objects
CN108268504A (zh) 一种划分兴趣点的搜索区域的方法及设备
US10928202B2 (en) System and methods for three-dimensional volumetric indoor location geocoding
CN113628256A (zh) 一种数据处理方法和装置
CN109697452B (zh) 数据对象的处理方法、处理装置及处理系统
US9794743B2 (en) Method for performing distributed geographic event processing and geographic event processing system
Zhang et al. Enhanced adaptive cloudlet placement approach for mobile application on spark
CN117472548A (zh) 资源调度方法、装置、设备及存储介质
CN113362090B (zh) 一种用户行为数据处理方法和装置
US11023421B1 (en) Method, apparatus, and computer program product for compression of a graph
CN110750602B (zh) 确定订单地址所属站点的方法和装置
CN114510562A (zh) 构建事项关联图谱的方法、事项查询方法、装置和设备
CN112468546A (zh) 账号位置确定方法、装置、服务器和存储介质
CN119989015A (zh) 网格聚类方法、装置、设备和存储介质
Park An Efficient Scalable Spatial Data Search for Location-Aware Mobile Services.
WO2022108524A1 (zh) 信息生成方法、装置和电子设备
CN113127759A (zh) 兴趣点处理方法、装置、计算设备及计算机可读存储介质
US10356165B2 (en) Dynamic resource repositioning load balancing and location management system and method

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18850437

Country of ref document: EP

Kind code of ref document: A1