Network memory control method and apparatus
By applying a dedicated hibernation prediction model to the network storage device, its hibernation and wake-up states can be precisely controlled, solving the lag and stuttering issues experienced by users in existing technologies, extending the lifespan of mechanical hard drives and improving the user experience.
Patent Information
- Application Number
- CN202111325767.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2041-11-10
Smart Images

Figure CN116107488B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a network memory control method and apparatus. Background Technology
[0002] With the continuous advancement of technology, Network Attached Storage (NAS) is playing an increasingly important role in fields such as smart homes. Taking the smart home sector as an example, due to cost and capacity requirements, most home NAS products use Hard Disk Drives (HDDs). However, HDDs have a reliable lifespan of only about 3-5 years, and the failure rate increases sharply as they approach or exceed this lifespan. This limits the reliability of home NAS products to only 3-5 years. One related technology involves introducing a hibernation state to extend the lifespan of home NAS products. However, the hibernation control mechanism is simple, and users can clearly feel the lag and stuttering caused by waking the NAS from hibernation. How to improve the hibernation control mechanism of NAS products in smart homes and other fields, extending their lifespan while providing users with a seamless wake-up experience, is a pressing technical problem that needs to be solved. Summary of the Invention
[0003] In view of this, a network memory control method and device are proposed.
[0004] In a first aspect, embodiments of this application provide a network memory control method applied to a first network memory, the method comprising:
[0005] If the sleep prediction conditions are met, the usage data of the first network memory in the first time period before the current time is used as the prediction usage data.
[0006] Based on the predicted usage data and the dedicated sleep prediction model, sleep prediction is performed to obtain sleep prediction results, which include whether the first network memory will be used in the next time period after the current time.
[0007] Based on the hibernation prediction result, the first network memory is controlled to enter an idle state or continue to remain in a hibernation state;
[0008] The sleep prediction conditions include: the first network memory is in prediction mode, and the first network memory is currently in sleep state.
[0009] In one possible implementation, the hibernation prediction condition further includes at least one of the following: the time interval between the current time and the last time a hibernation prediction was made reaches the prediction time interval, and the current time is a preset hibernation prediction time.
[0010] In one possible implementation, controlling the first network memory to enter an idle state or remain in a sleep state based on the sleep prediction result includes:
[0011] If the sleep prediction result indicates that the first network memory will be used in the next time period, then the first network memory is woken up to put it into an idle state; or
[0012] If the hibernation prediction result indicates that the first network memory will not be used in the next time period, then the first network memory is controlled to continue to remain in hibernation.
[0013] In one possible implementation, if the sleep prediction result indicates that the first network memory will be used in the next time period, then waking up the first network memory includes:
[0014] If the sleep prediction result indicates that the first network memory will be used in the next time period, and the sleep prediction result also includes at least one start time of use of the network memory after the current time in the next time period, then according to the wake-up duration of the first network memory, the first network memory is woken up before each start time of use, so that the first network memory enters an idle state at each start time of use.
[0015] In one possible implementation, the method further includes:
[0016] Receive a general hibernation prediction model sent from the cloud, the general hibernation prediction model being trained and determined based on historical usage data from multiple second network storage devices;
[0017] If it is determined that the first network memory is in learning mode, the general sleep prediction model is trained using the first historical usage data of the first network memory to obtain a specific sleep prediction model corresponding to the first network memory.
[0018] In one possible implementation, each of the second network storage devices is connected to multiple access devices, the general sleep prediction model includes multiple branch models, each branch model corresponds to different branch device characteristics, and the method further includes:
[0019] Before training the general sleep prediction model, the general sleep prediction model is optimized based on the first device characteristics of the access device connected to the first network memory.
[0020] The optimization process includes: removing branch models in the multiple branch models of the general sleep prediction model whose branch device features do not match the first device features;
[0021] The characteristics of the branch device include the device type of the access device.
[0022] In one possible implementation, the branch device feature also includes the number of access devices.
[0023] In one possible implementation, the method further includes:
[0024] If it is determined that the model self-update condition is met, then the first network memory is controlled to enter the learning mode;
[0025] The dedicated dormancy prediction model is trained and updated using the second historical usage data of the first network memory;
[0026] After confirming that the update of the dedicated dormant prediction model is complete, control the first network memory to switch from the learning mode to the prediction mode;
[0027] The model self-update conditions include at least one of the following: the current time is the update time, the time interval between the current time and the last time the model was updated reaches the update interval threshold, and the first network memory is in a dormant state during the model update process.
[0028] In one possible implementation, the method further includes:
[0029] If it is detected that the duration of the first network memory remaining in an idle state is greater than or equal to a preset duration threshold, then the first network memory is controlled to enter a sleep state.
[0030] Secondly, embodiments of this application provide a network memory control device applied to a first network memory, the device comprising:
[0031] If the data determination module determines that the sleep prediction conditions are met, it uses the usage data of the first network memory in the first time period before the current time as the prediction usage data.
[0032] The prediction module performs hibernation prediction based on the prediction usage data and the dedicated hibernation prediction model to obtain hibernation prediction results. The hibernation prediction results include whether the first network memory will be used in the next time period after the current time.
[0033] The state control module controls the first network memory to enter an idle state or continue to remain in a sleep state based on the sleep prediction result.
[0034] The sleep prediction conditions include: the first network memory is in prediction mode, and the first network memory is currently in sleep state.
[0035] In one possible implementation, the hibernation prediction condition further includes at least one of the following: the time interval between the current time and the last time a hibernation prediction was made reaches the prediction time interval, and the current time is a preset hibernation prediction time.
[0036] In one possible implementation, the state control module includes:
[0037] The first control submodule, if the sleep prediction result indicates that the first network memory will be used in the next time period, wakes up the first network memory to put it into an idle state; or
[0038] If the hibernation prediction result indicates that the first network memory will not be used in the next time period, the second control submodule controls the first network memory to continue to remain in hibernation.
[0039] In one possible implementation, the first control submodule includes:
[0040] If the sleep prediction result indicates that the first network memory will be used in the next time period, and the sleep prediction result also includes at least one start time of use of the network memory after the current time in the next time period, then according to the wake-up duration of the first network memory, the first network memory is woken up before each start time of use, so that the first network memory enters an idle state at each start time of use.
[0041] In one possible implementation, the device further includes:
[0042] The model receiving module receives a general hibernation prediction model sent from the cloud. The general hibernation prediction model is determined by training based on historical usage data from multiple second network storage devices.
[0043] If the model training module determines that the first network memory is in learning mode, it uses the first historical usage data of the first network memory to train the general hibernation prediction model to obtain a specific hibernation prediction model corresponding to the first network memory.
[0044] In one possible implementation, each of the second network memories is connected to multiple access devices, the general sleep prediction model includes multiple branch models, each branch model corresponds to different branch device characteristics, and the device further includes:
[0045] Before training the general sleep prediction model, the model optimization module optimizes the general sleep prediction model based on the first device characteristics of the access device connected to the first network memory.
[0046] The optimization process includes: removing branch models in the multiple branch models of the general sleep prediction model whose branch device features do not match the first device features;
[0047] The characteristics of the branch device include the device type of the access device.
[0048] In one possible implementation, the branch device feature also includes the number of access devices.
[0049] In one possible implementation, the device further includes:
[0050] If the first switching module determines that the model self-update condition is met, it controls the first network memory to enter the learning mode.
[0051] The self-updating module uses the second historical usage data of the first network memory to train and update the dedicated dormancy prediction model;
[0052] The second switching module, after determining that the update of the dedicated dormant prediction model is complete, controls the first network memory to switch from the learning mode to the prediction mode.
[0053] The model self-update conditions include at least one of the following: the current time is the update time, the time interval between the current time and the last time the model was updated reaches the update interval threshold, and the first network memory is in a dormant state during the model update process.
[0054] In one possible implementation, the device further includes:
[0055] If the hibernation control module detects that the duration of the first network memory remaining in an idle state is greater than or equal to a preset duration threshold, it controls the first network memory to enter a hibernation state.
[0056] Thirdly, embodiments of this application provide a network memory control device, including:
[0057] processor;
[0058] Memory used to store processor-executable instructions;
[0059] The processor is configured to implement one or more of the network memory control methods of the first aspect or multiple possible implementations of the first aspect when executing the instructions.
[0060] Fourthly, embodiments of this application provide a non-volatile computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement one or more of the network memory control methods of the first aspect or various possible implementations of the first aspect.
[0061] Fifthly, embodiments of this application provide a computer program product including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in an electronic device, the processor in the electronic device executes one or more of the network memory control methods described in the first aspect or various possible implementations of the first aspect.
[0062] These and other aspects of this application will become more apparent in the description of the following embodiments(s). Attached Figure Description
[0063] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this application together with the specification and serve to explain the principles of this application.
[0064] Figure 1 This diagram illustrates the differences between a network memory control method according to an embodiment of this application and network memory control methods in related technologies.
[0065] Figure 2 This diagram illustrates an application scenario of a network memory according to an embodiment of the present application.
[0066] Figure 3 A flowchart illustrating a network memory control method according to an embodiment of this application is shown.
[0067] Figure 4 A schematic diagram illustrating historical usage data according to an embodiment of this application is shown.
[0068] Figure 5 A schematic diagram of training a general dormancy prediction model according to an embodiment of this application is shown.
[0069] Figure 6 This diagram illustrates the interaction of a network memory control method according to an embodiment of the present application. Detailed Implementation
[0070] Various exemplary embodiments, features, and aspects of this application will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0071] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0072] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.
[0073] In the smart home field, due to cost and the need for large storage capacity, as shown in Table 1, network storage devices used for home storage mostly employ mechanical hard drives (HDDs). The reliable lifespan of an HDD is approximately 3-5 years; as it approaches or exceeds this lifespan, the failure rate increases dramatically. This limits the reliability of network storage devices in related technologies to only 3-5 years.
[0074] Table 1 HDD Failure Rate
[0075] Usage time Year 1 Year 2 Year 3 Year 4 5th year Year 6 7th year 8th year Grand total HDD failure rate 0.70% 1.76% 2.47% 3.49% 5.45% 7.66% 8.72% 9.47% 39.72%
[0076] Since the lifespan of an HDD is directly related to its annual read / write volume, the higher the read / write frequency for a fixed disk size, the sooner the disk will reach its lifespan. Furthermore, many failures are unpredictable. By implementing hibernation mechanisms to control the HDD's workload as much as possible, its lifespan can be extended.
[0077] In related technologies, Figure 1 This diagram illustrates the difference between a network memory control method according to an embodiment of this application and network memory control methods in related technologies. Once the network memory is enabled, it remains in a working state and does not control itself to enter a sleep state (e.g., ...). Figure 1 (Referring to "Prior Art 1" in the text). Another type of network storage device (NAS) controls the network storage to enter a sleep state after a certain period of inactivity, or enters a sleep state based on user manual operation (in which the disk stops spinning). The NAS product then responds to the user's operation to wake up, and the disk spins at normal speed after fully waking up. However, since waking up cannot be achieved instantly, although it can extend the lifespan to some extent, the extension is limited, and users can clearly feel the lag and stuttering caused by waking up the network storage from a sleep state (e.g., ...). Figure 1 ("Prior Art 2" in the text).
[0078] This application provides a network memory control method and apparatus. When the network memory is in a sleep state, a dedicated sleep prediction model corresponding to the network memory usage status is used to predict whether the first network memory will be used in the next time period after the previous time. Then, based on the sleep prediction result, the network memory is controlled to enter an idle state or continue to maintain a sleep state (e.g., ...). Figure 1 (As shown in the "first network storage" diagram). This allows for precise prediction of when a user will use the network storage based on its usage, enabling the network storage to enter a sleep state when not in use and to enter an idle state in advance when needed. This significantly extends the lifespan of the network storage (by more than 30%) and provides users with a seamless wake-up experience, eliminating any lag or stuttering when waking the network storage from its sleep state.
[0079] In some embodiments, network storage can be applied to various application scenarios, such as smart home scenarios, public use scenarios such as companies, and so on. The following describes the application of network storage in a smart home scenario. Figure 2 This diagram illustrates an application scenario of a network memory according to an embodiment of this application. For example... Figure 2 As shown, a network storage device can connect to multiple access devices in a user's home. Within the user's home, the network storage device can perform corresponding data read and write operations based on requests from these access devices. The access devices connected to the network storage device can be of various types, and different types of access devices can be combined into one or more. For example... Figure 2 Access devices connected to the network storage include mobile phone 1, mobile phone 2, tablet computer, laptop computer 1, laptop computer 2, desktop computer, and television. In some embodiments, after a user leaves home with the access device, they can access and retrieve data stored in the network storage via the network.
[0080] In some embodiments, the access device can be any electronic device that requires data reading and writing. The electronic device may include at least one of the following: mobile phone, foldable electronic device, tablet computer, desktop computer, laptop computer, handheld computer, desktop computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, or smart home device. This application does not impose any special limitation on the specific type of electronic device.
[0081] Figure 3 A flowchart illustrating a network memory control method according to an embodiment of this application is shown. This method can be applied to a first network memory (e.g., Figure 2 (as shown in the network storage) and the cloud.
[0082] In this method, the cloud can be the cloud server where the first network storage resides, or it can be provided by the service provider of the first network storage, and it is used to manage the first network storage used by the user. The cloud is used to execute... Figure 3 Steps S11-S13 are shown in the diagram. In some embodiments, this method can be applied to a controller in a first network memory, which can operate normally when the first network memory is in a sleep state, waking up the first network memory in response to user operation or based on a sleep prediction result. Figure 3 As shown, in this method, the first network memory is used to execute steps S201-S213.
[0083] In step S11, as Figure 3 As shown, the cloud is used to obtain historical usage data from multiple secondary network storage devices.
[0084] In some embodiments, the historical usage data of each second network storage device may be data capable of characterizing the usage habits of users using the second network storage device. Each second network storage device is connected to at least one second access device. The historical usage data of each second network storage device may include: device information of the second network storage device, device type and number of second access devices connected to the second network storage device, user information of users using each second access device, usage time information and device location information of users using the second network storage device through the second access device, device status of the second access device when users use the second network storage device through the second access device, usage method, etc.
[0085] in, Figure 4 A schematic diagram illustrating historical usage data according to an embodiment of this application is shown. Figure 4 As shown, the device information of the second network storage device can be information that characterizes the hardware features of the second network storage device itself. Device information may include the model number, release date, storage capacity, and installed software system version of the second network storage device, etc. User information may be information that represents the characteristics of users using the second network storage device and / or the second access device, including the user's age (e.g., the user is 45 years old) and / or age group (e.g., the user is a child), gender, occupation, number of users using the same second network storage device, etc.
[0086] The usage time information can be information that represents the time characteristics corresponding to the user's use of the second network storage. The usage time information may include: the time period during which the user uses the second network storage, and whether the usage time period belongs to a weekday or a rest day (rest days may include holidays and festivals), etc.
[0087] The device location information can be the location information of the second access device when the user uses the second network storage device through the second access device. The device location information can include: the same location as the second network storage device (for example, if both are located in the user's home, they can be considered to be in the same location), or the different location from the second network storage device.
[0088] The device status of the second access device when a user uses the second network storage device can indicate what service the user is performing. Device status can include: playing video, playing audio (audio can include music and other audio resources), displaying images (e.g., photos taken or stored by the user, video screenshots, animated images, etc.), displaying documents (e.g., Word documents, PDF documents, slideshows, etc.), and so on.
[0089] The second network storage can be used in one of two ways: local login or remote login.
[0090] In step S12, as Figure 3 As shown, a general hibernation prediction model is obtained by training the model based on historical usage data from multiple second network memories.
[0091] In some embodiments, after obtaining historical usage data from multiple second network storage devices, the cloud can first determine, based on the obtained historical usage data, the user's usage habits of using the second network device through the second access device during each time period on set weekdays and rest days. These user habits may include the percentage of time the second access device is in state when the user uses the second network device through the second access device.
[0092] For example, assuming the cloud determines the device status percentages for each time period as shown in Tables 2 and 3 below, then referring to Table 2, we can see that during the weekday period from 00:00 to 08:00, the percentages of the second access device's device status as "No service (i.e., not used by the user)", "Displaying pictures", "Displaying documents", "Playing videos", "Playing music", "Displaying documents and pictures", and "Playing videos and displaying pictures" are 0.57%, 0, 0.02%, 0.02%, 0.22%, 0, and 0, respectively. Referring to Table 3, we can see that during the weekend period from 00:00 to 04:00, the percentages of the second access device's device status as "No service (i.e., not used by the user)", "Displaying pictures", "Displaying documents", "Playing videos", "Playing music", "Displaying documents and pictures", and "Playing videos and displaying pictures" are 0.60%, 0.02%, 0.01%, 0, 0.22%, 0, and 0.01%, respectively.
[0093] It is understandable that the division of time periods for weekdays and rest days can be different, and the shorter the time period, the more accurate the general hibernation prediction model obtained in step S12 will be, the higher the accuracy of the prediction results obtained from hibernation prediction, and the higher the frequency of hibernation prediction by the first network memory.
[0094] Table 2. Percentage of Equipment Status at Different Times on Weekdays (100%)
[0095]
[0096] Table 3. Percentage of Equipment Status at Different Times on Rest Days (100%)
[0097]
[0098] In some embodiments, in step S12, after determining user usage habits based on all historical usage data corresponding to multiple network storage devices, the cloud can train the created original model to obtain a general dormancy prediction model.
[0099] In one possible implementation, the general hibernation prediction model may include multiple branch models, each corresponding to a different branch device characteristic. In some embodiments, the branch device characteristic may include the device type of the access device. In some embodiments, the branch device characteristic may also include the number of devices. For example, suppose the general hibernation prediction model includes n branch models, namely branch model 1, branch model 2, branch model 3, branch model 4, branch model 5... branch model n, where n is a positive integer greater than zero. Then, if the branch device characteristic is device type, then branch model 1, branch model 2, branch model 3, branch model 4, branch model 5... branch model n correspond to different device types. If the branch device characteristic is both device type and number of devices, then branch model 1, branch model 2, branch model 3, branch model 4, branch model 5... branch model n correspond to different device types and / or different numbers of devices.
[0100] Figure 5 A schematic diagram illustrating the training of a general dormancy prediction model according to an embodiment of this application is shown. To explain the training method of the general dormancy prediction model, the following is combined with... Figure 5 The given example illustrates how a general dormancy prediction model, including multiple branch models, is trained based on historical usage data from multiple network memories in this application. It is understood that those skilled in the art can configure the implementation of the trained general dormancy prediction model according to actual needs, and this application does not impose any limitations on this.
[0101] like Figure 5 As shown, after obtaining historical usage data from multiple secondary network storage devices (hereinafter referred to as all historical usage data), the cloud first creates user (service) templates and time period templates corresponding to device status, as well as a branch model library including various branch models that need to be trained. Then, each branch model is trained to finally obtain a general dormancy prediction model including multiple branch models.
[0102] User (Business) Template
[0103] The probability P of using the second network memory in n time periods i (i = 1, 2, 3, ..., n).
[0104] Assume that the device states are independent and identically distributed in each time period: Set a probability threshold Val. If P > Val, then it can be determined that the selected user is more likely to exist.
[0105] Time slot template
[0106] n time periods, [S] i E i (i = 1, 2, 3, ..., n). Where, S i E i These represent the start and end of time period i, respectively.
[0107] Since the data acquisition phase is divided into relatively coarse time periods, Gaussian distribution randomization can be used as in Formula 1, i.e., the business is carried out on a subset of the current time period.
[0108]
[0109] in, S in time period i i To E i Information at any given moment. σ i This is the preset threshold corresponding to time period i. i = 1, 2, 3, ..., n. i This is the initial value corresponding to time period i.
[0110] Branch Model Library
[0111] n-branch model, [I i O i ](i=1,2,3,…,n). Among them, I i O i These represent the IO values for branch model i. The IO values can refer to data read / write values.
[0112] Since the accuracy of each branch model i in the created branch model library is difficult to meet the requirements, Gaussian distribution randomization can be used as in Formula 2, with maximum and minimum value constraints.
[0113]
[0114] Among them, K min For the minimum value, K max This is the maximum value.
[0115] In step S13, as Figure 3 As shown, after obtaining the general dormancy prediction model through cloud training, the general dormancy prediction model is sent to the first network memory. Sending the general dormancy prediction model to the first network memory can refer to sending the model parameters of the general dormancy prediction model to the first network memory.
[0116] In some embodiments, in step S13, the cloud can immediately send the latest general dormancy prediction model to the first network memory after obtaining it each time. In some embodiments, in step S13, the cloud can also send the latest general dormancy prediction model to the first network memory according to preset interaction rules, provided that information interaction with the first network memory is possible. The interaction rules can instruct how the cloud and the first network memory should interact. For example, the interaction rules could be that information interaction between the cloud and the first network memory occurs at regular intervals. The interaction rules could also be that the cloud detects an interaction request initiated by the first network memory, and so on.
[0117] Figure 6 This diagram illustrates the interaction of a network memory control method according to an embodiment of this application. In one possible implementation, such as... Figure 6 As shown, during the information exchange between the cloud and the first network storage device, the first network storage device can also send its own usage data to the cloud, so that the cloud can mark the newly received usage data of the first network storage device, and then train and update the general dormancy prediction model based on the marked data. In some embodiments, the cloud can establish a general database locally to store the received network storage device usage data.
[0118] like Figure 3 As shown, after the first network memory is enabled, the network memory control method provided in this application, including steps S201-S213, can be executed.
[0119] In step S201, as Figure 3 As shown, if the first network storage receives the general hibernation prediction model sent from the cloud, then step S202 is executed.
[0120] In some embodiments, when the first network storage is first started by a user, since no historical usage data of the first network storage has been recorded during the first startup, the general hibernation prediction model stored locally in the first network storage or sent to the cloud after the first startup can be temporarily used as the "dedicated hibernation prediction model". Then the first network storage trains and updates the "dedicated hibernation prediction model" based on the historical usage data of the first network storage recorded locally.
[0121] In one possible implementation, after the first network memory is started, if it does not receive the general dormant prediction model sent by the cloud and / or does not meet the model self-update conditions (see description below), it can directly control the first network memory to perform prediction mode and execute step S211.
[0122] In step S202, as Figure 3 As shown, if a general dormant prediction model is received from the cloud, the first network memory can determine whether it is currently in prediction mode or learning mode. Specifically, the first network memory switches between prediction mode and learning mode when it is active. If it is not in prediction mode (i.e., in learning mode), step S203 is executed. If it is in prediction mode, step S204 is executed. Furthermore, after determining that it is in prediction mode and executing step S204, or simultaneously, the first network memory can also continue to execute step S202 to promptly execute step S203 after a switch from prediction mode to learning mode.
[0123] In step S203, as Figure 3 As shown, when the first network memory is in learning mode, the general dormancy prediction model is trained using the first historical usage data of the first network memory to obtain a specific dormancy prediction model corresponding to the first network memory. Furthermore, after executing step S203, the first network memory switches from learning mode to prediction mode and continues executing step S202.
[0124] In some embodiments, such as Figure 6 As shown, when the first network storage device is enabled, it will collect usage data and record the collected usage data in a dedicated database stored locally. The usage data may include: device information of the first network storage device, device type and number of first access devices connected to the first network storage device, user information of users of each first access device, usage time information and device location information of users using the first network storage device through the first access device, device status of the first access device when users use the first network storage device through the first access device, usage method, etc.
[0125] In some embodiments, the first historical usage data used in step S203 may be all usage data recorded in the dedicated database of the first network storage before the current time. Alternatively, the first historical usage data used in step S203 may also be usage data recorded in the dedicated database of the first network storage within a certain time period before the current time. Wherein, if the training of the general sleep prediction model to obtain the dedicated sleep prediction model is the first training performed by the first network storage, then the first historical usage data may be all usage data recorded in the dedicated database of the first network storage.
[0126] In some embodiments, such as Figure 6As shown, the first network memory can also tag the usage data recorded in the dedicated database to form a dedicated tag library. Then, in step S203, the first network memory can train the general dormancy prediction model based on the first historical usage data and the tags corresponding to each data stored in the dedicated tag library to obtain a dedicated dormancy prediction model corresponding to the first network memory.
[0127] In one possible implementation, in step S203, before training the general sleep prediction model, the general sleep prediction model is optimized based on the first device characteristics of the access device connected to the first network memory. The optimization process may include removing branch models from the plurality of branch models of the general sleep prediction model whose branch device characteristics do not match the first device characteristics.
[0128] In some embodiments, before training the general sleep prediction model, the first network memory may first determine the device types of all first access devices connected to the first network memory and the number of devices of each type, and define the device types and numbers of the first access devices as first device features. Then, based on the degree of matching between the branch device features of each branch model of the general sleep prediction model and the first device features, branch models in the general sleep prediction model whose branch device features do not match the first device features are removed, resulting in a sleep prediction model with some branch models removed.
[0129] For example, assuming the characteristics of the branch devices in each branch model of the general sleep prediction model are shown in Table 4, if the first access device connected to the first network storage includes 2 mobile phones, 1 tablet computer, 1 TV, 1 desktop computer, and 2 laptop computers, then the general sleep prediction model obtained after optimizing the general sleep prediction model can include branch model 1-2, branch model 2-1, branch model 3-1, branch model 4-1, and branch model 5-2.
[0130] Table 4. Characteristics of branch devices corresponding to each branch model of the general hibernation prediction model.
[0131]
[0132] In step S204, as Figure 3As shown, after the first network memory is started, if it is in prediction mode, it can determine whether the first network memory currently meets the sleep prediction conditions. If the sleep prediction conditions are met, the first network memory can use the usage data of the first network memory in the first time period before the current time as the prediction usage data, and execute step S205. If the sleep prediction conditions are not met, the first network memory can continue to execute step S204.
[0133] In one possible implementation, the hibernation prediction condition may include the first network memory being in prediction mode, or the first network memory currently being in hibernation. Hibernation can refer to a state where the disk of the first network memory has stopped spinning, but the first network memory can execute the network memory control method provided in this application.
[0134] In one possible implementation, the hibernation prediction condition may further include at least one of the following: the time interval between the current time and the last time a hibernation prediction was made reaches the prediction time interval, and the current time is a preset hibernation prediction time. In some embodiments, the hibernation prediction time may include multiple prediction times within a day. The prediction time interval and / or the hibernation prediction time may be set by the cloud and / or the first network storage based on the historical usage data of the second network storage and / or the usage data of the first network storage, or it may be determined by the first network storage based on user operations. The shorter the prediction time interval and the interval between adjacent prediction times, the higher the frequency of hibernation prediction, and the more accurate the obtained hibernation prediction result. For example, the cloud platform can refer to Tables 2 and 3 above to determine users' usage habits on weekdays and weekends. It can set the prediction times as 7:00, 8:00, 9:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00, 18:00, 19:00, 20:00, 21:00, 22:00, 23:00, and 24:00 on weekdays, and 1:00, 2:00, 3:00, 4:00, 5:00, 6:00, 7:00, 8:00, 9:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00, 18:00, 19:00, 20:00, 21:00, 22:00, 23:00, and 24:00 on weekends. Alternatively, the prediction time interval can be set to 1 hour. For example, if the first network storage determines, based on locally recorded usage data, that a user has never used the first network storage between 0:00 and 9:00 on weekdays and between 1:00 and 10:00 on rest days, then the predicted times can be determined as 9:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00, 18:00, 19:00, 20:00, 21:00, 22:00, 23:00, and 24:00 on weekdays, and 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00, 18:00, 19:00, 20:00, 21:00, 22:00, 23:00, and 24:00 on rest days.
[0135] In step S205, as Figure 3 As shown, the first network memory can perform hibernation prediction based on a dedicated hibernation prediction model and prediction usage data to obtain hibernation prediction results. After obtaining the hibernation prediction results, step S206 is executed.
[0136] In some embodiments, the sleep prediction result includes whether the first network memory will be used in the next time period after the current moment. Here, "the first network memory will be used in the next time period after the current moment" can mean that the first network memory will be used for part or all of the time in the next time period after the current moment. "The first network memory will not be used in the next time period after the current moment" can mean that the first network memory will not be used for the entire time in the next time period after the current moment.
[0137] In one possible implementation, the first time period may include the time period preceding the current time and corresponding to the next time period. For example, if the current time is 08:00 AM on a weekday and the next time period is 08:00-09:00, then the time period from 08:00 to 09:00 on one or more weekdays preceding the current time is the time period corresponding to the next time period and can be used as the first time period. The usage data for prediction can then be the usage data of the first network memory during the period from 08:00 to 09:00 on one or more weekdays preceding the current time. Alternatively, the first time period may also include the time period preceding the current time and associated with the next time period. For example, if the current time is 08:00 AM on a weekday and the next time period is 08:00-09:00, then the time periods from 07:30 to 08:00 and 09:00 to 09:30 on one or more weekdays preceding the current time are the time periods associated with the next time period, and the usage data for prediction can then be the usage data of the first network memory during the period from 07:30 to 09:30 on one or more weekdays preceding the current time. In some embodiments, the duration of the first time period may be the same as the prediction time interval or the same as the time interval between adjacent prediction times, so as to ensure that the first network memory is enabled and in prediction mode, and can perform sleep prediction throughout the entire time period.
[0138] In step S206, as Figure 3 As shown, after executing step S205, the first network memory will determine whether it needs to be woken up based on the sleep prediction result. If the sleep prediction result indicates that the first network memory will be used in the next time period after the current time, it is determined that the first network memory needs to be woken up, and step S208 is executed. If the sleep prediction result indicates that the first network memory will not be used in the next time period after the current time, it is determined that the first network memory does not need to be woken up, and step S207 is executed.
[0139] In step S207, as Figure 3As shown, if it is determined that there is no need to wake up the first network memory, the first network memory is controlled to continue to remain in a dormant state. Then, step S204 is executed. In some embodiments, if the first network memory can determine that it still stores a general dormant prediction model sent from the cloud that has not yet been trained, then after or simultaneously with executing step S204, the first network memory can also continue to execute step S202, so as to execute step S203 in a timely manner after the prediction mode switches to the learning mode.
[0140] In step S208, as Figure 3 As shown, if it is determined that the first network memory needs to be woken up, then it is further determined whether the hibernation prediction result includes at least one start time of use of the network memory in the next time period after the current time. If the hibernation prediction result includes the start time of use, then step S210 is executed. If the hibernation prediction result does not include the start time of use, then step S209 is executed.
[0141] The start time of use can refer to the predicted time when a user is likely to start using the first network storage device within the next time period. For example, if the next time period is 08:00 to 09:00, the start time of use could be times such as 08:10, 08:30, or 08:40 within the 08:00 to 09:00 period.
[0142] In step S209, as Figure 3 As shown, if the dormancy prediction result does not include the start time of use, the first network memory can determine that the user may use the first network memory in the next time period. In order to ensure a seamless wake-up experience for the user, the first network memory can be woken up immediately so that it can respond to the user's operation in a timely manner. Furthermore, after executing step S209, the first network memory can continue to execute step S211. In some embodiments, if the first network memory can determine that it still stores a general dormancy prediction model sent from the cloud that has not yet been trained, then after or simultaneously with executing step S211, the first network memory can also continue to execute step S202 to promptly execute step S203 after the prediction mode switches to the learning mode.
[0143] In step S210, as Figure 3As shown, if the dormancy prediction result includes the start time, the first network memory can wake up before each start time according to its wake-up duration, so that the first network memory enters an idle state at each start time. Furthermore, after executing step S210, the first network memory can continue to execute step S211. In some embodiments, if the first network memory can determine that it still locally stores a general dormancy prediction model sent from the cloud that has not yet been trained, then after or simultaneously with executing step S211, the first network memory can also continue to execute step S202 to promptly execute step S203 after the prediction mode switches to the learning mode.
[0144] In some embodiments, in step S210, the first network memory can determine the next wake-up time of the first network memory with the shortest time interval after the current time based on the wake-up duration of the first network memory and the next start time with the shortest time interval from the current time, and wake up the first network memory at the next wake-up time. For example, assuming that the next time period after the current time 08:00 is 08:00 to 09:00, the start time is 08:10 in 08:00 to 09:00, and the wake-up duration is 25 seconds, then the next wake-up time is 08:09:35. The first network memory needs to be woken up at 08:09:35 to ensure that the first network memory can enter an idle state at 08:10, waiting for user use.
[0145] In step S211, as Figure 3 As shown, after the first network memory enters an idle state, it can begin to determine whether the duration of the idle state exceeds a duration threshold. If the duration of the first network memory in the idle state exceeds the duration threshold, the first network memory can execute step S213. If the duration of the first network memory in the idle state does not exceed the duration threshold, the first network memory can execute step S212.
[0146] In some embodiments, the cloud and / or the first network storage can set a duration threshold for the first network storage based on user habits. The longer the duration threshold, the shorter the idle time of the first network storage, the less usage of the first network storage, and the longer its lifespan. For example, the duration threshold could be 20 minutes.
[0147] In step S212, as Figure 3 As shown, if the first network memory determines that the duration of its idle state has not exceeded the duration threshold, it can control the first network memory to continue to remain in the idle state, and then continue to execute step S211. This ensures that it can respond to user operations in a timely manner.
[0148] In step S213, as Figure 3 As shown, if the first network memory determines that the duration of its idle state exceeds the duration threshold, it can control the first network memory to enter the sleep state from the idle state, and then continue to execute step S204.
[0149] In one possible implementation, after the first network memory is enabled, the first network memory performs steps S21-S213 as described above. The method further includes:
[0150] If the model self-update condition is determined to be met, the first network memory can be controlled to enter a learning mode; the dedicated dormant prediction model is trained and updated using the second historical usage data of the first network memory; after determining that the update of the dedicated dormant prediction model is complete, the first network memory is controlled to switch from the learning mode to the prediction mode. In some embodiments, the model self-update condition may include at least one of the following: the current time is the update time, the time interval between the current time and the last time the model was updated reaches an update interval threshold, and the first network memory is in a dormant state during the model update process.
[0151] In some embodiments, the second historical usage data may be usage data recorded in a dedicated database locally on the first network storage device within a certain time period prior to the current moment. For example, the second historical usage data may be usage data recorded in the dedicated database locally on the first network storage device within a week or a day prior to the current moment. Alternatively, the second historical usage data may also be all usage data recorded in the dedicated database locally on the first network storage device prior to the current moment. Those skilled in the art can configure the second historical usage data according to actual needs, and this application does not impose any limitations on this.
[0152] In this way, when the model self-update condition is met, the first network memory updates the dedicated hibernation prediction model based on the local second historical usage data, and then uses the updated dedicated hibernation prediction model to make hibernation prediction results closer to the actual usage habits of the first network memory users, making the hibernation prediction results more accurate.
[0153] In one possible implementation, the method may further include: the first network memory adjusting the model self-update conditions based on usage data recorded in its local dedicated database. This allows adjustment of the frequency at which the first network memory updates its dedicated dormant prediction model.
[0154] Embodiments of this application provide a network memory control device applied to a first network memory, the device comprising:
[0155] If the data determination module determines that the sleep prediction conditions are met, it uses the usage data of the first network memory in the first time period before the current time as the prediction usage data.
[0156] The prediction module performs hibernation prediction based on the prediction usage data and the dedicated hibernation prediction model to obtain hibernation prediction results. The hibernation prediction results include whether the first network memory will be used in the next time period after the current time.
[0157] The state control module controls the first network memory to enter an idle state or continue to remain in a sleep state based on the sleep prediction result.
[0158] The sleep prediction conditions include: the first network memory is in prediction mode, and the first network memory is currently in sleep state.
[0159] In one possible implementation, the hibernation prediction condition further includes at least one of the following: the time interval between the current time and the last time a hibernation prediction was made reaches the prediction time interval, and the current time is a preset hibernation prediction time.
[0160] In one possible implementation, the state control module includes:
[0161] The first control submodule, if the sleep prediction result indicates that the first network memory will be used in the next time period, wakes up the first network memory to put it into an idle state; or
[0162] If the hibernation prediction result indicates that the first network memory will not be used in the next time period, the second control submodule controls the first network memory to continue to remain in hibernation.
[0163] In one possible implementation, the first control submodule includes:
[0164] If the sleep prediction result indicates that the first network memory will be used in the next time period, and the sleep prediction result also includes at least one start time of use of the network memory after the current time in the next time period, then according to the wake-up duration of the first network memory, the first network memory is woken up before each start time of use, so that the first network memory enters an idle state at each start time of use.
[0165] In one possible implementation, the device further includes:
[0166] The model receiving module receives a general hibernation prediction model sent from the cloud. The general hibernation prediction model is determined by training based on historical usage data from multiple second network storage devices.
[0167] If the model training module determines that the first network memory is in learning mode, it uses the first historical usage data of the first network memory to train the general hibernation prediction model to obtain a specific hibernation prediction model corresponding to the first network memory.
[0168] In one possible implementation, each of the second network memories is connected to multiple access devices, the general sleep prediction model includes multiple branch models, each branch model corresponds to different branch device characteristics, and the device further includes:
[0169] Before training the general sleep prediction model, the model optimization module optimizes the general sleep prediction model based on the first device characteristics of the access device connected to the first network memory.
[0170] The optimization process includes: removing branch models in the multiple branch models of the general sleep prediction model whose branch device features do not match the first device features;
[0171] The characteristics of the branch device include the device type of the access device.
[0172] In one possible implementation, the branch device feature also includes the number of access devices.
[0173] In one possible implementation, the device further includes:
[0174] If the first switching module determines that the model self-update condition is met, it controls the first network memory to enter the learning mode.
[0175] The self-updating module uses the second historical usage data of the first network memory to train and update the dedicated dormancy prediction model;
[0176] The second switching module, after determining that the update of the dedicated dormant prediction model is complete, controls the first network memory to switch from the learning mode to the prediction mode.
[0177] The model self-update conditions include at least one of the following: the current time is the update time, the time interval between the current time and the last time the model was updated reaches the update interval threshold, and the first network memory is in a dormant state during the model update process.
[0178] In one possible implementation, the device further includes:
[0179] If the hibernation control module detects that the duration of the first network memory remaining in an idle state is greater than or equal to a preset duration threshold, it controls the first network memory to enter a hibernation state.
[0180] Embodiments of this application provide a network memory control device, including: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing the instructions.
[0181] Embodiments of this application provide a non-volatile computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the above-described method.
[0182] Embodiments of this application provide a computer program product including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.
[0183] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), electrically programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital video disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing.
[0184] The computer-readable program instructions or code described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0185] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" or similar languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this application.
[0186] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0187] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0188] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0189] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0190] It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented using hardware (such as circuits or ASICs (Application Specific Integrated Circuits)) that performs the corresponding function or action, or using a combination of hardware and software, such as firmware.
[0191] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, disclosure, and appended claims in carrying out the claimed invention. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0192] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A network memory control method, characterized by, The method applied to a first network storage comprises: If it is determined that a hibernation prediction condition is met, using data of the first network storage in a first time period before a current time as prediction using data, the prediction using data being data capable of representing a usage habit of a user using the first network storage in the first time period; Performing hibernation prediction according to the prediction using data and a specific hibernation prediction model to obtain a hibernation prediction result, the hibernation prediction result comprising whether the first network storage will be used in a next time period after the current time; Controlling the first network storage to enter an idle state or continue to remain in a hibernation state according to the hibernation prediction result; The hibernation prediction condition comprises that the first network storage is in a prediction mode and the first network storage is currently in a hibernation state; The method further comprises: Receiving a general hibernation prediction model sent by a cloud, the general hibernation prediction model being determined according to historical using data of a plurality of second network storages; If it is determined that the first network storage is in a learning mode, training the general hibernation prediction model by using first historical using data of the first network storage to obtain a specific hibernation prediction model corresponding to the first network storage.
2. The method of claim 1, wherein, The hibernation prediction condition further comprises at least one of the following: a time interval between the current time and a time at which hibernation prediction was last performed reaches a prediction time interval, and the current time is a preset hibernation prediction time.
3. The method of claim 1, wherein, Controlling the first network storage to enter an idle state or continue to remain in a hibernation state according to the hibernation prediction result comprises: If the hibernation prediction result is that the first network storage will be used in the next time period, waking up the first network storage to make the first network storage enter an idle state; or If the hibernation prediction result is that the first network storage will not be used in the next time period, controlling the first network storage to continue to remain in a hibernation state.
4. The method of claim 3, wherein, If the hibernation prediction result is that the first network storage will be used in the next time period, waking up the first network storage comprises: If the hibernation prediction result is that the first network storage will be used in the next time period and the hibernation prediction result further comprises at least one starting using time at which the network storage will be used in the next time period after the current time, according to a wake-up duration of the first network storage, waking up the first network storage before each starting using time to make the first network storage enter an idle state at each starting using time.
5. The method of claim 1, wherein, Each second network storage is connected with a plurality of access devices, the general hibernation prediction model comprises a plurality of branch models, each branch model corresponding to different branch device features, and the method further comprises: Before training the general hibernation prediction model, optimizing the general hibernation prediction model according to first device features of access devices connected with the first network storage; The optimization processing includes: removing branch device features in the plurality of branch models of the general dormancy prediction model that do not match the first device feature. The branch device feature includes a device type of an access device.
6. The method of claim 5, wherein, The branch device feature further includes a device quantity of an access device.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If it is determined that a model self-update condition is met, the first network storage is controlled to enter a learning mode; The exclusive dormancy prediction model is trained and updated using second historical use data of the first network storage; After it is determined that the update of the exclusive dormancy prediction model is completed, the first network storage is controlled to switch from the learning mode to the prediction mode. The model self-update condition includes at least one of the following: a current time is an update time, a time interval between the current time and a last model update time reaches an update interval threshold, and the first network storage is in a dormant state during a model update process.
8. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If it is detected that the first network storage maintains an idle state for a time length greater than or equal to a preset time length threshold, the first network storage is controlled to enter a dormant state.
9. A network memory control device, comprising: comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the method of any one of claims 1-8 when executing the instructions.
10. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by the processor, implement the method of any one of claims 1-8.
11. A computer program product comprising computer readable code, or a non-transitory computer readable storage medium having computer readable code embodied thereon, the computer readable code comprising instructions for causing a computer to perform the method of any one of claims 1 to 10. When the computer-readable code runs in the electronic device, the processor in the electronic device executes the method of any one of claims 1-8.
Citation Information
Patent Citations
Computer memory device control method, computer memory device controller and memory device
CN101520689A
Method and device for storing data
CN102231285A