Pushing method for breast pumping plan and electronic equipment
By analyzing and pushing the reminder information of the breast pumping plan locally on electronic devices, the problems of high server resource consumption and resetting reminder parameters in the existing technology are solved, and the effect of personalized push and reducing the burden on the server is achieved.
Patent Information
- Application Number
- CN202311793864.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-06-24
AI Technical Summary
The existing breast pump push reminder method relies on server resources to consume a lot, and the breast pumping plan needs to be reset when replacing the device.
By obtaining preset reminder information generated by user personalized settings from the server, analyzing reminder parameters and message content, and pushing message content locally on electronic devices, reducing server resource consumption, and no need to reset reminder parameters and message content when the device is replaced.
It realizes personalized content customization, reduces server resource consumption, and avoids the need to reset reminder parameters and message content when the device is replaced.
Smart Images

Figure CN120201081A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of information push, and in particular, to a push method and an electronic device for a milk pumping plan. Background Art
[0002] At present, after a breast pump is bound to an electronic device as an Internet of Things device, the electronic device can provide a milk pumping reminder function for the user. There are two methods for reminding the user. One is the information reminder from a remote server, and the other is the information reminder based on a local notification application. In these two reminder methods, each information reminder from the server needs to rely on the server, resulting in excessive resource consumption of the server. For example, since the needs and situations of each mother are different, the time and cycle of the milk pumping reminder need to be set individually. If completely relying on the server for pushing, due to the difference in the user's push time, the number of server pushes is very large, which may lead to a large amount of server resource consumption. The local notification method needs to be reset when changing devices, which is not conducive to customizing a new milk pumping plan at any time. Summary of the Invention
[0003] The present application provides a push method and an electronic device for a milk pumping plan, which can reduce the consumption of the server and do not require resetting the milk pumping plan when changing devices.
[0004] The present application provides a push method for a milk pumping plan. The push method includes obtaining preset reminder information corresponding to user information from a server, where the preset reminder information includes reminder parameters and message content generated based on user settings; parsing the preset reminder information and obtaining the reminder parameters and the message content; and pushing the message content to the user based on the reminder parameters.
[0005] Among them, the reminder parameters include a reminder cycle parameter and a reminder time parameter. Pushing the message content to the user based on the reminder parameters includes determining a time cycle based on the reminder cycle parameter and determining a reminder time based on the reminder time parameter; and pushing the message content to the user at the time cycle and the reminder time.
[0006] Among them, the reminder period parameter includes a first binary period parameter, the time period includes at least a first time period and a second time period, and determining the time period based on the reminder period parameter includes performing a shift process on the second binary period parameter corresponding to the first time period to obtain a third binary period parameter corresponding to the second time period; respectively obtaining the AND operation results of the first binary period parameter, the second binary period parameter, and the third binary period parameter; in response to the data on the binary bit corresponding to the first time period in the AND operation result being 1, storing the first time period; in response to the data on the binary bit corresponding to the second time period in the AND operation result being 1, storing the second time period; wherein, the moving length of the shift process is the period length between the first time period and the second time period.
[0007] Among them, the first time period includes Sundays, and the second time period includes Mondays to Saturdays.
[0008] Among them, the reminder period parameter includes a first binary period parameter, the time period includes Sundays and Saturdays, and determining the time period based on the reminder period parameter includes performing a shift process on the second binary period parameter corresponding to Sundays to obtain a third binary period parameter corresponding to Saturdays; obtaining the OR operation result of the second binary period parameter corresponding to Sundays and the third binary period parameter corresponding to Saturdays; in response to the first binary period parameter being the same as the OR operation result, determining that the time period is Sundays and Saturdays.
[0009] Among them, the reminder period parameter includes a first binary period parameter, the time period includes the whole week, and determining the time period based on the reminder period parameter includes performing a full-period length shift process on the second binary period parameter corresponding to Sundays to obtain a fourth binary period parameter; obtaining the XOR operation result of the fourth binary period parameter and a preset binary period parameter; in response to the first binary period parameter being the same as the XOR operation result, determining that the time period is the whole week.
[0010] Among them, after determining the time period based on the reminder period parameter, based on the reminder parameter to push the message content to the user further includes displaying the time period.
[0011] Among them, the preset reminder information further includes a push permission generated based on the user settings, and parsing the preset reminder information further includes parsing the preset reminder information and obtaining the push permission; before the step of pushing the message content to the user based on the reminder parameter, the push method further includes judging the status of the push permission; in response to the push permission being in the enabled state, performing the step of pushing the message content to the user based on the reminder parameter.
[0012] Among them, the push method further includes in response to the user updating the preset reminder information, sending the updated preset reminder information to the server.
[0013] The present application provides an electronic device, which includes a memory and a processor. The memory stores computer program instructions, and the processor executes the computer program instructions to implement the above-mentioned pushing method.
[0014] The beneficial effects of the present application are as follows: The pushing method of the milk pumping plan in the present application includes obtaining preset reminder information corresponding to user information from a server, where the preset reminder information includes reminder parameters and message content set by the user; parsing the preset reminder information, and obtaining the reminder parameters and message content; and pushing the message content to the user based on the reminder parameters. That is, the electronic device obtains preset reminder information containing information such as reminder parameters and message content generated by the user's personalized settings from the server to meet the user's different requirements for pushing cycles, reminder content, etc. Moreover, the electronic device obtains the preset reminder information from the server, obtains the reminder parameters and message content after data parsing on the electronic device, and then pushes the message content to the user based on the reminder parameters, that is, it does not require the server to consume resources for data parsing, remote pushing, etc. In addition, the server can save the preset reminder information set by the user. When the user replaces the electronic device, the new electronic device can obtain the preset reminder information from the server and perform parsing and other operations without the user having to reset the reminder parameters and message content. Therefore, the pushing method for the milk pumping plan provided by the present application can meet the user's personalized content customization to achieve personalized pushing for the user, while reducing the consumption of server resources, and does not require resetting the preset reminder information when replacing the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings, where:
[0016] Figure 1 is a flowchart of an embodiment of the pushing method for the milk pumping plan provided by the present application;
[0017] Figure 2 is a flowchart of an embodiment of step S130 in the pushing method for the milk pumping plan provided by the present application;
[0018] Figure 3 is a flowchart of an embodiment of step S132 in the pushing method for the milk pumping plan provided by the present application;
[0019] Figure 4 is a flowchart of another embodiment of step S132 in the pushing method for the milk pumping plan provided by the present application;
[0020] Figure 5 It is a schematic flowchart of another embodiment of step S132 in the push method for the milk pumping plan provided by the present application;
[0021] Figure 6 It is a schematic structural diagram of an embodiment of an electronic device provided by the present application;
[0022] Figure 7 It is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application. Detailed implementation manners
[0023] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0024] It should be noted that if there are directional indications (such as up, down, left, right, front, back...) involved in the embodiments of the present application, the directional indications are only used to explain the relative position relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0025] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present application.
[0026] The present application provides a push method for a milk pumping plan. The push method belongs to a local push method, and the execution subject of the push method is an electronic device. The push method for the milk pumping plan provided by the present application can save the push data set by the user to the server, achieve synchronization of multiple electronic devices, obtain the push data from the server every time it is used, and parse these push data locally, thereby reducing the consumption of server resources and meeting personalized needs at the same time.
[0027] Refer to Figure 1 , Figure 1It is a schematic flowchart of an embodiment of the push method for the milk pumping plan provided by this application. As Figure 1 shown, the push method includes the following steps:
[0028] Step S110: Obtain preset reminder information corresponding to the user information from the server. The preset reminder information includes reminder parameters and message content generated based on the user's settings.
[0029] Understandably, after the user establishes an account corresponding to the user information, sets reminder parameters related to the push cycle, time, etc. of the milk pumping plan, sets message content related to the milk pumping plan, etc., finally the reminder parameters and message content are assembled into preset reminder information, and the preset reminder information is sent to the server for storage. After that, each time the electronic device is used, the preset reminder information corresponding to the user is downloaded from the server. After replacing the electronic device, the preset reminder information can be obtained from the server without the user having to set it up again. Among them, the user information can be a user account established according to the mobile phone number, or the user information is a user account established according to the user name, or the user information is the number of the breast pump when the electronic device is interconnected with the breast pump, etc.
[0030] Step S120: Analyze the preset reminder information and obtain the reminder parameters and message content.
[0031] Analyze the preset reminder information obtained from the server and obtain the reminder parameters and message content. Among them, the reminder parameters can be reminder parameters associated with the push cycle, push time, etc., and the message content is the content that the user sets to be pushed. Understandably, what the electronic device obtains from the server is a data packet related to the push, rather than the push information or push content.
[0032] Step S130: Push the message content to the user based on the reminder parameters.
[0033] Push the message content to the user based on the reminder parameters. Among them, the reminder parameters can include time, cycle, etc., and the message content is pushed to the user at the corresponding cycle and / or time. Among them, the message content is not limited to milk pumping, and can also be content such as breast pump cleaning, disinfection, etc., and can also be message content such as taking medicine, drinking water, exercising, etc.
[0034] The method for pushing the milk pumping plan of this application includes obtaining preset reminder information corresponding to user information from a server. Among them, the preset reminder information includes reminder parameters and message content set by the user; parsing the preset reminder information and obtaining the reminder parameters and message content; and pushing the message content to the user based on the reminder parameters. That is, the electronic device obtains the preset reminder information containing reminder parameters, message content, etc. generated by the user's personalized settings from the server to meet the user's different requirements such as push cycles and reminder content. Moreover, the electronic device obtains the preset reminder information from the server, obtains the reminder parameters and message content after data parsing on the electronic device, and then pushes the message content to the user based on the reminder parameters, that is, there is no need for the server to consume resources for data parsing, remote pushing, etc. In addition, the server can save the preset reminder information set by the user. When the user replaces the electronic device, the new electronic device can obtain the preset reminder information from the server and perform parsing and other operations without the user having to reset the reminder parameters and message content. Therefore, the method for pushing the milk pumping plan provided by this application can meet the user's personalized content customization to achieve personalized pushing for the user, while reducing the consumption of server resources, and there is no need to reset the preset reminder information when replacing the electronic device.
[0035] In other embodiments, the user re-customizes the milk pumping plan as needed, that is, the reminder parameters and message content generated based on the user's settings will be updated. The electronic device stores the updated reminder parameters and message content, and at the same time updates the preset reminder information. The electronic device responds to the user's update of the preset reminder information and sends the updated preset reminder information to the server to synchronize and update the preset reminder information, so that the updated preset reminder information can be obtained after replacing the electronic device.
[0036] In other embodiments, the user can also set the preset reminder information according to requirements such as vibration push or ringtone push.
[0037] Optionally, the reminder parameters include a reminder cycle parameter and a reminder time parameter. Among them, the reminder cycle parameter includes the cycle for pushing the message content to the user set by the user, or rather, the reminder cycle parameter includes the specific dates set by the user for pushing the message content to the user. For example, the reminder cycle can be a reminder cycle set in ways such as daily, weekly, monthly, etc., and the reminder cycle parameter includes the dates of pushing the message content to the user on the 1st and 3rd of each month. The reminder time parameter protects the specific time point set by the user for pushing the message content to the user. The message content refers to the itinerary, event, etc. message content customized by the user that needs to be reminded. Refer to Figure 2 , Figure 2 is a schematic flowchart of an embodiment of step S130 in the method for pushing the milk pumping plan provided by this application. As Figure 2 shown, step S130 includes the following steps:
[0038] Step S131: Determine a time period based on the reminder period parameter and determine the reminder time based on the reminder time parameter.
[0039] Determine the time period according to the reminder period parameter set by the user, that is, determine the specific push date. Among them, the time period can be any one day, two days, etc. in a week, for example, Monday and Friday; or the time period can be any one day, two days, etc. in a month, for example, the 1st, 15th, 20th of each month. Determine the reminder time based on the reminder time parameter, where the reminder time can be one or more reminder times within a day.
[0040] Step S132: Push the message content to the user at the time period and reminder time.
[0041] Push the message content to the user when the time period and reminder time set by the user are reached. For example, if the time period set by the user is every day and the reminder time set by the user is 3 pm, then push the message content to the user at 3 pm every day; if the time period set by the user is the 1st, 3rd, and 5th, and the reminder time set by the user is 10 am and 3 pm, then push the message content to the user at 10 am and 3 pm on the 1st, 3rd, and 5th of each month.
[0042] The reminder parameters in this embodiment include a reminder period parameter and a reminder time parameter. Among them, in this embodiment, the specific time period for pushing the message content to the user is determined through the reminder period parameter, and the specific time for pushing the message content to the user is determined through the reminder time parameter, which can meet the personalized customization needs of users. In addition, the reminder period parameter can include not only one time period, but also multiple time periods, and the reminder time parameter can include one or more reminder times, that is, one reminder period parameter can represent multiple time periods, and one reminder time parameter can represent multiple reminder times, which can save the storage resources of the server.
[0043] Optionally, the reminder period parameter includes a first binary period parameter, and the time period includes at least a first time period and a second time period. Among them, the reminder period parameter can be converted into a binary number to obtain the first binary period parameter. Each binary bit in the first binary period parameter represents a time period state. For example, when the push period is monthly, there are at most 31 days in a month, and 31 binary bits can be set. When the position is 1, it means that the date corresponding to this bit needs to be pushed, and when the position is 0, it means that the date corresponding to this bit does not need to be pushed. The first time period represents a certain day in the push period when the week or month is used as the entire push period. For example, when the push period is "week", the first time period can be any day from Monday to Sunday; when the push period is "month", the first time period can be any day from the 1st to the 31st, etc. The first time period can be used as the reference point for the push time, and the second time period represents any one or more days outside the first time period. For example, if the first time period represents Monday, then the second time period represents one or more days from Tuesday to Saturday; if the first time period represents the 1st day, then the second time period represents one or more days from the 2nd to the 31st.
[0044] Refer to Figure 3 , Figure 3 is a schematic flowchart of an embodiment of step S132 in the push method for the milk pumping plan provided by the present application. As Figure 3 shown, step S132 includes the following steps:
[0045] Step S21: Perform a shift operation on the second binary period parameter corresponding to the first time period to obtain a third binary period parameter corresponding to the second time period.
[0046] Define the binary data corresponding to the first time period as the second binary period parameter. Performing a shift operation on the second binary period parameter means shifting the data bits with a value of 1 on the second binary period parameter to the left or right. The bits with a value of 1 on the second binary period parameter change to obtain the third binary period parameter corresponding to the second time period. To improve the operation efficiency, the shift operation in this embodiment preferably uses a left shift operation. The first binary period parameter uses the states of different bits to represent whether the time period corresponding to that bit needs to push message content to the user. Correspondingly, the second binary period parameter uses the corresponding position set to 1 to represent the first time period, and the bits set to 1 in the third binary period parameter are different from those in the second binary period parameter.
[0047] Among them, the moving length of the shifting process is the cycle length between the first time period and the second time period. For example, if the second binary period parameter is 0001, after performing a left shift operation with a length of 1 on 0001, we get 0010, so the third binary period parameter is 0010. After performing a left shift operation with a length of 2 on 0010, we get 0100, so the third binary period parameter is 0100.
[0048] Step S22: Obtain the AND operation results of the first binary period parameter, the second binary period parameter, and the third binary period parameter respectively.
[0049] Obtain the AND operation result of the first binary period parameter and the second binary period parameter, then perform a shifting process on the second binary period parameter to obtain the third binary period parameter, and then obtain the AND operation result of the first binary period parameter and the third binary period parameter. For example, if the first binary period parameter is 1101, the second binary period parameter is 0001, and the third binary period parameter is 0010, then the AND operation result of the first binary period parameter and the second binary period parameter is: 1101 & 0001 = 0001; after shifting the second binary period parameter 1 bit to the left, we get 0010, and the AND operation result of the first binary period parameter and the third binary period parameter is: 1101 & 0010 = 0010.
[0050] Step S23: In response to the data on the binary bit corresponding to the first time period in the AND operation result being 1, store the first time period.
[0051] It can be known that during the "AND" operation process, when both corresponding bits are 1, the result is 1. Then, if the data on the binary bit corresponding to the first time period in the AND operation result is 1, it means that the first time period needs to push message content to the user. Store the first time period to push message content to the user during this first time period. Continuing to refer to 1101 & 0001 = 0001, the AND operation result is 0001, and the second binary period parameter corresponding to the first time period is 0001. Since the data bits that are 1 are the same for both, store the first time period.
[0052] Step S24: In response to the data on the binary bit corresponding to the second time period in the AND operation result being 1, store the second time period.
[0053] If the data on the binary bit corresponding to the second time period in the AND operation result is 1, then store the second time period. Continuing to refer to 1101&0010 = 0010, the AND operation result is 0010, the third binary formula period parameter corresponding to the second time period is 0010, and the data bits that are 1 in both are the same, so store the second time period to push the message content to the user during this second time period. In a specific implementation process, the method of using a loop can be used to implement steps S21 - S24. For example, the push period is one week, 7 bits in the 8-bit binary number represent Monday to Sunday, the first time period is defined as Sunday, and the second binary formula period parameter corresponding to the first time period, that is, Sunday, is defined as 00000001. Then the third binary formula period parameter corresponding to the second time period can be 00000010, 00000100, 00001000, 00010000, 00100000, 01000000, and the above third binary formula period parameters can be defined as Monday to Saturday in sequence. If the first binary formula period parameter is 00111110, representing that information content needs to be pushed to the user from Monday to Friday, then 00111110 is first ANDed with 00000001 to get 00000000, that is, the data on the binary bit corresponding to the first time period in the AND operation result is 0, so the first time period is not stored, representing that no information content needs to be pushed to the user on Sunday; then 00000001 is shifted left by 1 bit to get 00000010, and 00111110 is ANDed with 00000010 to get 00000010, that is, the data on the binary bit corresponding to the second time period in the AND operation result is 1, so store the second time period, that is, store Monday; repeat the left shift processing of the binary formula period parameter corresponding to the first time period until all bits on the first binary formula period parameter are confirmed, that is, all the time periods that need to push the message content included in the first binary formula period parameter can be obtained.
[0054] In this embodiment, the reminder time parameter is converted into a binary time parameter, so that different bits on a binary time parameter can represent different time period states, and there is no need to set multiple parameters to represent time periods, which can save resources. In addition, the second binary formula period parameter corresponding to the first time period is shifted to obtain the third binary formula period parameter corresponding to the second time period, and then the third binary formula period parameter is ANDed with the first binary formula period parameter. The above process can improve the operation efficiency, and the whole process is simple and easy to execute.
[0055] Optionally, the first time period includes Sundays, and the second time period includes Mondays to Saturdays. That is, the push period of this embodiment uses "weeks" as the time period. One "week" includes 7 days. 7-bit binary data can be used to represent different time periods. That is, only 7-bit binary data is required to achieve time period expression, and the shift operation is simple and fast, which can save resources and reduce the operation time at the same time.
[0056] Optionally, in order to reduce the amount of computation, a preset time period can be set according to the collected user data, experience, etc., so as to quickly reduce the time for time period confirmation in the first binary period parameter through the preset time period. The reminder period parameter of this embodiment includes the first binary period parameter. The time period includes Sundays and Saturdays. Refer to Figure 4 , Figure 4 is a schematic flowchart of another embodiment of step S132 in the push method for the milk pumping plan provided by this application. As Figure 4 shown, step S132 includes the following steps:
[0057] Step S31: Perform a shift operation on the second binary period parameter corresponding to Sunday to obtain the third binary period parameter corresponding to Saturday.
[0058] The time period includes Sundays and Saturdays. The binary period parameter corresponding to Sunday is defined as the second binary period parameter. After performing a shift operation on the second binary period parameter, the third binary period parameter corresponding to Saturday is obtained.
[0059] Step S32: Obtain the OR operation result of the second binary period parameter corresponding to Sunday and the third binary period parameter corresponding to Saturday.
[0060] Perform a bitwise OR operation on the data bits of the second binary period parameter corresponding to Sunday and the third binary period parameter corresponding to Saturday to obtain their OR operation result. For example, the second binary parameter corresponding to Sunday is 00000001, and the third binary period parameter corresponding to Saturday is 01000000. Then 00000001|01000000 gives 01000001. It can be known that the bits corresponding to Sundays and Saturdays in the OR operation result are 1.
[0061] Step S33: If the first binary period parameter is the same as the OR operation result, determine that the time period is Sundays and Saturdays.
[0062] If the first binary period parameter is the same as the OR operation result, that is, only the bits corresponding to Sundays and Saturdays in the first binary period parameter are 1, determine that the time period is Sundays and Saturdays. For example, if the first binary period parameter is 01000001, which is the same as the OR operation result 01000001, then determine that the time period is Sundays and Saturdays.
[0063] If the results of the AND-OR operations of the first binary period parameter are different, the specific time period can be determined by using the method of steps S21 to S24.
[0064] In this embodiment, by setting the time period as Saturday and Sunday, the first binary period parameter is directly compared with the result of the OR operation of the third binary period parameter corresponding to Saturday and the second binary period parameter corresponding to Sunday. When the first binary period parameter is the same as the result of the OR operation, it can be confirmed that the first binary period parameter only includes the time periods of Saturday and Sunday, and the time periods included in the first binary period parameter can be quickly confirmed. Compared with the method of sequentially confirming the valid bits on the first binary period parameter, this embodiment can shorten the execution time of time period confirmation, thereby improving the speed.
[0065] In other embodiments, it is possible to first confirm whether the first binary period parameter is the case where the time period is Saturday and Sunday, and then gradually confirm the specific time period when the time period does not belong to the above situation.
[0066] Optionally, in order to reduce the amount of calculation, the reminder period parameter of this embodiment includes the first binary period parameter, and the time period includes the whole week, where the whole week refers to Monday to Sunday. When the first binary period parameter includes the whole week, it means that information content needs to be pushed to the user every day. Refer to Figure 5 , Figure 5 is a schematic flowchart of another embodiment of step S132 in the push method for the milk pumping plan provided by the present application. As Figure 5 shown, step S132 includes the following steps:
[0067] Step S41: Perform a full-cycle length shift process on the second binary period parameter corresponding to Sunday to obtain a fourth binary period parameter.
[0068] Performing a full-cycle length shift process on the second binary period parameter corresponding to Sunday means shifting the valid bits in the second binary period parameter corresponding to Sunday 7 bits to the left to obtain a fourth binary period parameter. For example, define the second binary period parameter corresponding to Sunday as 00000001, and shift the valid bit 1 in 00000001 7 bits to the left to obtain the fourth binary period parameter 10000000.
[0069] Step S42: Obtain the XOR operation result of the fourth binary period parameter and the preset binary period parameter.
[0070] To obtain binary data identical to the first binary periodic parameter of a time period encompassing a full week, an exclusive OR operation is performed between the fourth binary periodic parameter obtained by shifting the second binary periodic parameter and a preset binary periodic parameter, and the exclusive OR operation result of the two is acquired. For example, the first binary periodic parameter is 0111111, the fourth binary periodic parameter is 10000000, and the preset binary periodic parameter is 11111111.
[0071] Step S43: In response to the first binary periodic parameter being identical to the exclusive OR operation result, determine that the time period is a full week.
[0072] If the first binary periodic parameter is identical to the exclusive OR operation result, it is considered that the first binary periodic parameter encompasses a time period of a full week, and thus the time period is determined to be a full week.
[0073] For example, if the first binary periodic parameter includes a time period of a full week, then the corresponding bits from Monday to Sunday in the first binary periodic parameter are all 1. That is, the first binary periodic parameter including a time period of a full week is 01111111, the second binary periodic parameter corresponding to Sunday is 00000001, and the fourth binary periodic parameter is 10000000. Shifting the valid bit 1 in 00000001 seven bits to the left gives 10000000. When the preset binary parameter is 11111111, (10000000 ^ 11111111) = 01111111, that is, the exclusive OR operation result is the same as the first binary periodic parameter, and thus the time period is a full week.
[0074] If the first binary periodic parameter is not the same as the exclusive OR operation result, the method of steps S21 to S24 can be used to determine the specific time period.
[0075] In other embodiments, steps S41 - S43 can also be preferentially executed. If the time period is not a full week, then steps S21 to S24 are executed. Or steps S41 - S43 can be preferentially executed. If the time period is not a full week, then steps S31 to S33 are executed. If the time period is not Sunday and Saturday, then steps S21 to S24 are executed. Or, alternatively, steps S31 - S33 can be preferentially executed. If the time period is not Sunday and Saturday, then steps S41 to S43 are executed. If the time period is not a full week, then steps S21 to S24 are executed.
[0076] The time period of this embodiment includes the entire week. The first binary period parameter is directly compared with the XOR operation result including the entire week. When the first binary period parameter is the same as the XOR operation result, the time period included in the first binary period parameter can be confirmed. Compared with the method of sequentially confirming the valid bits on the first binary period parameter, the execution time can be shortened, thereby improving the speed.
[0077] In other embodiments, it is possible to preferentially confirm whether the first binary period parameter is a case where the time period is the weekend or the entire week. When the time period does not belong to the above two cases, the specific time period is gradually confirmed.
[0078] Optionally, after determining the time period based on the reminder period parameter, pushing the message content to the user based on the information parameter further includes displaying the time period. That is, the time period is displayed while pushing the message content to the user. For example, when the time period is the entire week, the time period "entire week" is displayed; when the time period is the weekend, the time period "weekend" is displayed. In this embodiment, the time period is displayed when pushing the information content to the user to facilitate the user to understand the pushed time period.
[0079] Optionally, the preset reminder information includes the push permission generated based on the user's settings. Step S120 further includes parsing the preset reminder information and obtaining the push permission. Before the step of pushing the message content to the user based on the reminder parameter, the push method further includes judging the status of the push permission. Based on the push permission, the status of the push permission is judged. When the status of the push permission is the enabled state, it means that the user allows the message content to be pushed. When the status of the push permission is the disabled state, it means that the user does not allow the message content to be pushed. If the status of the push permission set by the user is the enabled state, in response to the push permission being the enabled state, the step of pushing the message content to the user based on the reminder parameter is executed. Otherwise, the message content is not pushed to the user.
[0080] This embodiment confirms the push permission set by the user based on the preset reminder information and pushes the message content to the user when the push permission is in the enabled state, which can avoid interfering with the user by the push and improve the user's experience.
[0081] The push method for the milk pumping plan of this application can be used to push reminders about the milk pumping plan to mothers. Each mother sets the reminder time and reminder period for milk pumping according to her own needs to obtain a personalized milk pumping plan. Or by means of the push method for the milk pumping plan, reminders such as bottle cleaning, bottle disinfection, exercise, taking medicine, and drinking water can also be pushed to the user. For example, users who exercise can customize their own push content according to their exercise time, exercise period, exercise content, etc.
[0082] This application provides an electronic device, refer to Figure 6 , Figure 6It is a schematic structural diagram of an embodiment of the electronic device provided by this application. As Figure 6 shown, the electronic device 10 includes a memory 12 and a processor 11. The memory 12 stores computer program instructions, and the processor 11 executes the computer program instructions to implement any one of the push method embodiments described above. Among them, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a smart watch, etc., and the specific form of the electronic device is not limited herein.
[0083] This application provides a computer-readable storage medium. Refer to Figure 7 , Figure 7 It is a schematic structural diagram of an embodiment of the computer-readable storage medium provided by this application. As Figure 7 shown, the computer-readable storage medium 20 stores program instructions, and the program instructions can be executed by the processor to implement any one of the push method embodiments described above.
[0084] In the description of this application, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0085] The above is only the implementation manner of this application, and does not limit the patent scope of this application. All equivalent structural or equivalent process transformations made by using the content of this application's specification and drawings, or directly or indirectly applied in other related technical fields, are equally included in the patent protection scope of this application.
Claims
1. A push method for a milk pumping plan, characterized in that, Including: Obtaining preset reminder information corresponding to user information from a server, where the preset reminder information includes reminder parameters and message content generated based on user settings; Parsing the preset reminder information and obtaining the reminder parameters and the message content; Pushing the message content to the user based on the reminder parameters.
2. The push method according to claim 1, wherein The reminder parameters include: a reminder cycle parameter and a reminder time parameter. Pushing the message content to the user based on the reminder parameters includes: Determining a time period based on the reminder cycle parameter and determining a reminder time based on the reminder time parameter; Pushing the message content to the user during the time period and at the reminder time.
3. The push method according to claim 2, wherein The reminder cycle parameter includes a first binary cycle parameter. The time period includes at least a first time period and a second time period. Determining the time period based on the reminder cycle parameter includes: Performing a shift operation on the second binary cycle parameter corresponding to the first time period to obtain a third binary cycle parameter corresponding to the second time period; Respectively obtaining the AND operation results of the first binary cycle parameter with the second binary cycle parameter and the third binary cycle parameter; In response to the data on the binary bit corresponding to the first time period in the AND operation result being 1, storing the first time period; In response to the data on the binary bit corresponding to the second time period in the AND operation result being 1, storing the second time period; Wherein, the shift length of the shift operation is the cycle length between the first time period and the second time period.
4. The push method according to claim 3, wherein The first time period includes Sundays, and the second time period includes Mondays to Saturdays.
5. The push method according to claim 2, wherein The reminder cycle parameter includes a first binary cycle parameter. The time period includes Sundays and Saturdays. Determining the time period based on the reminder cycle parameter includes: Performing a shift operation on the second binary cycle parameter corresponding to Sundays to obtain a third binary cycle parameter corresponding to Saturdays; Obtaining the OR operation result of the second binary cycle parameter corresponding to Sundays with the third binary cycle parameter corresponding to Saturdays; In response to the first binary cycle parameter being the same as the OR operation result, determining that the time period is Sundays and Saturdays.
6. The push method according to claim 2, wherein The reminder cycle parameter includes a first binary cycle parameter. The time period includes the whole week. Determining the time period based on the reminder cycle parameter includes: Performing a full-cycle length shift operation on the second binary cycle parameter corresponding to Sundays to obtain a fourth binary cycle parameter; Obtaining the XOR operation result of the fourth binary cycle parameter with a preset binary cycle parameter; In response to the first binary cycle parameter being the same as the XOR operation result, determining that the time period is the whole week.
7. The push method according to claim 2, wherein After determining the time period based on the reminder cycle parameter, pushing the message content to the user based on the reminder parameters further includes: Displaying the time period.
8. The push method according to claim 1, wherein The preset reminder information further includes a push permission generated based on user settings, and parsing the preset reminder information further includes: Parsing the preset reminder information and obtaining the push permission; Before the step of pushing the message content to the user based on the reminder parameter, the pushing method further includes: Judging the status of the push permission; In response to the push permission being in an enabled state, executing the step of pushing the message content to the user based on the reminder parameter.
9. The push method according to claim 1, characterized in that The pushing method further includes: In response to the user updating the preset reminder information, sending the updated preset reminder information to the server.
10. An electronic device, characterized in that, Including: A memory and a processor, the memory stores computer program instructions, and the processor executes the computer program instructions to implement the pushing method according to any one of claims 1-9.