CN116738033B - Method and device for recommending service - Google Patents
Method and device for recommending service Download PDFInfo
- Publication number
- CN116738033B CN116738033B CN202211078749.9A CN202211078749A CN116738033B CN 116738033 B CN116738033 B CN 116738033B CN 202211078749 A CN202211078749 A CN 202211078749A CN 116738033 B CN116738033 B CN 116738033B
- Authority
- CN
- China
- Prior art keywords
- time period
- usage data
- target
- time points
- cluster
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
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)
Abstract
Description
技术领域Technical Field
本申请涉及终端技术领域,尤其涉及一种用于推荐服务的方法和装置。The present application relates to the field of terminal technology, and in particular to a method and device for recommending services.
背景技术Background Art
随着终端设备中各种应用的推广,终端设备成为用户生活中必不可少的使用设备。用户可以通过终端设备使用支付、导航等服务。然而,目前用户在使用终端设备中各种服务时,通常需要先点击进入应用,再点击进入应用内部的不同的页面,操作流程较复杂。With the promotion of various applications in terminal devices, terminal devices have become indispensable devices in users' lives. Users can use payment, navigation and other services through terminal devices. However, when users use various services in terminal devices, they usually need to click to enter the application first, and then click to enter different pages within the application, which makes the operation process complicated.
为了简化用户使用终端设备中的服务功能的操作流程,可以通过人工智能(artificial intelligence,AI)算法学习用户使用服务功能的规律,对用户的使用意图进行预测。当终端设备通过AI算法预测出用户有使用终端设备中的服务功能的意图时,终端设备可以主动向用户推荐该服务。In order to simplify the operation process of users using service functions in terminal devices, artificial intelligence (AI) algorithms can be used to learn the rules of users using service functions and predict users' usage intentions. When the terminal device predicts through the AI algorithm that the user intends to use the service functions in the terminal device, the terminal device can actively recommend the service to the user.
然而,AI算法的使用会导致终端设备的功耗较大,目前亟需提供一种方法,能够在为用户推荐服务的同时,降低终端设备的功耗。However, the use of AI algorithms will cause high power consumption of terminal devices. There is an urgent need to provide a method that can reduce the power consumption of terminal devices while recommending services to users.
发明内容Summary of the invention
本申请提供一种用于推荐服务的方法和装置,有利于降低终端设备的功耗,从而提高用户体验。The present application provides a method and apparatus for recommending services, which are beneficial to reducing the power consumption of terminal devices, thereby improving user experience.
第一方面,提供了一种用于推荐服务的方法,该方法包括:采集第一历史时间段内目标用户对目标服务的多条使用数据,所述多条使用数据包括多个时间点;确定所述多个时间点中每两个时间点之间的差值;基于所述差值,对所述多条使用数据进行聚类,得到至少一簇使用数据,所述至少一簇使用数据中的每簇使用数据包括多个目标时间点;基于所述至少一簇使用数据,确定至少一个目标时间段,以便终端设备在所述至少一个目标时间段内进行所述目标服务的服务推荐算法的条件判断。In a first aspect, a method for recommending services is provided, the method comprising: collecting multiple usage data of a target service by a target user within a first historical time period, the multiple usage data comprising multiple time points; determining a difference between every two time points in the multiple time points; clustering the multiple usage data based on the difference to obtain at least one cluster of usage data, each cluster of usage data in the at least one cluster of usage data comprising multiple target time points; determining at least one target time period based on the at least one cluster of usage data, so that a terminal device performs conditional judgment of a service recommendation algorithm for the target service within the at least one target time period.
本申请提供的用于推荐服务的方法,通过对多条使用数据进行聚类,得到至少一个目标时间段,该至少一个目标时间段用于终端设备进行所述目标服务的服务推荐算法的条件判断,当目标用户所使用的终端设备的当前时间属于目标时间段时,说明此时目标用户可能具有使用目标服务的意图,终端设备可以调用服务推荐算法进行条件判断。当目标用户所使用的终端设备的当前时间不属于目标时间段时,说明此时目标用户不具有使用目标服务的意图,终端设备无需调用服务推荐算法,这样,在简化用户使用终端设备中的服务的操作流程的同时,减小终端设备的功耗,提高了用户体验。The method for recommending services provided by the present application obtains at least one target time period by clustering multiple pieces of usage data. The at least one target time period is used for the conditional judgment of the service recommendation algorithm of the target service by the terminal device. When the current time of the terminal device used by the target user belongs to the target time period, it indicates that the target user may have the intention to use the target service at this time, and the terminal device can call the service recommendation algorithm for conditional judgment. When the current time of the terminal device used by the target user does not belong to the target time period, it indicates that the target user does not have the intention to use the target service at this time, and the terminal device does not need to call the service recommendation algorithm. In this way, while simplifying the operation process of the user using the service in the terminal device, the power consumption of the terminal device is reduced, and the user experience is improved.
应理解,目标用户为探究对象,可以为使用终端设备中任意服务的用户。目标服务为所要探究的服务,例如,支付、导航、音乐等。多条使用数据是指目标用户在第一历史时间段内使用目标服务时产生的多条数据信息,多条使用数据中的每条使用数据包括一个时间点。It should be understood that the target user is the object of exploration and can be a user who uses any service in the terminal device. The target service is the service to be explored, such as payment, navigation, music, etc. The multiple pieces of usage data refer to the multiple pieces of data information generated when the target user uses the target service in the first historical time period, and each piece of usage data in the multiple pieces of usage data includes a time point.
在第一方面的某些实现方式中,所述基于所述至少一簇使用数据,确定至少一个目标时间段,包括:分别基于所述每簇使用数据所包括的多个目标时间点,确定至少一个时间段;分别根据所述第一历史时间段对应的天数信息和所述至少一个时间段中每个时间段包括的目标时间点的个数,确定所述每个时间段的置信度;确定所述每个时间段的置信度是否大于或等于第一预设阈值;在所述至少一个时间段中存在第一时间段的置信度大于或等于所述第一预设阈值的情况下,将所述第一时间段确定为所述目标时间段。In certain implementations of the first aspect, determining at least one target time period based on the at least one cluster of usage data includes: determining at least one time period based on the multiple target time points included in each cluster of usage data; determining the confidence of each time period based on the number of days information corresponding to the first historical time period and the number of target time points included in each time period in the at least one time period; determining whether the confidence of each time period is greater than or equal to a first preset threshold; and if there is a first time period in the at least one time period whose confidence is greater than or equal to the first preset threshold, determining the first time period as the target time period.
应理解,上述天数信息指第一历史时间段所指的时间段包括的天数。例如,当第一历史时间段为2021/04/06 08:00:00至2021/04/10 08:00:00时,天数信息可以为4天。一个时间段对应一个置信度,一个时间段的置信度用于表示该时间段的可靠度,置信度越高,代表该时间段越可靠。上述第一预设阈值为预设的大于0的数。当一个时间段的置信度大于或等于第一预设阈值时,说明该时间段的可靠度较高,可以作为目标时间段,即可以用于终端设备进行目标服务的服务推荐算法的条件判断。It should be understood that the above-mentioned day information refers to the number of days included in the time period referred to by the first historical time period. For example, when the first historical time period is 2021/04/06 08:00:00 to 2021/04/10 08:00:00, the day information can be 4 days. A time period corresponds to a confidence level, and the confidence level of a time period is used to indicate the reliability of the time period. The higher the confidence level, the more reliable the time period. The above-mentioned first preset threshold is a preset number greater than 0. When the confidence level of a time period is greater than or equal to the first preset threshold, it means that the reliability of the time period is high and can be used as a target time period, that is, it can be used for conditional judgment of the service recommendation algorithm for the target service of the terminal device.
在第一方面的某些实现方式中,所述至少一个时间段中的第二时间段的置信度通过以下公式确定:In some implementations of the first aspect, the confidence of the second time period in the at least one time period is determined by the following formula:
其中,Z为所述置信度,Q为第一历史时间段对应的天数信息对应的天数值,Yi为将所述天数信息划分为n段天数信息中的第i段天数信息对应的天数值,Y1+Y2+...+Yn=Q,Xi为所述第i段天数信息在所述第二时间段内所包括的时间点的个数,i∈{1,2,...n},ωi为所述第i段天数信息在所述第二时间段内所包括的时间点的权重,ω1+ω2+...+ωn=1。Among them, Z is the confidence level, Q is the day value corresponding to the day information corresponding to the first historical time period, Yi is the day value corresponding to the i-th section of day information among the n sections of day information divided by the day information, Y1 + Y2 +...+ Yn =Q, Xi is the number of time points included in the i-th section of day information in the second time period, i∈{1,2,...n}, ωi is the weight of the time points included in the i-th section of day information in the second time period, ω1 + ω2 +...+ ωn =1.
应理解,第二时间段为至少一个时间段中的任意一个时间段。n和ωi为预设值。其中ωi可以根据Xi的大小确定,Xi越大,则代表第i段天数信息内在第二时间段的时间点的个数越多,则ωi可以越大。It should be understood that the second time period is any one of the at least one time period. n and ω i are preset values. ω i can be determined according to the size of Xi. The larger Xi is , the more time points there are in the second time period in the i-th day information, and the larger ω i can be.
在第一方面的某些实现方式中,所述分别基于所述每簇使用数据所包括的多个目标时间点,确定至少一个时间段,包括:基于所述至少一簇使用数据中的每簇使用数据包括的多个目标时间点中的最大值和最小值,确定所述至少一个时间段。In certain implementations of the first aspect, determining at least one time period based on the multiple target time points included in each cluster of usage data, includes: determining the at least one time period based on the maximum and minimum values of the multiple target time points included in each cluster of usage data in the at least one cluster of usage data.
应理解,若聚类后得到多簇使用数据,则基于该多簇使用数据得到的时间段的个数为多个,且与该多簇使用数据的数量相等,即一簇使用数据可以得到一个时间段。It should be understood that if multiple clusters of usage data are obtained after clustering, the number of time periods obtained based on the multiple clusters of usage data is multiple and equal to the number of the multiple clusters of usage data, that is, one cluster of usage data can obtain one time period.
在第一方面的某些实现方式中,所述多条使用数据还包括多个地理坐标,所述每簇使用数据还包括多个目标地理坐标;所述方法还包括:计算所述多个地理坐标中每两个地理坐标之间的距离;根据所述距离和所述差值,确定所述多条使用数据中每两条使用数据之间的聚类度量值;所述基于所述差值,对所述多条使用数据进行聚类,包括:基于所述聚类度量值,对所述多条使用数据进行聚类,得到所述至少一簇使用数据;所述基于所述至少一簇使用数据,确定至少一个目标时间段,包括:基于所述至少一簇使用数据,确定所述至少一个目标时间段和至少一个地理区域,以便终端设备在所述至少一个目标时间段内和所述至少一个地理区域内进行所述目标服务的服务推荐算法的条件判断。In certain implementations of the first aspect, the multiple usage data also include multiple geographic coordinates, and each cluster of usage data also includes multiple target geographic coordinates; the method also includes: calculating the distance between every two geographic coordinates in the multiple geographic coordinates; determining the clustering measurement value between every two usage data in the multiple usage data based on the distance and the difference; clustering the multiple usage data based on the difference includes: clustering the multiple usage data based on the clustering measurement value to obtain the at least one cluster of usage data; determining at least one target time period based on the at least one cluster of usage data includes: determining the at least one target time period and at least one geographic area based on the at least one cluster of usage data, so that the terminal device performs conditional judgment of the service recommendation algorithm for the target service within the at least one target time period and within the at least one geographic area.
应理解,地理坐标为二维坐标,目标用户使用目标服务时的地理位置坐标(X,Y),其中X为经度,Y为纬度。多条使用数据中的每条使用数据分别包括一个时间点和一个地理坐标。It should be understood that the geographic coordinates are two-dimensional coordinates, the geographic location coordinates (X, Y) of the target user when using the target service, where X is longitude and Y is latitude. Each of the multiple usage data includes a time point and a geographic coordinate.
通过将时间信息和地理信息结合,使得数据处理设备能够更准确的确定目标用户使用目标服务的意图,从而减少终端设备的无效判断次数,进一步减小了终端设备的功耗,提高了用户体验。By combining time information and geographic information, the data processing device can more accurately determine the target user's intention to use the target service, thereby reducing the number of invalid judgments of the terminal device, further reducing the power consumption of the terminal device, and improving the user experience.
在第一方面的某些实现方式中,所述根据所述距离和所述差值,确定所述多条使用数据中每两条使用数据之间的聚类度量值,包括:获取所述每两个地理坐标之间的距离中的第一最大值和第一最小值;根据所述第一最大值、所述第一最小值以及所述每两个地理坐标之间的距离,确定所述每两个地理坐标之间的去量纲距离;获取所述每两个时间点之间的差值中的第二最大值和第二最小值;根据所述第二最大值、所述第二最小值以及所述每两个时间点之间的差值,确定所述每两个时间点之间的去量纲差值;根据所述每两个地理坐标之间的去量纲距离和所述每两个时间点之间的去量纲差值,确定所述每两条使用数据之间的聚类度量值。In certain implementations of the first aspect, determining a clustering metric between every two pieces of usage data in the multiple pieces of usage data based on the distance and the difference includes: obtaining a first maximum value and a first minimum value in the distance between every two geographic coordinates; determining a dimensionless distance between every two geographic coordinates based on the first maximum value, the first minimum value, and the distance between every two geographic coordinates; obtaining a second maximum value and a second minimum value in the difference between every two time points; determining a dimensionless difference between every two time points based on the second maximum value, the second minimum value, and the difference between every two time points; determining a clustering metric between every two pieces of usage data based on the dimensionless distance between every two geographic coordinates and the dimensionless difference between every two time points.
应理解,去量纲距离为将每两个地理坐标之间的距离通过去量纲化得到的没有单位的数值。去量纲差值为将每两个时间点之间的差值经过去量纲化得到的没有单位的数值。It should be understood that the dimensionless distance is a value without a unit obtained by dedimensionalizing the distance between each two geographic coordinates, and the dimensionless difference is a value without a unit obtained by dedimensionalizing the difference between each two time points.
在第一方面的某些实现方式中,所述每两个地理坐标之间的去量纲距离通过以下公式确定:其中,Gr为所述去量纲距离,Gi为所述每两个地理坐标之间的距离,Gmax为所述第一最大值,Gmin为所述第一最小值;所述每两个时间点之间的去量纲差值通过以下公式确定:其中,Tr为所述去量纲差值,Ti为所述每两个时间点之间的差值,Tmax为所述第二最大值,Tmin为所述第二最小值。In certain implementations of the first aspect, the dimensionless distance between each two geographic coordinates is determined by the following formula: Wherein, Gr is the dimensionless distance, Gi is the distance between each two geographic coordinates, Gmax is the first maximum value, and Gmin is the first minimum value; the dimensionless difference between each two time points is determined by the following formula: Wherein, Tr is the dimensionless difference, Ti is the difference between each two time points, Tmax is the second maximum value, and Tmin is the second minimum value.
应理解,由于每两个时间点之间的差值的单位和每两个地理坐标之间的距离的单位不同,因此根据上述差值和距离计算得到聚类度量值时,需要先对上述差值和距离去量纲化。每两条使用数据之间的聚类度量值是根据该两条使用数据的时间点之间的差值和该两条使用数据的地理坐标之间的距离计算得到的。It should be understood that since the units of the difference between each two time points and the distance between each two geographic coordinates are different, when calculating the clustering metric value based on the above difference and distance, the above difference and distance need to be de-dimensionalized first. The clustering metric value between each pair of usage data is calculated based on the difference between the time points of the two usage data and the distance between the geographic coordinates of the two usage data.
在第一方面的某些实现方式中,所述基于所述至少一簇使用数据,确定所述至少一个地理区域,包括:根据所述至少一簇使用数据中每簇使用数据包括的多个目标地理坐标中的最大经度、最大纬度、最小经度以及最小纬度,确定所述至少一个地理区域。In certain implementations of the first aspect, determining the at least one geographic area based on the at least one cluster of usage data includes: determining the at least one geographic area according to the maximum longitude, maximum latitude, minimum longitude, and minimum latitude among a plurality of target geographic coordinates included in each cluster of usage data in the at least one cluster of usage data.
应理解,终端设备可以根据每簇使用数据的多个目标地理坐标中的最大经度、最大纬度、最小经度以及最小纬度确定一个地理区域,或者以多个目标地理坐标结合行政区域,例如街道区域、商场区域等,确定一个地理区域。It should be understood that the terminal device can determine a geographic area based on the maximum longitude, maximum latitude, minimum longitude and minimum latitude in multiple target geographic coordinates of each cluster usage data, or determine a geographic area by combining multiple target geographic coordinates with administrative areas, such as street areas, shopping mall areas, etc.
在第一方面的某些实现方式中,所述确定所述多个时间点中每两个时间点之间的差值,包括:根据所述多个时间点中包含的小时、分钟和秒的信息,将所述多个时间点中的每个时间点转换为秒级别数值;将所述每两个时间点对应的秒级别数值之间的差值,确定为所述每两个时间点之间的差值。In certain implementations of the first aspect, determining the difference between every two time points in the multiple time points includes: converting each of the multiple time points into a second-level value based on information on hours, minutes, and seconds contained in the multiple time points; and determining the difference between the second-level values corresponding to every two time points as the difference between the every two time points.
应理解,小时、分钟和秒的信息为时间点中包含的时刻信息。例如,当时间点为2021/04/08 09:01:00时,小时信息为09时,分钟信息为01分,秒信息为00秒。秒级别数值为将时间点中包含小时、分钟和秒的信息分别转换为秒后得到的数值。It should be understood that the information of hours, minutes and seconds is the moment information contained in the time point. For example, when the time point is 2021/04/08 09:01:00, the hour information is 09 hours, the minute information is 01 minutes, and the second information is 00 seconds. The second level value is the value obtained by converting the information of hours, minutes and seconds contained in the time point into seconds.
第二方面,提供了一种用于推荐服务的装置,用于执行上述第一方面中任一种可能的实现方式中的方法。具体地,该装置包括用于执行上述第一方面中任一种可能的实现方式中的方法的模块。In a second aspect, a device for recommending services is provided, which is used to execute the method in any possible implementation of the first aspect. Specifically, the device includes a module for executing the method in any possible implementation of the first aspect.
第三方面,本申请提供了又一种用于推荐服务的装置,包括处理器,该处理器与存储器耦合,可用于执行存储器中的指令,以实现上述第一方面中任一种可能实现方式中的方法。可选地,该装置还包括存储器。可选地,该装置还包括通信接口,处理器与通信接口耦合。In a third aspect, the present application provides another device for recommending services, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect. Optionally, the device also includes a memory. Optionally, the device also includes a communication interface, and the processor is coupled to the communication interface.
在一种实现方式中,该装置为终端设备。当该装置为终端设备时,上述通信接口可以是收发器,或,输入/输出接口。In one implementation, the apparatus is a terminal device. When the apparatus is a terminal device, the communication interface may be a transceiver, or an input/output interface.
在另一种实现方式中,该装置为配置于终端设备中的芯片。当该装置为配置于终端设备中的芯片时,上述通信接口可以是输入/输出接口。In another implementation, the device is a chip configured in a terminal device. When the device is a chip configured in a terminal device, the communication interface may be an input/output interface.
第四方面,提供了一种处理器,包括:输入电路、输出电路和处理电路。所述处理电路用于通过所述输入电路接收信号,并通过所述输出电路发射信号,使得所述处理器执行上述第一方面中任一种可能实现方式中的方法。In a fourth aspect, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect.
在具体实现流程中,上述处理器可以为芯片,输入电路可以为输入管脚,输出电路可以为输出管脚,处理电路可以为晶体管、门电路、触发器和各种逻辑电路等。输入电路所接收的输入的信号可以是由例如但不限于接收器接收并输入的,输出电路所输出的信号可以是例如但不限于输出给发射器并由发射器发射的,且输入电路和输出电路可以是同一电路,该电路在不同的时刻分别用作输入电路和输出电路。本申请实施例对处理器及各种电路的具体实现方式不做限定。In the specific implementation process, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.
第五方面,提供了一种处理装置,包括处理器和存储器。该处理器用于读取存储器中存储的指令,并可通过接收器接收信号,通过发射器发射信号,以执行上述第一方面中任一种可能实现方式中的方法。In a fifth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.
可选地,所述处理器为一个或多个,所述存储器为一个或多个。Optionally, the number of the processors is one or more, and the number of the memories is one or more.
可选地,所述存储器可以与所述处理器集成在一起,或者所述存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
在具体实现流程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不做限定。In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. This application does not limit the type of memory and the setting method of the memory and the processor.
应理解,相关的数据交互流程例如发送指示信息可以为从处理器输出指示信息的流程,接收能力信息可以为处理器接收输入能力信息的流程。具体地,处理输出的数据可以输出给发射器,处理器接收的输入数据可以来自接收器。其中,发射器和接收器可以统称为收发器。It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.
上述第五方面中的处理装置可以是一个芯片,该处理器可以通过硬件来实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。The processing device in the fifth aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
第六方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序(也可以称为代码,或指令),当所述计算机程序被运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect.
第七方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序(也可以称为代码,或指令)当其在计算机上运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a seventh aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的终端设备的结构示意图;FIG1 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
图2为本申请实施例的终端设备的软件结构框图;FIG2 is a software structure block diagram of a terminal device according to an embodiment of the present application;
图3为本申请实施例提供的用于推荐服务的方法的流程示意图;FIG3 is a flow chart of a method for recommending services provided in an embodiment of the present application;
图4为本申请实施例提供的聚类算法的模型示意图;FIG4 is a schematic diagram of a model of a clustering algorithm provided in an embodiment of the present application;
图5为本申请实施例提供的另一种用于推荐服务的方法的流程示意图;FIG5 is a flow chart of another method for recommending services provided in an embodiment of the present application;
图6为本申请实施例提供的聚类算法的过程示意图一;FIG6 is a schematic diagram of a clustering algorithm according to an embodiment of the present application;
图7为本申请实施例提供的聚类算法的过程示意图二;FIG. 7 is a second schematic diagram of the process of the clustering algorithm provided in an embodiment of the present application;
图8为本申请实施例提供的用于推荐服务的装置的结构示意图;FIG8 is a schematic diagram of the structure of an apparatus for recommending services provided in an embodiment of the present application;
图9为本申请实施例提供的另一种用于推荐服务的装置的结构示意图。FIG. 9 is a schematic diagram of the structure of another device for recommending services provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below in conjunction with the accompanying drawings.
在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一数值和第二数值仅仅是为了区分不同的数值,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and do not limit their order. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
需要说明的是,本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a--c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And/or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character "/" generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a--c, b-c, or a-b-c, where a, b, c can be single or multiple.
本申请实施例中的终端设备也可以称为:用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置等。The terminal device in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
终端设备可以是一种向用户提供语音/数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。目前,一些终端设备的举例包括:手机(mobile phone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(sessioninitiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请对此并不限定。The terminal device may be a device that provides voice/data connectivity to users, such as a handheld device or vehicle-mounted device with wireless connection function. At present, some examples of terminal devices include: mobile phones, tablet computers, laptop computers, PDAs, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (public land mobile The present application does not limit the terminal equipment in the network, PLMN, etc.
作为示例而非限定,在本申请中,终端设备可以是物联网(internet of things,IoT)系统中的终端设备。物联网是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。示例性地,本申请实施例中的终端设备可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备是可以直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更可以通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example but not limitation, in the present application, the terminal device may be a terminal device in the Internet of Things (IoT) system. The Internet of Things is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection. For example, the terminal device in the embodiment of the present application may be a wearable device. Wearable devices may also be called wearable smart devices, which are a general term for wearable devices that are designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. Wearable devices are portable devices that can be worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only a hardware device, but also can realize powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-size, and can realize complete or partial functions without relying on smartphones, such as smart watches or smart glasses, etc., as well as those that only focus on a certain type of application functions and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
作为示例而非限定,在本申请实施例中,终端设备还可以是机器类型通信(machine type communication,MTC)中的终端设备。此外,终端设备还可以是作为一个或多个部件或者单元而内置于车辆的车载模块、车载模组、车载部件、车载芯片或者车载单元等,车辆通过内置的所述车载模块、车载模组、车载部件、车载芯片或者车载单元等可以实施本申请提供的方法。因此,本申请实施例也可以应用于车联网,例如车辆外联(vehicleto everything,V2X)、车间通信长期演进技术(long term evolution-vehicle,LTE-V)、车到车(vehicle-to-vehicle,V2V)技术等。As an example but not limitation, in the embodiments of the present application, the terminal device may also be a terminal device in machine type communication (MTC). In addition, the terminal device may also be a vehicle-mounted module, a vehicle-mounted module, a vehicle-mounted component, a vehicle-mounted chip or a vehicle-mounted unit, etc., which is built into the vehicle as one or more components or units. The vehicle can implement the method provided by the present application through the built-in vehicle-mounted module, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit, etc. Therefore, the embodiments of the present application may also be applied to the Internet of Vehicles, such as vehicle to everything (V2X), long term evolution-vehicle (LTE-V), vehicle-to-vehicle (V2V) technology, etc.
为了更好的理解本申请实施例中的终端设备,下面结合图1对本申请实施例的终端设备的硬件结构进行详细说明。In order to better understand the terminal device in the embodiment of the present application, the hardware structure of the terminal device in the embodiment of the present application is described in detail below in conjunction with Figure 1.
图1为本申请实施例提供的终端设备100的结构示意图。如图1所示,终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universalserial 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等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Fig. 1 is a schematic diagram of the structure of a terminal device 100 provided in an embodiment of the present application. As shown in Fig. 1, the terminal device 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。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, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device 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复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。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 a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it 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 be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting 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等。Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。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 terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备100的各种功能应用以及数据处理。The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。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. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测所述触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性地,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and applied to applications such as horizontal and vertical screen switching and pedometers.
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100. The software system of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device 100.
图2为本申请实施例的终端设备100的软件结构框图。FIG. 2 is a software structure block diagram of the terminal device 100 according to an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。The application layer may include a series of application packages. As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
电话管理器用于提供终端设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the terminal device 100, such as management of call status (including connection, disconnection, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide 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 graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.
2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。内核层用于驱动硬件,使得硬件工作。内核层至少包含显示驱动,屏幕驱动、图像处理器(graphics processing unit,GPU)驱动、摄像头、以及传感器驱动等,本申请实施例对此不做限制。例如,屏幕驱动可以驱动屏幕亮屏或息屏。The kernel layer is a layer between hardware and software. The kernel layer is used to drive the hardware to make the hardware work. The kernel layer at least includes display driver, screen driver, graphics processing unit (GPU) driver, camera, and sensor driver, etc., which are not limited in the embodiments of the present application. For example, the screen driver can drive the screen to turn on or off.
终端设备中可以安装并运行多种应用软件,例如日历、图库、音乐、天气等。用户可以根据不同的需求选择使用不同的应用软件。具体而言,用户使用终端设备中的服务功能时,例如支付服务、导航服务等,通常需要先打开可以使用该服务的应用软件,然后再依次执行各种操作流程。例如,当用户需要向商家支付货币时,用户可以选择具有支付功能的应用软件,打开该应用软件,扫描商家的二维码,此时用户的终端设备上会显示支付界面,然后用户可以输入金额完成支付。又例如,当用户需要使用导航功能时,用户可以打开地图软件,在该地图软件中的相应位置输入目标地址,然后点击导航功能进行导航。A variety of application software can be installed and run in the terminal device, such as calendar, gallery, music, weather, etc. Users can choose to use different application software according to different needs. Specifically, when a user uses the service functions in the terminal device, such as payment services, navigation services, etc., it is usually necessary to first open the application software that can use the service, and then perform various operation processes in sequence. For example, when a user needs to pay money to a merchant, the user can select an application software with a payment function, open the application software, and scan the merchant's QR code. At this time, the payment interface will be displayed on the user's terminal device, and then the user can enter the amount to complete the payment. For another example, when a user needs to use the navigation function, the user can open the map software, enter the target address in the corresponding location of the map software, and then click the navigation function to navigate.
由于用户在使用终端设备中的服务时,操作流程较为复杂。因此,为了简化该操作流程,终端设备可以通过AI算法学习用户在使用终端设备中的服务功能时的规律。该AI算法也可以称为服务推荐算法。终端设备可以获取用户的行为信息,例如位置信息、时间信息等,根据该行为信息确定用户是否具有使用终端设备中服务的意图。当AI算法预测用户有使用终端设备中的服务的意图时,终端设备可以主动向用户推荐该服务,简化用户的操作流程,提高用户体验。例如,用户每天中午使用支付服务功能之前,会离开工位,从20楼到1楼餐厅。当AI算法检测到用户的地理位置从工位移动至餐厅时,终端设备可以向该用户推荐支付服务,示例性地,终端设备可以在界面上显示支付通知消息,以便用户点击支付。Because the operation process is relatively complicated when the user uses the service in the terminal device. Therefore, in order to simplify the operation process, the terminal device can learn the rules of the user when using the service function in the terminal device through the AI algorithm. The AI algorithm can also be called a service recommendation algorithm. The terminal device can obtain the user's behavior information, such as location information, time information, etc., and determine whether the user has the intention to use the service in the terminal device based on the behavior information. When the AI algorithm predicts that the user has the intention to use the service in the terminal device, the terminal device can actively recommend the service to the user, simplify the user's operation process, and improve the user experience. For example, before using the payment service function at noon every day, the user will leave the workstation and go from the 20th floor to the restaurant on the 1st floor. When the AI algorithm detects that the user's geographical location has moved from the workstation to the restaurant, the terminal device can recommend the payment service to the user. For example, the terminal device can display a payment notification message on the interface so that the user can click to pay.
目前,终端设备通常每隔一定周期则通过AI算法预测用户使用服务的意图,例如每隔30秒预测一次用户使用服务的意图。然而,目前的预测方法使得终端设备的功耗较大。At present, terminal devices usually use AI algorithms to predict the user's intention to use services at regular intervals, for example, predicting the user's intention to use services every 30 seconds. However, the current prediction method causes the terminal device to consume a lot of power.
为了解决上述问题,本申请提供一种用于推荐服务的方法,通过对目标用户使用终端设备中目标服务的多条使用数据进行分析处理,确定目标用户使用该目标服务的时间段,将该时间段作为触发条件。在当前时间属于上述时间段的情况下触发终端设备调用AI算法,这样,在简化用户使用终端设备中的服务的操作流程的同时,有利于降低终端设备的功耗,从而提高用户体验。In order to solve the above problems, the present application provides a method for recommending services, which analyzes and processes multiple usage data of the target user using the target service in the terminal device, determines the time period when the target user uses the target service, and uses the time period as a trigger condition. When the current time falls within the above time period, the terminal device is triggered to call the AI algorithm. In this way, while simplifying the operation process of the user using the service in the terminal device, it is helpful to reduce the power consumption of the terminal device, thereby improving the user experience.
下面结合图3至图6对本申请实施例的用于推荐服务的方法进行详细介绍,该方法可以由具有数据处理功能的设备执行,例如服务器、网络设备、终端设备等,本申请对此不做具体限制。下面将本申请实施例的执行主体统称为“数据处理设备”,对上述的方法进行详细说明。The following is a detailed description of the method for recommending services in the embodiment of the present application in conjunction with Figures 3 to 6. The method can be executed by a device with a data processing function, such as a server, a network device, a terminal device, etc., and the present application does not make specific restrictions on this. The execution subject of the embodiment of the present application is collectively referred to as a "data processing device" and the above method is described in detail.
图3为本申请实施例提供的用于推荐服务的方法300的流程示意图。该方法300所涉及的终端设备的硬件结构可以如图1所示,软件结构可以如图2所示。该方法300包括以下步骤:FIG3 is a flow chart of a method 300 for recommending services provided in an embodiment of the present application. The hardware structure of the terminal device involved in the method 300 may be as shown in FIG1 , and the software structure may be as shown in FIG2 . The method 300 includes the following steps:
S301、采集第一历史时间段内目标用户对目标服务的多条使用数据,多条使用数据包括多个时间点。S301. Collect multiple usage data of a target service by a target user in a first historical time period, where the multiple usage data include multiple time points.
应理解,上述第一历史时间段为任意一段或多段过去的时间段,例如,2021/04/0608:00:00至2021/05/06 08:00:00,或者2021/04/06 08:00:00至2021/04/10 08:00:00和2021/04/12 08:00:00至2021/04/17 08:00:00该两个时间段的总和等。目标用户为探究对象,可以为使用终端设备中任意服务的用户。目标服务为所要探究的服务,例如,支付、导航、音乐等。多条使用数据是指目标用户在第一历史时间段内使用目标服务时产生的多条数据信息,多条使用数据中的每条使用数据包括一个时间点。It should be understood that the above-mentioned first historical time period is any one or more past time periods, for example, 2021/04/06 08:00:00 to 2021/05/06 08:00:00, or the sum of the two time periods of 2021/04/06 08:00:00 to 2021/04/10 08:00:00 and 2021/04/12 08:00:00 to 2021/04/17 08:00:00, etc. The target user is the object of exploration and can be a user who uses any service in the terminal device. The target service is the service to be explored, such as payment, navigation, music, etc. The multiple usage data refers to the multiple data information generated when the target user uses the target service in the first historical time period, and each of the multiple usage data includes a time point.
示例性地,针对用户A,目标服务为支付服务,第一历史时间段为2021/04/06 08:00:00至2021/05/06 08:00:00,在这段时间内,用户A在2021/04/07 08:00:03使用了一次支付服务,在2021/04/08 08:01:00使用了一次支付服务,则多条使用数据为两条使用数据,其中一条使用数据包括时间点2021/04/07 08:00:03,另一条使用数据包括时间点2021/04/0808:01:00。Exemplarily, for user A, the target service is the payment service, the first historical time period is from 2021/04/06 08:00:00 to 2021/05/06 08:00:00, during this period, user A used the payment service once at 2021/04/07 08:00:03 and once at 2021/04/08 08:01:00, then the multiple usage data are two usage data, one of which includes the time point 2021/04/07 08:00:03, and the other includes the time point 2021/04/08 08:01:00.
S302、确定上述多个时间点中每两个时间点之间的差值。S302: Determine the difference between every two time points in the above-mentioned multiple time points.
上述每两个时间点指多个时间点中每个时间点与其余时间点的两两组合。假设多个时间点的个数为a,则每两个时间点的组合共存在a*(a-1)/2种,那么上述差值的个数即为a*(a-1)/2。示例性地,a=3,多个时间点分别为点1、点2以及点3,则每两个时间点包括点1和点2、点2和点3、点1和点3三种组合。The above-mentioned every two time points refer to the combination of each time point in the multiple time points with the remaining time points. Assuming that the number of multiple time points is a, there are a*(a-1)/2 combinations of every two time points, and the number of the above-mentioned differences is a*(a-1)/2. For example, a=3, and the multiple time points are point 1, point 2, and point 3, then every two time points include three combinations of point 1 and point 2, point 2 and point 3, and point 1 and point 3.
可选地,数据处理设备可以忽略时间点中的日期信息,计算两个时间点中包含的小时、分钟或秒之间的差值。示例性地,上述S302还可以通过如下方式实现:根据多个时间点中包含的小时、分钟和秒的信息,将多个时间点中的每个时间点转换为秒级别数值;将每两个时间点对应的秒级别数值之间的差值,确定为每两个时间点之间的差值。Optionally, the data processing device may ignore the date information in the time point and calculate the difference between the hours, minutes or seconds contained in the two time points. Exemplarily, the above S302 may also be implemented in the following manner: according to the information of the hours, minutes and seconds contained in the multiple time points, each of the multiple time points is converted into a second-level value; the difference between the second-level values corresponding to each two time points is determined as the difference between each two time points.
上述小时、分钟和秒的信息为时间点中包含的时刻信息。例如,当时间点为2021/04/0801:02:03时,小时信息为01时,分钟信息为01分,秒信息为03秒。秒级别数值为将时间点中包含小时、分钟和秒的信息分别转换为秒后得到的数值,其中1小时为3600秒,1分钟为60秒。通过以下方式计算可以得到秒级别数值:1*3600+2*60+3=3723,即上述时间点2021/04/08 01:02:03对应的秒级别数值为3723。在将时间点信息转换为秒级别数值之后,时间点之间的差值即为这两个时间点对应的秒级别数值之间的差值。例如,时间点1和时间点2分别为2021/04/08 01:02:03和2021/04/08 01:03:03,则时间点1和时间点2对应的秒级别数值为3723和3783,该两个时间点之间的差值为60。The above-mentioned information of hours, minutes and seconds is the moment information contained in the time point. For example, when the time point is 2021/04/08 01:02:03, the hour information is 01 hours, the minute information is 01 minutes, and the second information is 03 seconds. The second-level value is the value obtained by converting the information of hours, minutes and seconds contained in the time point into seconds, where 1 hour is 3600 seconds and 1 minute is 60 seconds. The second-level value can be obtained by calculating in the following way: 1*3600+2*60+3=3723, that is, the second-level value corresponding to the above-mentioned time point 2021/04/08 01:02:03 is 3723. After converting the time point information into second-level values, the difference between the time points is the difference between the second-level values corresponding to the two time points. For example, time point 1 and time point 2 are 2021/04/08 01:02:03 and 2021/04/08 01:03:03 respectively. The second-level values corresponding to time point 1 and time point 2 are 3723 and 3783, and the difference between the two time points is 60.
在其他可能的实现方式中,该差值还可以为每两个时间点之间的小时级别的差值,在上述示例中,两个时间点为2021/04/08 01:02:03和2021/04/08 01:03:03,该两个时间点之间的差值为0。在其他可能的实现方式中,该差值还可以为每两个时间点之间的分钟级别的差值,在上述示例中,两个时间点为2021/04/08 01:02:03和2021/04/08 01:03:03,该两个时间点之间的差值为1。In other possible implementations, the difference may also be the hourly difference between every two time points. In the above example, the two time points are 2021/04/08 01:02:03 and 2021/04/08 01:03:03, and the difference between the two time points is 0. In other possible implementations, the difference may also be the minute-level difference between every two time points. In the above example, the two time points are 2021/04/08 01:02:03 and 2021/04/08 01:03:03, and the difference between the two time points is 1.
S303、基于差值,对多条使用数据进行聚类,得到至少一簇使用数据,至少一簇使用数据中的每簇使用数据包括多个目标时间点。S303: Clustering the plurality of pieces of usage data based on the difference to obtain at least one cluster of usage data, wherein each cluster of usage data in the at least one cluster of usage data includes a plurality of target time points.
本申请实施例的聚类可以通过聚类算法实现,聚类算法,或者称为群分析,是研究分类问题的一种统计分析方法。通过聚类,可以将多条使用数据中比较离散的使用数据摒弃,得到至少一簇使用数据。其中,摒弃的使用数据可以称为噪声点,噪声点与多条使用数据的条数之间的比值称为噪声比例,例如,噪声比例可以为5%。噪声比例可以通过预设聚类算法中的模型参数调整。模型参数可以是预设的。The clustering of the embodiment of the present application can be achieved by a clustering algorithm. The clustering algorithm, or group analysis, is a statistical analysis method for studying classification problems. Through clustering, relatively discrete usage data in multiple usage data can be discarded to obtain at least one cluster of usage data. Among them, the discarded usage data can be called noise points, and the ratio between the noise points and the number of multiple usage data is called the noise ratio. For example, the noise ratio can be 5%. The noise ratio can be adjusted by presetting the model parameters in the clustering algorithm. The model parameters can be preset.
图4为本申请实施例提供的聚类算法的模型示意图,如图4所示,假设上述多条使用数据分别为点1至点10,通过聚类后可以得到两簇使用数据,一簇使用数据为点1至点6,另一簇使用数据为点8、点9以及点10,噪声点为点7。上述模型参数包括如图4中所示的圆的半径,以及每个圆中包括的点的个数的最小值。FIG4 is a schematic diagram of a model of a clustering algorithm provided by an embodiment of the present application. As shown in FIG4 , assuming that the above-mentioned multiple pieces of usage data are points 1 to 10, two clusters of usage data can be obtained after clustering, one cluster of usage data is points 1 to 6, the other cluster of usage data is points 8, 9 and 10, and the noise point is point 7. The above-mentioned model parameters include the radius of the circle shown in FIG4 , and the minimum value of the number of points included in each circle.
应理解,每簇使用数据中的每条使用数据包括一个时间点,该时间点称为目标时间点。在图4中,对于一簇使用数据点1至点6,该簇使用数据包括的目标时间点为点1至点6对应的每个使用数据所包括的时间点。对于另一簇使用数据点8、点9以及点10,其对应的目标时间点为点8、点9以及点10对应的每个使用数据所包括的时间点。It should be understood that each piece of usage data in each cluster of usage data includes a time point, which is called a target time point. In FIG4 , for a cluster of usage data points 1 to 6, the target time point included in the cluster of usage data is the time point included in each piece of usage data corresponding to points 1 to 6. For another cluster of usage data points 8, 9, and 10, the corresponding target time point is the time point included in each piece of usage data corresponding to points 8, 9, and 10.
S304、基于至少一簇使用数据,确定至少一个目标时间段,以便终端设备在至少一个目标时间段内进行目标服务的服务推荐算法的条件判断。S304: Determine at least one target time period based on at least one cluster of usage data, so that the terminal device performs conditional judgment of a service recommendation algorithm for a target service within the at least one target time period.
具体而言,上述至少一簇使用数据中的每簇使用数据包括多个目标时间点,根据上述的多个目标时间点可以得到至少一个目标时间段,该目标时间段也可以称为“时间围栏”或者其他叫法,本申请实施例对此不作限定。终端设备可以根据该至少一个目标时间段进行目标服务的服务推荐算法的条件判断。在一种可能的实现方式中,若当前时间属于目标时间段,则终端设备调用目标服务的服务推荐算法进行进一步判断;否则,终端设备不调用目标服务的服务推荐算法。例如,目标时间段为08:00:00至09:00:00,则若当前时间为08:00:01,终端设备调用目标服务的服务推荐算法,判断是否向目标用户推荐目标服务。Specifically, each cluster of usage data in the above-mentioned at least one cluster of usage data includes multiple target time points. According to the above-mentioned multiple target time points, at least one target time period can be obtained. The target time period can also be called a "time fence" or other names, which is not limited in the embodiments of the present application. The terminal device can perform conditional judgment of the service recommendation algorithm of the target service according to the at least one target time period. In one possible implementation, if the current time belongs to the target time period, the terminal device calls the service recommendation algorithm of the target service for further judgment; otherwise, the terminal device does not call the service recommendation algorithm of the target service. For example, if the target time period is 08:00:00 to 09:00:00, then if the current time is 08:00:01, the terminal device calls the service recommendation algorithm of the target service to determine whether to recommend the target service to the target user.
本申请实施例提供的用于推荐服务的方法,通过对目标用户使用目标服务的多条使用数据进行聚类,得到至少一个目标时间段,终端设备可以基于该至少一个目标时间段进行目标服务的服务推荐算法的条件判断。当目标用户所使用的终端设备的当前时间属于目标时间段时,说明此时目标用户可能具有使用目标服务的意图,终端设备可以调用服务推荐算法进行条件判断。当目标用户所使用的终端设备的当前时间不属于目标时间段时,说明此时目标用户不具有使用目标服务的意图,终端设备无需调用服务推荐算法,这样,在简化用户使用终端设备中的服务的操作流程的同时,减小终端设备的功耗,提高了用户体验感。The method for recommending services provided in the embodiment of the present application obtains at least one target time period by clustering multiple usage data of the target user using the target service, and the terminal device can perform conditional judgment of the service recommendation algorithm of the target service based on the at least one target time period. When the current time of the terminal device used by the target user belongs to the target time period, it means that the target user may have the intention to use the target service at this time, and the terminal device can call the service recommendation algorithm to perform conditional judgment. When the current time of the terminal device used by the target user does not belong to the target time period, it means that the target user does not have the intention to use the target service at this time, and the terminal device does not need to call the service recommendation algorithm. In this way, while simplifying the operating process of the user using the service in the terminal device, the power consumption of the terminal device is reduced, and the user experience is improved.
作为一个可选的实施例,上述S304可以通过如下方式实现:分别基于每簇使用数据所包括的多个目标时间点,确定至少一个时间段;分别根据第一历史时间段对应的天数信息和至少一个时间段中每个时间段包括的目标时间点的个数,确定每个时间段的置信度;确定每个时间段的置信度是否大于或等于第一预设阈值;在至少一个时间段中存在第一时间段的置信度大于或等于第一预设阈值的情况下,将第一时间段确定为目标时间段。As an optional embodiment, the above S304 can be implemented in the following ways: determine at least one time period based on the multiple target time points included in each cluster of usage data; determine the confidence of each time period based on the number of days information corresponding to the first historical time period and the number of target time points included in each time period in at least one time period; determine whether the confidence of each time period is greater than or equal to a first preset threshold; if there is a first time period in at least one time period whose confidence is greater than or equal to the first preset threshold, determine the first time period as the target time period.
具体而言,数据处理设备可以基于至少一簇使用数据中的每簇使用数据所包括的多个目标时间点中的最大值和最小值,确定至少一个时间段。示例性地,假设一簇使用数据所包括的多个目标时间点中的最大值为2021/04/30 08:50:00,最小值为2021/04/01 08:01:00,则该簇使用数据对应的时间段为08:01:00至08:50:00。应理解,若聚类后得到多簇使用数据,则基于该多簇使用数据得到的时间段的个数为多个,且与该多簇使用数据的数量相等,即一簇使用数据可以得到一个时间段。Specifically, the data processing device can determine at least one time period based on the maximum and minimum values of the multiple target time points included in each cluster of usage data in at least one cluster of usage data. Exemplarily, assuming that the maximum value of the multiple target time points included in a cluster of usage data is 2021/04/30 08:50:00 and the minimum value is 2021/04/01 08:01:00, then the time period corresponding to the cluster usage data is 08:01:00 to 08:50:00. It should be understood that if multiple clusters of usage data are obtained after clustering, the number of time periods obtained based on the multiple clusters of usage data is multiple and equal to the number of the multiple clusters of usage data, that is, one cluster of usage data can obtain one time period.
上述天数信息指第一历史时间段所指的时间段包括的天数。例如,当第一历史时间段为2021/04/06 08:00:00至2021/04/10 08:00:00时,天数信息可以为4天。一个时间段对应一个置信度,一个时间段的置信度用于表示该时间段的可靠度,置信度越高,代表该时间段越可靠。上述第一预设阈值为预设的大于0的数。当一个时间段的置信度大于或等于第一预设阈值时,说明该时间段的可靠度较高,可以作为目标时间段,即可以用于终端设备进行目标服务的服务推荐算法的条件判断。The above-mentioned day information refers to the number of days included in the time period referred to by the first historical time period. For example, when the first historical time period is 2021/04/06 08:00:00 to 2021/04/10 08:00:00, the day information can be 4 days. A time period corresponds to a confidence level, and the confidence level of a time period is used to indicate the reliability of the time period. The higher the confidence level, the more reliable the time period. The above-mentioned first preset threshold is a preset number greater than 0. When the confidence level of a time period is greater than or equal to the first preset threshold, it means that the reliability of the time period is high and can be used as a target time period, that is, it can be used for conditional judgment of the service recommendation algorithm for the target service of the terminal device.
通过计算置信度,数据处理设备可以采用置信度衡量上述至少一个时间段中每个时间段的可靠度,从而将置信度大于或等于第一预设阈值的目标时间段用于终端设备进行目标服务的服务推荐算法的条件判断,使得数据处理设备对目标用户使用目标服务的意图的判断更加准确,有助于进一步减小终端设备的功耗,提高用户体验。By calculating the confidence level, the data processing device can use the confidence level to measure the reliability of each of the at least one time period mentioned above, so that the target time period with a confidence level greater than or equal to the first preset threshold value can be used for the conditional judgment of the service recommendation algorithm of the terminal device for the target service, so that the data processing device can make a more accurate judgment on the target user's intention to use the target service, which helps to further reduce the power consumption of the terminal device and improve the user experience.
在时间段的置信度小于第一预设阈值的情况下,说明该时间段的可靠度较低,该时间段不能用于终端设备进行目标服务的服务推荐算法的条件判断。数据处理设备可以计算上述至少一个时间段中置信度小于第一预设阈值的时间段所占的比例,根据该比例,数据处理设备可以判断是否要重新选择历史时间段进行聚类,获取新的时间段。When the confidence of a time period is less than the first preset threshold, it indicates that the reliability of the time period is low, and the time period cannot be used for conditional judgment of the service recommendation algorithm for the target service by the terminal device. The data processing device can calculate the proportion of time periods whose confidence is less than the first preset threshold in the at least one time period, and according to the proportion, the data processing device can determine whether to reselect the historical time period for clustering and obtain a new time period.
在一种可能的实施方式中,当上述至少一个时间段中置信度小于第一预设阈值的时间段的比例大于第二预设阈值时,数据处理设备可以采集第二历史时间段内目标用户对目标服务的多条使用数据,并根据该多条使用数据聚类得到新的至少一个时间段。数据处理设备可以计算该新的至少一个时间段中每个时间段的置信度,将置信度大于或者等于第一预设阈值的时间段作为目标时间段,用于终端设备进行目标服务的服务推荐算法的条件判断。In a possible implementation, when the proportion of time periods in the above at least one time period whose confidence is less than the first preset threshold is greater than the second preset threshold, the data processing device may collect multiple pieces of usage data of the target user for the target service in the second historical time period, and obtain at least one new time period by clustering the multiple pieces of usage data. The data processing device may calculate the confidence of each time period in the new at least one time period, and use the time period with a confidence greater than or equal to the first preset threshold as the target time period, which is used for the conditional judgment of the service recommendation algorithm for the target service by the terminal device.
应理解,上述第二历史时间段包含的天数比第一历史时间段的包含的天数多,和/或,上述第二历史时间段比第一历史时间段更接近当前时间。It should be understood that the second historical time period includes more days than the first historical time period, and/or the second historical time period is closer to the current time than the first historical time period.
示例性地,假设上述至少一个时间段包括时间段1、时间段2以及时间段3,对应的置信度分别为12、13以及15,且第一预设阈值为14,第二预设阈值为50%,则该三个时间段中时间段1和时间段2的置信度小于第一预设阈值。上述该三个时间段中置信度小于第一预设阈值的时间段的比例为2/3,大于第二预设阈值。此时,数据处理设备可以重新采集第二历史时间段内目标用户使用目标服务的多条使用数据,并根据该多条使用数据得到新的至少一个时间段。例如,假设第一历史时间段为2021/04/06 08:00:00至2021/04/13 08:00:00,数据处理设备可以采集2021/04/06 08:00:00至2021/04/30 08:00:00对应的第二历史时间段内目标用户使用目标服务的多条使用数据,得到新的至少一个时间段。或者,假设第一历史时间段为2021/04/06 08:00:00至2021/04/30 08:00:00,该多条使用数据对于目标用户当前使用目标服务的时间的参考价值可能较小。因此,数据处理设备可以采集日期更近的第二历史时间段内目标用户使用目标服务的多条使用数据,例如,第二历史时间段可以为2021/08/06 08:00:00至2021/09/30 08:00:00,并根据该多条使用数据得到新的至少一个时间段。Exemplarily, assuming that the at least one time period includes time period 1, time period 2, and time period 3, and the corresponding confidences are 12, 13, and 15, respectively, and the first preset threshold is 14, and the second preset threshold is 50%, then the confidences of time period 1 and time period 2 among the three time periods are less than the first preset threshold. The proportion of time periods whose confidences among the three time periods are less than the first preset threshold is 2/3, which is greater than the second preset threshold. At this time, the data processing device can re-collect multiple usage data of the target user using the target service in the second historical time period, and obtain at least one new time period based on the multiple usage data. For example, assuming that the first historical time period is from 2021/04/06 08:00:00 to 2021/04/13 08:00:00, the data processing device can collect multiple usage data of the target user using the target service in the second historical time period corresponding to 2021/04/06 08:00:00 to 2021/04/30 08:00:00, and obtain at least one new time period. Alternatively, assuming that the first historical time period is from 2021/04/06 08:00:00 to 2021/04/30 08:00:00, the reference value of the plurality of usage data for the time when the target user currently uses the target service may be small. Therefore, the data processing device may collect a plurality of usage data of the target user using the target service in a second historical time period with a more recent date, for example, the second historical time period may be from 2021/08/06 08:00:00 to 2021/09/30 08:00:00, and obtain at least one new time period based on the plurality of usage data.
在一种可能的实施方式中,数据处理设备可以对上述基于至少一簇使用数据得到的至少一个时间段中的每个时间段再进行分段,基于分段后的时间段计算置信度。其中,至少一个时间段中的第二时间段的置信度通过以下公式确定:In a possible implementation, the data processing device may further segment each of the at least one time period obtained based on the at least one cluster of usage data, and calculate the confidence based on the segmented time periods. The confidence of the second time period in the at least one time period is determined by the following formula:
其中,Z为置信度,Q为第一历史时间段对应的天数信息对应的天数值,Yi为将天数信息划分为n段天数信息中的第i段天数信息对应的天数值,Y1+Y2+...+Yn=Q,Xi为第i段天数信息在第二时间段内所包括的时间点的个数,i∈{1,2,…n},ωi为第i段天数信息在第二时间段内所包括的时间点的权重,ω1+ω2+…+ωn=1。Among them, Z is the confidence, Q is the day value corresponding to the day information corresponding to the first historical time period, Yi is the day value corresponding to the i-th section of day information among the n sections of day information divided into the day information, Y1 + Y2 +...+ Yn =Q, Xi is the number of time points included in the i-th section of day information in the second time period, i∈{1,2,…n}, ωi is the weight of the time points included in the i-th section of day information in the second time period, ω1 + ω2 +…+ ωn =1.
应理解,第二时间段为至少一个时间段中的任意一个时间段。n和ωi为预设值。其中ωi可以根据Xi的大小确定,Xi越大,则代表第i段天数信息内在第二时间段的时间点的个数越多,则ωi可以越大。It should be understood that the second time period is any one of the at least one time period. n and ω i are preset values. ω i can be determined according to the size of Xi. The larger Xi is , the more time points there are in the second time period in the i-th day information, and the larger ω i can be.
在一个具体的示例中,假设第一历史时间段为2021/04/06 08:00:00至2021/04/13 08:00:00,Q为7。若n=3,即将第一历史时间段划分为3段,其中,第一段为2021/04/0608:00:00至2021/04/08 08:00:00,第二段为2021/04/08 08:00:00至2021/04/10 08:00:00,第三段为2021/04/10 08:00:00至2021/04/13 08:00:00。则相应地,Y1为2,Y2为2,Y3为3。假设第二时间段为12:00:00-13:00:00,X1为在2021/04/06 08:00:00至2021/04/8 08:00:00中,每天12:00:00-13:00:00内包含的时间点个数之和,X2为在2021/04/08 08:00:00至2021/04/10 08:00:00中,每天12:00:00-13:00:00内包含的时间点个数之和,X3为在2021/04/10 08:00:00至2021/04/13 08:00:00中,每天12:00:00-13:00:00内包含的时间点个数之和。假设X1为6,X2为10,X3为15,ω1为0.2,ω2为0.3,ω3为0.5。则第二时间段的置信度Z=(6/2*0.2+10/2*0.3+15/3*0.5)*7=32.2。In a specific example, assume that the first historical time period is from 2021/04/06 08:00:00 to 2021/04/13 08:00:00, and Q is 7. If n=3, the first historical time period is divided into 3 sections, wherein the first section is from 2021/04/06 08:00:00 to 2021/04/08 08:00:00, the second section is from 2021/04/08 08:00:00 to 2021/04/10 08:00:00, and the third section is from 2021/04/10 08:00:00 to 2021/04/13 08:00:00. Accordingly, Y1 is 2, Y2 is 2, and Y3 is 3. Assume that the second time period is 12:00:00-13:00:00, X1 is the sum of the number of time points included in 12:00:00-13:00:00 every day from 2021/04/06 08:00:00 to 2021/04/8 08:00:00, X2 is the sum of the number of time points included in 12:00:00-13:00:00 every day from 2021/04/08 08:00:00 to 2021/04/10 08:00:00, and X3 is the sum of the number of time points included in 12:00:00-13:00:00 every day from 2021/04/10 08:00:00 to 2021/04/13 08:00:00. Assume that X1 is 6, X2 is 10, X3 is 15, ω1 is 0.2, ω2 is 0.3, and ω3 is 0.5. Then the confidence level Z of the second time period is (6/2*0.2+10/2*0.3+15/3*0.5)*7=32.2.
上述用于推荐服务的方法利用了第一历史时间段内使用数据中的时间信息(即时间点)进行聚类,在另一种可能的实现方式中,还可以利用第一历史时间段内使用数据中的时间信息(即时间点)和地理信息(例如地理坐标)进行聚类,下面对这一实现方式进行详细介绍。The above-mentioned method for recommending services utilizes the time information (i.e., time points) in the usage data within the first historical time period for clustering. In another possible implementation method, the time information (i.e., time points) and geographic information (such as geographic coordinates) in the usage data within the first historical time period can also be used for clustering. This implementation method is introduced in detail below.
图5为本申请实施例提供的另一种用于推荐服务的方法500的流程示意图。该方法500所涉及的终端设备的硬件结构可以如图1所示,该终端设备的软件结构可以如图2所示。该方法500包括下列步骤:FIG5 is a flow chart of another method 500 for recommending services provided in an embodiment of the present application. The hardware structure of the terminal device involved in the method 500 may be as shown in FIG1 , and the software structure of the terminal device may be as shown in FIG2 . The method 500 includes the following steps:
S501、采集第一历史时间段内目标用户对目标服务的多条使用数据,多条使用数据包括多个时间点和多个地理坐标。S501: Collect multiple usage data of a target service by a target user in a first historical time period, where the multiple usage data include multiple time points and multiple geographic coordinates.
示例性地,地理坐标为二维坐标,目标用户使用目标服务时的地理位置坐标(X,Y),其中X为经度,Y为纬度。多条使用数据中的每条使用数据分别包括一个时间点和一个地理坐标。关于第一历史时间段和时间点的介绍可以参照上述与图3中的S301,此处不再赘述。Exemplarily, the geographic coordinates are two-dimensional coordinates, the geographic location coordinates (X, Y) of the target user when using the target service, where X is longitude and Y is latitude. Each of the multiple usage data includes a time point and a geographic coordinate. The introduction of the first historical time period and the time point can refer to S301 in the above and Figure 3, which will not be repeated here.
S502、确定多个时间点中每两个时间点之间的差值。S502: Determine the difference between every two time points in the multiple time points.
应理解,S502的具体实施方式与图3中的S302相同,在此不再赘述。It should be understood that the specific implementation of S502 is the same as that of S302 in FIG. 3 , and will not be described in detail herein.
S503、计算多个地理坐标中每两个地理坐标之间的距离。S503: Calculate the distance between every two geographic coordinates in the plurality of geographic coordinates.
与S502类似,每两个地理坐标指多个地理坐标中的每个地理坐标与其余地理坐标的两两组合。假设地理坐标的个数为m,则每两个地理坐标组合的个数为m*(m-1)/2,那么上述距离的个数即为m*(m-1)/2。本申请实施例的距离可以理解为两个地理坐标之间的球面距离。示例性地,假设点A的地理坐标为(X1,Y1),点B的地理坐标为(X2,Y2),地球球心为点O,地球半径为R,点C为与点A经度相同且纬度为0的点,点C的地理坐标为(X1,0),点D为与点B经度相同且纬度为0的点,点D的地理坐标为(X2,0),点A与点B之间的球面距离d=R*arccos(cos∠AOC*cos∠BOD*cos∠DOC+sin∠AOC*sin∠BOD)。Similar to S502, every two geographic coordinates refer to the combination of each geographic coordinate in the plurality of geographic coordinates with the remaining geographic coordinates. Assuming that the number of geographic coordinates is m, the number of every two geographic coordinate combinations is m*(m-1)/2, and the number of the above distances is m*(m-1)/2. The distance in the embodiment of the present application can be understood as the spherical distance between two geographic coordinates. Exemplarily, assume that the geographic coordinates of point A are ( X1 , Y1 ), the geographic coordinates of point B are ( X2 , Y2 ), the center of the earth is point O, the radius of the earth is R, point C is a point with the same longitude as point A and a latitude of 0, and the geographic coordinates of point C are ( X1 , 0), point D is a point with the same longitude as point B and a latitude of 0, and the geographic coordinates of point D are ( X2 , 0), and the spherical distance d between point A and point B is R*arccos(cos∠AOC*cos∠BOD*cos∠DOC+sin∠AOC*sin∠BOD).
S504、根据上述距离和上述差值,确定多条使用数据中每两条使用数据之间的聚类度量值。S504: Determine a clustering metric value between every two pieces of usage data in the plurality of usage data according to the distance and the difference.
聚类度量值为多条使用数据聚类过程中需要参考的数值,数据处理设备判断两个使用数据之间的聚类度量值是否小于或者等于聚类算法中预设的模型参数,例如图4中所示的预设的圆的半径。在本申请实施例中,每两个使用数据之间的聚类度量值分别是根据该两个使用数据的时间点之间的差值和地理坐标之间的距离计算得到的。例如,第一使用数据包括的时间点为2021/04/08 08:00:00,地理坐标为(80,90),第二使用数据包括的时间点为2021/04/08 08:01:00,地理坐标为(77,86),则第一使用数据对应的时间点和第二使用数据对应的时间点之间的差值为60,第一使用数据对应的地理坐标和第二使用数据对应的地理坐标之间的距离为5,根据60和5可以计算得到第一使用数据和第二使用数据之间的聚类度量值。The clustering metric is a value that needs to be referenced during the clustering process of multiple usage data. The data processing device determines whether the clustering metric between two usage data is less than or equal to the preset model parameter in the clustering algorithm, such as the radius of the preset circle shown in Figure 4. In an embodiment of the present application, the clustering metric between each two usage data is calculated based on the difference between the time points of the two usage data and the distance between the geographic coordinates. For example, the time point included in the first usage data is 2021/04/08 08:00:00, and the geographic coordinates are (80, 90), and the time point included in the second usage data is 2021/04/08 08:01:00, and the geographic coordinates are (77, 86). The difference between the time point corresponding to the first usage data and the time point corresponding to the second usage data is 60, and the distance between the geographic coordinates corresponding to the first usage data and the geographic coordinates corresponding to the second usage data is 5. The clustering metric between the first usage data and the second usage data can be calculated based on 60 and 5.
S505、基于聚类度量值,对多条使用数据进行聚类,得到至少一簇使用数据,至少一簇使用数据中的每簇使用数据包括多个目标时间点和多个目标地理坐标。S505 . Cluster the plurality of usage data based on the clustering metric value to obtain at least one cluster of usage data, wherein each cluster of usage data in the at least one cluster of usage data includes a plurality of target time points and a plurality of target geographic coordinates.
应理解,S505的具体实施方式与图3中的S303类似,由于每个使用数据包括一个时间点和一个地理坐标,因此每簇使用数据包括多个目标时间点和多个目标地理坐标。It should be understood that the specific implementation of S505 is similar to S303 in FIG. 3 . Since each usage data includes a time point and a geographic coordinate, each cluster of usage data includes multiple target time points and multiple target geographic coordinates.
S506、基于至少一簇使用数据,确定至少一个目标时间段和至少一个地理区域,以便终端设备在至少一个目标时间段内和至少一个地理区域内进行目标服务的服务推荐算法的条件判断。S506: Determine at least one target time period and at least one geographical area based on at least one cluster of usage data, so that the terminal device performs conditional judgment of a service recommendation algorithm for a target service within the at least one target time period and within the at least one geographical area.
应理解,S506的具体实施方式与图3中的S304类似,由于每簇使用数据包括多个目标时间点和多个目标地理坐标,终端设备可以根据每簇使用数据的多个目标时间点确定一个时间段,具体的实现方式与S304类似。数据处理设备还可以根据每簇使用数据包括的多个目标地理坐标确定一个地理区域,该地理区域也可以称为“地理围栏”。It should be understood that the specific implementation of S506 is similar to S304 in FIG. 3 . Since each cluster of usage data includes multiple target time points and multiple target geographic coordinates, the terminal device can determine a time period according to the multiple target time points of each cluster of usage data, and the specific implementation method is similar to S304. The data processing device can also determine a geographical area according to the multiple target geographic coordinates included in each cluster of usage data, and the geographical area can also be called a "geo-fence".
具体地,数据处理设备可以根据至少一簇使用数据中每簇使用数据包括的多个目标地理坐标中的最大经度、最大纬度、最小经度以及最小纬度,确定至少一个地理区域。示例性地,数据处理设备可以根据每簇使用数据的多个目标地理坐标中的最大经度、最大纬度、最小经度以及最小纬度确定一个地理区域。在另一种可能的实施方式中,数据处理设备还可以根据至少一簇使用数据中每簇使用数据包括的多个目标地理坐标结合行政区域,确定至少一个地理区域。行政区域可以为街道区域、商场区域等。数据处理设备先根据上述的多个目标地理坐标确定一个区域,然后结合该区域附近的行政区域确定一个更加准确的地理区域。Specifically, the data processing device may determine at least one geographic area based on the maximum longitude, maximum latitude, minimum longitude and minimum latitude of multiple target geographic coordinates included in each cluster of usage data in at least one cluster of usage data. Exemplarily, the data processing device may determine a geographic area based on the maximum longitude, maximum latitude, minimum longitude and minimum latitude of multiple target geographic coordinates of each cluster of usage data. In another possible implementation, the data processing device may also determine at least one geographic area based on the multiple target geographic coordinates included in each cluster of usage data in at least one cluster of usage data in combination with administrative areas. The administrative area may be a street area, a shopping mall area, etc. The data processing device first determines an area based on the above-mentioned multiple target geographic coordinates, and then determines a more accurate geographic area in combination with the administrative areas near the area.
至少一个目标时间段和至少一个地理区域用于终端设备进行目标服务的服务推荐算法的条件判断。当目标用户所处的地理位置属于至少一个地理区域,并且当前时间属于至少一个时间段时,说明此时目标用户可能具有使用目标服务的意图,终端设备可以调用目标服务的服务推荐算法,判断是否向目标用户推荐目标服务。当目标用户所处的地理位置不属于至少一个地理区域,或者当前时间不属于至少一个时间段时,说明此时目标用户不具有使用目标服务的意图,终端设备无需调用服务推荐算法。At least one target time period and at least one geographic area are used for conditional judgment of the service recommendation algorithm of the target service by the terminal device. When the geographical location of the target user belongs to at least one geographic area, and the current time belongs to at least one time period, it means that the target user may have the intention to use the target service at this time, and the terminal device can call the service recommendation algorithm of the target service to determine whether to recommend the target service to the target user. When the geographical location of the target user does not belong to at least one geographic area, or the current time does not belong to at least one time period, it means that the target user does not have the intention to use the target service at this time, and the terminal device does not need to call the service recommendation algorithm.
本申请实施例提供的用于推荐服务的方法,通过对目标用户使用目标服务的多条使用数据进行聚类,得到至少一个目标时间段和至少一个地理区域,终端设备可以基于该至少一个目标时间段和至少一个地理区域进行目标服务的服务推荐算法的条件判断。该方法将时间信息和地理信息结合,使得数据处理设备能够更准确的确定目标用户使用目标服务的意图,从而减少终端设备的无效判断次数,进一步减小了终端设备的功耗,提高了用户体验。The method for recommending services provided in the embodiment of the present application obtains at least one target time period and at least one geographical area by clustering multiple usage data of the target user using the target service, and the terminal device can make conditional judgments of the service recommendation algorithm of the target service based on the at least one target time period and at least one geographical area. The method combines time information and geographical information, so that the data processing device can more accurately determine the intention of the target user to use the target service, thereby reducing the number of invalid judgments of the terminal device, further reducing the power consumption of the terminal device, and improving the user experience.
作为一个可选的实施例,上述S504可以通过如下方式实现:获取每两个地理坐标之间的距离中的第一最大值和第一最小值;根据第一最大值、第一最小值以及每两个地理坐标之间的距离,确定每两个地理坐标之间的去量纲距离;获取每两个时间点之间的差值中的第二最大值和第二最小值;根据第二最大值、第二最小值以及每两个时间点之间的差值,确定每两个时间点之间的去量纲差值;根据每两个地理坐标之间的去量纲距离和每两个时间点之间的去量纲差值,确定每两条使用数据之间的聚类度量值。As an optional embodiment, the above S504 can be implemented in the following manner: obtain the first maximum value and the first minimum value in the distance between every two geographic coordinates; determine the dimensionless distance between every two geographic coordinates based on the first maximum value, the first minimum value and the distance between every two geographic coordinates; obtain the second maximum value and the second minimum value in the difference between every two time points; determine the dimensionless difference between every two time points based on the second maximum value, the second minimum value and the difference between every two time points; determine the clustering measure between every two usage data based on the dimensionless distance between every two geographic coordinates and the dimensionless difference between every two time points.
应理解,去量纲距离为将每两个地理坐标之间的距离通过去量纲化得到的没有单位的数值。去量纲差值为将每两个时间点之间的差值经过去量纲化得到的没有单位的数值。It should be understood that the dimensionless distance is a value without a unit obtained by dedimensionalizing the distance between each two geographic coordinates, and the dimensionless difference is a value without a unit obtained by dedimensionalizing the difference between each two time points.
在一种可能的实施方式中,每两个地理坐标之间的去量纲距离通过以下公式确定:其中,Gr为去量纲距离,Gi为每两个地理坐标之间的距离,Gmax为第一最大值,Gmin为第一最小值。In one possible implementation, the dimensionless distance between every two geographic coordinates is determined by the following formula: Among them, Gr is the dimensionless distance, Gi is the distance between every two geographic coordinates, Gmax is the first maximum value, and Gmin is the first minimum value.
在一种可能的实施方式中,每两个时间点之间的去量纲差值通过以下公式确定:其中,Tr为去量纲差值,Ti为每两个时间点之间的差值,Tmax为第二最大值,Tmin为第二最小值。In one possible implementation, the dimensionless difference between every two time points is determined by the following formula: Wherein, Tr is the dimensionless difference, Ti is the difference between every two time points, Tmax is the second maximum value, and Tmin is the second minimum value.
由于每两个时间点之间的差值的单位和每两个地理坐标之间的距离的单位不同,因此根据上述差值和距离计算得到聚类度量值时,需要先对上述差值和距离去量纲化。每两条使用数据之间的聚类度量值是根据该两条使用数据的时间点之间的差值和该两条使用数据的地理坐标之间的距离计算得到的。在本申请实施例中,聚类度量值可以通过以下公式计算得到:D=α*Gr+β*Tr,其中,D为聚类度量值,α为距离的权重,β为差值的权重,α+β=1。Since the unit of the difference between each two time points and the unit of the distance between each two geographic coordinates are different, when the clustering metric is calculated based on the above difference and distance, it is necessary to first de-dimensionalize the above difference and distance. The clustering metric between each two usage data is calculated based on the difference between the time points of the two usage data and the distance between the geographic coordinates of the two usage data. In an embodiment of the present application, the clustering metric can be calculated by the following formula: D = α*G r + β*T r , where D is the clustering metric, α is the weight of the distance, β is the weight of the difference, and α+β=1.
示例性地,假设多条使用数据分别为第一使用数据、第二使用数据、第三使用数据、第四使用数据。第一使用数据包括第一时间点和第一地理坐标;第二使用数据包括第二时间点和第二地理坐标;第三使用数据包括第三时间点和第三地理坐标;第四使用数据包括第四时间点和第四地理坐标。For example, it is assumed that the plurality of usage data are first usage data, second usage data, third usage data, and fourth usage data. The first usage data includes a first time point and a first geographic coordinate; the second usage data includes a second time point and a second geographic coordinate; the third usage data includes a third time point and a third geographic coordinate; and the fourth usage data includes a fourth time point and a fourth geographic coordinate.
若第一时间点和第二时间点之间的差值为61;第一时间点和第三时间点之间的差值为70;第一时间点和第四时间点之间的差值为65;第二时间点和第三时间点之间的差值为62;第二时间点和第四时间点之间的差值为60;第三时间点和第四时间点之间的差值为63。上述差值的单位均为秒。第二最大值为70,第二最小值为60。第一时间点和第二时间点之间的差值对应的去量纲差值Tr=(61-60)/(70-60)=0.1。If the difference between the first time point and the second time point is 61; the difference between the first time point and the third time point is 70; the difference between the first time point and the fourth time point is 65; the difference between the second time point and the third time point is 62; the difference between the second time point and the fourth time point is 60; the difference between the third time point and the fourth time point is 63. The units of the above differences are all seconds. The second maximum value is 70, and the second minimum value is 60. The dimensionless difference T r corresponding to the difference between the first time point and the second time point = (61-60)/(70-60) = 0.1.
若第一地理坐标和第二地理坐标之间的距离为6;第一地理坐标和第三地理坐标之间的距离为5;第一地理坐标和第四地理坐标之间的距离为10;第二地理坐标和第三地理坐标之间的距离为12;第二地理坐标和第四地理坐标之间的距离为10;第三地理坐标和第四地理坐标之间的距离为13。上述距离的单位可以均为米、分米等。第一最大值为13,第一最小值为5。第一地理坐标和第二地理坐标之间的距离对应的去量纲距离Gr=(6-5)/(13-5)=0.125。If the distance between the first geographic coordinate and the second geographic coordinate is 6; the distance between the first geographic coordinate and the third geographic coordinate is 5; the distance between the first geographic coordinate and the fourth geographic coordinate is 10; the distance between the second geographic coordinate and the third geographic coordinate is 12; the distance between the second geographic coordinate and the fourth geographic coordinate is 10; the distance between the third geographic coordinate and the fourth geographic coordinate is 13. The units of the above distances can all be meters, decimeters, etc. The first maximum value is 13, and the first minimum value is 5. The dimensionless distance Gr corresponding to the distance between the first geographic coordinate and the second geographic coordinate is (6-5)/(13-5)=0.125.
在上述示例中,第一使用数据和第二使用数据的聚类度量值,是根据第一时间点和第二时间点之间的去量纲差值以及第一地理坐标和第二地理坐标之间的去量纲距离计算得到的。具体地,在上述示例中,假设α为0.2,β为0.8,则第一使用数据和第二使用数据之间的聚类度量值D=0.2*0.125+0.8*0.1=0.105。In the above example, the clustering metric value of the first usage data and the second usage data is calculated based on the dimensionless difference between the first time point and the second time point and the dimensionless distance between the first geographic coordinate and the second geographic coordinate. Specifically, in the above example, assuming that α is 0.2 and β is 0.8, the clustering metric value D between the first usage data and the second usage data is 0.2*0.125+0.8*0.1=0.105.
下面,分别以两个示例,对本申请实施例的用于推荐服务的方法进行详细介绍。The following is a detailed introduction of the method for recommending services in an embodiment of the present application using two examples.
示例一,根据时间信息进行聚类Example 1: Clustering based on time information
数据处理设备采集目标用户在2022/04/06-2022/04/13历史时间段内使用支付服务的使用数据,使用数据的个数为10,且分别用点1至点10表示。每个使用数据包含一个时间点。该十个时间依次分别为:2022/04/06 08:00:03、2022/04/07 08:01:04、2022/04/0808:02:03、2022/04/09 08:04:03、2022/04/10 08:05:03、2022/04/11 08:02:36、2022/04/10 12:00:00、2022/04/11 12:01:03、2022/04/12 12:02:03、2022/04/13 12:02:23。The data processing device collects the usage data of the target user using the payment service in the historical time period from 2022/04/06 to 2022/04/13. The number of usage data is 10, and they are represented by points 1 to 10 respectively. Each usage data includes a time point. The ten times are: 2022/04/06 08:00:03, 2022/04/07 08:01:04, 2022/04/08 08:02:03, 2022/04/09 08:04:03, 2022/04/10 08:05:03, 2022/04/11 08:02:36, 2022/04/10 12:00:00, 2022/04/11 12:01:03, 2022/04/12 12:02:03, 2022/04/13 12:02:23.
根据十个时间点中包含的小时、分钟以及秒的信息,将该十个时间点分别转换为秒级别数值。例如,对于点1对应的时间点2022/04/06 08:00:03中包含的小时、分钟以及秒的信息为08:00:03,一小时为3600秒,一分钟为60秒,该时间点对应的秒级别数值为28803。从点1至点10对应的秒级别数值依次为:28803、28864、28923、29043、29103、28956、43200、43263、43323、43343。According to the information of hours, minutes and seconds contained in the ten time points, the ten time points are converted into second-level values. For example, the information of hours, minutes and seconds contained in the time point 2022/04/06 08:00:03 corresponding to point 1 is 08:00:03, one hour is 3600 seconds, one minute is 60 seconds, and the second-level value corresponding to this time point is 28803. The second-level values corresponding to points 1 to 10 are: 28803, 28864, 28923, 29043, 29103, 28956, 43200, 43263, 43323, 43343.
确定聚类算法中的两个模型参数:预设支付事件最少个数N和预设时间距离最大差值M,然后将上述点1至点10对应的秒级别数值输入聚类算法进行聚类,得到至少一个时间段。假设N=3,M=100。N为预设的每个时间段中包括的时间点个数的最小值。M为预设的每个时间段中包括的时间点之间的时间距离的最大值。Determine two model parameters in the clustering algorithm: the preset minimum number of payment events N and the preset maximum time distance difference M, and then input the second-level values corresponding to the above points 1 to 10 into the clustering algorithm for clustering to obtain at least one time period. Assume that N = 3 and M = 100. N is the minimum number of time points included in each preset time period. M is the maximum time distance between the time points included in each preset time period.
下面结合图6和图7对本申请实施例的聚类算法的具体实施过程进行描述。The specific implementation process of the clustering algorithm of the embodiment of the present application is described below in conjunction with Figures 6 and 7.
图6为本申请实施例提供的聚类算法的过程示意图一,如图6所示,上述10个使用数据的聚类过程如下所示:FIG6 is a process diagram 1 of a clustering algorithm provided in an embodiment of the present application. As shown in FIG6 , the clustering process of the above 10 usage data is as follows:
首先计算每两个秒级别数值之间的差值。例如,点1和点2对应的秒级别数值分别为28803和28864,则该两个秒级别数值之间的差值为61。类似地,点2和点3之间的时间距离为59。按照上述方法依次计算每两个点之间的差值,将得到45个差值。First, calculate the difference between every two second-level values. For example, the second-level values corresponding to point 1 and point 2 are 28803 and 28864 respectively, and the difference between the two second-level values is 61. Similarly, the time distance between point 2 and point 3 is 59. According to the above method, the difference between every two points is calculated in turn, and 45 differences will be obtained.
如图6(a)所示,选择上述十个点中任一时间点为圆心,例如以点2为圆心,且以M半径,得到第一圆图。确定第一圆图中覆盖的使用数据的个数是否大于或等于N。第一圆图中覆盖有点1、点2、点3以及点6,第一圆图中覆盖的使用数据的个数大于N,则将第一圆图作为目标圆图。As shown in FIG6(a), any time point among the ten points is selected as the center of the circle, for example, point 2 is selected as the center of the circle, and the radius is M, to obtain the first circular graph. Determine whether the number of usage data covered in the first circular graph is greater than or equal to N. The first circular graph covers point 1, point 2, point 3, and point 6. If the number of usage data covered in the first circular graph is greater than N, the first circular graph is used as the target circular graph.
如图6(b)所示,由于第一圆图为目标圆图,因此分别以第一圆图中除点2以外的其他点为圆心,M为半径做圆,得到新的圆图,然后确定新的圆图是否可以作为目标圆图。通过判断,以点1和点3为圆心得到的圆图覆盖的点的数量小于3,不能作为目标圆图,以点6为圆心得到的圆图覆盖的点的数量等于3,可以作为目标圆图。As shown in Figure 6(b), since the first circular graph is the target circular graph, a new circular graph is obtained by taking the other points in the first circular graph except point 2 as the center and M as the radius, and then determining whether the new circular graph can be used as the target circular graph. Through judgment, the number of points covered by the circular graphs with points 1 and 3 as the centers is less than 3, and cannot be used as the target circular graph. The number of points covered by the circular graph with point 6 as the center is equal to 3, and can be used as the target circular graph.
如图6(c)所示,由于以点6为圆心得到的圆图为目标圆图,且该目标圆图覆盖点2、点6以及点4,点2已经作为圆心得到第一圆图,因此,继续以点4为圆心做圆,得到的圆图覆盖有点6、点4以及点5,数量等于3,以点4为圆心得到的圆图可以作为目标圆图。继续以点5为圆心做圆,得到的圆图覆盖有点4和点5,数量小于3,则以点5为圆心得到的圆图不能作为目标圆图。此时,目标圆图中覆盖的所有点均已经作为圆心做圆。所有目标圆图覆盖的使用数据为一簇使用数据,该簇使用数据包括的时间点为多个目标时间点。根据多个目标时间点确定第一时间段。多个目标时间点包括点1至点6对应的使用数据包括的六个目标时间点,该六个目标时间点中的最大的时间点为点5对应的时间点,其对应的秒级别数值为29103,最小的时间点为点1对应的时间点,其对应的秒级别数值为28803,将该最大的秒级别数值和最小秒级别数值分别转换为包含小时、分钟以及秒信息的时间点,得到第一时间段。第一时间段为08:00:03至08:05:03。As shown in Figure 6(c), since the circular diagram obtained with point 6 as the center is the target circular diagram, and the target circular diagram covers points 2, 6 and 4, point 2 has been used as the center to obtain the first circular diagram, therefore, continue to make a circle with point 4 as the center, the circular diagram obtained covers points 6, 4 and 5, the number is equal to 3, and the circular diagram obtained with point 4 as the center can be used as the target circular diagram. Continue to make a circle with point 5 as the center, the circular diagram obtained covers points 4 and 5, the number is less than 3, then the circular diagram obtained with point 5 as the center cannot be used as the target circular diagram. At this time, all the points covered in the target circular diagram have been used as the center to make a circle. The usage data covered by all target circular diagrams is a cluster of usage data, and the time points included in the cluster of usage data are multiple target time points. The first time period is determined based on the multiple target time points. The multiple target time points include six target time points included in the usage data corresponding to points 1 to 6, the largest time point among the six target time points is the time point corresponding to point 5, and its corresponding second-level value is 29103, and the smallest time point is the time point corresponding to point 1, and its corresponding second-level value is 28803. The largest second-level value and the smallest second-level value are respectively converted into time points containing hour, minute and second information to obtain a first time period. The first time period is 08:00:03 to 08:05:03.
如图6(d)所示,在确定上述第一时间段过程中,点7、点8、点9、点10未作为圆心做圆,因此该4个秒级别数值为孤立使用数据。以孤立使用数据中的任意一个作为圆心,以M为半径,得到圆图,且重复上述目标圆图的获取过程。例如,以点8为圆心做圆,得到的圆图覆盖有点7、点8、点9以及点10,因此该圆图可以作为目标圆图。As shown in Figure 6(d), in the process of determining the first time period, points 7, 8, 9, and 10 are not used as the center of the circle, so the four second-level values are isolated use data. Take any one of the isolated use data as the center of the circle and M as the radius to obtain a circular diagram, and repeat the above target circular diagram acquisition process. For example, take point 8 as the center of the circle, and the obtained circular diagram covers points 7, 8, 9, and 10, so this circular diagram can be used as the target circular diagram.
如图6(e)所示,分别以7、点9以及点10为圆心做圆,以点9和点10为圆心做圆得到的圆图均可以作为目标圆图,以点7为圆心得到的圆图不能作为目标圆图。根据点7、点8、点9以及点10该四个使用数据对应的秒级别数值中的最大值和最小值,得到第二时间段,第二时间段为12:00:00至12:02:23。As shown in Figure 6(e), circles are drawn with points 7, 9 and 10 as the center, and the circles drawn with points 9 and 10 as the center can all be used as target circles, while the circle drawn with point 7 as the center cannot be used as the target circle. According to the maximum and minimum values of the second-level values corresponding to the four usage data of points 7, 8, 9 and 10, the second time period is obtained, which is from 12:00:00 to 12:02:23.
图7为本申请实施例提供的聚类算法的过程示意图二。如图7所示,该过程包括以下步骤:FIG7 is a second schematic diagram of the process of the clustering algorithm provided in the embodiment of the present application. As shown in FIG7 , the process includes the following steps:
如图7(a)所示,分别以点1至点10中的每个点为圆心,以M为半径做圆,得到十个圆图。As shown in FIG7(a), ten circular diagrams are obtained by taking each point from point 1 to point 10 as the center and M as the radius.
如图7(b)所示,分别确定该十个圆图覆盖的使用数据的个数是否大于或等于N。若是,则将该圆图作为目标圆图。以点2、点6、点4、点8、点9以及点10为圆心得到的圆图为目标圆图。相交的目标圆图的集合作为密度可达圆图,例如,以点2、点6以及点4为圆心得到的圆图的总和为密度可达圆图,以点8、点9以及点10为圆心得到的圆图的总和为密度可达圆图。每个密度可达圆图覆盖的使用数据为一簇使用数据,该簇使用数据包括的时间点为多个目标时间点。分别根据该两簇使用数据中每簇使用数据包括的多个目标时间点,可以确定两个时间段。具体地,可以根据以点2、点6以及点4为圆心得到的密度可达圆图,得到第一时间段;根据以点8、点9以及点10为圆心得到的密度可达圆图,得到第二时间段。根据多个目标时间点得到时间段的过程与图6(c)所示的过程类似,在此不再赘述。As shown in FIG7(b), determine whether the number of usage data covered by the ten circular graphs is greater than or equal to N. If so, the circular graph is used as the target circular graph. The circular graph obtained with point 2, point 6, point 4, point 8, point 9 and point 10 as the center is the target circular graph. The set of intersecting target circular graphs is used as a density reachable circular graph. For example, the sum of the circular graphs obtained with point 2, point 6 and point 4 as the center is the density reachable circular graph, and the sum of the circular graphs obtained with point 8, point 9 and point 10 as the center is the density reachable circular graph. The usage data covered by each density reachable circular graph is a cluster of usage data, and the time points included in the cluster of usage data are multiple target time points. Two time periods can be determined according to the multiple target time points included in each cluster of usage data in the two clusters of usage data. Specifically, the first time period can be obtained according to the density reachable circular graph obtained with point 2, point 6 and point 4 as the center; the second time period can be obtained according to the density reachable circular graph obtained with point 8, point 9 and point 10 as the center. The process of obtaining a time period according to multiple target time points is similar to the process shown in FIG6( c ), and will not be described in detail here.
终端设备可以在上述第一时间段和第二时间段内进行支付服务的服务推荐算法的条件判断,也可以计算第一时间段和第二时间段的置信度,进一步选择目标时间段进行支付服务的服务推荐算法的条件判断,此处不再赘述。The terminal device can perform conditional judgment of the service recommendation algorithm of the payment service within the above-mentioned first time period and second time period, and can also calculate the confidence of the first time period and the second time period, and further select the target time period to perform conditional judgment of the service recommendation algorithm of the payment service, which will not be repeated here.
示例二,根据时间信息和地理信息进行聚类Example 2: Clustering based on time and geographic information
当多条使用数据包括多个时间点和多个地理坐标时,数据处理设备可以采集目标用户在2022/04/06-2022/04/13历史时间段内使用支付服务的使用数据,使用数据的个数为10,且该十个使用数据分别用点1至点10表示。每个使用数据包含一个时间点和一个地理坐标。示例性地,点1对应的使用数据包含的时间点可以为2022/04/06 08:00:03,包含的地理坐标可以为(100,90);点2对应的使用数据包含的时间点可以为2022/04/07 08:01:03,包含的地理坐标可以为(101,90),其他点类似,此处不再一一列举。When multiple usage data include multiple time points and multiple geographic coordinates, the data processing device can collect the usage data of the target user using the payment service in the historical time period of 2022/04/06-2022/04/13. The number of usage data is 10, and the ten usage data are represented by points 1 to 10 respectively. Each usage data contains a time point and a geographic coordinate. Exemplarily, the time point included in the usage data corresponding to point 1 may be 2022/04/06 08:00:03, and the included geographic coordinates may be (100,90); the time point included in the usage data corresponding to point 2 may be 2022/04/07 08:01:03, and the included geographic coordinates may be (101,90). Other points are similar and are not listed here one by one.
根据十个时间点中包含的小时、分钟以及秒的信息,将该十个时间点分别转换为秒级别数值。时间点2022/04/06 08:00:03的秒级别数值为28803,时间点2022/04/07 08:01:03的秒级别数值为28863。具体的转换方式与过程700中的实现方式类似,在此不再赘述。According to the information of hours, minutes and seconds contained in the ten time points, the ten time points are converted into second-level values. The second-level value of the time point 2022/04/06 08:00:03 is 28803, and the second-level value of the time point 2022/04/07 08:01:03 is 28863. The specific conversion method is similar to the implementation method in process 700, which will not be repeated here.
确定聚类算法中的两个模型参数:预设支付事件最少个数N和预设目标距离最大差值(M),将该十个使用数据进行聚类,得到触发信息,得到至少一个时间段和至少一个地理区域。Determine two model parameters in the clustering algorithm: the preset minimum number of payment events N and the preset maximum difference in target distance (M), cluster the ten usage data, obtain trigger information, and obtain at least one time period and at least one geographical area.
本申请实施例的聚类过程如下所示:The clustering process of the embodiment of the present application is as follows:
计算每两个地理坐标之间的距离。例如,点1对应的使用数据和点2对应的使用数据之间包含的地理坐标之间的距离为坐标(101,90)与坐标(100,90)之间的距离,该距离为1。计算每两个秒级别数值之间的差值,该差值作为时间点之间的差值。第一使用数据和第二使用数据之间包含的时间点之间的差值为28863与28803之间的差值,该差值为60。距离和差值的个数均为45个,且两者之间一一对应,即每两个使用数据的时间点之间的差值和该两个使用数据的地理坐标之间的距离对应。例如,对于点1对应的使用数据和点2对应的使用数据之间包含的地理坐标之间的距离为1,包含的时间点之间的差值为60,则该距离1和该差值60对应。Calculate the distance between every two geographic coordinates. For example, the distance between the geographic coordinates contained in the usage data corresponding to point 1 and the usage data corresponding to point 2 is the distance between the coordinates (101,90) and the coordinates (100,90), which is 1. Calculate the difference between every two second-level values, and use the difference as the difference between the time points. The difference between the time points contained in the first usage data and the second usage data is the difference between 28863 and 28803, which is 60. The number of distances and differences is 45, and there is a one-to-one correspondence between the two, that is, the difference between the time points of every two usage data corresponds to the distance between the geographic coordinates of the two usage data. For example, if the distance between the geographic coordinates contained in the usage data corresponding to point 1 and the usage data corresponding to point 2 is 1, and the difference between the time points contained is 60, then the distance 1 corresponds to the difference 60.
将每两个地理坐标之间的距离去量纲化,得到去量纲距离。去量纲距离通过公式计算得到。假设上述45个距离中最大值为9,最小值为0,点1对应的使用数据和点2对应的使用数据包括的地理坐标之间的距离为1,在去量纲化后得到的点1和点2之间的去量纲距离为1/9。将每两个时间点之间的差值去量纲化,得到去量纲差值。去量纲差值通过公式计算得到。假设上述45个差值中最大值为100,最小值为20,则点1对应的使用数据和点2对应的使用数据包括的时间点之间的差值为60,在去量纲化后得到的点1和点2之间的去量纲差值为0.5。De-dimensionalize the distance between each two geographic coordinates to obtain the dimensionless distance. The dimensionless distance is calculated by the formula Calculated. Assuming that the maximum value of the above 45 distances is 9 and the minimum value is 0, the distance between the geographic coordinates of the usage data corresponding to point 1 and the usage data corresponding to point 2 is 1, and the dimensionless distance between point 1 and point 2 after dimensionless is 1/9. Dedimensionalize the difference between each two time points to obtain the dimensionless difference. The dimensionless difference is calculated by the formula Assuming that the maximum value of the above 45 differences is 100 and the minimum value is 20, the difference between the time points included in the usage data corresponding to point 1 and the usage data corresponding to point 2 is 60, and the dimensionless difference between point 1 and point 2 obtained after dimensionless is 0.5.
计算每两个使用数据的之间的聚类度量值。聚类度量值可以通过以下公式计算得到:D=α*Gr+β*Tr。假设,α为0.2,β为0.8,则点1对应的使用数据和点2对应的使用数据之间的聚类度量值为0.42。每两个使用数据之间均得到一个聚类度量值。Calculate the clustering metric between every two usage data. The clustering metric can be calculated by the following formula: D = α*G r + β*T r . Assume that α is 0.2 and β is 0.8, then the clustering metric between the usage data corresponding to point 1 and the usage data corresponding to point 2 is 0.42. A clustering metric is obtained between every two usage data.
假设聚类算法中的模型参数N=3,M=0.6,对根据上述十个使用数据进行聚类。Assuming that the model parameters in the clustering algorithm are N=3, M=0.6, clustering is performed based on the above ten usage data.
在一种可能的实现方式中,参照图6,选择十个点中任一点为圆心,以M为半径做圆,通过确定圆图覆盖的使用数据的个数是否大于或者等于N确定该圆图是否为目标圆图。接着,根据目标圆图覆盖的使用数据包含的目标时间点和目标地理坐标,确定至少一个时间段和至少一个地理区域。In a possible implementation, referring to FIG6 , any one of the ten points is selected as the center of a circle, and a circle is drawn with M as the radius, and whether the circle is a target circle is determined by determining whether the number of usage data covered by the circle is greater than or equal to N. Next, at least one time period and at least one geographical area are determined according to the target time point and target geographical coordinates included in the usage data covered by the target circle.
在另一种可能的实现方式中,参照图7,分别以十个时间点中的每个点为圆心,以M为半径做圆,得到十个圆图。再以相同的方法确定目标圆图和密度可达圆图。然后,分别根据每个密度可达圆图覆盖的使用数据包括的目标时间点和目标地理坐标,得到至少一个时间段和至少一个地理区域。In another possible implementation, referring to FIG. 7 , ten circular graphs are obtained by taking each of the ten time points as the center and M as the radius. The target circular graph and the density reachable circular graph are determined in the same way. Then, at least one time period and at least one geographical area are obtained according to the target time point and the target geographical coordinates included in the usage data covered by each density reachable circular graph.
终端设备可以在上述至少一个时间段内和至少一个地理区域内进行支付服务的服务推荐算法的条件判断,也可以计算至少一个时间段中每个时间段的置信度,进一步选择至少一个目标时间段,在至少一个目标时间段内和至少一个地理区域内进行支付服务的服务推荐算法的条件判断,此处不再赘述。The terminal device can perform conditional judgment of the service recommendation algorithm for the payment service within the above-mentioned at least one time period and at least one geographical area, and can also calculate the confidence of each time period in at least one time period, further select at least one target time period, and perform conditional judgment of the service recommendation algorithm for the payment service within at least one target time period and at least one geographical area, which will not be repeated here.
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
上文结合图3至图7,详细描述了本申请实施例的用于推荐服务的方法,下面将结合图8和图9,详细描述本申请实施例的用于推荐服务的装置。The above describes in detail the method for recommending services in an embodiment of the present application in combination with Figures 3 to 7. The following will describe in detail the device for recommending services in an embodiment of the present application in combination with Figures 8 and 9.
图8为本申请实施例提供的用于推荐服务的装置800的结构示意图。如图8所示,该装置800包括:采集模块801和处理模块802。Fig. 8 is a schematic diagram of the structure of an apparatus 800 for recommending services provided in an embodiment of the present application. As shown in Fig. 8 , the apparatus 800 includes: a collection module 801 and a processing module 802 .
在一种可能的实现方式中,该装置800用于实现上述方法300中数据处理设备对应的步骤。In a possible implementation, the apparatus 800 is used to implement the steps corresponding to the data processing device in the above method 300.
采集模块801,用于采集第一历史时间段内目标用户对目标服务的多条使用数据,多条使用数据包括多个时间点;A collection module 801 is used to collect multiple usage data of a target user for a target service in a first historical time period, where the multiple usage data include multiple time points;
处理模块802,用于确定多个时间点中每两个时间点之间的差值;基于差值,对多条使用数据进行聚类,得到至少一簇使用数据,至少一簇使用数据中的每簇使用数据包括多个目标时间点;基于至少一簇使用数据,确定至少一个目标时间段,以便终端设备在至少一个目标时间段内进行目标服务的服务推荐算法的条件判断。Processing module 802 is used to determine the difference between every two time points among multiple time points; based on the difference, cluster multiple usage data to obtain at least one cluster of usage data, each cluster of usage data in at least one cluster of usage data includes multiple target time points; based on at least one cluster of usage data, determine at least one target time period so that the terminal device performs conditional judgment of the service recommendation algorithm for the target service within at least one target time period.
可选地,处理模块802具体用于:分别基于每簇使用数据所包括的多个目标时间点,确定至少一个时间段;分别根据第一历史时间段对应的天数信息和至少一个时间段中每个时间段包括的目标时间点的个数,确定每个时间段的置信度;确定每个时间段的置信度是否大于或等于第一预设阈值;在至少一个时间段中存在第一时间段的置信度大于或等于第一预设阈值的情况下,将第一时间段确定为目标时间段。Optionally, the processing module 802 is specifically used to: determine at least one time period based on multiple target time points included in each cluster of usage data; determine the confidence of each time period based on the number of days information corresponding to the first historical time period and the number of target time points included in each time period in at least one time period; determine whether the confidence of each time period is greater than or equal to a first preset threshold; if there is a first time period in at least one time period whose confidence is greater than or equal to the first preset threshold, determine the first time period as the target time period.
可选地,至少一个时间段中的第二时间段的置信度通过以下公式确定:Optionally, the confidence level of the second time period in at least one time period is determined by the following formula:
其中,Z为置信度,Q为天数信息对应的天数值,Yi为将天数信息划分为n段天数信息中的第i段天数信息对应的天数值,Y1+Y2+...+Yn=Q,Xi为第i段天数信息在第二时间段内所包括的时间点的个数,i∈{1,2,…n},ωi为第i段天数信息在第二时间段内所包括的时间点的权重,ω1+ω2+…+ωn=1。Among them, Z is the confidence, Q is the day value corresponding to the day information, Yi is the day value corresponding to the i-th section of day information among the n sections of day information divided into the day information, Y1 + Y2 +...+ Yn =Q, Xi is the number of time points included in the i-th section of day information in the second time period, i∈{1,2,…n}, ωi is the weight of the time points included in the i-th section of day information in the second time period, ω1 + ω2 +…+ ωn =1.
可选地,处理模块802具体用于:基于至少一簇使用数据中的每簇使用数据包括的多个目标时间点中的最大值和最小值,确定至少一个时间段。Optionally, the processing module 802 is specifically configured to: determine at least one time period based on a maximum value and a minimum value among a plurality of target time points included in each cluster of usage data in at least one cluster of usage data.
可选地,多条使用数据还包括多个地理坐标,每簇使用数据还包括多个目标地理坐标;处理模块802还用于:计算多个地理坐标中每两个地理坐标之间的距离;根据距离和差值,确定多条使用数据中每两条使用数据之间的聚类度量值;基于聚类度量值,对多条使用数据进行聚类,得到至少一簇使用数据;基于至少一簇使用数据,确定至少一个目标时间段和至少一个地理区域,以便终端设备在至少一个目标时间段内和至少一个地理区域内进行目标服务的服务推荐算法的条件判断。Optionally, the multiple usage data also include multiple geographic coordinates, and each cluster of usage data also includes multiple target geographic coordinates; the processing module 802 is also used to: calculate the distance between every two geographic coordinates in the multiple geographic coordinates; determine the clustering measurement value between every two usage data in the multiple usage data based on the distance and the difference; cluster the multiple usage data based on the clustering measurement value to obtain at least one cluster of usage data; based on at least one cluster of usage data, determine at least one target time period and at least one geographic area, so that the terminal device performs conditional judgment of the service recommendation algorithm for the target service within at least one target time period and at least one geographic area.
可选地,处理模块802具体用于:获取每两个地理坐标之间的距离中的第一最大值和第一最小值;根据第一最大值、第一最小值以及每两个地理坐标之间的距离,确定每两个地理坐标之间的去量纲距离;获取每两个时间点之间的差值中的第二最大值和第二最小值;根据第二最大值、第二最小值以及每两个时间点之间的差值,确定每两个时间点之间的去量纲差值;根据每两个地理坐标之间的去量纲距离和每两个时间点之间的去量纲差值,确定每两条使用数据之间的聚类度量值。Optionally, the processing module 802 is specifically used to: obtain the first maximum value and the first minimum value in the distance between every two geographic coordinates; determine the dimensionless distance between every two geographic coordinates based on the first maximum value, the first minimum value and the distance between every two geographic coordinates; obtain the second maximum value and the second minimum value in the difference between every two time points; determine the dimensionless difference between every two time points based on the second maximum value, the second minimum value and the difference between every two time points; determine the clustering measure between every two usage data based on the dimensionless distance between every two geographic coordinates and the dimensionless difference between every two time points.
可选地,每两个地理坐标之间的去量纲距离通过以下公式确定:其中,Gr为去量纲距离,Gi为每两个地理坐标之间的距离,Gmax为第一最大值,Gmin为第一最小值。Optionally, the dimensionless distance between each two geographic coordinates is determined by the following formula: Among them, Gr is the dimensionless distance, Gi is the distance between every two geographic coordinates, Gmax is the first maximum value, and Gmin is the first minimum value.
可选地,每两个时间点之间的去量纲差值通过以下公式确定:其中,Tr为去量纲差值,Ti为每两个时间点之间的差值,Tmax为第二最大值,Tmin为第二最小值。Optionally, the dimensionless difference between each two time points is determined by the following formula: Wherein, Tr is the dimensionless difference, Ti is the difference between every two time points, Tmax is the second maximum value, and Tmin is the second minimum value.
可选地,处理模块802具体用于:根据至少一簇使用数据中每簇使用数据包括的多个目标地理坐标中的最大经度、最大纬度、最小经度以及最小纬度,确定至少一个地理区域。Optionally, the processing module 802 is specifically configured to determine at least one geographic area according to a maximum longitude, a maximum latitude, a minimum longitude, and a minimum latitude in a plurality of target geographic coordinates included in each cluster of usage data in at least one cluster of usage data.
可选地,处理模块802具体用于:根据多个时间点中包含的小时、分钟和秒的信息,将多个时间点中的每个时间点转换为秒级别数值;将每两个时间点对应的秒级别数值之间的差值,确定为每两个时间点之间的差值。Optionally, the processing module 802 is specifically used to: convert each of the multiple time points into a second-level value based on the information of hours, minutes and seconds contained in the multiple time points; and determine the difference between the second-level values corresponding to every two time points as the difference between every two time points.
应理解,这里的装置800以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选的例子中,本领域技术人员可以理解,装置800可以具体为上述实施例中的数据处理设备,装置800可以用于执行上述方法实施例中与数据处理设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the device 800 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and/or other suitable components that support the described functions. In an optional example, those skilled in the art can understand that the device 800 can be specifically a data processing device in the above-mentioned embodiment, and the device 800 can be used to execute the various processes and/or steps corresponding to the data processing device in the above-mentioned method embodiment. To avoid repetition, it will not be repeated here.
上述装置800具有实现上述方法中数据处理设备执行的相应步骤的功能;上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。例如,上述处理模块802可以包括确定模块和聚类模块,该确定模块可以用于实现上述处理模块对应的用于执行确定动作的各个步骤和/或流程,该聚类模块可以用于实现上述处理模块对应的用于执行聚类动作的各个步骤和/或流程。The above-mentioned device 800 has the function of implementing the corresponding steps executed by the data processing device in the above-mentioned method; the above-mentioned function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. For example, the above-mentioned processing module 802 may include a determination module and a clustering module, the determination module can be used to implement the various steps and/or processes for performing the determination action corresponding to the above-mentioned processing module, and the clustering module can be used to implement the various steps and/or processes for performing the clustering action corresponding to the above-mentioned processing module.
在本申请的实施例,图8中的装置800也可以是芯片,例如:SOC。对应地,处理模块802可以是该芯片的收发电路,在此不做限定。In the embodiment of the present application, the device 800 in Fig. 8 may also be a chip, such as a SOC. Correspondingly, the processing module 802 may be a transceiver circuit of the chip, which is not limited here.
图9示出了本申请实施例提供的另一种用于推荐服务的装置900的结构示意图。该装置900包括处理器901、收发器902和存储器903。其中,处理器901、收发器902和存储器903通过内部连接通路互相通信,该存储器903用于存储指令,该处理器901用于执行该存储器903存储的指令,以控制该收发器902发送信号和/或接收信号。9 shows a schematic diagram of the structure of another device 900 for recommending services provided in an embodiment of the present application. The device 900 includes a processor 901, a transceiver 902, and a memory 903. The processor 901, the transceiver 902, and the memory 903 communicate with each other through an internal connection path, the memory 903 is used to store instructions, and the processor 901 is used to execute the instructions stored in the memory 903 to control the transceiver 902 to send and/or receive signals.
应理解,装置900可以具体为上述实施例中的数据处理设备,并且可以用于执行上述方法实施例中与数据处理设备对应的各个步骤和/或流程。可选地,该存储器903可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器901可以用于执行存储器中存储的指令,并且当该处理器901执行存储器中存储的指令时,该处理器901用于执行上述方法实施例的各个步骤和/或流程。该收发器902可以包括发射器和接收器,该发射器可以用于实现上述收发器对应的用于执行发送动作的各个步骤和/或流程,该接收器可以用于实现上述收发器对应的用于执行接收动作的各个步骤和/或流程。It should be understood that the device 900 can be specifically a data processing device in the above-mentioned embodiment, and can be used to execute the various steps and/or processes corresponding to the data processing device in the above-mentioned method embodiment. Optionally, the memory 903 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 901 may be used to execute instructions stored in the memory, and when the processor 901 executes the instructions stored in the memory, the processor 901 is used to execute the various steps and/or processes of the above-mentioned method embodiment. The transceiver 902 may include a transmitter and a receiver, the transmitter may be used to implement the various steps and/or processes corresponding to the above-mentioned transceiver for performing the sending action, and the receiver may be used to implement the various steps and/or processes corresponding to the above-mentioned transceiver for performing the receiving action.
应理解,在本申请实施例中,该处理器可以是中央处理单元(central processingunit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
本申请还提供了一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,该计算机程序用于实现上述方法实施例中所示的方法。The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method shown in the above method embodiment.
本申请还提供了一种计算机程序产品,该计算机程序产品包括计算机程序(也可以称为代码,或指令),当该计算机程序在计算机上运行时,该计算机可以执行上述方法实施例所示的方法。The present application also provides a computer program product, which includes a computer program (also referred to as code or instruction). When the computer program runs on a computer, the computer can execute the method shown in the above method embodiment.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
以上所述,仅为本申请的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应所述以权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present application, which should be included in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.
Claims (19)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211078749.9A CN116738033B (en) | 2022-09-05 | 2022-09-05 | Method and device for recommending service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211078749.9A CN116738033B (en) | 2022-09-05 | 2022-09-05 | Method and device for recommending service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116738033A CN116738033A (en) | 2023-09-12 |
CN116738033B true CN116738033B (en) | 2024-06-25 |
Family
ID=87906689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211078749.9A Active CN116738033B (en) | 2022-09-05 | 2022-09-05 | Method and device for recommending service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116738033B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677378A (en) * | 2014-11-20 | 2016-06-15 | 华为终端(东莞)有限公司 | Application management method and mobile terminal |
CN113615217A (en) * | 2019-03-25 | 2021-11-05 | 华为技术有限公司 | Method for determining that terminal equipment is located inside geo-fence and terminal equipment |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7974456B2 (en) * | 2006-09-05 | 2011-07-05 | Drvision Technologies Llc | Spatial-temporal regulation method for robust model estimation |
US20150269150A1 (en) * | 2014-03-19 | 2015-09-24 | International Business Machines Corporation | Service location recommendations using predictive analysis |
KR102384215B1 (en) * | 2017-08-01 | 2022-04-07 | 삼성전자주식회사 | Electronic apparatus and controlling method thereof |
CN111466125A (en) * | 2018-08-03 | 2020-07-28 | 华为技术有限公司 | Service push method and terminal |
CN111612499B (en) * | 2020-04-03 | 2023-07-28 | 浙江口碑网络技术有限公司 | Information pushing method and device, storage medium and terminal |
CN114322218B (en) * | 2021-11-18 | 2025-06-27 | 海信家电集团股份有限公司 | Method for recommending start time of air conditioner and air conditioner |
CN114186138A (en) * | 2021-12-23 | 2022-03-15 | 上海二三四五网络科技有限公司 | Hot game hybrid recommendation method and device based on user clustering and time context |
CN114219540B (en) * | 2021-12-28 | 2025-05-13 | 中国工商银行股份有限公司 | Method and device for determining user behavior cycle, electronic device and storage medium |
CN114880094A (en) * | 2022-05-09 | 2022-08-09 | 上海七十迈数字科技有限公司 | Application recommendation method and device based on wearable device |
-
2022
- 2022-09-05 CN CN202211078749.9A patent/CN116738033B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677378A (en) * | 2014-11-20 | 2016-06-15 | 华为终端(东莞)有限公司 | Application management method and mobile terminal |
CN113615217A (en) * | 2019-03-25 | 2021-11-05 | 华为技术有限公司 | Method for determining that terminal equipment is located inside geo-fence and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN116738033A (en) | 2023-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113163470B (en) | Method for identifying specific position on specific route and electronic equipment | |
WO2020151387A1 (en) | Recommendation method based on user exercise state, and electronic device | |
CN110022403A (en) | Terminal charge based reminding method, device, equipment and storage medium | |
WO2020259649A1 (en) | Bluetooth-based object searching method and electronic device | |
CN112651510B (en) | Model updating method, working node and model updating system | |
CN115798390B (en) | Screen display method and terminal equipment | |
WO2022022319A1 (en) | Image processing method, electronic device, image processing system and chip system | |
CN114444000A (en) | Method, apparatus, electronic device and readable storage medium for generating page layout file | |
CN116070035B (en) | Data processing methods and electronic equipment | |
CN115964231A (en) | Load model-based assessment method and device | |
CN116738033B (en) | Method and device for recommending service | |
CN116232959A (en) | Network quality detection method and device | |
CN114812381B (en) | Positioning method of electronic equipment and electronic equipment | |
CN118072723A (en) | Cooperative awakening method, device and electronic device | |
WO2023109636A1 (en) | Application card display method and apparatus, terminal device, and readable storage medium | |
CN118689425A (en) | Image synthesis method, device and electronic device | |
CN115437601A (en) | Image sorting method, electronic device, program product and medium | |
CN115297530B (en) | Network connection method and device | |
CN115880198B (en) | Image processing method and device | |
CN116703741B (en) | Image contrast generation method and device and electronic equipment | |
CN116382728B (en) | Propagation name display method and terminal equipment | |
CN117133311B (en) | Audio scene recognition method and electronic device | |
CN116095223B (en) | Notification display method and terminal device | |
CN115619628B (en) | Image processing method and terminal equipment | |
CN115695636B (en) | Intelligent voice interaction method and electronic equipment |
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 |