Method, device, storage medium and electronic device for obtaining location information
By obtaining the user ID and current location information of the user terminal, and updating the location information in the call detailed record, the problem of unrecorded or error recording in the communication network is solved, and the efficiency of network operation and maintenance and fault handling is improved.
Patent Information
- Application Number
- CN202011193715.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2040-10-30
AI Technical Summary
In a communication network, the location information of the user terminal may not be recorded or errors in the call detailed record, resulting in difficulty in network operation and maintenance and troubleshooting.
By obtaining the user identification and current location information of the target user terminal, find the corresponding call detailed record, and update the location information according to the current time and the call start time to ensure the recorded location information is accurate.
It effectively solves the problem of user terminal location information not recorded or incorrect recording, ensuring that the location information in the detailed call record is complete and accurate, thereby improving the efficiency of network operation and maintenance and fault handling.
Smart Images

Figure CN114531512B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communications, and in particular, to a method, device, storage medium and electronic device for acquiring location information. Background Art
[0002] In communication networks, the location information of user terminals is a basic information in network operation and maintenance. In many scenarios, the operation and maintenance of communication networks are based on location information. For example, when a user complains about call establishment failure or sudden call drop after call establishment, the operator needs to know the location information of the user when the call establishment fails or the call drops, so as to quickly handle the fault and improve network performance; for another example, the operator needs to conduct active business analysis based on the location information of the user terminal and present it geographically, so as to obtain which areas or cells are busy in order to carry out targeted expansion and optimization.
[0003] In the related art, the location information of a user terminal is usually obtained based on network interface data during the user access phase and recorded in a call detail record (CDR) of the user terminal. However, in actual applications, it is found that the location information may not be recorded in the call detail record, or the recorded location information may be erroneous. Summary of the invention
[0004] In order to solve the above problems, the present disclosure provides a method, device, storage medium and electronic device for obtaining location information.
[0005] In a first aspect, the present disclosure provides a method for acquiring location information, the method comprising:
[0006] Obtain a target user ID of a target user terminal;
[0007] Acquire first location information of the target user terminal at the current moment;
[0008] Determine a target call detail record from at least one call detail record according to the target user identifier and the current time, wherein the target call detail record is used to record call information of the target call of the target user terminal, and the call information includes a call start time of the target call and second location information of the target user terminal at the call start time;
[0009] The second location information is updated using the first location information according to the current time and the call start time.
[0010] Optionally, the acquiring the first location information of the target user terminal at the current moment includes:
[0011] Acquire the first location information of the target user terminal at the current moment through network interface data; or,
[0012] According to the target user identifier and the current moment, historical location information of the target user terminal is obtained from at least one historical location information, and the historical location information is used as the first location information, wherein the historical location information is location information of the target user terminal at the historical moment obtained based on network interface data at the historical moment, and the historical moment is earlier than the current moment.
[0013] Optionally, in the case of acquiring the first location information of the target user terminal at the current moment through network interface data, the method further comprises: updating the historical location information of the target user terminal according to the target user identifier and the current moment.
[0014] Optionally, the location information includes network location information, and in a case where first location information of the target user terminal at a current moment is acquired through network interface data, updating the second location information using the first location information according to the current moment and the call start time includes:
[0015] When the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, using the first network location information of the target user terminal at the current time as the second network location information in the target call detail record, and using the current time as the current update time of the second network location information;
[0016] When the absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time, the first network location information is used as the second network location information, and the current moment is used as the current update time of the second network location information.
[0017] Optionally, the location information includes network location information, and the target call detail record also includes the priority of the second network location information. In the case of acquiring the first location information of the target user terminal at the current moment through the network interface data, before updating the second location information using the first location information according to the current moment and the call start time, the method further includes:
[0018] Acquiring the priority of the first network location information of the target user terminal according to the network interface data;
[0019] The updating the second location information using the first location information according to the current time and the call start time includes:
[0020] In the case where a first preset condition is met, the first network location information of the target user terminal at the current moment is used as the second network location information in the target call detail record, and the priority of the first network location information is used as the priority of the second network location information, and the current moment is used as the current update moment of the second network location information, wherein the first preset condition includes any one of the following:
[0021] The absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is higher than the priority of the second network location information;
[0022] The absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is equal to the priority of the second network location information, and the current time is earlier than the last update time of the second network location information;
[0023] The absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time.
[0024] Optionally, the location information includes network location information and administrative area information. When the network interface data includes the user network location information, acquiring the first location information of the target user terminal at the current moment through the network interface data includes:
[0025] Acquire the first network location information of the target user terminal at the current moment through the network interface data;
[0026] Acquire administrative district information corresponding to the first network location information as first administrative district information of the target user terminal at the current moment according to the network administrative district correspondence relationship, wherein the network administrative district correspondence relationship includes administrative district information corresponding to different network location information;
[0027] The updating the second location information using the first location information according to the current time and the call start time includes:
[0028] According to the current time and the call start time, the second network location information in the target call detail record is updated using the first network location information, and the second administrative region information in the target call detail record is updated using the first administrative region information.
[0029] Optionally, when the network interface data does not include user network location information, but the network interface data includes the roaming number, area code or domain name of the target user terminal, acquiring the first location information of the target user terminal at the current moment through the network interface data further includes:
[0030] Obtaining the roaming number, area code or domain name through network interface data;
[0031] Acquire the first administrative region information according to the roaming number, area code or domain name;
[0032] The updating the second location information using the first location information according to the current time and the call start time includes:
[0033] According to the current time and the call start time, the second administrative region information in the target call detail record is updated using the first administrative region information.
[0034] In a second aspect, the present disclosure provides a device for acquiring location information, the device comprising:
[0035] A user identification acquisition module, used to acquire a target user identification of a target user terminal;
[0036] A first location information acquisition module, used to acquire the first location information of the target user terminal at the current moment;
[0037] a call detail record acquisition module, configured to determine a target call detail record from at least one call detail record according to the target user identifier and the current time, wherein the target call detail record is used to record call information of the target call of the target user terminal, and the call information includes a call start time of the target call and second location information of the target user terminal at the call start time;
[0038] The second location information updating module is used to update the second location information using the first location information according to the current time and the call start time.
[0039] Optionally, the first location information acquisition module is used to:
[0040] Acquire the first location information of the target user terminal at the current moment through network interface data; or,
[0041] According to the target user identifier and the current moment, historical location information of the target user terminal is obtained from at least one historical location information, and the historical location information is used as the first location information, wherein the historical location information is location information of the target user terminal at the historical moment obtained based on network interface data at the historical moment, and the historical moment is earlier than the current moment.
[0042] Optionally, the device further comprises:
[0043] The historical location information updating module is used to update the historical location information of the target user terminal according to the target user identifier and the current time.
[0044] Optionally, the location information includes network location information, and the second location information updating module is used to:
[0045] When the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, using the first network location information of the target user terminal at the current time as the second network location information in the target call detail record, and using the current time as the current update time of the second network location information;
[0046] When the absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time, the first network location information is used as the second network location information, and the current moment is used as the current update time of the second network location information.
[0047] Optionally, the location information includes network location information, and the device further includes:
[0048] A priority acquisition module, used to acquire the priority of the first network location information of the target user terminal according to the network interface data;
[0049] The second location information updating module is used to use the first network location information of the target user terminal at the current time as the second network location information in the target call detail record, and use the priority of the first network location information as the priority of the second network location information, and use the current time as the current update time of the second network location information when a first preset condition is met, wherein the first preset condition includes any one of the following:
[0050] The absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is higher than the priority of the second network location information;
[0051] The absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is equal to the priority of the second network location information, and the current time is earlier than the last update time of the second network location information;
[0052] The absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time.
[0053] Optionally, the location information includes network location information and administrative area information. When the network interface data includes the user network location information, the first location information acquisition module is used to acquire the first network location information of the target user terminal at the current moment through the network interface data; and acquire the administrative area information corresponding to the first network location information as the first administrative area information of the target user terminal at the current moment according to the network administrative area correspondence relationship, wherein the network administrative area correspondence relationship includes administrative area information corresponding to different network location information;
[0054] The second location information updating module is used to use the first network location information to update the second network location information in the target call detail record according to the current time and the call start time, and use the first administrative area information to update the second administrative area information in the target call detail record.
[0055] Optionally, when the network interface data does not include the user network location information, but the network interface data includes the roaming number, area code or domain name of the target user terminal, the first location information is used to obtain the roaming number, area code or domain name through the network interface data; and obtain the first administrative area information according to the roaming number, area code or domain name;
[0056] The second location information updating module is used to update the second administrative region information in the target call detail record using the first administrative region information according to the current time and the call start time.
[0057] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect of the present disclosure.
[0058] In a fourth aspect, the present disclosure provides an electronic device, comprising: a memory on which a computer program is stored; and a processor for executing the computer program in the memory to implement the steps of the method described in the first aspect of the present disclosure.
[0059] By adopting the above technical solution, by obtaining the target user identification of the target user terminal and the first location information of the target user terminal at the current time, the target call detail record of the target user terminal is determined according to the target user identification and the current time, and the second location information is updated using the first location information according to the current time and the call start time. In this way, when the second location information cannot be obtained at the start time of the user call, or the obtained second location information is inaccurate, the second location information can be updated by this method, so that accurate and complete second location information is recorded in the call detail record.
[0060] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0062] Figure 1 is a flow chart of a method for obtaining location information provided by an embodiment of the present disclosure;
[0063] Figure 2 is a structural diagram of a device for obtaining location information provided by an embodiment of the present disclosure;
[0064] Figure 3 is a structural diagram of another device for obtaining location information provided by an embodiment of the present disclosure;
[0065] Figure 4 is a structural diagram of another device for obtaining location information provided by an embodiment of the present disclosure;
[0066] Figure 5 is a block diagram of an electronic device provided by an embodiment of the present disclosure;
[0067] Figure 6 is a block diagram of another electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0068] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0069] In the description below, words such as “first” and “second” are only used for the purpose of distinguishing the description and should not be understood as indicating or implying relative importance or order.
[0070] First, the application scenario of the present disclosure is described. The present disclosure can be applied to the acquisition of location information of user terminals in a communication network, especially the acquisition of location information of user terminals in a VoLTE (Voice over LTE, voice based on LTE network) network. In the related art, the location information of the user terminal is usually acquired based on the network interface data at the start of the user call, and recorded in the call detail record (CDR) of the user terminal. The inventor found that: in actual applications, due to the complexity of the network interface, the location information cannot be obtained at the start of the user call, or the obtained location information is inaccurate, resulting in incomplete or inaccurate location information in the call detail record.
[0071] In order to solve the above problems, the present disclosure provides a method, device, storage medium and electronic device for obtaining location information. The method obtains the target user identification of the target user terminal and the first location information of the target user terminal at the current time, determines the target call detail record of the target user terminal according to the target user identification and the current time, and updates the second location information using the first location information according to the current time and the call start time. In this way, when the second location information cannot be obtained at the start time of the user call, or the obtained second location information is inaccurate, the second location information can be updated by this method, so that accurate and complete second location information is recorded in the call detail record.
[0072] It should be noted that the network interface data capable of obtaining user location information in the VoLTE network includes at least one of the following interface data: Mw interface data, Gm interface data, Rx interface data, S1 interface data, Gx interface data, Sh interface data. The above interfaces belong to the standard interfaces in the 3GPP (3rd Generation Partnership Project) protocol, and the specific description in the 3GPP protocol can be referred to, and this disclosure will not repeat them.
[0073] The preset interface priority includes: the interface data is sorted from high to low in the following order: Mw interface data priority>Rx interface data priority>S1 interface data priority>Gm interface data priority>Gx interface data priority>Sh interface data.
[0074] The specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0075] Figure 1 A method for obtaining location information provided by an embodiment of the present disclosure is as follows: Figure 1 As shown, the method includes:
[0076] S101: Acquire a target user identifier of a target user terminal.
[0077] The target user identifier may be the MSISDN (Mobile Subscriber International ISDN number) or IMSI (International Mobile Subscriber Identification number) of the target user terminal.
[0078] This step can be triggered according to the network interface data collected in the communication network, or according to an externally input instruction. Therefore, the target user identifier of the target user terminal can be obtained from the network interface data, for example, the MSISDN of the target user terminal can be obtained from the GM interface data or the GX interface data as the target user identifier; it can also be obtained according to an externally input instruction, for example, if the operator needs to query the location information of a certain target user terminal, the target user identifier can be obtained from the instruction input by the user; for another example, when the call detail record of the target user terminal needs to be queried, the method for obtaining the location information provided in this embodiment can be executed by obtaining the target user identifier of the call detail record to be queried.
[0079] S102: Acquire first location information of the target user terminal at the current moment.
[0080] In this step, there are multiple ways to obtain the first location information. For example, a location request message may be sent to the target user terminal, and the target user terminal may report the first location information at the current moment; the first location information of the target user terminal at the current moment may be obtained through the collected network interface data; or the historical location information of the target user terminal may be obtained from a historical location database.
[0081] S103: Determine a target call detail record from at least one call detail record according to the target user identifier and the current time.
[0082] The target call detail record is used to record the call information of the target call of the target user terminal, and the call information includes the call start time of the target call and the second location information of the target user terminal at the call start time.
[0083] It should be noted that the at least one call detail record mentioned above may be one or more call detail records stored in a local disk or server, each call detail record may include a user ID and a call start time, representing a call or a data service call process of a user terminal corresponding to the user ID, and the same user ID may have multiple call detail records. In addition, the second location information in the call detail record may be a valid value or an invalid value. Generally, at the start time of the call, if the location information of the target user terminal is not obtained, the second location information is an invalid value, which may be a preset invalid value or an invalid string, such as a value of 0 or a string NULL; if the location information of the target user terminal is obtained at the start time of the call, the location information of the target user terminal is used as the above-mentioned second location information.
[0084] In this step, according to the target user ID and the current time, the target user ID closest to the current time can be found from at least one call detail record, and determined as the target call detail record. The target call detail record that meets the following three conditions can be found and determined from the at least one call detail record: 1) the user ID is the same as the target user ID; 2) the call start time is less than or equal to the current time; 3) the absolute value of the time difference between the call start time and the current time is the smallest. In this way, the call detail record with the smallest absolute value of the time difference between the call start time and the current time can be obtained, so as to update the location information in the call detail record.
[0085] Furthermore, on the basis of the above three conditions, the target call detail record can also be required to meet any one of the following two conditions: the call end time in the target call detail record is later than the current time, or the absolute value of the time difference between the call start time and the current time is less than or equal to a preset search time threshold, which can be any time from 0 to 30 minutes.
[0086] S104: Update the second location information using the first location information according to the current time and the call start time.
[0087] In this step, when the current time is greater than or equal to the call start time, the first location information can be used as the second location information, that is, the second location information in the target call detail record can be replaced by the first location information.
[0088] The first location information can also be used as the second location information when the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold. The first time threshold can be less than the above-mentioned preset search time threshold. For example, the first time threshold can be any time from 0 to 20 minutes.
[0089] By adopting the above method, the target user identification of the target user terminal is obtained, the first location information of the target user terminal at the current time is obtained, the target call detailed record of the target user terminal is determined according to the target user identification and the current time, and the second location information is updated using the first location information according to the current time and the call start time. In this way, when the second location information cannot be obtained at the start time of the user call, or the obtained second location information is incomplete or inaccurate, the second location information can be updated by this method, thereby obtaining accurate and complete second location information.
[0090] It should be noted that the location information described in the present disclosure may include longitude and latitude information, such as longitude and latitude reported by the terminal, or longitude and latitude information of the terminal obtained in the communication network according to the signaling of the terminal; on the other hand, the location information described in the present disclosure may also include network location information and / or administrative area information, wherein the network location information may include: one or more of the cell identifier, base station identifier and location area identifier, and the administrative area information may include one or more of the country, province, city, district, county and township. That is, the first location information in the above embodiment may include the first network location information and / or the first administrative area information; the above second location information may include the second network location information and / or the second administrative area information.
[0091] Optionally, the first location information may be obtained in step S102 in one or both of the following two ways:
[0092] Method 102-1: Acquire the first location information of the target user terminal at the current moment through network interface data.
[0093] The network interface data of the target user terminal during the call process can be obtained, and the first location information of the target user terminal at the current moment can be obtained according to the network interface data. The network interface data can be one or more of Mw interface data, Gm interface data, Rx interface data, S1 interface data, Gx interface data and Sh interface data.
[0094] By way of example, the first location information may include a cell identifier and a location area identifier. The cell identifier may be the ECI (E-UTRAN Cell Identifier) in the 3GPP protocol. The cell identifier and the location area identifier may be collected from the Invite request message of the Gm interface data, and the first location information may be obtained based on the cell identifier and the location area identifier. The specific acquisition method may refer to the field definition in the 3GPP protocol.
[0095] Mode 102-2: according to the target user identifier and the current time, obtain the historical location information of the target user terminal from at least one historical location information, and use the historical location information as the first location information.
[0096] The historical location information is location information of the target user terminal at a historical moment obtained according to network interface data at the historical moment, and the historical moment is earlier than the current moment.
[0097] The at least one historical location information may be temporary location information stored in a memory or a database, which records the user identification, historical location information and the historical moment of obtaining the historical location information of each user terminal.
[0098] In this way, when the first location information cannot be obtained through the network interface data, the historical location information of the target user terminal can be obtained as the first location information, which can increase the completeness of the user location information acquisition.
[0099] Furthermore, it is also possible to determine whether the absolute value of the time difference between the historical moment and the call start moment is less than or equal to the second time threshold. If it is determined that the absolute value of the time difference between the historical moment and the call start moment is less than or equal to the second time threshold, the historical location information is used as the first location information. In this way, it is considered that the historical location information within the second time threshold of the call start moment is accurate and can be used as the first location information, which can further increase the accuracy of obtaining the user location information.
[0100] In addition, the above historical location information can also be updated in time. When the first location information of the target user terminal at the current moment is obtained through the network interface data, the historical location information of the target user terminal can be updated according to the target user identifier and the current moment.
[0101] For example, after obtaining the first location information, it can be confirmed based on the target user identifier whether the target user terminal has historical location information stored in the memory or database. If the historical location information has been stored, the historical location information is updated to the first location information, and the historical moment when the historical location information was obtained is recorded as the current moment. If the target user terminal does not store historical location information in the memory or database, a new historical location information can be stored, with the first location information of the target user identifier as the historical location information and the current moment as the historical moment.
[0102] In this way, it can be ensured that the historical location information is the latest location information of the target user terminal, and when the historical location information is needed, more accurate location information can be obtained.
[0103] In some other embodiments of the present disclosure, the above-mentioned location information may include network location information, that is, the first location information includes the first network location information, and the second location information includes the second network location information. In the case where the above-mentioned step S102 is to obtain the first location information of the target user terminal at the current moment through the network interface data, the above-mentioned step S104 may be implemented in the following two ways to update the second location information using the first location information according to the current moment and the call start time:
[0104] Method 104-1: When the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, the first network location information of the target user terminal at the current time is used as the second network location information, and the current time is used as the current update time of the second network location information.
[0105] Among them, the first time threshold can be a preset time for confirming that the user location information is credible, which is related to the user's movement speed. In communication networks where the user movement speed is faster, such as highways and high-speed railways, the first time threshold can be set to a shorter time, for example, it can be any time from 0 to 2 minutes; and in communication networks where the user movement speed is slower, such as urban residential areas and business districts, the first time threshold can be set to a longer time, for example, it can be any time from 0 to 20 minutes.
[0106] In this way, when the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, the first network location information is credible and can be used as the second network location information to obtain accurate location information of the user terminal.
[0107] Method 104-2: When the absolute value of the time difference between the current time and the call start time is greater than the above-mentioned first time threshold, and the absolute value of the time difference between the current time and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time, the first network location information is used as the second network location information, and the current time is used as the current update time of the second network location information.
[0108] In this way, when the conditions in the above-mentioned method 104-2 are met, the first network location information is closer to the call start time than the second network location information, so relatively accurate location information of the user terminal can be obtained.
[0109] It should be noted that, in the above manner, if the first network location information is consistent with the second network location information, the second network location information may continue to remain unchanged.
[0110] In some other embodiments of the present disclosure, the above-mentioned location information may also include network location information, that is, the first location information includes the first network location information, the second location information includes the second network location information, and the target call detail record may further include the priority of the second network location information, so that:
[0111] In the case where the first location information of the target user terminal at the current moment is obtained through the network interface data in the above step S102, the priority of the first network location information can also be obtained according to the network interface data.
[0112] Among them, the priority of the first network location information can be used to characterize the accuracy of the location information in the network interface data. The higher the priority, the higher the corresponding accuracy. By way of example, the network interface data may include: Mw interface data, Gm interface data, Rx interface data, S1 interface data, Gx interface data, Sh interface data, etc. The priority of the first network location information obtained from the above network interface data can be sorted from high to low in the following order: Mw interface data priority>Rx interface data priority>S1 interface data priority>Gm interface data priority>Gx interface data priority>Sh interface data. Of course, the priority of the above network interface data is used for example, and can also be sorted according to other priorities.
[0113] Then, the method of using the first location information to update the second location information in the above step S104 may be: when a first preset condition is met, the first network location information is used as the second network location information, the priority of the first network location information is used as the priority of the second network location information, and the current time is used as the current update time of the second network location information, wherein the first preset condition includes any one of the following conditions:
[0114] Condition 1: the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is higher than the priority of the second network location information;
[0115] Condition 2: the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is equal to the priority of the second network location information, and the current time is earlier than the last update time of the second network location;
[0116] Condition 3: The absolute value of the time difference between the current time and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current time and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time.
[0117] It should be noted that, when the above-mentioned first preset condition is met, it can be confirmed that the first network location information is more accurate than the second network location information. Therefore, the first network location information can be used as the second network location information to record more accurate location information in the call detail record.
[0118] In some other embodiments of the present disclosure, the above-mentioned location information may include network location information and administrative district information, that is, the first location information includes first network location information and first administrative district information, and the second location information includes second network location information and second administrative district information. In this way, when the network interface data includes the user network location information, the first location information of the target user terminal at the current moment can be obtained in the following manner:
[0119] The first network location information of the target user terminal at the current moment is obtained through the network interface data; and the administrative district information corresponding to the first network location information is obtained according to the network administrative district correspondence as the first administrative district information of the target user terminal at the current moment.
[0120] The network administrative region correspondence relationship includes administrative region information corresponding to different network location information. For example, the network location information may include TAC, the administrative region information may include a city, and the network administrative region correspondence relationship may be a correspondence relationship as shown in Table 1 below.
[0121] Network location information Administrative district information TAC100 A city TAC101 A city TAC102 City B
[0122] Table 1
[0123] As shown in Table 1: TAC100 and TAC101 correspond to city A, and TAC102 corresponds to city B. In this way, if the acquired TAC is 101, then according to the network administrative region correspondence, it can be obtained that the administrative region information corresponding to the TAC is city A, and city A can be used as the first administrative region information of the target user terminal at the current moment.
[0124] Then, according to the current time and the call start time, the second network location information in the target call detail record may be updated using the first network location information, and the second administrative region information in the target call detail record may be updated using the first administrative region information.
[0125] For example, when the current time is greater than or equal to the call start time, the first location information can be used as the second location information, and the first administrative district information can be used as the second administrative district information; or when the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, the first location information can be used as the second location information, and the first administrative district information can be used as the second administrative district information.
[0126] In this way, through the above method, the network location information of the user terminal can be obtained, and the corresponding administrative area information can be obtained based on the network location information of the user terminal. The second network location information and the second administrative area information of the target user terminal are also recorded in the call detail record, and the operation and maintenance of the communication network.
[0127] Optionally, when the network interface data does not include user network location information, but the network interface data includes the roaming number, area code or domain name of the target user terminal, the roaming number, area code or domain name can be obtained through the network interface data; the first administrative district information can be obtained based on the roaming number, area code or domain name; and the second administrative district information in the target call detail record can be updated using the first administrative district information based on the source time of the interface data and the call start time.
[0128] Among them, the CSRN (CS Domain Routing Number) field in the UDA (User Data Answer) message of the Sh interface data can be obtained as the roaming number. For example, if the CSRN is 86139XXXXXX, the roaming number is determined to be 86139XXXXXX. According to the roaming number, the city to which the number belongs can be determined, and the city can be used as the first administrative region information.
[0129] In addition, the area code or domain name can also be obtained from the SBC-DOMAIN field of the INVITE message of the Mw port. For example, the SBC-DOMAIN field contained in the INVITE message is sbc03.020.001.gd.gz.chinamobile.com, where 020 is the area code and gd.gz is the domain name. Accordingly, according to the area code 020, it can be determined that the corresponding city is M, and according to the domain name gd.gz, it can also be determined that the corresponding city is M. It should be noted that the format of the sbc-domain can be preset, and the area code and domain name therein, as well as the administrative district information corresponding to the area code and domain name, can be determined according to the preset format.
[0130] In this way, when the network interface data does not contain the user's network location information, the first administrative district information can be obtained through the roaming number, area code or domain name, and the first administrative district information can be used as the second administrative district information in the target call detail record, thus ensuring the integrity of the location information record.
[0131] In addition, the above-mentioned updating of the second administrative region information in the target call detail record by using the first administrative region information according to the current time and the call start time can be implemented in the following manner:
[0132] If the absolute value of the time difference between the current time and the call start time is less than or equal to the second time threshold, the first administrative region information is used as the second administrative region information, and the current time is used as the current update time of the second administrative region information.
[0133] The second time threshold may be equal to or different from the first time threshold. The second deletion threshold may be a preset time for confirming that the acquired first administrative district information is credible, for example, any time from 0 to 60 minutes. In this way, when the absolute value of the time difference between the current time and the call start time is less than or equal to the second time threshold, the first administrative district information is credible, and the first administrative district information may be used as the second administrative district information to record the accurate second administrative district information of the target user terminal in the target call detail record.
[0134] Furthermore, the second administrative district information may be updated using the first administrative district information according to the last update time of the second administrative district information and the call start time. The updating method may be the following two methods:
[0135] If the absolute value of the time difference between the last update time of the second administrative district information and the call start time is greater than the third time threshold, the first administrative district information is used as the second administrative district information, and the current time is used as the current update time of the second administrative district information;
[0136] If the absolute value of the time difference between the last update time of the second administrative district information and the call start time is greater than the third time threshold, and the absolute value of the time difference between the current time and the call start time is less than the absolute value of the time difference between the last update time of the second administrative district information and the call start time, the first administrative district information is used as the second administrative district information, and the current time is used as the current update time of the second administrative district information.
[0137] Among them, the third time threshold can be any time from 1 minute to 1440 minutes. When the absolute value of the time difference between the last update time of the second administrative district information and the call start time is greater than the third time threshold, the second administrative district information is no longer credible. Therefore, the first administrative district information is used to update the second administrative district information to record relatively accurate administrative district information of the user terminal.
[0138] Figure 2 is a schematic diagram of a structure of a device for obtaining location information provided by an embodiment of the present disclosure, such as Figure 2 As shown, the device comprises:
[0139] A user identification acquisition module 201 is used to acquire a target user identification of a target user terminal;
[0140] A first location information acquisition module 202, used to acquire first location information of the target user terminal at the current moment;
[0141] A call detail record acquisition module 203, configured to determine a target call detail record from at least one call detail record according to the target user identifier and the current time, wherein the target call detail record is used to record call information of the target call of the target user terminal, and the call information includes a call start time of the target call and second location information of the target user terminal at the call start time;
[0142] The second location information updating module 204 is configured to update the second location information using the first location information according to the current time and the call start time.
[0143] Optionally, the first location information obtaining module 202 is used to:
[0144] Acquire the first location information of the target user terminal at the current moment through network interface data; or,
[0145] Based on the target user identifier and the current moment, historical location information of the target user terminal is obtained from at least one historical location information, and the historical location information is used as the first location information, wherein the historical location information is location information of the target user terminal at the historical moment obtained based on network interface data at the historical moment, and the historical moment is earlier than the current moment.
[0146] Optionally, Figure 3 is a schematic diagram of the structure of another device for obtaining location information provided by an embodiment of the present disclosure, such as Figure 3 As shown, the device also includes:
[0147] The historical location information updating module 301 is used to update the historical location information of the target user terminal according to the target user identifier and the current time.
[0148] Optionally, the location information includes network location information, and the second location information updating module 204 is used to:
[0149] When the absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, the first network location information of the target user terminal at the current time is used as the second network location information in the target call detail record, and the current time is used as the current update time of the second network location information;
[0150] When the absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time, the first network location information is used as the second network location information, and the current moment is used as the current update time of the second network location information.
[0151] Optionally, Figure 4 is a schematic diagram of the structure of another device for obtaining location information provided by an embodiment of the present disclosure, such as Figure 4 As shown, the location information includes network location information, and the device also includes:
[0152] A priority acquisition module 401, configured to acquire the priority of the first network location information of the target user terminal according to the network interface data;
[0153] The second location information updating module 204 is used to use the first network location information of the target user terminal at the current moment as the second network location information in the target call detail record, and use the priority of the first network location information as the priority of the second network location information, and use the current moment as the current update moment of the second network location information when a first preset condition is met, wherein the first preset condition includes any one of the following:
[0154] An absolute value of a time difference between the current time and the call start time is less than or equal to a first time threshold, and a priority of the first network location information is higher than a priority of the second network location information;
[0155] The absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is equal to the priority of the second network location information, and the current time is earlier than the last update time of the second network location information;
[0156] The absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time.
[0157] Optionally, the location information includes network location information and administrative district information. When the network interface data includes the user network location information, the first location information acquisition module 202 is used to acquire the first network location information of the target user terminal at the current moment through the network interface data; and acquire the administrative district information corresponding to the first network location information as the first administrative district information of the target user terminal at the current moment according to the network administrative district correspondence relationship, wherein the network administrative district correspondence relationship includes administrative district information corresponding to different network location information;
[0158] The second location information updating module 204 is used to use the first network location information to update the second network location information in the target call detail record according to the current time and the call start time, and use the first administrative area information to update the second administrative area information in the target call detail record.
[0159] Optionally, when the network interface data does not include the user network location information, but the network interface data includes the roaming number, area code or domain name of the target user terminal, the first location information is used to obtain the roaming number, area code or domain name through the network interface data; and obtain the first administrative area information according to the roaming number, area code or domain name;
[0160] The second location information updating module 204 is configured to update the second administrative region information in the target call detail record using the first administrative region information according to the current time and the call start time.
[0161] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0162] Figure 5 FIG. 5 is a block diagram of an electronic device 500 according to an exemplary embodiment. Figure 5 As shown, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input / output (I / O) interface 504, and a communication component 505.
[0163] The processor 501 is used to control the overall operation of the electronic device 500 to complete all or part of the steps in the above-mentioned method for obtaining location information. The memory 502 is used to store various types of data to support the operation of the electronic device 500, and these data may include, for example, instructions for any application or method used to operate on the electronic device 500, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 503 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 502 or sent through the communication component 505. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 504 provides an interface between the processor 501 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 505 may include: Wi-Fi module, Bluetooth module, NFC module, etc.
[0164] In an exemplary embodiment, the electronic device 500 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned method for obtaining location information.
[0165] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned method for obtaining location information are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 502 including program instructions, and the above-mentioned program instructions can be executed by the processor 501 of the electronic device 500 to complete the above-mentioned method for obtaining location information.
[0166] Figure 6 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be provided as a server. Figure 6 The electronic device 600 includes a processor 622, which may be one or more, and a memory 632 for storing a computer program executable by the processor 622. The computer program stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processor 622 may be configured to execute the computer program to perform the above-mentioned method for obtaining location information.
[0167] In addition, the electronic device 600 may further include a power supply component 626 and a communication component 650, wherein the power supply component 626 may be configured to perform power management of the electronic device 600, and the communication component 650 may be configured to implement communication, for example, wired or wireless communication, of the electronic device 600. In addition, the electronic device 600 may further include an input / output (I / O) interface 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server™, Mac OSX™, Unix™, Linux™, etc.
[0168] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned method for obtaining location information are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 632 including program instructions, and the above-mentioned program instructions can be executed by the processor 622 of the electronic device 600 to complete the above-mentioned method for obtaining location information.
[0169] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above method for acquiring position information when executed by the programmable device.
[0170] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0171] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0172] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A method for obtaining location information, characterized in that: The method comprises: Obtain a target user ID of a target user terminal; Acquire first location information of the target user terminal at the current moment; Determine a target call detail record from at least one call detail record according to the target user identifier and the current time, wherein the target call detail record is used to record call information of the target call of the target user terminal, and the call information includes a call start time of the target call and second location information of the target user terminal at the call start time; updating the second location information using the first location information according to the current time and the call start time; Determining a target call detail record from at least one call detail record according to the target user identifier and the current time includes: According to the target user identifier and the current time, taking a call detail record that satisfies a preset screening condition in at least one call detail record as the target call detail record; The preset screening conditions include: the user ID is the same as the target user ID; the call start time is less than or equal to the current time; the absolute value of the time difference between the call start time and the current time is the smallest; The location information includes network location information, and in the case where the first location information of the target user terminal at the current moment is acquired through network interface data, the updating of the second location information using the first location information according to the current moment and the call start time includes: in the case where the absolute value of the time difference between the current moment and the call start time is less than or equal to a first time threshold, using the first network location information of the target user terminal at the current moment as the second network location information in the target call detail record, and using the current moment as the current update time of the second network location information; When the absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time, the first network location information is used as the second network location information, and the current moment is used as the current update time of the second network location information.
2. The method according to claim 1, characterized in that The acquiring the first location information of the target user terminal at the current moment includes: Acquire the first location information of the target user terminal at the current moment through network interface data; or, According to the target user identifier and the current moment, historical location information of the target user terminal is obtained from at least one historical location information, and the historical location information is used as the first location information, wherein the historical location information is location information of the target user terminal at the historical moment obtained based on network interface data at the historical moment, and the historical moment is earlier than the current moment.
3. The method according to claim 2, characterized in that In the case of acquiring the first location information of the target user terminal at the current moment through the network interface data, the method further includes: The historical location information of the target user terminal is updated according to the target user identifier and the current time.
4. The method according to claim 2, characterized in that: The location information includes network location information, the target call detail record also includes the priority of the second network location information, and in the case of acquiring the first location information of the target user terminal at the current time through the network interface data, before updating the second location information using the first location information according to the current time and the call start time, the method further includes: Acquiring the priority of the first network location information of the target user terminal according to the network interface data; The updating the second location information using the first location information according to the current time and the call start time includes: In the case where a first preset condition is met, the first network location information of the target user terminal at the current moment is used as the second network location information in the target call detail record, and the priority of the first network location information is used as the priority of the second network location information, and the current moment is used as the current update moment of the second network location information, wherein the first preset condition includes any one of the following: The absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is higher than the priority of the second network location information; The absolute value of the time difference between the current time and the call start time is less than or equal to the first time threshold, and the priority of the first network location information is equal to the priority of the second network location information, and the current time is earlier than the last update time of the second network location information; The absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update time of the second network location information and the call start time.
5. The method according to claim 2, characterized in that: The location information includes network location information and administrative area information. When the network interface data includes the user network location information, obtaining the first location information of the target user terminal at the current moment through the network interface data includes: Acquire the first network location information of the target user terminal at the current moment through the network interface data; Acquire administrative district information corresponding to the first network location information as first administrative district information of the target user terminal at the current moment according to the network administrative district correspondence relationship, wherein the network administrative district correspondence relationship includes administrative district information corresponding to different network location information; The updating the second location information using the first location information according to the current time and the call start time includes: According to the current time and the call start time, the second network location information in the target call detail record is updated using the first network location information, and the second administrative region information in the target call detail record is updated using the first administrative region information.
6. The method according to claim 5, characterized in that In a case where the network interface data does not include the user network location information, but the network interface data includes the roaming number, area code or domain name of the target user terminal, the acquiring the first location information of the target user terminal at the current moment through the network interface data further includes: Obtaining the roaming number, area code or domain name through network interface data; Acquire the first administrative region information according to the roaming number, area code or domain name; The updating the second location information using the first location information according to the current time and the call start time includes: According to the current time and the call start time, the second administrative region information in the target call detail record is updated using the first administrative region information.
7. A device for obtaining location information, characterized in that: The device comprises: A user identification acquisition module, used to acquire a target user identification of a target user terminal; A first location information acquisition module, used to acquire the first location information of the target user terminal at the current moment; a call detail record acquisition module, configured to determine a target call detail record from at least one call detail record according to the target user identifier and the current time, wherein the target call detail record is used to record call information of the target call of the target user terminal, and the call information includes a call start time of the target call and second location information of the target user terminal at the call start time; A second location information updating module, configured to update the second location information using the first location information according to the current time and the call start time; The call detail record acquisition module is used to use the call detail record that meets the preset screening conditions in at least one call detail record as the target call detail record according to the target user identifier and the current time; wherein the preset screening conditions include: the user identifier is the same as the target user identifier; the call start time is less than or equal to the current time; the absolute value of the time difference between the call start time and the current time is the smallest; The location information includes network location information. When the first location information of the target user terminal at the current moment is obtained through network interface data, the second location information updating module is used to use the first network location information of the target user terminal at the current moment as the second network location information in the target call detail record, and use the current moment as the current update moment of the second network location information, when the absolute value of the time difference between the current moment and the call start time is less than or equal to the first time threshold; and use the first network location information as the second network location information, and use the current moment as the current update moment of the second network location information, when the absolute value of the time difference between the current moment and the call start time is greater than the first time threshold, and the absolute value of the time difference between the current moment and the call start time is less than the absolute value of the time difference between the last update moment of the second network location information and the call start time.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
9. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for realizing special service call in IP multimedia subsystem and system thereof
CN101448224A
Call routing method and system of number portability businesses as well as network element equipment
CN102348200A