CN116738073B - Residence identification methods, equipment and storage media - Google Patents

Residence identification methods, equipment and storage media Download PDF

Info

Publication number
CN116738073B
CN116738073B CN202211150370.4A CN202211150370A CN116738073B CN 116738073 B CN116738073 B CN 116738073B CN 202211150370 A CN202211150370 A CN 202211150370A CN 116738073 B CN116738073 B CN 116738073B
Authority
CN
China
Prior art keywords
longitude
time period
stay
latitude
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211150370.4A
Other languages
Chinese (zh)
Other versions
CN116738073A (en
Inventor
谢泽雄
朱廷锴
徐传印
熊健
黄桂武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211150370.4A priority Critical patent/CN116738073B/en
Publication of CN116738073A publication Critical patent/CN116738073A/en
Application granted granted Critical
Publication of CN116738073B publication Critical patent/CN116738073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

本申请提供了一种常驻地的识别方法、设备及存储介质。该方法通过对确定第二时间段包括的第一停留点,并基于近邻聚类方式将多个相同的第一停留点合并为一个第二停留点,进而保证每一个第二时间段内的停留点都具备唯一性,赋予了每一个停留点在聚类过程中实际的物理含义,从而保证最终基于近邻聚类方式将第一时间段内相同的第二停留点聚类为一个聚类簇后,对于任意一个聚类簇,每有一个第二停留点,就代表用户在该聚类簇中出现的天数,这样根据不同的业务场景需要,通过设定不同的天数阈值就可以选取不同的停留点作为该业务场景下的常驻地,从而能够基于识别出的常驻地为用户提供更加丰富多彩的服务。

This application provides a permanent location identification method, equipment and storage medium. This method determines the first stay points included in the second time period and merges multiple identical first stay points into one second stay point based on neighbor clustering, thereby ensuring the stay in each second time period. The points are all unique, giving each stay point actual physical meaning in the clustering process, thereby ensuring that the same second stay point in the first time period is finally clustered into a cluster based on the nearest neighbor clustering method. , for any cluster, each second stay point represents the number of days the user has appeared in the cluster. In this way, according to the needs of different business scenarios, different stay points can be selected by setting different days thresholds. As the resident location in this business scenario, users can be provided with more colorful services based on the identified resident location.

Description

常驻地的识别方法、设备及存储介质Residence identification methods, equipment and storage media

技术领域Technical field

本申请涉及数据处理技术领域,尤其涉及一种常驻地的识别方法、设备及存储介质。The present application relates to the field of data processing technology, and in particular to a resident identification method, equipment and storage medium.

背景技术Background technique

近年来随着移动互联网的发展和居民生活水平的不断提高,手机等移动终端智能设备已经成为人们生活中不可或缺的一部分。为了给用户带来更好的使用体验,目前的移动互联网应用可以通过感知用户情景,进而给用户提供更丰富的个性化服务,例如当用户在不同的常驻地时,可以根据用户在该常驻地的行为习惯,进行精细化推荐。In recent years, with the development of mobile Internet and the continuous improvement of residents' living standards, mobile terminal smart devices such as mobile phones have become an indispensable part of people's lives. In order to provide users with a better user experience, current mobile Internet applications can provide users with richer personalized services by sensing the user's situation. Based on the resident’s behavioral habits, make refined recommendations.

而常驻地通常是基于用户的停留点确定的,因此如何对用户的停留点进行处理,以精准的识别出用户的常驻地显得尤为迫切。The permanent residence is usually determined based on the user's stay points, so how to process the user's stay points to accurately identify the user's permanent residence is particularly urgent.

发明内容Contents of the invention

为了解决上述技术问题,本申请提供一种常驻地的识别方法、设备及存储介质,通过采用近邻聚类的聚类方式对用户的停留点进行聚类处理,同时对每一天的停留点进行合并处理,赋予每一个停留点在聚类过程中的实际物理意义,从而使得基于处理后的停留点识别出的常驻地更加精准。In order to solve the above technical problems, this application provides a permanent residence identification method, equipment and storage medium, by using the clustering method of nearest neighbor clustering to cluster the user's stay points, and at the same time, the stay points of each day are clustered. The merging process gives each stay point its actual physical meaning in the clustering process, thereby making the resident place identified based on the processed stay points more accurate.

第一方面,本申请提供一种常驻地的识别方法。该方法包括:获取用户使用的电子设备在第一时间段记录的信令数据,第一时间段包括至少一个第二时间段;对于每一个第二时间段,根据第二时间段的信令数据,确定用户在第二时间段的第一停留点;对于每一个第二时间段,基于近邻聚类的聚类方式,对第二时间段内的第一停留点进行合并,得到第二停留点;基于近邻聚类的聚类方式,将第一时间段内相同的第二停留点聚类为一个聚类簇;对于每一个聚类簇,当聚类簇中的第二停留点数量满足设定要求时,将聚类簇中的第二停留点确定为第一常驻地。In the first aspect, this application provides a permanent residence identification method. The method includes: obtaining signaling data recorded by an electronic device used by a user in a first time period, where the first time period includes at least one second time period; for each second time period, according to the signaling data of the second time period , determine the user's first stay point in the second time period; for each second time period, based on the clustering method of neighbor clustering, merge the first stay points in the second time period to obtain the second stay point ; Based on the clustering method of nearest neighbor clustering, the same second stay points in the first time period are clustered into a cluster; for each cluster, when the number of second stay points in the cluster satisfies the set When the requirements are determined, the second stay point in the cluster is determined as the first permanent place.

由此,通过对确定第二时间段包括的第一停留点,并基于近邻聚类方式将多个相同的第一停留点合并为一个第二停留点,进而保证每一个第二时间段内的停留点都具备唯一性,赋予了每一个停留点在聚类过程中实际的物理含义,从而保证最终基于近邻聚类方式将第一时间段内相同的第二停留点聚类为一个聚类簇后,对于任意一个聚类簇,每有一个第二停留点,就代表用户在该聚类簇中出现的天数,这样根据不同的业务场景需要,通过设定不同的天数阈值就可以选取不同的停留点作为该业务场景下的常驻地,从而能够基于识别出的常驻地为用户提供更加丰富多彩的服务。Therefore, by determining the first stay points included in the second time period and merging multiple identical first stay points into one second stay point based on neighbor clustering, it is thus ensured that the first stay points in each second time period are All stay points are unique, giving each stay point actual physical meaning in the clustering process, thereby ensuring that the same second stay point in the first time period is finally clustered into a cluster based on the nearest neighbor clustering method. Finally, for any cluster, each second stay point represents the number of days the user has appeared in the cluster. In this way, according to the needs of different business scenarios, different days thresholds can be set to select different The stay point serves as the resident place in this business scenario, so that users can be provided with more colorful services based on the identified resident place.

根据第一方面,对于每一个第二时间段,根据第二时间段的信令数据,确定用户在第二时间段的第一停留点,包括:对于每一个第二时间段,确定第二时间段内每两条信令数据对应的空间位置之间的距离;对于每一个空间位置,当存在与空间位置之间的距离满足设定的第一距离阈值的空间位置时,确定电子设备在空间位置以及与空间位置之间的距离满足设定的第一距离阈值的空间位置停留的停留时间;当停留时间满足设定的时间阈值时,将空间位置以及与空间位置之间的距离满足设定的第一距离阈值的空间位置确定为一个第一停留点。According to the first aspect, for each second time period, determining the user's first stay point in the second time period according to the signaling data of the second time period includes: for each second time period, determining the second time The distance between the spatial positions corresponding to each two pieces of signaling data in the segment; for each spatial position, when there is a spatial position whose distance from the spatial position meets the set first distance threshold, it is determined that the electronic device is in the space The position and the distance between the spatial position and the spatial position satisfy the set first distance threshold. The dwell time of the spatial position; when the dwell time satisfies the set time threshold, the spatial position and the distance between the spatial position and the spatial position satisfy the set first distance threshold. The spatial position of the first distance threshold is determined as a first stay point.

由此,实现的每一个第二时间段中,使用电子设备的用户所有停留点的确定。Thus, the determination of all stay points of the user using the electronic device in each second time period is achieved.

根据第一方面,或者以上第一方面的任意一种实现方式,在确定第二时间段内每两条信令数据对应的空间位置之间的距离之后,方法还包括:对于每一个空间位置,当存在与空间位置之间的距离满足设定的第二距离阈值的空间位置时,将空间位置以及与空间位置之间的距离满足设定的第二距离阈值的空间位置合并为一个合并空间位置,第二距离阈值小于第一距离阈值。According to the first aspect, or any implementation of the above first aspect, after determining the distance between the spatial positions corresponding to each two pieces of signaling data in the second time period, the method further includes: for each spatial position, When there is a spatial position whose distance from the spatial position satisfies the set second distance threshold, the spatial position and the spatial position whose distance from the spatial position satisfies the set second distance threshold are merged into one merged spatial position. , the second distance threshold is smaller than the first distance threshold.

由此,通过将多个聚集在一起的空间位置合并为一个空间位置,从而减少了后续的数据处理量。As a result, the amount of subsequent data processing is reduced by merging multiple spatial locations that are gathered together into one spatial location.

根据第一方面,或者以上第一方面的任意一种实现方式,对于每一个合并空间位置,根据合并空间位置中包括的每一个空间位置的经纬度信息,计算平均经度和平均纬度;将平均经度和平均纬度,作为合并空间位置的经纬度信息。According to the first aspect, or any implementation of the above first aspect, for each merged spatial position, calculate the average longitude and the average latitude based on the longitude and latitude information of each spatial position included in the merged spatial position; add the average longitude and Average latitude, as the latitude and longitude information of the combined spatial location.

由此,通过将合并空间位置中包括的多个空间位置的经度和纬度进行平均处理,从而将平均经度和平均纬度作为合并空间位置对应的经纬度信息,从而便于后续数据处理。Therefore, by averaging the longitude and latitude of multiple spatial locations included in the merged spatial location, the average longitude and average latitude are used as the longitude and latitude information corresponding to the merged spatial location, thereby facilitating subsequent data processing.

根据第一方面,或者以上第一方面的任意一种实现方式,对于每一个第二时间段,基于近邻聚类的聚类方式,对第二时间段内的第一停留点进行合并,得到第二停留点,包括:对于每一个第二时间段,确定第二时间段内每两个第一停留点之间的距离;对于每一个第一停留点,基于近邻聚类的聚类方式,将第一停留点,以及与第一停留点之间的距离满足设定的第三距离阈值的第一停留点合并为一个第二停留点。According to the first aspect, or any implementation of the above first aspect, for each second time period, the first stay points in the second time period are merged based on the clustering method of nearest neighbor clustering to obtain the second time period. The second stay point includes: for each second time period, determine the distance between every two first stay points in the second time period; for each first stay point, based on the clustering method of nearest neighbor clustering, The first stay point and the first stay point whose distance from the first stay point meets the set third distance threshold are combined into a second stay point.

由此,基于近邻聚类的聚类方式,按照上述处理逻辑,便可以将每一个第二时间段内包括的多个相同的第一停留点合并为一个第二停留点,保证了最终合并处理后多个第二停留点都是不相同的停留点。Therefore, based on the clustering method of nearest neighbor clustering, according to the above processing logic, multiple identical first stay points included in each second time period can be merged into one second stay point, ensuring the final merging process. The last plurality of second stopping points are all different stopping points.

根据第一方面,或者以上第一方面的任意一种实现方式,对于每一个第二时间段,确定第二时间段内每两个第一停留点之间的距离,包括:对于每一个第二时间段中的每一个第一停留点,根据第一停留点中包括的每一个空间位置的经纬度信息,计算平均经度和平均纬度;将平均经度和平均纬度,作为第一停留点的经纬度信息;对于每一个第二时间段,根据每两个第一停留点的经纬度信息,确定每两个第一停留点之间的距离。According to the first aspect, or any implementation of the above first aspect, for each second time period, determining the distance between every two first stay points in the second time period includes: for each second time period For each first stay point in the time period, calculate the average longitude and average latitude based on the longitude and latitude information of each spatial location included in the first stay point; use the average longitude and average latitude as the longitude and latitude information of the first stay point; For each second time period, the distance between each two first stay points is determined based on the latitude and longitude information of each two first stay points.

由此,通过将第一停留点中包括的多个空间位置的经度和纬度进行平均处理,从而将平均经度和平均纬度作为第一停留点对应的经纬度信息,从而便于后续数据处理。Therefore, by averaging the longitude and latitude of multiple spatial locations included in the first stay point, the average longitude and average latitude are used as the longitude and latitude information corresponding to the first stay point, thereby facilitating subsequent data processing.

根据第一方面,或者以上第一方面的任意一种实现方式,在得到第二停留点之后,方法还包括:对于每一个第二停留点,确定第二停留点对应的第一经纬度信息提取位和第二经纬度信息提取位;对第二停留点中包括的空间位置按序排列,提取第一经纬度信息提取位的空间位置的第一经度和第一纬度,以及第二经纬度信息提取位的空间位置的第二经度和第二纬度;根据第一经度和第二经度,确定经度保留区间;根据第一纬度和第二纬度,确定纬度保留区间;剔除第二停留点中经度不在经度保留区间,且纬度不在纬度保留区间的空间位置。According to the first aspect, or any implementation of the first aspect above, after obtaining the second stay point, the method further includes: for each second stay point, determining the first latitude and longitude information extraction location corresponding to the second stay point. and the second latitude and longitude information extraction bit; arrange the spatial locations included in the second stop point in order, extract the first longitude and first latitude of the spatial location of the first longitude and latitude information extraction bit, and the second longitude and latitude information extraction bit The second longitude and second latitude of the spatial location; determine the longitude retention interval based on the first longitude and the second longitude; determine the latitude retention interval based on the first latitude and the second latitude; eliminate the longitude in the second stay point that is not retained in the longitude interval, and the latitude is not in the spatial position of the latitude-preserved interval.

根据第一方面,或者以上第一方面的任意一种实现方式,确定第二停留点对应的第一经纬度信息提取位和第二经纬度信息提取位,包括:确定第二停留点中包括的空间位置的数量;根据数量确定第一中间位;将第一位与第一中间位之间的中间位确定为第二停留点对应的第一经纬度信息提取位;将第一中间位与最后一位之间的中间位确定为第二停留点对应的第二经纬度信息提取位。According to the first aspect, or any implementation of the above first aspect, determining the first longitude and latitude information extraction bit and the second longitude and latitude information extraction bit corresponding to the second stay point includes: determining the spatial position included in the second stay point The number; determine the first middle digit according to the quantity; determine the middle digit between the first middle digit and the first middle digit as the first latitude and longitude information extraction position corresponding to the second stay point; determine the first middle digit and the last digit. The intermediate bit between is determined as the second longitude and latitude information extraction bit corresponding to the second stay point.

根据第一方面,或者以上第一方面的任意一种实现方式,经度保留区间为[第一经度-1.5*(第二经度-第一经度), 第二经度+1.5*(第二经度-第一经度)];纬度保留区间为[第一纬度-1.5*(第二纬度-第一纬度), 第二纬度+1.5*(第二纬度-第一纬度)]。According to the first aspect, or any implementation of the first aspect above, the longitude retention interval is [first longitude-1.5*(second longitude-first longitude), second longitude+1.5*(second longitude) - first longitude)]; the latitude retention interval is [first latitude-1.5*(second latitude-first latitude), second latitude+1.5*(second latitude-first latitude)].

根据第一方面,或者以上第一方面的任意一种实现方式,对于每一个第二时间段,基于近邻聚类的聚类方式,对第二时间段内的第一停留点进行合并,得到第二停留点,包括:对于每一个第二时间段,在第二时间段内的第一停留点为一个时,将第一停留点作为对应的第二停留点。According to the first aspect, or any implementation of the above first aspect, for each second time period, the first stay points in the second time period are merged based on the clustering method of nearest neighbor clustering to obtain the second time period. Two stay points include: for each second time period, when there is one first stay point in the second time period, the first stay point is regarded as the corresponding second stay point.

根据第一方面,或者以上第一方面的任意一种实现方式,基于近邻聚类的聚类方式,将第一时间段内相同的第二停留点聚类为一个聚类簇,包括:确定第一时间段内,每两个第二停留点之间的距离;对于每一个第二停留点,基于近邻聚类的聚类方式,将第二停留点,以及与第二停留点之间的距离满足设定的第四距离阈值的第二停留点聚类为一个聚类簇,第四距离阈值小于第三距离阈值,第三距离阈值用于指示每一个第二时间段内的多个第一停留点是否能够合并为一个第二停留点。According to the first aspect, or any implementation manner of the first aspect above, clustering the same second stay points in the first time period into a cluster cluster based on the clustering method of neighbor clustering, including: determining the first Within a period of time, the distance between every two second stay points; for each second stay point, based on the clustering method of nearest neighbor clustering, the second stay point and the distance between the second stay point and the second stay point are The second stay points that meet the set fourth distance threshold are clustered into a cluster. The fourth distance threshold is smaller than the third distance threshold. The third distance threshold is used to indicate multiple first points in each second time period. Whether the stop points can be combined into a second stop point.

由此,基于近邻聚类的聚类方式将第一时间段内所有相同的第二停留点聚类为一个聚类簇,赋予了每一个第二停留点在聚类簇中的物理含义,即在常驻地确定环节中,对于任意一个聚类簇,每有一个第二停留点,就代表用户在该聚类簇中出现的天数,这样根据不同的业务场景需要,通过设定不同的天数阈值就可以选取不同的停留点作为该业务场景下的常驻地,从而能够基于识别出的常驻地为用户提供更加丰富多彩的服务。Therefore, the clustering method based on nearest neighbor clustering clusters all the same second stay points in the first time period into a cluster, and gives each second stay point a physical meaning in the cluster, that is, In the process of determining the resident location, for any cluster, each second stay point represents the number of days the user has appeared in the cluster. In this way, according to the needs of different business scenarios, different days can be set By setting the threshold, different stay points can be selected as permanent residences in this business scenario, thereby providing users with more colorful services based on the identified permanent residences.

根据第一方面,或者以上第一方面的任意一种实现方式,确定第一时间段内,每两个第二停留点之间的距离,包括:对于每一个第二停留点,根据第二停留点对应的每一个第一停留点的经纬度信息,计算平均经度和平均纬度;将平均经度和平均纬度,作为第二停留点的经纬度信息;根据每两个第二停留点的经纬度信息,确定每两个第二停留点之间的距离。According to the first aspect, or any implementation of the first aspect above, determining the distance between every two second stay points within the first time period includes: for each second stay point, according to the second stay point For the longitude and latitude information of each first stay point corresponding to the point, calculate the average longitude and average latitude; use the average longitude and average latitude as the longitude and latitude information of the second stay point; based on the longitude and latitude information of each two second stay points, determine each The distance between two second stop points.

由此,通过将第二停留点中包括的多个第一停留点的经度和纬度进行平均处理,从而将平均经度和平均纬度作为第二停留点对应的经纬度信息,从而便于后续数据处理。Therefore, by averaging the longitudes and latitudes of multiple first stay points included in the second stay point, the average longitude and average latitude are used as the longitude and latitude information corresponding to the second stay point, thereby facilitating subsequent data processing.

根据第一方面,或者以上第一方面的任意一种实现方式,在将聚类簇中的第二停留点确定为第一常驻地之后,方法还包括:为第一时间段中确定的每一个第一常驻地分配常驻地标签;在基于近邻聚类的距离方式,根据第三时间段记录的信令数据确定第三时间段中的第二常驻地后,对于每一个第二常驻地,确定第二常驻地与每一个第一常驻地之间的距离,第三时间段与第一时间段的时长相同;对于每一个第二常驻地,当存在与第二常驻地之间的距离满足设定的第五距离阈值的第一常驻地时,为第二常驻地分配与第一常驻地相同的常驻地标签。According to the first aspect, or any implementation of the above first aspect, after determining the second stay point in the cluster as the first resident place, the method further includes: A first resident place is assigned a resident tag; after determining the second resident place in the third time period based on the signaling data recorded in the third time period in a distance manner based on neighbor clustering, for each second resident place Resident place, determine the distance between the second permanent place and each first permanent place, the third time period is the same as the first time period; for each second permanent place, when there is a When the distance between the resident places meets the set fifth distance threshold for the first resident place, the second resident place is assigned the same resident place tag as the first resident place.

由此,实现了常驻地唯一性的确定,使得后续基于常驻地进行的业务推荐服务能够更好的适用于用户。As a result, the uniqueness of the resident location is determined, so that subsequent service recommendation services based on the resident location can be better suited to users.

第二方面,本申请提供了一种电子设备。该电子设备包括:存储器和处理器,存储器和处理器耦合;存储器存储有程序指令,程序指令由处理器执行时,使得所述电子设备执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a second aspect, the present application provides an electronic device. The electronic device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the first aspect or any possible implementation of the first aspect. method instructions.

第二方面以及第二方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第二方面以及第二方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The second aspect and any implementation manner of the second aspect respectively correspond to the first aspect and any implementation manner of the first aspect. The technical effects corresponding to the second aspect and any implementation manner of the second aspect may be referred to the technical effects corresponding to the above-mentioned first aspect and any implementation manner of the first aspect, which will not be described again here.

第三方面,本申请提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a third aspect, the present application provides a computer-readable medium for storing a computer program, the computer program comprising instructions for performing a method in the first aspect or any possible implementation of the first aspect.

第三方面以及第三方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第三方面以及第三方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The third aspect and any implementation manner of the third aspect respectively correspond to the first aspect and any implementation manner of the first aspect. For the technical effects corresponding to the third aspect and any implementation manner of the third aspect, please refer to the technical effects corresponding to the above-mentioned first aspect and any implementation manner of the first aspect, which will not be described again here.

第四方面,本申请提供了一种计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a fourth aspect, the present application provides a computer program, the computer program comprising instructions for performing a method in the first aspect or any possible implementation of the first aspect.

第四方面以及第四方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第四方面以及第四方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The fourth aspect and any implementation manner of the fourth aspect respectively correspond to the first aspect and any implementation manner of the first aspect. For the technical effects corresponding to the fourth aspect and any implementation manner of the fourth aspect, please refer to the technical effects corresponding to the above-mentioned first aspect and any implementation manner of the first aspect, which will not be described again here.

第五方面,本申请提供了一种芯片,该芯片包括处理电路、收发管脚。其中,该收发管脚、和该处理电路通过内部连接通路互相通信,该处理电路执行第一方面或第一方面的任一种可能的实现方式中的方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In a fifth aspect, this application provides a chip, which includes a processing circuit and transceiver pins. Wherein, the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive the signal, so as to Control the sending pin to send signals.

第五方面以及第五方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第五方面以及第五方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The fifth aspect and any implementation manner of the fifth aspect respectively correspond to the first aspect and any implementation manner of the first aspect. For the technical effects corresponding to the fifth aspect and any implementation manner of the fifth aspect, please refer to the technical effects corresponding to the above-mentioned first aspect and any implementation manner of the first aspect, which will not be described again here.

附图说明Description of drawings

图1a为示例性示出的不同目标应用在一常驻地的使用情况示意图;Figure 1a is a schematic diagram illustrating the use of different target applications in a permanent location;

图1b为示例性示出的不同目标应用在另一常驻地的使用情况示意图;Figure 1b is a schematic diagram illustrating the use of different target applications in another permanent location;

图2a为示例性示出的基于常驻地和用户行为习惯进行业务推荐的示意图之一;Figure 2a is one of the schematic diagrams illustrating service recommendation based on residence and user behavior habits;

图2b为示例性示出的基于常驻地和用户行为习惯进行业务推荐的示意图之二;Figure 2b is a second schematic diagram illustrating service recommendation based on residence and user behavior habits;

图3为示例性示出的手机的硬件结构示意图;Figure 3 is a schematic diagram of the hardware structure of an exemplary mobile phone;

图4为示例性示出的手机的软件结构示意图;Figure 4 is a schematic diagram of the software structure of an exemplary mobile phone;

图5a、图5b为示例性示出的开启常驻地识别功能的用户界面示意图;Figures 5a and 5b are schematic diagrams of the user interface for activating the resident location identification function;

图6a~图6e为示例性示出的当天停留点生成的示意图;Figures 6a to 6e are schematic diagrams illustrating the generation of stay points on the day;

图7为示例性示出的当天多个相同停留点的合并示意图;Figure 7 is an exemplary combined schematic diagram of multiple identical stay points on the day;

图8为示例性示出的当天多个相同停留点的合并过程中对异常打点剔除的示意图;Figure 8 is a schematic diagram illustrating the elimination of abnormal points during the merging process of multiple identical stay points on the same day;

图9为示例性示出的对N天的停留点进行近邻聚类确定常驻地的示意图;Figure 9 is a schematic diagram illustrating a schematic diagram of performing neighbor clustering on N-day stay points to determine a permanent place;

图10为示例性示出的常驻地的识别方法的流程示意图;Figure 10 is a schematic flowchart of an exemplary method for identifying a resident place;

图11为示例性示出的常驻地识别方法中第一停留点的确定流程示意图;Figure 11 is a schematic flow chart of the determination of the first stay point in the method of identifying a resident place;

图12为示例性示出的常驻地识别方法中第一停留点合并为第二停留点的流程示意图;Figure 12 is a schematic flowchart illustrating the merging of the first stay point into the second stay point in the resident place identification method;

图13为示例性示出的常驻地识别方法中异常的空间位置剔除的流程示意图;Figure 13 is a schematic flowchart of the elimination of abnormal spatial locations in the resident location identification method;

图14为示例性示出的常驻地识别方法中基于第二停留点确定常驻地的流程示意图;Figure 14 is a schematic flowchart of determining the resident place based on the second stay point in the exemplary resident place identification method;

图15为示例性示出的常驻地识别方法中常驻地唯一性的确定流程示意图。FIG. 15 is a schematic flowchart of determining the uniqueness of the resident place in the resident place identification method.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.

本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is just an association relationship that describes related objects, indicating that three relationships can exist. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.

本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。The terms “first” and “second” in the description and claims of the embodiments of this application are used to distinguish different objects, rather than to describe a specific order of objects. For example, the first target object, the second target object, etc. are used to distinguish different target objects, rather than to describe a specific order of the target objects.

在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "such as" in the embodiments of the present application is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary" or "such as" is intended to present the concept in a concrete manner.

在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。In the description of the embodiments of this application, unless otherwise specified, the meaning of “plurality” refers to two or more. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

在对本申请实施例的技术方案说明之前,首先结合附图对本申请实施例的应用场景进行说明。为了便于描述,下述场景说明以需要进行业务推荐的目标应用为目标应用1和目标应用2为例,分别对目标应用1和目标应用2在常驻地1和常驻地2这两个常驻地中,N天内各时间段的使用情况进行说明。Before describing the technical solutions of the embodiments of the present application, the application scenarios of the embodiments of the present application are first described with reference to the drawings. For the convenience of description, the following scenario description takes the target applications that need to be recommended as target application 1 and target application 2 as examples. In the station, the usage of each time period within N days is explained.

参见图1a,示例性的,N天内,如8天,某一用户,如用户A在常驻地1使用手机中安装的目标应用1的时间段分别为t1时间段、t8~t12时间段,使用目标应用2的时间段分别为t2时间段、t4时间段、t5时间段和t7时间段。Referring to Figure 1a, for example, within N days, such as 8 days, the time periods during which a certain user, such as user A, uses the target application 1 installed in the mobile phone at the residence 1 are respectively the t1 time period and the t8~t12 time period. The time periods for using target application 2 are t2 time period, t4 time period, t5 time period and t7 time period respectively.

继续参见图1a,示例性的,在这8天内,每一天的t9~t11时间段内,用户A都会使用目标应用1,每一天的t5时间段内,用户A都会使用目标应用2。而这8天中的其中1天的t1时间段、t8时间段会使用目标应用1,其中2天的t2时间段会使用目标应用2,其中3天的t7时间段会使用目标应用2、t12时间段会使用目标应用1,其中5天的t4时间段会使用目标应用2。Continuing to refer to Figure 1a, for example, within these 8 days, user A will use target application 1 during the time period t9 to t11 of each day, and user A will use target application 2 during the time period t5 of each day. Among these 8 days, target application 1 will be used in the t1 time period and t8 time period in 1 day, target application 2 will be used in the t2 time period in 2 days, and target application 2 and t12 will be used in the t7 time period in 3 days. Target application 1 will be used in the time period, and target application 2 will be used in the t4 time period of 5 days.

即,用户A在常驻地1时,相较而言喜欢在t8~t12时间段内使用目标应用1,在t4时间段、t5时间段使用目标应用2。因此在t8~t12时间段前后,或者t8~t12时间段内推荐与目标应用1相关的内容,较容易被用户查阅,而在t4时间段、t5时间段前后,或者t4时间段、t5时间段内推荐与目标应用2相关的内容,较容易被用户查阅。That is, when user A is at his residence 1, he prefers to use target application 1 in the time period t8 to t12, and uses target application 2 in the time period t4 and t5. Therefore, content related to target application 1 is recommended before and after the t8~t12 time period, or during the t8~t12 time period, which is easier for users to access, while it is easier for users to recommend content before and after the t4 time period, t5 time period, or between the t4 time period and the t5 time period. Recommend content related to target application 2, which is easier for users to access.

参见图1b,示例性的,仍以N天为8天为例,同一用户A在常驻地2使用上述所说的目标应用1和目标应用2的情况具体为:在t2时间段、t4~t7时间段、t10时间段和t11时间段使用目标应用1,在t1时间段和t8时间段使用目标应用2。Referring to Figure 1b, for example, still taking N days as 8 days as an example, the situation where the same user A uses the above-mentioned target application 1 and target application 2 in the resident place 2 is as follows: in the t2 time period, t4~ Target application 1 is used in the t7 time period, t10 time period, and t11 time period, and target application 2 is used in the t1 time period and t8 time period.

继续参见图1b,示例性的,在这8天内,有7天用户会在t5时间段使用目标应用1,有5天会在t4时间段使用目标应用1,在t8时间段使用目标应用2,有4天会在t10时间段使用目标应用1,有2天会在t1时间段使用目标应用2,在t6时间段和t11时间段会使用目标应用1,有一天会在t2时间段使用目标应用1。Continuing to refer to Figure 1b, for example, within these 8 days, the user will use target application 1 in the t5 time period on 7 days, use the target application 1 in the t4 time period on 5 days, and use the target application 2 in the t8 time period. There are 4 days when target application 1 will be used in the t10 time period, 2 days when the target application 2 will be used in the t1 time period, target application 1 will be used in the t6 time period and t11 time period, and one day will be used in the t2 time period. 1.

即,用户A在常驻地2时,相较而言喜欢在t4~t7时间段和t10~t11时间段使用目标应用1,在t8时间段使用目标应用2。因此在t4~t7时间段、t10~t11时间段前后,或者t4~t7时间段、t10~t11时间段内推荐与目标应用1相关的内容,较容易被用户查阅,而在t8时间段前后,或者t8时间段内推荐与目标应用2相关的内容,较容易被用户查阅。That is, when user A is in his resident place 2, he prefers to use target application 1 in the time period t4~t7 and time period t10~t11, and to use target application 2 in the time period t8. Therefore, content related to target application 1 is recommended before and after the t4~t7 time period, t10~t11 time period, or between the t4~t7 time period, t10~t11 time period, and is easier to be accessed by users, while before and after the t8 time period, Or recommend content related to target application 2 in the t8 time period, which is easier for users to access.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

关于上述所说的在用户A相较而言喜欢的时间段前后,或时间段内推荐对应目标应用的相关内容的实现方式,以下以图1a所示用户A在常驻地1喜欢使用目标应用1的时间段为t9~t12时间段为例,对一些可行的推荐方式进行说明。Regarding the above-mentioned implementation method of recommending relevant content corresponding to the target application before and after the time period that user A prefers, or within the time period, as shown in Figure 1a below, user A likes to use the target application in the resident place 1. The time period 1 is the t9~t12 time period as an example, and some feasible recommendation methods will be explained.

示例性的,假设目标应用1为一款游戏,例如五子棋游戏,当用户A使用目标应用1的时间段持续较长,如在图1a中t9~t2时间段内都使用,在一些实现的实现方式中,可以在t9时间段前几分钟,比如1分钟提前推荐与目标应用1相关的内容。如图2a所示,示例性的示出一种在t9时间段前几分钟,用户A未使用手机100的场景,这种情况下手机100例如可以处于10a所示的界面。For example, assuming that the target application 1 is a game, such as the backgammon game, when user A uses the target application 1 for a long period of time, such as in the time period t9~t2 in Figure 1a, in some implementations In this method, content related to target application 1 can be recommended in advance a few minutes before the t9 time period, such as 1 minute. As shown in Figure 2a, an exemplary scenario is shown in which user A does not use the mobile phone 100 a few minutes before the time period t9. In this case, the mobile phone 100 can be in the interface shown in 10a, for example.

继续参见图2a,示例性的,当前时间接近t9时间段,如果目标应用1有新的游戏模式上线,为了提醒用户A及时体验,可以在界面10a的通知中心10-a中显示与目标应用1相关的内容,如图2a中10a-11所示。这样,当用户A打开手机100中安装的目标应用1时,就能及时出查看新的游戏模式。Continuing to refer to Figure 2a, for example, the current time is close to the t9 time period. If the target application 1 has a new game mode online, in order to remind the user A to experience it in time, the notification center 10-a of the interface 10a can display the information related to the target application 1. The relevant content is shown in 10a-11 in Figure 2a. In this way, when user A opens the target application 1 installed in the mobile phone 100, he can view the new game mode in time.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

示例性的,仍以目标应用1为一款游戏,例如五子棋游戏,当用户A使用目标应用1的时间段持续较长,如在图1a中t9~t2时间段内都使用,在一些实现的实现方式中,可以在t9~t2时间段内,任意时刻推荐与目标应用1相关的内容。如图2b所示,示例性的示出一种在t9~t2时间段内,用户A正在使用目标应用1下五子棋的场景,具体界面例如可如2b中的界面10b,其中界面10b中可包括一个或多个控件,例如棋盘10b-1,用于退出界面10b的控件10b-2,用于悔棋的控件10b-3,用于重玩的控件10b-4,用于进入设置音效、落子方式界面的控件10b-5。For example, the target application 1 is still used as a game, such as the backgammon game. When user A uses the target application 1 for a long period of time, such as in the time period t9~t2 in Figure 1a, in some implementations In the implementation method, content related to target application 1 can be recommended at any time during the time period t9~t2. As shown in Figure 2b, an exemplary scenario is shown in which user A is using target application 1 to play backgammon during the time period t9~t2. The specific interface may be, for example, the interface 10b in 2b, where the interface 10b may include One or more controls, such as the chessboard 10b-1, the control 10b-2 for exiting the interface 10b, the control 10b-3 for regretting the move, the control 10b-4 for replaying, and the control 10b-4 for entering the settings of sound effects and placement methods. Interface controls 10b-5.

继续参见图2b,示例性的,在t9~t2时间段内,如果目标应用1有新的游戏模式上线,为了提醒用户A及时体验,可以直接在界面10b上弹出消息通知栏10b-6,并在消息通知栏10-6中显示与目标应用1相关的内容,如“目标应用1有新的游戏模式上线,欢迎体验~”。这样,用户A在10b界面使用目标应用1的过程中,就可以通过点击控件10b-6直接进入选择游戏模式的界面,或新的游戏模式对应的界面,从而第一时间体验该游戏模式。Continuing to refer to Figure 2b, for example, during the time period t9~t2, if the target application 1 has a new game mode online, in order to remind user A to experience it in time, the message notification bar 10b-6 can be popped up directly on the interface 10b, and Content related to target application 1 is displayed in the message notification bar 10-6, such as "Target application 1 has a new game mode online, welcome to experience it~". In this way, user A can directly enter the interface for selecting a game mode or the interface corresponding to a new game mode by clicking on the control 10b-6 while using the target application 1 on the interface 10b, thereby experiencing the game mode for the first time.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not intended to be the only limitation on this embodiment.

通过上述对图1a~图2b所示场景的描述可知,通过识别用户所处的不同常驻地,并进一步统计用户在不同常驻地不同时间段内对不同目标应用的使用情况,就可以在不同的常驻地,不同的时间段为用户推荐与不同目标应用相关的内容,从而更好的为用户提供更丰富的个性化服务。From the above description of the scenarios shown in Figures 1a to 2b, it can be seen that by identifying the different residences where the user is located, and further counting the usage of different target applications by the users in different residences during different time periods, it is possible to Different permanent locations and different time periods recommend content related to different target applications to users, thereby better providing users with richer personalized services.

此外,可理解的是,在上述场景描述中,是以手机为例进行说明,在实际应用中,本申请提供的常驻地的识别方法同样适用于平板电脑、智能穿戴设备等能够获取信令数据,并具备处理能的电子设备。In addition, it can be understood that in the above scenario description, a mobile phone is used as an example. In practical applications, the resident identification method provided by this application is also applicable to tablet computers, smart wearable devices, etc. that can obtain signaling. Data, and electronic equipment with processing capabilities.

为了更好的描述本申请实施例提供的常驻地的识别方法,仍以手机为例,以下先结合图3和图4分别对手机的硬件结构和软件结构进行说明,再结合图5a至图9对基于该硬件结构和软件结构的手机实现本申请实施例提供的常驻地的识别方法的过程进行说明。In order to better describe the permanent location identification method provided by the embodiment of the present application, the mobile phone is still used as an example. The hardware structure and software structure of the mobile phone will be described below with reference to Figures 3 and 4, and then with Figures 5a to 5a. 9. Describe the process of implementing the resident location identification method provided by the embodiment of the present application on a mobile phone based on the hardware structure and software structure.

参见图3,为示例性示出的实现本申请实施例提供的常驻地的识别方法的手机100的硬件结构示意图。Refer to FIG. 3 , which is a schematic diagram of the hardware structure of a mobile phone 100 that implements the resident location identification method provided by an embodiment of the present application.

参见图3,手机100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。Referring to Figure 3, the mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, and an antenna. 1. Antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display Screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.

示例性的,在一些实现方式中,传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等,此处不再一一例举,本申请对此不作限制。Exemplarily, in some implementations, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, and an ambient light sensor. , bone conduction sensors, etc., will not be listed one by one here, and this application does not limit this.

此外,需要说明的是,处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。In addition, it should be noted that the processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural network processor (neural network processor) -network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.

可理解的,控制器可以是手机100的神经中枢和指挥中心。在实际应用中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。It is understandable that the controller can be the nerve center and command center of the mobile phone 100 . In practical applications, the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.

此外,还需要说明的是,处理器110中还可以设置存储器,用于存储指令和数据。在一些实现方式中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。In addition, it should be noted that the processor 110 may also be provided with a memory for storing instructions and data. In some implementations, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.

示例性的,在一些实现方式中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identitymodule,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。By way of example, in some implementations, processor 110 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and/ Or universal serial bus (USB) interface, etc.

继续参见图3,示例性的,充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实现方式中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实现方式中,充电管理模块140可以通过手机100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。Continuing to refer to FIG. 3 , the charging management module 140 is illustratively configured to receive charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging implementations, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging implementations, the charging management module 140 may receive wireless charging input through the wireless charging coil of the mobile phone 100 . While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.

继续参见图3,示例性的,电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实现方式中,电源管理模块141也可以设置于处理器110中。在另一些实现方式中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。Continuing to refer to FIG. 3 , as an example, the power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, etc. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other implementations, the power management module 141 may also be provided in the processor 110 . In other implementations, the power management module 141 and the charging management module 140 can also be provided in the same device.

继续参见图3,示例性的,手机100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。Continuing to refer to FIG. 3 , for example, the wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

需要说明的是,天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实现方式中,天线可以和调谐开关结合使用。It should be noted that antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other implementations, the antenna can be used in conjunction with a tuning switch.

继续参见图3,示例性的,移动通信模块150可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实现方式中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实现方式中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。Continuing to refer to FIG. 3 , as an example, the mobile communication module 150 can provide a solution for wireless communication including 2G/3G/4G/5G applied on the mobile phone 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some implementations, at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 . In some implementations, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.

此外,需要说明的是,调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实现方式中,调制解调处理器可以是独立的器件。在另一些实现方式中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。In addition, it should be noted that the modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194. In some implementations, the modem processor may be a stand-alone device. In other implementations, the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.

继续参见图3,示例性的,无线通信模块160可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wifi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near fieldcommunication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。Continuing to refer to FIG. 3 , by way of example, the wireless communication module 160 can provide a wireless local area network (WLAN) (such as a wireless fidelity (Wifi) network), Bluetooth (bluetooth, etc.) applied on the mobile phone 100 . BT), global satellite navigation system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.

具体到本申请实施例提供的技术方案中,手机100可通过移动通信模块150或无线通信模块160与全球定位系统(Global Positioning System,GPS)和/或接入的基站进行通信,以获得能够确定用户移动轨迹的信令数据。关于获取信令数据,以及信令数据中包括的具体内容的描述详见下文,此处不再赘述。Specifically, in the technical solutions provided by the embodiments of this application, the mobile phone 100 can communicate with the Global Positioning System (GPS) and/or the accessed base station through the mobile communication module 150 or the wireless communication module 160 to obtain information that can be determined. Signaling data of user movement trajectory. The description of obtaining signaling data and the specific content included in the signaling data is detailed below and will not be described again here.

此外,还需要说明的是,手机100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。In addition, it should be noted that the mobile phone 100 implements the display function through the GPU, the display screen 194, and the application processor. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.

继续参见图3,示例性的,显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实现方式中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。Continuing to refer to FIG. 3 , illustratively, the display screen 194 is used to display images, videos, etc. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light). emitting diode (AMOLED), flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLED), etc. In some implementations, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

此外,还需要说明的是,手机100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。In addition, it should be noted that the mobile phone 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display screen 194 and application processor.

此外,还需要说明的是,ISP 用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实现方式中,ISP可以设置在摄像头193中。In addition, it should be noted that the ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some implementations, the ISP may be located in the camera 193 .

此外,还需要说明的是,摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实现方式中,手机100可以包括1个或N个摄像头193,N为大于1的正整数。In addition, it should be noted that the camera 193 is used to capture still images or videos. The object passes through the lens to produce an optical image that is projected onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some implementations, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

此外,还需要说明的是,数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当手机100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。In addition, it should be noted that the digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the mobile phone 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

此外,还需要说明的是,视频编解码器用于对数字视频压缩或解压缩。手机100可以支持一种或多种视频编解码器。这样,手机100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Additionally, it should be noted that video codecs are used to compress or decompress digital video. Mobile phone 100 may support one or more video codecs. In this way, the mobile phone 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

继续参见图3,示例性的,外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。Continuing to refer to FIG. 3 , for example, the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.

继续参见图3,示例性的,内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flashstorage,UFS)等。Continuing to refer to FIG. 3 , by way of example, internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the mobile phone 100 . The internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store the operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.), etc. The storage data area can store data created during the use of the mobile phone 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

具体到本申请实施例提供的技术方案中,开启常驻地识别模式后,获取到的信令数据,以及根据信令数据确定的停留点数据,根据停留点数据确定的常驻地数据等可以存储在手机100的内部存储器121中,从而便于快速读取,对其进行处理使用。Specifically, in the technical solution provided by the embodiment of this application, after the resident location identification mode is turned on, the acquired signaling data, the stay point data determined based on the signaling data, the resident location data determined based on the stay point data, etc. can be It is stored in the internal memory 121 of the mobile phone 100, so that it can be quickly read, processed and used.

此外,还需要说明的是,手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。In addition, it should be noted that the mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.

此外,还需要说明的是,音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实现方式中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。In addition, it should be noted that the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some implementations, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .

继续参见图3,示例性的,按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机100可以接收按键输入,产生与手机100的用户设置以及功能控制有关的键信号输入。Continuing to refer to FIG. 3 , for example, the keys 190 include a power key, a volume key, etc. Key 190 may be a mechanical key. It can also be a touch button. The mobile phone 100 can receive key input and generate key signal input related to user settings and function control of the mobile phone 100 .

继续参见图3,示例性的,马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Continuing to refer to FIG. 3 , for example, the motor 191 may generate a vibration prompt. The motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 . Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

继续参见图3,示例性的,指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Continuing to refer to FIG. 3 , for example, the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.

关于手机100的硬件结构就介绍到此,应当理解的是,图3所示手机100仅是一个范例,在具体实现中,手机100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图3中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。This concludes the introduction to the hardware structure of the mobile phone 100. It should be understood that the mobile phone 100 shown in Figure 3 is only an example. In a specific implementation, the mobile phone 100 may have more or fewer components than those shown in the figure. , two or more components may be combined, or may have different component configurations. The various components shown in Figure 3 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.

为了更好的理解图3所示手机100的软件结构,以下对手机100的软件结构进行说明。在对手机100的软件结构进行说明之前,首先对手机100的软件系统可以采用的架构进行说明。In order to better understand the software structure of the mobile phone 100 shown in Figure 3, the software structure of the mobile phone 100 will be described below. Before describing the software structure of the mobile phone 100, first, the architecture that can be adopted by the software system of the mobile phone 100 is explained.

具体的,在实际应用中,手机100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。Specifically, in practical applications, the software system of the mobile phone 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.

此外,可理解的,目前主流的手机100使用的软件系统包括但不限于Windows系统、Android系统和iOS系统。为了便于说明,本申请实施例以分层架构的Android系统为例,示例性说明手机100的软件结构。In addition, it is understandable that the software systems currently used by mainstream mobile phones 100 include but are not limited to Windows systems, Android systems, and iOS systems. For ease of explanation, this embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the mobile phone 100 .

此外,后续关于本申请实施例提供的常驻地的识别方案,在具体实现中同样适用于其他系统。In addition, the subsequent resident location identification scheme provided in the embodiments of this application is also applicable to other systems in specific implementation.

参见图4,为本申请实施例的手机100的软件结构框图。Refer to Figure 4, which is a software structure block diagram of the mobile phone 100 according to the embodiment of the present application.

如图4所示,手机100的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实现方式中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。As shown in Figure 4, the layered architecture of the mobile phone 100 divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some implementations, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.

其中,应用程序层可以包括一系列应用程序包。如图4所示,应用程序包可以包括设置、地图、WLAN、蓝牙、相机、音乐、智慧助手等应用程序,此处不再一一列举,本申请对此不作限制。。Among them, the application layer can include a series of application packages. As shown in Figure 4, the application package may include settings, maps, WLAN, Bluetooth, camera, music, smart assistant and other applications, which will not be listed one by one here, and this application does not limit this. .

关于智慧助手应用程序,在本实施例中具体用于供用户操作实现开启或关闭基于本申请实施例提供的常驻地的识别方法进行常驻地实现的功能。Regarding the smart assistant application, in this embodiment, it is specifically used for the user to operate to enable or disable the function of realizing the resident location based on the resident location identification method provided by the embodiment of the application.

此外,可理解的,在一些实现方式中,智慧助手应用程序所实现的功能,也可以集成在设置应用程序中,本申请对此不作限制。为了便于说明,本申请实施例以通过设置应用程序实现开启或关闭基于本申请实施例提供的常驻地的识别方法进行常驻地实现的功能为例,实现方式如图5a和5b所示。In addition, it is understandable that in some implementations, the functions implemented by the smart assistant application can also be integrated in the settings application, and this application does not limit this. For ease of explanation, this embodiment of the present application takes as an example the function of turning on or off the resident location based on the resident location identification method provided by the embodiment of the present application by setting an application program. The implementation method is shown in Figures 5a and 5b.

参见图5a中(1)所示的界面10c,示例性的,手机当前的界面10c中可以包括一个或多个控件。控件包括但不限于:网络控件、电量控件、应用图标控件等。Referring to the interface 10c shown in (1) in Figure 5a, for example, the current interface 10c of the mobile phone may include one or more controls. Controls include but are not limited to: network controls, power controls, application icon controls, etc.

继续参见图5a中(1)所示的界面10c,示例性的,应用图标控件包括但不限于:时钟应用图标控件、日历应用图标控件、图库应用图标控件、备忘录应用图标控件、文件管理应用图标控件、电子邮件应用图标控件、音乐应用图标控件、计算器应用图标控件、视频应用图标控件、录音机应用图标控件、天气应用图标控件、浏览器应用图标控件、设置应用图标控件10c-1等,此处不再一一列举,本申请对此不作限制。Continuing to refer to the interface 10c shown in (1) in Figure 5a, exemplary application icon controls include but are not limited to: clock application icon control, calendar application icon control, gallery application icon control, memo application icon control, file management application icon Control, email application icon control, music application icon control, calculator application icon control, video application icon control, recorder application icon control, weather application icon control, browser application icon control, settings application icon control 10c-1, etc., this They are not listed one by one, and this application does not limit them.

继续参见图5a中(1)所示的界面10c,示例性的,当用户点击了控件10c-1后,手机响应于用户的操作行为,启动图5a中(2)所示的界面10d。Continuing to refer to the interface 10c shown in (1) in Figure 5a, for example, after the user clicks the control 10c-1, the mobile phone responds to the user's operation behavior and activates the interface 10d shown in (2) in Figure 5a.

参见图5a中(2)所示的界面10d,示例性的,界面10d中可以包括一个或多个控件。控件包括但不限于:用于退出界面10d的控件10d-1,用于设置手机的声音和振动模式的控件、用于设置通知的控件、用于设置常驻地识别功能的控件10d-2、用于查看手机安装应用的控件、用于查看手机电池信息的控件、用于查看手机当前存储空间的控件、用于查看手机的安全信息的控件等,此处不再一一列举,本申请对此不作限制。Referring to the interface 10d shown in (2) in Figure 5a, for example, the interface 10d may include one or more controls. The controls include but are not limited to: controls 10d-1 for exiting the interface 10d, controls for setting the sound and vibration mode of the mobile phone, controls for setting notifications, controls 10d-2 for setting the resident identification function, Controls used to view installed applications on the mobile phone, controls used to view the battery information of the mobile phone, controls used to view the current storage space of the mobile phone, controls used to view the security information of the mobile phone, etc. will not be listed here one by one. This application will This is not a restriction.

继续参见图5a中(2)所示的界面10d,示例性的,当用户点击了控件10d-2后,手机响应于用户的操作行为,启动图5b中(1)所示的界面10e。Continuing to refer to the interface 10d shown in (2) in Figure 5a, for example, after the user clicks the control 10d-2, the mobile phone responds to the user's operation behavior and activates the interface 10e shown in (1) in Figure 5b.

参见图5b中(1)所示的界面10e,示例性的,界面10e中可以包括一个或多个控件。控件包括但不限于:用于退出界面10e的控件10e-1,用于开启或关闭常驻地识别功能的控件10e-2。Referring to the interface 10e shown in (1) in Figure 5b, for example, the interface 10e may include one or more controls. The controls include but are not limited to: a control 10e-1 for exiting the interface 10e, and a control 10e-2 for turning on or off the resident identification function.

示例性的,在本实施例中,以图5b中(1)所示的界面10e中控件10e-2的状态表示常驻地识别功能未开启,即常驻地识别功能处于关闭状态;以图5b中(2)所示的界面10e中控件10e-2的状态表示常驻地识别功能开启,即常驻地识别功能处于开启状态。Exemplarily, in this embodiment, the state of the control 10e-2 in the interface 10e shown in (1) in Figure 5b indicates that the resident place identification function is not turned on, that is, the resident place identification function is in a closed state; as shown in Figure The state of the control 10e-2 in the interface 10e shown in (2) in 5b indicates that the resident identification function is on, that is, the resident identification function is on.

继续参见图5b中(1)所示的界面10e,示例性的,当用户点击了控件10e-2后,手机响应于用户的操作行为,控件10e-2从图5b中(1)所示的状态切换为图5b中(2)所示的状态,此时常驻地识别功能就开启了,后续在常驻地识别功能开启的情况下,手机就可以基于本申请实施例提供的常驻地的识别方法,精准确定使用该手机的用户的常驻地,进而根据确定的常驻地,结合用户在不同常驻地的行为习惯,为用户提供精细化的业务推荐。Continuing to refer to the interface 10e shown in (1) in Figure 5b, for example, when the user clicks the control 10e-2, the mobile phone responds to the user's operation behavior, and the control 10e-2 changes from the control 10e-2 shown in (1) in Figure 5b. The state switches to the state shown in (2) in Figure 5b. At this time, the resident location identification function is turned on. Subsequently, when the resident location identification function is turned on, the mobile phone can identify the resident location based on the embodiment of the present application. This method accurately determines the resident place of the user who uses the mobile phone, and then provides users with refined business recommendations based on the determined resident place and the user's behavioral habits in different resident places.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

其中,应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。在一些实现方式中,这些编程接口和编程框架可以描述为函数。如图4所示,应用程序框架层可以包括视图系统、内容提供器、停留点识别模块、停留点合并模块、常驻地识别模块、常驻地唯一性判断模块等函数,此处不再一一列举,本申请对此不作限制。Among them, the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. As shown in Figure 4, the application framework layer can include functions such as a view system, a content provider, a stay point identification module, a stay point merging module, a resident location identification module, and a resident location uniqueness judgment module. One enumeration is not limited in this application.

示例性的,在本实施例中,停留点识别模块用于根据手机100使用过程中产生的信令数据,采用近邻聚类的方法,识别出用户的移动轨迹中,在时间上连续、空间上相近的停留点。关于停留点识别模块根据信令数据确定某一时间段内,如一天的停留点的具体细节,详见下文,此处不再赘述。Exemplarily, in this embodiment, the stay point identification module is used to identify points in the user's movement trajectory that are continuous in time and space by using the nearest neighbor clustering method based on the signaling data generated during the use of the mobile phone 100. Close stopping points. Regarding the specific details of the stay point identification module determining the stay points within a certain time period, such as one day, based on the signaling data, please see below for details and will not be repeated here.

示例性的,在本实施例中,停留点合并模块用于对停留点识别模块识别出的每一天中多个相同的停留点进行合并,即经停留点合并模块处理后的停留点,具有唯一性。关于停留点合并模块合并停留点的具体细节,详见下文,此处不再赘述。Exemplarily, in this embodiment, the stay point merging module is used to merge multiple identical stay points in each day identified by the stay point identification module, that is, the stay points processed by the stay point merging module have a unique sex. Regarding the specific details of merging stay points by the stay point merging module, please refer to the following and will not be repeated here.

示例性的,在本实施例中,常驻地识别模块用于将某一时间段,如N天内停留点合并模块确定的每一天中具有唯一性的停留点进行近邻聚类,进而将满足要求的确定为常驻地。关于常驻地识别模块确定常驻地的具体细节,详见下文,此处不再赘述。Illustratively, in this embodiment, the resident place identification module is used to perform neighbor clustering on the unique stay points in each day determined by the stay point merging module within a certain period of time, such as N days, so as to meet the requirements. is determined to be the permanent residence. Regarding the specific details of the permanent residence determined by the permanent residence identification module, please refer to the following and will not be repeated here.

示例性的,在本实施例中,常驻地唯一性判断模块用于对相邻两个时间段内,如第一天和第二天,常驻地识别模块确定的常驻地进行唯一性判断,避免最终记录的常驻地出现重复情况。关于常驻地唯一性判断模块判断常驻地唯一性的具体细节,详见下文,此处不再赘述。Illustratively, in this embodiment, the resident place uniqueness judgment module is used to uniquely determine the resident place determined by the resident place identification module in two adjacent time periods, such as the first day and the second day. Judgment to avoid duplication of final recorded residence. Regarding the specific details of how the resident location uniqueness judgment module determines the uniqueness of the resident location, see below for details and will not be repeated here.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

此外,可以理解的,上述各功能模块的划分,仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。在实际应用中,上述功能也可以集成在一个功能模块中实现,本实施例对此不作限制。In addition, it can be understood that the above-mentioned division of functional modules is only an example to better understand the technical solution of this embodiment, and is not the only limitation on this embodiment. In practical applications, the above functions can also be integrated and implemented in one functional module, which is not limited in this embodiment.

此外,在实际应用中,上述各功能模块也可以表示为服务、框架,如停留点识别模块可以表示为停留点识别服务、停留点识别框架等,本实施例对此不作限制。In addition, in practical applications, the above functional modules can also be represented as services and frameworks. For example, the stay point identification module can be represented as a stay point identification service, a stay point identification framework, etc. This embodiment is not limited to this.

此外,还需要说明的是,上述位于应用程序框架层中的视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。In addition, it should be noted that the above-mentioned view system located in the application framework layer includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

此外,还需要说明的是,上述位于应用程序框架层中的内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等,此处不再一一列举,本申请对此不作限制。In addition, it should be noted that the above-mentioned content provider located in the application framework layer is used to store and obtain data and make the data accessible to the application. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc., which will not be listed one by one here, and this application does not limit this.

此外,还需要说明的是,在实际应用中,应用程序框架层中还可以有电话管理器、资源管理器、通知管理器等。其中,电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等);资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等;通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。In addition, it should be noted that in actual applications, there can also be a phone manager, resource manager, notification manager, etc. in the application framework layer. Among them, the phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.); the resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.; the notification manager allows applications to Displaying notification information in the status bar can be used to convey notification-type messages. It can stay for a short time and then disappear automatically without user interaction.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

Android Runtime包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.

应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and application framework layer into binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.

系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维(3D)图像处理库(例如:OpenGL ES),二维(2D)图像引擎(例如:SGL)等。System libraries can include multiple functional modules. For example: surface manager, media libraries, three-dimensional (3D) image processing library (for example: OpenGL ES), two-dimensional (2D) image engine (for example: SGL), etc.

表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

三维图像处理库用于实现三维图像绘图,图像渲染,合成,和图层处理等。The 3D image processing library is used to implement 3D image drawing, image rendering, composition, and layer processing.

可理解的,上述所说的2D图像引擎是2D绘图的绘图引擎。It is understandable that the above-mentioned 2D image engine is a drawing engine for 2D drawing.

此外,可理解的,Android系统中的内核层是硬件和软件之间的层。内核层至少包含显示驱动,蓝牙驱动,麦克风驱动,传感器驱动、GPS驱动等。示例性的,GPS驱动可用于驱动GPS芯片实现定位,以获得用以移动、停留过程中的不同位置的经纬度信息,以使上述所说的停留点识别模块以经纬度信息作为一个维度,结合停留时间确定停留点。In addition, it is understandable that the kernel layer in the Android system is the layer between hardware and software. The kernel layer at least includes display driver, Bluetooth driver, microphone driver, sensor driver, GPS driver, etc. For example, the GPS driver can be used to drive the GPS chip to achieve positioning to obtain the latitude and longitude information of different locations during movement and stay, so that the above-mentioned stay point identification module uses the longitude and latitude information as a dimension, combined with the stay time. Determine stopping points.

关于手机100的软件结构就介绍到此,可以理解的是,图4示出的软件结构中的层以及各层中包含的部件,并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请不做限定。This concludes the introduction to the software structure of the mobile phone 100 . It can be understood that the layers in the software structure shown in FIG. 4 and the components included in each layer do not constitute specific limitations on the mobile phone 100 . In other embodiments of the present application, the mobile phone 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited by this application.

以图3示出的硬件结构和图4示出的软件结构的手机为例,为了能够更好的适应于针对图1a至图2b所示的场景,即精准的识别出用户的常驻地,进而根据用户在不同的常驻地的行为习惯,精细化的实现业务的推荐,对上述由停留点识别模块实现的停留点确定过程、由停留点合并模块实现的停留点合并过程、由常驻地识别模块实现的常驻地确定过程,以及由常驻地唯一性判断模块实现的判断过程进行具体说明。Taking the mobile phone with the hardware structure shown in Figure 3 and the software structure shown in Figure 4 as an example, in order to better adapt to the scenarios shown in Figures 1a to 2b, that is, to accurately identify the user's residence, Then, based on the user's behavioral habits in different residences, detailed business recommendations are implemented. For the above-mentioned stay point determination process implemented by the stay point identification module, the stay point merging process implemented by the stay point merging module, and the stay point merging process implemented by the resident The resident location determination process implemented by the location identification module and the judgment process implemented by the resident location uniqueness judgment module will be described in detail.

停留点确定Stopping point confirmed

为了便于说明,本实施例以天为单位,结合表1示出的一天中手机对应的部分信令数据,对停留点的确定进行说明。For the convenience of explanation, this embodiment uses days as units and combines the partial signaling data corresponding to the mobile phones in one day shown in Table 1 to explain the determination of the stay point.

应当理解的,所谓信令数据,也可以称为手机信令数据(Mobile Signal Data),具体是指通过手机用户在基站之间的信息交换来确定用户的空间位置,即能相对准确的记录人流的时空轨迹。手机用户只要发生开关机、通话、短信、位置更新和切换基站等行为,都会记录下对应的信令数据。故而,基于设定时间内的信令数据,就可以确定手机用户在该时间内的停留点。It should be understood that the so-called signaling data can also be called Mobile Signal Data. Specifically, it refers to determining the spatial location of the user through the exchange of information between mobile phone users between base stations, that is, it can record the flow of people relatively accurately. space-time trajectory. As long as mobile phone users turn on and off, make calls, text messages, location updates, and switch base stations, the corresponding signaling data will be recorded. Therefore, based on the signaling data within the set time, the mobile phone user's stay point within that time can be determined.

表1 手机信令数据Table 1 Mobile phone signaling data

参见表1,示例性的,其中“User_id”字段对应的内容用于标识该信令数据对应的手机。关于“User_id”对应的内容的具体取值,在一些实现方式中,例如可以为手机中插入的SIM卡号,也可以是手机的序列号,或者是根据设定规则生成的标识号等,本实施例对此不作限制,在实际应用中,任意能够标识其唯一性的均可,表1中以根据设定规则生成的标识号“User_138”为例。Refer to Table 1, for example, the content corresponding to the "User_id" field is used to identify the mobile phone corresponding to the signaling data. Regarding the specific value of the content corresponding to "User_id", in some implementations, it can be the SIM card number inserted in the mobile phone, the serial number of the mobile phone, or the identification number generated according to the set rules, etc., this implementation The example does not limit this. In practical applications, anything that can identify its uniqueness can be used. Table 1 takes the identification number "User_138" generated according to the set rules as an example.

此外,需要说明的是,对于停留点确定的环节是在手机本地完成的场景,由于获得的信令数据就是手机自己的,不存在其他手机的信令数据,因此以表1所示形式展示的信令数据,可以不设置“User_id”字段。In addition, it should be noted that for the scenario where the determination of the stay point is completed locally on the mobile phone, since the signaling data obtained is the mobile phone's own and there is no signaling data from other mobile phones, it is displayed in the form shown in Table 1 For signaling data, the "User_id" field does not need to be set.

相应地,对于停留点确定的环节是由云端服务器完成的场景,为了区分不同手机的信令数据,以表1所示形式展示的信令数据,则需要设置“User_id”字段。Correspondingly, for the scenario where the determination of the stay point is completed by the cloud server, in order to distinguish the signaling data of different mobile phones, the "User_id" field needs to be set for the signaling data displayed in the form shown in Table 1.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

继续参见表1,示例性的,其中“Happen_time”字段对应的内容用于标识该条信令数据的记录时间。表1中以“T_1”至“T_10”这10个时间分别对应的10条信令数据为例。Continuing to refer to Table 1, for example, the content corresponding to the "Happen_time" field is used to identify the recording time of the signaling data. Table 1 takes the 10 pieces of signaling data corresponding to the 10 times "T_1" to "T_10" as an example.

继续参见表1,示例性的,其中“longitude”字段对应的内容用于标识该条信令数据对应的经度,“latitude”字段对应的内容用于标识该条信令数据对应的纬度。表1以“T_1”至“T_10”这10个时间分别对应的10条信令数据的经度和纬度均不相同为例。Continuing to refer to Table 1, for example, the content corresponding to the "longitude" field is used to identify the longitude corresponding to the piece of signaling data, and the content corresponding to the "latitude" field is used to identify the latitude corresponding to the piece of signaling data. Table 1 takes as an example that the longitude and latitude of the 10 pieces of signaling data corresponding to the 10 times from "T_1" to "T_10" are different.

继续参见表1,示例性的,其中“Cell_id”字段对应的内容用于标识该手机在不同时间接入的基站的身份标识号(Identity document,id),“Wifi_bssid”字段对应的内容用于标识手机使用Wifi进行通信业务时,接入的路由器的编号。Continue to refer to Table 1. For example, the content corresponding to the "Cell_id" field is used to identify the identity document (Identity document, id) of the base station that the mobile phone accesses at different times, and the content corresponding to the "Wifi_bssid" field is used to identify The number of the router that the mobile phone accesses when using Wifi for communication services.

需要说明的是,在实际应用中,如果用户在使用手机进行通信业务时,没有使用Wifi,直接使用的蜂窝网络,则对应的信令数据中“Wifi_bssid”字段对应的内容可以为空,或者设定的“null”,或者其他内容,本实施例对此不作限定。It should be noted that in actual applications, if the user does not use Wifi but directly uses the cellular network when using the mobile phone for communication services, the content corresponding to the "Wifi_bssid" field in the corresponding signaling data can be empty, or set to A certain "null" or other contents are not limited in this embodiment.

基于上述表1示出的10条信令数据,可以确定使用该手机的用户的10个空间位置,其分布例如图6a中的P1至P10。Based on the 10 pieces of signaling data shown in Table 1 above, 10 spatial locations of users using the mobile phone can be determined, and their distribution is, for example, P1 to P10 in Figure 6a.

参见图6a,示例性的,其中P4至P9这6个空间位置分布比较集中,为了减少数据处理量,可以其中一个空间位置为参考点,然后根据各个空间位置的经纬度信息,确定参考点与其他5个空间位置之间的距离。Referring to Figure 6a, for example, the distribution of the six spatial locations P4 to P9 is relatively concentrated. In order to reduce the amount of data processing, one of the spatial locations can be used as a reference point, and then the reference point and other locations can be determined based on the longitude and latitude information of each spatial location. The distance between 5 spatial locations.

参见图6b,示例性的,以P4为参考点,假设P4与P5之间的距离D(P4,P5)、P4与P6之间的距离D(P4,P6)、P4与P7之间的距离D(P4,P7)、P4与P8之间的距离D(P4,P8)、P4与P9之间的距离D(P4,P9)均小于设定的距离D1,则可以将P4至P9这6个空间位置看作一个空间位置,如图6b中示出的P11。这样,后续基于这10个空间位置确定停留点时,直接将P11与P1、P2、P3和P10进行处理即可,无需将P4至P9这6个空间位置分别与P1、P2、P3和P10进行处理,从而简化了处理流程。Referring to Figure 6b, for example, taking P4 as the reference point, it is assumed that the distance between P4 and P5 is D (P4, P5), the distance between P4 and P6 is D (P4, P6), and the distance between P4 and P7 D(P4,P7), the distance D(P4,P8) between P4 and P8, and the distance D(P4,P9) between P4 and P9 are all less than the set distance D1, then the 6 distances from P4 to P9 can be A spatial position is regarded as a spatial position, such as P11 shown in Figure 6b. In this way, when subsequently determining the stay point based on these 10 spatial positions, P11 can be directly processed with P1, P2, P3, and P10. There is no need to process the 6 spatial positions P4 to P9 with P1, P2, P3, and P10 respectively. processing, thereby simplifying the processing process.

此外,需要说明的是,在一些实现方式中可以P4至P9这6个空间位置的平均经纬度信息,作为P11这一空间位置的经纬度信息,即将P4至P9这6个空间位置的经度计算得到的平均经度作为P11这一空间位置的经度,将P4至P9这6个空间位置的纬度计算得到的平均纬度作为P11这一空间位置的纬度。In addition, it should be noted that in some implementations, the average longitude and latitude information of the six spatial locations P4 to P9 can be used as the longitude and latitude information of the spatial location P11, that is, the longitude of the six spatial locations P4 to P9 is calculated. The average longitude is used as the longitude of the spatial location P11, and the average latitude calculated from the latitudes of the six spatial locations P4 to P9 is used as the latitude of the spatial location P11.

示例性的,在另一些实现方式中,如果P4至P9这6个空间位置的经纬度信息差异较小,也可以直接以选取的参考点,如上述所说的P4的经纬度信息作为P11的经纬度信息。For example, in other implementations, if the difference in the longitude and latitude information of the six spatial locations P4 to P9 is small, the selected reference point, such as the longitude and latitude information of P4 mentioned above, can also be directly used as the longitude and latitude information of P11. .

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

此外,需要说明的是,关于上述D1的取值,可以根据实际业务场景需求设置,例如对应精确度要求高的业务场景,可以将D1的取值设置的相对较小,比如1~5米;反之,则可以将D1的取值设置的相对较大,比如5~10米,甚至更大,本实施例对此不作限制。In addition, it should be noted that the value of D1 mentioned above can be set according to actual business scenario requirements. For example, corresponding to business scenarios with high accuracy requirements, the value of D1 can be set to a relatively small value, such as 1 to 5 meters; On the contrary, the value of D1 can be set to a relatively large value, such as 5 to 10 meters, or even larger. This embodiment does not limit this.

示例性的,经图6b所示的处理后,图6a示出的分布图,会变更为如图6c所示。For example, after the processing shown in Figure 6b, the distribution diagram shown in Figure 6a will be changed to that shown in Figure 6c.

基于近邻聚类的聚类方式,结合表1和图6c所示,依次确定P1与P2、P3、P11和P10之间的距离信息,假设为20米、50米、175米和205米。如果根据业务场景需求设置的同一停留点内任意两个空间位置之间的距离不大于D2,如125米,且根据停留点内所有空间位置对应的时间确定在该停留点的停留时间不小于设定的时间阈值,如10分钟。则基于上述确定的P1与P2、P3、P11和P10之间的距离信息可知,P1与P2、P3之间的距离不大于D2,满足属于同一停留点的条件之一。对于这种情况,可以进一步确定手机用户在P1至P3这3个空间位置的停留时间。Based on the clustering method of nearest neighbor clustering, as shown in Table 1 and Figure 6c, the distance information between P1 and P2, P3, P11 and P10 is determined in sequence, assuming 20 meters, 50 meters, 175 meters and 205 meters. If the distance between any two spatial locations in the same stay point set according to business scenario requirements is not greater than D2, such as 125 meters, and the stay time at the stay point is determined based on the time corresponding to all spatial locations in the stay point, it is not less than the set A certain time threshold, such as 10 minutes. Based on the above-determined distance information between P1 and P2, P3, P11 and P10, it can be seen that the distance between P1 and P2, P3 is not greater than D2, which satisfies one of the conditions for belonging to the same stay point. For this situation, the dwell time of the mobile phone user at the three spatial locations P1 to P3 can be further determined.

关于停留时间的确定,在表1中每一条信令数据中“Happen_time”字段对应的内容标识的是手机用户移动到该条信令数据对应的空间位置的时间点时,手机用户在P1至P3这3个空间位置的停留时间,例如可以P1对应的“T_1”为起始时间,以P3对应的“T_3”,或者以P4对应的“T_4”为结束时间,进而确定手机用户在P1至P3这3个空间位置的停留时间。Regarding the determination of the residence time, the content corresponding to the "Happen_time" field in each piece of signaling data in Table 1 identifies the time point when the mobile phone user moves to the spatial position corresponding to the signaling data. When the mobile phone user moves from P1 to P3 For the residence time of these three spatial locations, for example, "T_1" corresponding to P1 can be used as the starting time, "T_3" corresponding to P3, or "T_4" corresponding to P4 can be used as the ending time, and then the mobile phone user can be determined from P1 to P3 The residence time of these three spatial locations.

示例性的,在另一些实现方式中,如果表1中每一条信令数据中“Happen_time”字段对应的内容标识的是手机用户在到该条信令数据对应的空间位置的停留时间,则直接对“T_1”、“T_2”和“T_3”进行求和,便可以得到手机用户在P1至P3这3个空间位置的停留时间。For example, in other implementations, if the content corresponding to the "Happen_time" field in each piece of signaling data in Table 1 identifies the dwell time of the mobile phone user at the spatial location corresponding to the piece of signaling data, then directly By summing "T_1", "T_2" and "T_3", you can get the dwell time of the mobile phone user at the three spatial locations from P1 to P3.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。本实施例以手机用户在P1至P3这3个空间位置的停留时间为2分钟为例。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment. In this embodiment, it is taken as an example that the mobile phone user's stay time in the three spatial locations P1 to P3 is 2 minutes.

由于手机用户在P1至P3这3个空间位置的停留时间(2分钟)小于上述所说的时间阈值(10分钟),因此P1与P2、P3不属于一个停留点。Since the mobile phone user's stay time (2 minutes) at the three spatial locations from P1 to P3 is less than the above-mentioned time threshold (10 minutes), P1, P2, and P3 do not belong to the same stay point.

按照上述处理逻辑,结合表1和图6d所示,继续确定P2与P3、P11和P10之间的距离信息,假设为30米、155米、185米。仍以上述示出的确定属于同一停留点的两个条件为例,可以确定P2与P3满足属于同一停留点的距离要求,如果手机用户在P2和P3两个空间位置的停留时间为5分钟,则P2和P3也不属于一个停留点。According to the above processing logic, combined with Table 1 and Figure 6d, continue to determine the distance information between P2 and P3, P11 and P10, assuming they are 30 meters, 155 meters, and 185 meters. Still taking the above two conditions for determining that they belong to the same stay point as an example, it can be determined that P2 and P3 meet the distance requirements for belonging to the same stay point. If the mobile phone user stays at the two spatial locations P2 and P3 for 5 minutes, Then P2 and P3 do not belong to the same stop point.

按照上述处理逻辑,结合表1和图6e所示,继续确定P3与P11和P10之间的距离信息,假设为125米、155米。仍以上述示出的确定属于同一停留点的两个条件为例,可以确定P3与P1满足属于同一停留点的距离要求,如果手机用户在P3和P11两个空间位置的停留时间为30分钟,即大于设定的时间阈值(10分钟),则确定P3和P11也满足上述属于同一停留点的时长要求,因此P3和P11属于一个停留点。即,根据P3对应的信令数据和P11对应的信令数据,可以确定一个停留点,如图6e中的停留点1。According to the above processing logic, combined with Table 1 and Figure 6e, continue to determine the distance information between P3 and P11 and P10, assuming 125 meters and 155 meters. Still taking the above two conditions for determining that they belong to the same stay point as an example, it can be determined that P3 and P1 meet the distance requirements for belonging to the same stay point. If the mobile phone user stays at the two spatial locations P3 and P11 for 30 minutes, That is, if it is greater than the set time threshold (10 minutes), it is determined that P3 and P11 also meet the above time requirements for belonging to the same stay point, so P3 and P11 belong to the same stay point. That is, according to the signaling data corresponding to P3 and the signaling data corresponding to P11, a stay point can be determined, such as stay point 1 in Figure 6e.

可理解的,关于停留点1的经纬度信息,例如可以为根据P3和P11的经纬度信息确定的平均经纬度信息。It can be understood that the longitude and latitude information about the stay point 1 may be, for example, the average longitude and latitude information determined based on the longitude and latitude information of P3 and P11.

由此,基于近邻聚类的聚类方式,按照上述处理逻辑,便可以根据一天当中记录的所有信令数据,确定出满足上述要求的所有停留点。Therefore, based on the clustering method based on neighbor clustering and according to the above processing logic, all the stay points that meet the above requirements can be determined based on all signaling data recorded during the day.

停留点合并Stop point merge

在完成上述停留点确定后,便可以基于近邻聚类的聚类方式,对当天确定的所有停留点进行近邻聚类,进而将同一个位置下的多个停留点合并为一个,从而使得合并后的停留点具有唯一性。After the above-mentioned stay points are determined, all the stay points determined for the day can be clustered based on the clustering method of neighbor clustering, and then multiple stay points at the same location can be merged into one, so that the merged The stop point is unique.

参见图7,示例性的,以上述停留点确定方式确定手机用户在一天中顺序出现的停留点分别为停留点1、停留点2和停留点1,即手机用户在一天当中在停留点1停留过两次,在停留点2停留过1次。Referring to Figure 7, for example, the staying points that the mobile phone user appears sequentially throughout the day are determined to be stay point 1, stay point 2 and stay point 1 using the above stay point determination method, that is, the mobile phone user stays at stay point 1 throughout the day. Passed twice and stopped at stopping point 2 once.

为了保证不同的停留点仅出现一次,基于近邻聚类的聚类方式对停留点的合并,例如为随机选一天当中的一个停留点,例如图7中的停留点1,然后以停留点1作为起始聚类中心点,向后遍历到时间轴上下一个出现的停留点,如停留点2。接着,判断停留点1的与停留点2之间的距离是否不大于设定的距离D3,如果大于D3,则将停留点2作为第二个聚类中心点,即停留点1和停留点2为两个不同的停留点,例如一个指示手机用户的居住地点,一个指示手机用户的工作地点;反之,则将停留点1和停留点2合并为一个停留点,并将根据停留点1和停留点2的经纬度信息确定的平均经纬度信息作为合并后的停留点的经纬度信息。In order to ensure that different stay points only appear once, the stay points are merged based on the clustering method of nearest neighbor clustering. For example, a stay point in a day is randomly selected, such as stay point 1 in Figure 7, and then stay point 1 is used as Starting from the clustering center point, traverse backward to the next stop point that appears on the timeline, such as stop point 2. Next, it is judged whether the distance between stay point 1 and stay point 2 is not greater than the set distance D3. If it is greater than D3, then stay point 2 is used as the second cluster center point, that is, stay point 1 and stay point 2. are two different stay points, for example, one indicates the residence location of the mobile phone user, and the other indicates the work location of the mobile phone user; otherwise, the stay point 1 and the stay point 2 will be merged into one stay point, and the stay point 1 and the stay point 2 will be combined according to the stay point 1 and the stay point 2. The average longitude and latitude information determined by the longitude and latitude information of point 2 is used as the longitude and latitude information of the merged stay point.

基于上述处理逻辑,重复执行上述步骤,直到时间轴上所有的停留点都被遍历完毕后,便可得到一天中所有合并后的停留点。如图7所示,本实施例以停留点1和停留点2是两个不同的停留点为例,则按照上述处理逻辑,最终得到的停留点有停留点1'和停留点2。Based on the above processing logic, repeat the above steps until all the stay points on the timeline have been traversed, and then all the merged stay points in the day can be obtained. As shown in Figure 7, this embodiment takes the stay point 1 and the stay point 2 as two different stay points as an example. According to the above processing logic, the finally obtained stay points include the stay point 1' and the stay point 2.

可理解的,每一个停留点都包括了构成该停留点的各个空间位置对应的信令数据。由于实际应用中,一个停留点包括的空间位置可能较多,例如几十个,几百个,甚至更多。因此,往往会因为停留点确定环节中设置的条件不够合理,导致停留点合并环节中,合并后的停留点中包括异常的空间位置。It can be understood that each stay point includes signaling data corresponding to each spatial location that constitutes the stay point. In actual applications, a stay point may include many spatial locations, such as dozens, hundreds, or even more. Therefore, often because the conditions set in the stay point determination process are not reasonable enough, in the stay point merging process, the merged stay points include abnormal spatial positions.

需要说明的是,本实施例中所说的异常的空间位置,例如为与大部分聚集在一起的空间位置远离的边缘空间位置。为了避免这些边缘空间位置对最终结果的影响,在按照上述处理逻辑进行停留点合并后,可以对得到的每一个停留点包括的空间位置信息进行筛选,进而将异常的边缘空间位置剔除,最后根据剔除异常空间位置后,剩余的空间位置的经纬度信息重新计算该停留点的中心经纬度,即平均经度和平均纬度。It should be noted that the abnormal spatial position mentioned in this embodiment is, for example, an edge spatial position far away from the spatial positions where most of the objects are gathered together. In order to avoid the impact of these edge space positions on the final result, after merging the stay points according to the above processing logic, the spatial position information included in each stay point can be filtered, and then the abnormal edge space positions are eliminated, and finally based on After eliminating abnormal spatial locations, the remaining spatial location longitude and latitude information is used to recalculate the central longitude and latitude of the stay point, that is, the average longitude and average latitude.

关于边缘空间位置的剔除方式,例如可以采用如下方式:Regarding the elimination method of edge space position, for example, the following method can be used:

(1)对于每一停留点,获取该停留点内所有的空间位置对应的经纬度信息;(1) For each stay point, obtain the longitude and latitude information corresponding to all spatial locations within the stay point;

(2)按照经纬度信息进行排序;(2) Sort according to latitude and longitude information;

(3)分别获取排序后的第Q1位的经度和纬度,分别记住Q1_long和Q1_lat,以及第Q3位的经度和纬度,分别记住Q3_long和Q3_lat;(3) Obtain the sorted longitude and latitude of Q1 respectively, remember Q1_long and Q1_lat respectively, and the longitude and latitude of Q3, remember Q3_long and Q3_lat respectively;

(4)保留经度在[Q1_long-1.5*(Q3_long-Q1_long), Q3_long+1.5*(Q3_long-Q1_long)],纬度在[Q1_lat-1.5*(Q3_lat-Q1_lat), Q3_lat+1.5*(Q3_lat-Q1_lat)]的空间位置,其他的视为边缘空间位置,将其剔除。(4) Keep the longitude in [Q1_long-1.5*(Q3_long-Q1_long), Q3_long+1.5*(Q3_long-Q1_long)] and the latitude in [Q1_lat-1.5*(Q3_lat-Q1_lat), Q3_lat+1.5*(Q3_lat-Q1_lat) ] spatial position, others are regarded as edge spatial positions and eliminated.

示例性的,关于Q1位和Q3位的选取,例如可以是将排序后的空间位置进行平均二分处理,将中间位置表示为Q2,则第Q1位为第1位与第Q2位之间的中间位,第Q3位为第Q2位与最后一位之间的中间位,例如在排序后的空间位置有100个时,第Q1位的经纬度信息为位于第25位的空间位置对应的经纬度信息,第Q3位的经纬度信息为位于第75位的空间位置对应的经纬度信息。For example, regarding the selection of Q1 and Q3, the sorted spatial positions can be divided into two averages, and the middle position is represented as Q2, then the Q1 position is the middle between the 1st position and the Q2th position. bit, the Q3 bit is the middle bit between the Q2 bit and the last bit. For example, when there are 100 spatial locations after sorting, the longitude and latitude information of the Q1 bit is the longitude and latitude information corresponding to the 25th bit of spatial location. The longitude and latitude information at the Q3 position is the longitude and latitude information corresponding to the spatial position at the 75th position.

此外,需要说明的是,如果在实际应用中,上述两个中间位不是整数值,则第Q1位取靠近基于第1位和第Q2位确定的中间位的最小整数位,第Q3位取靠近基于第Q2位和最后一位确定的中间位的最大整数位。In addition, it should be noted that if in actual applications, the above two middle bits are not integer values, the Q1th bit is taken to be the smallest integer bit close to the middle bit determined based on the 1st and Q2th bits, and the Q3th bit is taken to be close to The maximum integer number of intermediate bits determined based on the Q2 and last bits.

示例性的,在合并后的停留点中包括的空间位置分布如图8中(1)所示的情况下,基于上述边缘空间位置的剔除方式剔除边缘空间位置后,最终保留下来的空间位置的分布如图8中(2)所示。For example, in the case where the spatial position distribution included in the merged stay points is as shown in (1) in Figure 8, after the edge spatial position is eliminated based on the above edge spatial position elimination method, the spatial position that is finally retained is The distribution is shown in (2) in Figure 8.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

由此,基于近邻聚类的聚类方式,按照上述处理逻辑,便可以根据停留点确定环节确定的停留点,得到一天当中所有的唯一停留点,即经停留点合并环节处理后,最终保留的多个停留点都是不相同的停留点。Therefore, based on the clustering method of nearest neighbor clustering, according to the above processing logic, it is possible to obtain all the unique stay points in a day based on the stay points determined by the stay point determination link, that is, after the stay point merging link, the final retained points Multiple stop points are different stop points.

常驻地确定Residential location determined

需要说明的是,本实施例中所说的常驻地,是指预设时间内,手机用户在同一停留点停留时间满足设定要求的停留点。由于上述停留点的确定是以天为单位描述的,故而本实施例将N天内手机用户在同一停留点停留天数满足设定要求,如不小于(α% * N)的停留点作为常驻地。It should be noted that the resident place mentioned in this embodiment refers to the stay point where the mobile phone user's stay time at the same stay point meets the set requirements within the preset time. Since the determination of the above stay points is described in units of days, this embodiment takes the stay points where the number of days that the mobile phone user stays at the same stay point within N days meets the setting requirements, such as not less than (α% * N), as the permanent residence. .

可理解的,α的取值可以根据业务场景需求进行设置,例如可以为50,即将停留天数不小于N/2的停留点作为常驻地。It is understandable that the value of α can be set according to the requirements of the business scenario, for example, it can be 50, that is, a stay point with a stay period of not less than N/2 days is regarded as a permanent residence.

关于同一停留点停留天数的确定,具体基于近邻聚类的聚类方式,对N天内出现的所有相同的停留点进行聚类,如图9中以N=3为例,其中Day1天按照上述停留点确定环节和停留点合并环节处理后确定的停留点包括停留点1'和停留点2,Day2天按照上述停留点确定环节和停留点合并环节处理后确定的停留点包括停留点1'、停留点2和停留点3,Day3天按照上述停留点确定环节和停留点合并环节处理后确定的停留点包括停留点1'和停留点4。基于近邻聚类的聚类方式,对这3天出现的停留点进行聚类后,最终会得到4个不同停留点的聚类簇,如图9中停留点1'的聚类簇、停留点2的聚类簇、停留点3的聚类簇和停留点4的聚类簇。Regarding the determination of the number of days to stay at the same stay point, specifically based on the clustering method of nearest neighbor clustering, all the same stay points that appear within N days are clustered. In Figure 9, N=3 is used as an example, where Day 1 stays according to the above The stay points determined after the point determination process and stay point merging process include stay point 1' and stay point 2. On Day 2, the stay points determined after the stay point determination process and stay point merging process are processed according to the above stay point determination process and stay point merging process include stay point 1', stay point 2. Point 2 and stay point 3. On Day 3, the stay points determined after processing according to the above stay point determination process and stay point merging process include stay point 1' and stay point 4. Based on the clustering method of nearest neighbor clustering, after clustering the stay points that appeared in these three days, we will finally get 4 clusters of different stay points, such as the cluster cluster and stay point of stay point 1' in Figure 9 The cluster of 2, the cluster of stop point 3 and the cluster of stop point 4.

需要说明的是,为了尽可能提高最终确定的常驻地的精准度,常驻地确定环节中,基于近邻聚类的聚类方式进行聚类时,任意两个停留点之间的距离可以设置小于D4,其中D4的取值可以小于上文所说的D3。It should be noted that, in order to improve the accuracy of the final determined resident place as much as possible, in the process of determining the resident place, when clustering based on the clustering method of nearest neighbor clustering, the distance between any two stay points can be set. Less than D4, where the value of D4 can be smaller than D3 mentioned above.

按照上述处理逻辑处理后,每一个停留点对应的聚类簇中包括的停留点的数量,即代表该手机用户在该停留点的聚类簇中出现的天数。继续参见图9,示例性的,手机用户在这3天中,每一天都在停留点1'出现过,有2天在停留点2出现过,有1天在停留点3、停留点4出现过。After processing according to the above processing logic, the number of stay points included in the cluster corresponding to each stay point represents the number of days that the mobile phone user has appeared in the cluster of the stay point. Continuing to refer to Figure 9, for example, in these three days, the mobile phone user appeared at stay point 1' every day, appeared at stay point 2 on two days, and appeared at stay point 3 and stay point 4 on one day. Pass.

基于上述例举的常驻地确定要求,如α的取值为50,则这3天中至少有1.5天出现过的停留点将被确定为常驻地。通过上述描述可知,满足该要求的停留点有两个,分别为停留点1'和停留点2,即图9所示示例中,根据上述停留点确定环节、停留点合并环节和常驻地确定环节的处理,最终确定的常驻地为停留点1'和停留点2。Based on the above-mentioned requirements for determination of permanent residence, if the value of α is 50, then the stay points that have occurred on at least 1.5 of these 3 days will be determined as permanent residences. It can be seen from the above description that there are two stay points that meet this requirement, namely stay point 1' and stay point 2. That is, in the example shown in Figure 9, according to the above stay point determination link, stay point merging link and permanent residence determination During the processing of this link, the final determined permanent locations are stay point 1' and stay point 2.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

由此,基于近邻聚类的聚类方式对手机用户在每一天的空间位置进行聚类,进而得到每一天包括的停留点,同时通过对每一天的停留点进行合并的方式,赋予了每一个停留点在聚类过程中实际的物理含义,即在常驻地确定环节中,对于任意一个聚类簇,每有一个停留点,就代表手机用户在该聚类簇中出现的天数,这样根据不同的业务场景需要,通过设定不同的天数阈值就可以选取不同的停留点作为该业务场景下的常驻地,从而能够基于识别出的常驻地为用户提供更加丰富多彩的服务。Therefore, the clustering method based on nearest neighbor clustering clusters the spatial positions of mobile phone users in each day, and then obtains the stay points included in each day. At the same time, by merging the stay points in each day, each user is given The actual physical meaning of stay points in the clustering process is that in the process of determining the resident location, for any cluster, each stay point represents the number of days that the mobile phone user has appeared in the cluster. In this way, according to Different business scenarios require that by setting different day thresholds, different staying points can be selected as permanent residences in the business scenario, so that users can be provided with more colorful services based on the identified permanent residences.

常驻地唯一性判断Judgment of uniqueness of permanent residence

需要说明的是,在实际应用中,常驻地确定流程可以按照设定的周期执行,例如以天为单位,即每一天生成的常驻地对应的经纬度信息,可以在前一天结果的基础上调整。这种方式虽然可以减少每一天的数据处理量,但是实际应用中,因为用户停留位置的差异,可能会出现与前一天的常驻地经纬度信息不完全一样的情况,这就会导致每一天对应的常驻地统计表中同一个常驻地,有多种不同的经纬度信息。为了在上述常驻地确定环节中,保证基于在前的常驻地统计表和最新一天的常驻地统计表能够精准的确定常驻地,而不是将相同的常驻地识别为多个不同的常驻地,可以判断前一天的常驻地统计表中记录的常驻地是否与在后一天的常驻地统计表中记录的常驻地是同一个,若是则为其分配相同的标签。It should be noted that in practical applications, the resident location determination process can be executed according to a set period, for example, in days, that is, the longitude and latitude information corresponding to the resident location generated each day can be based on the results of the previous day. Adjustment. Although this method can reduce the amount of data processing each day, in actual applications, due to the difference in the user's stay location, the longitude and latitude information of the permanent residence of the previous day may not be exactly the same, which will result in the correspondence of each day. There are many different longitude and latitude information for the same permanent place in the resident place statistics table. In order to ensure that the permanent place can be accurately determined based on the previous permanent place statistics table and the latest day's permanent place statistics table in the above permanent place determination process, instead of identifying the same permanent place as multiple different places. The resident place can be judged whether the resident place recorded in the resident place statistics table of the previous day is the same as the resident place recorded in the resident place statistics table of the next day. If so, the same label will be assigned to it. .

表2Day9天的常驻地统计表Table 2Day 9-day resident statistics table

表3 Day10天的常驻地统计表1Table 3 Day 10 resident place statistics Table 1

需要说明的是,上述表中出现的“Num”字段为生成常驻地统计表时,每一条数据对应的序列号,“longitude”字段对应的内容为常驻地的经度,“latitude”字段对应的内容为常驻地的纬度,“label”字段对应的内容为常驻地对应的标签。It should be noted that the "Num" field appearing in the above table is the sequence number corresponding to each piece of data when generating the resident place statistics table, the "longitude" field corresponds to the longitude of the resident place, and the "latitude" field corresponds to The content of is the latitude of the resident place, and the content corresponding to the "label" field is the label corresponding to the resident place.

此外,还需要说明的是,表3所示的Day10天的常驻地统计表1具体是基于Day10天当天的信令数据确定的常驻地。In addition, it should be noted that the resident place statistics table 1 on Day 10 shown in Table 3 is specifically the resident place determined based on the signaling data on Day 10.

通过将表3中每一条数据的经纬度,依次与表2中每一条数据的经纬度进行距离计算,进而确定表3中每一个序列号对应的常驻地与表2中每一个常驻地之间的距离是否不大于设定的距离D5,关于D5的取值可以根据实际的业务场景需求设置,例如取5米。By calculating the distance between the longitude and latitude of each piece of data in Table 3 and the longitude and latitude of each piece of data in Table 2, the distance between the resident place corresponding to each serial number in Table 3 and each resident place in Table 2 is determined. Is the distance no greater than the set distance D5? The value of D5 can be set according to the actual business scenario requirements, for example, 5 meters.

相应地,如果通过判断确定表3中Num为1的常驻地与表2中Num为1的常驻地之间的距离不大于D5,与表2中Num为2和为3的常驻地之间的距离大于D5,则认为表3中Num为1的常驻地与表2中Num为1的常驻地为同一个常驻地,与表2中Num为2和为3的常驻地不是同一个常驻地。Correspondingly, if it is determined through judgment that the distance between the resident place where Num is 1 in Table 3 and the resident place where Num is 1 in Table 2 is not greater than D5, it is different from the resident place where Num is 2 and 3 in Table 2. If the distance between them is greater than D5, it is considered that the permanent residence with Num of 1 in Table 3 and the permanent residence with Num of 1 in Table 2 are the same permanent residence, and the permanent residence with Num of 2 and 3 in Table 2 is considered to be the same permanent residence. The land is not the same permanent place.

按照上述处理逻辑,依次将表3中剩余的其他常驻地与表2中的常驻地进行判断,由于表3中Num为2的常驻地与表2中Num为2的常驻地经纬度相同,可以直接确定其为同一个常驻地,与表2中Num为1和为3的常驻地不是同一个常驻地,表3中Num为3的常驻地与表2中Num为1、2和3的常驻地之间的距离均大于D5,即表3中Num为3的常驻地与表2中Num为1、2和3的常驻地是不相同的常驻地,假设表3中Num为3的常驻地为首次出现,在Day1天至Day8天的常驻地统计表中也没有出现,则可以为表3中Num为3的常驻地分配一个新的标签,如Fence_4,而其他相同的常驻地,则复用表2中对应常驻地的标签。基于此,为表3中Num为1、2和3的常驻地分配标签后,得到的Day10天的常驻地统计表如下述表4所示。According to the above processing logic, the other remaining permanent residences in Table 3 are judged against the permanent residences in Table 2. Since the permanent residence with Num in Table 3 is 2 and the longitude and latitude of the permanent residence with Num at 2 in Table 2 The same, it can be directly determined that it is the same permanent residence. It is not the same permanent residence as the permanent residence where Num is 1 and 3 in Table 2. The permanent residence where Num is 3 in Table 3 is different from the permanent residence where Num is 3 in Table 2. The distances between the permanent residences of 1, 2 and 3 are all greater than D5, that is, the permanent residence with Num of 3 in Table 3 and the permanent residence with Num of 1, 2 and 3 in Table 2 are different permanent residences. , assuming that the resident place with Num of 3 in Table 3 appears for the first time and does not appear in the resident place statistics table from Day 1 to Day 8, then a new resident place with Num of 3 in Table 3 can be assigned Labels, such as Fence_4, and other identical resident locations, reuse the labels corresponding to the resident locations in Table 2. Based on this, after assigning labels to the resident places with Num of 1, 2, and 3 in Table 3, the obtained resident place statistics table for Day 10 is as shown in Table 4 below.

表4 Day10天的常驻地统计表2Table 4 Day 10-day resident statistics Table 2

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

由此,通过上述常驻地唯一性判断的处理逻辑,可以使得相同的常驻地,即便在经纬度不完全相同的情况,也可以识别为同一个常驻地。Therefore, through the processing logic of the above-mentioned permanent residence uniqueness judgment, the same permanent residence can be recognized as the same permanent residence even if the longitude and latitude are not exactly the same.

关于本申请中上述各实施例中所说的常驻地的识别方法的具体实现流程,以及常驻地识别方法中涉及的第一停留点确定流程、第一停留点合并为第二停留点的流程、异常的空间位置剔除的流程、基于第二停留点确定常驻地的流程,以及常驻地唯一性的确定流程,详见图10至图15所示实施例。Regarding the specific implementation process of the permanent residence identification method mentioned in the above embodiments of this application, as well as the first stay point determination process involved in the permanent residence identification method, and the first stay point merging into the second stay point. The process, the process of eliminating abnormal spatial locations, the process of determining the resident location based on the second stay point, and the process of determining the uniqueness of the resident location are detailed in the embodiments shown in Figures 10 to 15.

参见图10,本实施例提供的常驻地的识别方法,具体包括:Referring to Figure 10, the resident location identification method provided by this embodiment specifically includes:

S101,获取用户使用的电子设备在第一时间段记录的信令数据,第一时间段包括至少一个第二时间段。S101. Obtain signaling data recorded by the electronic device used by the user in a first time period. The first time period includes at least one second time period.

示例性的,在一些实现方式中,电子设备例如为上述所说的手机、平板电脑、智能穿戴设备,如智能手表等,本实施例对此不作限定。For example, in some implementations, the electronic device is, for example, the above-mentioned mobile phone, tablet computer, smart wearable device, such as smart watch, etc., which is not limited in this embodiment.

示例性的,在一些实现方式中,本实施例中所说的第一时间段,例如为上述所说的N天,如3天。For example, in some implementations, the first period of time in this embodiment is, for example, the N days mentioned above, such as 3 days.

相应地,在第一时间段为N天时,第二时间段例如为24小时,即1天。Correspondingly, when the first time period is N days, the second time period is, for example, 24 hours, that is, 1 day.

此外,可理解的,本实施例中所说的信令数据与上述实施例相同,可包括经度、纬度、接入的基站id、接入的路由器编号、具体的记录时间、标识电子设备的id等,关于信令数据中具体参数的描述详见上文,此处不再赘述。In addition, it can be understood that the signaling data in this embodiment is the same as the above embodiment, and may include longitude, latitude, accessed base station ID, accessed router number, specific recording time, and ID identifying the electronic device. etc. The description of the specific parameters in the signaling data is detailed above and will not be described again here.

S102,对于每一个第二时间段,根据第二时间段的信令数据,确定用户在第二时间段的第一停留点。S102: For each second time period, determine the user's first stay point in the second time period based on the signaling data of the second time period.

示例性的,在一些实现方式中,确定的第一停留点例如可以有多个,如上文所说的停留点1、停留点2等。For example, in some implementations, there may be multiple determined first stay points, such as stay point 1, stay point 2, etc. mentioned above.

关于第一停留点的确定流程可以参见图11所示实施例,此处不再赘述。Regarding the determination process of the first stopping point, reference can be made to the embodiment shown in Fig. 11 and will not be described again here.

S103,对于每一个第二时间段,基于近邻聚类的聚类方式,对第二时间段内的第一停留点进行合并,得到第二停留点。S103. For each second time period, based on the clustering method of neighbor clustering, merge the first stay points in the second time period to obtain the second stay point.

示例性的,在一些实现方式中,基于近邻聚类的距离方式,根据第一停留点合并为的第二停留点,例如为上文所说的将两个,甚至更多的停留点1合并为停留点1',具体实现细节,可以参见图12所示实施例,此处不再赘述。For example, in some implementations, based on the distance method of nearest neighbor clustering, the first stay point is merged into a second stay point, for example, two or even more stay points 1 are merged as mentioned above. It is the stay point 1'. For specific implementation details, please refer to the embodiment shown in Figure 12 and will not be described again here.

S104,基于近邻聚类的聚类方式,将第一时间段内相同的第二停留点聚类为一个聚类簇。S104. Based on the clustering method of neighbor clustering, the same second stay points in the first time period are clustered into a cluster.

如上文所说的将3天内所有的停留点1'聚类为一个聚类簇,将3天内所有的停留点2聚类为一个聚类簇,将3天内所有的停留点3聚类为一个聚类簇,将3天内所有的停留点4聚类为一个聚类簇,具体实现细节,可以参见图14所示实施例,此处不再赘述。As mentioned above, all stay points 1' within 3 days are clustered into one cluster, all stay points 2 within 3 days are clustered into one cluster, and all stay points 3 within 3 days are clustered into one. Clustering clusters all the stay points 4 within 3 days into one clustering cluster. For specific implementation details, please refer to the embodiment shown in Figure 14, which will not be described again here.

S105,对于每一个聚类簇,当聚类簇中的第二停留点数量满足设定要求时,将聚类簇中的第二停留点确定为第一常驻地。S105. For each clustering cluster, when the number of second staying points in the clustering cluster meets the set requirements, determine the second staying point in the clustering cluster as the first resident place.

例如上文所说的将聚类簇中第二停留点的数量不小于(α% * N)的聚类簇中的第二停留点确定为第一常驻地,具体实现细节可以参见上文,此处不再赘述。For example, as mentioned above, the second stay point in the cluster whose number of second stay points is not less than (α% * N) is determined as the first resident place. For specific implementation details, please refer to the above , which will not be described again here.

由此,本实施例提供的常驻地的识别方法,通过对确定第二时间段包括的第一停留点,并基于近邻聚类方式将多个相同的第一停留点合并为一个第二停留点,进而保证每一个第二时间段内的停留点都具备唯一性,赋予了每一个停留点在聚类过程中实际的物理含义,从而保证最终基于近邻聚类方式将第一时间段内相同的第二停留点聚类为一个聚类簇后,对于任意一个聚类簇,每有一个第二停留点,就代表用户在该聚类簇中出现的天数,这样根据不同的业务场景需要,通过设定不同的天数阈值就可以选取不同的停留点作为该业务场景下的常驻地,从而能够基于识别出的常驻地为用户提供更加丰富多彩的服务。Therefore, the identification method of the permanent residence provided by this embodiment determines the first stay points included in the second time period and merges multiple identical first stay points into one second stay based on the neighbor clustering method. points, thereby ensuring that each stay point in the second time period is unique, giving each stay point actual physical meaning in the clustering process, thereby ensuring that the same stay points in the first time period are finally classified based on the nearest neighbor clustering method. After the second stay points are clustered into a cluster, for any cluster, each second stay point represents the number of days the user has appeared in the cluster. In this way, according to different business scenario needs, By setting different day thresholds, different staying points can be selected as permanent residences in this business scenario, so that users can be provided with more colorful services based on the identified permanent residences.

参见图11,本实施例提供的常驻地识别方法中第一停留点的确定流程,具体包括:Referring to Figure 11, the determination process of the first stay point in the resident place identification method provided by this embodiment specifically includes:

S201,对于每一个第二时间段,确定第二时间段内每两条信令数据对应的空间位置之间的距离。S201: For each second time period, determine the distance between the spatial positions corresponding to each two pieces of signaling data in the second time period.

可理解的,空间位置是基于对应的信令数据中的经纬度信息确定的,因此基于每两条信令数据中的经纬度信息,便可以确定对应的两个空间位置之间的距离。It is understandable that the spatial location is determined based on the latitude and longitude information in the corresponding signaling data. Therefore, based on the latitude and longitude information in each two pieces of signaling data, the distance between the two corresponding spatial locations can be determined.

此外,为了减少数据处理量,在一些实现方式中,在确定第二时间段内每两条信令数据对应的空间位置之间的距离之后,对于每一个空间位置,当存在与空间位置之间的距离满足设定的第二距离阈值的空间位置时,可以将空间位置以及与空间位置之间的距离满足设定的第二距离阈值的空间位置合并为一个合并空间位置。In addition, in order to reduce the amount of data processing, in some implementations, after determining the distance between the spatial locations corresponding to each two pieces of signaling data in the second time period, for each spatial location, when there is a distance between When the spatial position whose distance satisfies the set second distance threshold, the spatial position and the spatial position whose distance from the spatial position satisfies the set second distance threshold can be merged into one merged spatial position.

进一步地,为了便于后续基于合并空间位置进行第一停留点的确定,对于每一个合并空间位置,可以根据合并空间位置中包括的每一个空间位置的经纬度信息,计算平均经度和平均纬度,然后将计算获得的平均经度和平均纬度,作为合并空间位置的经纬度信息。Further, in order to facilitate the subsequent determination of the first stop point based on the merged spatial position, for each merged spatial position, the average longitude and average latitude can be calculated based on the longitude and latitude information of each spatial position included in the merged spatial position, and then The average longitude and average latitude obtained are calculated as the latitude and longitude information of the combined spatial location.

关于合并空间位置的经纬度信息的确定方式可以参见上文,此处不再赘述。Regarding the method of determining the latitude and longitude information of the combined spatial location, please refer to the above and will not be described again here.

示例性的,本实施例中所说的第一距离阈值,例如为上文所说的距离D1,关于上述将多个相邻的空间位置合并为一个合并空间位置的实现细节,可以参见上文中将P4至P9合并为P11的处理流程,此处不再赘述。Illustratively, the first distance threshold in this embodiment is, for example, the distance D1 mentioned above. Regarding the implementation details of merging multiple adjacent spatial positions into one merged spatial position, please refer to the above. The process of merging P4 to P9 into P11 will not be described again here.

S202,对于每一个空间位置,当存在与空间位置之间的距离满足设定的第一距离阈值的空间位置时,确定电子设备在空间位置以及与空间位置之间的距离满足设定的第一距离阈值的空间位置停留的停留时间。S202. For each spatial position, when there is a spatial position whose distance from the spatial position satisfies the set first distance threshold, determine the spatial position of the electronic device and the distance between the electronic device and the spatial position that satisfies the set first distance threshold. The dwell time at a spatial location away from the threshold.

示例性的,本实施例中的第一距离阈值,例如上文所说的距离D2,如125米。For example, the first distance threshold in this embodiment is, for example, the distance D2 mentioned above, such as 125 meters.

相应地,关于每两个空间位置之间的距离是否满足确定为第一停留点的距离D2的实现细节,可以参见上文由停留点确定模块实现的停留点确定环境的描述部分,此处不再赘述。Correspondingly, regarding the implementation details of whether the distance between each two spatial positions satisfies the distance D2 determined as the first stay point, please refer to the description of the stay point determination environment implemented by the stay point determination module above, which will not be discussed here. Again.

S203,当停留时间满足设定的时间阈值时,将空间位置以及与空间位置之间的距离满足设定的第一距离阈值的空间位置确定为一个第一停留点。S203: When the stay time satisfies a set time threshold, the spatial position and the spatial position whose distance to the spatial position satisfies a set first distance threshold are determined as a first stay point.

示例性的,本实施例中所说的停留时间阈值,可以根据业务场景需求设置,例如上文所说的10分钟。For example, the residence time threshold mentioned in this embodiment can be set according to business scenario requirements, such as the 10 minutes mentioned above.

相应地,关于停留时间是否满足停留时间阈值的实现细节,可以参见上文由停留点确定模块实现的停留点确定环境的描述部分,此处不再赘述。Correspondingly, regarding the implementation details of whether the stay time meets the stay time threshold, please refer to the description of the stay point determination environment implemented by the stay point determination module above, which will not be described again here.

由此,基于近邻聚类的聚类方式,按照上述处理逻辑,便可以根据一天当中记录的所有信令数据,确定出满足上述要求的所有第一停留点。Therefore, based on the clustering method based on neighbor clustering and according to the above processing logic, all first stay points that meet the above requirements can be determined based on all signaling data recorded during the day.

参见图12,本实施例提供的常驻地识别方法中第一停留点合并为第二停留点的流程,具体包括:Referring to Figure 12, the process of merging the first stay point into the second stay point in the resident place identification method provided by this embodiment specifically includes:

S301,对于每一个第二时间段,确定第二时间段内每两个第一停留点之间的距离。S301: For each second time period, determine the distance between every two first stay points in the second time period.

示例性的,关于确定第二时间段内每两个第一停留点之间的距离,例如可以是:对于每一个第二时间段中的每一个第一停留点,先根据第一停留点中包括的每一个空间位置的经纬度信息,计算平均经度和平均纬度;然后,将计算获得的平均经度和平均纬度,作为第一停留点的经纬度信息;最后,根据每两个第一停留点的经纬度信息,确定每两个第一停留点之间的距离。For example, regarding determining the distance between every two first stay points in the second time period, for example: for each first stay point in each second time period, first based on the first stay point Include the longitude and latitude information of each spatial location, calculate the average longitude and average latitude; then, use the calculated average longitude and average latitude as the longitude and latitude information of the first stay point; finally, based on the longitude and latitude of each two first stay points information to determine the distance between each two first stop points.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

S302,对于每一个第一停留点,基于近邻聚类的聚类方式,将第一停留点,以及与第一停留点之间的距离满足设定的第三距离阈值的第一停留点合并为一个第二停留点。S302: For each first stay point, based on the clustering method of nearest neighbor clustering, merge the first stay point and the first stay point whose distance from the first stay point satisfies the set third distance threshold into A second stop.

示例性的,在本实施例中第三距离阈值例如为上文所说的距离D3。For example, in this embodiment, the third distance threshold is, for example, the distance D3 mentioned above.

相应地,关于将第三距离阈值作为判断条件,进而基于近邻聚类的聚类方式将多个第一停留点合并为一个第二停留点的实现细节可以参见上文,此处不再赘述。Correspondingly, the implementation details of using the third distance threshold as a judgment condition and merging multiple first stay points into one second stay point based on the clustering method of neighbor clustering can be found above, and will not be described again here.

此外,还需要说明的是,在一些实现方式中,可能存在某一个第一停留点只有一个,如上文中的停留点2在一天内仅出现了一次,对应这种场景,可以将第一停留点之间作为对应的第二停留点。In addition, it should be noted that in some implementations, there may be only one first stay point. For example, stay point 2 above appears only once in a day. Corresponding to this scenario, the first stay point can be as the corresponding second stop point.

由此,基于近邻聚类的聚类方式,按照上述处理逻辑,便可以根据停留点确定环节确定的停留点,得到一天当中所有的唯一停留点,即经停留点合并环节处理后,最终保留的多个停留点都是不相同的停留点。Therefore, based on the clustering method of nearest neighbor clustering, according to the above processing logic, it is possible to obtain all the unique stay points in a day based on the stay points determined by the stay point determination link, that is, after the stay point merging link, the final retained points Multiple stop points are different stop points.

参见图13,本实施例提供的常驻地识别方法中异常的空间位置剔除的流程,具体包括:Referring to Figure 13, the process of eliminating abnormal spatial locations in the resident location identification method provided by this embodiment specifically includes:

S401,对于每一个第二停留点,确定第二停留点对应的第一经纬度信息提取位和第二经纬度信息提取位。S401. For each second stay point, determine the first longitude and latitude information extraction bit and the second longitude and latitude information extraction bit corresponding to the second stay point.

关于第二停留点对应的第一经纬度信息提取位和第二经纬度信息提取位的确定方式,例如为先确定第二停留点中包括的空间位置的数量;然后根据数量确定第一中间位;接着将第一位与第一中间位之间的中间位确定为第二停留点对应的第一经纬度信息提取位,将第一中间位与最后一位之间的中间位确定为第二停留点对应的第二经纬度信息提取位。Regarding the determination method of the first longitude and latitude information extraction bit and the second longitude and latitude information extraction bit corresponding to the second stay point, for example, first determine the number of spatial positions included in the second stay point; then determine the first intermediate bit according to the number; and then The middle bit between the first bit and the first middle bit is determined as the first longitude and latitude information extraction bit corresponding to the second stay point, and the middle bit between the first middle bit and the last bit is determined as the second stay point corresponding to The second latitude and longitude information extraction bit.

示例性的,本实施例中所说的第一经纬度信息提取位,例如为上文所说的Q1,第二经纬度信息提取位例如为上文所说的Q3,第一中间位例如为上文所说的Q2。For example, the first latitude and longitude information extraction bit in this embodiment is, for example, Q1 as mentioned above, the second latitude and longitude information extraction bit is, for example, Q3 as mentioned above, and the first middle bit is, for example, the above Said Q2.

S402,对第二停留点中包括的空间位置按序排列,提取第一经纬度信息提取位的空间位置的第一经度和第一纬度,以及第二经纬度信息提取位的空间位置的第二经度和第二纬度。S402, arrange the spatial positions included in the second stay point in order, extract the first longitude and first latitude of the spatial position of the first longitude and latitude information extraction bit, and the second longitude of the spatial position of the second longitude and latitude information extraction bit. and second latitude.

示例性的,第一经纬度信息提取位的空间位置的第一经度例如为上文的Q1_long,第一纬度例如为上文的Q1_lat。For example, the first longitude of the spatial position of the first latitude and longitude information extraction bit is, for example, the above Q1_long, and the first latitude is, for example, the above Q1_lat.

示例性的,第二经纬度信息提取位的空间位置的第二经度例如为上文的Q3_long,第二纬度例如为上文的Q3_lat。For example, the second longitude of the spatial position of the second latitude and longitude information extraction bit is, for example, the above Q3_long, and the second latitude is, for example, the above Q3_lat.

S403,根据第一经度和第二经度,确定经度保留区间。S403: Determine the longitude retention interval based on the first longitude and the second longitude.

示例性的,关于根据第一经度和第二经度,确定的经度保留区间例如满足[第一经度-1.5*(第二经度-第一经度), 第二经度+1.5*(第二经度-第一经度)]。For example, regarding the first longitude and the second longitude, the determined longitude retention interval satisfies [first longitude-1.5*(second longitude-first longitude), second longitude+1.5*(second longitude) longitude - first longitude)].

S404,根据第一纬度和第二纬度,确定纬度保留区间。S404: Determine the latitude retention interval based on the first latitude and the second latitude.

示例性的,关于根据第一纬度和第二纬度,确定的纬度保留区间例如满足[第一纬度-1.5*(第二纬度-第一纬度), 第二纬度+1.5*(第二纬度-第一纬度)]。For example, regarding the first latitude and the second latitude, the determined latitude retention interval satisfies [first latitude - 1.5* (second latitude - first latitude), second latitude + 1.5* (second latitude - first latitude), for example one latitude)].

S405,剔除第二停留点中经度不在经度保留区间,且纬度不在纬度保留区间的空间位置。S405: Eliminate the spatial positions in the second stay point whose longitude is not in the longitude retention interval and whose latitude is not in the latitude retention interval.

关于Q1和Q3的具体选取,以及异常的空间位置的剔除细节,可以参见上文,此处不再赘述。Regarding the specific selection of Q1 and Q3, as well as the details of eliminating abnormal spatial positions, please refer to the above and will not be repeated here.

由此,保证避免了异常的空间位置的经纬度信息对最终确定的常驻地的干扰,保证了确定的常驻地的精确度。This ensures that the interference of abnormal spatial location longitude and latitude information on the final determined permanent location is avoided, and the accuracy of the determined permanent location is ensured.

参见图14,本实施例提供的常驻地识别方法中基于第二停留点确定常驻地的流程,具体包括:Referring to Figure 14, the process of determining the permanent residence based on the second stay point in the permanent residence identification method provided by this embodiment specifically includes:

S501,确定第一时间段内,每两个第二停留点之间的距离。S501, determining the distance between every two second stop points in a first time period.

示例性的,关于确定第一时间段内,每两个第二停留点之间的距离的方式,例如为:对于每一个第二停留点,先根据第二停留点对应的每一个第一停留点的经纬度信息,计算平均经度和平均纬度;然后将平均经度和平均纬度,作为第二停留点的经纬度信息;最后根据每两个第二停留点的经纬度信息,确定每两个第二停留点之间的距离。Exemplarily, regarding the method of determining the distance between every two second stay points in the first time period, for example: for each second stay point, first based on each first stay point corresponding to the second stay point Based on the longitude and latitude information of the point, calculate the average longitude and average latitude; then use the average longitude and average latitude as the longitude and latitude information of the second stay point; finally, determine each two second stay points based on the longitude and latitude information of each two second stay points. the distance between.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

S502,对于每一个第二停留点,基于近邻聚类的聚类方式,将第二停留点,以及与第二停留点之间的距离满足设定的第四距离阈值的第二停留点聚类为一个聚类簇。S502, for each second stay point, based on the clustering method of neighbor clustering, cluster the second stay point and the second stay point whose distance from the second stay point satisfies the set fourth distance threshold. is a cluster.

关于将多个相同的第二停留点聚类为一个聚类簇的实现细节,可以参见上文由常驻地确定模块实现的常驻地确定环节部分的描述,此处不再赘述。Regarding the implementation details of clustering multiple identical second stay points into one cluster, please refer to the description of the resident location determination link implemented by the resident location determination module above, which will not be described again here.

由此,基于近邻聚类的聚类方式将第一时间段内所有相同的第二停留点聚类为一个聚类簇,赋予了每一个第二停留点在聚类簇中的物理含义,即在常驻地确定环节中,对于任意一个聚类簇,每有一个第二停留点,就代表用户在该聚类簇中出现的天数,这样根据不同的业务场景需要,通过设定不同的天数阈值就可以选取不同的停留点作为该业务场景下的常驻地,从而能够基于识别出的常驻地为用户提供更加丰富多彩的服务。Therefore, the clustering method based on nearest neighbor clustering clusters all the same second stay points in the first time period into a cluster, and gives each second stay point a physical meaning in the cluster, that is, In the process of determining the resident location, for any cluster, each second stay point represents the number of days the user has appeared in the cluster. In this way, according to the needs of different business scenarios, different days can be set By setting the threshold, different stay points can be selected as permanent residences in this business scenario, thereby providing users with more colorful services based on the identified permanent residences.

参见图15,本实施例提供的常驻地识别方法中常驻地唯一性的确定流程,具体包括:Referring to Figure 15, the process for determining the uniqueness of the resident location in the resident location identification method provided by this embodiment specifically includes:

S601,为第一时间段中确定的每一个第一常驻地分配常驻地标签。S601: Allocate a permanent location label to each first permanent location determined in a first time period.

S602,在基于近邻聚类的距离方式,根据第三时间段记录的信令数据确定第三时间段中的第二常驻地后,对于每一个第二常驻地,确定第二常驻地与每一个第一常驻地之间的距离。S602. After determining the second resident place in the third time period based on the signaling data recorded in the third time period in the distance mode based on neighbor clustering, determine the second resident place for each second resident place. Distance from each first permanent residence.

S603,对于每一个第二常驻地,当存在与第二常驻地之间的距离满足设定的第五距离阈值的第一常驻地时,为第二常驻地分配与第一常驻地相同的常驻地标签。S603: For each second resident place, when there is a first resident place whose distance from the second resident place meets the set fifth distance threshold, assign the second resident place to the first resident place. The resident label of the same resident.

关于常驻地唯一性的确定,可以参见上文由常驻地唯一性判断模块实现的常驻地唯一性判断环节部分的描述,此处不再赘述。Regarding the determination of the uniqueness of the permanent location, please refer to the description of the permanent location uniqueness judgment step implemented by the permanent location uniqueness judgment module above, and will not be described again here.

由此,实现了常驻地唯一性的确定,使得后续基于常驻地进行的业务推荐服务能够更好的适用于用户。As a result, the uniqueness of the resident location is determined, so that subsequent service recommendation services based on the resident location can be better suited to users.

进一步地,在实际应用中,在根据上述常驻地的识别方法确定出常驻地后,为了便于为用户提供丰富多彩的服务,可以将用户在不同城市驻留的常驻地的标签,以及每一个常驻地的经纬度信息、在不同常驻地接入的基站的id,以及接入的天数、在不同常驻地接入的路由器的编号,以及接入的路由器的天数,常驻地包括的用户移动过程的空间位置的轨迹索引,以及预设时长内用户在不同常驻地出现的天数,以下述表5的形式进行存储。Further, in practical applications, after the permanent residence is determined according to the above permanent residence identification method, in order to facilitate providing users with rich and colorful services, the labels of the permanent residences where the user resides in different cities can be added, and The longitude and latitude information of each permanent residence, the ID of the base station accessed in different permanent residences, and the number of days of access, the numbers of routers connected in different permanent residences, and the number of days of accessed routers, permanent residence The trajectory index of the spatial location of the user's movement process and the number of days the user appears in different residences within the preset time period are stored in the form of Table 5 below.

表5 常驻地信息表Table 5 Resident location information table

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。基于上述常驻地信息表,当确定用户在不同的常驻地时,就可以通过对应的基站和路由器向用户推送合适的服务。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment. Based on the above resident location information table, when it is determined that the user is in a different resident location, appropriate services can be pushed to the user through the corresponding base station and router.

此外,可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。In addition, it can be understood that in order to implement the above functions, the electronic device includes corresponding hardware and/or software modules that perform each function. In conjunction with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.

此外,需要说明的是,在实际的应用场景中由电子设备实现的上述各实施例提供的常驻地的识别方法,也可以由电子设备中包括的一种芯片系统来执行,其中,该芯片系统可以包括处理器。该芯片系统可以与存储器耦合,使得该芯片系统运行时调用该存储器中存储的计算机程序,实现上述电子设备执行的步骤。其中,该芯片系统中的处理器可以是应用处理器也可以是非应用处理器的处理器。In addition, it should be noted that in actual application scenarios, the resident identification method provided by the above embodiments implemented by electronic equipment can also be performed by a chip system included in the electronic equipment, where the chip The system may include a processor. The chip system can be coupled with a memory, so that when the chip system is running, it calls the computer program stored in the memory to implement the steps performed by the electronic device. The processor in the chip system may be an application processor or a non-application processor.

另外,本申请实施例还提供一种计算机可读存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的常驻地的识别方法。In addition, embodiments of the present application also provide a computer-readable storage medium. Computer instructions are stored in the computer storage medium. When the computer instructions are run on an electronic device, the electronic device causes the electronic device to execute the above-mentioned related method steps to implement the above-mentioned embodiments. identification method of permanent residence.

另外,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得电子设备执行上述相关步骤,以实现上述实施例中的常驻地的识别方法。In addition, embodiments of the present application also provide a computer program product. When the computer program product is run on an electronic device, it causes the electronic device to perform the above related steps to implement the resident location identification method in the above embodiment.

另外,本申请的实施例还提供一种芯片(也可以是组件或模块),该芯片可包括一个或多个处理电路和一个或多个收发管脚;其中,所述收发管脚和所述处理电路通过内部连接通路互相通信,所述处理电路执行上述相关方法步骤实现上述实施例中的常驻地的识别方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In addition, embodiments of the present application also provide a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the The processing circuits communicate with each other through internal connection paths. The processing circuits execute the above related method steps to implement the resident identification method in the above embodiment to control the receiving pin to receive signals and to control the sending pin to send signals.

此外,通过上述描述可知,本申请实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。In addition, it can be seen from the above description that the electronic devices, computer-readable storage media, computer program products or chips provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be Refer to the beneficial effects of the corresponding methods provided above, which will not be described again here.

以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As mentioned above, the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still make the foregoing technical solutions. The technical solutions described in each embodiment may be modified, or some of the technical features may be equivalently replaced; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions in each embodiment of the present application.

Claims (14)

1. A method of identifying a premises, the method comprising:
acquiring signaling data recorded by electronic equipment used by a user in a first time period, wherein the first time period comprises at least one second time period;
for each second time period, determining a first stay point of a user in the second time period according to signaling data of the second time period;
for each second time period, merging the first stay points in the second time period based on a clustering mode of neighbor clustering to obtain second stay points;
clustering the same second stay points in the first time period into a cluster based on a clustering mode of neighbor clustering;
For each cluster, determining the second stay point in the cluster as a first residence when the second stay point number in the cluster meets a set requirement;
wherein for each second time period, determining a first dwell point of the user in the second time period according to the signaling data of the second time period includes:
for each second time period, determining the distance between the spatial positions corresponding to every two pieces of signaling data in the second time period;
for each of the spatial locations, determining a dwell time for the electronic device to stay at the spatial location and at a spatial location having a distance from the spatial location that is not greater than a set first distance threshold when there is a spatial location having a distance from the spatial location that is not greater than the set first distance threshold;
and determining the space position and the space position with the distance from the space position not larger than a set first distance threshold value as one first stopping point when the stopping time is not smaller than a set time threshold value.
2. The method of claim 1, wherein after said determining a distance between spatial locations corresponding to every two pieces of signaling data within said second time period, said method further comprises:
For each of the spatial positions, when there is a spatial position whose distance from the spatial position satisfies a set second distance threshold, merging the spatial position and the spatial position whose distance from the spatial position satisfies the set second distance threshold, which is smaller than the first distance threshold, into one merged spatial position.
3. The method according to claim 2, wherein the method further comprises:
for each merging spatial position, calculating average longitude and average latitude according to longitude and latitude information of each spatial position included in the merging spatial position;
and taking the average longitude and the average latitude as longitude and latitude information of the combined spatial position.
4. The method of claim 1, wherein for each of the second time periods, merging the first stay points in the second time period based on the clustering manner of the neighbor clusters to obtain second stay points, includes:
for each second time period, determining a distance between every two first stay points in the second time period;
And merging the first stopping points and the first stopping points, of which the distance with the first stopping points meets a set third distance threshold, into a second stopping point based on a clustering mode of neighbor clustering for each first stopping point.
5. The method of claim 4, wherein said determining, for each of said second time periods, a distance between each two first dwell points within said second time period comprises:
for each first stopping point in each second time period, calculating average longitude and average latitude according to longitude and latitude information of each spatial position included in the first stopping point;
taking the average longitude and the average latitude as longitude and latitude information of the first stay point;
and for each second time period, determining the distance between every two first stay points according to the longitude and latitude information of every two first stay points.
6. The method of claim 4, wherein after the second dwell point is obtained, the method further comprises:
for each second stopping point, determining a first longitude and latitude information extraction bit and a second longitude and latitude information extraction bit corresponding to the second stopping point;
Sequentially arranging the spatial positions included in the second dwell point, and extracting a first longitude and a first latitude of the spatial position of the first longitude and latitude information extraction bit, and a second longitude and a second latitude of the spatial position of the second longitude and latitude information extraction bit;
determining a longitude reserved interval according to the first longitude and the second longitude;
determining a latitude reservation interval according to the first latitude and the second latitude;
and eliminating the spatial position of the second stopping point, in which the longitude is not in the longitude reserved interval and the latitude is not in the latitude reserved interval.
7. The method of claim 6, wherein the determining the first and second latitude and longitude information extraction bits corresponding to the second dwell point comprises:
determining a number of spatial positions included in the second dwell point;
determining a first intermediate bit based on the number;
determining a middle bit between a first bit and the first middle bit as a first longitude and latitude information extraction bit corresponding to the second stay point;
and determining the middle bit between the first middle bit and the last bit as a second longitude and latitude information extraction bit corresponding to the second stay point.
8. The method of claim 6, wherein the reserved longitude interval is [ first longitude-1.5 (second longitude-first longitude), second longitude +1.5 (second longitude-first longitude) ];
the latitude reservation interval is [ first latitude-1.5 (second latitude-first latitude), second latitude+1.5 (second latitude-first latitude) ].
9. The method of claim 1, wherein for each of the second time periods, merging the first stay points in the second time period based on the clustering manner of the neighbor clusters to obtain second stay points, includes:
and for each second time period, when the first stopping point in the second time period is one, taking the first stopping point as the corresponding second stopping point.
10. The method of claim 1, wherein the clustering the same second stay points in the first period into a cluster based on the clustering method of the neighbor clusters comprises:
determining a distance between every two second stay points in the first time period;
for each second stopping point, clustering the second stopping points and the second stopping points, the distance between which meets a set fourth distance threshold value, into a cluster based on a clustering mode of neighbor clustering, wherein the fourth distance threshold value is smaller than a third distance threshold value, and the third distance threshold value is used for indicating whether a plurality of first stopping points in each second time period can be combined into one second stopping point.
11. The method of claim 10, wherein the determining the distance between each two second dwell points during the first period of time comprises:
for each second stopping point, calculating average longitude and average latitude according to longitude and latitude information of each first stopping point corresponding to the second stopping point;
taking the average longitude and the average latitude as longitude and latitude information of the second stay point;
and determining the distance between every two second stay points according to the longitude and latitude information of every two second stay points.
12. The method according to any one of claims 1 to 11, wherein after said determining said second point of stay in said cluster as a first residence, the method further comprises:
assigning a residence label to each of the first residents determined in the first time period;
after determining a second resident in a third time period according to signaling data recorded in the third time period based on a distance mode of neighbor clustering, determining a distance between the second resident and each first resident for each second resident, wherein the third time period is the same as the first time period in duration;
For each of the second residents, assigning the second residents the same resident tag as the first residents when there is the first residents whose distance from the second residents meets a set fifth distance threshold.
13. An electronic device, the electronic device comprising: a memory and a processor, the memory and the processor coupled; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the method of identifying a premises according to any of claims 1 to 12.
14. A computer readable storage medium comprising a computer program which, when run on an electronic device, causes the electronic device to perform the method of identifying a premises according to any of claims 1 to 12.
CN202211150370.4A 2022-09-21 2022-09-21 Residence identification methods, equipment and storage media Active CN116738073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211150370.4A CN116738073B (en) 2022-09-21 2022-09-21 Residence identification methods, equipment and storage media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211150370.4A CN116738073B (en) 2022-09-21 2022-09-21 Residence identification methods, equipment and storage media

Publications (2)

Publication Number Publication Date
CN116738073A CN116738073A (en) 2023-09-12
CN116738073B true CN116738073B (en) 2024-03-22

Family

ID=87906644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211150370.4A Active CN116738073B (en) 2022-09-21 2022-09-21 Residence identification methods, equipment and storage media

Country Status (1)

Country Link
CN (1) CN116738073B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011142225A1 (en) * 2010-05-12 2011-11-17 日本電気株式会社 Feature-point detection system, feature-point detection method, and program
JP2014191531A (en) * 2013-03-27 2014-10-06 Kddi Corp Device, program and method for estimating place of short-time stay of user carrying mobile terminal
CN105652304A (en) * 2016-01-06 2016-06-08 成都小步创想畅联科技有限公司 Location identification method integrated with multiple sensors
WO2018150227A1 (en) * 2017-02-17 2018-08-23 Dataspark Pte, Ltd Mobility gene for trajectory data
CN108650632A (en) * 2018-04-28 2018-10-12 广州市交通规划研究院 It is a kind of based on duty live correspondence and when space kernel clustering stationary point judgment method
CN111680102A (en) * 2020-05-21 2020-09-18 平安国际智慧城市科技股份有限公司 Positioning data processing method based on artificial intelligence and related equipment
CN113342905A (en) * 2021-06-07 2021-09-03 北京邮电大学 Method and device for determining stop point

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011142225A1 (en) * 2010-05-12 2011-11-17 日本電気株式会社 Feature-point detection system, feature-point detection method, and program
JP2014191531A (en) * 2013-03-27 2014-10-06 Kddi Corp Device, program and method for estimating place of short-time stay of user carrying mobile terminal
CN105652304A (en) * 2016-01-06 2016-06-08 成都小步创想畅联科技有限公司 Location identification method integrated with multiple sensors
WO2018150227A1 (en) * 2017-02-17 2018-08-23 Dataspark Pte, Ltd Mobility gene for trajectory data
CN108650632A (en) * 2018-04-28 2018-10-12 广州市交通规划研究院 It is a kind of based on duty live correspondence and when space kernel clustering stationary point judgment method
CN111680102A (en) * 2020-05-21 2020-09-18 平安国际智慧城市科技股份有限公司 Positioning data processing method based on artificial intelligence and related equipment
CN113342905A (en) * 2021-06-07 2021-09-03 北京邮电大学 Method and device for determining stop point

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于位置轨迹挖掘的城市居民职住地识别方法研究;王艳涛;魏海平;何源浩;周烨;;测绘与空间地理信息(第02期);正文1-4页 *
基于手机信令数据的职住地获取研究;李建邺;信息科技;全文 *

Also Published As

Publication number Publication date
CN116738073A (en) 2023-09-12

Similar Documents

Publication Publication Date Title
US11385857B2 (en) Method for displaying UI component and electronic device
US12112014B2 (en) Widget display method and electronic device
CN113495744B (en) A version upgrade method and related device
US20240264882A1 (en) Application running method and related device
US12217069B2 (en) Operation sequence adding method, electronic device, and system
CN115422480B (en) Method, equipment and storage medium for determining the area where the event occurred
CN110347455A (en) A kind of quick interface arrangement method and terminal
CN115686700A (en) Rendering method and electronic device
CN112817610B (en) Cota package installation method and related device
CN117131213B (en) Image processing method and related equipment
CN116095230B (en) Application program recommendation method, terminal device and readable storage medium
CN116738073B (en) Residence identification methods, equipment and storage media
CN114064160A (en) Application icon layout method and related device
EP4474966A1 (en) Interface display method and electronic device
CN116709180B (en) Geofence generation method and server
CN116996611A (en) Notification message processing system, method and device
CN116033344B (en) Geofence determination method, equipment and storage medium
CN116033592B (en) Methods and devices for using cellular communication functions
CN115297438B (en) Express prompting method, equipment and storage medium
US20250233938A1 (en) Notification message processing system, method, and apparatus
CN116437293B (en) Geofence establishment method, server and communication system
CN117332145B (en) Application recommendation method, device and user equipment
EP4538851A1 (en) Information processing method and electronic device
CN117692507B (en) A desktop function push method and related device
EP4472185A1 (en) Notification message processing system, method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address