Embodiment
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described corresponding accompanying drawing.Obviously, described embodiment is only the application one
Section Example, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Go out under the premise of creative work the every other embodiment obtained, belong to the scope of the application protection.
Hereinafter, embodiment is more fully described with reference to the accompanying drawings.Identical label represents identical element all the time.
Fig. 1 is the diagram for showing the geography fence according to this specification one or more embodiment.
As described in Figure 1, the coordinate for forming geography fence is linked in sequence using geography fence technology, formed such as Fig. 1 institutes
The geography fence of the Zhengzhou City stated, and the geography fence is shown over the display., it is apparent that form geography fence
Coordinate is more, then the region contour shown is more clear, but the coordinate for forming geography fence simultaneously is more, the requirement to display device
It is higher.In addition, under many circumstances, display device only needs to show the general profile of geography fence, it is not necessary to which display is too thin
The profile information of section.Based on considerations above, present applicant proposes a kind of geography fence generation method.
Fig. 2 is the flow chart for showing the geography fence generation method according to this specification one or more embodiment.
As shown in Fig. 2 in step S210, multiple coordinates in list of coordinates are received.Specifically, the list of coordinates can
The list of multiple coordinates including the geography fence that has formed certain specific region (for example, Zhengzhou City in Fig. 1), that is to say, that
Coordinate in the list of coordinates is the set according to the fixed multiple coordinates of geography fence algorithm.Those skilled in the art should
Understand:With good grounds existing geography fence algorithm can obtain the method for list of coordinates corresponding with specific region can apply with
The application.
Then, following steps be can perform for changing coordinates, it should be appreciated that changing coordinates may include to belong to list of coordinates and just
In the coordinate of traversal, that is to say, that it is being judged using the coordinate for determining whether to add it to geography fence to work as
Preceding coordinate.It should be noted that " addition " mentioned in this specification one or more embodiment can be defined as coordinate finally
Fence data, in other words, if a certain coordinate can be added, the coordinate is defined as the coordinate that can be shown over the display.
In step S220, the reference coordinate of changing coordinates is determined.Reference coordinate is nearest away from changing coordinates in time
Coordinate is added, wherein, it can be that it is finally added into geography fence and the coordinate that can be shown over the display to add coordinate.Can
Selection of land, however, it is determined that in the absence of reference coordinate, then be defined as changing coordinates adding coordinate.For example, in list of coordinates
When one coordinate is operated, in the absence of addition coordinate nearest away from changing coordinates in time, then the first coordinate is defined as adding
Enter coordinate, so when being operated to the second coordinate, the first coordinate can be as the reference coordinate of the second coordinate.
Then, in step S230, judge whether the distance between changing coordinates and reference coordinate are more than or equal to and add distance,
Wherein, it is apart from the upper measurement for judging changing coordinates and whether being confirmed as adding coordinate to add distance.Specifically, add away from
From be by the distance between multiple coordinates in list of coordinates and with according to add distance determine add coordinate it is predetermined most
What big quantity was calculated.Specific formula is as follows:
Wherein,The distance between multiple coordinates in denotation coordination list and, may indicate that adjacent two seats
The distance between mark sum, the distance may include any distance algorithm for measuring the length of two coordinates spatially,
Such as, it may include Euclidean distance, manhatton distance and Chebyshev's distance etc..In this application, it is preferred to use Manhattan
Distance, coordinate (x1, y1) and coordinate (x2, y2) between manhatton distance be d=│ x1-x2│+│y1-y2│。CountmaxIt is basis
The predetermined maximum number for the addition coordinate that distance determines is added, the predetermined maximum number for adding coordinate may indicate that and can show on screen
The maximum for the coordinate quantity shown, this is typically set in advance according to the display performance and experience of display device by user.
In step S240, if judging to draw, the distance between changing coordinates and reference coordinate, which are more than or equal to, adds distance, really
It is the addition coordinate to form geography fence to determine changing coordinates.More than analysis as can be seen that distance be it is changeless, thus
As can be seen that can be by the way that Count be set dynamicallymax, control the quantity for being dynamically added coordinate.
Then, in step S250, using the addition coordinate of determination, geography fence is generated.
Alternatively, the clockwise direction for the closed contour that can be formed according to multiple coordinates in list of coordinates or counterclockwise side
To whether the next coordinate for determining changing coordinates is the addition coordinate to form geography fence, in this manner it is achieved that determining multiple seats
Whether each coordinate in mark is the addition coordinate to form geography fence.Multiple coordinates in list of coordinates are completed to determine step
After rapid, using the addition coordinate of determination, geography fence is generated.
As described above, according to the geography fence generation method of this specification one or more embodiment using addition apart from right
Multiple coordinates in list of coordinates are screened to determine to be formed the addition coordinate of geography fence, so as to reservation region shape
While reduce coordinate display number, improve display performance.
If in addition, judge to draw that the distance between changing coordinates and reference coordinate is less than addition distance in step S230, also
Changing coordinates can be further processed, this part is described in detail hereinafter with reference to Fig. 3.
Fig. 3 is the flow chart for showing the geography fence generation method according to another embodiment of this specification.Due to step
S210 to step S230 is identical to step 330 with step S310, and step S310 to step 330 will not be retouched in detail herein
State.
If judge to draw that the distance between changing coordinates and reference coordinate is less than addition distance in step S330, in step
S340, calculating sifting probability, the screening probability are to judge whether changing coordinates are confirmed as adding the degree of coordinate on probability
Amount, the screening probability is by adding in preset expected quantity, the actual quantity for adding coordinate and the list of coordinates of coordinate
For the quantity of multiple coordinates come what is determined, the formula of the screening probability is as follows:
P=(CountE-CountMax)/CountAll
Wherein, CountERepresent the preset expected quantity of addition coordinate, i.e. the expectation number of the coordinate shown on screen
Amount, CountMaxRepresent the maximum according to the actual quantity for adding the addition coordinate that distance adds, i.e. more in list of coordinates
Individual coordinate has been performed both by the maximum that geography fence generation method is defined as adding afterwards the quantity of coordinate, CountEWith
CountMaxIt can be predefined by user before the fence generating algorithm of this specification one or more embodiment is performed, can
Selection of land, user can predefine Count according to the display performance and experience of display deviceEAnd CountMax, CountAllTable
Show the quantity of multiple coordinates in list of coordinates.
Then, in step S350, by screening whether determine the probability adds changing coordinates.Specifically, random number is utilized
Allocation algorithm, random number is distributed to changing coordinates, wherein, the span of random number is between 0 to 1;If to changing coordinates point
The random number matched somebody with somebody is less than screening probability, then judges changing coordinates to add coordinate.In implementation process, user can directly invoke
The interface of the random number allocation algorithm of encapsulation distributes random number to changing coordinates.
If drawing addition changing coordinates by screening probabilistic determination in step S350, changing coordinates are determined in step S360
To form the addition coordinate of geography fence, if conversely, being added without current seat being drawn in step S350 by screening probabilistic determination
Mark, then changing coordinates cannot function as adding coordinate.
Then, according to the addition coordinate of determination, geography fence can be generated in S370.
Assuming that the quantity of the addition coordinate determined by adding distance is Counta, sat by the addition for screening determine the probability
Target quantity is Countp, and the quantity of the addition coordinate obtained after handling multiple coordinates is CountR, add coordinate
The desired value of quantity be E (CountR), then E (CountR)=Counta+Countp.Analyzed more than, CountpIt is pair
The addition that coordinate in multiple coordinates in addition to being confirmed as adding coordinate more than addition distance determines after being judged is sat
Mark, so Countp=P* (CountAll-Counta)。
It can be drawn according to the formula of screening probability:CountMax+P*CountAll=CountE。
Therefore, E (CountR)=Counta+P*(CountAll-Counta)<CountMax+P*CountAll=CountE.By
This can be seen that E (CountR)<CountE, that is, the preset expected number for adding coordinate can be less than by adding the desired value of the quantity of coordinate
Amount.In addition, according to CountMaxDefinition, CountMaxDistance and the ratio with adding distance D are represented by, analysis can more than
Know, the average distance D added between coordinate in the geography fence ultimately producedAvgRIt is inevitable certainly less than equal to adding distance D,
So it can draw, CountR=distance and/DAvgR>Distance and/D=CountMax,That is, CountR>CountMax.Above according to setting
The size that the screening probability put is derived, can help to user and pre-sets various parameters (for example, CountE、CountMax)。
As described above, distance is added in utilization according to the geography fence generation method of this specification one or more embodiment
The coordinate that can not be added using distance is added further is screened on the basis of being screened to coordinate using screening probability,
It while the overall shape in area is kept, can so enrich the detailed information in area.For example, for thing contouring
The region to differ greatly, that is to say, that western contour smoothing and east profile is tortuous, if only with add distance to coordinate carry out
Screening, then east profile is may result in by excess smoothness, in this case, is further screened using probability is screened, then
The coordinate to form east profile can be increased, so as to enrich the detailed information of east.
Described below with reference to the diagram shown in Fig. 4 A to Fig. 4 F according to this specification one or more embodiment
It is determined that sit calibration method.
Fig. 4 A show the closed contour that multiple coordinates in list of coordinates are formed, for the ease of description, in Figure 4 A to group
Quantity into the coordinate of list of coordinates is simplified, and the quantity of coordinate will be far more than this in practical application.
Next, reference picture 4B, coordinate A be as origin coordinates (the first coordinate in the above list of coordinates),
In the absence of addition coordinate nearest away from coordinate A in time, so reference coordinate is not present in coordinate A, therefore, coordinate A can determine that
To add coordinate, then coordinate B is judged.
As shown in Figure 4 C, coordinate B reference coordinate is coordinate A, coordinate B can be judged according to the method described in Fig. 2,
Specifically, judge the distance between coordinate A and coordinate B AB whether be more than add distance, through judge, distance AB be more than add away from
From then coordinate B can be identified as adding coordinate.
Then as shown in Figure 4 D, coordinate C is judged, coordinate C reference coordinate is coordinate B, through judge, coordinate B with
The distance between coordinate C BC, which is less than, adds distance, then according to the method described in Fig. 3, calculating sifting probability, and it is general according to screening
Rate determines that the coordinate is added without, then coordinate D is judged.
As shown in Figure 4 E, coordinate D reference coordinate is coordinate B, and through judging, coordinate B is more than with the distance between coordinate D BD
Distance is added, then coordinate D is defined as adding coordinate.
In this order, multiple coordinates in list of coordinates are judged successively, so that it is determined that each coordinate is
No is the addition coordinate for being formed geography fence, followed by the addition coordinate of determination, generation such as Fig. 4 F geography fences.
It should be noted that although Fig. 4 A to Fig. 4 F are shown according to clockwise in the list of coordinates for the profile for forming geography fence
Each coordinate judged, but in actual applications, can also be arranged according to the coordinate of the profile to forming geography fence counterclockwise
Each coordinate in table is judged.
In order to more clearly understand the inventive concept of this specification one or more embodiment, described hereinafter with reference to Fig. 5
According to the block diagram of the data processing equipment of this specification one or more embodiment.Those skilled in the art will appreciate that:Fig. 5
In geography fence generation equipment illustrate only the component related to the present exemplary embodiment, geography fence generation equipment 500
In also include general purpose module in addition to the component shown in Fig. 5.
Fig. 5 is the block diagram for showing to generate equipment according to the geography fence of this specification one or more embodiment.Such as Fig. 5 institutes
Show, geography fence generation equipment 500 includes receiving unit 510, determines reference coordinate unit 520, Distance Judgment unit 530, the
One determining unit 540 and generation unit 550.
Receiving unit 510 receives multiple coordinates in list of coordinates, wherein, the multiple coordinate includes changing coordinates.
Determine reference coordinate unit 520 determine changing coordinates reference coordinate, wherein, reference coordinate be in time away from work as
The nearest addition coordinate of preceding coordinate.
Distance Judgment unit 530 judges whether the distance between changing coordinates and reference coordinate are more than or equal to addition distance,
Wherein, it is apart from the upper measurement for judging changing coordinates and whether being confirmed as adding coordinate to add distance.
Alternatively, Distance Judgment unit 530 by the distance between the multiple coordinate in list of coordinates and with addition
The predetermined maximum number of coordinate, which calculates, adds distance.
First determining unit 540 goes out the distance between changing coordinates and reference coordinate greatly in response to Distance Judgment unit judges
In equal to distance is added, it is the addition coordinate to form geography fence to determine changing coordinates.
Generation unit 550, according to the addition coordinate of determination, generate geography fence.
Alternatively, geography fence generation equipment 500 also includes calculating sifting probability unit (not shown) and the second determination is single
First (not shown), wherein, calculating sifting probability unit, calculating sifting probability, the screening probability is judged currently on probability
Whether coordinate is confirmed as adding the measurement of coordinate;Second determining unit in response to Distance Judgment unit judges go out changing coordinates with
The distance between reference coordinate, which is less than, adds distance, by screening whether determine the probability changing coordinates are to add coordinate.
Alternatively, after the first determining unit determines that changing coordinates are the addition coordinate to form geography fence, according to coordinate
The clockwise or counterclockwise for the closed contour that multiple coordinates in list are formed, determine next coordinate of changing coordinates
Whether it is the addition coordinate to form geography fence.
Alternatively, the equipment also includes:3rd determining unit, determine that benchmark, which is not present, to be sat in response to reference coordinate unit
Mark, changing coordinates are defined as being formed to the addition coordinate of geography fence.
Alternatively, calculating sifting probability unit is by adding the preset expected quantity of coordinate, adding the actual quantity of coordinate
And the quantity calculating sifting probability of multiple coordinates in list of coordinates.
Alternatively, the second determining unit utilizes random number allocation algorithm, and random number is distributed to changing coordinates, wherein, at random
Several spans are between 0 to 1;If the random number distributed to changing coordinates is less than screening probability, it is determined that changing coordinates are
Add coordinate.
Alternatively, the distance includes manhatton distance.
Thus, it will be seen that the first determining unit, the second determining unit, the 3rd determining unit are used to determine currently to sit
Mark whether be add coordinate, accordingly, it is determined that addition coordinate can be the first determining unit, the second determining unit or the 3rd determine
Coordinate is added determined by unit.
Added as described above, generating equipment utilization according to the geography fence of this specification one or more embodiment apart from right
Multiple coordinates in list of coordinates are screened to determine to be formed the addition coordinate of geography fence, so as in reservation region shape
The coordinate display number of geography fence is reduced while shape.Further, according to this specification one or more embodiment
Geography fence generating algorithm using add on the basis of distance is screened to coordinate using screen probability to using add away from
Further screened from the coordinate that can not be added, so can enrich area while the overall shape in area is kept
Detailed information.
Fig. 6 shows the electronic equipment of the execution geography fence generation method according to this specification one or more embodiment
Block diagram.With reference to figure 6, in hardware view, the electronic equipment includes processor, internal bus, network interface, internal memory and non-volatile
Property memory, the hardware being also possible that certainly required for other business.Processor reads corresponding from nonvolatile memory
Computer program into internal memory then run, the webpage capture device formed on logic level.Certainly, except software is realized
Outside mode, the application is not precluded from other implementations, such as mode of logical device or software and hardware combining etc., also
It is that the executive agent for saying following handling process is not limited to each logic unit or hardware or logical device.
This specification one or more embodiment also proposed a kind of computer-readable recording medium, and this is computer-readable to deposit
Storage media stores one or more programs, and one or more programs include instruction, and the instruction, which is worked as, is included multiple application programs
Electronic equipment when performing, method that the electronic equipment can be made to perform the embodiment shown in Fig. 2.
In the 1990s, the improvement for a technology can clearly distinguish be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And as the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow is programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, PLD
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, its logic function is determined by user to device programming.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, without asking chip maker to design and make
Special IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but have many kinds, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also should
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
Can is readily available the hardware circuit for realizing the logical method flow.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
Device and storage can by the computer of the computer readable program code (such as software or firmware) of (micro-) computing device
Read medium, gate, switch, application specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller include but is not limited to following microcontroller
Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited
Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that except with
Pure computer readable program code mode realized beyond controller, completely can be by the way that method and step is carried out into programming in logic to make
Controller is obtained in the form of gate, switch, application specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact
Existing identical function.Therefore this controller is considered a kind of hardware component, and various for realizing to including in it
The device of function can also be considered as the structure in hardware component.Or even, can be by for realizing that the device of various functions regards
For that not only can be the software module of implementation method but also can be the structure in hardware component.
System, device, module or the unit that above-described embodiment illustrates, it can specifically be realized by computer chip or entity,
Or realized by the product with certain function.One kind typically realizes that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet PC, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented
The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program
Product.Therefore, the application can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the application can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The application is with reference to the flow according to the method for the embodiment of the present application, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping
Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Other identical element also be present in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code
The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The application can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type
Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by
Task is performed and connected remote processing devices by communication network.In a distributed computing environment, program module can be with
In the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Divide mutually referring to what each embodiment stressed is the difference with other embodiment.It is real especially for system
For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
Embodiments herein is the foregoing is only, is not limited to the application.For those skilled in the art
For, the application can have various modifications and variations.All any modifications made within spirit herein and principle, it is equal
Replace, improve etc., it should be included within the scope of claims hereof.