[go: up one dir, main page]

CN108846045B - Storage method and system for drinking water data of intelligent water cup - Google Patents

Storage method and system for drinking water data of intelligent water cup Download PDF

Info

Publication number
CN108846045B
CN108846045B CN201810536615.4A CN201810536615A CN108846045B CN 108846045 B CN108846045 B CN 108846045B CN 201810536615 A CN201810536615 A CN 201810536615A CN 108846045 B CN108846045 B CN 108846045B
Authority
CN
China
Prior art keywords
data
drinking water
marking
water data
drinking
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
CN201810536615.4A
Other languages
Chinese (zh)
Other versions
CN108846045A (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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Hangzhou Jiji Intellectual Property Operation 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 Hangzhou Jiji Intellectual Property Operation Co ltd filed Critical Hangzhou Jiji Intellectual Property Operation Co ltd
Priority to CN201810536615.4A priority Critical patent/CN108846045B/en
Publication of CN108846045A publication Critical patent/CN108846045A/en
Application granted granted Critical
Publication of CN108846045B publication Critical patent/CN108846045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Table Devices Or Equipment (AREA)

Abstract

本发明公开了一种智能水杯饮水数据的存储方法及系统,用于解决智能水杯河智能终端断开连接时的饮水数据存储问题,其中,该方法包括步骤:S1、获取用户的饮水数据并将所述饮水数据保存至存储区域;S2、判断是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记并进入步骤S3;S3、再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记。本发明通过在智能水杯中设置存储区域并根据饮水数据是否同步进行不同标记以有序管理饮水数据。

Figure 201810536615

The invention discloses a method and system for storing drinking water data of a smart water cup, which are used to solve the problem of storing drinking water data when an intelligent water cup and an intelligent terminal are disconnected. The drinking water data is stored in the storage area; S2, determine whether to establish a connection with an intelligent terminal, if so, synchronize the drinking water data to the intelligent terminal and perform a first marking, otherwise, perform a second marking on the drinking water data And go to step S3; S3, judge again whether to establish a connection with the intelligent terminal, if yes, synchronize the drinking water data for the second marking to the intelligent terminal and carry out the first marking. The present invention manages the drinking water data in an orderly manner by setting a storage area in the smart water cup and performing different markings according to whether the drinking water data is synchronous.

Figure 201810536615

Description

一种智能水杯饮水数据的存储方法及系统A method and system for storing drinking water data of a smart water cup

技术领域technical field

本发明涉及智能水杯领域,尤其涉及一种智能水杯饮水数据的存储方法及系统The invention relates to the field of smart water cups, in particular to a method and system for storing drinking water data of smart water cups

背景技术Background technique

水作为人赖以生存的物体之一,良好的喝水习惯可以影响到一个人的健康状态,目前大多数智能设备通常具备饮水数据的采集并通过通信技术将所采集到的饮水数据同步到智能终端中,再通过智能终端对饮水数据进行综合分析。Water is one of the objects that people rely on for survival. Good drinking habits can affect a person's health status. At present, most smart devices usually have the ability to collect drinking water data and synchronize the collected drinking water data to smart devices through communication technology. In the terminal, the drinking water data is comprehensively analyzed through the intelligent terminal.

智能水杯饮水量上报是智能水杯智能化的核心体现,然而由于各种原因会存在手机APP和智能水杯连接断开的情况,当手机APP和智能水杯断开连接后,智能水杯上的饮水记录不能及时上报到手机APP上,这时需要将这些饮水记录存储在水杯的存储区域flash上,在没有文件系统嵌入式系统上数据记录在flash上不容易保持有序。现有的类似于智能水杯的其他智能设备是有存储历史数据的功能,类似智能手环记录步数的数据,然而饮水记录和步数记录特征不一样,人的步数可以按照时间间隔统计,而饮水记录是按次来记录的,每次饮水间隔的时间段差异大,比如第一次喝水喝第二次喝水可能间隔一分钟,也可能间隔几小时,所以不能用相同间隔的数据来记录,因此当同步设备例如手机APP与智能水杯断开连接后,很难在智能水杯中有序的找到历史饮水存储数据。The reporting of the water consumption of the smart water cup is the core manifestation of the intelligence of the smart water cup. However, due to various reasons, the connection between the mobile APP and the smart water cup may be disconnected. When the mobile APP and the smart water cup are disconnected, the drinking water record on the smart water cup cannot be recorded. Report to the mobile APP in time. At this time, these drinking water records need to be stored on the flash of the storage area of the water cup. On the embedded system without a file system, it is not easy to keep the data recorded on the flash in an orderly manner. Other existing smart devices similar to smart water cups have the function of storing historical data, similar to the data recorded by smart bracelets. However, the characteristics of drinking water records and step records are different. People's steps can be counted according to time intervals. The drinking water record is recorded by time, and the time interval between each drinking water varies greatly. For example, the first drinking water and the second drinking water may be separated by one minute or several hours, so the data of the same interval cannot be used. Therefore, when a synchronization device such as a mobile phone APP is disconnected from the smart water cup, it is difficult to find historical drinking water storage data in the smart water cup in an orderly manner.

目前一些智能水杯内置专门的存储嵌入式模块,增加智能水杯的成本的同时也不能解决同步设备例如手机APP与智能水杯断开连接后,有序的找到智能水杯中历史饮水存储数据并与同步设备重新连接上后将对应的饮水数据发送到同步设备中。At present, some smart water cups have built-in special storage embedded modules, which increases the cost of smart water cups and cannot solve the problem of synchronizing devices such as mobile APP after disconnecting from smart water cups. After reconnecting, the corresponding drinking water data will be sent to the synchronization device.

发明内容SUMMARY OF THE INVENTION

本发明的目的是针对现有技术的缺陷,提供一种智能水杯饮水数据的存储方法及系统,可以在不增加智能水杯的成本下,在智能水杯与智能终端断开连接的情况下有序管理水杯的饮水数据,并在与智能终端连接后及时同步有效数据至智能终端。The purpose of the present invention is to provide a method and system for storing drinking water data of a smart water cup in view of the defects of the prior art, which can be managed in an orderly manner when the smart water cup is disconnected from the smart terminal without increasing the cost of the smart water cup The drinking data of the water cup, and the effective data is synchronized to the smart terminal in time after connecting with the smart terminal.

为了实现以上目的,本发明采用以下技术方案:In order to achieve the above purpose, the present invention adopts the following technical solutions:

一种智能水杯饮水数据的存储方法,包括步骤:A method for storing drinking water data of a smart water cup, comprising the steps of:

S1、获取用户的饮水数据并将所述饮水数据保存至存储区域;S1, obtain the drinking water data of the user and save the drinking water data to a storage area;

S2、判断是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记并进入步骤S3;S2, determine whether to establish a connection with an intelligent terminal, if so, synchronize the drinking water data to the intelligent terminal and perform a first marking, otherwise, perform a second marking on the drinking water data and enter step S3;

S3、再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记。S3. Determine again whether a connection is established with the smart terminal, and if so, synchronize the drinking water data for the second marking to the smart terminal and perform the first marking.

优选的,还包括步骤:Preferably, it also includes the steps:

在所述存储区域中建立饮水数据存储列表,其中,所述进行第二标记的饮水数据存储于表头,所述进行第一标记的饮水数据存储于表尾。A drinking water data storage list is established in the storage area, wherein the drinking water data for the second marking is stored in the header, and the drinking water data for the first marking is stored in the footer.

优选的,还包括步骤:Preferably, it also includes the steps:

根据所述饮水数据保存至所述存储区域的时间分配对应的存储地址并生成索引地址。A corresponding storage address is allocated and an index address is generated according to the time when the drinking water data is stored in the storage area.

优选的,还包括步骤:Preferably, it also includes the steps:

判断所述存储区域的空间占用是否达到预设阈值,若是,则将新的饮水数据覆盖至所述进行第一标记的饮水数据并进入步骤S2。It is judged whether the space occupation of the storage area reaches a preset threshold, and if so, the new drinking water data is overwritten to the first marked drinking water data, and the process goes to step S2.

优选的,还包括步骤:Preferably, it also includes the steps:

删除所述存储区域中进行第一标记的饮水数据。Delete the drinking water data in the storage area for the first marking.

相应的,还提供一种智能水杯饮水数据的存储系统,包括:Correspondingly, a storage system for smart water cup drinking data is also provided, including:

获取模块,用于获取用户的饮水数据并将所述饮水数据保存至存储区域;an acquisition module, used to acquire the drinking water data of the user and save the drinking water data to the storage area;

第一判断标记模块,用于判断是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记;a first judging and marking module for judging whether to establish a connection with an intelligent terminal, if so, synchronize the drinking water data to the intelligent terminal and perform a first marking, otherwise, perform a second marking on the drinking water data;

第二判断标记模块,用于再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记。The second judging and marking module is used for judging again whether to establish a connection with the smart terminal, and if so, synchronizing the drinking water data for the second marking to the smart terminal and performing the first marking.

优选的,还包括:Preferably, it also includes:

建表模块,用于在所述存储区域中建立饮水数据存储列表,其中,所述进行第二标记的饮水数据存储于表头,所述进行第一标记的饮水数据存储于表尾。The table building module is configured to create a drinking water data storage list in the storage area, wherein the drinking water data marked with the second marking is stored in the header, and the drinking water data marked with the first marking is stored in the footer.

优选的,还包括:Preferably, it also includes:

地址分配模块,用于根据所述饮水数据保存至所述存储区域的时间分配对应的存储地址并生成索引地址。The address allocation module is configured to allocate a corresponding storage address and generate an index address according to the time when the drinking water data is stored in the storage area.

优选的,还包括:Preferably, it also includes:

第三判断标记模块,用于判断所述存储区域的空间占用是否达到预设阈值,若是,则将新的饮水数据覆盖至所述进行第一标记的饮水数据。The third judging and marking module is configured to judge whether the space occupation of the storage area reaches a preset threshold, and if so, overwrite the new drinking water data to the drinking water data for which the first marking is performed.

优选的,还包括:Preferably, it also includes:

删除模块,用于删除所述存储区域中进行第一标记的饮水数据。A deletion module, configured to delete the drinking water data marked first in the storage area.

与现有技术相比,本发明可以在不增加智能水杯的成本下,有效管理用户的饮水数据,通过判断饮水数据是否同步到智能终端进行不同标记以有序管理饮水数据,并在与智能终端重新连接后快速、高效的将有效数据同步至智能终端。Compared with the prior art, the present invention can effectively manage the drinking water data of users without increasing the cost of the smart water cup. Quickly and efficiently synchronize valid data to the smart terminal after reconnection.

附图说明Description of drawings

图1为实施例一提供的一种智能水杯饮水数据的存储方法流程图;1 is a flowchart of a method for storing drinking water data of a smart water cup provided by Embodiment 1;

图2为实施例一提供的一种智能水杯饮水数据的存储系统结构图;2 is a structural diagram of a storage system for drinking water data of a smart water cup provided by Embodiment 1;

图3为实施例二提供的一种智能水杯饮水数据的存储方法流程图;3 is a flowchart of a method for storing drinking water data of a smart water cup provided in Embodiment 2;

图4为实施例二提供的一种智能水杯饮水数据的存储系统结构图。FIG. 4 is a structural diagram of a storage system for drinking water data of a smart water cup according to the second embodiment.

具体实施方式Detailed ways

以下是本发明的具体实施例并结合附图,对本发明的技术方案作进一步的描述,但本发明并不限于这些实施例。The following are specific embodiments of the present invention and the accompanying drawings to further describe the technical solutions of the present invention, but the present invention is not limited to these embodiments.

实施例一Example 1

本实施例公开了一种智能水杯饮水数据的存储方法,如图1所示,包括步骤:This embodiment discloses a method for storing drinking water data of a smart water cup, as shown in FIG. 1 , including steps:

S11、获取用户的饮水数据并将所述饮水数据保存至存储区域;S11, acquiring the drinking water data of the user and saving the drinking water data to a storage area;

S12、判断是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记并进入步骤S3;S12, judging whether to establish a connection with an intelligent terminal, if so, synchronize the drinking water data to the intelligent terminal and perform a first marking, otherwise, perform a second marking on the drinking water data and enter step S3;

S13、再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记。S13. Determine again whether a connection is established with the smart terminal, and if so, synchronize the drinking water data for the second marking to the smart terminal and perform the first marking.

为解决由于各种原因智能终端和智能水杯连接断开的情况,当智能终端和智能水杯断开连接后,智能水杯上的饮水记录不能及时上报到智能终端上,若不能及时对饮水数据进行上报,将影响智能终端对用户饮水的综合分析结果,目前当智能水杯和智能终端断开时这时通常将这些未同步的饮水记录存储在水杯的flash存储区域上,而flash存储区域通常存储了过多数据,在没有文件系统嵌入式系统上数据记录在FLASH上不容易保持有序,本实施例提供一种饮水记录有效记录在flash存储区域上并且便于同步到智能终端的方法。In order to solve the situation that the connection between the smart terminal and the smart water cup is disconnected due to various reasons, when the smart terminal and the smart water cup are disconnected, the drinking water records on the smart water cup cannot be reported to the smart terminal in time. If the drinking water data cannot be reported in time , which will affect the comprehensive analysis results of the user's drinking water by the smart terminal. At present, when the smart water cup and the smart terminal are disconnected, these unsynchronized drinking water records are usually stored in the flash storage area of the water cup. Multiple data, on an embedded system without a file system, data records on the FLASH are not easy to keep orderly. This embodiment provides a method for effectively recording drinking water records on the flash storage area and facilitating synchronization to a smart terminal.

本实施例的基本内容是先从flash存储区域上划分出一块区域作为饮水数据存储区域,步骤S11获取用户的饮水数据并把该饮水数据存储至存储区域;步骤S12判断智能水杯是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记并进入步骤S13,通过对已经同步过和未进行同步的饮水数据进行不同标记区分存储区域中哪些饮水数据是有效数据,其中,有效数据表示需要进行同步而未同步需要进行再次处理的数据,步骤S13再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记。在与智能终端建立连接的时候快速、高效的将进行第二标记的有效饮水数据同步到智能终端中,并在同步后对该数据进行第一标记,下次与智能终端断开重连时无需对该数据进行同步。The basic content of this embodiment is to first divide an area from the flash storage area as a drinking water data storage area, step S11 acquires the drinking water data of the user and stores the drinking water data in the storage area; step S12 judges whether the smart water cup is established with the smart terminal Connect, if yes, synchronize the drinking water data to the smart terminal and mark it first, otherwise, mark the drinking water data secondly and go to step S13, Different markings are performed to distinguish which drinking water data is valid data in the storage area, wherein the valid data represents the data that needs to be synchronized but needs to be processed again without synchronization. Step S13 judges again whether to establish a connection with the smart terminal, and if so, perform the The drinking water data of the second mark is synchronized to the smart terminal and the first mark is performed. Quickly and efficiently synchronize the valid drinking water data marked with the second mark to the smart terminal when establishing a connection with the smart terminal, and mark the data first after synchronization, so there is no need to disconnect and reconnect with the smart terminal next time. Synchronize this data.

优选的,还包括步骤:Preferably, it also includes the steps:

在所述存储区域中建立饮水数据存储列表,其中,所述进行第二标记的饮水数据存储于表头,所述进行第一标记的饮水数据存储于表尾。A drinking water data storage list is established in the storage area, wherein the drinking water data for the second marking is stored in the header, and the drinking water data for the first marking is stored in the footer.

通过建立饮水数据存储列表,并将进行第一标记的饮水数据存储至表尾和进行第二标记的饮水数据存储至表头,同时将这个区域存储数据索引头和数据索引尾,数据头和数据尾,数据头中存储数据有效性标志,用于记录当前记录的数据是否有效,当记录数据在该区域后,标记数据为有效,当取出这个数据时,标记这个数据为无效。当智能水杯和APP断开连接后,数据记录到数据区,智能水杯和APP建立连接后同步数据,并把同步后的数据标记为无效。By establishing a drinking water data storage list, store the drinking water data marked with the first mark in the footer and the drinking water data marked with the second mark in the table header, and store the data index header and data index tail, data header and data in this area at the same time. At the end, a data validity flag is stored in the data header, which is used to record whether the currently recorded data is valid. When the recorded data is in this area, the data is marked as valid, and when the data is taken out, the data is marked as invalid. When the smart water cup is disconnected from the APP, the data is recorded in the data area. After the smart water cup and the APP are connected, the data is synchronized, and the synchronized data is marked as invalid.

数据头从flash存储区域划分的历史数据存储区的0地址开始,数据地址分布为:The data header starts from address 0 of the historical data storage area divided by the flash storage area, and the data addresses are distributed as follows:

Figure BDA0001677955480000051
Figure BDA0001677955480000051

优选的,还包括步骤:Preferably, it also includes the steps:

根据所述饮水数据保存至所述存储区域的时间分配对应的存储地址并生成索引地址。A corresponding storage address is allocated and an index address is generated according to the time when the drinking water data is stored in the storage area.

智能水杯中存储的饮水数据有时间先后,部分存储时间过久的饮水数据可能是无用数据也可能是有用的数据,为了方便用户更快的查询、处理相关的饮水数据,本实施例通过在存储列表中根据饮水数据的不同标记和不同时间进行排列并生成索引地址。The drinking water data stored in the smart water cup has a chronological order, and some drinking water data stored for a long time may be useless data or useful data. In order to facilitate users to query and process related drinking water data faster, this The list is arranged according to different marks and different times of drinking water data, and index addresses are generated.

优选的,还包括步骤:Preferably, it also includes the steps:

判断所述存储区域的空间占用是否达到预设阈值,若是,则将新的饮水数据覆盖至所述进行第一标记的饮水数据并进入步骤S2。It is judged whether the space occupation of the storage area reaches a preset threshold, and if so, the new drinking water data is overwritten to the first marked drinking water data, and the process goes to step S2.

由于智能水杯中存储区域空间有限,为了防止智能水杯和智能终端长时间未进行同步而空间过小新的饮水数据没办法存储的情况,本实施例通过在存储区域的占用空间达到预设阈值时,将接收到的新的饮水数据覆盖至进行第一标记的饮水数据并对该饮水数据进行同步、标记等。Due to the limited space in the storage area of the smart water cup, in order to prevent the smart water cup and the smart terminal from being synchronized for a long time and the space is too small to store new drinking water data, in this embodiment, when the occupied space of the storage area reaches a preset threshold , the received new drinking water data is overwritten to the drinking water data for which the first marking is performed, and the drinking water data is synchronized, marked, and the like.

相应的,本实施例还还提供一种智能水杯饮水数据的存储系统,如图2所示包括:Correspondingly, this embodiment also provides a storage system for drinking water data of a smart water cup, as shown in FIG. 2 , including:

获取模块11,用于获取用户的饮水数据并将所述饮水数据保存至存储区域;an acquisition module 11, configured to acquire the drinking water data of the user and save the drinking water data to the storage area;

第一判断标记模块12,用于判断是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记;The first judgment marking module 12 is used for judging whether to establish a connection with an intelligent terminal, if so, synchronize the drinking water data to the intelligent terminal and perform a first marking, otherwise, perform a second marking on the drinking water data;

第二判断标记模块13,用于再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记。The second judging and marking module 13 is configured to judge again whether to establish a connection with the smart terminal, and if so, synchronize the drinking water data for the second marking to the smart terminal and perform the first marking.

优选的,还包括:Preferably, it also includes:

建表模块,用于在所述存储区域中建立饮水数据存储列表,其中,所述进行第二标记的饮水数据存储于表头,所述进行第一标记的饮水数据存储于表尾。The table building module is configured to create a drinking water data storage list in the storage area, wherein the drinking water data marked with the second marking is stored in the header, and the drinking water data marked with the first marking is stored in the footer.

优选的,还包括:Preferably, it also includes:

地址分配模块,用于根据所述饮水数据保存至所述存储区域的时间分配对应的存储地址并生成索引地址。The address allocation module is configured to allocate a corresponding storage address and generate an index address according to the time when the drinking water data is stored in the storage area.

优选的,还包括:Preferably, it also includes:

第三判断标记模块,用于判断所述存储区域的空间占用是否达到预设阈值,若是,则将新的饮水数据覆盖至所述进行第一标记的饮水数据并进入步骤S2。The third judging and marking module is used to judge whether the space occupation of the storage area reaches a preset threshold, and if so, overwrite the new drinking water data to the drinking water data for the first marking and enter step S2.

本实施例在不增加智能水杯的成本下,有效管理用户的饮水数据,通过判断饮水数据是否同步到智能终端进行不同标记以有序管理饮水数据,并在与智能终端重新连接后快速、高效的将有效数据同步至智能终端。This embodiment effectively manages the user's drinking water data without increasing the cost of the smart water cup, and manages the drinking water data in an orderly manner by judging whether the drinking water data is synchronized to the smart terminal for different markings, and quickly and efficiently after reconnecting with the smart terminal. Synchronize valid data to smart terminals.

实施例二Embodiment 2

本实施例提供一种智能水杯饮水数据的存储方法,与实施例一不同的是,本实施例还包括步骤S24,通过删除无效的饮水数据释放存储区域的内存空间,保持存储稳定和流畅状态,如图3所示,包括步骤:This embodiment provides a method for storing drinking water data of a smart water cup. Different from the first embodiment, this embodiment further includes step S24, freeing the memory space of the storage area by deleting invalid drinking water data, and maintaining a stable and smooth storage state, As shown in Figure 3, it includes steps:

S21、获取用户的饮水数据并将所述饮水数据保存至存储区域;S21, obtaining the drinking water data of the user and saving the drinking water data to a storage area;

S22、判断是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记并进入步骤S3;S22, judging whether to establish a connection with an intelligent terminal, if yes, synchronize the drinking water data to the intelligent terminal and perform a first marking, otherwise, perform a second marking on the drinking water data and enter step S3;

S23、再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记;S23, judging again whether to establish a connection with the smart terminal, and if so, synchronizing the drinking water data for the second marking to the smart terminal and performing the first marking;

S24、删除所述存储区域中进行第一标记的饮水数据。S24. Delete the drinking water data in the storage area for which the first marking is performed.

优选的,还包括步骤:Preferably, it also includes the steps:

在所述存储区域中建立饮水数据存储列表,其中,所述进行第二标记的饮水数据存储于表头,所述进行第一标记的饮水数据存储于表尾。A drinking water data storage list is established in the storage area, wherein the drinking water data for the second marking is stored in the header, and the drinking water data for the first marking is stored in the footer.

优选的,还包括步骤:Preferably, it also includes the steps:

根据所述饮水数据保存至所述存储区域的时间分配对应的存储地址并生成索引地址。A corresponding storage address is allocated and an index address is generated according to the time when the drinking water data is stored in the storage area.

优选的,还包括步骤:Preferably, it also includes the steps:

判断所述存储区域的空间占用是否达到预设阈值,若是,则将新的饮水数据覆盖至所述进行第一标记的饮水数据。It is judged whether the space occupation of the storage area reaches a preset threshold, and if so, the new drinking water data is overwritten to the drinking water data for which the first marking is performed.

优选的,还包括步骤:Preferably, it also includes the steps:

相应的,本实施例还提供一种智能水杯饮水数据的存储系统,与实施例一不同的是,本实施例还包括删除模块24,如图4所示,包括:Correspondingly, this embodiment also provides a storage system for drinking water data of a smart water cup. Different from Embodiment 1, this embodiment further includes a deletion module 24, as shown in FIG. 4, including:

获取模块21,用于获取用户的饮水数据并将所述饮水数据保存至存储区域;an acquisition module 21, configured to acquire the drinking water data of the user and save the drinking water data to the storage area;

第一判断标记模块22,用于判断是否与智能终端建立连接,若是,则将所述饮水数据同步至所述智能终端并进行第一标记,否则,对所述饮水数据进行第二标记;The first judgment marking module 22 is used for judging whether to establish a connection with an intelligent terminal, if so, synchronize the drinking water data to the intelligent terminal and perform a first marking, otherwise, perform a second marking on the drinking water data;

第二判断标记模块23,用于再次判断是否与智能终端建立连接,若是,则将所述进行第二标记的饮水数据同步至所述智能终端并进行第一标记;The second judgment marking module 23 is used to judge again whether to establish a connection with the smart terminal, and if so, synchronize the drinking water data for the second marking to the smart terminal and perform the first marking;

删除模块24,用于删除所述存储区域中进行第一标记的饮水数据The deletion module 24 is used to delete the drinking water data for the first marking in the storage area

优选的,还包括:Preferably, it also includes:

建表模块,用于在所述存储区域中建立饮水数据存储列表,其中,所述进行第二标记的饮水数据存储于表头,所述进行第一标记的饮水数据存储于表尾。The table building module is configured to create a drinking water data storage list in the storage area, wherein the drinking water data marked with the second marking is stored in the header, and the drinking water data marked with the first marking is stored in the footer.

优选的,还包括:Preferably, it also includes:

地址分配模块,用于根据所述饮水数据保存至所述存储区域的时间分配对应的存储地址并生成索引地址。The address allocation module is configured to allocate a corresponding storage address and generate an index address according to the time when the drinking water data is stored in the storage area.

优选的,还包括:Preferably, it also includes:

第三判断标记模块,用于判断所述存储区域的空间占用是否达到预设阈值,若是,则将新的饮水数据覆盖至所述进行第一标记的饮水数据。The third judging and marking module is configured to judge whether the space occupation of the storage area reaches a preset threshold, and if so, overwrite the new drinking water data to the drinking water data for which the first marking is performed.

本实施例通过删除无效的饮水数据释放存储区域的内存空间,保持存储稳定和流畅状态In this embodiment, the memory space of the storage area is released by deleting invalid drinking water data, and the storage is stable and smooth.

本文中所描述的具体实施例仅仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which the present invention pertains can make various modifications or additions to the described specific embodiments or substitute in similar manners, but will not deviate from the spirit of the present invention or go beyond the definition of the appended claims range.

Claims (8)

1. A storage method of drinking water data of an intelligent water cup is characterized by comprising the following steps:
s1, obtaining drinking water data of a user and storing the drinking water data into a storage area, wherein the area stores a data index head, a data index tail, a data head and a data tail, a data validity mark is stored in the data head, when the data is recorded in the area, the data is marked to be valid, when the data is taken out, the data is marked to be invalid, a drinking water data storage list is established in the storage area, the drinking water data with a first mark is stored in the table tail, and the drinking water data with a second mark is stored in the table head;
s2, judging whether connection with an intelligent terminal is established or not, if so, synchronizing the drinking water data to the intelligent terminal and marking the drinking water data by a first marker, otherwise, marking the drinking water data by a second marker and entering the step S3;
and S3, judging whether connection with the intelligent terminal is established again, if so, synchronizing the drinking water data subjected to the second marking to the intelligent terminal and carrying out the first marking.
2. The method for storing drinking water data of the intelligent water cup as claimed in claim 1, further comprising the steps of:
and distributing a corresponding storage address according to the time for storing the drinking water data into the storage area and generating an index address.
3. The method for storing drinking water data of the intelligent water cup as claimed in claim 1, further comprising the steps of:
and judging whether the space occupation of the storage area reaches a preset threshold value, if so, covering new drinking water data to the drinking water data marked by the first mark, and entering the step S2.
4. The method for storing drinking water data of the intelligent water cup as claimed in claim 1, further comprising the steps of:
and deleting the drinking water data subjected to the first marking in the storage area.
5. The utility model provides a storage system of intelligence drinking cup drinking water data which characterized in that includes:
the water drinking device comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring water drinking data of a user and storing the water drinking data into a storage area, the area stores a data index head and a data index tail, and a data head and a data tail, the data head stores a data validity mark, when the data is recorded in the area, the data is marked to be valid, and when the data is taken out, the data is marked to be invalid;
the table building module is used for building a drinking water data storage list in the storage area, storing the drinking water data with the first mark at the tail of the table, and storing the drinking water data with the second mark at the head of the table;
the first judgment marking module is used for judging whether connection with an intelligent terminal is established or not, if so, the drinking water data is synchronized to the intelligent terminal and first marking is carried out, and otherwise, second marking is carried out on the drinking water data;
and the second judgment marking module is used for judging whether connection with the intelligent terminal is established again, and if so, synchronizing the drinking water data subjected to the second marking to the intelligent terminal and carrying out the first marking.
6. The system for storing drinking data of the smart cup as claimed in claim 5, further comprising:
and the address allocation module is used for allocating a corresponding storage address according to the time for storing the drinking water data in the storage area and generating an index address.
7. The system for storing drinking data of the smart cup as claimed in claim 5, further comprising:
and the third judgment marking module is used for judging whether the space occupation of the storage area reaches a preset threshold value, if so, covering new drinking water data to the drinking water data marked by the first mark and entering the step S2.
8. The system for storing drinking data of the smart cup as claimed in claim 5, further comprising:
and the deleting module is used for deleting the drinking water data subjected to the first marking in the storage area.
CN201810536615.4A 2018-05-30 2018-05-30 Storage method and system for drinking water data of intelligent water cup Active CN108846045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810536615.4A CN108846045B (en) 2018-05-30 2018-05-30 Storage method and system for drinking water data of intelligent water cup

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810536615.4A CN108846045B (en) 2018-05-30 2018-05-30 Storage method and system for drinking water data of intelligent water cup

Publications (2)

Publication Number Publication Date
CN108846045A CN108846045A (en) 2018-11-20
CN108846045B true CN108846045B (en) 2022-10-18

Family

ID=64210008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810536615.4A Active CN108846045B (en) 2018-05-30 2018-05-30 Storage method and system for drinking water data of intelligent water cup

Country Status (1)

Country Link
CN (1) CN108846045B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4320455A (en) * 1978-01-09 1982-03-16 Honeywell Information Systems Inc. Queue structure for a data processing system
US5893162A (en) * 1997-02-05 1999-04-06 Transwitch Corp. Method and apparatus for allocation and management of shared memory with data in memory stored as multiple linked lists
CN1681248A (en) * 2004-04-06 2005-10-12 三星电子株式会社 Method and system for transmitting data for data synchronization between server and client
CN101075864A (en) * 2007-07-16 2007-11-21 腾讯科技(深圳)有限公司 Method for synchronizing and processing data, customer terminal equipment and servo
CN101325478A (en) * 2008-08-06 2008-12-17 北京北纬通信科技股份有限公司 Method and system for data synchronization
CN101984413A (en) * 2010-11-17 2011-03-09 上海顶竹通讯技术有限公司 Method and device for synchronizing data queues of different devices
CN105022712A (en) * 2015-06-18 2015-11-04 哈尔滨工业大学 Data stream transmission based data packet extracting method
CN107346289A (en) * 2016-05-05 2017-11-14 北京自动化控制设备研究所 A Method of Using Circular Queue to Buffer Data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7895431B2 (en) * 2004-09-10 2011-02-22 Cavium Networks, Inc. Packet queuing, scheduling and ordering
US7650471B2 (en) * 2006-01-06 2010-01-19 Hewlett-Packard Development Company, L.P. Head of queue cache for communication interfaces
CN101470623B (en) * 2007-12-26 2011-02-16 无锡江南计算技术研究所 Queue management method and queue management device, method and system for processing queue message
CN101931633B (en) * 2010-09-29 2013-11-06 山东大学 Incremental synchronization method applied to intelligent mobile phone terminal
CN103561458B (en) * 2013-10-18 2018-03-02 上海斐讯数据通信技术有限公司 A kind of method and system of synchrodata to Bluetooth watch

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4320455A (en) * 1978-01-09 1982-03-16 Honeywell Information Systems Inc. Queue structure for a data processing system
US5893162A (en) * 1997-02-05 1999-04-06 Transwitch Corp. Method and apparatus for allocation and management of shared memory with data in memory stored as multiple linked lists
CN1681248A (en) * 2004-04-06 2005-10-12 三星电子株式会社 Method and system for transmitting data for data synchronization between server and client
CN101075864A (en) * 2007-07-16 2007-11-21 腾讯科技(深圳)有限公司 Method for synchronizing and processing data, customer terminal equipment and servo
CN101325478A (en) * 2008-08-06 2008-12-17 北京北纬通信科技股份有限公司 Method and system for data synchronization
CN101984413A (en) * 2010-11-17 2011-03-09 上海顶竹通讯技术有限公司 Method and device for synchronizing data queues of different devices
CN105022712A (en) * 2015-06-18 2015-11-04 哈尔滨工业大学 Data stream transmission based data packet extracting method
CN107346289A (en) * 2016-05-05 2017-11-14 北京自动化控制设备研究所 A Method of Using Circular Queue to Buffer Data

Also Published As

Publication number Publication date
CN108846045A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
TWI516950B (en) System and method for sharing real-time recording
CN104301340B (en) The method and system carried out data transmission in mobile network
CN106445414A (en) Method and system for expanding available storage space of terminal equipment
CN101998682A (en) Device and method for acquiring service content by personal network equipment and related device thereof
CN106789591B (en) Information sharing method and system based on wearable device
CN103440346A (en) Electronic business card exchanging method based on face identification by mobile terminal
CN105630629A (en) Data backup method and system
CN108846045B (en) Storage method and system for drinking water data of intelligent water cup
CN209526810U (en) A kind of binocular camera data transmission system
CN105589662B (en) A kind of GNSS receiver data storage and management method
CN105554051A (en) Method for rapid photo album synchronization in household cloud service
CN110365797B (en) Method and device for synchronizing contact information
CN102722373A (en) Method for recording painting process of a player by Flash painting software
CN103134520A (en) Pedometer equipment supporting automatic micro-blog data synchronization and synchronization method of pedometer equipment
CA2655812A1 (en) Method and apparatus for management of common side information
CN104837053A (en) Family sharing system and information push method thereof
CN207083147U (en) Calling record system
WO2016115792A1 (en) Method and apparatus for managing terminal operation records
CN110430105A (en) Smart machine control method, system, computer equipment and readable storage medium storing program for executing
CN108710873A (en) It is a kind of based on the student of image recognition in school attendance checking system
CN204392485U (en) A kind of wireless network intercom system
CN105681524B (en) A quick way to share short-distance contacts
RU2010131947A (en) IMPROVED PRESENCE CONTROL SERVER SYSTEM
CN105635399A (en) Method and system for adding contact person
CN111918246A (en) Method for providing sharing service of wireless local area network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190410

Address after: 201616 No. 3666 Sixian Road, Songjiang District, Shanghai

Applicant after: PHICOMM (SHANGHAI) Co.,Ltd.

Address before: 610100 125 Longquan Street Park Road, Longquanyi District, Chengdu, Sichuan.

Applicant before: Sichuan fixun Information Technology Co.,Ltd.

TA01 Transfer of patent application right

Effective date of registration: 20201110

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Applicant before: Phicomm (Shanghai) Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230104

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A storage method and system for intelligent water cup drinking water data

Granted publication date: 20221018

Pledgee: Huzhou Wuxing Rural Commercial Bank Co.,Ltd. high tech Zone Green sub branch

Pledgor: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Registration number: Y2024980049070