NAS equipment mode switching control method suitable for high-speed data transmission

By collecting various signals from NAS devices in real time to form scene feature vectors, and combining them with user habit profiles, the system can dynamically predict and adjust modes in advance, solving the problem of high latency in NAS device mode switching and achieving stability and smoothness in high-speed data transmission.

CN121092084AActive Publication Date: 2025-12-09SHENZHEN LINGDECHUANG TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511640566.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2025-12-09
Estimated Expiration
2045-11-11

AI Technical Summary

Technical Problem

Existing NAS devices suffer from passive response and high latency issues during mode switching, which affects the smoothness of high-speed data transmission.

Method used

By collecting real-time environmental signals, network signals, and device status signals from NAS devices, a real-time scene feature vector is formed. Combined with user habit profiles, the mode demand prediction model is dynamically invoked for collaborative prediction. The control path switching chip is adjusted to the ready-to-switch state in advance, and PC access is accurately detected through multi-modal signals to achieve rapid switching.

Benefits of technology

It shortens the mode switching time, improves the user experience of NAS devices, ensures the stability of NAS device mode switching and the effective utilization of resources, and guarantees the smoothness of high-speed data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121092084A_ABST
    Figure CN121092084A_ABST
Patent Text Reader

Abstract

The invention provides an NAS equipment mode switching control method suitable for high-speed data transmission, and relates to the technical field of optimization control, and the method comprises the steps: collecting a time sequence environment signal, a network environment signal and an NAS equipment state signal of NAS equipment in real time through a micro-control unit of the NAS equipment, and carrying out the integration to form a real-time scene feature vector; based on the real-time scene feature vector and the user habit portrait, dynamically calling a mode demand prediction model component to perform collaborative prediction, and outputting a prediction mode; based on the prediction mode, the path switching chip is controlled to be adjusted to a to-be-switched state of the corresponding mode in advance; whether effective PC access exists or not is detected through a micro-control unit of the NAS equipment, and when it is confirmed that the effective PC access exists, the access switching chip is controlled to complete final access switching, and a corresponding mobile hard disk mode or a network mode is entered. The technical problems of passive response and high delay in NAS equipment mode switching in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of optimal control, and in particular to a NAS device mode switching control method suitable for high-rate data transmission. BACKGROUND

[0002] With the continuous growth of household multi-device collaboration and enterprise lightweight storage demand, NAS (Network Attached Storage) devices have been widely used in personal data backup, high-definition video sharing, office file collaboration and other scenarios. In order to adapt to different use requirements, NAS devices usually have multiple working modes.

[0003] However, the mode switching of existing NAS devices generally adopts a passive response logic, which waits for the identification of the access device before starting the hardware path switching. This passive response process results in a total delay of 1-2 seconds in mode switching, which will cause obvious access lag in high-speed transmission of large files, and thus affect the user experience.

[0004] Therefore, in view of the problems of passive response and high delay in NAS device mode switching, there is an urgent need for a NAS device mode switching control method suitable for high-rate data transmission. SUMMARY

[0005] The present application provides a NAS device mode switching control method suitable for high-rate data transmission, which solves the technical problems of passive response and high delay in the prior art.

[0006] The technical solution of the present application to solve the above technical problems is as follows: The present application provides a NAS device mode switching control method suitable for high-rate data transmission, which includes: The micro control unit of the NAS device collects the timing environment signal, network environment signal and NAS device state signal of the NAS device in real time, and integrates them to form a real-time scene feature vector; Based on the real-time scene feature vector and user habit portrait, a mode demand prediction model component is dynamically called for collaborative prediction, and a predicted mode is output, wherein the predicted mode includes a mobile hard disk mode or a network mode; Based on the predicted mode, the path switching chip is controlled to adjust to the waiting state of the corresponding mode in advance; The micro control unit of the NAS device detects whether there is an effective PC access, and when it is confirmed that there is an effective PC access, the path switching chip completes the final path switching and enters the corresponding mobile hard disk mode or network mode.

[0007] The present application has the following advantages: Compared with the prior art, firstly, the timing environment signal, the network environment signal and the NAS device state signal of the NAS device are collected in real time by the micro control unit of the NAS device, and are integrated to form a real-time scene feature vector, thereby providing a reliable data basis for subsequent accurate mode prediction. Secondly, based on the real-time scene feature vector and the user habit portrait, a mode demand prediction model component is dynamically called for collaborative prediction, and a prediction mode including a mobile hard disk mode or a network mode is output, thereby ensuring that the mode prediction is in line with the user habit and adapts to the real-time scene feature, and providing a core basis for subsequent hardware preconfiguration and rapid switching. Thirdly, based on the prediction mode, the control path switching chip is adjusted to the state to be switched in the corresponding mode in advance, and the hardware preparation work of mode switching is moved to before PC recognition, thereby shortening the response time of final mode switching and ensuring the smoothness of high-speed data transmission. Finally, whether there is an effective PC access is detected by the micro control unit of the NAS device, and when it is confirmed that there is an effective PC access, based on the prediction mode, the control path switching chip completes the final path switching and enters the corresponding mobile hard disk mode or network mode, and through multi-modal signal combination analysis, the recognition accuracy of whether it is an effective PC access is improved, and finally the low-delay and high-precision switching of the NAS device mode is realized, thereby ensuring the smoothness of high-speed data transmission and avoiding resource waste caused by invalid switching.

[0008] Through the above technical solution, the real-time scene feature vector is obtained through the whole process optimization of active prediction-advance configuration-accurate triggering-rapid switching, the mode prediction is performed in combination with the user habit portrait, the change from passive waiting access to active demand prediction is realized, the predicted mode is used to enter the state to be switched in advance, the time consumption of subsequent mode switching is shortened, and the effective PC access is accurately detected through multi-modal signals, and the path switching is quickly completed when the effective PC access is confirmed. In this way, the active demand prediction is realized, the total delay of mode switching is shortened, the smoothness of high-speed transmission of large files is ensured, and the user experience of the NAS device is improved. BRIEF DESCRIPTION OF DRAWINGS

[0009] Figure 1 A flowchart of a NAS device mode switching control method suitable for high-speed data transmission is provided for the application. Figure 2 A flowchart of generating a user habit portrait in a NAS device mode switching control method suitable for high-speed data transmission is provided for the application. DETAILED DESCRIPTION

[0010] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described in the description of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0011] In the description of the present application, the terms "first", "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified.

[0012] In the description of the present application, the term "for example" is used to indicate "as an example, illustration or explanation". Any embodiment described as "for example" in the present application is not necessarily interpreted as more preferred or more advantageous than other embodiments. The following description is given in order to enable any person skilled in the art to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that those skilled in the art can recognize that the present application can be implemented without using these specific details. In other examples, well-known structures and processes will not be described in detail to avoid unnecessary details making the description of the present application obscure. Therefore, the present application is not intended to be limited to the shown embodiments, but is consistent with the broadest scope in accordance with the principles and characteristics disclosed.

[0013] Embodiments, such as Figure 1 As shown, the embodiments of the present application provide a NAS device mode switching control method suitable for high-speed data transmission, which comprises: S10: Collecting time sequence environment signals, network environment signals and NAS device state signals of the NAS device in real time through the micro control unit of the NAS device, and integrating to form a real-time scene feature vector.

[0014] NAS device (Network Attached Storage) is a special storage device focusing on centralized management and multi-end sharing of data, which can provide high-speed data access, timing backup, multimedia sharing and other services for PC, smart phone, smart TV and other terminals through local area network or Internet, while supporting bidirectional switching between mobile hard disk mode and network mode. The mobile hard disk mode realizes PC direct connection through Type-C interface, meets the high-speed transmission of video, file and other data, and the network mode realizes simultaneous access of multiple terminals (such as mobile phone, tablet, multiple PC) relying on local area network, supports data sharing, file collaboration and other scenes.

[0015] From the hardware structure, the NAS device mainly includes a storage medium, a path switching chip, a micro control unit (MCU), a high-speed bridge chip, a NAS main control system chip, a network access component, and a power management module: the storage medium is the core carrier for data storage, usually adopts a solid state disk or a mechanical hard disk, and guarantees high-rate data transmission; the path switching chip can switch the connection object of the storage medium according to a control instruction, if switched to the high-speed bridge chip, the mobile hard disk mode is adapted, if switched to the main control chip, the network mode is adapted; the micro control unit (MCU) is the scene perception and control center of the NAS device, can collect multi-modal signals in real time, call a mode demand prediction model component, output a predicted mode, and control the path switching chip to perform pre-configuration and final mode switching according to the prediction result and the PC access state; the high-speed bridge chip is specially designed for the mobile hard disk mode, is used for converting a PC direct connection signal and a storage medium native protocol, bypasses the NAS main control system chip to directly establish a high-speed data path of the PC and the storage medium, and avoids protocol conversion delay; the NAS main control system chip (SOC) is the core management component of the network mode, is responsible for running a NAS system firmware, supports RAID disk array configuration, file system management, network protocol analysis and the like, and realizes multi-device network sharing and professional storage service; the network access component is responsible for network signal coupling, interference suppression, and providing local area network physical connection; and the power management module provides adaptive power supply for each hardware component.

[0016] Generally, real-time scene features are strongly associated with the working mode that the NAS device needs to switch, for example, 14:00-18:00 on weekends, 4 client devices access the local area network at the same time, at this time, the user is more likely to need to share the video and audio files and the like in the NAS device for multiple devices, and the network mode is more strongly associated; 9:00-12:00 on weekdays, 1 client device accesses the local area network, and the NAS has no background backup task, at this time, the user is more likely to need to transmit work files through PC direct connection at high speed, and the mobile hard disk mode is more strongly associated.

[0017] In view of the above problems, the micro control unit of the NAS device is used to collect time sequence environment signals, network environment signals and NAS device state signals of the NAS device in real time, and form a real-time scene feature vector.

[0018] Specifically, step S10 in the method includes: The time sequence environment signal includes absolute time information and a pre-defined time period to which the absolute time information belongs, the network environment signal includes the number of active client devices in the local area network, the device type and the network bandwidth occupancy rate, and the NAS device state signal includes a background task plan, the read-write state of the storage medium and the load rate of the central processing unit and the memory.

[0019] In the embodiments of the present application, the time sequence environment signal is used to mine the use rules of the user for the NAS device from the time dimension, and specifically includes absolute time information and a pre-defined time period to which the absolute time information belongs. The absolute time information refers to real-time time accurate to minutes / seconds, such as 2024-09-26 15:30, and the pre-defined time period is obtained by mapping the absolute time information to a scenario time interval through a preset rule. For example, 8:00-18:00 on weekdays is defined as a user high-frequency direct connection period, and 9:00-18:00 on weekends is defined as a network sharing period. Then, the absolute time information 2024-09-26 15:30:25 can be mapped to the network sharing period. The time sequence environment signal can be directly used as a time dimension basis for matching user habit portraits and predicting mode requirements, thereby improving the accuracy of scenario recognition.

[0020] The network environment signal is used to judge the sharing demand strength and feasibility of the NAS device from the external connection dimension, and specifically includes the number of active client devices in the local area network, the device type, and the network bandwidth occupancy rate. The number of active client devices in the local area network refers to the total number of devices currently connected to the same local area network and interacting with the NAS device, such as 3. The more the number of active client devices in the local area network, the stronger the demand for multiple devices to access the NAS device at the same time, and at this time, the network mode is more preferred. The device type can be identified through local area network discovery protocols such as Bonjour and UPnP to identify device attributes, such as 2 mobile phones + 1 television. Different device types correspond to different demand scenarios, which can further refine the mode prediction direction. The network bandwidth occupancy rate refers to the real-time bandwidth usage ratio of the current local area network. For example, the total bandwidth is 1000 Mbps, and 300 Mbps has been occupied, so the network bandwidth occupancy rate is 30%. Since the network bandwidth occupancy rate is too high, even if it is predicted to be a network mode, it may also cause sharing transmission lag due to insufficient network resources, and the mobile hard disk mode should be preferred.

[0021] The NAS device state signal is used to determine whether the NAS device itself has the conditions for the safe switching mode, and specifically includes background task planning, read-write state of storage medium, and load rate of central processor and memory. The background task planning refers to the automatic tasks preset by the NAS, such as system backup at 24:00 every day. If the current state is system backup, even if the mobile hard disk mode is predicted, the switching needs to be delayed to avoid data loss caused by interruption of backup. The read-write state of storage medium refers to whether the core storage medium (such as solid state disk) of the NAS device is performing read-write operation. If the storage medium is busy, the mode switching may cause interruption of read-write, and thus the switching needs to be performed after the storage medium is idle. The load rate of central processor and memory refers to the current hardware resource occupation of the NAS device, such as 20% of central processor and 30% of memory. When the load is high, the mode switching may cause slow response of the NAS, and thus the current task needs to be completed first, and then the mode is adjusted according to the demand. The NAS device state signal is the safety bottom line for mode switching. Even if the time and network signal point to a certain mode, if the NAS device itself is in a state of performing key task or high load, the switching time or strategy needs to be adjusted to avoid data loss.

[0022] Further, the micro control unit of the NAS device integrates the real-time collected time sequence environment signal, network environment signal and NAS device state signal to form a real-time scene feature vector.

[0023] Exemplarily, first, the specific contents of the time sequence environment signal, network environment signal and NAS device state signal are quantized. For example, the pre-defined time period in the time sequence environment signal is marked with different numbers, such as 1 for user high-frequency direct connection period, 2 for network sharing period, and so on. In this way, the three types of signals are quantized according to the same logic. Then, the quantized numbers are arranged in fixed dimensions to form a real-time scene feature vector. For example, the elements in the real-time scene feature vector [1530, 1, 3, 112, 30, 0, 0, 20, 30] correspond to the absolute time information of 15:30, the pre-defined time period of user high-frequency direct connection period, the number of active client devices of 3, the device type of 2 mobile phones + 1 television, the network bandwidth occupation rate of 30%, the background task planning of none, the read-write state of storage medium of idle, the load rate of central processor of 20%, and the load rate of memory of 30%. In this way, the multi-dimensional scene information is integrated to obtain a structured digital vector, which can provide high-quality input data for the subsequent prediction model.

[0024] In summary, compared with the prior art, the micro control unit of the NAS device collects the time sequence environment signal, network environment signal and NAS device state signal of the NAS device in real time, and integrates them to form a real-time scene feature vector. In this way, a reliable data basis is provided for the subsequent model to accurately predict the mode.

[0025] S20: dynamically invoke a mode demand prediction model component based on the real-time scene feature vector and the user habit portrait to collaboratively predict and output a predicted mode, wherein the predicted mode comprises a mobile hard disk mode or a network mode.

[0026] The real-time scene feature vector can reflect the specific scene state at the current moment, and the user habit portrait refers to extracting the user's mode selection preference and long-term stable behavior rule in different scenes by analyzing the mode switching events of the target user in a preset historical time. The two form a complementary relationship of historical rule-current state, and by mining the internal correlation between the two and the mode selection, a mode demand prediction model component that can consider both historical preferences and real-time changes can be constructed, thereby realizing accurate prediction of the user's current mode demand.

[0027] To solve the above problems, the real-time scene feature vector and the user habit portrait are used to dynamically invoke a mode demand prediction model component for collaborative prediction, and a predicted mode is output, wherein the predicted mode comprises a mobile hard disk mode or a network mode.

[0028] Specifically, step S20 in the method comprises: obtaining a pre-trained mode demand prediction model component, wherein the mode demand prediction model component is composed of P mode demand prediction models; dynamically determining the number K of mode demand prediction models to be invoked; randomly selecting K mode demand prediction models from the mode demand prediction model component, inputting the real-time scene feature vector and the user habit portrait, and taking the majority vote result as the predicted mode.

[0029] In the embodiment of the application, first, a pre-trained mode demand prediction model component is obtained, wherein the mode demand prediction model component is composed of P mode demand prediction models, each of which can independently predict the mode. P is the total number of mode demand prediction models in the mode demand prediction model component, which can be dynamically determined according to actual computing resource and prediction accuracy requirements.

[0030] Secondly, the number K of mode demand prediction models to be invoked is dynamically determined. For example, K is an integer between 1 and P, and the value of K is dynamically adjusted according to the current scene and the prediction reliability of the mode demand prediction model component, thereby reasonably scheduling computing resources. In common scenarios, the mode demand prediction model component is predicted to be reliable, and fewer mode demand prediction models are invoked to save resources and improve efficiency. In uncommon scenarios, the mode demand prediction model component is predicted to be unreliable, and more mode demand prediction models are invoked to ensure prediction accuracy.

[0031] Finally, K mode demand prediction models are randomly selected from the mode demand prediction model component, and the real-time scene feature vector and the user habit portrait are input, and the majority vote result is taken as the predicted mode. For example, K mode demand prediction models are randomly selected from the mode demand prediction model component, each of which inputs the real-time scene feature vector and the user habit portrait, and outputs a single prediction result (mobile hard disk mode or network mode), and finally the majority vote result is determined as the predicted mode. If K is even and the number of votes for mobile hard disk mode and network mode is the same, a preset rule can be used to break the tie to ensure the uniqueness of the result. For example, the historical high-frequency mode corresponding to the current scene in the user habit portrait is preferentially selected as the only result output. If the user habit portrait has no clear tendency, an additional unselected mode demand prediction model is added for secondary prediction to break the tie with the new result. In this way, the advantages of multiple model cooperation can be used to improve prediction reliability, and clear tie-breaking rules can be used to avoid ambiguous results and ensure the uniqueness and adaptability of mode prediction.

[0032] Specifically, the construction steps of the "mode demand prediction model component" include: Collect NAS device historical scene feature vectors under different user habit portraits in a preset historical period, and synchronously record the actual mode type corresponding to each set of historical scene feature vectors to form an original data set; Label the original data set with historical scene feature vectors and user habit portraits as input items and actual mode types as label items to generate a labeled data set; Using P-fold cross-validation method, the labeled data set is randomly divided into P mutually exclusive sub-data sets, each of which can be used as a validation set in turn, and the remaining P-1 sub-data sets are used as training sets; Based on the P training sets and validation sets, P validation-converged mode demand prediction models are trained respectively, and are integrated to form a mode demand prediction model component.

[0033] In the embodiments of the present application, first, NAS device historical scene feature vectors under different user habit portraits in a preset historical period are collected, and the actual mode type corresponding to each set of historical scene feature vectors is recorded synchronously to form an original data set. The preset historical period can be dynamically set according to actual needs, for example, the preset historical period is set to the past 3 months. For example, a number of historical scene feature vectors under different user habit portraits in the past 3 months and the corresponding actual mode types are collected to form an original data set.

[0034] Secondly, the historical scene feature vector and the user habit portrait are taken as input items, and the actual mode type is taken as a label item to label the original data set to generate a label data set. Exemplarily, 1 and 0 can be used to label the actual mode type, for example, 1 represents the network mode, and 0 represents the mobile hard disk mode, to form a label data set in which the input items and the label items are in one-to-one correspondence.

[0035] Thirdly, the P-fold cross-validation method is adopted to randomly divide the label data set into P mutually exclusive sub-data sets, each of which can be used as a validation set in turn, and the remaining P-1 sub-data sets are used as training sets. The specific number of P can be dynamically determined according to the actual computing power and the prediction accuracy requirement, for example, when P is 5, the label data set is randomly divided into 5 mutually exclusive sub-data sets, each time the training is performed, 1 of the sub-data sets is used as a validation set, and the remaining P-1 sub-data sets are used as training sets, the validation set is switched in turn to ensure that each sub-data set participates in the validation, and the generalization ability of the model to different scenes can be improved through multiple rounds of validation.

[0036] Finally, based on the P training sets and the validation sets, P pattern demand prediction models that converge are trained respectively to form a pattern demand prediction model component. Exemplarily, the pattern demand prediction model component can be obtained through the following technical path: 1. Model construction: P pattern demand prediction models can be constructed by using a decision tree, which mainly includes an input layer, a split node and a pruning strategy, wherein the input layer includes a real-time scene feature vector and a user habit portrait feature; the information gain (ID3 algorithm) or the Gini index (CART algorithm) can be used as the node splitting basis, each internal node corresponds to a threshold judgment of a feature, such as the number of client devices ≤1 and the central processing unit load rate ≤30%, and the leaf node directly outputs the predicted mode; the combination of pre-pruning (limiting the tree depth ≤8 layers and the minimum number of nodes ≥5) and post-pruning (removing branches that do not improve the accuracy of the validation set) is adopted to avoid model overfitting (only remembering training data and poor generalization ability), and the P decision tree models are heterogeneous by randomly initializing the priority of the split feature and setting different tree depth thresholds, to ensure that more scene feature combinations can be covered when collaborative prediction is performed.

[0037] 2. Model training: Use P training sets and validation sets respectively, train P pattern demand prediction models that converge in validation, take the training process of a pattern demand prediction model as an example, fuse the historical scene feature vector and user habit portrait feature in the training set as the model input, and take the corresponding actual mode type as the label, start from the root node, traverse all features and possible threshold values, select the feature-threshold combination that makes the current node impurity (such as Gini index) decrease the most to split, such as the branch of client device quantity ≤1 pointing to the mobile hard disk mode, and the branch of client device quantity >1 pointing to the network mode, recursively split the child nodes until the stopping condition is met, after each round of splitting, evaluate the prediction accuracy of the model with the validation set, when the validation set accuracy improvement is less than 1% in the last 3 iterations, or the tree depth reaches the preset maximum value, the model is determined to converge, at this time, save the current tree structure as the trained pattern demand prediction model. And train P pattern demand prediction models according to the same method.

[0038] 3. Model integration: unify the input and output formats of the P pattern demand prediction models that converge in validation, package and store the structure parameters of the P pattern demand prediction models, support fast retrieval of any sub-model by index, and provide a basis for subsequent dynamic selection of K models for collaborative prediction. In this way, the constructed pattern demand prediction model component can not only adapt to the lightweight demand of NAS devices by taking advantage of the strong explainability and high efficiency of decision trees, but also improve the prediction reliability in complex scenarios through multi-model collaboration.

[0039] Preferably, in the scenario where the computing resources of the NAS device are sufficient, the skilled person in the art can also use a heterogeneous algorithm strategy to construct the pattern demand prediction model component, for example, selecting algorithms of different principles such as decision tree, support vector machine, and micro neural network to construct P pattern demand prediction models with different structures, avoiding the inherent limitations of a single algorithm in a specific scenario, making the pattern demand prediction model component maintain stable prediction performance in various scenarios, and ultimately improving the overall prediction accuracy and robustness.

[0040] Specifically, as shown in Figure 2 The method for generating the "user habit portrait" includes: Record each mode switching event of the target user within a preset historical time, associate and store the scene feature vector and the corresponding mode type when the mode switching event occurs, and form a historical data sample set; Analyze the historical data sample set using an association rule learning algorithm, and calculate the association strength between the scene feature vector and the mode type; Select the historical data samples with an association strength greater than or equal to a preset association strength threshold, and integrate them to form a user habit portrait including the scene feature vector-mode type mapping relationship.

[0041] In the embodiments of the present application, firstly, each mode switching event of the target user in a preset historical time is recorded, and the scene feature vector and the corresponding mode type when the mode switching event occurs are associated and stored to form a historical data sample set. The preset historical time can be dynamically adjusted according to the actual use scene and user demand of the NAS device. If the preset historical time is set to be longer, the mode switching rules of the target user at different time points and in different use scenes can be fully covered, and a user portrait reflecting the long-term stable behavior preference of the user can be generated. If the preset historical time is set to be shorter, the recent mode use tendency of the target user can be captured, and a high-time-efficiency user portrait more in line with the current behavior characteristics can be generated. The dimension of the scene feature vector here is consistent with the real-time scene feature vector in step S10 as much as possible, so as to ensure the accuracy of the interaction of the two types of data. For example, if the preset historical time is the past one month, each mode switching event of the target user in the past one month is tracked, the scene feature vector and the corresponding mode type when the event occurs are recorded in detail, a historical data sample in which the scene feature vector and the mode type are in one-to-one correspondence is formed, for example, the scene feature vector is weekend 10:00, 3 mobile phones and 1 television are connected, and the mode switched is network mode, a set of historical data samples are formed, and a historical data sample set is formed in the same way.

[0042] Secondly, the historical data sample set is analyzed by using an association rule learning algorithm, and the association strength between the scene feature vector and the mode type is calculated. For example, the Apriori algorithm can be used to analyze the historical data sample set, and the association strength between the scene feature vector and the mode type is calculated. For example, the frequency of the mode type when the scene feature vector occurs can be calculated as the association strength between the scene feature vector and the mode type. For example, if the scene feature vector A occurs 100 times, 90 times of which correspond to the mobile hard disk mode, the association strength between the scene feature vector A and the mobile hard disk mode is 90%.

[0043] Finally, the historical data samples with an association strength greater than or equal to a preset association strength threshold are selected, and a user habit portrait including the mapping relationship between the scene feature vector and the mode type is integrated. The preset association strength threshold can be dynamically set according to the actual situation, for example, the preset association strength threshold is set to be 80%. For example, if the preset association strength threshold is 80%, the historical data samples with an association strength greater than or equal to 80% are selected, and a user habit portrait is integrated, for example, the user habit portrait includes the following contents: (working day 8:00-18:00, client device quantity 2) and (mobile hard disk mode), (weekend 9:00-18:00, client device quantity greater than 3) and (network mode), etc. The user habit portrait is directly used as a reference basis for the historical behavior of the user for mode prediction.

[0044] Specifically, the "dynamically determining the number K of mode demand prediction models to be called" includes: calculating the average similarity between the real-time scene feature vector and the preset centroid scene feature vector library; obtaining the average prediction accuracy of the mode demand prediction model component; based on the average similarity and the average prediction accuracy, obtaining the number K of mode demand prediction models to be called through quantitative calculation, wherein the value range of K is 1 to P.

[0045] In the embodiments of the present application, firstly, the average similarity between the real-time scene feature vector and the preset centroid scene feature vector library is calculated. The centroid scene feature vector library is a set of scene representative vectors formed by aggregating the features of high-frequency typical scenes in the historical use process of the target user.

[0046] Exemplarily, the centroid scene feature vector library can be constructed through the following technical path: 1. Data preparation: collect all historical scene feature vectors of the target user in the preset historical period (try to be completely consistent with the dimension and quantization standard of the real-time scene feature vector in step S10), and eliminate invalid data such as device failure and signal anomaly. 2. High-frequency scene screening: count the frequency of each historical scene vector, and screen out scenes with a frequency ≥ a preset threshold (such as appearing ≥ 10 times per month) to form a high-frequency scene candidate set. 3. Scene clustering and centroid calculation: using a lightweight clustering algorithm such as K-means, classify the high-frequency scene candidate set based on cosine similarity, and the number of categories can be dynamically adjusted according to the diversity of user scenes, such as 3-5 categories, so that the similarity of scene features in each category is ≥ a preset threshold (such as 0.8). For each category of scene, calculate the mean value of each dimension of the feature vector to generate the centroid vector of the category. 4. Iterative updating of the centroid scene feature vector library: periodically (such as every month) repeat the above steps based on the newly added historical scene data to optimize the centroid scene feature vector library, and ensure that the centroid scene feature vector fits the latest changes in user habits. In this way, the matching of the centroid scene feature vector can greatly reduce the computational load of the MCU device, while avoiding the accidental deviation of a single high-frequency scene and ensuring the efficiency and accuracy of similarity calculation.

[0047] Exemplarily, the cosine similarity between the real-time scene feature vector and all centroid scene feature vectors in the preset centroid scene feature vector library can be calculated, and then the average is calculated to obtain the average similarity. The value range of the average similarity is 0-1. The higher the average similarity, the closer the current scene is to the typical scene, and the easier it is to predict accurately.

[0048] Secondly, the average prediction accuracy of the mode demand prediction model component in recent mode prediction is obtained. The value range of the average prediction accuracy is 0-1. The higher the average prediction accuracy, the more reliable the mode demand prediction model component as a whole.

[0049] Finally, based on the average similarity and the average prediction accuracy, the number K of mode demand prediction models to be called is obtained by quantitative calculation, wherein the value range of K is 1 to P. Exemplarily, K = floor {P x [a x (1-average similarity) + b x (1-average prediction accuracy)]}, floor {} is a floor calculation, which can be performed by rounding, rounding up, or rounding down, a and b are weights of the average similarity and the average prediction accuracy respectively, a + b = 1, a and b can be dynamically set according to actual conditions, and P is the total number of mode demand prediction models in the mode demand prediction model component. Exemplarily, if a = 0.7, b = 0.3, P = 5, the average similarity = 0.8, and the average accuracy = 0.9, then K = floor {5 x [0.7 x (1-0.8) + 0.3 x (1-0.9)]} = 1 (rounding up), because the average similarity and the average prediction accuracy are both high, only one mode demand prediction model needs to be called from the mode demand prediction model component for prediction.

[0050] In summary, compared with the prior art, the present application dynamically calls a mode demand prediction model component based on the real-time scene feature vector and the user habit portrait for collaborative prediction, and outputs a predicted mode, wherein the predicted mode includes a mobile hard disk mode or a network mode. In this way, it is ensured that the mode prediction is not only in line with the user habit, but also adapts to the real-time scene characteristics, providing a core basis for subsequent hardware pre-configuration and rapid switching.

[0051] S30: Based on the predicted mode, control the path switching chip to adjust to the to-be-switched state of the corresponding mode in advance.

[0052] In the prior art, the mode switching of the NAS device adopts a passive response logic of detecting PC access first and then starting mode configuration, and the path switching is started only after the PC access detection is completed. The entire process usually takes 1-2 seconds, and in a high-speed data transmission scenario, obvious waiting lag is easy to occur, affecting the user experience.

[0053] To solve the above problems, the present application controls the path switching chip to adjust to the to-be-switched state of the corresponding mode in advance based on the predicted mode.

[0054] Specifically, step S30 in the method comprises: If the predicted mode is a mobile hard disk mode, the data path between the storage medium and the high-speed bridge chip is pre-connected, and the high-speed bridge chip is pre-initialized to a low-power standby state; if the predicted mode is a network mode, the data path between the storage medium and the NAS device main control system chip is pre-connected, and the basic drive loading and network protocol stack initialization of the NAS device main control system chip are pre-started.

[0055] For example, if the predicted mode is a portable hard drive mode, the path switching chip, according to the instructions of the microcontroller unit (MCU), pre-connects the physical data link between the storage medium and the high-speed bridge chip, such as a PCIe channel or SATA bus, avoiding the need to initiate the path connection after the PC is actually connected, thus saving the 100-300ms delay required for traditional path establishment. The high-speed bridge chip is pre-initialized to a low-power standby state, for example, by disabling unnecessary modules to reduce power consumption.

[0056] For example, if the prediction mode is network mode, the path switching chip, according to the instructions of the microcontroller unit (MCU), pre-connects the data link between the storage medium and the NAS main control system chip (SOC, responsible for running the NAS system firmware and managing network services). The purpose of this pre-connection is to allow the main control system chip to obtain the mounting information of the storage medium (such as partition table and file index) in advance, avoiding rescanning the storage medium during subsequent switching. The main control system chip is woken from sleep mode (or low-power mode), prioritizes loading the core driver, and completes the initialization of the basic network protocol stack. However, the complete user interface and redundant services are not started at this time to control the startup time. Thus, when a PC accesses the network, there is no need to wait for the protocol stack to be initialized from scratch; a data transmission session can be established directly, reducing the initial access latency.

[0057] In summary, compared to existing technologies, this application, based on the aforementioned predictive mode, allows the control path switching chip to pre-adjust to the corresponding mode's ready-to-switch state. This moves the hardware preparation for mode switching forward to before PC recognition, thereby shortening the final mode switching response time and ensuring smooth high-speed data transmission.

[0058] S40: The microcontroller unit of the NAS device detects whether there is a valid PC access. When a valid PC access is confirmed, the control path switching chip completes the final path switching based on the prediction mode, and enters the corresponding mobile hard drive mode or network mode.

[0059] In existing technologies, the determination of whether a NAS device has a valid PC connection usually relies solely on the VBUS voltage signal. Due to the limitations of a single signal dimension, non-PC devices with the same VBUS voltage may be misidentified as PCs, thereby triggering unnecessary external hard drive mode switching and wasting NAS computing power and power consumption.

[0060] To address the aforementioned issues, this application uses the microcontroller unit of the NAS device to detect the presence of a valid PC connection. When a valid PC connection is confirmed, the control path switching chip completes the final path switching based on the prediction mode, entering the corresponding mobile hard drive mode or network mode.

[0061] Specifically, step S40 in the method includes: Synchronously acquire multi-mode signals from the Type-C interface, wherein the multi-mode signals include VBUS voltage signals, configuration channel signals, and data line differential signals; Extract the temporal features of the multimodal signal, input them into a pre-trained binary classification neural network model, and output valid access or invalid access.

[0062] In this embodiment, the multi-mode signals of the Type-C interface are first synchronously acquired. These multi-mode signals include VBUS voltage signals, configuration channel signals, and data line differential signals. For example, the microcontroller unit (MCU) of the NAS device can synchronously and in parallel acquire the VBUS voltage signals, configuration channel signals, and data line differential signals of the Type-C interface through its built-in signal acquisition module. The VBUS voltage signal reflects the power requirements and capabilities of the access device, such as voltage stability and rise rate. The configuration channel signal serves as the core carrier for device identity and role negotiation, with a focus on acquiring whether it contains specific frequency pulses, such as the 1kHz pulse unique to PCs and its duration. The data line differential signal reflects data interaction capabilities. Synchronous acquisition avoids feature distortion caused by timing misalignment of different signals, ensuring complete capture of the attribute differences of the access device in three dimensions.

[0063] Secondly, the temporal features of the multimodal signals are extracted and input into a pre-trained binary classification neural network model, which outputs whether the access is valid or invalid. For example, firstly, temporal features with device-discriminating characteristics are extracted from the acquired multimodal signals. These include, for instance, the rise time of the VBUS voltage signal (typically 50-100ms for PC access, shorter than 30ms for non-PC devices), the pulse frequency and duration of the configuration channel signal (PCs send 1kHz pulses lasting 20-30ms, while pure power supply devices have no pulses), and the appearance delay and number of synchronization pulses of the data line differential signal (signals appear 100-200ms after PC access and contain 5-10 synchronization pulses, a feature absent in non-data devices). Then, these quantized temporal features are input into the pre-trained binary classification neural network model, which calculates the result of valid or invalid access through forward propagation.

[0064] For example, a binary classification neural network model can be constructed through the following technical path: 1. Data acquisition: Collect VBUS voltage signals, configuration channel signals, and data line differential signals when different types of devices are connected to the NAS via the Type-C interface. Label PC access samples as valid access (label 1), and non-PC access and no device access samples as invalid access (label 0), forming an original dataset containing 100,000+ samples. 2. Model architecture design: Optimize the CNN-LSTM hybrid architecture of the DogAkin binary classification neural network model, which mainly consists of an input layer, a feature extraction layer, a temporal modeling layer, a fully connected layer, and an output layer. The input layer receives the original data, and the dimension is consistent with the number of extracted features; the feature extraction layer is a 1D-CNN layer (3×1 kernel size, 16 neurons); the temporal modeling layer is a 1LSTM layer (32 hidden units) that captures the time-dependent relationships of feature vectors; the fully connected layer has 16 neurons, which are integrated using the ReLU activation function. The output layer has one neuron, which uses the Sigmoid activation function to output the effective access probability (range 0-1). A probability ≥ 0.95 is considered 1, otherwise 0. 3. Model training: The original dataset is divided into training, validation, and test sets in a 7:2:1 ratio. The cross-entropy loss function (adapted to binary classification tasks) and the Adam optimizer (initial learning rate 1e-4) are used. The batch size is set to 32, and the maximum number of training epochs is 50. When the accuracy on the test set reaches ≥ 98%, it is considered converged, and the binary classification neural network model is obtained.

[0065] In summary, compared to existing technologies, this application detects the presence of a valid PC connection through the microcontroller unit of the NAS device. When a valid PC connection is confirmed, the control path switching chip completes the final path switching based on the predicted mode, entering the corresponding mobile hard drive mode or network mode. Thus, through multi-modal signal combination analysis, the accuracy of identifying whether a PC connection is valid is improved, ultimately achieving low-latency, high-precision switching of NAS device modes, ensuring smooth high-speed data transmission, and avoiding resource waste caused by invalid switching.

[0066] In summary, the embodiments of this application have at least the following technical effects: Compared to existing technologies, this application first uses the microcontroller unit of the NAS device to collect real-time environmental signals, network environmental signals, and NAS device status signals, integrating them to form a real-time scene feature vector. This provides a reliable data foundation for subsequent models to perform accurate pattern predictions.

[0067] Secondly, based on the real-time scene feature vectors and user habit profiles, this application dynamically invokes the pattern demand prediction model component for collaborative prediction, outputting a predicted pattern, which includes a portable hard drive mode or a network mode. This ensures that the pattern prediction aligns with user habits and adapts to real-time scene characteristics, providing a core basis for subsequent hardware pre-configuration and rapid switching.

[0068] Furthermore, based on the aforementioned predictive mode, this application controls the path switching chip to pre-adjust to the corresponding mode's ready-to-switch state. This moves the hardware preparation for mode switching forward to before PC recognition, thereby shortening the final mode switching response time and ensuring smooth high-speed data transmission.

[0069] Finally, this application detects the presence of a valid PC connection through the microcontroller unit of the NAS device. When a valid PC connection is confirmed, the control path switching chip completes the final path switching based on the predicted mode, entering the corresponding external hard drive mode or network mode. Thus, through multimodal signal combination analysis, the accuracy of identifying whether a PC connection is valid is improved, ultimately achieving low-latency, high-precision switching of the NAS device mode, ensuring smooth high-speed data transmission, and avoiding resource waste caused by invalid switching.

[0070] Through the aforementioned technical solution, this application optimizes the entire process of proactive prediction, pre-configuration, precise triggering, and rapid switching. It acquires real-time scene feature vectors and combines them with user habit profiles for pattern prediction, achieving a shift from passively waiting for access to proactively predicting needs. Based on the predicted pattern, it enters a pre-switching state in advance, shortening the subsequent mode switching time. Furthermore, it accurately detects valid PC access through multi-modal signals and quickly completes the path switching upon confirming valid PC access. In this way, it achieves proactive demand prediction, reduces the overall latency of mode switching, ensures the smoothness of high-speed large file transfers, and improves the user experience of NAS devices.

[0071] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0072] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0073] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will 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 program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0076] Although preferred embodiments of the invention have been described, those skilled in the art, once they have learned the basic inventive concept, can make other changes and modifications to these embodiments.

[0077] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of this invention and its equivalents, this invention also intends to include these modifications and variations.

Claims

1. A NAS device mode switching control method suitable for high-speed data transmission, characterized in that, include: The microcontroller unit of the NAS device collects the timing environment signal, network environment signal and NAS device status signal of the NAS device in real time, and integrates them to form a real-time scene feature vector. Based on the real-time scene feature vector and user habit profile, the pattern demand prediction model component is dynamically invoked to perform collaborative prediction and output the prediction mode, wherein the prediction mode includes mobile hard drive mode or network mode. Based on the predicted mode, the control path switching chip is pre-adjusted to the corresponding mode's ready-to-switch state; The NAS device detects whether a valid PC is connected. When a valid PC is confirmed to be connected, the control path switching chip completes the final path switching and enters the corresponding mobile hard drive mode or network mode.

2. The NAS device mode switching control method for high-speed data transmission according to claim 1, characterized in that, The timing environment signals include absolute time information and the predefined time period to which the absolute time information belongs. The network environment signals include the number of active client devices in the local area network, device type, and network bandwidth utilization. The NAS device status signals include background task schedules, read / write status of storage media, and load rates of the central processing unit and memory.

3. The NAS device mode switching control method for high-speed data transmission according to claim 1, characterized in that, Based on the real-time scene feature vectors and user habit profiles, the pattern demand prediction model component is dynamically invoked for collaborative prediction, outputting the predicted pattern, including: Obtain a pre-trained pattern demand prediction model component, wherein the pattern demand prediction model component consists of P pattern demand prediction models; Dynamically determine the number K of the pattern demand prediction models that need to be invoked; K pattern demand prediction models are randomly selected from the pattern demand prediction model components. Real-time scene feature vectors and user habit profiles are input, and the majority vote result is used as the prediction model.

4. The NAS device mode switching control method suitable for high-speed data transmission according to claim 3, characterized in that, The construction steps of the pattern demand forecasting model component include: Collect historical scene feature vectors of NAS devices under different user habit profiles within a preset historical period, and simultaneously record the actual mode type corresponding to each set of historical scene feature vectors to form the original dataset. Using historical scene feature vectors and user habit profiles as inputs and actual pattern types as labels, the original dataset is labeled to generate a labeled dataset; The P-fold cross-validation method is used to randomly divide the labeled dataset into P mutually exclusive subsets. Each subset can be used as the validation set in turn, and the remaining P-1 subsets are used as the training set. Based on P training sets and validation sets, P convergent pattern demand prediction models are trained and integrated to form a pattern demand prediction model component.

5. The NAS device mode switching control method for high-speed data transmission according to claim 3, characterized in that, Methods for generating user habit profiles include: Record every mode switching event of the target user within a preset historical time period, associate and store the scene feature vector and the corresponding mode type when the mode switching event occurs, and form a historical data sample set. The historical data sample set is analyzed using an association rule learning algorithm to calculate the association strength between scene feature vectors and pattern types; Historical data samples with a correlation strength greater than or equal to a preset correlation strength threshold are selected and integrated to form a user habit profile that includes the mapping relationship between scene feature vectors and pattern types.

6. The NAS device mode switching control method for high-speed data transmission according to claim 3, characterized in that, The number K of the pattern demand prediction models to be invoked is dynamically determined, including: Calculate the average similarity between the real-time scene feature vector and the preset centroid scene feature vector library; Obtain the average prediction accuracy of the components of the pattern demand prediction model; Based on the average similarity and average prediction accuracy, the number K of the pattern demand prediction models to be called is calculated, where the value of K ranges from 1 to P.

7. The NAS device mode switching control method for high-speed data transmission according to claim 1, characterized in that, Based on the predicted mode, the control path switching chip is pre-adjusted to the corresponding mode's ready-to-switch state, including: if the predicted mode is a portable hard drive mode, pre-connecting the data path between the storage medium and the high-speed bridge chip, and pre-initializing the high-speed bridge chip to a low-power standby state; if the predicted mode is a network mode, pre-connecting the data path between the storage medium and the NAS device's main control system chip, and pre-starting the basic driver loading and network protocol stack initialization of the NAS device's main control system chip.

8. The NAS device mode switching control method for high-speed data transmission according to claim 1, characterized in that, The microcontroller unit of the NAS device detects the presence of a valid PC connection, including: Synchronously acquire multi-mode signals from the Type-C interface, wherein the multi-mode signals include VBUS voltage signals, configuration channel signals, and data line differential signals; Extract the temporal features of the multimodal signal, input them into a pre-trained binary classification neural network model, and output valid access or invalid access.

Citation Information

Patent Citations

  • Network storage device and mode switching method of network storage device

    CN115981546A

  • Intelligent awakening system and method for mobile hard disk in low-power-consumption mode

    CN120386564A

  • Solid state disk intelligent read-write optimization method based on artificial intelligence

    CN120821432A

  • Methods and mechanisms for proactive memory management

    US20040068627A1

  • Systems and methods for real-time cyber incident detection in data sparse environments using artificial intelligence

    US20240037228A1