Movatterモバイル変換


[0]ホーム

URL:


CN116320141B - Recommended punch-in methods, electronic devices and computer-readable storage media - Google Patents

Recommended punch-in methods, electronic devices and computer-readable storage media
Download PDF

Info

Publication number
CN116320141B
CN116320141BCN202310588506.8ACN202310588506ACN116320141BCN 116320141 BCN116320141 BCN 116320141BCN 202310588506 ACN202310588506 ACN 202310588506ACN 116320141 BCN116320141 BCN 116320141B
Authority
CN
China
Prior art keywords
check
period
time
electronic device
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310588506.8A
Other languages
Chinese (zh)
Other versions
CN116320141A (en
Inventor
邹孝坤
李宏杰
黄坚毅
黄桂武
杨凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co LtdfiledCriticalHonor Device Co Ltd
Priority to CN202310588506.8ApriorityCriticalpatent/CN116320141B/en
Publication of CN116320141ApublicationCriticalpatent/CN116320141A/en
Application grantedgrantedCritical
Publication of CN116320141BpublicationCriticalpatent/CN116320141B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application provides a method for recommending card punching, electronic equipment and a computer readable storage medium. The method for recommending the card punching comprises the following steps: determining the card punching probability of each time period in a preset time range according to the current scene and historical data, wherein the historical data comprises time and scene of detecting card punching of a user in the historical time period, the scene comprises date information and position information, and the date information comprises any one or more of information of whether the date is a working day, ordering information in the working day and month information. And displaying the card punching recommendation information on a display interface of the electronic equipment under the condition that the electronic equipment is detected to be positioned in a preset position range and the card punching probability of the current period is larger than a first threshold value. According to the method, the device and the system, the card punching habit of the user is counted from multiple dimensions according to scenes, the card punching probability under each scene can be accurately identified, the time period of going to work and the time period of going from work are not required to be designated, the card punching of the user can be recommended in the time period meeting the condition of recommending card punching, and the personalized requirements of the user are met.

Description

Translated fromChinese
推荐打卡的方法、电子设备及计算机可读存储介质Recommended punch-in methods, electronic devices and computer-readable storage media

技术领域Technical field

本申请涉及移动终端应用领域,尤其涉及一种推荐打卡的方法、电子设备及计算机可读存储介质。The present application relates to the field of mobile terminal applications, and in particular to a method for recommending check-in, electronic equipment and computer-readable storage media.

背景技术Background technique

打卡软件是目前常见的考勤软件,在用户上下班的时间,电子设备提示用户进行打卡,可以帮助用户及时打卡,避免遗漏打卡所造成的不便。Punch-in software is currently a common attendance software. When the user is commuting to and from get off work, the electronic device prompts the user to clock in, which can help the user clock in in time and avoid the inconvenience caused by missing the clock.

现有的电子设备提示打卡的方法一般需要人为指定上班时间和下班时间,电子设备在确定达到上班时间或下班时间时,提示用户打卡。但是,用户每天的工作规律不同,在指定的时间提示用户打卡,会造成提醒延迟或者提醒无效的情况,无法满足用户的个性化需求。Existing methods of prompting clock-in by electronic devices generally require humans to specify working hours and off-duty hours. When the electronic device determines that the working time or off-duty time is reached, the user is prompted to clock in. However, users have different work patterns every day. Prompting users to clock in at a specified time will cause reminder delays or invalid reminders, which cannot meet the personalized needs of users.

发明内容Contents of the invention

本申请提供一种推荐打卡的方法、电子设备及计算机可读存储介质,解决了现有提示打卡的方法中无法满足用户的个性化需求的问题。This application provides a method, electronic device, and computer-readable storage medium for recommending a check-in, which solves the problem that the existing method of prompting for a check-in cannot meet the personalized needs of users.

为达到上述目的,本申请采用如下技术方案:In order to achieve the above purpose, this application adopts the following technical solutions:

第一方面,提供一种推荐打卡的方法,应用于电子设备,包括:The first aspect is to provide a recommended check-in method, which can be applied to electronic devices, including:

根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,所述历史数据包括在历史时段检测到用户打卡的时间和场景,所述场景包括日期信息以及位置信息,所述日期信息包括是否是工作日的信息、在工作日中的排序信息、月份信息中的任意一项或多项;Determine the check-in probability for each period within the preset time range based on the current scene and historical data. The historical data includes the time and scene when the user's check-in is detected in the historical period. The scene includes date information and location information. The date The information includes any one or more of information on whether it is a working day, sorting information on working days, and month information;

在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在所述电子设备的显示界面上显示打卡推荐信息。When it is detected that the electronic device is located within the preset location range and the check-in probability in the current period is greater than the first threshold, check-in recommendation information is displayed on the display interface of the electronic device.

上述实施例中,根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,在检测到电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,电子设备的显示界面显示打卡推荐信息。因此,在满足打卡概率的情况下均可以推荐打卡,用户不用指定上班时段和下班时段。同时,由于历史数据包括历史时段检测到用户打卡的时间和场景,场景包括位置信息以及是否是工作日的信息、在工作日中的排序信息、月份信息,因此可以从多个维度统计用户的打卡习惯,从而可以更加准确地识别用户在各场景下的打卡概率,在合适的时段推荐用户打卡,满足用户的个性化需求。In the above embodiment, the check-in probability of each period within the preset time range is determined based on the current scene and historical data. When the electronic device is detected to be within the preset location range and the check-in probability of the current period is greater than the first threshold , the display interface of the electronic device displays check-in recommendation information. Therefore, clocking in can be recommended as long as the probability of clocking in is met, and users do not need to specify working hours and off-duty hours. At the same time, since the historical data includes the time and scene when the user clocked in was detected in the historical period, the scene includes location information, information about whether it is a working day, sorting information in the working day, and month information, so the user's clocking in can be counted from multiple dimensions. habits, so that it can more accurately identify the user's check-in probability in various scenarios, and recommend users to check-in at the appropriate time period to meet the user's personalized needs.

在一实施例中,所述根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,包括:将当前的场景输入预测模型,得到所述预测模型输出的预设时间范围内每个时段的打卡概率,所述预测模型由所述历史数据训练得到。通过预测模型确定预设时间范围内每个时段的打卡概率,可以提高得到的打卡概率的准确度。In one embodiment, determining the check-in probability for each period within a preset time range based on the current scene and historical data includes: inputting the current scene into a prediction model to obtain the preset time range output by the prediction model. The probability of checking in for each period, the prediction model is trained by the historical data. By determining the check-in probability for each period within the preset time range through a prediction model, the accuracy of the obtained check-in probability can be improved.

在一实施例中,在所述将当前的场景输入预测模型之前,所述方法还包括:根据所述历史数据生成数据样本,每个所述数据样本包括一天中各时间间隔对应的标签以及场景,所述标签的值根据所述用户每天打卡的时间确定;根据所述数据样本对分类模型进行训练,得到预测模型。In one embodiment, before inputting the current scene into the prediction model, the method further includes: generating data samples according to the historical data, each of the data samples including labels and scenes corresponding to each time interval in a day. , the value of the label is determined according to the time the user checks in every day; the classification model is trained according to the data sample to obtain a prediction model.

上述实施例中,通过将每天的时间划分为等距离的多个时间间隔来进行样本构建,并进行模型训练,后续根据当天的场景输出各时段对应的打卡概率,可以在满足第一阈值,且满足位置要求的情况下进行打卡推荐,即只在一天中的一些时段进行打卡推荐。由于仅在打卡概率大于第一阈值的时段进行推荐,且对该时段可以一直显示打卡推荐信息,因此可以避免出现打卡推荐信息快速消失或者长期霸屏的问题,提高了用户体验。In the above embodiment, by dividing each day into multiple equidistant time intervals for sample construction and model training, and then outputting the check-in probability corresponding to each period according to the scene of the day, the first threshold can be met, and Check-in recommendations are made when location requirements are met, that is, check-in recommendations are only made during certain periods of the day. Since recommendations are only made during the period when the check-in probability is greater than the first threshold, and the check-in recommendation information can be displayed all the time during this period, it is possible to avoid the problem of the check-in recommendation information quickly disappearing or occupying the screen for a long time, which improves the user experience.

在一实施例中,所述数据样本包括原始数据样本以及增广数据样本,所述原始数据样本根据所述用户打卡的时间确定,所述增广数据样本根据偏移打卡时间确定,所述偏移打卡时间与所述用户打卡的时间之间的间隔为预设偏移时长。通过对原始数据进行数据增广来进行模型训练,可以提高预测模型的稳定性,输出符合用户上下班规律的打卡概率,更好地为用户推荐打卡服务。In one embodiment, the data samples include original data samples and augmented data samples. The original data samples are determined according to the user's clock-in time, the augmented data samples are determined according to the offset clock-in time, and the offset data sample is determined according to the offset clock-in time. The interval between the shifted clock-in time and the user's clock-in time is a preset offset duration. By performing data augmentation on the original data for model training, the stability of the prediction model can be improved, the check-in probability can be outputted in line with the user's commuting rules, and the check-in service can be better recommended for users.

在一实施例中,所述用户打卡的时间处于上班打卡时段或下班打卡时段,所述上班打卡时段对应的预设偏移时长和所述下班打卡时段对应的预设偏移时长不同。由于用户提前上班的次数大于迟到的次数,因此在上班时段向左偏移的时长更长,可以避免在用户提前上班的情况下不推荐用户打卡的情况。用户推迟下班的次数大于早退的次数,因此在下班时段向右偏移的时长更长,可以避免在用户加班的情况下不推荐用户打卡的情况。In one embodiment, the user's clock-in time is in the clock-in period or the clock-out period, and the preset offset duration corresponding to the clock-in period is different from the preset offset duration corresponding to the clock-in period. Since the number of times a user goes to work early is greater than the number of times he or she is late, the shift to the left during work hours is longer, which can avoid the situation where the user is not recommended to clock in when the user goes to work early. The number of times the user delays getting off work is greater than the number of times the user leaves early, so the shift to the right during the off-duty period is longer, which can avoid the situation where the user is not recommended to clock in when the user works overtime.

在一实施例中,在所述根据所述历史数据生成数据样本之前,所述方法还包括:根据所述历史数据确定所述预设偏移时长。根据预设偏移时长确定增广数据样本,可以使增广数据样本与用户的打卡规律相匹配,提高训练得到的预测模型的稳定性。In one embodiment, before generating data samples based on the historical data, the method further includes: determining the preset offset duration based on the historical data. Determining the augmented data samples based on the preset offset duration can match the augmented data samples with the user's check-in rules and improve the stability of the trained prediction model.

在一实施例中,在所述根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率之前,所述方法还包括:根据所述预设时间范围内每个时段的打卡概率确定所述第一阈值。第一阈值为动态阈值,通过设定动态阈值,可以根据用户的上下班时段打卡的时间分布确定合适的阈值,适应不同用户在不同场景下的打卡规律,从而为用户提供个性化的打卡推荐服务,提升用户体验。In one embodiment, before determining the check-in probability of each time period within the preset time range based on the current scene and historical data, the method further includes: based on the check-in probability of each time period within the preset time range. Determine the first threshold. The first threshold is a dynamic threshold. By setting the dynamic threshold, an appropriate threshold can be determined based on the time distribution of the user's clocking in during commuting and work periods, adapting to the clocking in rules of different users in different scenarios, thereby providing users with personalized clocking in recommendation services. , improve user experience.

在一实施例中,在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在所述电子设备的显示界面上显示打卡推荐信息,包括:在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,若在所述当前时段之前的第一时长内未检测到打卡信息,在所述电子设备的显示界面上显示打卡推荐信息,从而可以避免在用户已经完成打卡的情况下重复为用户推荐服务的情况。In one embodiment, when it is detected that the electronic device is located within the preset location range and the punch-in probability in the current period is greater than the first threshold, punch-in recommendation information is displayed on the display interface of the electronic device, including: When it is detected that the electronic device is within the preset location range and the check-in probability of the current period is greater than the first threshold, if no check-in information is detected within the first period of time before the current period, the electronic device The check-in recommendation information is displayed on the display interface of the device, thereby avoiding the situation of repeatedly recommending services to the user when the user has completed the check-in.

在一实施例中,在所述在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在所述电子设备的显示界面上显示打卡推荐信息之后,所述方法还包括:若在第二时长内未检测到打卡信息,在检测到下一时段的打卡概率大于第一阈值,且所述电子设备位于预设位置范围内时,在所述电子设备的显示界面上显示打卡推荐信息,从而在用户未使用推荐服务后提高推荐打卡的频率,进而避免用户在加班的情况下忘记打卡。In one embodiment, when it is detected that the electronic device is located within a preset location range and the check-in probability in the current period is greater than the first threshold, check-in recommendation information is displayed on the display interface of the electronic device After that, the method further includes: if no check-in information is detected within the second period of time, when the check-in probability of the next period is detected to be greater than the first threshold, and the electronic device is located within the preset location range, in the Check-in recommendation information is displayed on the display interface of the electronic device, thereby increasing the frequency of recommended check-ins after the user has not used the recommended service, thereby preventing the user from forgetting to check-in when working overtime.

在一实施例中,所述根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,包括:在满足预设条件时,根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,所述预设条件包括电子设备处于息屏状态、电子设备处于充电状态、当前时间为预设时间、所述电子设备位于预设区域中的任意一项或多项。满足预设条件的情况为电子设备的空闲时间,在空闲时间确定每个时段的打卡概率,可以避免在用户使用手机的过程中计算过程占用电子设备的资源,避免计算过程影响电子设备的响应速度。In one embodiment, determining the check-in probability for each period within the preset time range based on the current scene and historical data includes: when the preset conditions are met, determining the check-in probability within the preset time range based on the current scene and historical data. Check-in probability for each period. The preset conditions include any one or more of the following: the electronic device is in the screen-off state, the electronic device is in the charging state, the current time is the preset time, and the electronic device is located in the preset area. The situation that satisfies the preset conditions is the idle time of the electronic device. Determining the check-in probability for each period during the idle time can avoid the calculation process occupying the resources of the electronic device when the user is using the mobile phone and avoid the calculation process affecting the response speed of the electronic device. .

第二方面,提供一种推荐打卡的装置,应用于电子设备,包括:In the second aspect, a device for recommending punch-in is provided, which can be used in electronic equipment, including:

处理模块,用于根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,所述历史数据包括在历史时段检测到用户打卡的时间和场景,所述场景包括日期信息以及位置信息,所述日期信息包括是否是工作日的信息、在工作日中的排序信息、月份信息中的任意一项或多项;A processing module configured to determine the check-in probability of each period within a preset time range based on the current scene and historical data. The historical data includes the time and scene when the user's check-in is detected in the historical period. The scene includes date information and location. Information, the date information includes any one or more of information on whether it is a working day, sorting information on working days, and month information;

推荐模块,用于在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在所述电子设备的显示界面上显示打卡推荐信息。A recommendation module configured to display check-in recommendation information on the display interface of the electronic device when it is detected that the electronic device is within a preset location range and the check-in probability in the current period is greater than a first threshold.

在一实施例中,处理模块具体用于:In one embodiment, the processing module is specifically used to:

将当前的场景输入预测模型,得到所述预测模型输出的预设时间范围内每个时段的打卡概率,所述预测模型由所述历史数据训练得到。Input the current scene into the prediction model to obtain the check-in probability for each period within the preset time range output by the prediction model. The prediction model is trained by the historical data.

在一实施例中,处理模块还用于:In one embodiment, the processing module is also used to:

根据所述历史数据生成数据样本,每个所述数据样本包括一天中各时间间隔对应的标签以及场景,所述标签的值根据所述用户每天打卡的时间确定;Generate data samples based on the historical data, each data sample includes tags and scenarios corresponding to each time interval in a day, and the value of the tag is determined based on the time the user clocks in every day;

根据所述数据样本对分类模型进行训练,得到预测模型。The classification model is trained according to the data samples to obtain a prediction model.

在一实施例中,所述数据样本包括原始数据样本以及增广数据样本,所述原始数据样本根据所述用户打卡的时间确定,所述增广数据样本根据偏移打卡时间确定,所述偏移打卡时间与所述用户打卡的时间之间的间隔为预设偏移时长。In one embodiment, the data samples include original data samples and augmented data samples. The original data samples are determined according to the user's clock-in time, the augmented data samples are determined according to the offset clock-in time, and the offset data sample is determined according to the offset clock-in time. The interval between the shifted clock-in time and the user's clock-in time is a preset offset duration.

在一实施例中,所述用户打卡的时间处于上班打卡时段或下班打卡时段,所述上班打卡时段对应的预设偏移时长和所述下班打卡时段对应的预设偏移时长不同。In one embodiment, the user's clock-in time is in the clock-in period or the clock-out period, and the preset offset duration corresponding to the clock-in period is different from the preset offset duration corresponding to the clock-in period.

在一实施例中,处理模块还用于:In one embodiment, the processing module is also used to:

根据所述历史数据确定所述预设偏移时长。The preset offset duration is determined based on the historical data.

在一实施例中,处理模块还用于:In one embodiment, the processing module is also used to:

根据所述预设时间范围内每个时段的打卡概率确定所述第一阈值。The first threshold is determined according to the check-in probability of each period within the preset time range.

在一实施例中,推荐模块具体用于:In one embodiment, the recommendation module is specifically used to:

在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,若在所述当前时段之前的第一时长内未检测到打卡信息,在所述电子设备的显示界面上显示打卡推荐信息。When it is detected that the electronic device is within the preset location range and the check-in probability of the current period is greater than the first threshold, if no check-in information is detected within the first period of time before the current period, the electronic device Check-in recommendation information is displayed on the display interface of the device.

在一实施例中,推荐模块还用于:In one embodiment, the recommendation module is also used to:

若在第二时长内未检测到打卡信息,在检测到下一时段的打卡概率大于第一阈值,且所述电子设备位于预设位置范围内时,在所述电子设备的显示界面上显示打卡推荐信息。If no check-in information is detected within the second period of time, when the probability of check-in in the next period is detected to be greater than the first threshold and the electronic device is located within the preset position range, the check-in information is displayed on the display interface of the electronic device. Recommended information.

在一实施例中,处理模块具体用于:In one embodiment, the processing module is specifically used to:

在满足预设条件时,根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,所述预设条件包括电子设备处于息屏状态、电子设备处于充电状态、当前时间为预设时间、所述电子设备位于预设区域中的任意一项或多项。When the preset conditions are met, the check-in probability for each period within the preset time range is determined based on the current scene and historical data. The preset conditions include that the electronic device is in the screen-off state, the electronic device is in the charging state, and the current time is the preset time. Assume that the electronic device is located at any one or more of the preset areas at the time.

第三方面,提供一种电子设备,包括处理器,所述处理器用于执行存储在存储器中的计算机程序,以实现如上述第一方面所述的方法。A third aspect provides an electronic device, including a processor configured to execute a computer program stored in a memory to implement the method described in the first aspect.

第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述的方法。A fourth aspect provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method described in the first aspect is implemented.

第五方面,提供一种芯片,所述芯片包括处理器,所述处理器和存储器耦合,所述处理器执行所述存储器中存储的计算机程序或指令,以实现如上述第一方面所述的方法。In a fifth aspect, a chip is provided. The chip includes a processor. The processor is coupled to a memory. The processor executes computer programs or instructions stored in the memory to implement the method described in the first aspect. method.

第六方面,提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面中所述的方法。A sixth aspect provides a computer program product, which when the computer program product is run on an electronic device, causes the electronic device to execute the method described in the first aspect.

可以理解的是,上述第二方面至第六方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that the beneficial effects of the above-mentioned second to sixth aspects can be referred to the relevant descriptions in the above-mentioned first aspect, and will not be described again here.

附图说明Description of the drawings

图1为本申请实施例提供的一种打卡场景的示意图;Figure 1 is a schematic diagram of a check-in scenario provided by an embodiment of the present application;

图2为本申请一实施例提供的一种推荐打卡的方法的流程示意图;Figure 2 is a schematic flow chart of a method for recommending check-in provided by an embodiment of the present application;

图3为本申请一实施例提供的划分时间间隔的示意图;Figure 3 is a schematic diagram of dividing time intervals provided by an embodiment of the present application;

图4为本申请一实施例提供的上班打卡时段的打卡时间的概率分布图;Figure 4 is a probability distribution diagram of clock-in time during the clock-in period provided by an embodiment of the present application;

图5为本申请一实施例提供的下班打卡时段的打卡时间的概率分布图;Figure 5 is a probability distribution diagram of clock-in time during the clock-in period after work provided by an embodiment of the present application;

图6为本申请一实施例提供的各时段的打卡概率的分布图;Figure 6 is a distribution diagram of check-in probability in each period provided by an embodiment of the present application;

图7为本申请一实施例提供的推荐打卡的场景图;Figure 7 is a scene diagram of recommended check-in provided by an embodiment of the present application;

图8为本申请一实施例提供的推荐打卡的方法的流程图;Figure 8 is a flow chart of a recommended check-in method provided by an embodiment of the present application;

图9为本申请另一实施例提供的推荐打卡的场景图;Figure 9 is a scene diagram of recommended check-in provided by another embodiment of the present application;

图10为本申请另一实施例提供的推荐打卡的方法的流程图;Figure 10 is a flow chart of a recommended check-in method provided by another embodiment of the present application;

图11为本申请一实施例提供的启动推荐打卡的功能的场景图;Figure 11 is a scene diagram of activating the recommended check-in function provided by an embodiment of the present application;

图12为本申请一实施例提供的电子设备的结构示意图;Figure 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图13为本申请一实施例提供的电子设备的软件架构图。Figure 13 is a software architecture diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures and technologies are provided to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.

应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It will be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components but does not exclude one or more other features , the presence or addition of a whole, a step, an operation, an element, a component, and/or a collection thereof.

还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. .

如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. . Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, to mean "once determined" or "in response to a determination" or "once the [described condition or event] is detected ]" or "in response to detection of [the described condition or event]".

另外,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the present application, the terms "first", "second", etc. are only used to differentiate the description and cannot be understood as indicating or implying relative importance.

采用具有打卡功能的软件(例如钉钉®、企业微信®、WeLink等)记录用户的考勤信息是目前常用的考勤方法。例如,如图1中的(a)所示,电子设备在检测到用户打开“考勤打卡”软件的操作时打开考勤打卡软件。在电子设备上运行考勤打卡软件的情况下,若电子设备检测到用户的打卡指令,打开如图1中的(b)所示的打卡页面。在打卡页面,电子设备检测到用户点击“打卡”的操作时,记录打卡时间,将打卡时间作为用户的上班时间或下班时间。Using software with a clock-in function (such as DingTalk®, Enterprise WeChat®, WeLink, etc.) to record users' attendance information is currently a commonly used attendance method. For example, as shown in (a) in Figure 1, the electronic device opens the attendance and clock-in software when it detects the user's operation of opening the "attendance and clock-in" software. When the attendance and clock-in software is running on the electronic device, if the electronic device detects the user's clock-in instruction, the clock-in page shown in (b) in Figure 1 will be opened. On the clock-in page, when the electronic device detects the user's click on "clock-in", the clock-in time is recorded, and the clock-in time is regarded as the user's working time or off-duty time.

在上下班时间,电子设备通过在显示界面上显示打卡推荐信息的形式提醒用户打卡,可以避免用户遗漏打卡。During commuting time, the electronic device reminds users to clock in by displaying clock-in recommendation information on the display interface, which can prevent users from missing clock-in.

现有推荐打卡的方法,一般需要人为划分上班时段和下班时段,电子设备或服务器分别统计上班时段和下班时段的打卡时间,在达到打卡时间时,推荐用户打卡。由于是基于时间规则进行统计,得到的打卡区间较为固定,无法满足不同用户的个性化上下班打卡需求。例如,用户可能在周三、周五下班较早,在其他时段下班较晚,或者用户所在的行业周末有上班需求,固定的打卡区间不能在合适的时段推荐用户打卡。同时,基于上班时段和下班时段的打卡时间进行统计,通常会得到一个很宽或者很窄的时间区间,并且认为在这个区间的打卡概率相同,若在电子设备上显示打卡推荐信息,会造成打卡推荐信息长时间霸屏或者快速消失的问题,影响用户体验。The existing method of recommending clock-in generally requires manually dividing the working time period and the off-duty time period. The electronic device or server separately counts the clocking in time during the working time and the off-duty time. When the clocking in time is reached, the user is recommended to clock in. Since statistics are based on time rules, the punch-in interval obtained is relatively fixed and cannot meet the personalized punch-in needs of different users. For example, a user may get off work early on Wednesdays and Fridays and late at other times, or the user's industry may require work on weekends, and the fixed check-in interval cannot recommend users to check in at the appropriate time. At the same time, statistics based on the clock-in time during work hours and off-duty hours will usually result in a very wide or narrow time interval, and the probability of clock-in within this interval is considered to be the same. If the clock-in recommendation information is displayed on the electronic device, it will cause clock-in time. The problem of recommended information occupying the screen for a long time or disappearing quickly affects the user experience.

为此,本申请提供一种推荐打卡的方法,根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,历史数据包括在历史时段检测到用户打卡的时间和场景,场景包括日期信息以及位置信息,日期信息包括是否是工作日的信息、在工作日中的排序信息、月份信息中的任意一项或多项。在检测到电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,电子设备的显示界面显示打卡推荐信息。因此,在满足打卡概率的情况下均可以推荐打卡,用户不用指定上班时段和下班时段。同时,由于历史数据综合考虑了多个场景特征,因此可以从多个维度统计用户的打卡习惯,从而可以更加准确地识别用户在各场景下的打卡概率,在合适的时段推荐用户打卡,满足用户的个性化需求。To this end, this application provides a method of recommending check-in, which determines the check-in probability for each period within the preset time range based on the current scene and historical data. The historical data includes the time and scene when the user's check-in is detected in the historical period. The scenarios include Date information and location information. The date information includes any one or more of information on whether it is a working day, sorting information on working days, and month information. When it is detected that the electronic device is located within the preset location range and the punch-in probability in the current period is greater than the first threshold, the display interface of the electronic device displays punch-in recommendation information. Therefore, clocking in can be recommended as long as the probability of clocking in is met, and users do not need to specify working hours and off-duty hours. At the same time, because historical data takes into account multiple scene characteristics, users’ check-in habits can be counted from multiple dimensions, thereby more accurately identifying the user’s check-in probability in each scenario, and recommending users to check-in at appropriate times to satisfy users. individual needs.

下面对本申请提供的推荐打卡的方法进行示例性说明。The following is an exemplary description of the recommended check-in method provided by this application.

本申请实施例提供的推荐打卡的方法应用于电子设备,电子设备可以是手机、平板电脑、手持计算机、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、媒体播放器、穿戴设备等可单手握持/操作的设备,本申请实施例对该电子设备的具体形态/类型不作特殊限制。上述电子设备包括但不限于搭载iOS®、Android®、Microsoft®、鸿蒙系统(Harmony OS)或者其他操作系统的设备。The recommended check-in method provided by the embodiment of this application is applied to electronic devices. The electronic devices can be mobile phones, tablet computers, handheld computers, personal digital assistants (personal digital assistants, PDAs), augmented reality (AR)\virtual reality ( Virtual reality (VR) devices, media players, wearable devices and other devices that can be held/operated with one hand. The embodiments of the present application do not place special restrictions on the specific forms/types of such electronic devices. The above-mentioned electronic devices include but are not limited to devices equipped with iOS®, Android®, Microsoft®, Harmony OS or other operating systems.

请参阅附图2,本申请一实施例提供的推荐打卡的方法包括:Please refer to Figure 2. A recommended check-in method provided by an embodiment of the present application includes:

S201:根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,所述历史数据包括在历史时段检测到用户打卡的时间和场景,所述场景包括日期信息以及位置信息,所述日期信息包括是否是工作日的信息、在工作日中的排序信息、月份信息中的任意一项或多项。S201: Determine the check-in probability of each period within the preset time range based on the current scene and historical data. The historical data includes the time and scene when the user's check-in is detected in the historical period. The scene includes date information and location information, so The date information includes any one or more of information on whether it is a working day, sorting information on working days, and month information.

具体地,历史时段可以是过去一个月或者一年,也可以是从用户下载打卡软件到当前时间的时段。历史时段用户打卡的时间可以由电子设备从打卡软件或电子设备上存储的日志信息中获取,历史时段用户打卡的场景可以由电子设备从其他三方软件获取,也可以是电子设备从服务器获取,也可以根据用户的设置信息确定。Specifically, the historical period can be the past month or year, or it can be the period from when the user downloaded the clock-in software to the current time. The time the user clocked in in the historical period can be obtained by the electronic device from the clocking in software or the log information stored on the electronic device. The scene in which the user clocked in in the historical period can be obtained by the electronic device from other third-party software, or the electronic device can obtain it from the server, or It can be determined based on the user's setting information.

示例性地,历史时段的每一天可以是节假日或者工作日,节假日例如包括周六、周日以及其他休假的日期,工作日例如包括周一至周五。历史时段的每一天是否是工作日可以从电子设备的日历应用程序获取,也可以是电子设备通过访问服务器获取,也可以由用户设定,也可以是电子设备根据用户的打卡记录确定。例如,推荐打卡的功能由电子设备上的“智慧空间”(一种功能模块,用于提供推荐服务)提供,电子设备在检测到用户启用“智慧空间”的推荐打卡的功能时,输出确定工作日的提示信息,若检测到用户选择默认工作日的操作,则电子设备从日历应用程序或者通过访问服务器确定用户打卡的时间是否是工作日。若检测到用户选择自定义工作日的操作,则电子设备根据用户设定的工作日确定用户打卡的时间是否是工作日。For example, each day of the historical period may be a holiday or a working day. Holidays include, for example, Saturdays, Sundays, and other days off. Working days, for example, include Monday to Friday. Whether each day in the historical period is a working day can be obtained from the calendar application of the electronic device, or the electronic device can obtain it by accessing the server, or it can be set by the user, or the electronic device can determine it based on the user's punch-in record. For example, the function of recommending check-ins is provided by the "Smart Space" (a functional module used to provide recommendation services) on the electronic device. When the electronic device detects that the user has enabled the function of recommending check-ins in the "Smart Space", it outputs the determination work day prompt information, if the user's operation of selecting the default working day is detected, the electronic device determines whether the user's clock-in time is a working day from the calendar application or by accessing the server. If it is detected that the user selects a custom working day, the electronic device determines whether the user's clock-in time is a working day based on the working day set by the user.

在工作日中的排序信息包括当天是周几、当天是所在月份中的第几天、当天是一年中的第几周中的任意一项或多项信息。月份信息是指当天所在的月份。The sorting information on working days includes any one or more of the day of the week, the day of the month, and the week of the year. The month information refers to the month in which the current day is located.

位置信息包括电子设备当前所在的城市以及电子设备当前所在的具体位置(例如××小区或××大厦)。位置信息可以根据电子设备的定位信息确定,也可以根据电子设备连接的WIFI信息或者基站信息确定。The location information includes the city where the electronic device is currently located and the specific location where the electronic device is currently located (such as XX community or XX building). The location information can be determined based on the positioning information of the electronic device, or based on the WIFI information or base station information connected to the electronic device.

在一实施例中,场景还包括电子设备的运动信息,电子设备的运动信息反映用户的运动信息。例如,电子设备的运动信息可以包括电子设备的速度,电子设备的速度可以反映用户当天上班所乘坐的交通工具。电子设备的运动信息可以包括电子设备的位移,根据电子设备的位移可以确定用户离开家或者接近工作地点。In one embodiment, the scene also includes motion information of the electronic device, and the motion information of the electronic device reflects the motion information of the user. For example, the motion information of the electronic device may include the speed of the electronic device, and the speed of the electronic device may reflect the mode of transportation the user took to work that day. The movement information of the electronic device may include the displacement of the electronic device. According to the displacement of the electronic device, it may be determined that the user has left home or is close to the work place.

在一实施例中,根据历史数据确定用户每次打卡的时间和场景,进而确定用户每次打卡的时段和对应的场景,再通过统计确定每种场景下各个时段打卡的概率。其中,各个时段可以是一天中的各时段,每个时段可以是15分钟、30分钟或60分钟。在确定每种场景下各个时段打卡的概率后,即可确定在当前场景下,预设时间范围内每个时段的打卡概率。In one embodiment, the time and scene in which the user clocks in each time are determined based on historical data, and then the time period and corresponding scene in which the user clocks in each time are determined, and then the probability of clocking in in each time period under each scenario is determined through statistics. Each time period can be a time period in a day, and each time period can be 15 minutes, 30 minutes or 60 minutes. After determining the probability of checking in at each time period in each scenario, the probability of checking in at each time period within the preset time range under the current scenario can be determined.

其中,预设时间范围可以是一天、三天或者一周内。The preset time range can be one day, three days or one week.

在一实施例中,预先根据历史数据生成训练样本,对分类模型进行训练,以优化分类模型的参数,将优化后的分类模型作为预测模型。之后,将当前的场景输入预测模型,得到预测模型输出的预设时间范围内每个时段的打卡概率,通过模型预测打卡概率,可以提高得到的打卡概率的准确度。In one embodiment, training samples are generated in advance based on historical data, the classification model is trained to optimize the parameters of the classification model, and the optimized classification model is used as a prediction model. After that, the current scene is input into the prediction model to obtain the check-in probability for each period within the preset time range output by the prediction model. By predicting the check-in probability through the model, the accuracy of the obtained check-in probability can be improved.

下面对本申请一实施例提供的预测模型的构建流程进行介绍。The following is an introduction to the construction process of the prediction model provided by an embodiment of the present application.

电子设备将一天划分为第一数量的时间间隔,一个时间间隔即为一个时段,根据历史时段检测到的用户打卡的时间确定每天中各时间间隔对应的标签。其中,时间间隔也可以称为slot,每个时间间隔的时长可以为15分钟、30分钟或60分钟等。例如一天24个小时,每个时间间隔的时长为60分钟,每天划分为24个时间间隔,每个时间间隔的时长为30分钟,每天划分为48个时间间隔。标签与对应的时间间隔是否存在打卡记录相对应,例如对于其中一天,若根据当天用户打卡的时间确定一时间间隔存在打卡记录,则该时间间隔标签为是,若该时间间隔不存在打卡记录,则标签为否,又例如,若该时间间隔存在打卡记录,则标签为1,若该时间间隔不存在打卡记录,则标签为0。The electronic device divides one day into a first number of time intervals, one time interval is a time period, and determines the tag corresponding to each time interval in each day based on the user's check-in time detected in the historical period. Among them, the time interval can also be called a slot, and the length of each time interval can be 15 minutes, 30 minutes, or 60 minutes, etc. For example, a day has 24 hours, each time interval is 60 minutes long, and each day is divided into 24 time intervals. Each time interval is 30 minutes long, and each day is divided into 48 time intervals. The label corresponds to whether there is a check-in record in the corresponding time interval. For example, for one day, if it is determined that a check-in record exists in a time interval based on the time when the user checked in that day, then the label of the time interval is Yes. If there is no check-in record in this time interval, Then the label is No. For example, if there is a check-in record in this time interval, the label is 1. If there is no check-in record in this time interval, the label is 0.

示例性地,如图3,按照30分钟的时间间隔将一天划分为48个时间间隔,依次为00:00-00:30、00:30-01:00、01:00-01:30、...23:00-23:30、23:30-00:00。对于任一天,若在一个时间间隔内有打卡记录,即打卡时间处于该时间间隔内,则该时间间隔的标签为1,若在该时间间隔内没有打卡记录,则对应的时间间隔的标签为0。例如,用户的打卡时间分别位于08:30-09:00以及18:00-18:30,则08:30-09:00和18:00-18:30两个时间间隔的标签为1,其余时间间隔的标签为0。For example, as shown in Figure 3, one day is divided into 48 time intervals according to 30-minute intervals, namely 00:00-00:30, 00:30-01:00, 01:00-01:30,. ..23:00-23:30, 23:30-00:00. For any day, if there is a check-in record within a time interval, that is, the check-in time is within the time interval, the label of the time interval is 1. If there is no check-in record within the time interval, the label of the corresponding time interval is 0. For example, if the user's check-in time is between 08:30-09:00 and 18:00-18:30, then the labels of the two time intervals 08:30-09:00 and 18:00-18:30 are 1, and the labels of the other time intervals are 1. The time interval has a label of 0.

在一实施例中,在不同时段的预设间隔可以不同,从而将一天划分为不等长的时间间隔,例如在0:00-06:00以及11:00-15:00两个时段按照60分钟的间隔进行划分,其他时段按照30分钟的间隔进行划分,从而可以减少负样本(即不存在打卡记录的样本)的数量。In one embodiment, the preset intervals in different time periods may be different, thereby dividing a day into time intervals of unequal length, for example, the two time periods of 0:00-06:00 and 11:00-15:00 are divided into 60 hours The time intervals are divided into minutes, and other periods are divided into 30-minute intervals, thereby reducing the number of negative samples (that is, samples without punch-in records).

将一天中各时间间隔对应的标签以及当天的场景作为一个数据样本,根据历史数据可以得到多个数据样本。The labels corresponding to each time interval of the day and the scene of the day are used as a data sample. Multiple data samples can be obtained based on historical data.

在一实施例中,根据历史时段用户打卡的时间所确定的数据样本为原始数据样本,电子设备还根据历史时段用户打卡的时间以及对应的场景生成增广数据样本。具体地,按照预设偏移时长对用户打卡的时间分别向左或向右偏移,或者同时向左和向右偏移,得到偏移打卡时间,将偏移打卡时间也作为打卡的时间,根据偏移打卡时间确定一天中各时间间隔对应的标签以及场景,得到增广数据样本。增广数据样本可以增加样本的数量,原始数据样本与对应的增广数据样本所对应的各时间间隔的标签不同,场景相同。In one embodiment, the data samples determined based on the check-in time of the user in the historical period are original data samples, and the electronic device also generates the augmented data sample based on the check-in time of the user in the historical period and the corresponding scene. Specifically, the user's punch-in time is offset to the left or right respectively, or to the left and right simultaneously according to the preset offset duration, to obtain the offset punch-in time, and the offset punch-in time is also used as the punch-in time. Determine the tags and scenes corresponding to each time interval of the day based on the offset punch-in time, and obtain augmented data samples. Augmented data samples can increase the number of samples. The labels of each time interval corresponding to the original data samples and the corresponding augmented data samples are different, but the scenarios are the same.

例如,若历史数据中其中一天的打卡时间为09:00,预设偏移时长包括向左偏移时长和向右偏移时长,向左偏移时长和向右偏移时长均为20分钟,偏移后的打卡时间分别为08:40和09:20。根据打卡时间为9:00确定当天各时间间隔对应的标签,根据当天各时间间隔对应的标签以及当天的场景生成原始样本。根据打卡时间为08:40确定当天各时间间隔对应的标签,根据当天各时间间隔对应的标签以及当天的场景生成一个增广数据样本。根据打卡时间为09:20确定当天各时间间隔对应的标签,根据当天各时间间隔对应的标签以及当天的场景生成另一个增广数据样本。For example, if the check-in time of one day in the historical data is 09:00, the default offset duration includes the left offset duration and the right offset duration. Both the left offset duration and the right offset duration are 20 minutes. The offset clock-in times are 08:40 and 09:20 respectively. Determine the tags corresponding to each time interval of the day based on the check-in time of 9:00, and generate original samples based on the tags corresponding to each time interval of the day and the scene of the day. Determine the tags corresponding to each time interval of the day based on the check-in time of 08:40, and generate an augmented data sample based on the tags corresponding to each time interval of the day and the scene of the day. Determine the tags corresponding to each time interval of the day based on the check-in time of 09:20, and generate another augmented data sample based on the tags corresponding to each time interval of the day and the scene of the day.

又例如,若历史数据中其中一天的打卡时间为9:00和18:00,每个打卡时间对应的向左偏移时长和向右偏移时长均为20分钟,09:00对应的偏移后的打卡时间分别为08:40和09:20,18:00对应的偏移后的打卡时间分别为17:40和18:20,则原始数据样本对应的打卡时间为9:00和18:00,各增广数据样本对应的打卡时间分别为08:40和17:40、08:40和18:00、08:40和18:20、09:00和17:40、9:00和18:20、09:20和17:40、09:20和18:00、09:20和18:20,根据原始数据样本对应的打卡时间可以得到原始数据样本对应的各时间间隔的标签,根据增广数据样本对应的打卡时间可以得到增广数据样本对应的各时间间隔的标签。For another example, if the check-in time of one day in the historical data is 9:00 and 18:00, the left offset duration and right offset duration corresponding to each check-in time are both 20 minutes, and the offset corresponding to 09:00 The later punch-in times are 08:40 and 09:20 respectively, and the offset punch-in times corresponding to 18:00 are 17:40 and 18:20 respectively. Then the corresponding punch-in times of the original data samples are 9:00 and 18: 00, the punch-in times corresponding to each augmented data sample are 08:40 and 17:40, 08:40 and 18:00, 08:40 and 18:20, 09:00 and 17:40, 9:00 and 18 :20, 09:20 and 17:40, 09:20 and 18:00, 09:20 and 18:20. According to the check-in time corresponding to the original data sample, the labels of each time interval corresponding to the original data sample can be obtained. According to the increase The punch-in time corresponding to the augmented data sample can be used to obtain the labels of each time interval corresponding to the augmented data sample.

通过对打卡时间进行偏移,将与用户实际打卡时间接近的时间间隔也作为打卡时间,并生成增广数据样本,参与模型训练,从而可以提高训练得到的预测模型的准确度。根据预测模型可以在同样场景下将用户实际打卡的时间之前或者之后也推荐用户打卡,在用户提前上班或者推迟下班的情况下,仍然可以推荐用户打卡,进而可以避免用户遗漏打卡,提高了用户体验。By offsetting the check-in time, the time interval close to the user's actual check-in time is also used as the check-in time, and augmented data samples are generated to participate in model training, thereby improving the accuracy of the trained prediction model. According to the prediction model, the user can be recommended to clock in before or after the actual clock-in time in the same scenario. When the user goes to work early or leaves work late, the user can still be recommended to clock in, which can prevent the user from missing the clock and improve the user experience. .

在一实施例中,用户打卡的时间处于上班打卡时段或下班打卡时段,例如在设定时间之前的时段为上班打卡时段,在设定时间之后的时段为下班打卡时段。上班打卡时段对应的预设偏移时长和下班打卡时段对应的预设偏移时长不同。In one embodiment, the user's clock-in time is in the clock-in period or the clock-out period. For example, the period before the set time is the clock-in period, and the period after the set time is the clock-out period. The preset offset duration corresponding to the clock-in period is different from the preset offset duration corresponding to the clock-out period.

例如,对每一周的上班打卡时段的打卡时间进行统计,得到图4所示的概率分布图,对每一周的下班打卡时段的打卡时间进行统计,得到如图5所示的概率分布图。可以看出,上班打卡时间呈现左(即在前的时间)宽右(即在后的时间)窄的分布,下班打卡时间呈现左窄右宽的分布。即在上班打卡时段用户在上班时间之前打卡的概率更高,在下班打卡时段用户在下班打卡时间之后打卡的概率更高。因此,对于在上班打卡时段所检测到的打卡记录,将检测到打卡的时间向左偏移20分钟,向右偏移10分钟,得到偏移打卡时间,再根据偏移打卡时间生成增广数据样本,对于下班打卡时段所检测到的打卡记录,将检测到打卡的时间向左偏移5分钟,向右偏移10分钟,得到偏移打卡时间,再根据偏移打卡时间生成增广数据样本。For example, by counting the punch-in time during the work clock-in period each week, the probability distribution diagram shown in Figure 4 is obtained, and by counting the clock-in time during the off-duty clock-in period each week, the probability distribution diagram shown in Figure 5 is obtained. It can be seen that the clock-in time for work shows a distribution with a wide left (i.e., the time in front) and a narrow right (i.e., the time after), and the clock-in time for after get off work has a distribution that is narrow on the left and wide on the right. That is, during the work clock-in period, the user has a higher probability of clocking in before the work time, and during the off-get off work clock-in period, the user has a higher probability of clocking in after the off-get off work clock time. Therefore, for the punch-in records detected during the clock-in period, the detected clock-in time is shifted to the left by 20 minutes and to the right by 10 minutes to obtain the offset clock-in time, and then the augmented data is generated based on the offset clock-in time Sample, for the punch-in records detected during the clock-in period, offset the detected clock-in time by 5 minutes to the left and 10 minutes to the right to obtain the offset clock-in time, and then generate an augmented data sample based on the offset clock-in time .

由于用户提前上班的次数大于迟到的次数,因此在上班时段向左偏移的时长更长,可以避免在用户提前上班的情况下不推荐用户打卡的情况。用户推迟下班的次数大于早退的次数,因此在下班时段向右偏移的时长更长,可以避免在用户加班的情况下不推荐用户打卡的情况。Since the number of times a user goes to work early is greater than the number of times he or she is late, the shift to the left during work hours is longer, which can avoid the situation where the user is not recommended to clock in when the user goes to work early. The number of times the user delays getting off work is greater than the number of times the user leaves early, so the shift to the right during the off-duty period is longer, which can avoid the situation where the user is not recommended to clock in when the user works overtime.

在另一实施例中,也可以根据历史数据确定用户的打卡习惯,根据用户的打卡习惯确定预设偏移时长。例如,上班时间为9:00,下班时间为18:00,根据历史时段检测到用户打卡的时间,统计出用户的打卡时间一般为8:50-9:00以及18:00-19:00,则对于处于上班打卡时段的打卡时间,向左偏移20分钟,向右偏移5分钟,得到偏移打卡时间,对于处于下班打卡时段的打卡时间,向右偏移120分钟,得到偏移打卡时间,不向左偏移。根据历史数据确定预设偏移时长,可以使后续统计出的各时段的打卡概率与用户习惯相一致,提高用户体验。In another embodiment, the user's punching habit may also be determined based on historical data, and the preset offset duration may be determined based on the user's punching habit. For example, if the working time is 9:00 and the off-duty time is 18:00, the user’s clock-in time is detected based on the historical period, and the statistics show that the user’s clock-in time is generally 8:50-9:00 and 18:00-19:00. Then, for the punch-in time during the clock-in period, shift it to the left by 20 minutes and shift it to the right by 5 minutes to get the offset clock-in time. For the clock-in time during the clock-in period after work, shift it to the right by 120 minutes to get the offset clock-in time. Time, not offset to the left. Determining the preset offset duration based on historical data can make the subsequent statistical check-in probability of each period consistent with user habits and improve user experience.

在另一实施例中,也可以根据用户打卡的时间以及预设偏移时长,对用户打卡的时间分别向左或向右偏移,或者同时向左和向右偏移,得到一个打卡时段,再根据打卡时段确定每个时间间隔对应的标签。即与打卡时段存在重叠的所有时间间隔均为存在打卡记录的时间间隔,对应的标签均为1,与打卡时段未重叠的时间间隔为不存在打卡记录的时间间隔,对应的标签为0。In another embodiment, according to the user's punch-in time and the preset offset duration, the user's punch-in time can be offset to the left or right respectively, or to the left and right simultaneously, to obtain a punch-in period. Then determine the label corresponding to each time interval based on the punch-in period. That is, all time intervals that overlap with the check-in period are time intervals in which check-in records exist, and the corresponding labels are 1. Time intervals that do not overlap with the check-in period are time intervals in which no check-in records exist, and the corresponding labels are 0.

例如,若打卡时间为09:00,预设偏移时长包括向左偏移时长和向右偏移时长,向左偏移时长和向右偏移时长均为20分钟,则打卡时段为08:40-09:20,若时间间隔为30分钟,则08:30-9:00以及9:00-9:30的两个时间间隔均为有打卡记录的时间间隔,标签均为1。For example, if the punch-in time is 09:00, the default offset duration includes the left offset duration and the right offset duration, and the left offset duration and right offset duration are both 20 minutes, then the punch-in period is 08: 40-09:20, if the time interval is 30 minutes, then the two time intervals of 08:30-9:00 and 9:00-9:30 are both time intervals with punch records, and the labels are both 1.

通过预设偏移时长对用户打卡的时间进行平移,增加打卡的时长,并添加对应的标签,形成的样本为增广数据样本,可以增加正样本(即存在打卡记录的样本)的数量,提高计算得到的预测模型的稳定性。The preset offset duration is used to shift the user's check-in time, increase the check-in duration, and add corresponding labels. The resulting sample is an augmented data sample, which can increase the number of positive samples (that is, samples with check-in records) and improve The calculated stability of the predictive model.

在得到数据样本后,根据训练样本对分类模型进行训练,即可得到预测模型。After obtaining the data samples, train the classification model based on the training samples to obtain the prediction model.

其中,分类模型可以是基于轻量梯度提升算法(Light gradient boostingmachine,LGBM)的模型,当样本的特征维度增加时,LGBM模型可以表现出更好的非线性特征。分类模型也可以是线性分类模型,线性分类模型对每个数据样本的各特征进行线性求和后进行模型训练,线性分类模型可以降低计算量。其中,线性分类模型可以是逻辑回归模型。Among them, the classification model can be a model based on the Light Gradient Boosting Machine (LGBM). When the feature dimension of the sample increases, the LGBM model can show better nonlinear characteristics. The classification model can also be a linear classification model. The linear classification model performs linear summation of the features of each data sample and then performs model training. The linear classification model can reduce the amount of calculation. Among them, the linear classification model can be a logistic regression model.

用于训练分类模型的样本中,正样本和负样本的差距较大,即存在打卡记录的时间间隔的数量小于不存在打卡记录的时间间隔的数量。例如,任意一天中,若时间间隔的数量为48个,存在两次打卡记录,则正样本和负样本的比例为2:46,因此用于训练分类模型的样本存在样本不均衡的问题,会影响训练后得到的预测模型的鲁棒性,进而影响后续预测的打卡概率的准确度。因此,本申请实施例中,在训练分类模型过程中,对于求反向梯度的计算步骤,设置正样本的权重为0.7,负样本的权重为0.3,从而可以改善分类模型的参数的优化过程,进而得到准确度更高的预测模型。Among the samples used to train the classification model, the gap between positive samples and negative samples is large, that is, the number of time intervals with punch-in records is smaller than the number of time intervals without punch-in records. For example, on any day, if the number of time intervals is 48 and there are two check-in records, the ratio of positive samples to negative samples is 2:46. Therefore, the samples used to train the classification model have the problem of sample imbalance, which will It affects the robustness of the prediction model obtained after training, and then affects the accuracy of the subsequent predicted check-in probability. Therefore, in the embodiment of the present application, during the process of training the classification model, for the calculation step of finding the reverse gradient, the weight of the positive sample is set to 0.7, and the weight of the negative sample is set to 0.3, thereby improving the optimization process of the parameters of the classification model. This leads to a more accurate prediction model.

在其他实施例中,电子设备也可以将历史数据上传至服务器,服务器根据历史数据对分类模型进行训练,得到预测模型,将预测模型发送至电子设备。In other embodiments, the electronic device can also upload historical data to the server. The server trains the classification model based on the historical data, obtains a prediction model, and sends the prediction model to the electronic device.

电子设备在得到预测模型后,将当前的场景输入预测模型,得到预测模型输出的预设时间范围内每个时段的打卡概率。示例性地,电子设备每天在确定达到预设的概率计算时间时,将当前的场景输入预测模型,得到预测模型输出的当天各时段的打卡概率。After obtaining the prediction model, the electronic device inputs the current scene into the prediction model and obtains the check-in probability for each period within the preset time range output by the prediction model. For example, when the electronic device determines that the preset probability calculation time is reached every day, the current scene is input into the prediction model, and the punch-in probability for each period of the day output by the prediction model is obtained.

例如,根据当天的场景,得到的当天各时段的打卡概率如图6所示,其中,图6中横坐标表示对时间间隔从00:00-00:30分开始排序后的时间间隔的序号,纵坐标表示各时间间隔(即时段)的打卡概率。For example, based on the scene of the day, the punch-in probability of each period of the day is shown in Figure 6. The abscissa in Figure 6 represents the serial number of the time interval after sorting the time intervals from 00:00-00:30. The ordinate represents the check-in probability of each time interval (i.e., period).

在一实施例中,在满足预设条件时,电子设备根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率。其中,预设条件包括电子设备处于息屏状态、电子设备处于充电状态、当前时间为预设时间、电子设备位于预设区域中的任意一项或多项。预设时间可以为凌晨2:00-5:00,也可以是根据用户的睡眠数据确定的用户的睡眠时段。预设区域可以是用户工作所在的城市或者根据用户轨迹确定的用户的家所在的区域。满足预设条件的情况为电子设备的空闲时间,在空闲时间确定每个时段的打卡概率,可以避免在用户使用手机的过程中计算过程占用电子设备的资源,避免计算过程影响电子设备的响应速度。In one embodiment, when the preset conditions are met, the electronic device determines the check-in probability for each period within the preset time range based on the current scene and historical data. The preset conditions include any one or more of the following: the electronic device is in a screen-off state, the electronic device is in a charging state, the current time is a preset time, and the electronic device is in a preset area. The preset time can be 2:00-5:00 in the morning, or it can be the user's sleep period determined based on the user's sleep data. The preset area may be the city where the user works or the area where the user's home is located based on the user's trajectory. The situation that satisfies the preset conditions is the idle time of the electronic device. Determining the check-in probability for each period during the idle time can avoid the calculation process occupying the resources of the electronic device when the user is using the mobile phone and avoid the calculation process affecting the response speed of the electronic device. .

S202:在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在所述电子设备的显示界面上显示打卡推荐信息。S202: When it is detected that the electronic device is located within the preset location range and the check-in probability in the current period is greater than the first threshold, display check-in recommendation information on the display interface of the electronic device.

具体地,如图6所示,在得到各时段的打卡概率后,大于第一阈值的打卡概率对应的时段即为用户可能需要打卡的时段,在达到对应的时段时,若检测到电子设备位于预设位置范围,则在电子设备的显示界面上显示打卡推荐信息。Specifically, as shown in Figure 6, after obtaining the check-in probability of each time period, the time period corresponding to the check-in probability greater than the first threshold is the time period when the user may need to check in. When the corresponding time period is reached, if the electronic device is detected to be located Within the preset location range, check-in recommendation information is displayed on the display interface of the electronic device.

其中,预设位置范围可以是用户设定的位置范围,也可以是电子设备根据检测到用户打卡时用户所在的位置确定的。例如,根据历史数据,确定用户打卡的地点为××大厦,则将距离××大厦50米范围内的区域确定为预设位置范围。电子设备根据电子设备的定位信息、电子设备所连接的基站信息或电子设备所连接的WIFI信息,确定电子设备是否位于预设位置范围。The preset location range may be a location range set by the user, or may be determined by the electronic device based on the location of the user when it detects the user punching in. For example, based on historical data, it is determined that the location where the user checked in is XX building, then the area within 50 meters from XX building is determined as the preset location range. The electronic device determines whether the electronic device is within the preset location range based on the positioning information of the electronic device, the base station information connected to the electronic device, or the WIFI information connected to the electronic device.

在一实施例中,电子设备根据预设时间范围内每个时段的打卡概率确定第一阈值。例如,预设时间范围是一天,电子设备根据历史数据确定当天中各时间间隔的打卡概率,根据各打卡概率确定第一阈值。其中,上班时段对应的第一阈值和下班时段对应的第一阈值可以相同,也可以不同。例如,电子设备将当天中各时间间隔的打卡概率的均值作为第一阈值,或者将当天的打卡概率从小到大进行排序,将大于前40%的打卡概率的数值作为第一阈值。又例如,电子设备将当天上班时段中各时间间隔的打卡概率的平均值作为上班时段对应的第一阈值,将下班时段各时间间隔的打卡概率的平均值作为下班时段对应的第一阈值。In one embodiment, the electronic device determines the first threshold based on the check-in probability of each period within the preset time range. For example, the preset time range is one day, the electronic device determines the check-in probability of each time interval in the day based on historical data, and determines the first threshold based on each check-in probability. The first threshold corresponding to the working period and the first threshold corresponding to the off-duty period may be the same or different. For example, the electronic device takes the average of the check-in probabilities of each time interval of the day as the first threshold, or sorts the check-in probabilities of the day from small to large, and uses a value greater than the top 40% of the check-in probabilities as the first threshold. For another example, the electronic device uses the average value of the check-in probability of each time interval during the working period of the day as the first threshold corresponding to the working period, and the average value of the check-in probability of each time interval during the off-duty period as the first threshold corresponding to the off-duty period.

示例性地,如图6所示,在确定上班时段对应的第一阈值和下班时段对应的第一阈值后,即可确定大于打卡概率大于第一阈值的时间间隔。For example, as shown in Figure 6, after determining the first threshold corresponding to the working period and the first threshold corresponding to the off-duty period, a time interval in which the probability of clocking in is greater than the first threshold can be determined.

由于每种场景下各时间间隔对应的打卡概率不同,因此不同场景下,根据每个时段的打卡概率确定的第一阈值不同,因此,第一阈值为动态阈值。通过设定动态阈值,可以根据用户的上下班时段打卡的时间分布确定合适的阈值,适应不同用户在不同场景下的打卡规律,从而为用户提供个性化的打卡推荐服务,提升用户体验。Since the check-in probability corresponding to each time interval in each scenario is different, the first threshold determined based on the check-in probability in each period is different in different scenarios. Therefore, the first threshold is a dynamic threshold. By setting dynamic thresholds, appropriate thresholds can be determined based on the time distribution of users' clock-in during commuting and get off work hours, adapting to the clock-in rules of different users in different scenarios, thereby providing users with personalized clock-in recommendation services and improving user experience.

可以理解,在其他实施例中,第一阈值也可以为固定值。It can be understood that in other embodiments, the first threshold can also be a fixed value.

打卡推荐信息可以显示在通知栏,也可以以卡片或者悬浮窗的形式显示在显示界面。例如,在满足推荐打卡的条件时,若电子设备处于锁屏状态下,电子设备在锁屏界面显示通知栏,在通知栏内显示打卡推荐信息。又例如,在满足推荐打卡的条件时,若电子设备显示桌面或负一屏,则在桌面或负一屏显示卡片,在卡片上显示打卡推荐信息。又例如,在满足推荐打卡的条件时,若电子设备的显示界面显示其他三方应用程序,则在显示界面的最上层显示悬浮窗,在悬浮窗上显示打卡推荐信息,从而方便用户及时打卡。Check-in recommendation information can be displayed in the notification bar or displayed on the display interface in the form of a card or floating window. For example, when the conditions for recommended check-in are met, if the electronic device is in a locked screen state, the electronic device displays a notification bar on the lock screen interface and displays the recommended check-in information in the notification bar. For another example, when the conditions for recommending a check-in are met, if the electronic device displays the desktop or a negative screen, a card will be displayed on the desktop or a negative screen, and the check-in recommendation information will be displayed on the card. For another example, when the conditions for recommended check-in are met, if the display interface of the electronic device displays other third-party applications, a floating window will be displayed on the top layer of the display interface, and check-in recommendation information will be displayed on the floating window, thereby making it convenient for users to check in in time.

电子设备在检测到用户点击打卡推荐信息时,打开打卡软件的打卡页面供用户打卡,或者电子设备在检测到用户点击打卡推荐信息时,指示打卡软件完成打卡。其中,打卡软件可以由用户指定,也可以由电子设备根据历史时段用户打卡时所使用的打卡软件确定。When the electronic device detects that the user clicks on the check-in recommendation information, it opens the check-in page of the check-in software for the user to check in, or when the electronic device detects that the user clicks on the check-in recommendation information, it instructs the check-in software to complete the check-in. The clock-in software can be specified by the user, or can be determined by the electronic device based on the clock-in software used by the user to clock in during historical periods.

示例性地,如图7中的(a)所示,电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值,电子设备在显示界面上显示第一卡片71,第一卡片71内显示打卡软件的图标72以及第一控件73,第一控件73上显示“打卡”。电子设备在检测到用户点击第一控件73的操作时,在显示界面显示如图7中的(b)所示的打卡软件的打卡页面。用户在打卡页面点击“打卡”即可完成打卡。可以理解,若当前时间处于上班时段,打卡页面可以显示“上班打卡”,若当前时间处于下班时段,打卡页面可以显示“下班打卡”。Exemplarily, as shown in (a) of Figure 7 , the electronic device is located within the preset location range, and the check-in probability of the current period is greater than the first threshold, the electronic device displays the first card 71 on the display interface, and the first card The icon 72 of the clock-in software and the first control 73 are displayed in 71, and the first control 73 displays “clock-in”. When the electronic device detects the user's operation of clicking the first control 73, the electronic device displays the check-in page of the check-in software as shown in (b) of Figure 7 on the display interface. Users can complete the check-in by clicking "Check-in" on the check-in page. It can be understood that if the current time is in the working period, the clock-in page can display "clock in and clock out", and if the current time is in the off-duty period, the clock in page can display "clock in and out".

电子设备在显示界面显示打卡推荐信息后,在检测到用户的打卡指令后,不再显示打卡推荐信息。After the electronic device displays the check-in recommendation information on the display interface, after detecting the user's check-in instruction, the electronic device no longer displays the check-in recommendation information.

在一实施例中,在检测到电子设备位于预设范围内,且当前时段的打卡概率大于第一阈值的情况下,判断当前时段之前的第一时长内是否检测到打卡信息,若在当前时段之前的第一时长内检测到打卡信息,则电子设备不显示打卡推荐信息,若在当前时段之前的第一时长内未检测到打卡信息,则电子设备在显示界面显示打卡推荐信息,从而可以避免在用户已经打卡的情况下重复为用户推荐打卡信息。其中,打卡信息由电子设备从打卡软件获取。In one embodiment, when it is detected that the electronic device is within the preset range and the punch-in probability in the current period is greater than the first threshold, it is determined whether punch-in information is detected within the first period before the current period. If the punch-in information is detected in the current period, If punch-in information is detected within the first period of time before the current period, the electronic device will not display punch-in recommendation information. If no punch-in information is detected within the first period of time before the current period, the electronic device will display punch-in recommendation information on the display interface, thus avoiding If the user has already checked in, repeatedly recommend check-in information to the user. Among them, the clock-in information is obtained by the electronic device from the clock-in software.

其中,第一时长可以预先设定,例如为1小时。电子设备也可以根据当前时段处于上班打卡时段还是下班打卡时段确定第一时长。例如,在上班打卡时段内,从上班打卡时段开始到当前时段之间未检测到打卡信息,则电子设备在显示界面显示打卡推荐信息,在下班打卡时段内,从下班打卡时段开始到当前时段之间未检测到打卡信息,则电子设备在显示界面显示打卡推荐信息。The first duration may be preset, for example, 1 hour. The electronic device may also determine the first duration based on whether the current period is a clock-in period or a clock-in period. For example, during the clock-in period, if no clock-in information is detected from the start of the clock-in period to the current period, the electronic device will display the clock-in recommendation information on the display interface. If no punch-in information is detected during the period, the electronic device displays punch-in recommendation information on the display interface.

上述实施例中,电子设备根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,在检测到电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,电子设备的显示界面显示打卡推荐信息。因此,在满足打卡概率的情况下均可以推荐打卡,而不会区分首次打卡和末次打卡,也不需要用户指定上班时段和下班时段。而且,在存在多个时段均满足推荐打卡的条件的情况下可以多次推荐打卡,不需要人工干预。同时,由于历史数据包括历史时段检测到用户打卡的时间和场景,因此可以从多个维度统计用户的打卡习惯,从而可以更加准确地识别用户在各场景下的打卡概率,在合适的时段推荐用户打卡,满足用户的个性化需求。In the above embodiment, the electronic device determines the check-in probability of each time period within the preset time range based on the current scene and historical data. After detecting that the electronic device is located within the preset location range and the check-in probability of the current time period is greater than the first threshold, In this case, the display interface of the electronic device displays punch-in recommendation information. Therefore, clocking in can be recommended as long as the clocking in probability is met, without distinguishing between the first clocking in and the last clocking in, and the user does not need to specify the working time and the off work time. Moreover, if there are multiple time periods that meet the conditions for recommending check-ins, check-ins can be recommended multiple times without manual intervention. At the same time, since the historical data includes the time and scene in which the user checked in during the historical period, the user's check-in habits can be counted from multiple dimensions, so that the user's check-in probability in each scenario can be more accurately identified, and users can be recommended at the appropriate time period. Check in to meet the personalized needs of users.

在一实施例中,推荐打卡的方法的流程如图8所示。In one embodiment, the flow of the recommended check-in method is shown in Figure 8.

电子设备先获取历史时段检测到用户打卡的时间和场景,将这些数据作为原始数据,之后根据用户的打卡时间以及预设偏移时长确定偏移打卡时间,根据偏移打卡时间以及对应的场景进行数据增广,得到增广数据。电子设备将一天的时间划分为多个时间间隔,根据原始数据和增广数据确定每个时间间隔的标签,再将各数据样本的标签与对应的日期信息、位置信息、运动状态等信息进行特征拼接,分别得到原始数据样本和增广数据样本,采用原始数据样本和增广数据样本训练分类模型,分类模型是基于LGBM算法或者线性分类算法的模型。之后,电子设备根据训练后的分类模型得到预测模型。在接收到推荐打卡的指令时,将当前的场景输入预测模型,得到预测模型输出的各时段对应的打卡概率。之后,电子设备根据上班时段的打卡概率确定上班打卡时段对应的第一阈值,根据下班打卡时段的打卡概率确定下班时段对应的第一阈值。之后,电子设备在确定位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在电子设备的显示界面上显示打卡推荐信息。The electronic device first obtains the time and scene when the user clocks in during the historical period, uses these data as original data, and then determines the offset clock-in time based on the user's clock-in time and the preset offset duration, and performs operations based on the offset clock-in time and the corresponding scene. Data augmentation to obtain augmented data. The electronic device divides a day into multiple time intervals, determines the label of each time interval based on the original data and augmented data, and then characterizes the label of each data sample with the corresponding date information, location information, motion status and other information. After splicing, original data samples and augmented data samples are obtained respectively, and the original data samples and augmented data samples are used to train the classification model. The classification model is a model based on the LGBM algorithm or linear classification algorithm. Afterwards, the electronic device obtains a prediction model based on the trained classification model. When receiving the instruction to recommend check-in, the current scene is input into the prediction model, and the check-in probability corresponding to each time period output by the prediction model is obtained. Afterwards, the electronic device determines the first threshold corresponding to the clock-in period according to the clock-in probability of the get off work period, and determines the first threshold corresponding to the clock-in period according to the clock-in probability of the off-duty period. Afterwards, when the electronic device is determined to be within the preset location range and the check-in probability in the current period is greater than the first threshold, the check-in recommendation information is displayed on the display interface of the electronic device.

上述实施例中,基于历史数据进行样本构建和特征拼接,采用机器学习的算法预测各时段的打卡概率,可以自动学习用户打卡的时间分布规律,不需要人为指定上班时段和下班时段,降低服务器的运营压力,同时可以适应不同用户的个性化需求,为不同的用户进行不同的推荐服务。In the above embodiment, sample construction and feature splicing are carried out based on historical data, and a machine learning algorithm is used to predict the probability of clocking in at each time period. This can automatically learn the time distribution rules of user clocking in, without the need to manually specify working hours and off-duty hours, reducing the server's load. operation pressure, and at the same time, it can adapt to the personalized needs of different users and provide different recommendation services for different users.

此外,通过将每天的时间划分为等距离的多个时间间隔来进行样本构建,并进行模型训练,后续根据当天的场景输出各时段对应的打卡概率,可以在满足第一阈值,且满足位置要求的情况下进行打卡推荐,即只在一天中的一些时段进行打卡推荐。由于仅在打卡概率大于第一阈值的时段进行推荐,且对该时段可以一直显示打卡推荐信息,因此可以避免出现打卡推荐信息快速消失或者长期霸屏的问题,提高了用户体验。In addition, by dividing the daily time into multiple equidistant time intervals for sample construction and model training, and then outputting the check-in probability corresponding to each period according to the scene of the day, the first threshold can be met and the location requirements can be met. Check-in recommendations are made under certain circumstances, that is, check-in recommendations are only made during certain periods of the day. Since recommendations are only made during the period when the check-in probability is greater than the first threshold, and the check-in recommendation information can be displayed all the time during this period, it is possible to avoid the problem of the check-in recommendation information quickly disappearing or occupying the screen for a long time, which improves the user experience.

此外,在样本构建时考虑了日期信息和位置信息,日期信息包括是否是工作日的信息、在工作日中的排序信息、月份信息等,从而可以拼接多维特征得到训练样本,使得训练后得到的预测模型可以精确识别用户在不同场景下的打卡意图,提高推荐准确度。例如,可以根据用户非工作日的加班规律,在非工作日仍为用户推荐打卡信息。又例如,可以根据用户在每周中不同时间的上下班规律,或者根据用户在每月中不同时间的上下班规律,为用户推荐符合用户上下班规律的打卡推荐信息。In addition, date information and location information are considered when constructing the sample. The date information includes information about whether it is a working day, sorting information in working days, month information, etc., so that multi-dimensional features can be spliced to obtain training samples, so that the training samples can be obtained after training. The prediction model can accurately identify users’ check-in intentions in different scenarios and improve recommendation accuracy. For example, based on the user's overtime work pattern on non-working days, check-in information can still be recommended to the user on non-working days. For another example, based on the user's commuting pattern at different times of the week, or based on the user's commuting pattern at different times of the month, punch-in recommendation information that conforms to the user's commuting pattern can be recommended to the user.

同时,通过对原始数据进行数据增广,采用原始数据和增广数据构建训练样本,进行模型训练,可以提高预测模型的稳定性,输出符合用户上下班规律的打卡概率,更好地为用户推荐打卡服务。At the same time, by performing data augmentation on the original data, using the original data and the augmented data to construct training samples and conduct model training, the stability of the prediction model can be improved, and the check-in probability can be output that conforms to the user's commuting rules, and better recommendations can be made for users. Check-in service.

在实际应用中,用户在看到打卡推荐信息后,可能会由于有加班需求或者需要使用电子设备处理其他事务,而不方便打卡。为此,在本申请一实施例中,电子设备在显示界面显示打卡推荐信息后,若在第二时长内未检测到打卡信息,在检测到下一时段的打卡概率大于第一阈值,且电子设备位于预设位置范围内时,在电子设备的显示界面上显示打卡推荐信息。其中,第二时长可以是设定时长,例如20分钟。第二时长也可以是当前时间所在的时间间隔的时长,例如,每个时间间隔的时长均为30分钟,则第二时长为30分钟,即第二时长为开始显示打卡推荐信息到当前时间所在的时间间隔结束之间的时长。第二时长也可以是从显示打卡推荐信息到用户清除卡片之间的时长。例如,在19:00时,电子设备在显示界面显示打卡推荐信息,之后,电子设备检测到20分钟后用户仍未点击打卡推荐信息,或者清除了打卡推荐信息。则在到达19:30分时,若检测到电子设备仍然在预设位置范围内,确定19:30-20:00时段的打卡概率是否大于第一阈值,若大于第一阈值,则再次在显示界面显示打卡推荐信息,从而避免用户遗漏打卡,提高了用户体验。In practical applications, after seeing the recommended information about clocking in, users may find it inconvenient to clock in due to the need to work overtime or the need to use electronic devices to handle other matters. For this reason, in an embodiment of the present application, after the electronic device displays the check-in recommendation information on the display interface, if the check-in information is not detected within the second period of time, the probability of checking in in the next period is greater than the first threshold, and the electronic device When the device is within the preset location range, check-in recommendation information is displayed on the display interface of the electronic device. The second duration may be a set duration, such as 20 minutes. The second duration can also be the duration of the time interval where the current time is. For example, if the duration of each time interval is 30 minutes, then the second duration is 30 minutes. That is, the second duration is from the time when the check-in recommendation information is displayed until the current time. The length of time between the end of the interval. The second duration may also be the duration from when the check-in recommendation information is displayed to when the user clears the card. For example, at 19:00, the electronic device displays the check-in recommendation information on the display interface. After that, the electronic device detects that the user has not clicked on the check-in recommendation information after 20 minutes, or has cleared the check-in recommendation information. Then when reaching 19:30, if it is detected that the electronic device is still within the preset location range, it is determined whether the check-in probability in the 19:30-20:00 period is greater than the first threshold. If it is greater than the first threshold, the display is displayed again. The interface displays check-in recommendation information, thus preventing users from missing check-ins and improving user experience.

在一实施例中,电子设备在显示界面显示打卡推荐信息后,若在第二时长内未检测到打卡信息,则将小于第一阈值的第二阈值作为阈值,在检测到下一时段的打卡概率大于第二阈值,且电子设备位于预设位置范围内时,在电子设备的显示界面显示打卡推荐信息,从而在用户未使用推荐服务后提高推荐打卡的频率,进而避免用户在加班的情况下忘记打卡。In one embodiment, after the electronic device displays the check-in recommendation information on the display interface, if no check-in information is detected within the second period of time, a second threshold smaller than the first threshold is used as the threshold. When the probability is greater than the second threshold and the electronic device is within the preset location range, check-in recommendation information is displayed on the display interface of the electronic device, thereby increasing the frequency of recommended check-ins after the user has not used the recommended service, thereby preventing the user from working overtime. forgot to punch card.

在一实施例中,如图9所示,电子设备在显示打卡推荐信息时,同时在显示界面显示“打卡”和“稍后提醒”两个选项。电子设备若检测到用户点击“打卡”的操作,则在显示界面显示打卡页面,若检测到用户点击“稍后提醒”的操作,则当前时段在显示界面不显示打卡推荐信息,在检测到下一时段的打卡概率大于第一阈值,且电子设备位于预设位置范围内时,在电子设备的显示界面显示打卡推荐信息,从而可以根据用户需求为用户推荐打卡服务。In one embodiment, as shown in Figure 9, when the electronic device displays the check-in recommendation information, it also displays two options of "check-in" and "remind later" on the display interface. If the electronic device detects that the user clicks on the "Punch in" operation, the check in page will be displayed on the display interface. If it detects that the user clicks on the "Remind later" operation, the check in recommendation information will not be displayed on the display interface during the current period. After detection, When the check-in probability for a period is greater than the first threshold and the electronic device is located within the preset location range, check-in recommendation information is displayed on the display interface of the electronic device, so that check-in services can be recommended for the user according to the user's needs.

在一实施例中,在检测到用户点击“稍后提醒”的操作时,电子设备可以显示时间选项,例如电子设备在显示界面显示20分钟后提醒、1小时后提醒、2小时后提醒等时间选项,在检测到用户选择其中一个时间选项后,根据时间选项对应的时间在对应的时间再次显示打卡推荐信息,从而可以在避免用户遗漏打卡的同时,根据用户的实际需求减少推荐服务对用户的干扰。In one embodiment, when detecting that the user clicks the "remind later" operation, the electronic device can display time options. For example, the electronic device displays a reminder in 20 minutes, a reminder in 1 hour, a reminder in 2 hours, etc. on the display interface. option, after detecting that the user selects one of the time options, the check-in recommendation information will be displayed again according to the time corresponding to the time option, thereby preventing the user from missing a check-in and at the same time reducing the impact of recommended services on the user based on the user's actual needs. interference.

在一实施例中,电子设备在显示界面显示打卡推荐信息后,若在当前时间所在的时间间隔结束之前,检测到用户的打卡信息,则确定当前时间处于上班打卡时段或下班打卡时段。若当前时间处于上班打卡时段,则在上班打卡时段不再为用户推荐打卡信息,若当前时间处于下班打卡时段,则在下班打卡时段不再为用户推荐打卡信息。In one embodiment, after the electronic device displays the clock-in recommendation information on the display interface, if the user's clock-in information is detected before the end of the time interval in which the current time is located, it is determined that the current time is in the clock-in period or the clock-in period. If the current time is in the clock-in period, the clock-in information will no longer be recommended to the user during the clock-in period. If the current time is in the clock-out period, the clock-in information will no longer be recommended to the user in the clock-out period.

在一实施例中,电子设备包括应用模块、业务模块、学习模块以及感知模块。推荐打卡的方法的流程如图10所示,应用模块向业务模块发送推荐打卡的指令,业务模块在接收到推荐打卡的指令时,向学习模块订阅推荐打卡的学习任务。学习模块在接收到推荐打卡的学习任务后,从打卡软件获取历史时段用户打卡的时间,根据历史位置信息以及日历信息确定用户每次打卡的场景,之后根据用户打卡的时间和场景生成数据样本,根据数据样本对分类模型进行训练,得到预测模型。在达到预测时间时,业务模块向学习模块发送查询打卡时间和位置的指令,学习模块根据当前的场景和预测模型得到一天中各时间间隔对应的打卡概率,根据各时间间隔对应的打卡概率确定推荐打卡的时间,根据历史数据确定推荐打卡的位置,将推荐打卡的时间和位置发送给业务模块。业务模块根据推荐打卡的时间和位置在感知模块中注册时间围栏和地理围栏。其中,时间围栏可以是满足推荐打卡的时间,即打卡概率大于第一阈值的时间间隔,地理围栏可以是距离用户的工作地点小于预设距离的范围内。感知模块在根据电子设备的位置满足地理围栏,且根据当前的时间确定满足时间围栏的情况下,将围栏触发信号发送给业务模块,业务模块再根据围栏触发信号向应用模块发送出卡指令,应用模块根据出卡指令在显示界面显示打卡推荐信息。In one embodiment, the electronic device includes an application module, a business module, a learning module and a perception module. The process of the recommended check-in method is shown in Figure 10. The application module sends the instruction to recommend check-in to the business module. When the business module receives the instruction to recommend check-in, it subscribes to the learning module for the recommended check-in learning task. After receiving the learning task of recommended check-in, the learning module obtains the user's check-in time from the check-in software in the historical period, determines the user's check-in scene each time based on the historical location information and calendar information, and then generates data samples based on the user's check-in time and scene. The classification model is trained based on the data samples to obtain the prediction model. When the prediction time is reached, the business module sends an instruction to query the check-in time and location to the learning module. The learning module obtains the check-in probability corresponding to each time interval in the day based on the current scenario and the prediction model, and determines recommendations based on the check-in probability corresponding to each time interval. At the check-in time, determine the recommended check-in location based on historical data, and send the recommended check-in time and location to the business module. The business module registers time fences and geofences in the perception module based on the recommended check-in time and location. The time fence can be a time that satisfies the recommended check-in time, that is, the time interval in which the probability of check-in is greater than the first threshold, and the geo-fence can be within a range that is less than a preset distance from the user's work location. When the sensing module meets the geofence based on the location of the electronic device and determines that the time fence is met based on the current time, it sends the fence trigger signal to the business module. The business module then sends a card release instruction to the application module based on the fence trigger signal. The application The module displays punch-in recommendation information on the display interface according to the card-out instruction.

其中,应用模块可以根据用户操作得到推荐打卡的指令。例如,如图11所示,电子设备根据用户操作在显示界面显示智慧空间页面,在检测到用户点击添加场景的指令时,显示打卡提醒、喝水提醒、定时开灯、定时开空调等场景,在检测到用户点击打卡提醒的选项时,确定用户启动推荐打卡的功能,也即确定接收到推荐打卡的指令。Among them, the application module can obtain recommended check-in instructions based on user operations. For example, as shown in Figure 11, the electronic device displays the smart space page on the display interface according to the user's operation. When it detects that the user clicks on the instruction to add a scene, it displays scenes such as clock-in reminders, drinking water reminders, scheduled lights, and scheduled air conditioning. When it is detected that the user clicks on the check-in reminder option, it is determined that the user activates the function of recommending check-in, that is, it is determined that the instruction for recommending check-in is received.

学习模块可以在电子设备处于充电息屏的状态下,生成数据样本,根据数据样本对分类模型进行训练,得到预测模型。电子设备在首次得到预测模型后,可以保持预测模型不变,也可以在预测模型使用预设时长(例如一个月或三个月等)后更新预测模型,即电子设备可以根据最新的打卡时间以及对应的场景更新预测模型,以提高预测模型的预测打卡概率的准确度。电子设备在首次得到预测模型后,也可以统计在显示打卡推荐信息后,用户在对应的时段进行打卡的概率。若用户在对应的时段进行打卡的概率小于设定值,说明推荐不准确,则更新预测模型,否则不更新预测模型。The learning module can generate data samples when the electronic device is charging and the screen is turned off, and train the classification model based on the data samples to obtain a prediction model. After the electronic device obtains the prediction model for the first time, it can keep the prediction model unchanged, or it can update the prediction model after the prediction model is used for a preset period of time (such as one month or three months, etc.), that is, the electronic device can update the prediction model based on the latest check-in time and The prediction model is updated according to the corresponding scenario to improve the accuracy of the prediction model's predicted check-in probability. After the electronic device obtains the prediction model for the first time, it can also count the probability of the user checking in during the corresponding period after displaying the check-in recommendation information. If the probability of the user checking in during the corresponding time period is less than the set value, it means that the recommendation is inaccurate, and the prediction model will be updated. Otherwise, the prediction model will not be updated.

在一实施例中,在得到预测模型后,学习模块可以在电子设备处于息屏状态、电子设备处于充电状态、当前时间为预设时间或所述电子设备位于预设区域时,根据当前的场景和预测模型得到一天中各时间间隔对应的打卡概率,从而可以避免计算过程影响电子设备的影响速度。In one embodiment, after obtaining the prediction model, the learning module can perform the prediction according to the current scene when the electronic device is in the screen-off state, the electronic device is in the charging state, the current time is the preset time, or the electronic device is in the preset area. and the prediction model to obtain the check-in probability corresponding to each time interval in a day, thereby avoiding the calculation process from affecting the speed of electronic devices.

上述实施例中,电子设备根据历史数据构建预测模型,根据当前的场景以及预测模型确定当天各时间间隔的打卡概率,根据打卡概率推荐打卡,可以使打卡推荐信息适应不用用户的打卡规律。In the above embodiment, the electronic device builds a prediction model based on historical data, determines the check-in probability at each time interval of the day based on the current scene and the prediction model, and recommends check-in based on the check-in probability. This can adapt the check-in recommendation information to the check-in rules of different users.

应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence number of each step in the above embodiment 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 embodiment of the present application.

图12是本申请实施例提供的电子设备的结构示意图。Figure 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic 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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.

可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently. The components illustrated 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 (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.

控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.

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

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated 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, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or Universal serial bus (USB) interface, etc.

可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in the embodiment of the present invention are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic 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 the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.

电源管理模块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, the wireless communication module 160, and the like. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.

电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic 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.

电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.

显示屏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. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode). (AMOLED), flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic 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 electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.

外部存储器接口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 electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.

内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing 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 electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.

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

压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is performed on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold is applied to 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 is applied to 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 gyro sensor 180B may be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device 100 shakes, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.

距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may utilize the distance sensor 180F to measure distance to achieve fast focusing.

触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch device". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a location different from that of the display screen 194 .

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The buttons 190 include a power button, a volume button, etc. Key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .

指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.

电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. This embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .

图13是本发明实施例的电子设备100的软件结构框图。FIG. 13 is a software structure block diagram of the electronic device 100 according to the embodiment of the present invention.

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

应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.

如图13所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 13, the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

如图13所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 13, the application framework layer can include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can obtain the display 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 this data accessible to applications. Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, call status management (including connected, hung up, etc.).

资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.

通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear 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 notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.

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

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

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

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

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

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

2D图形引擎是2D绘图的绘图引擎。2D Graphics Engine is a drawing engine for 2D drawing.

内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional units and modules is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs. Module completion means dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be hardware-based. It can also be implemented in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of distinguishing each other and are not used to limit the scope of protection of the present application. For the specific working processes of the units and modules in the above system, please refer to the corresponding processes in the foregoing method embodiments, and will not be described again here.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above embodiments, each embodiment is described with its own emphasis. For parts that are not detailed or documented in a certain embodiment, please refer to the relevant descriptions of other embodiments.

在本申请所提供的实施例中,应该理解到,所揭露的装置/电子设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/电子设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices/electronic devices and methods can be implemented in other ways. For example, the device/electronic device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components can be combined or can be integrated into another system, or some features can be omitted, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.

集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、电载波信号、电信信号以及软件分发介质等。Integrated modules/units may be stored in a computer-readable storage medium if implemented in the form of software functional units and sold or used as independent products. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, which can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer can When the program is executed by the processor, the steps of each of the above method embodiments can be implemented. Wherein, the computer program includes computer program code, which may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , random access memory (RAM, RandomAccess Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with 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. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.

以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still implement the above-mentioned implementations. The technical solutions described in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of this application, and should be included in within the protection scope of this application.

Claims (11)

Translated fromChinese
1.一种推荐打卡的方法,应用于电子设备,其特征在于,包括:1. A recommended punch-in method, applied to electronic equipment, which is characterized by including:根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,所述历史数据包括在历史时段检测到用户打卡的时间和场景,所述场景包括日期信息以及位置信息,所述日期信息包括是否是工作日的信息、在工作日中的排序信息、月份信息中的任意一项或多项,所述预设时间范围为一天;Determine the check-in probability for each period within the preset time range based on the current scene and historical data. The historical data includes the time and scene when the user's check-in is detected in the historical period. The scene includes date information and location information. The date The information includes information on whether it is a working day, sorting information on working days, and any one or more of the month information, and the preset time range is one day;在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在所述电子设备的显示界面上显示打卡推荐信息;When it is detected that the electronic device is located within the preset location range and the check-in probability in the current period is greater than the first threshold, display check-in recommendation information on the display interface of the electronic device;在当前时段内一直显示打卡推荐信息;Check-in recommendation information is always displayed during the current period;若在第二时长内未检测到打卡信息,在检测到下一时段的打卡概率大于第一阈值,且所述电子设备位于预设位置范围内时,在所述电子设备的显示界面上显示打卡推荐信息。If no check-in information is detected within the second period of time, when the probability of check-in in the next period is detected to be greater than the first threshold and the electronic device is located within the preset position range, the check-in information is displayed on the display interface of the electronic device. Recommended information.2.根据权利要求1所述的方法,其特征在于,所述根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,包括:2. The method according to claim 1, characterized in that determining the check-in probability of each period within the preset time range based on the current scene and historical data includes:将当前的场景输入预测模型,得到所述预测模型输出的预设时间范围内每个时段的打卡概率,所述预测模型由所述历史数据训练得到。Input the current scene into the prediction model to obtain the check-in probability for each period within the preset time range output by the prediction model. The prediction model is trained by the historical data.3.根据权利要求2所述的方法,其特征在于,在所述将当前的场景输入预测模型之前,所述方法还包括:3. The method according to claim 2, characterized in that, before inputting the current scene into the prediction model, the method further includes:根据所述历史数据生成数据样本,每个所述数据样本包括一天中各时间间隔对应的标签以及场景,所述标签的值根据所述用户每天打卡的时间确定;Generate data samples based on the historical data, each data sample includes tags and scenarios corresponding to each time interval in a day, and the value of the tag is determined based on the time the user clocks in every day;根据所述数据样本对分类模型进行训练,得到预测模型。The classification model is trained according to the data samples to obtain a prediction model.4.根据权利要求3所述的方法,其特征在于,所述数据样本包括原始数据样本以及增广数据样本,所述原始数据样本根据所述用户打卡的时间确定,所述增广数据样本根据偏移打卡时间确定,所述偏移打卡时间与所述用户打卡的时间之间的间隔为预设偏移时长。4. The method according to claim 3, characterized in that the data samples include original data samples and augmented data samples, the original data samples are determined based on the time when the user clocks in, and the augmented data samples are determined based on The offset punch-in time is determined, and the interval between the offset punch-in time and the user's punch-in time is a preset offset duration.5.根据权利要求4所述的方法,其特征在于,所述用户打卡的时间处于上班打卡时段或下班打卡时段,所述上班打卡时段对应的预设偏移时长和所述下班打卡时段对应的预设偏移时长不同。5. The method according to claim 4, characterized in that the time when the user clocks in is in the clock-in period or the clock-in period, and the preset offset duration corresponding to the clock-in period and the clock-in period corresponding to the off-duty period are The default offset durations are different.6.根据权利要求4所述的方法,其特征在于,在所述根据所述历史数据生成数据样本之前,所述方法还包括:6. The method according to claim 4, characterized in that, before generating data samples according to the historical data, the method further includes:根据所述历史数据确定所述预设偏移时长。The preset offset duration is determined based on the historical data.7.根据权利要求1至6任一项所述的方法,其特征在于,在所述根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率之前,所述方法还包括:7. The method according to any one of claims 1 to 6, characterized in that before determining the check-in probability of each period within the preset time range based on the current scene and historical data, the method further includes:根据所述预设时间范围内每个时段的打卡概率确定所述第一阈值。The first threshold is determined according to the check-in probability of each period within the preset time range.8.根据权利要求1至6任一项所述的方法,其特征在于,在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,在所述电子设备的显示界面上显示打卡推荐信息,包括:8. The method according to any one of claims 1 to 6, characterized in that, when it is detected that the electronic device is located within a preset location range and the check-in probability of the current period is greater than the first threshold, the The display interface of the electronic device displays check-in recommendation information, including:在检测到所述电子设备位于预设位置范围内,且当前时段的打卡概率大于第一阈值的情况下,若在所述当前时段之前的第一时长内未检测到打卡信息,在所述电子设备的显示界面上显示打卡推荐信息。When it is detected that the electronic device is within the preset location range and the check-in probability of the current period is greater than the first threshold, if no check-in information is detected within the first period of time before the current period, the electronic device Check-in recommendation information is displayed on the display interface of the device.9.根据权利要求1至6任一项所述的方法,其特征在于,所述根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,包括:9. The method according to any one of claims 1 to 6, characterized in that determining the check-in probability of each period within a preset time range based on the current scene and historical data includes:在满足预设条件时,根据当前的场景以及历史数据确定预设时间范围内每个时段的打卡概率,所述预设条件包括电子设备处于息屏状态、电子设备处于充电状态、当前时间为预设时间、所述电子设备位于预设区域中的任意一项或多项。When the preset conditions are met, the check-in probability for each period within the preset time range is determined based on the current scene and historical data. The preset conditions include that the electronic device is in the screen-off state, the electronic device is in the charging state, and the current time is the preset time. Assume that the electronic device is located at any one or more of the preset areas at the time.10.一种电子设备,其特征在于,包括处理器,所述处理器用于执行存储在存储器中的计算机程序,以实现如权利要求1至9任一项所述的方法。10. An electronic device, characterized by comprising a processor, the processor being configured to execute a computer program stored in a memory to implement the method according to any one of claims 1 to 9.11.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9任一项所述的方法。11. A computer-readable storage medium, the computer-readable storage medium stores a computer program, characterized in that, when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
CN202310588506.8A2023-05-242023-05-24 Recommended punch-in methods, electronic devices and computer-readable storage mediaActiveCN116320141B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310588506.8ACN116320141B (en)2023-05-242023-05-24 Recommended punch-in methods, electronic devices and computer-readable storage media

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310588506.8ACN116320141B (en)2023-05-242023-05-24 Recommended punch-in methods, electronic devices and computer-readable storage media

Publications (2)

Publication NumberPublication Date
CN116320141A CN116320141A (en)2023-06-23
CN116320141Btrue CN116320141B (en)2023-10-20

Family

ID=86785478

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310588506.8AActiveCN116320141B (en)2023-05-242023-05-24 Recommended punch-in methods, electronic devices and computer-readable storage media

Country Status (1)

CountryLink
CN (1)CN116320141B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116935504B (en)*2023-07-102024-08-13荣耀终端有限公司Card punching method, electronic device and computer readable storage medium
CN117437703B (en)*2023-10-232024-08-06北京宇音天下科技有限公司Custom task punching method, device, equipment and storage medium
CN117389745B (en)*2023-12-082024-05-03荣耀终端有限公司Data processing method, electronic equipment and storage medium
CN118967083B (en)*2024-10-112024-12-13大连恒达通通信技术有限公司Intelligent card punching terminal and card punching reminding method of Internet of things

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111092985A (en)*2018-10-232020-05-01奇酷互联网络科技(深圳)有限公司Reminding method of mobile terminal, mobile terminal and computer storage medium
CN111798584A (en)*2020-08-092020-10-20泉州征之魂智能科技服务有限公司Remote automatic attendance checking method based on mobile terminal
CN111798259A (en)*2019-04-092020-10-20Oppo广东移动通信有限公司Application recommendation method and device, storage medium and electronic equipment
CN113722029A (en)*2021-05-282021-11-30荣耀终端有限公司Context-based notification display method and apparatus
CN113962662A (en)*2021-10-272022-01-21中国银行股份有限公司Card punching reminding method and device, electronic equipment and storage medium
CN114095866A (en)*2021-11-172022-02-25中国银行股份有限公司Method and device for reminding user of checking card on work or off work
CN115240290A (en)*2022-07-282022-10-25深圳和而泰智能控制股份有限公司Attendance card punching reminding method, intelligent wearable device and attendance card punching system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111092985A (en)*2018-10-232020-05-01奇酷互联网络科技(深圳)有限公司Reminding method of mobile terminal, mobile terminal and computer storage medium
CN111798259A (en)*2019-04-092020-10-20Oppo广东移动通信有限公司Application recommendation method and device, storage medium and electronic equipment
CN111798584A (en)*2020-08-092020-10-20泉州征之魂智能科技服务有限公司Remote automatic attendance checking method based on mobile terminal
CN113722029A (en)*2021-05-282021-11-30荣耀终端有限公司Context-based notification display method and apparatus
CN113962662A (en)*2021-10-272022-01-21中国银行股份有限公司Card punching reminding method and device, electronic equipment and storage medium
CN114095866A (en)*2021-11-172022-02-25中国银行股份有限公司Method and device for reminding user of checking card on work or off work
CN115240290A (en)*2022-07-282022-10-25深圳和而泰智能控制股份有限公司Attendance card punching reminding method, intelligent wearable device and attendance card punching system

Also Published As

Publication numberPublication date
CN116320141A (en)2023-06-23

Similar Documents

PublicationPublication DateTitle
CN116320141B (en) Recommended punch-in methods, electronic devices and computer-readable storage media
KR102547894B1 (en) Dynamic Context Media Filter
CN116742841A (en)Multi-device charging user interface
CN107230046A (en)The reminding method and mobile terminal of a kind of trip information
CN114466102B (en)Method for displaying application interface, related device and traffic information display system
CN115097993B (en) Express reminder method and electronic device
CN115276190B (en)Charging reminding method, electronic device and storage medium
CN115016704B (en) Express prompting method and electronic device
CN117061658B (en)Sleep time identification method, electronic device and storage medium
CN116027941B (en)Service recommendation method and electronic equipment
CN116048317B (en)Display method and device
CN115016705B (en) Express prompting method and electronic device
CN111833163A (en) Accounting method and terminal device
WO2024061032A9 (en)Window display method and related apparatus
CN116935504B (en)Card punching method, electronic device and computer readable storage medium
CN116033064A (en) Card display method, electronic device and readable storage medium
CN115907842A (en)Product sales prediction method independent of self historical sales data and electronic equipment
CN113806041B (en)Method and device for displaying card
CN116431695B (en)Recommendation information determining method, electronic equipment and storage medium
CN118210219B (en)Alarm clock reminding method, electronic equipment and computer readable storage medium
CN115291995B (en) A message display method, related electronic equipment, and readable storage medium
CN114036954B (en)Method and device for synchronizing notification messages
CN117150067A (en)Album processing method and related device
CN114825560A (en)Charging reminding method and electronic equipment
CN116418910A (en)Method, device, equipment and storage medium for deleting list entry

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP03Change 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

CP03Change of name, title or address

[8]ページ先頭

©2009-2025 Movatter.jp