Description address acquisition method, system and electronic device based on front-end interface
Obtaining screen coordinates through the front-end interface and converting them into map coordinates, combined with the 100m grid and additional code strategies, solves the coding accuracy and conversion problems of existing address coding methods, and achieves efficient and practical address coding, suitable for smart cities and emergencies Condition.
Patent Information
- Application Number
- CN202111325788.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-11-10
AI Technical Summary
Existing address coding methods have problems such as inability to convert codes between cities and insufficient coding accuracy, which affects the practicality of travel and navigation.
Using a method based on the front-end interface, by obtaining the screen coordinates selected by the user, converting them into map coordinates, and using the 100-megabyte encoding and additional code strategies to generate accurate description addresses, realizing encoding conversion between cities and global application.
It achieves address coding with high coding accuracy and strong practicability, supports inter-city code conversion and global navigation, is short and easy to read, and is suitable for smart cities and emergency situations.
Smart Images

Figure CN114490895B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of address coding technology, and more specifically, to a method for obtaining a description address based on a front-end interface. Background Art
[0002] In real life, in order to facilitate people's travel, it is necessary to provide address descriptions for various places in real life. Currently, the existing methods for setting address descriptions include text place names and digital codes.
[0003] Specifically, text place names are mainly coded step by step using cities, street names, and house numbers. However, this marking method makes it difficult for people who are not familiar with place names to find specific locations. Navigation maps also use text place names, which have defects such as being unable to search without place names, a long list of similar place names, positioning points that can only be seen but not read, and unclear ranges, which seriously affect people's travel.
[0004] In the process of using digital codes to set up addresses, longitude and latitude are the most typical, but the codes formed by this digital coding method are long and complicated to calculate. In addition, today's Google short codes, the UK's three-word positioning, the national geographic grid, Carlife's Carlife code, the latest Beidou grid code... all take a global perspective and mostly use the method of adding numbers to English letters. Although the codes are short, they lose order, the positions cannot be associated with each other, and they need to be decoded by computers. For people, they are less practical.
[0005] Based on the above technical problems, there is an urgent need for an address encoding method with high encoding accuracy and strong practicality. Summary of the invention
[0006] In view of the above problems, the purpose of the present invention is to provide a method, system and electronic device for obtaining a description address based on a front-end interface to solve the bottleneck problems of the traditional description address setting method, such as the inability to convert city codes, lack of global application capabilities, and insufficient coding accuracy.
[0007] The method for obtaining a description address based on a front-end interface provided by the present invention includes:
[0008] Get the target screen coordinates selected by the user on the front-end interface;
[0009] Based on the correspondence between the front-end interface and a preset electronic map, determining the target map coordinates corresponding to the target screen coordinates;
[0010] A target description address corresponding to the target map coordinates is determined based on a preset encoding strategy.
[0011] In addition, a preferred solution is that the coding strategy includes a mapping relationship between each position on the electronic map and its corresponding address code; and the setting process of the mapping relationship between each position on the electronic map and its corresponding address code includes:
[0012] Determining the city center of the preselected simulated city on the electronic map, and obtaining the map coordinates of the city center;
[0013] Based on the map coordinates of the city center, the address code of each location on the electronic map is determined by a preset hundred-meter coding conversion formula.
[0014] In addition, a preferred solution is to record the map coordinates of the city center as (B 0 ,L 0 ), assuming that the map coordinates of any point on the electronic map are (B, L), the process of determining the address code of each location on the electronic map by the hundred-meter grid coding conversion formula includes:
[0015] Substitute the map coordinates of the city center and the map coordinates of any point on the electronic map into the hundred-meter grid code conversion formula to obtain the address code (N) of any point on the electronic map. P , E P );in,
[0016] The hundred-meter code conversion formula is:
[0017] N P =(BB 0 )×r / c
[0018] E P =(LL 0 )×r×cos B / c
[0019] Among them, r = 6378137m is the radius of the earth; c = 100m is the conversion coefficient of hectometers.
[0020] In addition, a preferred solution is that any one of the address codes corresponds to a 100-meter grid on the electronic map; and the encoding strategy also includes: a mapping relationship between each position on the electronic map and the first-level additional code in the 100-meter grid corresponding to it; wherein the setting process of the mapping relationship between each position on the electronic map and the first-level additional code in the 100-meter grid corresponding to it includes:
[0021] Subdivide each 100-meter grid into nine squares to divide each 100-meter grid into nine second-level grids;
[0022] The nine second-class grids in each 100-meter grid are sequentially coded with the first-level additional codes from 1 to 9;
[0023] Determine the first-level additional code within the 100-meter grid corresponding to each position on the electronic map.
[0024] In addition, a preferred solution is that the coding strategy further includes: a mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid; wherein the setting process of the mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid includes:
[0025] Subdivide each second-level grid into nine third-level grids;
[0026] The nine third-level grids in each second-level grid are sequentially encoded with secondary additional codes from 1 to 9;
[0027] Determine the secondary additional code in the secondary grid corresponding to each position on the electronic map.
[0028] In addition, a preferred solution is that the target description address includes a target address code, a target primary additional code, and a target secondary additional code; and the process of determining the target description address corresponding to the target map coordinates based on the coding strategy includes:
[0029] Determine the target address code corresponding to the target map coordinates through the mapping relationship between each position on the electronic map and its corresponding address code;
[0030] Determine the target first-level additional code corresponding to the coordinates of the marked map through the mapping relationship between each position on the electronic map and the first-level additional code within the corresponding 100-meter grid;
[0031] Determine the target secondary additional code corresponding to the coordinates of the marked map through the mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid;
[0032] The target address code, the first level additional code and the second level additional code are integrated to form the target description address.
[0033] In addition, a preferred solution is that, based on the correspondence between the front-end interface and the electronic map, the process of determining the target map coordinates corresponding to the target screen coordinates includes:
[0034] Determining a conversion formula between an interface coordinate system and a map coordinate system based on a correspondence between the front-end interface and the electronic map;
[0035] Determine the target map coordinates corresponding to the target screen coordinates based on the conversion formula; wherein,
[0036] The conversion formula is:
[0037] L=z×x+L 0
[0038] B=-z×y+B 0
[0039] Where z is the scaling factor, (B 0 ,L 0 ) is the translation coefficient, (x,y) is the screen coordinate of any point, and (B,L) is the map coordinate corresponding to (x,y).
[0040] In addition, a preferred solution is that the method for obtaining the description address based on the front-end interface further includes:
[0041] Determining the boundaries of each simulated city on the electronic map;
[0042] When the target map coordinates are within the boundary of a simulated city, the simulated city is the pre-selected simulated city; and
[0043] The method for obtaining the description address based on the front-end interface also includes:
[0044] Marking the target screen coordinates of the position to be marked on the front-end interface based on the preset position requirements;
[0045] A target description address corresponding to the marked position is determined based on the target screen coordinates thereof.
[0046] On the other hand, the present invention also provides a description address acquisition system based on a front-end interface, comprising:
[0047] A screen coordinate acquisition unit, used to acquire the target screen coordinates selected by the user on the front-end interface;
[0048] A map coordinate determination unit, configured to determine target map coordinates corresponding to the target screen coordinates based on a correspondence between the front-end interface and a preset electronic map;
[0049] The description address determining unit is used to determine the target description address corresponding to the target map coordinates based on a preset encoding strategy.
[0050] On the other hand, the present invention also provides an electronic device, comprising: a memory, a processor, and a description address acquisition program based on a front-end interface stored in the memory and executable on the processor, wherein the description address acquisition program based on the front-end interface is executed by the processor to perform the steps of the aforementioned description address acquisition method based on the front-end interface.
[0051] It can be seen from the above technical solutions that the coding method in the method for obtaining the description address based on the front-end interface provided by the present invention meets the special needs of the people. The electronic map becomes a dictionary of digital place names. The code can be determined at any location, and the location can be determined by any code. The codes between cities are converted on the same map. Any city code can be used for national (even global) navigation. Codes can be added to all text place names, and codes can be added to all visible social components to achieve online and offline synchronous application. This is of great significance to people's lives, urban planning, public security, alarms, help, location records, and emergency response. It is indispensable for smart cities. Once it becomes a public code, it will bring huge savings to society. In addition, the coding method is short, accurate, and associative. By combining the front-end interface, it can be read by both humans and machines, and is universal online and offline. The masses can understand it and it can be communicated inside and outside the city. It can also be conveniently added to text place names like Chinese characters and pinyin to achieve these specific requirements.
[0052] To achieve the above and related purposes, one or more aspects of the present invention include features that will be described in detail below and particularly pointed out in the claims. The following description and the accompanying drawings detail certain exemplary aspects of the present invention. However, these aspects are merely indicative of some of the various ways in which the principles of the present invention can be used. In addition, the present invention is intended to include all such aspects and their equivalents. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] By referring to the following description in conjunction with the accompanying drawings, and with a more comprehensive understanding of the present invention, other objects and results of the present invention will become more apparent and easy to understand. In the accompanying drawings:
[0054] Figure 1 A flowchart illustrating an address acquisition method based on a front-end interface according to an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of setting an address code in an address acquisition method based on a front-end interface according to an embodiment of the present invention;
[0056] Figure 3 A schematic diagram of setting a first-level additional code in an address acquisition method based on a front-end interface according to an embodiment of the present invention;
[0057] Figure 4 A schematic diagram of setting a secondary additional code in an address acquisition method based on a front-end interface according to an embodiment of the present invention;
[0058] Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present invention.
[0059] The same reference numerals throughout the drawings indicate similar or corresponding features or functions. DETAILED DESCRIPTION
[0060] In order to describe in detail the structure of the method for obtaining the description address based on the front-end interface of the present invention, the specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0061] It should be noted that if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, if there are terms such as "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. in the embodiments of the present invention that indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0062] In addition, the meaning of “and / or” appearing in the full text includes three parallel solutions. Taking “A and / or B” as an example, it includes solution A, or solution B, or a solution in which both A and B are satisfied.
[0063] Figure 1 The flowchart of the method for obtaining an address based on a front-end interface according to an embodiment of the present invention is shown. Figure 2 This is a schematic diagram of setting an address code in an address acquisition method based on a front-end interface according to an embodiment of the present invention. Figure 3 This is a schematic diagram of setting a first-level additional code in an address acquisition method based on a front-end interface according to an embodiment of the present invention. Figure 4 It is a schematic diagram of setting a secondary additional code in an address acquisition method based on a front-end interface according to an embodiment of the present invention.
[0064] Combination Figures 1 to 4 As shown together, the method for obtaining a description address based on a front-end interface provided in an embodiment of the present invention comprises:
[0065] S110: Acquire the target screen coordinates selected by the user on the front-end interface of the device terminal.
[0066] It should be noted that the method for obtaining the descriptive address based on the front-end interface provided by the present invention is mainly used for the customer to locate the target through the electronic map function on the fixed device terminal (such as a computer) or the mobile device terminal (such as a mobile phone, a tablet computer), and obtain the descriptive address of the target location. Therefore, when the customer selects the corresponding target location on the front-end interface of the device terminal with a mouse or finger, the control system of the device terminal first obtains the position of the target location on the front-end interface, that is, the target screen coordinates, and then determines the target map coordinates corresponding to the target screen coordinates on the electronic map through a subsequent preset mechanism, that is, the latitude and longitude coordinates of the target in the electronic map.
[0067] Specifically, the upper left corner of the front-end interface can be used as the origin, and two mutually perpendicular coordinate axes x and y can be set to establish a coordinate system, which is recorded as the interface coordinate system, wherein the horizontal rightward direction is the positive direction of the x-axis, and the vertical downward direction is the positive direction of the y-axis. At this time, when the user selects the corresponding target position on the front-end interface of the device terminal with a mouse or finger, the interface coordinates (x, y) of the target position can be directly obtained.
[0068] S120: Determine target map coordinates corresponding to the target screen coordinates based on a correspondence between the front-end interface and a preset electronic map.
[0069] It should be noted that after the electronic map is displayed through the front-end interface, a map coordinate system will be formed on the front-end interface. In this map coordinate system, there are two mutually perpendicular coordinate axes L and B, namely longitude and latitude, where the horizontal rightward direction is the positive direction of the L axis, and the vertical upward direction is the positive direction of the B axis.
[0070] Specifically, based on the correspondence between the front-end interface and the electronic map, the process of determining the target map coordinates corresponding to the target screen coordinates includes:
[0071] Determining a conversion formula between an interface coordinate system and a map coordinate system based on a correspondence between the front-end interface and the electronic map;
[0072] The target map coordinates corresponding to the target screen coordinates are determined based on the conversion formula.
[0073] More specifically, the conversion formula is recorded as f, and the specific formula is:
[0074] L=z×x+L 0
[0075] B=-z×y+B 0
[0076] Where z is the scaling factor between the device terminal and the electronic map, (B 0 ,L 0) is the translation coefficient, (x, y) is the screen coordinate of any point, (B, L) is the map coordinate corresponding to (x, y), the zoom coefficient changes as the user zooms in or out the map on the front-end interface; the translation coefficient changes as the user drags the map on the front-end interface.
[0077] S130: Determine a target description address corresponding to the target map coordinates based on a preset coding strategy.
[0078] It should be noted that the encoding strategy provided by the present invention is self-designed, and compared with the existing encoding methods, it has high encoding accuracy and strong practicality.
[0079] Specifically, the coding strategy includes a mapping relationship between each location on the electronic map and its corresponding address code; and the setting process of the mapping relationship between each location on the electronic map and its corresponding address code includes:
[0080] Determining the city center of the preselected simulated city on the electronic map, and obtaining the map coordinates of the city center;
[0081] Based on the map coordinates of the city center, the address code of each location on the electronic map is determined by a preset hundred-meter coding conversion formula.
[0082] Furthermore, the map coordinates of the city center are recorded as (B 0 ,L 0 ), assuming that the map coordinates of any point on the electronic map are (B, L), the process of determining the address code of each location on the electronic map by the hundred-meter grid coding conversion formula includes:
[0083] Substitute the map coordinates of the city center and the map coordinates of any point on the electronic map into the hundred-meter grid code conversion formula to obtain the address code (N) of any point on the electronic map. P , E P );in,
[0084] The hundred-meter code conversion formula is:
[0085] N P =(BB 0 )×r / c
[0086] E P =(LL 0 )×r×cos B / c
[0087] Among them, r = 6378137m is the radius of the earth; c = 100m is the conversion coefficient of hectometers and grids. This conversion formula is denoted as g in the following text.
[0088] It should be noted that in the solution provided by the present invention, a center needs to be selected for each simulated city on the electronic map. The selection of the city center mainly considers usability, and usually a location that is commonly agreed upon by the public is selected.
[0089] It should be further explained that the above coding strategy (i.e., the mapping relationship between each location on the electronic map and its corresponding address code) is actually a 100-meter grid coding setting. During the setting process, a certain city center is used as the center point, and 100-meter grids are extended to the world (i.e., the entire electronic map) in four directions: east, south, west, and north. The city center is coded as east 0 north 0, i.e., the address code (N P ,E P ), where the east neighbor of the city center is East 1 North 0, the west neighbor is West 1 North 0, the north neighbor is East 0 North 1, and the south neighbor is East 0 South 1. The larger the number, the farther the hundred-meter grid is from the city center. The specific coding format is as shown in the attached Figure 2 As shown in the figure, the method of showing the hundred-meter grid reduces the encoding length and input operations while improving the accuracy.
[0090] In addition, it should be noted that for any target point, there is a corresponding address code, that is, for any target point, there is a corresponding 100-meter grid on the electronic map to cover it; however, since the target point is small in size and area, which is far smaller than the area of the 100-meter grid, if only the 100-meter grid is used for encoding, the encoding accuracy is low. Therefore, the encoding accuracy of the encoding strategy needs to be further enhanced.
[0091] Specifically, the coding strategy also includes: a mapping relationship between each position on the electronic map and the first-level additional code within the corresponding 100-meter grid; wherein the setting process of the mapping relationship between each position on the electronic map and the first-level additional code within the corresponding 100-meter grid includes:
[0092] Subdivide each 100-meter grid into nine squares to divide each 100-meter grid into nine second-level grids;
[0093] The nine second-class grids in each 100-meter grid are sequentially coded with the first-level additional codes from 1 to 9;
[0094] Determine the first-level additional code within the 100-meter grid corresponding to each position on the electronic map.
[0095] More specifically, the coding strategy further includes: a mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid; wherein the setting process of the mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid includes:
[0096] Subdivide each second-level grid into nine third-level grids;
[0097] The nine third-level grids in each second-level grid are sequentially encoded with secondary additional codes from 1 to 9;
[0098] Determine the secondary additional code in the secondary grid corresponding to each position on the electronic map.
[0099] It should be noted that after setting the function of subdividing the nine-square grid into 100-meter grids (i.e., the two newly added processes in the above coding strategy), the target 100-meter grid is displayed as a nine-square grid, and the nine-square grid is marked with 1-9 digital second-level grids, each second-level grid is about 33 meters * 33 meters, and the second-level grid is further divided into nine third-level grids by the naked eye or the preset nine-square grid setting rules, each third-level grid is about 11 meters * 11 meters. It should be noted that in actual use, the codes of the second-level grid and the third-level grid can be obtained by inputting and searching through the mapping relationship, or can be directly read out with the naked eye.
[0100] In addition, to facilitate understanding of the mapping relationship (or corresponding relationship) between each code in the nine-square grid and the map coordinates, it needs to be further explained that the nine-square grid refers to a grid formed by dividing this plane into nine equal parts in the horizontal and vertical directions within a finite plane formed by a set of address codes (N, E), (N, E+ 1), (N+1, E+1), (N+1, E).
[0101] The Jiugong grid is composed of four horizontal line segments and four vertical line segments. The endpoint coordinates of the horizontal line segments are:
[0102]
[0103] Where n = 0, 1, 2, 3; the coordinates of the endpoints of the vertical line segment are
[0104] Where n = 0, 1, 2, 3. The screen coordinates of the endpoints of the line segments are obtained through the conversion relationship g and f, and the line segments are drawn on the interface to form a nine-square grid.
[0105] In a specific embodiment of the present invention, the target description address includes a target address code, a target primary additional code and a target secondary additional code; and the process of determining the target description address corresponding to the target map coordinates based on the coding strategy includes:
[0106] Determine the target address code corresponding to the target map coordinates through the mapping relationship between each position on the electronic map and its corresponding address code;
[0107] Determine the target first-level additional code corresponding to the coordinates of the marked map through the mapping relationship between each position on the electronic map and the first-level additional code within the corresponding 100-meter grid;
[0108] Determine the target secondary additional code corresponding to the coordinates of the marked map through the mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid;
[0109] The target address code, the first level additional code and the second level additional code are integrated to form the target description address.
[0110] In addition, it should be noted that any simulated city on the electronic map has its corresponding boundaries. Therefore, the final address code can be generally divided into the city code and the out-of-city code. The city code is closer to the selected city center, so the city code is short, and the corresponding 100-meter grid is square, the coding accuracy is high, and it can be used to mark all addresses of the selected city. The out-of-city code is farther from the selected city center, the longer the code, and the corresponding 100-meter grid tends to be a parallelogram, the higher the coding accuracy. In actual use, the address code is preceded by the city name, and the city application can be without the city name. It should be emphasized that although the accuracy of the out-of-city code is relatively low, the position of the target positioning point remains unchanged.
[0111] It should be noted that the above-mentioned encoding method provided by the present invention may not use simulated city boundaries. For example, if Shaoxing City is used as a simulated city, the above-mentioned encoding method may not only be used for counties within Shaoxing City, but each county may also establish a city center independently. A city center may be extended to the world, and there may be no boundaries between inside and outside the city. With a city as the center, encoding can be performed at any location in the world, and the corresponding 100-meter nine-square grid can be obtained at any location in the world. The only difference is the length of the code, and the code of any simulated city is suitable for national (global) navigation.
[0112] In addition, it should be noted that the above-mentioned coding can not only meet the special needs of the public, but also is a dictionary that converts electronic maps into digital place names. The coding can be determined at any location, and any coding can determine the location. The coding between cities can be converted on the same map, and any city code can be used for national (global) navigation. All existing text place names can also be annotated with coding, and all visible social components can also be annotated with the coding provided by the present invention to achieve simultaneous online and offline applications. This is of great significance to people's lives, urban planning, public security, alarming, seeking help, location recording, and emergency response. It is indispensable for smart cities, and once it becomes a public coding, it will bring huge savings to society.
[0113] Furthermore, in order to improve the coding accuracy, the method for obtaining the description address based on the front-end interface provided by the present invention also includes:
[0114] Determining the boundaries of each simulated city on the electronic map;
[0115] When the target map coordinates are within the boundary of a simulated city, the simulated city is the pre-selected simulated city.
[0116] Through this design, after the user selects a target address, he or she can reselect a simulated city that includes the target address, thereby improving the coding accuracy.
[0117] In addition, in order to realize the auxiliary positioning function of the method for obtaining the description address based on the front-end interface of the embodiment of the present invention, the method for obtaining the description address based on the front-end interface of the embodiment of the present invention may also include:
[0118] Marking the target screen coordinates of the position to be marked on the front-end interface based on the preset position requirements;
[0119] A target description address corresponding to the marked position is determined based on the target screen coordinates thereof.
[0120] Specifically, in actual use, the use effect can be improved by adding a (five-pointed star) auxiliary positioning function. Long press the screen of the mobile phone (or right click on the computer) to appear or cancel the five-pointed star (corresponding to the position mark of the target screen coordinates of the marked position on the front-end interface based on the preset position requirements). The setting of this function has three functions: 1. Solve the problem that the original individual cannot directly record points of interest on the map. By setting the five-pointed star, it can be saved for a long time in the mobile phone or computer without quantity restrictions; 2. Inter-city code conversion, the five-pointed star of City A, after converting the map to City B, see the original five-pointed star in City B, click the five-pointed star code to convert it to City B code, in this way, the connection between cities and the position difference caused by long distance can be solved, and the function of standing in the city to see the world can be realized. 3. Adjust the positioning position. Various reasons such as high-rise buildings in the city will cause positioning deviation. According to the reference object, the five-pointed star is artificially added to the accurate position, so that the position error of the positioning point is 0, which can solve the problem of error angle caused by manual adjustment due to deviation of the existing positioning point.
[0121] It should be noted that the five-pointed star refers to the place that the user is paying attention to, which is displayed as a purple five-pointed star icon on the interface. When the user performs any of the following operations on a place on the interface, it means that the user is paying attention to this place: right-click with the mouse on a personal computer; long press with a finger on a mobile device.
[0122] In addition, the above-mentioned encoding method provided by the present invention can also establish two-way dialogue between people and people and machines. For example, in logistics, drone operators use high-precision longitude and latitude, and the consignees are ordinary people. The longitude and latitude in their hands are not accurate, and the public maps are deformed. This asymmetric dialogue is common. Through the above-mentioned five-pointed star auxiliary positioning function provided by the present invention, two-way dialogue between people and people and machines can be achieved between drone operators and consignees, significantly improving the longitude and latitude of the consignee.
[0123] Finally, it should be noted that the method for obtaining the description address based on the front-end interface provided by the present invention obtains the screen coordinates (x, y) when the user performs the operation through the browser's application program interface, obtains the map coordinates (B, L) through the conversion relationship f, and then obtains the address code (N, E) through the conversion relationship g, and finally uses the browser's application program interface to persistently store the address code on the user's device. When the user opens the interface again, the browser's application program interface is used to obtain the address code persistently stored on the user's device, and the screen coordinates are obtained through the conversion relationships g and f, and finally a purple five-pointed star is drawn.
[0124] Corresponding to the above method, the present application also provides a description address acquisition system based on a front-end interface, the system comprising:
[0125] A screen coordinate acquisition unit, used to acquire the target screen coordinates selected by the user on the front-end interface;
[0126] A map coordinate determination unit, configured to determine target map coordinates corresponding to the target screen coordinates based on a correspondence between the front-end interface and a preset electronic map;
[0127] The description address determining unit is used to determine the target description address corresponding to the target map coordinates based on a preset encoding strategy.
[0128] The present invention also provides an electronic device 70. Figure 5 As shown, this figure is a schematic structural diagram of a preferred embodiment of the electronic device 70 provided by the present invention.
[0129] In this embodiment, the electronic device 70 may be a terminal device with computing functions, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
[0130] The electronic device 70 includes a processor 71 and a memory 72 .
[0131] The memory 72 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, etc. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 70, such as a hard disk of the electronic device 70. In other embodiments, the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 70, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc.
[0132] In this embodiment, the readable storage medium of the memory 72 is generally used to store the front-end interface-based description address acquisition program 73 installed in the electronic device 70. The memory 72 can also be used to temporarily store data that has been output or is to be output.
[0133] In some embodiments, the processor 72 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 72, such as acquiring a program 73 based on a description address of a front-end interface.
[0134] In some embodiments, the electronic device 70 is a terminal device such as a smart phone, a tablet computer, a portable computer, etc. In other embodiments, the electronic device 70 may be a server.
[0135] Figure 5 Only an electronic device 70 having components 71 - 73 is shown, but it is understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0136] Optionally, the electronic device 70 may also include a user interface, which may include an input unit such as a keyboard, a voice input device such as a microphone and other devices with voice recognition function, a voice output device such as a speaker, headphones, etc. Optionally, the user interface may also include a standard wired interface or a wireless interface.
[0137] Optionally, the electronic device 70 may further include a display, which may also be referred to as a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (OLED) touch device. The display is used to display information processed in the electronic device 70 and to display a visual user interface.
[0138] Optionally, the electronic device 70 may further include a touch sensor. The area provided by the touch sensor for the user to perform a touch operation is called a touch control area. In addition, the touch sensor here may be a resistive touch sensor, a capacitive touch sensor, etc. Moreover, the touch sensor includes not only a contact touch sensor, but also a proximity touch sensor, etc. In addition, the touch sensor may be a single sensor or a plurality of sensors arranged in an array, for example.
[0139] In addition, the area of the display of the electronic device 70 can be the same as or different from the area of the touch sensor. Optionally, the display and the touch sensor are stacked to form a touch display screen. The device detects touch operations triggered by the user based on the touch display screen.
[0140] Optionally, the electronic device 70 may also include a radio frequency (RF) circuit, a sensor, an audio circuit, etc., which will not be described in detail here. As described above with reference to the accompanying drawings, the method for obtaining the description address based on the front-end interface proposed according to the present invention is described by way of example. However, those skilled in the art should understand that various improvements can be made to the method for obtaining the description address based on the front-end interface proposed by the present invention without departing from the content of the present invention. Therefore, the scope of protection of the present invention should be determined by the content of the attached claims.
Claims
1. A method for obtaining a description address based on a front-end interface, characterized in that: include: Get the target screen coordinates selected by the user on the front-end interface; Based on the correspondence between the front-end interface and a preset electronic map, determining the target map coordinates corresponding to the target screen coordinates; Determine the target description address corresponding to the target map coordinates based on a preset coding strategy; wherein, The coding strategy includes a mapping relationship between each position on the electronic map and its corresponding address code; and the setting process of the mapping relationship between each position on the electronic map and its corresponding address code includes: Determining the city center of the preselected simulated city on the electronic map, and obtaining the map coordinates of the city center; Based on the map coordinates of the city center, the address code of each location on the electronic map is determined by a preset hectometer coding conversion formula; Let the map coordinates of the city center be (B0, L0), and let the map coordinates of any point on the electronic map be (B, L). Then, the process of determining the address code of each location on the electronic map by the hundred-meter coding conversion formula includes: Substitute the map coordinates of the city center and the map coordinates of any point on the electronic map into the hundred-meter grid code conversion formula to obtain the address code (N) of any point on the electronic map. P ,E P );in, The hundred-meter code conversion formula is: N P =(B-B0)×r / c E P =(L-L0)×r×cos B / c Where r is the radius of the earth; c is the conversion factor of hectometers; Any of the address codes corresponds to a 100-meter grid on the electronic map; and the encoding strategy also includes: a mapping relationship between each position on the electronic map and a first-level additional code in a 100-meter grid corresponding to it; wherein the setting process of the mapping relationship between each position on the electronic map and a first-level additional code in a 100-meter grid corresponding to it includes: Subdivide each 100-meter grid into nine squares to divide each 100-meter grid into nine second-level grids; The nine second-class grids in each 100-meter grid are sequentially coded with the first-level additional codes from 1 to 9; Determine the first-level additional code within the 100-meter grid corresponding to each position on the electronic map; The coding strategy also includes: a mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid; wherein the setting process of the mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid includes: Subdivide each second-level grid into nine third-level grids; The nine third-level grids in each second-level grid are sequentially encoded with secondary additional codes from 1 to 9; Determine the secondary additional code in the secondary grid corresponding to each position on the electronic map.
2. The method for obtaining a description address based on a front-end interface according to claim 1, characterized in that: The target description address includes a target address code, a target primary additional code and a target secondary additional code; And the process of determining the target description address corresponding to the target map coordinates based on the encoding strategy includes: Determine the target address code corresponding to the target map coordinates through the mapping relationship between each position on the electronic map and its corresponding address code; Determine the target first-level additional code corresponding to the coordinates of the marked map through the mapping relationship between each position on the electronic map and the first-level additional code within the corresponding 100-meter grid; Determine the target secondary additional code corresponding to the coordinates of the marked map through the mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid; The target address code, the first level additional code and the second level additional code are integrated to form the target description address.
3. The method for obtaining a description address based on a front-end interface as claimed in claim 2, characterized in that: Based on the correspondence between the front-end interface and the electronic map, the process of determining the target map coordinates corresponding to the target screen coordinates includes: Determining a conversion formula between an interface coordinate system and a map coordinate system based on a correspondence between the front-end interface and the electronic map; Determine the target map coordinates corresponding to the target screen coordinates based on the conversion formula; wherein, The conversion formula is: L=z×x+L0 B=-z×y+B0 Among them, z is the zoom factor, (B0, L0) is the translation factor, (x, y) is the screen coordinate of any point, and (B, L) is the map coordinate corresponding to (x, y).
4. The method for obtaining a description address based on a front-end interface according to any one of claims 2 or 3, characterized in that: The method for obtaining the description address based on the front-end interface also includes: Determining the boundaries of each simulated city on the electronic map; When the target map coordinates are within the boundary of a simulated city, the simulated city is the pre-selected simulated city; and The method for obtaining the description address based on the front-end interface also includes: Marking the target screen coordinates of the position to be marked on the front-end interface based on the preset position requirements; A target description address corresponding to the marked position is determined based on the target screen coordinates thereof.
5. A description address acquisition system based on a front-end interface, characterized in that: include: A screen coordinate acquisition unit, used to acquire the target screen coordinates selected by the user on the front-end interface; A map coordinate determination unit, configured to determine target map coordinates corresponding to the target screen coordinates based on a correspondence between the front-end interface and a preset electronic map; A description address determination unit is used to determine a target description address corresponding to the target map coordinates based on a preset coding strategy; wherein, The coding strategy includes a mapping relationship between each position on the electronic map and its corresponding address code; and the setting process of the mapping relationship between each position on the electronic map and its corresponding address code includes: Determining the city center of the preselected simulated city on the electronic map, and obtaining the map coordinates of the city center; Based on the map coordinates of the city center, the address code of each location on the electronic map is determined by a preset hectometer coding conversion formula; Let the map coordinates of the city center be (B0, L0), and let the map coordinates of any point on the electronic map be (B, L). Then, the process of determining the address code of each location on the electronic map by the hundred-meter coding conversion formula includes: Substitute the map coordinates of the city center and the map coordinates of any point on the electronic map into the hundred-meter grid code conversion formula to obtain the address code (N) of any point on the electronic map. P ,E P );in, The hundred-meter code conversion formula is: N P =(B-B0)×r / c E P =(L-L0)×r×cos B / c Where r is the radius of the earth; c is the conversion factor of hectometers; Any of the address codes corresponds to a 100-meter grid on the electronic map; and the encoding strategy also includes: a mapping relationship between each position on the electronic map and a first-level additional code in a 100-meter grid corresponding to it; wherein the setting process of the mapping relationship between each position on the electronic map and a first-level additional code in a 100-meter grid corresponding to it includes: Subdivide each 100-meter grid into nine squares to divide each 100-meter grid into nine second-level grids; The nine second-class grids in each 100-meter grid are sequentially coded with the first-level additional codes from 1 to 9; Determine the first-level additional code within the 100-meter grid corresponding to each position on the electronic map; The coding strategy also includes: a mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid; wherein the setting process of the mapping relationship between each position on the electronic map and the secondary additional code in the corresponding second-level grid includes: Subdivide each second-level grid into nine third-level grids; The nine third-level grids in each second-level grid are sequentially encoded with secondary additional codes from 1 to 9; Determine the secondary additional code in the secondary grid corresponding to each position on the electronic map.
6. An electronic device, characterized in that: The electronic device includes: a memory, a processor, and a front-end interface-based description address acquisition program stored in the memory and executable on the processor, wherein the front-end interface-based description address acquisition program is executed by the processor to perform the steps of the front-end interface-based description address acquisition method described in any one of claims 1-4.
