Virtual geographic address generation method and device, electronic equipment and storage medium
By calculating the weighted distance value of the real geographic address and replacing the geographic level text, a virtual address that is far away from the real address is generated, which solves the data security problem caused by the virtual address being too close to the real address, and achieves higher data security and rationality.
Patent Information
- Application Number
- CN202610071019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2046-01-20
AI Technical Summary
In existing technologies, virtual addresses are too close to real addresses, leading to data security risks.
By acquiring the latitude and longitude coordinates and address text of multiple real geographic addresses, calculating the weighted distance value, selecting the address to be replaced that meets the preset requirements, and using its geographic level text to replace the corresponding level of the target address, a target virtual geographic address is generated.
The generated virtual address is far from the real address, reducing data security risks and improving the security and rationality of address desensitization.
Smart Images

Figure CN121542447A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, in particular to a virtual geographic address generation method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the process of smart city development and construction, city planning and development often need to use detailed addresses and their latitude and longitude. If the detailed address used is real address data, it may imply local population, industry, economy, transportation and other information, causing data security risks. Therefore, the development work usually uses address data that has been virtually generated.
[0003] In the prior art, a virtual address is often obtained by blurring real address data. However, the existing blurring method is prone to cause the output virtual address to be too close to the real address, which still causes data security risks. SUMMARY
[0004] The embodiments of the present application provide a virtual geographic address generation method and device, electronic equipment and storage medium, which can improve the problem of data security risks caused by the virtual address being too close to the real address in the prior art.
[0005] The embodiments of the present application provide a virtual geographic address generation method, which comprises: obtaining a plurality of real geographic addresses, wherein each real geographic address comprises latitude and longitude coordinates and address text; the address text is text information identifying a geographic location, and the address text comprises N geographic levels, N being a positive integer greater than 1; determining a weighted distance value of any two real geographic addresses in the plurality of real geographic addresses based on the latitude and longitude coordinates and the address text; for a target real geographic address, obtaining a real geographic address to be replaced from the plurality of real geographic addresses, wherein the weighted distance value meets a preset requirement; wherein the target real geographic address is any one of the plurality of real geographic addresses; replacing the i-th geographic level text of the target real geographic address with the i-th geographic level text of the real geographic address to be replaced, to obtain a target virtual geographic address corresponding to the target real geographic address; wherein i is a positive integer less than or equal to N.
[0006] The embodiments of the present application provide a virtual geographic address generation device, which comprises: a real address acquisition unit configured to obtain a plurality of real geographic addresses, wherein each real geographic address comprises latitude and longitude coordinates and address text; the address text is text information identifying a geographic location, and the address text comprises N geographic levels, N being a positive integer greater than 1; a weighted distance value unit, configured to determine a weighted distance value of any two real geographical addresses in the plurality of real geographical addresses based on the longitude and latitude coordinates and the address texts; a to-be-replaced unit, configured to, for a target real geographical address, obtain, from the plurality of real geographical addresses, a to-be-replaced real geographical address whose weighted distance value meets a preset requirement; wherein the target real geographical address is any one real geographical address in the plurality of real geographical addresses; a text replacement unit, configured to replace an i-th geographical level text of the target real geographical address with an i-th geographical level text of the to-be-replaced real geographical address to obtain a target virtual geographical address corresponding to the target real geographical address; wherein i is a positive integer less than or equal to N.
[0007] In an embodiment, the text replacement unit comprises: an i-th level replacement subunit, configured to replace an i-th geographical level text of the target real geographical address with an i-th geographical level text of the to-be-replaced real geographical address; a second address obtaining subunit, configured to, for the to-be-replaced real geographical address, obtain, from the plurality of real geographical addresses, a second to-be-replaced real geographical address whose weighted distance value meets a second preset requirement; an i+1-th level replacement subunit, configured to replace an i+1-th geographical level text of the target real geographical address with an i+1-th geographical level text of the second to-be-replaced real geographical address; a jump subunit, configured to, in a case where i+1 is less than N, take the second to-be-replaced real geographical address as a new to-be-replaced real geographical address, take i+1 as a new i, and jump to the step of “for the to-be-replaced real geographical address, obtaining, from the plurality of real geographical addresses, a second to-be-replaced real geographical address whose weighted distance value meets a second preset requirement”, until i+1 is equal to N; a target address subunit, configured to, in a case where i+1 is equal to N, obtain the virtual geographical address as the target virtual geographical address.
[0008] In an embodiment, the weighted distance value unit comprises: a longitude and latitude subunit, configured to obtain a first longitude and latitude coordinate of a first real geographical address and a second longitude and latitude coordinate of a second real geographical address; wherein the first real geographical address and the second real geographical address are any two real geographical addresses in the plurality of real geographical addresses; a geographical distance value subunit, configured to calculate a geographical distance value of the first real geographical address and the second real geographical address based on the first longitude and latitude coordinate and the second longitude and latitude coordinate; a geographical text subunit configured to obtain a first address text of the first real geographical address and obtain a second address text of the second real geographical address; a similarity subunit configured to determine a text similarity between the first address text and the second address text; a weighted distance value subunit configured to calculate a weighted distance value of the first real geographical address and the second real geographical address based on the geographical distance value and the text similarity.
[0009] In an embodiment, the to-be-replaced unit is specifically configured to: obtain, from the plurality of real geographical addresses, a real geographical address with a maximum weighted distance value with respect to the target real geographical address, wherein the real geographical address with the maximum weighted distance value with respect to the target real geographical address is the to-be-replaced real geographical address.
[0010] In an embodiment, the apparatus further comprises: an address replacement unit configured to take the first M geographical levels of the target real geographical address as the first M geographical levels of the target virtual geographical address, wherein M is a positive integer less than N.
[0011] In an embodiment, the apparatus further comprises: a geographical level unit configured to obtain a first geographical level of the target real geographical address; a preliminary screening address unit configured to obtain at least one preliminary screening real geographical address from the plurality of real geographical addresses, wherein the first geographical level of the preliminary screening real geographical address is the same as the first geographical level of the target real geographical address; a preliminary screening replacement unit configured to replace the first M geographical levels of the target real geographical address with the first M geographical levels of the at least one preliminary screening real geographical address to obtain the first M geographical levels of the target virtual geographical address.
[0012] In an embodiment, the apparatus further comprises: a geographical level unit configured to obtain a first geographical level of the target real geographical address; a subordinate relationship unit configured to randomly obtain M-1 geographical levels subordinate to the first geographical level based on a geographical area subordinate relationship corresponding to the first geographical level; a subordinate replacement unit configured to determine the M-1 geographical levels and the first geographical level as the first M geographical levels of the target virtual geographical address.
[0013] The embodiment of the present application further provides a computer readable storage medium, which stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to execute steps in any virtual geographic address generation method provided by the embodiment of the present application.
[0014] The embodiment of the present application further provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to implement steps in any virtual geographic address generation method provided by the embodiment of the present application.
[0015] In the virtual geographic address generation method provided by the embodiment of the present application, a plurality of real geographic addresses can be acquired, each real geographic address comprising latitude and longitude coordinates and address text, and the address text comprising N geographic levels. Based on the latitude and longitude coordinates and the address text, a weighted distance value between any two real geographic addresses in the plurality of real geographic addresses is calculated. For any one real geographic address (which is not inconveniently referred to as a target real geographic address) in the plurality of real geographic addresses, a real geographic address to be replaced that satisfies a preset requirement in the weighted distance value with the target real geographic address can be acquired from the plurality of real geographic addresses. And the i-th geographic level text of the real geographic address to be replaced is used to replace the i-th geographic level text of the target real geographic address, so as to obtain a target virtual geographic address corresponding to the target real geographic address.
[0016] The embodiment of the present application can acquire a plurality of real geographic addresses, and based on the latitude and longitude coordinates and the address text comprised by each real geographic address, a weighted distance value between any two real geographic addresses is calculated. For a target real geographic address, a real geographic address to be replaced that satisfies a preset requirement in the weighted distance value is acquired first, and then the i-th geographic level text of the real geographic address to be replaced is used to replace the i-th geographic level text of the target real geographic address, so as to obtain a target virtual geographic address. In the embodiment of the present application, based on the weighted distance value, a real geographic address to be replaced corresponding to the target real geographic address can be screened out, and the i-th geographic level text of the real geographic address to be replaced is used to replace the i-th geographic level text of the target real geographic address, so as to realize generation of the target virtual geographic address. Since the calculation of the weighted distance value involves both the latitude and longitude coordinates and the address text, the weighted distance value can more reflect the distance between any two real geographic addresses, and thus the target virtual geographic address obtained is less likely to be close to the target real geographic address, and the occurrence of data security risks is avoided as much as possible. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.
[0018] Figure 1a is a schematic diagram of an application scenario of the virtual geographic address generation method provided by the present application; Figure 1b is a flowchart of the virtual geographic address generation method provided by the embodiments of the present application; Figure 1c shows a schematic block diagram of the first three levels of the geographic hierarchy in one embodiment; Figure 1d shows a schematic diagram of a graph database in one embodiment; Figure 2 is a flowchart of the virtual geographic address generation method provided by another specific embodiment of the present application; Figure 3 is a schematic diagram of the structure of a virtual geographic address generation device provided by an embodiment of the present application; Figure 4 is a schematic diagram of the structure of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.
[0020] The embodiments of the present application provide a virtual geographic address generation method, device, electronic device and storage medium.
[0021] The virtual geographic address generation apparatus can be integrated in an electronic device, which can be a terminal, a server, etc. The terminal can be a smartphone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.
[0022] In some embodiments, the virtual geographic address generation apparatus can also be integrated in multiple electronic devices, for example, the virtual geographic address generation apparatus can be integrated in multiple servers to implement the virtual geographic address generation method of the present application.
[0023] In some embodiments, the terminal can also be used as a server to implement part or all of the functions of the server.
[0024] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.
[0025] For details, please refer to Figure 1a The method provided in the embodiments of the present application can include: obtaining a plurality of real geographic addresses, wherein each real geographic address includes latitude and longitude coordinates and address text; the address text is text information identifying a geographic location, and the address text includes N geographic levels, N being a positive integer greater than 1; determining a weighted distance value of any two real geographic addresses in the plurality of real geographic addresses based on the latitude and longitude coordinates and the address text; for a target real geographic address, obtaining a real geographic address to be replaced from the plurality of real geographic addresses, wherein the weighted distance value meets a preset requirement; wherein the target real geographic address is any one of the plurality of real geographic addresses; replacing the i-th geographic level text of the target real geographic address with the i-th geographic level text of the real geographic address to be replaced to obtain a target virtual geographic address corresponding to the target real geographic address; wherein i is a positive integer less than or equal to N.
[0026] In the above method, the to-be-replaced real geographic address corresponding to the target real geographic address can be screened based on the weighted distance value, and the i-th geographic level text of the to-be-replaced real geographic address is used to replace the i-th geographic level text of the target real geographic address, so as to generate the target virtual geographic address. Since the calculation of the weighted distance value involves both the longitude and latitude coordinates and the address text, the weighted distance value can better reflect the distance between any two real geographic addresses, and thus the target virtual geographic address obtained is less likely to be close to the target real geographic address, thereby avoiding the occurrence of data security risks as much as possible.
[0027] The method provided by the embodiments of the present application can be applied in the fields of graph model, data structure, natural language processing, etc.
[0028] It can be understood that in the embodiments of the present application, data related to user information is involved, and when the embodiments of the present application are applied to specific products or technologies, the user's permission or consent should be obtained, and the collection, use and processing of related data should comply with relevant laws, regulations and standards of the country and region.
[0029] The following will be described in detail. It should be noted that the serial numbers of the following embodiments are not limited to the preferred order of the embodiments.
[0030] In the present embodiment, a virtual geographic address generation method is provided, as shown in Figure 1b The specific process of the method can include the following steps 110 to 140. 110. Obtain a plurality of real geographic addresses, wherein each real geographic address includes longitude and latitude coordinates and address text; the address text is text information identifying a geographic location, and the address text includes N geographic levels, N being a positive integer greater than 1.
[0031] The longitude and latitude coordinates refer to the precise geographic position of the corresponding real geographic address on the earth's surface, such as (XX°N, YY°E), wherein XX and YY are specific numbers, and the specific numerical value of the specific numbers should not be understood as a limitation of the present application.
[0032] Address text refers to an address describing a corresponding real geographical address in natural language, such as Unit 203, Community E, District D, City C, Province A. Here, A, B, C, D, and E are specific words, and their specific textual content should not be construed as a limitation on this application, provided that the specific regional division is satisfied. Satisfying the specific regional division means that the attribution relationship between the lower-level address and the higher-level address is accurate. For example, Shenzhen belongs to Guangdong Province; therefore, the appearance of "Shenzhen, Guangdong Province" in the address text satisfies the specific regional division. Shenzhen does not belong to Heilongjiang Province; therefore, the appearance of "Shenzhen, Heilongjiang Province" in the address text is inaccurate.
[0033] Alternatively, in one implementation, N can be set to 6, and the 6 geographic levels can be as follows:
[0034] Optionally, in one implementation, the first three levels of the six geographic levels (i.e., the first-level address, second-level address, and third-level address in the table above) can be represented by a tree diagram, such as... Figure 1c As shown.
[0035] 120. Based on latitude and longitude coordinates and address text, determine the weighted distance value between any two real geographical addresses among the plurality of real geographical addresses.
[0036] The weighted distance value reflects both the actual physical distance between the two real geographic addresses on Earth and the degree of similarity in their address descriptions at the semantic level.
[0037] The goal of step 120 is to calculate a weighted distance value for any two real geographic addresses by comprehensively considering both spatial location (i.e., latitude and longitude) and semantic structure (i.e., address text). Step 120 can avoid misjudgments caused by relying solely on latitude and longitude, such as "seemingly far but actually in the same area" or "seemingly close but actually in different cities," thereby more accurately selecting address pairs suitable for virtual replacement.
[0038] Optionally, in one embodiment, step 120 may specifically include the following steps 121 to 125: 121. Obtain the first latitude and longitude coordinates of the first real geographic address and the second latitude and longitude coordinates of the second real geographic address, wherein the first real geographic address and the second real geographic address are any two real geographic addresses among the plurality of real geographic addresses.
[0039] Choose any two real geographic addresses from the multiple obtained addresses; let's call these two addresses the first real geographic address and the second real geographic address. Extract their latitude and longitude coordinates respectively.
[0040] The latitude and longitude of the first real geographical address can be recorded as: ; The latitude and longitude of the second real geographical address can be recorded as: .
[0041] 122. Based on the first latitude and longitude coordinates and the second latitude and longitude coordinates, calculate the geographical distance between the first real geographical address and the second real geographical address.
[0042] Using latitude and longitude coordinates, the spherical distance between two points is calculated through geographic distance algorithms. Geographic distance algorithms can include the Haversine Formula, Vincenty's Formula, etc.
[0043] Continuing with the example above, we can substitute the first and second latitude / longitude coordinates into the following formula:
[0044] Calculate geographic distance value .
[0045] Where r is the Earth's radius, and the value of r is 6.378137*10^6m.
[0046] Alternatively, in one implementation, after calculating the geographic distance value... Afterwards, normalization can be performed. The specific process of normalization is as follows: Select the geographical distance value with the largest value from among multiple geographical distance values; let's denote it as... .
[0047] Divide each geographic distance value by This will give us the normalized result. Let's denote the normalized geographical distance value as... .but .
[0048] 123. Obtain the first address text of the first real geographic address and obtain the second address text of the second real geographic address.
[0049] 124. Determine the text similarity between the first address text and the second address text.
[0050] Text similarity can be represented by cosine similarity or Euclidean distance. It should be understood that the specific method of measuring text similarity should not be construed as a limitation of this application.
[0051] Let's assume the first address text is: "Building F, No. 1012, District C, City B, A". The second address text is: "A province B city H district T street Z mansion / 305".
[0052] In an embodiment, the text similarity of both is calculated, which can be achieved by the following way: 1241. The original text is processed by Chinese word segmentation to obtain a corresponding sequence of words.
[0053] The original text refers to either the first address text or the second address text.
[0054] Taking the first address text "A province B city C district D street F mansion 1012" as an example, the result of word segmentation processing is "A province / B city / C district / D street / F mansion / 1012".
[0055] Taking the second address text "A province B city H district T street Z mansion / 305" as an example, the result of word segmentation processing is "A province / B city / H district / T street / Z mansion / 305".
[0056] In the above step 1241, the Chinese word segmentation processing can be realized by using the Python open source Chinese word segmentation tool jieba.
[0057] 1242. For each word in the sequence of words, it is converted into a corresponding word vector.
[0058] Optionally, each word in the sequence of words can be mapped to a fixed-dimensional real vector by using a pre-trained or self-trained Word2Vec model. Word2Vec can capture the semantic relationship between words, not just the literal match. It can be understood that in addition to using the Word2Vec model, other models such as the glove model can also be used. It should be understood that the specific type of model used should not be understood as a limitation of the present application.
[0059] Taking B city in the sequence of words "A province / B city / C district / D street / F mansion / 1012" as an example, it can be converted to [0.1, -0.3,..., 0.8], where the dimension of the real vector can be 100 or 300, etc. It should be understood that the specific value range of the dimension of the real vector should not be understood as a limitation of the present application.
[0060] Each word in the sequence of words is converted into a vector representation of the same dimension, which facilitates subsequent mathematical operations.
[0061] 1243. The sentence vector is obtained by averaging all word vectors in the same sequence of words.
[0062] The sentence vector is the vector of the address text corresponding to the sequence of words.
[0063] Continuing with the example above, let's assume the sentence vector corresponding to the first address text is... The sentence vector corresponding to the second address text is , where n is a fixed dimension value.
[0064] 1244. Calculate the cosine similarity between the sentence vector corresponding to the first address text and the sentence vector corresponding to the second address text, and normalize the cosine similarity to obtain the text similarity.
[0065] Continuing with the example above, the formula for calculating text similarity is as follows:
[0066] in, For text similarity; Let be the cosine similarity.
[0067] In the above implementation, by introducing the technical path of jieba word segmentation + Word2Vec word vectors + average sentence vectors + cosine similarity, step 124 achieves an efficient, accurate, and semantically sensitive address text similarity calculation method. This allows the weighted distance value to not only reflect spatial distance but also the linguistic and semantic relevance of address texts, thereby improving the security and rationality of virtual address generation.
[0068] 125. Based on the geographic distance value and the text similarity, calculate the weighted distance value between the first real geographic address and the second real geographic address.
[0069] In step 125, the geographic distance value and text similarity can be fused to obtain a unified weighted distance value. The weighted distance value measures both geographic distance and text similarity, avoiding two special cases: First, the address text similarity is low, but the actual geographic distance is relatively close, which usually occurs at the boundary of administrative divisions, such as "No. 23, XXX Road, Shenzhen, Guangdong Province" and "XXX Business Department, XXX Road, XXX District, Hong Kong Special Administrative Region"; Second, the address text is relatively similar, but the actual physical distance is far, which usually occurs in common place names, such as "Nanjing Road, Shanghai" and "Shanghai Road, Nanjing".
[0070] Continuing with the example above, let's assume the weight parameter is... The range of values for the weight parameters is: .
[0071] The formula for calculating the weighted distance value is: .
[0072] Will and Substituting the calculation formula into the above equation, we get:
[0073] By repeating steps 121 to 125 above, weighted distance values between each pair of real geographical addresses can be obtained.
[0074] Optionally, in one implementation, if the number of virtual geographic addresses to be output is large, multiple processes can be started simultaneously to generate virtual geographic addresses in parallel. Let's assume there are N real geographic addresses to be converted, and x processes in total. The N real geographic addresses can be divided into x groups, with each group containing N / x data. For each of the x groups, its respective weight parameters can be determined. .
[0075] In the above implementation, by integrating spatial information and semantics, the one-sidedness of single-dimensional judgment can be avoided; and a basis for subsequent secure replacement can be provided, that is, to ensure that the subsequently generated virtual address "looks reasonable, but is not accurately located".
[0076] Optionally, in one implementation, a graph database can be generated first based on the multiple real geographic addresses obtained in step 110, and each real geographic address can be represented by a node. Then, a weighted distance value can be calculated based on the nodes in the graph database.
[0077] Alternatively, in one implementation, multiple real geographic addresses can be summarized in a table, and the specific table may be as follows:
[0078] Latitude and longitude can be retained to 6 decimal places. Based on the table above, the graph database can be obtained as follows: Figure 1d As shown.
[0079] 130. For a target real geographic address, obtain a real geographic address to be replaced from the plurality of real geographic addresses whose weighted distance value meets the preset requirements; wherein, the target real geographic address is any one of the plurality of real geographic addresses.
[0080] The target real geographic address is the object to be de-identified, and it belongs to any one of multiple real geographic addresses.
[0081] The real geographic address to be replaced is a substitute selected from the remaining real geographic addresses. The real geographic address to be replaced and the target real geographic address meet the condition that "the weighted distance value meets the preset requirements".
[0082] The purpose of step 130 is to select a real address that is sufficiently distinctive enough from the target real address as the address to be replaced for the subsequent generation of a virtual address. Whether the distinction is sufficiently large can be determined based on whether the weighted distance value meets a preset requirement.
[0083] The preset requirement can be a predefined requirement, and specifically, the preset requirement can be that the weighted distance value is maximum. Accordingly, in an embodiment, step 130 can specifically include the following steps: From the plurality of real geographic addresses, a real geographic address with the maximum weighted distance value from the target real geographic address is obtained, wherein the real geographic address with the maximum weighted distance value from the target real geographic address is the real geographic address to be replaced.
[0084] The above steps can be represented by the following formula:
[0085] Wherein, for example, is the longitude and latitude coordinates corresponding to the target real geographic address, is the sentence vector of the address text of the corresponding real geographic address; is the longitude and latitude coordinates corresponding to any real geographic address other than the target real geographic address in the plurality of real geographic addresses, is the sentence vector of the address text of the corresponding real geographic address; is the sentence vector of the address text of the corresponding real geographic address; represents that a real geographic address with the maximum weighted distance value from the target real geographic address is obtained from the plurality of real geographic addresses.
[0086] In the above embodiment, selecting the real geographic address with the maximum weighted distance value maximizes privacy protection, making the virtual address significantly deviate from the real address in space and semantics; avoids the failure of local blurring, for example, prevents replacing only addresses within the same cell, and avoids attackers inferring the real location through context. By selecting the real geographic address with the maximum weighted distance value, the generated virtual address not only maintains the validity of the address format, but also maximizes the deviation from the real location, thereby effectively preventing sensitive information exposure risks caused by address data leakage.
[0087] 140, the i-th geographic level text of the target real geographic address is replaced by the i-th geographic level text of the real geographic address to be replaced, to obtain a target virtual geographic address corresponding to the target real geographic address; wherein i is a positive integer less than or equal to N.
[0088] Step 140 generates a target virtual geographic address that is both "reasonable in appearance" and "far away from the real location" by replacing the geographic level text of the real geographic address. Optionally, in an embodiment, step 140 can specifically include steps 141 to 145 as follows: 141. Replace the i-th geographic level text of the target real geographic address with the i-th geographic level text of the real geographic address to be replaced to obtain a replacement result.
[0089] i is a positive integer less than or equal to N, and the above example continues with N being 6, i can take values of 1, 2, 3, 4, 5, and 6. For ease of description, let's take the initial value of i as 4 as an example to continue the description.
[0090] Let the target real geographic address be "A province B city C district D street F building 1012", then the corresponding 4th geographic level text of the target real geographic address is "D street".
[0091] Let the real geographic address to be replaced be "A province B city H district T street Z building / 305", then the corresponding 4th geographic level text of the real geographic address to be replaced is "T street".
[0092] Then "T street" (i.e., the 4th geographic level text of the real geographic address to be replaced) can be replaced with "D street" (i.e., the 4th geographic level text of the target real geographic address), and the replacement result is "A province B city C district T street F building 1012".
[0093] 142. For the real geographic address to be replaced, from the plurality of real geographic addresses, a second real geographic address to be replaced is obtained, which satisfies a second preset requirement of the weighted distance value.
[0094] The second preset requirement that the weighted distance value satisfies can be the same as the preset requirement in step 130, or it can be different. For ease of description, let's assume that the second preset requirement is that the real geographic address with the largest value of the weighted distance value is selected, except for the processed geographic address.
[0095] The processed geographic address can include the target real geographic address and the selected real geographic address to be replaced. The above-mentioned second preset requirement can avoid selecting the target real geographic address itself when selecting based on the largest value of the weighted distance value.
[0096] 143. Replace the i+1th geographic level text of the replacement result with the i+1th geographic level text of the second real geographic address to be replaced to obtain a new replacement result.
[0097] Continuing the example, if i is 4, then i+1 is 5, and thus the 5th geographical level text of the second real geographical address to be replaced is used to replace the 5th geographical level text of the replacement result in step 143.
[0098] It should be noted that the replacement result at this time is the replacement result after the i-th geographical level text of the target real geographical address has been replaced. Thus, continuing the example, let us assume that the second real geographical address to be replaced is "X Province Y City Z District SS Road P Community 305", and accordingly, the 5th geographical level text of the second real geographical address to be replaced is "P Community".
[0099] The replacement result is "A Province B City C District T Street F Mansion 1012", and accordingly, the 5th geographical level text of the replacement result is "F Mansion".
[0100] Thus, "P Community" (i.e., the 5th geographical level text of the second real geographical address to be replaced) is used to replace "F Mansion" (i.e., the 5th geographical level text of the replacement result), and a new replacement result "A Province B City C District T Street P Community 1012" is obtained.
[0101] 144、If i+1 is not greater than N, then the second real geographical address to be replaced is used as a new real geographical address to be replaced, and i+1 is used as a new i, and the process jumps to step "for the real geographical address to be replaced, from the plurality of real geographical addresses, a second real geographical address to be replaced is obtained, which satisfies a second preset requirement for the weighted distance value", until i+1 is greater than N.
[0102] Step 144 is a loop condition judgment step, i.e., i+1 is compared with N.
[0103] If i+1 is less than or equal to N, then the second real geographical address to be replaced is used as a new real geographical address to be replaced, and i is set to i+1, and the process jumps to step 142 to find a new replacement source for the next geographical level text of the original target real geographical address. This process is repeated until the last geographical level text of the original target real geographical address is replaced.
[0104] 145、In the case where i+1 is greater than N, the obtained virtual geographical address is the target virtual geographical address.
[0105] When the loop ends (i.e., i+1 is greater than N), it indicates that the i-th layer to the N-th layer of the original target real geographic address have been replaced, and at this time, the obtained virtual geographic address is the target virtual geographic address. In the target virtual geographic address, the i-th layer to the N-th layer are all from different real addresses, so that the generated target virtual geographic address is completely legal in format, and the virtual degree is high (i.e., the target real geographic address cannot be obtained based on the target virtual geographic address).
[0106] In the above embodiment, by setting the specific value of i, the starting level of desensitization can be controlled, and the replacement source is independently selected at each geographic level, so that the generated target virtual geographic address has stronger irreversibility.
[0107] In an embodiment, the embodiments of the present application can further include the following steps: The first M geographic levels of the target real geographic address are used as the first M geographic levels of the target virtual geographic address, where M is a positive integer less than N.
[0108] Optionally, M can be 3, and the first M geographic levels correspond to provinces, cities, and districts. M can also be 2, and the first M geographic levels correspond to provinces and cities. It should be understood that the specific value of M should not be understood as a limitation of the present application as long as it is a positive integer less than N.
[0109] In the above embodiment, an implementation strategy of retaining high-level address information unchanged and only desensitizing low-level is described: the first M geographic levels remain unchanged and are directly copied from the target real address to the virtual address; starting from the M+1-th layer, the replacement or desensitization process is performed using the foregoing steps (such as steps 141 to 145); where M is a positive integer less than the total number of levels N (i.e., 1≤M
[0110] This embodiment realizes a flexible mechanism combining hierarchical reservation and hierarchical desensitization by introducing the parameter M: M controls the “trusted reservation area” to ensure that the virtual address is effective at the macro level; N M controls the “safe desensitization area” to prevent micro-location leakage. This embodiment can form a configurable, high-security, and strong virtual address generation system in combination with weighted distance, multi-source replacement, and other technologies.
[0111] In another embodiment, the embodiments of the present application can further include the following steps S1 to S3: S1, obtaining the first geographic level of the target real geographic address.
[0112] The first geographic level is the provincial level. Determining the first geographic level of the target's actual geographic address can determine the geographic range constraints for subsequent screening.
[0113] S2. Obtain at least one preliminary real geographic address from the plurality of real geographic addresses, wherein the first geographic level of the preliminary real geographic address is the same as the first geographic level of the target real geographic address.
[0114] From multiple real geographic addresses, select all addresses whose first geographic level is the same as the first geographic level of the target real geographic address; these addresses constitute the initial set of real geographic addresses.
[0115] For example, let's assume that the first geographic level of the target real geographic address is province A. Then, we can obtain all addresses with the first geographic level of province A from multiple geographic addresses. These all addresses with the first geographic level of province A are at least one initial screening real geographic address.
[0116] S3. Replace the first M geographical levels of the target real geographical address with the first M geographical levels of the at least one pre-screened real geographical address to obtain the first M geographical levels of the target virtual geographical address.
[0117] Optionally, in step S3, one preliminary real geographic address can be selected from at least one preliminary real geographic address, and its first M geographic levels can be used to replace the first M geographic levels of the target virtual geographic address.
[0118] The above implementation method can randomly select a real geographic address for initial screening, or it can select based on a weighted distance value. The advantages of the above implementation method are: the address structure is naturally valid, the implementation is simple, and the computational cost is small.
[0119] In step S3, M preliminary real geographic addresses can be selected from at least one preliminary real geographic address. For the M preliminary real geographic addresses, one geographic level can be selected from each of the first M geographic levels to replace the corresponding geographic level of the target real geographic address.
[0120] For example, if we assume M is 3, then we can select 3 preliminary real geographic addresses: preliminary real geographic address 1, preliminary real geographic address 2, and preliminary real geographic address 3. We then replace the first geographic level of the target real geographic address with the first geographic level of preliminary real geographic address 1; replace the third geographic level of the target real geographic address with the third geographic level of preliminary real geographic address 2; and replace the second geographic level of the target real geographic address with the second geographic level of preliminary real geographic address 3.
[0121] The advantage of the above implementation method is that it is highly irreversible, and attackers cannot reverse-engineer any original address through the virtual address.
[0122] In yet another embodiment, the present application may further include the following steps X1 to X3: X1. Obtain the first geographic level of the target's real geographic address.
[0123] Step X1 is the same as step S1 above, so it will not be repeated here.
[0124] X2. Based on the geographic region affiliation relationship corresponding to the first geographic level, randomly obtain M-1 geographic levels that belong to the first geographic level.
[0125] "Geographical subordination" can refer to a hierarchical system of regional divisions, for example: Province A {City A1, City A2, City A3, …} A3 City {A31, A32, A33, …} These relationships can be obtained from publicly available regional partitioning databases.
[0126] Operation logic: Using "Province A" as the root; randomly select a legal prefecture-level city (e.g., "City A2"); then randomly select a legal district / county under that city (e.g., "District A22"). ... M generated in total One lower level, which, together with the first level, forms M levels.
[0127] X3. Determine the M-1 geographic levels and the first geographic level as the first M geographic levels of the target virtual geographic address.
[0128] The first layer obtained in step X1 and the M layer obtained in step X2 are compared. One lower-level layer is concatenated in sequence to form the first M layers of the virtual address; subsequent layers (M+1 to N) can be further desensitized through step 140 above.
[0129] In the above implementation, the association with the original location can be completely severed: the city and district are randomly generated and cannot be reversed; there is no need to store or access other real addresses, making it suitable for environments with strict data isolation.
[0130] The virtual geographic address generation method provided in this application embodiment can obtain multiple real geographic addresses, each of which includes latitude and longitude coordinates and address text. The address text includes N geographic levels. Based on the latitude and longitude coordinates and address text, the weighted distance value between any two real geographic addresses among the multiple real geographic addresses is calculated. For any one of the multiple real geographic addresses (let's call it the target real geographic address), a replacement real geographic address whose weighted distance value with the target real geographic address meets a preset requirement can be obtained from the multiple real geographic addresses. The i-th geographic level text of the target real geographic address is then replaced with the i-th geographic level text of the replacement real geographic address, thereby obtaining the target virtual geographic address corresponding to the target real geographic address. This application embodiment can obtain multiple real geographic addresses and calculate the weighted distance value between any two real geographic addresses based on the latitude and longitude coordinates and address text included in each real geographic address. For a target real geographic address, firstly, obtain the real geographic addresses to be replaced that meet the preset requirements in terms of weighted distance value. Then, replace the i-th geographic level text of the target real geographic address with the i-th geographic level text of the real geographic address to be replaced, thereby obtaining the target virtual geographic address. In this embodiment, the target virtual geographic address can be generated by filtering out the real geographic addresses to be replaced corresponding to the target real geographic address based on the weighted distance value, and replacing the i-th geographic level text of the former with the i-th geographic level text of the real geographic address to be replaced. Since the calculation of the weighted distance value involves both latitude and longitude coordinates and address text, the weighted distance value can better reflect the distance between any two real geographic addresses, thus making the obtained target virtual geographic address less likely to be close to the target real geographic address.
[0131] The embodiments of this application can minimize the occurrence of data security risks.
[0132] In this embodiment, the method of this application embodiment will be described in detail. The virtual geographic address generation method provided in this application embodiment can be executed by an electronic device. In this embodiment, let's take a product live broadcast video as an example, which is a live broadcast video segment for selling goods. Figure 2 As shown, the specific process of a virtual geographic address generation method is as follows: 201. Obtain multiple real geographic addresses, wherein each real geographic address includes latitude and longitude coordinates and address text; the address text is text information that identifies a geographic location, and the address text includes N geographic levels, where N is a positive integer greater than 1.
[0133] 202. Obtain the first latitude and longitude coordinates of the first real geographic address and the second latitude and longitude coordinates of the second real geographic address, wherein the first real geographic address and the second real geographic address are any two real geographic addresses among the plurality of real geographic addresses.
[0134] 203. Based on the first latitude and longitude coordinates and the second latitude and longitude coordinates, calculate the geographical distance between the first real geographical address and the second real geographical address.
[0135] 204. Obtain the first address text of the first real geographic address and obtain the second address text of the second real geographic address.
[0136] 205. Determine the text similarity between the first address text and the second address text.
[0137] 206. Based on the geographic distance value and the text similarity, calculate the weighted distance value between the first real geographic address and the second real geographic address.
[0138] 207. From the plurality of real geographic addresses, obtain the real geographic address with the largest weighted distance value to the target real geographic address, wherein the real geographic address with the largest weighted distance value to the target real geographic address is the real geographic address to be replaced, and the target real geographic address is any one of the plurality of real geographic addresses.
[0139] 208. Replace the i-th geographic level text of the target real geographic address with the i-th geographic level text of the real geographic address to be replaced, and obtain the replacement result, where i is a positive integer less than or equal to N.
[0140] 209. For the real geographic address to be replaced, obtain the second real geographic address to be replaced from the plurality of real geographic addresses whose weighted distance value meets the second preset requirement.
[0141] 210. Replace the (i+1)th geographic level text of the replacement result with the (i+1)th geographic level text of the second real geographic address to be replaced.
[0142] 211. If the (i+1)th is not greater than N, then the second real geographic address to be replaced is taken as the new real geographic address to be replaced, and the (i+1)th is taken as the new ith. Jump to step 209 until the (i+1)th is greater than N.
[0143] 212. When the (i+1)th time is greater than N, the obtained virtual geographic address is the target virtual geographic address.
[0144] Optionally, in one embodiment, after step 212, the present application embodiment may further include the following steps: The first M geographic levels of the target real geographic address are taken as the first M geographic levels of the target virtual geographic address, where M is a positive integer less than N.
[0145] Alternatively, in another embodiment, after step 212, the present application embodiment may further include the following steps: Obtain the first geographic level of the target real geographic address; from the plurality of real geographic addresses, obtain at least one preliminary screening real geographic address, wherein the first geographic level of the preliminary screening real geographic address is the same as the first geographic level of the target real geographic address; replace the first M geographic levels of the target real geographic address with the first M geographic levels of the at least one preliminary screening real geographic address to obtain the first M geographic levels of the target virtual geographic address.
[0146] Alternatively, in another embodiment, after step 212, the present application embodiment may further include the following steps: Obtain the first geographic level of the target real geographic address; based on the geographic region affiliation relationship corresponding to the first geographic level, randomly obtain M-1 geographic levels belonging to the first geographic level; determine the M-1 geographic levels and the first geographic level as the first M geographic levels of the target virtual geographic address.
[0147] The specific execution process of steps 201 to 212 has been explained in detail above, and will not be repeated here.
[0148] The virtual geographic address generation method provided in this application embodiment can obtain multiple real geographic addresses, each of which includes latitude and longitude coordinates and address text. The address text includes N geographic levels. Based on the latitude and longitude coordinates and address text, the weighted distance value between any two real geographic addresses among the multiple real geographic addresses is calculated. For any one of the multiple real geographic addresses (let's call it the target real geographic address), a replacement real geographic address whose weighted distance value with the target real geographic address meets a preset requirement can be obtained from the multiple real geographic addresses. The i-th geographic level text of the target real geographic address is then replaced with the i-th geographic level text of the replacement real geographic address, thereby obtaining the target virtual geographic address corresponding to the target real geographic address. This application embodiment can obtain multiple real geographic addresses and calculate the weighted distance value between any two real geographic addresses based on the latitude and longitude coordinates and address text included in each real geographic address. For a target real geographic address, firstly, obtain the real geographic addresses to be replaced that meet the preset requirements in terms of weighted distance value. Then, replace the i-th geographic level text of the target real geographic address with the i-th geographic level text of the real geographic address to be replaced, thereby obtaining the target virtual geographic address. In this embodiment, the target virtual geographic address can be generated by filtering out the real geographic addresses to be replaced corresponding to the target real geographic address based on the weighted distance value, and replacing the i-th geographic level text of the former with the i-th geographic level text of the real geographic address to be replaced. Since the calculation of the weighted distance value involves both latitude and longitude coordinates and address text, the weighted distance value can better reflect the distance between any two real geographic addresses, thus making the obtained target virtual geographic address less likely to be close to the target real geographic address.
[0149] The embodiments of this application can minimize the occurrence of data security risks.
[0150] To better implement the above methods, embodiments of this application also provide a virtual geographic address generation device. For example... Figure 3 As shown, the device includes: The real address acquisition unit 301 is used to acquire multiple real geographic addresses, wherein each real geographic address includes latitude and longitude coordinates and address text; the address text is text information that identifies a geographic location, and the address text includes N geographic levels, where N is a positive integer greater than 1; The weighted distance value unit 302 is used to determine the weighted distance value between any two real geographical addresses among the plurality of real geographical addresses based on latitude and longitude coordinates and address text. The replacement unit 303 is used to obtain, for a target real geographic address, a real geographic address whose weighted distance value meets a preset requirement from the plurality of real geographic addresses; wherein, the target real geographic address is any one of the plurality of real geographic addresses; The text replacement unit 304 is used to replace the i-th geographical level text of the target real geographical address with the i-th geographical level text of the real geographical address to be replaced, so as to obtain the target virtual geographical address corresponding to the target real geographical address; wherein, i is a positive integer less than or equal to N.
[0151] In one embodiment, the text replacement unit 304 includes: The i-th level replacement subunit is used to replace the i-th level text of the target real geographic address with the i-th level text of the real geographic address to be replaced; The second address acquisition subunit is used to acquire, from the plurality of real geographical addresses, a second real geographical address to be replaced that satisfies the second preset requirement; The (i+1)th level replacement subunit is used to replace the (i+1)th level text of the target real geographic address with the (i+1)th level text of the second real geographic address to be replaced. The jump rotor unit is used to, when the (i+1)th is less than N, take the second real geographic address to be replaced as the new real geographic address to be replaced, take the (i+1)th as the new ith, and jump to the step: "For the real geographic address to be replaced, from the plurality of real geographic addresses, obtain the second real geographic address to be replaced that satisfies the second preset requirement", until the (i+1)th is equal to N. The target address subunit is used to determine the target virtual geographic address when the (i+1)th digit equals N.
[0152] In one embodiment, the weighted distance value unit 302 includes: The latitude and longitude subunit is used to obtain the first latitude and longitude coordinates of the first real geographic address and the second latitude and longitude coordinates of the second real geographic address, wherein the first real geographic address and the second real geographic address are any two real geographic addresses among the plurality of real geographic addresses. The geographic distance value subunit is used to calculate the geographic distance value between the first real geographic address and the second real geographic address based on the first latitude and longitude coordinates and the second latitude and longitude coordinates; The geographic text subunit is used to obtain the first address text of the first real geographic address and the second address text of the second real geographic address; A similarity subunit is used to determine the text similarity between the first address text and the second address text; The weighted distance value subunit is used to calculate the weighted distance value between the first real geographic address and the second real geographic address based on the geographic distance value and the text similarity.
[0153] In one embodiment, the unit to be replaced 303 is specifically used for: From the plurality of real geographic addresses, obtain the real geographic address with the largest weighted distance value to the target real geographic address, wherein the real geographic address with the largest weighted distance value to the target real geographic address is the real geographic address to be replaced.
[0154] In one embodiment, the device further includes: The address replacement unit is used to take the first M geographic levels of the target real geographic address as the first M geographic levels of the target virtual geographic address, where M is a positive integer less than N.
[0155] In one embodiment, the device further includes: Geographic hierarchical unit, used to obtain the first geographic level of the target's real geographic address; The initial screening address unit is used to obtain at least one initial screening real geographic address from the plurality of real geographic addresses, wherein the first geographic level of the initial screening real geographic address is the same as the first geographic level of the target real geographic address. The initial screening and replacement unit is used to replace the first M geographical levels of the target real geographical address with the first M geographical levels of the at least one initial screening real geographical address to obtain the first M geographical levels of the target virtual geographical address.
[0156] In one embodiment, the device further includes: Geographic hierarchical unit, used to obtain the first geographic level of the target's real geographic address; Subordinate relationship unit, used to randomly obtain M-1 geographical levels belonging to the first geographical level based on the subordinate relationship of the geographical area corresponding to the first geographical level; Subordinate replacement unit is used to determine the M-1 geographic levels and the first geographic level as the first M geographic levels of the target virtual geographic address.
[0157] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0158] The virtual geographic address generation method provided in this application embodiment can obtain multiple real geographic addresses, each of which includes latitude and longitude coordinates and address text. The address text includes N geographic levels. Based on the latitude and longitude coordinates and address text, the weighted distance value between any two real geographic addresses among the multiple real geographic addresses is calculated. For any one of the multiple real geographic addresses (let's call it the target real geographic address), a replacement real geographic address whose weighted distance value with the target real geographic address meets a preset requirement can be obtained from the multiple real geographic addresses. The i-th geographic level text of the target real geographic address is then replaced with the i-th geographic level text of the replacement real geographic address, thereby obtaining the target virtual geographic address corresponding to the target real geographic address. This application embodiment can obtain multiple real geographic addresses and calculate the weighted distance value between any two real geographic addresses based on the latitude and longitude coordinates and address text included in each real geographic address. For a target real geographic address, firstly, obtain the real geographic addresses to be replaced that meet the preset requirements in terms of weighted distance value. Then, replace the i-th geographic level text of the target real geographic address with the i-th geographic level text of the real geographic address to be replaced, thereby obtaining the target virtual geographic address. In this embodiment, the target virtual geographic address can be generated by filtering out the real geographic addresses to be replaced corresponding to the target real geographic address based on the weighted distance value, and replacing the i-th geographic level text of the former with the i-th geographic level text of the real geographic address to be replaced. Since the calculation of the weighted distance value involves both latitude and longitude coordinates and address text, the weighted distance value can better reflect the distance between any two real geographic addresses, thus making the obtained target virtual geographic address less likely to be close to the target real geographic address.
[0159] The embodiments of this application can minimize the occurrence of data security risks.
[0160] This application also provides an electronic device, which can be a terminal, a server, or other similar device. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers, etc.
[0161] In some embodiments, the virtual geographic address generation device can also be integrated into multiple electronic devices, such as multiple servers, with multiple servers implementing the virtual geographic address generation method of this application.
[0162] In this embodiment, a server will be used as an example for detailed description. For example, ... Figure 4As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 401 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 401.
[0163] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and violation detection by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0164] The electronic device also includes a power supply 403 that supplies power to the various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0165] The electronic device may also include an input module 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0166] The electronic device may also include a communication module 405. In some embodiments, the communication module 405 may include a wireless module, through which the electronic device can perform short-range wireless transmission, thereby providing users with wireless broadband internet access. For example, the communication module 405 can be used to help users send and receive emails, browse web pages, and access streaming media.
[0167] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402, thereby realizing the various functions in the various method embodiments of this application, as follows: Multiple real geographic addresses are obtained, each of which includes latitude and longitude coordinates and address text. The address text is text information identifying a geographic location and includes N geographic levels, where N is a positive integer greater than 1. Based on the latitude and longitude coordinates and address text, a weighted distance value is determined between any two real geographic addresses. For a target real geographic address, a replacement real geographic address is obtained from the multiple real geographic addresses whose weighted distance value meets a preset requirement. The target real geographic address is any one of the multiple real geographic addresses. The i-th geographic level text of the target real geographic address is replaced with the text of the i-th geographic level text of the replacement real geographic address to obtain the target virtual geographic address corresponding to the target real geographic address. Here, i is a positive integer less than or equal to N.
[0168] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0169] Therefore, embodiments of this application provide a computer-readable storage medium storing instructions that can be loaded by a processor to perform steps in any of the virtual geographic address generation methods provided in embodiments of this application. For example, the instructions can perform the following steps: Multiple real geographic addresses are obtained, each of which includes latitude and longitude coordinates and address text. The address text is text information identifying a geographic location and includes N geographic levels, where N is a positive integer greater than 1. Based on the latitude and longitude coordinates and address text, a weighted distance value is determined between any two real geographic addresses. For a target real geographic address, a replacement real geographic address is obtained from the multiple real geographic addresses whose weighted distance value meets a preset requirement. The target real geographic address is any one of the multiple real geographic addresses. The i-th geographic level text of the target real geographic address is replaced with the text of the i-th geographic level text of the replacement real geographic address to obtain the target virtual geographic address corresponding to the target real geographic address. Here, i is a positive integer less than or equal to N.
[0170] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0171] According to one aspect of this application, a computer program product or computer program is provided, comprising instructions stored in a computer-readable storage medium. A processor of a computer device reads the instructions from the computer-readable storage medium and executes the instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0172] Since the instructions stored in the storage medium can execute the steps in any of the virtual geographic address generation methods provided in the embodiments of this application, the beneficial effects that any of the virtual geographic address generation methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0173] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0174] The foregoing has provided a detailed description of a virtual geographic address generation method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for generating a virtual geographic address, the method comprising: The method comprises: obtaining a plurality of real geographic addresses, wherein each of the real geographic addresses comprises latitude and longitude coordinates and address text; the address text is text information identifying a geographic location, and the address text comprises N geographic levels, N being a positive integer greater than 1; determining a weighted distance value of any two real geographic addresses in the plurality of real geographic addresses based on the latitude and longitude coordinates and the address text; for a target real geographic address, obtaining a to-be-replaced real geographic address from the plurality of real geographic addresses, wherein the weighted distance value meets a preset requirement; wherein the target real geographic address is any one of the plurality of real geographic addresses; replacing an i-th geographic level text of the target real geographic address with an i-th geographic level text of the to-be-replaced real geographic address to obtain a target virtual geographic address corresponding to the target real geographic address; wherein i is a positive integer less than or equal to N.
2. The method of claim 1, wherein, The method comprises: replacing an i-th geographic level text of the target real geographic address with an i-th geographic level text of the to-be-replaced real geographic address to obtain a replacement result; for the to-be-replaced real geographic address, obtaining a second to-be-replaced real geographic address from the plurality of real geographic addresses, wherein the weighted distance value meets a second preset requirement; replacing an i+1-th geographic level text of the replacement result with an i+1-th geographic level text of the second to-be-replaced real geographic address; if i+1 is not greater than N, then taking the second to-be-replaced real geographic address as a new to-be-replaced real geographic address, taking i+1 as a new i, and jumping to the step of "for the to-be-replaced real geographic address, obtaining a second to-be-replaced real geographic address from the plurality of real geographic addresses, wherein the weighted distance value meets a second preset requirement", until i+1 is greater than N; in the case where i+1 is greater than N, the obtained virtual geographic address is the target virtual geographic address.
3. The method of claim 1, wherein, The method comprises: obtaining a first latitude and longitude coordinate of a first real geographic address and a second latitude and longitude coordinate of a second real geographic address, wherein the first real geographic address and the second real geographic address are any two real geographic addresses in the plurality of real geographic addresses; calculating a geographic distance value of the first real geographic address and the second real geographic address based on the first latitude and longitude coordinate and the second latitude and longitude coordinate; obtaining a first address text of the first real geographic address and a second address text of the second real geographic address; determining a text similarity of the first address text and the second address text; calculating a weighted distance value of the first real geographic address and the second real geographic address based on the geographic distance value and the text similarity.
4. The method of claim 1, wherein, The method further comprises: The method further comprises:
5. The method of claim 1, wherein, The method further comprises: The method further comprises:
6. The method of claim 1, wherein, The method further comprises: The method further comprises: The method further comprises: The method further comprises:
7. The method of claim 1, wherein, The device comprises: The device comprises: The device comprises: The device comprises:
8. A virtual geographic address generating apparatus, characterized by comprising: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises:
9. An electronic device, comprising: The device comprises:
10. A computer-readable storage medium, characterized in that, The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises: The device comprises:
11. A computer program product, characterised in that, comprising instructions which, when executed by a processor, implement the steps of the virtual geographic address generation method of any of claims 1-7.
Citation Information
Patent Citations
Position privacy protection method and system based on Android platform
CN110866271A
File storage method and device and file reading method and device
CN114968088A
Address information desensitization method based on administrative region correction
CN117852073A
Address data production method, authority control method and related equipment
CN118211589A
Virtual geographic position generation method and device, electronic equipment and medium
CN119226411A