Detailed Description
In order to better understand the technical solutions, the technical solutions of the embodiments of the present specification are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features of the embodiments and embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and are not limitations of the technical solutions of the present specification, and the technical features of the embodiments and embodiments of the present specification can be combined with each other without conflict.
Please refer to fig. 1, which is a schematic diagram of an internet transaction positioning application scenario according to an embodiment of the present disclosure. The transaction terminal 100 is located on the user side and communicates with the server 200 on the network side. The transaction processing client 101 in the transaction terminal 100 may be an APP or a website for implementing a service based on the internet, and provides a transaction operation interface for a user and provides transaction information of internet transaction to a network side for processing; the internet transaction locating means 201 in the server 200 is used to locate the internet transaction involved in the transaction processing client 101.
The transaction terminal 100 may be an intelligent terminal such as a smart phone, a notebook computer, a tablet computer, and an all-in-one machine. For the internet transaction completed on the transaction terminal with the positioning function and the opened positioning function, such as a smart phone or a tablet personal computer, the transaction area of the internet transaction can be obtained through the satellite positioning signal received by the smart phone or the tablet personal computer. The embodiment of the specification aims at positioning internet transactions completed on transaction terminals without a positioning function, such as a notebook computer, an all-in-one machine and the like, or transaction terminals with a positioning function but with a closed positioning function, such as a smart phone, a tablet personal computer and the like.
In a first aspect, an embodiment of the present specification provides an internet transaction positioning method. Fig. 2 is a flowchart of the internet transaction positioning method, which includes steps S201 to S203.
S201, extracting an IP address of a terminal to be positioned from transaction information of a transaction to be positioned, wherein the terminal to be positioned is a transaction terminal for performing the transaction to be positioned.
For each internet transaction, a transaction terminal performing the internet transaction generates corresponding transaction information and provides the transaction information to a network side for processing, wherein the transaction information includes but is not limited to time for performing the transaction, amount of money for performing the transaction, store information for performing the transaction, an IP address of the transaction terminal, a satellite positioning signal received by the transaction terminal, an identity of the transaction terminal, base station information connected with the transaction terminal, WIFI information connected with the transaction terminal, and the like.
It should be noted that, for internet transactions in different transaction scenarios, the corresponding transaction information is also different. For example, for the internet transaction completed on the transaction terminal without the positioning function, such as a notebook, an all-in-one machine, or on the transaction terminal with the positioning function but with the positioning function closed, such as a smart phone, a tablet computer, etc., the corresponding transaction information does not include the satellite positioning signal received by the transaction terminal; for the internet transaction performed in a small shop, the corresponding transaction information does not include store information for performing the transaction; for the internet transaction which is performed by networking in a GPRS mode, the corresponding transaction information does not include WIFI information connected with a transaction terminal; for the internet transaction which is performed by networking in a WIFI mode, the corresponding transaction information does not include the base station information connected with the transaction terminal.
However, the internet transaction must be performed in a networked state, and the transaction terminal performing the internet transaction has a unique identity, so that the transaction information of each internet transaction includes the IP address of the transaction terminal and the identity of the transaction terminal. In the embodiment of the present specification, an IP address of a transaction terminal that performs the transaction to be positioned is extracted from the transaction information of the transaction to be positioned, and the transaction to be positioned is positioned according to the IP address of the transaction terminal that performs the transaction to be positioned. For convenience of description, the transaction terminal performing the transaction to be positioned is defined as the terminal to be positioned.
S202, judging whether the IP address of the terminal to be positioned belongs to a stable IP address section, wherein the stable IP address section is an IP address section which is determined according to a plurality of first Internet transactions in a first preset historical time period and is distributed in a fixed area, the stable IP address section is an address section which corresponds to M bits before the IP address of the transaction terminal related to the plurality of first Internet transactions, and M is a positive integer.
All IP addresses are initially distributed according to administrative regions such as provinces, city-level cities, county-level cities or districts, and all provinces, city-level cities, county-level cities or districts serve as regions where all IP addresses are distributed. However, after all the IP addresses are initially allocated, the allocation scheme may not be strictly executed due to various reasons, and there is a case that the area of some IP address distributions dynamically changes, so that the accuracy of the existing positioning by GeoIP is not high.
A large number of internet transactions occur before the to-be-positioned transaction is performed, most of the transaction information of the occurring internet transactions includes accurate positioning information such as store information of the transaction, satellite positioning signals received by a transaction terminal, base station information connected with the transaction terminal or WIFI information connected with the transaction terminal, and the IP address distribution obtained according to the positioning information is more accurate compared with the positioning performed through GeoIP. Accordingly, embodiments of the present description determine the stable IP address segment and the fixed region of the distribution of the stable IP address segment based on the plurality of first internet transactions.
Fig. 3 is a flowchart illustrating an embodiment of the present specification to determine a fixed region of the stable IP address segment distribution, where the determining the fixed region of the stable IP address segment distribution includes steps S301 to S305.
S301, extracting the multiple first internet transactions from all the internet transactions in the first preset historical time period, wherein the transaction information of the first internet transactions comprises the IP address of a transaction terminal for performing the first internet transactions and satellite positioning signals received by the transaction terminal for performing the first internet transactions.
The first preset historical time period may be divided as follows: since the time attribute is a continuous value, the time can be discretized, that is, the time is segmented, for example, segmented according to natural days, and the first preset historical time period is a certain day or a certain few days; for example, the first preset historical time period is a certain month or a certain number of months according to natural month segmentation. The longer the first preset historical time period is set, the larger the extracted total amount of the first internet transactions is, the more accurate the fixed area of the stable IP address field distribution determined according to the plurality of first internet transactions is, but the data processing speed is correspondingly slowed down, and the length of the first preset historical time period can be specifically set according to actual requirements.
In an optional implementation manner, the first preset historical time period is a historical time period corresponding to a time from a first preset historical time to the time of performing the transaction to be positioned, and the first preset historical time period is any time before the time of performing the transaction to be positioned. And setting the first preset historical time period as a historical time period corresponding to the time from the first preset historical time to the time for carrying out the transaction to be positioned, wherein the obtained plurality of first internet transactions are latest, namely, the fixed area of the stable IP address field distribution is determined according to the latest generated internet transactions. And the method is equivalent to updating the fixed area of the first stable IP address field distribution when the internet transaction is positioned every time, so that the IP address distribution can be updated in real time, and the accuracy of positioning the transaction to be positioned is further improved.
The selection of the first internet transaction can be the internet transaction of positioning information which can be accurately positioned, wherein the transaction information comprises store information of the transaction, satellite positioning signals received by a transaction terminal, base station information connected with the transaction terminal or WIFI information connected with the transaction terminal and the like. Considering that the satellite positioning signal is most abundant in the transaction information of all internet transactions, the transaction information of the first internet transaction extracted by the embodiment of the present specification includes an IP address of a transaction terminal performing the first internet transaction and a satellite positioning signal received by the transaction terminal performing the first internet transaction. Further, the satellite positioning signal may be a GPS signal, a GLONASS signal, a GALILEO signal, or a beidou satellite signal.
Considering the situation that the transaction area is inconsistent with the satellite positioning location, the transaction information of the first internet transaction may further include a transaction time and a positioning time, an absolute value of a difference between the transaction time and the positioning time is smaller than a preset time difference, the transaction time is a time for performing the first internet transaction, and the positioning time is a time for receiving a satellite positioning signal by a transaction terminal for performing the first internet transaction. By setting the absolute value of the difference between the transaction time and the positioning time to be smaller than the preset time difference, the internet transactions with inconsistent transaction areas and satellite positioning places can be filtered out, and the accuracy of positioning the transactions to be positioned is further improved. The preset time difference may be set according to practical experience, which is not limited in the embodiments of the present specification.
S302, according to the satellite positioning signal received by the transaction terminal for each first Internet transaction, obtaining the unique area of the IP address distribution of the transaction terminal for each first Internet transaction.
After the plurality of first internet transactions are extracted, acquiring a transaction area for performing each first internet transaction according to a satellite positioning principle and a satellite positioning signal received by a transaction terminal for performing each first internet transaction, and taking the transaction area for performing each first internet transaction as a unique area for IP address distribution of the transaction terminal for performing each first internet transaction.
And S303, according to the unique area of the IP address distribution of the transaction terminal for performing each first Internet transaction, obtaining each area of the IP address section to be judged and the area ratio of each area, wherein the IP address section to be judged is an address section corresponding to M front bits of the IP address of the transaction terminal for performing each first Internet transaction.
The value of M can be set according to factors such as the administrative level of the area needing positioning, the positioning accuracy, the positioning coverage rate and the like. In the embodiment of the present specification, the city-level city of the transaction to be located is located as an example, and when the value of M is 24, both the obtained location accuracy and the coverage rate are relatively high. Certainly, in other embodiments, if higher-level administrative areas such as provinces of the transaction to be located are located, the value of M may be smaller; if a lower-level administrative region such as a county-level urban area of the transaction to be located is located, the value of M may be larger.
And after the value of M is determined, obtaining M front bits of the IP address of the transaction terminal for performing each first internet transaction, wherein the same front M bits correspond to an IP address section to be judged. And according to the unique area of the IP address distribution of the transaction terminal for performing each first Internet transaction, counting each area of the IP address field distribution to be judged and each area ratio.
Taking the value of M as 24, extracting five first internet transactions from the first preset historical time period as an example, if the IP addresses of the transaction terminals corresponding to the five first internet transactions are 223.85.221.198, 223.85.221.101, 223.85.221.20, 223.85.221.30 and 182.132.23.97, respectively, and the unique areas where the five IP addresses are distributed are a metropolis, a yang wonder and a yang wonder, respectively, obtaining an IP address section to be judged 223.85.221 and an IP address section to be judged 182.132.23. The IP address section 223.85.221 to be judged is distributed in a metropolis and a Mianyang city, the proportion of the metropolis is 75%, and the proportion of the Mianyang city is 25%; the IP address field 182.132.23 to be judged is distributed in Deyang city, and the proportion of Deyang city is 100%.
S304, judging whether the highest ratio in the area ratios corresponding to the IP address field to be judged is larger than a first preset percentage.
And after obtaining the area occupation ratios corresponding to the IP address field to be judged, comparing the highest occupation ratio in the area occupation ratios with the first preset percentage. If a certain IP address segment to be determined does not change after initial allocation, ideally, there is only one area where the IP address segment is distributed, and the corresponding highest percentage is 100%. In consideration of data acquisition errors, the IP address of the transaction terminal performing the first internet transaction may be a roaming IP address or an agent IP address, and the like, in the embodiment of the present specification, when the highest percentage is greater than the first preset percentage, the IP address segment to be determined is determined as the stable IP address segment. The first preset percentage may be set according to actual conditions such as a data acquisition error, a roaming IP address, or an agent IP address, which is not limited in the embodiments of the present specification.
If the highest percentage is greater than the first preset percentage, step S305 is executed to determine that the IP address segment to be determined is the stable IP address segment, and determine an area corresponding to the highest percentage as a fixed area where the stable IP address segment is distributed.
Taking the first preset percentage as 70% as an example, the highest occupancy ratio 75% corresponding to the to-be-determined IP address segment 223.85.221 is greater than the first preset percentage 70%, so that the to-be-determined IP address segment 223.85.221 is the stable IP address segment, and the area corresponding to the highest occupancy ratio 75% is a fixed area where the stable IP address segments 223.85.221 are distributed; the highest percentage 100% corresponding to the to-be-determined IP address segment 182.132.23 is greater than the first preset percentage 70%, so that the to-be-determined IP address segment 182.132.23 is the stable IP address segment, and the regional germany city corresponding to the highest percentage 100% is a fixed region where the stable IP address segments 182.132.23 are distributed.
After the stable IP address segment is determined, comparing the IP address of the terminal to be positioned with each stable IP address segment, and judging whether the IP address of the terminal to be positioned belongs to a stable IP address segment, namely judging whether the front M bits of the IP address of the terminal to be positioned are the same as the stable IP address segment. Still taking the stable IP address segment 223.85.221 and the stable IP address segment 182.132.23 as examples, if the IP address of the terminal to be located is 223.85.221.35, the IP address 223.85.221.35 of the terminal to be located belongs to the stable IP address segment 223.85.221.
If the IP address of the terminal to be positioned belongs to the stable IP address segment, step S203 is executed to determine a fixed area distributed by the stable IP address segment as a transaction area for performing the transaction to be positioned.
The stable IP address field is distributed in the fixed area, which indicates that all IP addresses included in the stable IP address field are distributed in the fixed area. Therefore, if the IP address of the terminal to be positioned belongs to the stable IP address segment, the IP address of the terminal to be positioned is also distributed in the fixed area, that is, the fixed area is a transaction area for performing the transaction to be positioned.
In the embodiment of the present specification, since the stable IP address segment is an IP address segment distributed in the fixed area and determined according to the plurality of first internet transactions, the transaction area for performing the first internet transactions is usually obtained according to a satellite positioning signal, store information for transactions, or base station information connected to a transaction terminal, and when the area where a certain IP address is distributed dynamically changes with respect to initial allocation, the dynamic change can be embodied in the plurality of first internet transactions through satellite positioning signals, store information of transactions or base station information connected with transaction terminals and the like, therefore, the IP address distribution determined according to the plurality of first internet transactions is more accurate relative to the initial distribution, the fixed area of the stable IP address section distribution is determined to be the transaction area for the transaction to be positioned more accurately, and the accuracy of positioning the transaction to be positioned is improved.
As described above, the transaction information of the internet transaction includes, but is not limited to, time of performing the transaction, amount of performing the transaction, store information of performing the transaction, IP address of the transaction terminal, satellite positioning signal received by the transaction terminal, identification of the transaction terminal, base station information connected to the transaction terminal, and WIFI information connected to the transaction terminal, and the store information of performing the transaction, the IP address of the transaction terminal, the satellite positioning signal received by the transaction terminal, the identification of the transaction terminal, the base station information connected to the transaction terminal, and the WIFI information connected to the transaction terminal are all positioning information that can be positioned. Therefore, in addition to positioning the transaction to be positioned only according to the IP address of the transaction terminal to be positioned, the transaction to be positioned can be positioned by combining the store information to be transacted, the satellite positioning signal received by the transaction terminal, the identity of the transaction terminal, the base station information connected with the transaction terminal, and the WIFI information connected with the transaction terminal. In an alternative implementation manner, the internet transaction positioning method provided by the embodiment of the present specification further includes step S204 and step S205.
S204, judging whether the transaction information of the transaction to be positioned has positioning information with the priority higher than the IP address of the terminal to be positioned or not according to the preset priority sequence of various types of positioning information.
The positioning information comprises at least one of store information for transaction, an IP address of a transaction terminal, a satellite positioning signal received by the transaction terminal, an identity of the transaction terminal, base station information connected with the transaction terminal and WIFI information connected with the transaction terminal. And setting the priority order of various positioning information according to the accuracy of positioning by adopting various positioning information. For example, if the accuracy of positioning by using the store information for transaction is higher than the accuracy of positioning by using the IP address of the transaction terminal, the priority of the store information for transaction is set to be higher than the IP address of the transaction terminal; and if the accuracy of positioning by combining the store information for transaction with the base station information connected with the transaction terminal is higher than the accuracy of positioning by combining the store information for transaction with the base station information connected with the transaction terminal, setting the priority of the store information for transaction with the base station information connected with the transaction terminal to be higher than the store information for transaction.
If the transaction information of the transaction to be positioned does not contain positioning information with the priority higher than the IP address of the terminal to be positioned, executing step S201, and extracting the IP address of the terminal to be positioned from the transaction information of the transaction to be positioned; otherwise, step S205 is executed, the positioning information with the highest priority is extracted from the transaction information of the to-be-positioned transaction, and the transaction area for performing the to-be-positioned transaction is determined according to the positioning information with the highest priority.
And positioning the transaction to be positioned according to the IP address of the transaction terminal to be positioned, referring to the steps S201 to S203, and determining the transaction area to be positioned according to the positioning information with the highest priority level. For example, if the positioning information with the highest priority is store information for performing a transaction, determining the store position for performing the to-be-positioned transaction as a transaction area for performing the to-be-positioned transaction; if the positioning information with the highest priority is the base station information connected with the transaction terminal, determining the position of the base station connected with the transaction terminal to be positioned in the transaction area to be positioned in the transaction; and if the positioning information with the highest priority is WIFI information connected with a transaction terminal, determining the WIFI position connected with the transaction terminal for the to-be-positioned transaction as a transaction area for the to-be-positioned transaction.
In the foregoing embodiments of the present specification, the IP address of the terminal to be located may not belong to any stable IP address segment. For this situation, the embodiments of the present specification locate the transaction to be located in combination with the last transaction area of the terminal to be located. In an alternative implementation manner, the internet transaction positioning method provided by the embodiment of the present specification further includes step S206 to step S208.
If the IP address of the terminal to be located does not belong to the stable IP address segment, step S206 is executed to determine whether the IP address of the terminal to be located belongs to an unstable IP address segment, where the unstable IP address segment is an IP address segment distributed in more than two areas and determined according to the plurality of first internet transactions, and the unstable IP address segment is an address segment corresponding to M bits before the IP address of the transaction terminal related to the plurality of first internet transactions.
Referring to fig. 3, if the highest percentage is not greater than the first preset percentage, step S306 is executed to determine that the IP address segment to be determined is the unstable IP address segment, and determine that an area satisfying a preset condition in each area where the IP address segment to be determined is distributed is more than two areas where the unstable IP address segment is distributed.
The preset conditions comprise that the occupation ratio is higher than a second preset percentage and/or the area corresponding to the highest occupation ratio belongs to the same upper administrative area, and the second preset percentage is smaller than the first preset percentage. Taking the first preset percentage as 90% as an example, the highest occupancy 75% corresponding to the to-be-determined IP address segment 223.85.221 is less than the first preset percentage 90%, so that the to-be-determined IP address segment 223.85.221 is the unstable IP address segment. If the preset condition includes that the occupation ratio is higher than the second preset percentage and the area corresponding to the highest occupation ratio belongs to the same upper administrative area, the second preset percentage is 20%, and the urban area is 75%, the miao city area is 25%, the urban area is higher than the second preset percentage, and the urban area and the miao city area both belong to the sichuan province, so that the urban area and the miao city area are determined as the area where the unstable IP address section 223.85.221 is distributed.
After the unstable IP address segment is determined, comparing the IP address of the terminal to be positioned with each unstable IP address segment, and judging whether the IP address of the terminal to be positioned belongs to an unstable IP address segment, namely judging whether the front M bits of the IP address of the terminal to be positioned are the same as the unstable IP address segment. Still taking the unstable IP address segment 223.85.221 as an example, if the IP address of the terminal to be located is 223.85.221.35, the IP address 223.85.221.35 of the terminal to be located belongs to the unstable IP address segment 223.85.221.
If the IP address of the terminal to be located belongs to the unstable IP address segment, step S207 is executed to determine whether two or more areas distributed in the unstable IP address segment include the last transaction area of the terminal to be located.
Fig. 4 is a flowchart of obtaining a last transaction area of the terminal to be located according to an embodiment of the present specification, where the obtaining of the last transaction area of the terminal to be located includes steps S401 to S404.
S401, extracting a plurality of second internet transactions from all internet transactions in a second preset historical time period, wherein the second preset historical time period is a historical time period corresponding to the time from a second preset historical time to the time of the to-be-positioned transaction, and the transaction information of the second internet transactions comprises the identity of a transaction terminal performing the second internet transactions, satellite positioning signals received by the transaction terminal performing the second internet transactions and the time of performing the second internet transactions.
The second preset historical time is any time before the time of the transaction to be positioned, the length of the second preset historical time period can be set according to actual requirements, and the second internet transaction with enough quantity can be extracted. Similar to the selection of the first internet transaction, the second internet transaction may also be an internet transaction of positioning information of which the transaction information includes store information of the transaction, satellite positioning signals received by the transaction terminal, base station information connected with the transaction terminal, or WIFI information connected with the transaction terminal and the like, which can be accurately positioned. Considering that the satellite positioning signal is most abundant in the transaction information of all internet transactions, the transaction information of the second internet transaction extracted in the embodiment of the present specification includes an identity of a transaction terminal performing the second internet transaction, a satellite positioning signal received by the transaction terminal performing the second internet transaction, and a time for performing the second internet transaction.
S402, determining the final transaction area of the transaction terminal corresponding to each identity according to the identity of the transaction terminal performing each second internet transaction, the time of performing each second internet transaction and the satellite positioning signal received by the transaction terminal performing each second internet transaction.
After the plurality of second internet transactions are extracted, the transaction area for performing each second internet transaction is obtained according to a satellite positioning principle and a satellite positioning signal received by the transaction terminal for performing each second internet transaction, and the transaction area for performing each second internet transaction is used as a unique area for IP address distribution of the transaction terminal for performing each second internet transaction. And obtaining the last transaction area of each transaction terminal related to the plurality of second internet transactions, namely the last transaction area corresponding to each identity related to the plurality of second internet transactions, by combining the identity of the transaction terminal performing each second internet transaction and the time of performing each second internet transaction.
S403, extracting the identity of the terminal to be positioned from the transaction information of the transaction to be positioned.
The identity of the terminal to be positioned is a certificate capable of proving the identity of the terminal to be positioned, taking the terminal to be positioned as an intelligent mobile phone as an example, the identity of the terminal to be positioned can be a serial number of the intelligent mobile phone. The extracting of the identity of the terminal to be positioned may be performed when the IP address of the terminal to be positioned is extracted, or may be performed after the IP address of the terminal to be positioned is extracted, which is not limited in the embodiment of the present specification.
S404, determining the final trading area of the terminal to be positioned according to the identity of the terminal to be positioned and the final trading area of the trading terminal corresponding to each identity.
And comparing the identity of the terminal to be positioned with all the identity involved in the plurality of second internet transactions, and finding the identity of the terminal to be positioned in all the identity involved in the plurality of second internet transactions so as to obtain the final transaction area of the terminal to be positioned.
Taking the case that the IP address 223.85.221.35 of the terminal to be located belongs to the unstable IP address segment 223.85.221, it is determined whether the area where the unstable IP address segment 223.85.221 is distributed includes the last transaction area of the terminal to be located, that is, the last transaction area of the terminal to be located is compared with the area where the unstable IP address segment 223.85.221 is distributed.
If the two or more areas distributed by the unstable IP address field comprise the last transaction area of the terminal to be positioned, executing step S208, and determining the last transaction area of the terminal to be positioned as the transaction area for performing the transaction to be positioned.
Taking the IP address 223.85.221.35 of the terminal to be positioned as the example of the unstable IP address segment 223.85.221, if the last transaction area of the terminal to be positioned is a metropolis, since the areas where the unstable IP address segment 223.85.221 is distributed are metropolis and mianyang cities, including the last transaction area of the terminal to be positioned, the last transaction area metropolis of the terminal to be positioned is determined as the transaction area for performing the transaction to be positioned.
In steps S206 to S208 in the embodiment of this specification, a last transaction area of the terminal to be positioned is determined according to the identity of the terminal to be positioned, and when two or more areas in which the unstable IP address segment is distributed include the last transaction area of the terminal to be positioned, the last transaction area of the terminal to be positioned is determined as the transaction area in which the transaction to be positioned is performed, so as to supplement a situation that the stable IP address segment cannot be positioned, thereby greatly improving the accuracy and coverage rate of positioning the transaction to be positioned.
In an alternative implementation manner, the internet transaction positioning method provided by the embodiment of the present specification further includes step S209.
If the two or more areas distributed by the unstable IP address segment do not include the last transaction area of the terminal to be located, step S209 is executed to determine the area with the highest ratio among the two or more areas distributed by the unstable IP address segment as the transaction area for performing the transaction to be located.
Taking the IP address 223.85.221.35 of the terminal to be located as the example of the unstable IP address segment 223.85.221, if the last transaction area of the terminal to be located is a south-charging city, since the areas where the unstable IP address segment 223.85.221 is distributed are a metropolis and a sunny city, and the south-charging city of the last transaction area of the terminal to be located is not included, the metropolis with the highest proportion among the metropolis and sunny cities where the unstable IP address segment 223.85.221 is distributed is determined as the transaction area for performing the transaction to be located.
In a second aspect, based on the same inventive concept, an embodiment of the present specification provides an internet transaction positioning apparatus, including:
the positioning information extraction module is used for extracting the IP address of a terminal to be positioned from the transaction information of the transaction to be positioned, and the terminal to be positioned is the transaction terminal for performing the transaction to be positioned;
the first judgment module is used for judging whether the IP address of the terminal to be positioned belongs to a stable IP address section, wherein the stable IP address section is an IP address section which is determined according to a plurality of first Internet transactions in a first preset historical time period and distributed in a fixed area, the stable IP address section is an address section which corresponds to M bits before the IP address of the transaction terminal related to the plurality of first Internet transactions, and M is a positive integer;
and the first determining module is used for determining a fixed area distributed by the stable IP address section as a transaction area for performing the transaction to be positioned when the IP address of the terminal to be positioned belongs to the stable IP address section.
In an alternative implementation, the internet transaction locating device further comprises:
the second judging module is used for judging whether the positioning information with the priority higher than the IP address of the terminal to be positioned exists in the transaction information of the transaction to be positioned according to the preset priority sequence of various types of positioning information;
the positioning information extraction module is used for extracting the IP address of the terminal to be positioned from the transaction information of the transaction to be positioned when the positioning information with the priority higher than the IP address of the terminal to be positioned does not exist in the transaction information of the transaction to be positioned; otherwise, extracting the positioning information with the highest priority from the transaction information of the to-be-positioned transaction, and determining the transaction area for performing the to-be-positioned transaction according to the positioning information with the highest priority.
In an alternative implementation, the internet transaction locating device further comprises:
the first transaction extraction module is used for extracting a plurality of first internet transactions from all internet transactions in the first preset historical time period, and the transaction information of the first internet transactions comprises an IP address of a transaction terminal for performing the first internet transactions and a satellite positioning signal received by the transaction terminal for performing the first internet transactions;
the address distribution acquisition module is used for acquiring a unique area of IP address distribution of the transaction terminal for performing each first internet transaction according to the satellite positioning signal received by the transaction terminal for performing each first internet transaction;
an address segment distribution obtaining module, configured to obtain, according to a unique region of an IP address distribution of a transaction terminal that performs each first internet transaction, each region of the IP address segment to be determined and a ratio of each region, where the IP address segment to be determined is an address segment corresponding to M bits before an IP address of the transaction terminal that performs each first internet transaction;
the third judging module is used for judging whether the highest ratio in the area ratios corresponding to the IP address field to be judged is greater than a first preset percentage or not;
and the second determining module is used for determining the IP address segment to be judged as the stable IP address segment when the highest occupation ratio is greater than the first preset percentage, and determining the area corresponding to the highest occupation ratio as a fixed area distributed by the stable IP address segment.
In an alternative implementation, the internet transaction locating device further comprises:
a fourth judging module, configured to, when the IP address of the terminal to be located does not belong to the stable IP address segment, judge whether the IP address of the terminal to be located belongs to an unstable IP address segment, where the unstable IP address segment is an IP address segment distributed in more than two areas and determined according to the multiple first internet transactions, and the unstable IP address segment is an address segment corresponding to M bits before the IP address of the transaction terminal related to the multiple first internet transactions;
the fifth judging module is used for judging whether more than two areas distributed by the unstable IP address section comprise the last transaction area of the terminal to be positioned when the IP address of the terminal to be positioned belongs to the unstable IP address section;
and the third determining module is used for determining the last transaction area of the terminal to be positioned as the transaction area for performing the transaction to be positioned when the more than two areas distributed by the unstable IP address field comprise the last transaction area of the terminal to be positioned.
In an alternative implementation, the internet transaction locating device further comprises:
and a fourth determining module, configured to determine, when the highest percentage is not greater than the first preset percentage, that the IP address segment to be determined is the unstable IP address segment, and determine, as more than two regions in which the unstable IP address segment is distributed, a region that meets a preset condition in each region in which the IP address segment to be determined is distributed.
In an optional implementation manner, the positioning information extracting module is further configured to extract an identity of the terminal to be positioned from the transaction information of the transaction to be positioned, and the internet transaction positioning apparatus further includes:
the second transaction extraction module is used for extracting a plurality of second internet transactions from all internet transactions in a second preset historical time period, wherein the second preset historical time period is a historical time period corresponding to the time from a second preset historical time to the time of the to-be-positioned transaction, and the transaction information of the second internet transactions comprises the identity of a transaction terminal for performing the second internet transactions, a satellite positioning signal received by the transaction terminal for performing the second internet transactions and the time for performing the second internet transactions;
the fifth determining module is used for determining the last transaction area of the transaction terminal corresponding to each identity according to the identity of the transaction terminal performing each second internet transaction, the time of performing each second internet transaction and the satellite positioning signal received by the transaction terminal performing each second internet transaction;
and the sixth determining module is used for determining the final transaction area of the terminal to be positioned according to the identity of the terminal to be positioned and the final transaction area of the transaction terminal corresponding to each identity.
In an alternative implementation, the internet transaction locating device further comprises:
and a seventh determining module, configured to determine, when two or more areas in which the unstable IP address segment is distributed do not include the last transaction area of the terminal to be located, an area with a highest ratio among the two or more areas in which the unstable IP address segment is distributed as a transaction area for performing the transaction to be located.
In a third aspect, based on the same inventive concept as the internet transaction positioning method in the foregoing embodiment, the present invention further provides a server, as shown in fig. 5, including a memory 504, a processor 502 and a computer program stored on the memory 504 and operable on the processor 502, wherein the processor 502 implements the steps of the foregoing internet transaction positioning method when executing the program.
Where in fig. 5 a bus architecture (represented by bus 500) is shown, bus 500 may include any number of interconnected buses and bridges, and bus 500 links together various circuits including one or more processors, represented by processor 502, and memory, represented by memory 504. The bus 500 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 505 provides an interface between the bus 500 and the receiver 501 and transmitter 503. The receiver 501 and the transmitter 503 may be the same element, i.e. a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 502 is responsible for managing the bus 500 and general processing, and the memory 504 may be used for storing data used by the processor 502 in performing operations.
In a fourth aspect, based on the inventive concept of internet transaction positioning as in the previous embodiments, the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of internet transaction positioning as described above.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present specification have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all changes and modifications that fall within the scope of the specification.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present specification without departing from the spirit and scope of the specification. Thus, if such modifications and variations of the present specification fall within the scope of the claims of the present specification and their equivalents, the specification is intended to include such modifications and variations.