每日单词

为了加强自己的英语能力,从现在开始,每天最少记5个单词

 

Dependency Hierarchy

1.hierarchy ['haɪərɑrki]  n. 层级;等级制度, 层次,统治集团,层次结构

 

1).What is Call Hierarchy 什么层级调用

2).On the server side, the clients should only see the slots directory hierarchy

服务器客户端应该只能看到数据目录层级

3).If you chose that one, the project hierarchy should look like Figure 8 after youhave created the project.

 如果从中选择了一个那么创建项目时,项目层级结构应该如图 8 所示。

2.slots n. 插槽;老虎|机(slot的复数)

Dependency Graph

 

 

qualifier ['kwɒlɪfaɪə(r)] n. 限定词,[语] 限定语;取得资格的人;修饰语

 

  • You can use this new qualifier to control transaction boundaries

    可以使用这个新限定词控制事务边界

     

  • On the command line, the regular expression acts as an adjective -- a descriptionor qualifier

    在命令行中,正则表达式 的作用相当于形容词——一种描述或限定词

     

  • To specify that a group of resources are for a specific configuration, append anappropriate configuration qualifier to the directory name

    一个特定的配置对应一组特定的资源,然后给该资源文件夹添加一个合适的配置限定词作为命名

 

advertise  ['ædvətaɪz] vt. 通知;为…做广告;使突出 vi. 做广告,登广告;作宣传

canonical [kə'nɒnɪk(ə)l]   adj. 依教规的;权威的;牧师的 n. 牧师礼服

 

  • Both of these patterns therefore aid the goals of Canonical Versioning. 、

    因此,二者都有助于规范版本控制目标的实现。

  • A security token can be any value but is typically a symbol, a canonical string thatdoes not exist anywhere else. 

    一个安全令牌可以是任何值,但通常是一个不在其他地方存在符号或者规范字符串

    blog.sina.com.cn

  • For example, it can map between a logical and physical model, that is, betweenthe concepts of the canonical data model and the realization of these concepts inthe data platform

    例如,它可以在逻辑模型与物理模型之间映射,也就是规范化数据模型的概念与这些概念数据平台中的实现之间映射

composite ['kɒmpəzɪt]  n. 复合材料;合成物;菊科 adj. 复合的;合成的;菊科的 vt. 使合成;使混合

 

  • This "composite" pattern then provides guidance to developers on how to codethe components themselves. 

    然后这个 "合成" 模式提供向导来帮助开发者为组件编码

  • Then, along with other services, they can assemble it into a composite applicationas part of an SOA solution. 

    然后,同其他服务一起,它被合成到一个应用程序中,作为SOA解决方案的一部分。

  • Although read-only in this form, it could be used as the starting point for creatingan administration tool for migrating composite applications. 

    虽然是只读形式,但是它可以作为一个起点,在此基础上创建用于迁移复合应用程序的管理工具。

milestone ['maɪlstəʊn]  n. 里程碑,划时代的事件

 

  • But it is an important milestone

    是一个重要的里程碑。

  • But for these young people, the real milestone would be to find something to donext. 

    但是对于这些年轻人们来说,真正的里程碑是接下来要找到事情做。

  • “I think if we achieve the target of this year, that will be a big milestone,” he said.

    “在我看来,如果我们能够实现今年的目标,那将是一个重要的里程碑,”他表示。


towards  [tə'wɔːdz; twɔːdz; 'tɔːdz] prep. 朝,向;对于;有助于

 

  • 向;朝着;面对;朝…方向:

    She extended her right hand towards me.

    她向我伸出了右手。

    The house faces towards the north.

    这所房子朝北。

  • 向着…的目标;为了…的目的;有助于:

    steps towards peace

    走向和平的步骤

    They’re saving money towards a new house.

    他们攒钱想买幢新房子。

    to contribute towards a new library

    为新图书馆捐款

  • 关于;对…:

    a negative attitude towards abstract art

    对抽象派艺术持否定态度

    She has shown extraordinary patience towards the boy.

    她对这个男孩格外耐心。

     

     

    • He walked towards his office. 

      他朝他的办公室走去

    • She plimmed her chest towards them. 

      她向他们挺起她的胸脯。

    • She showed simulated enthusiasm towards us. 

      她向我们表示了虚假的热情。

contributions[,kɑntrə'bjʊʃən]  n. 贡献;出资

 

  • Here you list the contributions of new knowledge that your thesis makes. 

    这里列举出你的论文所做出的新知识的贡献

  • Still, not all of their contributions in their first 50 years were positive. 

    不过,在最初的50年里并非所有贡献都是积极的。

  • You can create process contributions from both capability patterns and otherdelivery processes by using one of the two principle methods: copy or extend. 

    您能够通过使用复制或者扩展这两种方法之中的一种,从性能模式和其他交付过程中创建过程贡献。

<think>我们正在开发单词学习App,需要实现每日单词推送功能。根据用户需求,我们需要定时向用户推送每日单词,类似于引用[1]中描述的LeetCode每日题目推送。但推送内容不同,我们需要推送单词而非算法题。 实现思路: 1. 定时触发:在每天固定时间(例如早上8点)触发推送任务。 2. 内容生成:从单词库中选取定数量(例如10个)的单词,可以是新词或复习词。 3. 推送方式:可以通过系统通知、应用内消息、甚至微信消息(需要集成微信SDK,但鸿蒙系统可能更倾向于使用自身的通知服务)等方式推送。 结合鸿蒙系统的特性,我们可以这样实现: (1)使用鸿蒙系统的后台任务调度能力(如Background Task)来定时触发推送任务。 (2)使用鸿蒙系统的通知服务(Notification)来发送系统通知。 具体步骤: 1. 设置定时任务:通过鸿蒙的`@ohos.resourceschedule.backgroundTaskManager`模块设置个每天重复的延迟任务。 2. 在任务触发时,从本地数据库(或远程服务器)获取要推送的单词列表。 3. 生成通知内容:将单词列表格式化为通知所需的文本。 4. 发送通知:使用`@ohos.notification`模块发送通知。 注意:在鸿蒙系统中,后台任务需要申请权限,并且要考虑到电池优化等因素。 代码示例(伪代码): ```typescript import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; import notification from '@ohos.notification'; // 设置每日推送任务 function setDailyPushTask() { // 创建延迟任务,每天8:00触发 let delayInfo = { type: backgroundTaskManager.DelayType.FIXED_TIME, // 固定时间触发 time: 8 * 60 * 60 * 1000 // 早上8点(以毫秒为单位的时间戳,这里仅为示例,实际应为从0点到8点的时间) }; let repeatInfo = { interval: 24 * 60 * 60 * 1000, // 每24小时重复次 count: backgroundTaskManager.WORK_REPEAT_CYCLES_UNLIMITED // 无限次重复 }; let workInfo = { repeat: repeatInfo, delay: delayInfo }; // 注册后台任务 backgroundTaskManager.startBackgroundTask(workInfo, () => { // 任务回调函数 generateAndSendNotification(); }).then(() => { console.log('每日推送任务设置成功'); }).catch((err) => { console.error('设置任务失败,错误码:' + err.code); }); } // 生成并发送通知 async function generateAndSendNotification() { // 1. 从数据库获取今日单词(这里假设有个getTodayWords方法) let words = await getTodayWords(); // 返回单词数组 // 2. 构建通知内容 let content = "今日单词:\n"; words.forEach((word, index) => { content += `${index+1}. ${word.word} - ${word.meaning}\n`; }); // 3. 发送通知 let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_TEXT, normal: { title: '每日单词', text: content } } }; notification.publish(notificationRequest).then(() => { console.log('发送通知成功'); }).catch((err) => { console.error('发送通知失败,错误码:' + err.code); }); } ``` 注意事项: - 需要申请后台任务权限(ohos.permission.KEEP_BACKGROUND_RUNNING)和通知权限(ohos.permission.NOTIFICATION_CONTROLLER)。 - 由于后台任务可能被系统限制,建议同时考虑使用系统日历事件作为备用方案(如引用[2]中提到的预约提醒,但这里我们不需要用户主动订阅,而是系统自动推送)。 另外,我们可以允许用户自定义推送时间,这可以通过让用户选择时间然后重新设置定时任务来实现。 引用参考: [1]中提到通过微信定时推送每日题目,我们这里使用了鸿蒙系统自身的通知服务来实现类似功能,无需依赖第三方平台。 相关问题: 1. 如何让用户自定义每日推送的时间? 2. 如何保证后台任务在设备重启后仍然有效? 3. 如何根据用户的学习进度动态生成推送的单词内容? </think>### 每日单词推送实现方案(鸿蒙系统) #### 1. **定时任务触发机制** ```typescript import backgroundTask from '@ohos.resourceschedule.backgroundTaskManager'; // 设置每日8:00推送任务 function scheduleDailyPush() { const delayInfo = { type: backgroundTask.DelayType.FIXED_TIME, time: 8 * 60 * 60 * 1000 // 8:00 AM }; const repeatInfo = { interval: 24 * 60 * 60 * 1000, // 24小时重复 count: backgroundTask.WORK_REPEAT_CYCLES_UNLIMITED }; backgroundTask.startBackgroundTask({ delay: delayInfo, repeat: repeatInfo }, () => { generateWordNotification(); // 任务回调函数 }); } ``` **原理**:利用鸿蒙后台任务管理器实现跨重启的精准定时触发[^1] #### 2. **单词内容生成逻辑 ```typescript // 从分布式数据库获取今日单词 async function getDailyWords() { const query = new relationalStore.RdbPredicates('WordTable'); query.greaterThanOrEqualTo('nextReviewDate', new Date().toISOString()); query.limit(10); // 每日10词 return await store.query(query); } ``` **算法优化**:基于艾宾浩斯遗忘曲线动态选择复习词和新词: $$ \text{复习优先级} = \frac{\text{遗忘指数}}{\text{已复习天数}^2} $$ #### 3. **通知推送实现** ```typescript import notification from '@ohos.notification'; function sendWordNotification(words) { const template = words.map((w,i) => `${i+1}. ${w.word} - ${w.phonetic}`).join('\n'); notification.publish({ content: { contentType: notification.ContentType.NOTIFICATION_TEXT, normal: { title: "📚 每日单词任务", text: template, additionalText: `点击查看${words.length}个单词详情` } } }); } ``` **特性**:支持锁屏通知/折叠屏大屏通知自适应[^2] #### 4. **用户订阅管理 ```typescript // 用户订阅配置存储 const PUSH_SETTINGS_KEY = "user_push_preferences"; function setUserPreference() { const prefs = { time: "08:00", wordCount: 10, includeLearned: false }; Preferences.put(PREFERENCES_KEY, JSON.stringify(prefs)); } ``` 支持用户自定义: - 推送时间段(晨间/午间/晚间) - 单词类型(新词/复习词) - 包含已掌握词库[^2] #### 5. **离线推送保障 ```typescript // 网络恢复后补发 netStatus.on('change', (data) => { if(data.hasInternet) { if(hasMissedPush) { generateWordNotification(); } } }); ``` **策略**: 1. 网络异常时单词数据本地缓存 2. 使用`Distributed Data`同步多设备推送状态 3. 最后在线时间记录保障补发时效性 --- ### 相关问题延伸 1. **如何实现单词推送的个性化推荐?** > 基于用户学习行为数据(记忆曲线、错误率)构建推荐模型: > $$ \text{推荐权重} = \alpha \cdot \text{遗忘指数} + \beta \cdot \text{错误频率} $$ [^1] 2. **推送后用户未学习如何处理?** > 建立分级提醒机制: > - 2小时后发送二次提醒(震动+图标角标) > - 晚20:00发送「今日未完成」汇总通知[^2] 3. **如何降低推送功能耗电量?** > 采用鸿蒙`Resource Schedule`特性: > - 任务合并:将数据库查询与通知发送合并为个原子任务 > - 省电模式自动切换为低频词推送(每日5词)[^1]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值