Network switching method and device, electronic equipment, storage medium and program product
By comparing the communication data sets of electronic devices, using prediction models to judge future network status, and performing network switching in advance, the problem of low communication smoothness caused by network abnormalities in traditional technology is solved, and the network communication quality of the equipment is improved.
Patent Information
- Application Number
- CN202411230140.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-27
AI Technical Summary
In traditional technology, when the network of electronic devices is in an abnormal state, the smoothness of network communication is low, making it difficult to effectively switch networks, resulting in a decline in the quality of device communication.
By obtaining the communication data set of the first and second moments, comparing the differences between the two, using the prediction model to judge the network status in the future time period, and performing network switching in advance to avoid the occurrence of network abnormal state.
It improves the smoothness of network communication of electronic devices, ensures that the equipment switches in advance before network abnormalities, avoids deterioration of network status, and improves communication quality.
Smart Images

Figure CN119212024A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a network switching method, device, electronic device, storage medium and program product. Background Art
[0002] With the popularization of electronic devices, electronic devices are used more and more frequently in daily life. The smooth network has laid the foundation for the normal use of electronic devices. When the network is abnormal, it is necessary to switch the network connected to the electronic device to ensure the smooth network of the electronic device.
[0003] In conventional technology, when the network of an electronic device is in an abnormal state, the network of the electronic device is switched, resulting in low smoothness of the network communication of the electronic device. Summary of the invention
[0004] The embodiments of the present application provide a network switching method, device, electronic device, storage medium and program product, which can improve the smoothness of network communication of electronic devices.
[0005] In a first aspect, the present application provides a network switching method, comprising:
[0006] Acquire a first communication data set corresponding to a first moment and a second communication data set corresponding to a second moment; the first moment is earlier than the second moment;
[0007] When the second communication data set is different from the first communication data set, obtaining a predicted network switching result based on the first communication data set and the second communication data set;
[0008] Based on the predicted network switching result, the network of the electronic device is switched.
[0009] In a second aspect, the present application further provides a network switching device, including:
[0010] An acquisition module, configured to acquire a first communication data set corresponding to a first moment and a second communication data set corresponding to a second moment; the first moment is earlier than the second moment;
[0011] A prediction module, configured to obtain a predicted network switching result based on the first communication data set and the second communication data set when the second communication data set is different from the first communication data set;
[0012] A switching module is used to switch the network of the electronic device based on the predicted network switching result.
[0013] In a third aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0015] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0016] The above-mentioned network switching method, device, electronic device, computer-readable storage medium and computer program product, when the second communication data set is different from the first communication data set, determine the predicted network switching result based on the first communication data set and the second communication data set, that is, when at least one of the geographical information or network behavior of the electronic device changes, it is judged that the network status of the electronic device in the future time period may be in a network abnormal state, then determine the predicted network switching result based on the first communication data set and the second communication data set, and the electronic device controls the electronic device to perform network switching based on the predicted network switching result, that is, predict that the network status of the electronic device in the future time period is a network abnormal state based on the first communication data set and the second communication data set, and perform network switching on the electronic device before the electronic device is in the network abnormal state, thereby avoiding the network status of the electronic device in the network abnormal state and improving the smoothness of the network communication of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0018] FIG1 is an application environment diagram of a network switching method in one embodiment;
[0019] FIG2 is a schematic diagram of a flow chart of a network switching method in an embodiment;
[0020] FIG3 is a schematic diagram of a communication data set in one embodiment;
[0021] Figure 4 is a schematic diagram of a long-term memory model in one embodiment;
[0022] FIG5 is a flow chart of a target prediction model determination step in one embodiment;
[0023] FIG6 is a schematic diagram of monitoring a communication data set in one embodiment;
[0024] FIG7 is a flow chart of the steps of determining the test result in one embodiment;
[0025] FIG8 is a schematic diagram of an iterative update process in one embodiment;
[0026] FIG9 is a structural block diagram of a network switching device in one embodiment;
[0027] FIG. 10 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] The network switching method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1. The electronic device 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. For example, the electronic device 102 obtains the first communication data set corresponding to the first moment and the second communication data set corresponding to the second moment; the first moment is earlier than the second moment; when the second communication data set is different from the first communication data set, the first communication data set and the second communication data set are input into the target prediction model to obtain the predicted network switching result; based on the predicted network switching result, the network of the electronic device is switched. The electronic device 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0030] In an exemplary embodiment, as shown in FIG2 , a network switching method is provided, which is described by taking the method applied to the electronic device in FIG1 as an example, and includes the following steps 202 to 206. Among them:
[0031] Step 202: Acquire a first communication data set corresponding to a first moment and a second communication data set corresponding to a second moment; the first moment is earlier than the second moment.
[0032] The first moment refers to the moment of collecting the first communication data set, the second moment refers to the moment of collecting the second communication data set, and the first moment is before the second moment, that is, the first moment is earlier than the second moment. The communication data set refers to a set of data related to communication, and the communication data set includes but is not limited to a geographic information subset and a network behavior subset. The geographic information subset refers to the location information of the geographical location of the electronic device and the network information corresponding to the geographical location. The network behavior subset refers to the information of the network switching behavior. For example, as shown in FIG3, the geographic information subset includes user coordinates, gyroscope coordinates, surrounding cell information, surrounding WIFI (Wireless Fidelity, wireless local area network) information and user data. The surrounding cell information includes but is not limited to RSRP (Reference Signal Received Power), SNR (Signal-to-Noise Ratio, signal-to-noise ratio), frequency band, bandwidth, channel and modulation mode. The surrounding WIFI information includes but is not limited to SSID (Service Set Identifier, WIFI network name), MAC (Media Access Control, physical address) and RSSI (Received Signal Strength Indicator, received signal strength indicator), user data includes but is not limited to the communication path of the electronic device, the transmission power of the electronic device, the time, location and travel mode; the network behavior subset includes but is not limited to the network switching method and the corresponding network information, for example, cellular network reselection, the network switching method is to actively initiate network reselection, and the corresponding network information is the cell ID (Identifier) before the network switching and the cell ID after the network switching, or, WIFI network roaming, the network switching method is to actively switch to other APs (Access Points, wireless network access points)), and the corresponding network information is the SSID and MAC of the switching AP, etc. The first communication data set refers to the communication data set collected at the first moment, and the first communication data set includes but is not limited to the first geographic information subset and the first network behavior subset. The second communication data set refers to the communication data set collected at the second moment, and the second communication data set includes but is not limited to the second geographic information subset and the second network behavior subset.
[0033] Exemplarily, the electronic device acquires the first communication data set at a first moment and then acquires the second communication data set at a second moment based on the target time interval. The target time interval refers to a preset time interval, which can be set according to actual needs and is not limited here.
[0034] In an exemplary embodiment, when the display screen of the electronic device is in a light-screen state, the electronic device acquires a first communication data set at a first moment based on a target time interval, and then acquires a second communication data set at a second moment. The display screen of the electronic device is in a light-screen state, which can be understood as the electronic device is in use, that is, when the electronic device is in use, the electronic device acquires the first communication data set corresponding to the first moment and the second communication data set corresponding to the second moment.
[0035] Step 204: when the second communication data set is different from the first communication data set, a predicted network switching result is obtained based on the first communication data set and the second communication data set.
[0036] Among them, the second communication data set is different from the first communication data set means that at least one information in the second communication data set and the second communication data set is different, for example, the first geographic information subset and the second geographic information subset, or at least one of the first network behavior subset and the second network behavior subset are different. The predicted network switching result refers to the network switching result of the future time period determined according to the first communication data set and the second communication data set. The predicted network switching result includes but is not limited to at least one of the predicted judgment result and the predicted switching network; the predicted judgment result refers to the result of predicting and judging the network status of the predicted time period, and the predicted judgment result can be network abnormality and network normal; the predicted switching network refers to the predicted switching network, which can be understood as the network that the electronic device will connect to in the predicted time period.
[0037] Exemplarily, the electronic device compares the second communication data set with the first communication data set, and when the second communication data set is different from the first communication data set, the electronic device determines a predicted network switching result according to the first communication data set and the second communication data set.
[0038] In an exemplary embodiment, step 204 also includes: when the second communication data set is the same as the first communication data set, obtaining a third communication data set corresponding to a third moment, taking the second communication data set as an updated first communication data set, taking the third communication data set as an updated second communication data set, and repeating step 204.
[0039] Step 206: Switch the network of the electronic device based on the predicted network switching result.
[0040] Among them, network switching refers to switching the network to which the electronic device is connected.
[0041] Exemplarily, the electronic device controls the electronic device to connect to the predicted network switching result based on the predicted network switching result in the predicted network switching result.
[0042] In the above-mentioned network switching method, when the second communication data set is different from the first communication data set, the predicted network switching result is determined based on the first communication data set and the second communication data set, that is, when at least one of the geographical information or the network behavior of the electronic device changes, it is judged that the network status of the electronic device in the future time period may be in a network abnormal state, then the predicted network switching result is determined according to the first communication data set and the second communication data set, and the electronic device controls the electronic device to perform network switching based on the predicted network switching result, that is, it is predicted that the network status of the electronic device in the future time period is a network abnormal state according to the first communication data set and the second communication data set, and the network switching is performed on the electronic device before the electronic device is in the network abnormal state, thereby avoiding the network status of the electronic device in the network abnormal state and improving the smoothness of the network communication of the electronic device.
[0043] In an exemplary embodiment, performing network switching on an electronic device based on a predicted network switching result includes:
[0044] When the prediction judgment result of the predicted network switching result is that the network is abnormal, the electronic device is controlled to connect to the predicted switching network of the predicted network switching result.
[0045] The predicted network switching result refers to the predicted switching network, and the predicted network switching result may be a cellular network or a WIFI network, etc.
[0046] Exemplarily, after obtaining the predicted network switching result, the electronic device obtains the predicted judgment result from the predicted network switching result. If the predicted judgment result is that the network is abnormal, the predicted switching network is obtained from the predicted network switching result, and the electronic device is controlled to connect to the predicted switching network.
[0047] In this embodiment, the electronic device obtains a prediction judgment result from the predicted network switching result. The prediction judgment result is a network abnormality, indicating that the network state of the electronic device in the predicted time period in the future is about to be in a network abnormal state. The predicted switching network is obtained from the predicted network switching result, and the electronic device is controlled to connect to the predicted switching network, that is, the network switching of the electronic device is performed before the electronic device is in the network abnormal state, thereby avoiding the network state of the electronic device being in the network abnormal state and improving the smoothness of the network communication of the electronic device.
[0048] In an exemplary embodiment, when the first communication data set includes the first geographic information subset and the first network behavior subset, and the second communication data set includes the second geographic information subset and the second network behavior subset, and when the second communication data set is different from the first communication data set, obtaining a predicted network switching result based on the first communication data set and the second communication data set includes:
[0049] Compare the first geographic information subset and the second geographic information subset, and / or compare the first network behavior subset and the second network behavior subset; when the first geographic information subset and the second geographic information subset, and / or the first network behavior subset and the second network behavior subset are different, obtain a predicted network switching result based on the first communication data set and the second communication data set.
[0050] Exemplarily, in the case where the first communication data set includes the first geographic information subset and the first network behavior subset, and the second communication data set includes the second geographic information subset and the second network behavior subset, the electronic device obtains the second dimension value corresponding to each dimension in the first geographic information subset from the second geographic information subset, compares the first dimension value with the second dimension value, obtains the comparison result corresponding to the dimension, and determines the geographic information comparison result between the first geographic information subset and the second geographic information subset based on the comparison results corresponding to each dimension; compares the first network behavior subset and the second network behavior subset to obtain the network behavior comparison result; if at least one of the geographic information comparison result and the network behavior comparison result is different, the predicted network switching result is determined according to the first communication data set and the second communication data set. Wherein, the dimension refers to the name corresponding to the value in the communication data set, for example, frequency band, bandwidth, channel and modulation mode.
[0051] In an exemplary embodiment, when the first communication data set includes only the first geographic information subset, or when the second communication data set includes only the second geographic information subset, the first geographic information subset and the second geographic information subset are compared; when the first geographic information subset and the second geographic information subset are different, the first communication data set and the second communication data set are input into the target prediction model to obtain a predicted network switching result.
[0052] Specifically, when the first communication data set only includes the first geographic information subset, or the second communication data set only includes the second geographic information subset, the electronic device obtains the second dimension value corresponding to each dimension in the first geographic information subset from the second geographic information subset, compares the first dimension value with the second dimension value, obtains the comparison result corresponding to the dimension, and determines the geographic information comparison result between the first geographic information subset and the second geographic information subset based on the comparison results corresponding to each dimension; if the geographic information comparison result is different, the predicted network switching result is determined according to the first communication data set and the second communication data set. That is, by comparing the first geographic information subset and the second geographic information subset, it is determined whether the geographic information of the electronic device has changed. If the geographic information of the electronic device has changed, it is determined that the network state of the electronic device in the future time period may be in a network abnormal state, and the first communication data set and the second communication data set are input into the target prediction model to obtain the predicted network switching result, providing basic data for subsequent network switching.
[0053] In this embodiment, when the first communication data set includes a first geographic information subset and a first network behavior subset, and the second communication data set includes a second geographic information subset and a second network behavior subset, by comparing the first geographic information subset and the second geographic information subset, and the first network behavior subset and the second network behavior subset, it is determined whether the geographic information or network behavior of the electronic device has changed; if at least one of the geographic information or the network behavior of the electronic device has changed, it is determined that the network state of the electronic device in the future time period may be in a network abnormal state, and a predicted network switching result is determined based on the first communication data set and the second communication data set, to provide basic data for subsequent network switching.
[0054] In an exemplary embodiment, obtaining a predicted network switching result based on a first communication data set and a second communication data set includes: inputting the first communication data set and the second communication data set into a target prediction model to obtain a predicted network switching result.
[0055] The target prediction model refers to a neural network model that has been trained to predict the network status and network switching behavior in the future time period. The target prediction model corresponds to the electronic device one by one, that is, different electronic devices have different target prediction models. The target prediction model is trained based on the monitoring communication data set collected by the electronic device. The target prediction model can be a long-term memory model, for example, a long-term memory model such as Figure 4As shown, it includes an input layer, a hidden layer, and an output layer. The output of the target prediction model includes but is not limited to a prediction time period and a prediction network switching result. The prediction time period refers to a future time period predicted by the target prediction model. The prediction network switching result refers to a network switching prediction result of a future time period output by the target prediction model based on the first communication data set and the second communication data set. The target prediction model can be a long-term memory model, for example, a long-term memory model such as Figure 4 As shown, it includes an input layer, a hidden layer and an output layer. The output of the target prediction model includes but is not limited to a prediction time period and a prediction network switching result. The prediction time period refers to the future time period predicted by the target prediction model.
[0056] Exemplarily, the electronic device inputs the first communication data set and the second communication data set into the target prediction model, the target prediction model outputs the predicted network switching result, and the electronic device obtains the predicted network switching result.
[0057] The training process of the target prediction model, as shown in Figure 5, includes:
[0058] Step 502: Acquire a monitoring status data set of the electronic device at the monitoring time.
[0059] Among them, the monitoring moment refers to the moment when the communication quality and network physical layer status of the electronic device are monitored. The monitoring status data set refers to a set of data that characterizes the communication quality and network physical layer status of the electronic device, and the monitoring status data set includes but is not limited to communication quality data and network physical layer status information. Communication quality data refers to QOE (Quality of Experience) data. Network physical layer status information refers to indicators of various signal quality and transmission conditions measured and reported by the physical layer in network communication. These indicators reflect the state of the signal on the physical layer (i.e., radio waves or wired signal transmission layer) and are mainly used to evaluate and optimize the quality and performance of network connections. For example, the monitoring data set shown in Figure 3 includes communication quality data and network physical layer status information. The communication quality data includes but is not limited to PDCP (Packet Data Convergence Protocol) packet loss rate, retransmission rate and Ping latency data (Ping Latency Data), and the network physical layer status information includes but is not limited to RSRP, RSSI and SNR.
[0060] Exemplarily, before the electronic device trains the initial prediction model, it obtains a monitoring time and a monitoring status data set of the electronic device at the monitoring time based on the monitoring time interval.
[0061] In an exemplary embodiment, before the electronic device trains the initial prediction model, when the display screen of the electronic device is in a light-screen state, a monitoring time and a monitoring state data set corresponding to the electronic device at the monitoring time are obtained.
[0062] Step 504: Determine the network status corresponding to the monitoring time based on the monitoring status data set.
[0063] The network status refers to the status of the network to which the electronic device is connected at the monitoring time, and the network status can be a normal network status or an abnormal network status.
[0064] Exemplarily, for each monitoring status data in the monitoring status data set, the monitoring status data is compared with the monitoring status threshold to obtain a monitoring comparison result corresponding to the monitoring status data; based on the monitoring comparison results corresponding to each monitoring status data, the network status corresponding to the monitoring moment is determined.
[0065] In an exemplary embodiment, the electronic device compares the communication quality data in the monitoring status data set with the corresponding communication quality threshold to obtain a communication quality comparison result; compares the network physical layer status information in the monitoring status data set with the corresponding network physical layer threshold to obtain a network physical layer comparison result; and determines the network status corresponding to the monitoring moment based on the communication quality comparison result and the network physical layer comparison result.
[0066] In an exemplary embodiment, when the monitoring status data set includes communication quality data and network physical layer status information, the communication quality data includes PDCP packet loss rate, retransmission rate and Ping delay data, and the network physical layer status information includes RSRP, RSSI and SNR, the PDCP packet loss rate is compared with the packet loss rate threshold to obtain a packet loss rate comparison result; the retransmission rate is compared with the retransmission threshold to obtain a retransmission rate comparison result; the Ping delay data is compared with the delay threshold to obtain a delay comparison result; RSRP is compared with the reference signal receiving power threshold to obtain a receiving power comparison result; RSSI is compared with the received signal strength threshold to obtain a received signal strength comparison result; SNR is compared with the signal-to-noise ratio threshold to obtain a signal-to-noise ratio comparison result; based on the packet loss rate comparison result, the retransmission rate comparison result, the delay comparison result, the receiving power comparison result, the received signal strength comparison result and the signal-to-noise ratio comparison result, the network status corresponding to the monitoring time is determined.
[0067] In an exemplary embodiment, based on the packet loss rate comparison result, the retransmission rate comparison result, the delay comparison result, the received power comparison result, the received signal strength comparison result and the signal-to-noise ratio comparison result, the network state corresponding to the monitoring time is determined, including: if at least one of the packet loss rate comparison result, the retransmission rate comparison result and the delay comparison result is greater than, or at least one of the received power comparison result, the received signal strength comparison result and the signal-to-noise ratio comparison result is less than, then determining that the network state corresponding to the monitoring time is an abnormal network state; otherwise, it is a normal network state.
[0068] Step 506: When the network state corresponding to the monitoring time is an abnormal network state, a monitoring communication data set corresponding to the monitoring time is obtained.
[0069] The monitoring communication data set refers to the communication data set corresponding to the monitoring time.
[0070] Exemplarily, when the network state corresponding to the monitoring time is an abnormal network state, the electronic device obtains a monitoring communication data set corresponding to the monitoring time.
[0071] Step 508: Based on the monitored communication data set, the initial prediction model is trained to obtain a target prediction model corresponding to the electronic device.
[0072] The initial prediction model refers to an untrained neural network model that predicts the network status and network switching behavior in the future time period.
[0073] Exemplarily, the electronic device trains the initial prediction model based on the monitoring communication data set until the training stop condition is reached to obtain the target prediction model corresponding to the electronic device. The training stop condition refers to the condition for stopping training. The training stop condition can be restricted according to actual needs and is not restricted here. For example, the training stop condition is that the error loss is less than the error loss threshold.
[0074] In this embodiment, a monitoring status data set of the electronic device at the monitoring time is obtained, and the network status corresponding to the monitoring time is determined based on the monitoring status data set. When the network status corresponding to the monitoring time is a network abnormal state, a monitoring communication data set corresponding to the monitoring time is obtained, that is, the monitoring communication data set reflects the location information and network switching behavior of the electronic device when the network status of the electronic device is the network abnormal state. The initial prediction model is trained using the monitoring communication data set, that is, the initial prediction model is trained using the location information and network switching behavior of the electronic device when the network status of the electronic device is the network abnormal state, and a target prediction model corresponding to the electronic device is obtained. The target prediction model learns the location information and network switching behavior of the corresponding electronic device under the network abnormal state, thereby improving the accuracy of the target prediction model.
[0075] In an exemplary embodiment, based on monitoring the communication data set, the initial prediction model is trained to obtain a target prediction model corresponding to the electronic device, including:
[0076] Based on the monitoring communication data set and the monitoring time corresponding to the monitoring communication data set, a communication feature vector corresponding to the monitoring time is generated; when the number of communication feature vectors reaches a target number, an initial prediction model is trained based on the target number of communication feature vectors to obtain a target prediction model corresponding to the electronic device.
[0077] Among them, the communication feature vector refers to a vector that characterizes the monitoring communication data set and the monitoring time corresponding to the monitoring communication data set. For example, as shown in Figure 6, the monitoring communication data set includes a monitoring geographic information subset and a monitoring network behavior subset, and the monitoring geographic information subset, the monitoring network behavior subset and the monitoring time are converted into a communication feature vector. The target number refers to the minimum number of communication feature vectors for training the initial prediction model. The target number can be set according to the actual situation and is not limited here. For example, the target number is 100 or 500.
[0078] Exemplarily, for each monitored communication data set, the electronic device converts the monitored communication data set and the monitoring time corresponding to the monitored communication data set into a communication feature vector; when the number of communication feature vectors reaches the target number, the initial prediction model is trained based on the target number of communication feature vectors to obtain the target prediction model corresponding to the electronic device.
[0079] In this embodiment, by monitoring the communication data set and the monitoring time corresponding to the monitoring communication data set, a communication feature vector corresponding to the monitoring time is generated, and the communication feature vector is used as a training sample for training the initial prediction model. When the number of communication feature vectors reaches the target number, the initial prediction model is trained using the communication feature vector, thereby avoiding the problem of low accuracy of the target prediction model due to insufficient number of training samples, thereby improving the accuracy of the target prediction model.
[0080] In an exemplary embodiment, training an initial prediction model based on the communication feature vectors of the target quantity to obtain a target prediction model corresponding to the electronic device includes:
[0081] The initial prediction model is trained based on the communication feature vectors of the target number to obtain an intermediate prediction model; the intermediate prediction model is tested to obtain a test result; the number of accurate test results is counted to obtain a first statistical number; the number of test results is counted to obtain a second statistical number; when the ratio between the first statistical number and the second statistical number is greater than a ratio threshold, the intermediate prediction model is determined as the target prediction model.
[0082] Among them, the intermediate prediction model refers to a neural network model that has been trained but not tested. It can be understood that the initial prediction model is trained with a target number of communication feature vectors to obtain an intermediate prediction model. The intermediate prediction model is tested and meets the test standard to obtain a target prediction model. The test result refers to the result of testing the intermediate prediction model. The test result can be accurate or inaccurate. Accurate means that the detection network switching result output by the intermediate prediction model is correct, that is, the detection network switching result output by the intermediate prediction model is the same as the actual network switching result. Inaccurate means that the detection network switching result output by the intermediate prediction model is wrong, that is, the detection network switching result output by the intermediate prediction model is different from the actual network switching result. The first statistical quantity refers to the number of test results that are accurate among multiple test results. The second statistical quantity refers to the total number of multiple test results.
[0083] Exemplarily, the electronic device uses a target number of communication feature vectors to train an initial prediction model to obtain an intermediate prediction model, and then performs multiple tests on the intermediate prediction model to obtain test results for each test; the test results are counted as accurate numbers to obtain a first statistical number, the number of test results is counted to obtain a second statistical number, the first statistical number is divided by the second statistical number to obtain a ratio between the first statistical number and the second statistical number, the ratio between the first statistical number and the second statistical number is compared with a ratio threshold, and if the ratio between the first statistical number and the second statistical number is greater than the ratio threshold, the intermediate prediction model is determined as the target prediction model.
[0084] In an exemplary embodiment, if the ratio between the first statistical quantity and the second statistical quantity is less than or equal to the ratio threshold, the steps of training the initial prediction model based on the target number of communication feature vectors to obtain an intermediate prediction model, testing the intermediate prediction model to obtain the test result, counting the number of accurate test results to obtain the first statistical quantity; counting the number of test results to obtain the second statistical data, until the ratio between the first statistical quantity and the second statistical quantity is greater than the ratio threshold, and the intermediate prediction model is determined as the target prediction model.
[0085] In this embodiment, after obtaining the intermediate prediction model, the intermediate prediction model is tested multiple times to obtain the test results corresponding to each test, the number of accurate test results is counted to obtain a first statistical number, the number of test results is counted to obtain a second statistical number, and when the ratio between the first statistical number and the second statistical number is greater than a ratio threshold, the intermediate prediction model is determined as the target prediction model, that is, when the accuracy of the prediction of the intermediate prediction model reaches the ratio threshold, the intermediate prediction model is determined as the target prediction model, thereby improving the accuracy of the target prediction model.
[0086] In an exemplary embodiment, as shown in FIG7 , the intermediate prediction model is tested to obtain a test result, including:
[0087] Step 702: Acquire a first detection communication data set corresponding to a first detection time and a second detection communication data set corresponding to a second detection time; the first detection time is earlier than the second detection time.
[0088] Among them, the first detection moment refers to the moment of obtaining the first detection communication data set, the second detection moment refers to the moment of obtaining the second detection communication data set, and the first detection moment is before the second detection moment, that is, the first detection moment is earlier than the second detection moment. The first detection communication data set refers to the communication data set collected at the first detection moment, and the first detection communication data set includes but is not limited to the first detection geographic information subset and the first detection network behavior subset. The second detection communication data set refers to the communication data set collected at the second moment, and the second detection communication data set includes but is not limited to the second detection geographic information subset and the second detection network behavior subset.
[0089] Exemplarily, after obtaining the intermediate prediction model, the electronic device obtains a first detection communication data set at a first detection time and obtains a second detection communication data set at a second detection time based on the detection time interval.
[0090] Step 704, when the second detection communication data set is different from the first detection communication data set, the first detection communication data set and the second detection communication data set are input into the intermediate prediction model to obtain the detection time period and the detection network switching result corresponding to the detection time period.
[0091] Among them, the detection time period refers to the predicted future time period output by the intermediate prediction model. It can be understood that the intermediate prediction model predicts the future time period and the detection network switching result corresponding to the future time period based on the first detection communication data set and the second detection communication data set. The future time period predicted by the intermediate prediction model is the detection time period. The detection time period is a time period after the second detection moment. For example, if the second detection moment is T2, then the detection time period can be T2 to T2+T, and T is the length of the detection time period. The detection network switching result refers to the network switching prediction result for the future time period output by the intermediate prediction model based on the first detection communication data set and the second detection communication data set. The detection network switching result includes but is not limited to at least one of the detection judgment result and the detection switching network.
[0092] Exemplarily, the electronic device compares the second detection communication data set with the first detection communication data set. If the second detection communication data set is different from the first detection communication data set, the first detection communication data set and the second detection communication data set are input into the intermediate prediction model. The intermediate prediction model outputs the detection time period and the detection network switching result corresponding to the detection time period. The electronic device obtains the detection time period and the detection network switching result corresponding to the detection time period.
[0093] Step 706: Obtain the actual network switching result corresponding to the detection time period.
[0094] The actual network switching result refers to the actual network switching result of the electronic device during the detection time period, and the actual network switching result includes but is not limited to at least one of the actual judgment result and the actual switching network.
[0095] Exemplarily, the electronic device obtains an actual network switching result corresponding to the electronic device in the detection time period.
[0096] Step 708: Compare the detected network switching result with the actual network switching result to obtain a test result.
[0097] Exemplarily, the electronic device compares the detected network switching result with the actual network switching result. If the detected network switching result is the same as the actual network switching result, the test result is determined to be accurate; if the detected network switching result is different from the actual network switching result, the test result is determined to be inaccurate.
[0098] In an exemplary embodiment, the actual judgment result in the actual network switching result and the detection judgment result in the detection network switching result are compared. If the actual judgment result and the detection judgment result are the same and both indicate that the network is normal, the inspection result is determined to be accurate; if the actual judgment result and the detection judgment result are the same and both indicate that the network is abnormal, the actual switching network in the actual network switching result and the detection switching network in the detection network switching result are compared. If the actual switching network and the detection switching network are the same, the inspection result is determined to be accurate; if the actual switching network and the detection switching network are different, the inspection result is determined to be inaccurate; if the actual judgment result and the detection judgment result are different, the inspection result is determined to be inaccurate.
[0099] In this embodiment, the verification result is obtained by comparing the detected network switching result with the actual network switching result, that is, the detected network switching result output by the intermediate prediction model is verified by the actual network switching result, thereby achieving the purpose of verifying the trained intermediate prediction model.
[0100] In an exemplary embodiment, after performing network switching on the electronic device based on the predicted network switching result, the method further includes:
[0101] Obtain an update status data set of the electronic device at the update time; determine the network status corresponding to the update time based on the update status data set; when the network status corresponding to the update time is an abnormal network state, obtain an update communication data set corresponding to the update time; train a target prediction model based on the update communication data set to obtain a new target prediction model.
[0102] Among them, the update time refers to the time when the communication quality and network physical layer status of the electronic device are monitored. The update time refers to the time after the target prediction model is obtained, which can be understood as the time when the communication quality and network physical layer status of the electronic device are monitored when the target prediction model needs to be updated. The update status data set refers to the set of data that characterizes the communication quality and network physical layer status of the electronic device at the update time, and the update status data set includes but is not limited to communication quality data and network physical layer status information.
[0103] Exemplarily, when the update condition is met, based on the update time interval, the update status data set of the electronic device at the update time is obtained, and for each update status data in the update status data set, the update status data is compared with the update status threshold to obtain the update comparison result corresponding to the update status data; based on the update comparison results corresponding to each update status data, the network state corresponding to the update time is determined; when the network state corresponding to the update time is a network abnormal state, the update communication data set corresponding to the update time is obtained; for each update communication data set, the update communication data set and the update time corresponding to the update communication data set are converted into a communication feature vector; when the number of communication feature vectors reaches the target number, the target prediction model is trained based on the target number of communication feature vectors to obtain a new target prediction model. That is, in the iterative update process shown in Figure 8, the target prediction model is trained again to obtain a new target prediction model. The update condition refers to the condition for updating the target prediction model. The update condition can be that the use time of the target prediction model is equal to the time threshold, or the use frequency of the target prediction model is equal to the frequency threshold, or the prediction accuracy of the target prediction model is equal to or lower than the accuracy threshold, etc. The update condition can be set according to actual needs and is not limited here.
[0104] In an exemplary embodiment, a target prediction model is trained based on an updated communication data set to obtain a new target prediction model, including: generating a communication feature vector corresponding to the update time based on the updated communication data set and the update time corresponding to the updated communication data set; when the number of communication feature vectors reaches a target number, training the target prediction model based on the target number of communication feature vectors to obtain an intermediate prediction model; testing the intermediate prediction model to obtain a test result; counting the number of accurate test results to obtain a first statistical number; counting the number of test results to obtain a second statistical number; and when the ratio between the first statistical number and the second statistical number is greater than a ratio threshold, determining the intermediate prediction model as a new target prediction model.
[0105] In this embodiment, the target prediction model is iteratively updated, thereby improving the accuracy of the new target prediction model.
[0106] In an exemplary embodiment, an AI (Artificial Intelligence) personal communication assistant is installed in the OS (Operating System) of an electronic device. The AI personal communication assistant corresponds one-to-one to the electronic device and is used to intelligently switch the network of the electronic device, which mainly includes a training process, a usage process and an iterative update process.
[0107] Training process: Before the AI personal communication assistant trains the initial prediction model, it obtains a set of monitoring status data at the monitoring time and the electronic device at the monitoring time based on the monitoring time interval. The monitoring status data set includes communication quality data and network physical layer status information. The communication quality data includes PDCP packet loss rate, retransmission rate and Ping delay data. The network physical layer status information includes RSRP, RSSI and SNR. The PDCP packet loss rate is compared with the packet loss rate threshold to obtain the packet loss rate comparison result; the retransmission rate is compared with the retransmission threshold to obtain the retransmission rate comparison result; the Ping delay data is compared with the delay threshold to obtain the delay comparison result; the RSRP is compared with the reference signal received power threshold to obtain the received power comparison result; the RSSI is compared with the received signal strength threshold to obtain the received signal strength comparison result; the SNR is compared with the signal-to-noise ratio threshold to obtain the signal-to-noise ratio comparison result. If at least one of the packet loss rate comparison result, the retransmission rate comparison result and the delay comparison result is greater than, or at least one of the received power comparison result, the received signal strength comparison result and the signal-to-noise ratio comparison result is less than, then it is determined that the network state corresponding to the monitoring time is an abnormal network state; otherwise, it is a normal network state.
[0108] When the network state corresponding to the monitoring moment is an abnormal network state, the AI personal communication assistant obtains a monitoring communication data set corresponding to the monitoring moment; for each monitoring communication data set, the monitoring communication data set and the monitoring moment corresponding to the monitoring communication data set are converted into a communication feature vector; when the number of communication feature vectors reaches a target number, the initial prediction model is trained using the target number of communication feature vectors to obtain an intermediate prediction model, and then the intermediate prediction model is tested multiple times to obtain a test result of each test; the test results are counted as an accurate number to obtain a first statistical number, the number of test results is counted to obtain a second statistical number, the first statistical number is divided by the second statistical number to obtain a ratio between the first statistical number and the second statistical number, the ratio between the first statistical number and the second statistical number is compared with a ratio threshold, and if the ratio between the first statistical number and the second statistical number is greater than the ratio threshold, the intermediate prediction model is determined as the target prediction model.
[0109] Usage process: When the display screen of the electronic device is in the bright screen state, the AI personal communication assistant obtains the first communication data set at the first moment and then obtains the second communication data set at the second moment based on the target time interval. When the first communication data set includes the first geographic information subset and the first network behavior subset, and the second communication data set includes the second geographic information subset and the second network behavior subset, the electronic device obtains the second dimension value corresponding to each dimension in the first geographic information subset from the second geographic information subset for the first dimension value corresponding to the dimension, compares the first dimension value with the second dimension value, obtains the comparison result corresponding to the dimension, and determines the geographic information comparison result between the first geographic information subset and the second geographic information subset based on the comparison results corresponding to each dimension; compares the first network behavior subset and the second network behavior subset to obtain the network behavior comparison result; if at least one of the geographic information comparison result and the network behavior comparison result is different, the first communication data set and the second communication data set are input into the target prediction model to obtain the predicted network switching result. Based on the predicted network switching result in the predicted network switching result, the AI personal communication assistant controls the electronic device to connect to the predicted network switching result.
[0110] Iterative update process: When the update conditions are met, the AI personal communication assistant obtains the update status data set of the electronic device at the update time based on the update time interval, and for each update status data in the update status data set, compares the update status data with the update status threshold to obtain the update comparison result corresponding to the update status data; based on the update comparison results corresponding to each update status data, determines the network state corresponding to the update time; when the network state corresponding to the update time is an abnormal network state, obtains the update communication data set corresponding to the update time; for each update communication data set, converts the update communication data set and the update time corresponding to the update communication data set into a communication feature vector; when the number of communication feature vectors reaches the target number, trains the target prediction model based on the target number of communication feature vectors to obtain a new target prediction model.
[0111] In the above-mentioned network switching method, by inputting the first communication data set and the second communication data set into the target prediction model when the second communication data set is different from the first communication data set, a predicted network switching result is obtained, that is, when at least one of the geographical information or network behavior of the electronic device changes, it is judged that the network state of the electronic device in the future time period may be in a network abnormal state, then the first communication data set and the second communication data set are input into the target prediction model, and the target prediction model outputs the predicted network switching result according to the first communication data set and the second communication data set. The electronic device controls the electronic device to perform network switching based on the predicted network switching result, that is, when the target prediction model predicts that the network state of the electronic device in the future time period is a network abnormal state, the network switching of the electronic device is performed before the electronic device is in the network abnormal state, thereby avoiding the network state of the electronic device in the network abnormal state and improving the smoothness of the network communication of the electronic device.
[0112] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0113] Based on the same inventive concept, the embodiment of the present application also provides a network switching device for implementing the network switching method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more network switching device embodiments provided below can refer to the limitations on the network switching method above, and will not be repeated here.
[0114] In an exemplary embodiment, as shown in FIG9 , a network switching device is provided, including: an acquisition module 902 , a prediction module 904 and a switching module 906 , wherein:
[0115] An acquisition module 902 is configured to acquire a first communication data set corresponding to a first moment and a second communication data set corresponding to a second moment; the first moment is earlier than the second moment;
[0116] A prediction module 904, configured to obtain a predicted network switching result based on the first communication data set and the second communication data set when the second communication data set is different from the first communication data set;
[0117] The switching module 906 is used to switch the network of the electronic device based on the predicted network switching result.
[0118] In an exemplary embodiment, the switching module 906 is further configured to: when the prediction judgment result of the predicted network switching result is that the network is abnormal, control the electronic device to connect to the predicted switching network of the predicted network switching result.
[0119] In an exemplary embodiment, the prediction module 904 is also used to: compare the first geographic information subset and the second geographic information subset, and / or compare the first network behavior subset and the second network behavior subset; when the first geographic information subset and the second geographic information subset, and / or the first network behavior subset and the second network behavior subset are not the same, obtain a predicted network switching result based on the first communication data set and the second communication data set.
[0120] In an exemplary embodiment, the prediction module 904 is also used to: input the first communication data set and the second communication data set into the target prediction model to obtain a predicted network switching result; the training process of the target prediction model includes: obtaining a monitoring status data set of the electronic device at the monitoring time; based on the monitoring status data set, determining the network status corresponding to the monitoring time; when the network status corresponding to the monitoring time is an abnormal network state, obtaining the monitoring communication data set corresponding to the monitoring time; based on the monitoring communication data set, training the initial prediction model to obtain a target prediction model corresponding to the electronic device.
[0121] In an exemplary embodiment, the prediction module 904 is also used to: generate a communication feature vector corresponding to the monitoring time based on a monitored communication data set and the monitoring time corresponding to the monitored communication data set; when the number of communication feature vectors reaches a target number, train an initial prediction model based on the target number of communication feature vectors to obtain a target prediction model corresponding to the electronic device.
[0122] In an exemplary embodiment, the prediction module 904 is also used to: train an initial prediction model based on a target number of communication feature vectors to obtain an intermediate prediction model; test the intermediate prediction model to obtain a test result; count the number of accurate test results to obtain a first statistical number; count the number of test results to obtain a second statistical number; and determine the intermediate prediction model as the target prediction model when the ratio between the first statistical number and the second statistical number is greater than a ratio threshold.
[0123] In an exemplary embodiment, the prediction module 904 is also used to: obtain a first detection communication data set corresponding to a first detection moment and a second detection communication data set corresponding to a second detection moment; the first detection moment is earlier than the second detection moment; when the second detection communication data set is different from the first detection communication data set, input the first detection communication data set and the second detection communication data set into the intermediate prediction model to obtain a detection time period and a detection network switching result corresponding to the detection time period; obtain an actual network switching result corresponding to the detection time period; compare the detection network switching result with the actual network switching result to obtain a test result.
[0124] In an exemplary embodiment, the prediction module 904 is also used to: obtain an update status data set of the electronic device at the update time; determine the network status corresponding to the update time based on the update status data set; when the network status corresponding to the update time is an abnormal network state, obtain the update communication data set corresponding to the update time; based on the update communication data set, train the target prediction model to obtain a new target prediction model.
[0125] Each module in the above network switching device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0126] In an exemplary embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG10. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a network switching method is implemented. The display unit of the electronic device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.
[0127] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0129] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0130] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0131] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0132] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0133] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0134] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A network switching method, characterized in that: The method is used for an electronic device, and the method comprises: Acquire a first communication data set corresponding to a first moment and a second communication data set corresponding to a second moment; the first moment is earlier than the second moment; When the second communication data set is different from the first communication data set, obtaining a predicted network switching result based on the first communication data set and the second communication data set; Based on the predicted network switching result, the network of the electronic device is switched.
2. The method according to claim 1, characterized in that The performing network switching on the electronic device based on the predicted network switching result includes: When the prediction judgment result of the predicted network switching result is that the network is abnormal, the electronic device is controlled to connect to the predicted switching network of the predicted network switching result.
3. The method according to claim 1, characterized in that In a case where the first communication data set includes a first geographic information subset and a first network behavior subset, and the second communication data set includes a second geographic information subset and a second network behavior subset, when the second communication data set is different from the first communication data set, obtaining a predicted network switching result based on the first communication data set and the second communication data set, comprises: Comparing the first geographic information subset with the second geographic information subset, and / or comparing the first network behavior subset with the second network behavior subset; When the first geographic information subset and the second geographic information subset, and / or the first network behavior subset and the second network behavior subset are different, a predicted network switching result is obtained based on the first communication data set and the second communication data set.
4. The method according to claim 1, characterized in that: The obtaining a predicted network switching result based on the first communication data set and the second communication data set includes: Inputting the first communication data set and the second communication data set into a target prediction model to obtain a predicted network switching result; The training process of the target prediction model includes: Acquire a monitoring status data set of the electronic device at the monitoring time; Based on the monitoring status data set, determining the network status corresponding to the monitoring time; When the network state corresponding to the monitoring time is a network abnormal state, obtaining a monitoring communication data set corresponding to the monitoring time; Based on the monitoring communication data set, an initial prediction model is trained to obtain a target prediction model corresponding to the electronic device.
5. The method according to claim 4, characterized in that The training of the initial prediction model based on the monitoring communication data set to obtain the target prediction model corresponding to the electronic device includes: generating a communication feature vector corresponding to the monitoring time based on the monitoring communication data set and the monitoring time corresponding to the monitoring communication data set; When the number of the communication feature vectors reaches the target number, the initial prediction model is trained based on the target number of communication feature vectors to obtain a target prediction model corresponding to the electronic device.
6. The method according to claim 5, characterized in that The training of the initial prediction model based on the communication feature vector of the target quantity to obtain the target prediction model corresponding to the electronic device includes: Training the initial prediction model based on the target number of communication feature vectors to obtain an intermediate prediction model; Testing the intermediate prediction model to obtain a test result; Counting the number of accurate test results to obtain a first statistical number; Counting the number of the inspection results to obtain second statistical data; When the ratio between the first statistical quantity and the second statistical quantity is greater than a ratio threshold, the intermediate prediction model is determined as a target prediction model.
7. The method according to claim 6, characterized in that The testing of the intermediate prediction model to obtain a test result includes: Acquire a first detection communication data set corresponding to a first detection time and a second detection communication data set corresponding to a second detection time; the first detection time is earlier than the second detection time; In the case where the second detection communication data set is different from the first detection communication data set, inputting the first detection communication data set and the second detection communication data set into the intermediate prediction model to obtain a detection time period and a detection network switching result corresponding to the detection time period; Obtaining an actual network switching result corresponding to the detection time period; The detected network switching result is compared with the actual network switching result to obtain a test result.
8. The method according to claim 1, characterized in that After switching the network of the electronic device based on the predicted network switching result, the method further includes: Acquire an update status data set of the electronic device at the update time; Based on the update status data set, determining the network status corresponding to the update time; When the network state corresponding to the update time is a network abnormal state, obtaining an update communication data set corresponding to the update time; Based on the updated communication data set, the target prediction model is trained to obtain a new target prediction model.
9. A network switching device, characterized in that: The device is located in an electronic device, and the device includes: An acquisition module, configured to acquire a first communication data set corresponding to a first moment and a second communication data set corresponding to a second moment; the first moment is earlier than the second moment; A prediction module, configured to obtain a predicted network switching result based on the first communication data set and the second communication data set when the second communication data set is different from the first communication data set; A switching module is used to switch the network of the electronic device based on the predicted network switching result.
10. The device according to claim 9, characterized in that The prediction module is also used to: Comparing the first geographic information subset with the second geographic information subset, and / or comparing the first network behavior subset with the second network behavior subset; When the first geographic information subset and the second geographic information subset, and / or the first network behavior subset and the second network behavior subset are different, a predicted network switching result is obtained based on the first communication data set and the second communication data set.
11. The device according to claim 9, characterized in that The prediction module is also used to: Inputting the first communication data set and the second communication data set into a target prediction model to obtain a predicted network switching result; The training process of the target prediction model includes: Acquire a monitoring status data set of the electronic device at the monitoring time; Based on the monitoring status data set, determining the network status corresponding to the monitoring time; When the network state corresponding to the monitoring time is a network abnormal state, obtaining a monitoring communication data set corresponding to the monitoring time; Based on the monitoring communication data set, an initial prediction model is trained to obtain a target prediction model corresponding to the electronic device.
12. The device according to claim 11, characterized in that The prediction module is also used to: Based on the monitoring communication data set and the monitoring time corresponding to the monitoring communication data set, generating a communication feature vector corresponding to the monitoring time; When the number of the communication feature vectors reaches the target number, the initial prediction model is trained based on the target number of communication feature vectors to obtain a target prediction model corresponding to the electronic device.
13. The device according to claim 12, characterized in that The prediction module is also used to: Training the initial prediction model based on the target number of communication feature vectors to obtain an intermediate prediction model; Testing the intermediate prediction model to obtain a test result; Counting the number of accurate test results to obtain a first statistical number; Counting the number of the inspection results to obtain second statistical data; When the ratio between the first statistical quantity and the second statistical quantity is greater than a ratio threshold, the intermediate prediction model is determined as a target prediction model.
14. The device according to claim 13, characterized in that The prediction module is also used to: Acquire a first detection communication data set corresponding to a first detection time and a second detection communication data set corresponding to a second detection time; the first detection time is earlier than the second detection time; In the case where the second detection communication data set is different from the first detection communication data set, inputting the first detection communication data set and the second detection communication data set into the intermediate prediction model to obtain a detection time period and a detection network switching result corresponding to the detection time period; Obtaining an actual network switching result corresponding to the detection time period; The detected network switching result is compared with the actual network switching result to obtain a test result.
15. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
