CN112492618A - Network sharing method and device, electronic equipment and storage medium - Google Patents

Network sharing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112492618A
CN112492618A CN201910858411.7A CN201910858411A CN112492618A CN 112492618 A CN112492618 A CN 112492618A CN 201910858411 A CN201910858411 A CN 201910858411A CN 112492618 A CN112492618 A CN 112492618A
Authority
CN
China
Prior art keywords
network
sharing
access
accessed
access network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910858411.7A
Other languages
Chinese (zh)
Inventor
严宝山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201910858411.7A priority Critical patent/CN112492618A/en
Publication of CN112492618A publication Critical patent/CN112492618A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Abstract

The invention relates to the field of communication, and discloses a network sharing method and device, electronic equipment and a storage medium. The invention discloses a network sharing method, which is applied to electronic equipment, wherein the electronic equipment is used for charging terminal equipment, and the method comprises the following steps: detecting an access network to obtain the network type of the access network; wherein, different network types correspond to different sharing priorities; carrying out network sharing on an access network; wherein the shared access network is determined according to the sharing priority of the network type. The automatic detection and sharing of the network avoid the need of manual setting, and the access network for network sharing is selected according to the sharing priority, so that the stability of the sharing network is ensured, a stable sharing network is provided while the terminal equipment is charged, and the conversion and sharing of different types of networks are realized.

Description

Network sharing method and device, electronic equipment and storage medium
Technical Field
Embodiments of the present invention relate to the field of communications, and in particular, to a network sharing method and apparatus, an electronic device, and a storage medium.
Background
With the development of communication technology, the way of accessing the terminal to the network is more and more abundant, and common networking ways such as mobile communication network, wifi, broadband and the like have been popularized to thousands of households. On the other hand, with the development of terminal products, the terminal devices that need to access the network are also more and more abundant, such as portable multimedia like mobile phones, ufi, pads, etc. How to effectively link various access modes with various devices needing to be accessed to form a convenient, efficient and usable home or small enterprise local area network, meets the switching and control among various use scenes, and is a hot spot concerned by many consumers and families. At present, a common method is to use a hotspot function of a mobile phone or a wifi (mbb) product, manually set software by a user, and provide a shared network for the user, or use a router to share a broadband network, so as to share a mobile communication network to peripheral devices needing to be accessed.
Disclosure of Invention
An object of embodiments of the present invention is to provide a network sharing method and apparatus, an electronic device, and a storage medium, so that charging and network sharing of a terminal device can be simultaneously achieved by using the same device, conversion and sharing of networks of different forms can be achieved, hardware configuration is saved, and more functions are achieved with a smaller device size.
In order to solve the above technical problem, an embodiment of the present invention provides a network sharing method, which is applied to an electronic device, where the electronic device is used to charge a terminal device, and the method includes: detecting an access network to obtain the network type of the access network; wherein, different network types correspond to different sharing priorities; carrying out network sharing on an access network; wherein the shared access network is determined according to the sharing priority of the network type.
The embodiment of the invention also provides a network sharing device, which is applied to charging the terminal equipment and comprises the following steps of; the detection module is used for detecting the accessed network to obtain the network type of the accessed network; wherein, different network types correspond to different sharing priorities; the control module is used for carrying out network sharing on the access network; wherein the shared access network is determined according to the sharing priority of the network type.
An embodiment of the present invention further provides an electronic device, which is applied to charging a terminal device, and includes: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the network sharing method.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program realizes the network sharing method when being executed by a processor.
Compared with the prior art, the method and the device have the main difference and the main effect that the network type of the access network is automatically detected while the terminal device is charged, the access network for network sharing is determined according to the sharing priority corresponding to different network types, and the access network is subjected to network sharing. The network is automatically detected and shared while the terminal equipment is charged, the requirement of manual setting is avoided, and different types of networks can be shared according to the situation in the process of selecting the shared access network according to the priority. Therefore, the network sharing function is realized while the terminal equipment is charged, and the conversion and sharing of different types of networks are realized during network sharing, so that the hardware configuration is saved.
In addition, after the network sharing is performed on the access network, the method further includes: and detecting the access network in real time, and re-determining the access network for network sharing when the access network is changed. Because the change of the access network and the sharing priority of different types of networks are considered, the stability and the network speed of the provided shared network can be ensured to the maximum extent by resetting the access network for network sharing according to the network change.
In addition, the network sharing of the access network includes: and when the access network for carrying out network sharing is a wired network, carrying out network sharing on the wired network through the accessed terminal equipment. When the network sharing of the wired network is carried out, the configuration of the terminal equipment is adjusted, and the accessed wired network is shared by means of the routing function of the accessed terminal equipment, so that a device for carrying out network sharing on the wired network does not need to be additionally arranged, and the hardware cost and the occupied volume are greatly saved.
In addition, the sharing priority of the wired network is higher than that of the wireless mobile network; or determining the sharing priority corresponding to various types of networks according to user setting. Because the wired network is more stable, the sharing priority of the wired network is higher, or the sharing priority can be set by the user in consideration of personal preferences, requirements and actual conditions of some users, thereby ensuring the quality of the shared network.
In addition, detecting the access network includes: determining a target network with priority detection according to the sharing priority corresponding to the network type; detecting whether a target network is accessed; if the target network is accessed, stopping detecting the access network; and if the target network is not accessed, determining the next target network according to the sharing priority corresponding to the network type, and detecting whether the target network is accessed. Because the target network is determined according to the sharing priority and the access detection is carried out on the target network, the detection is not continued after the target network is detected, the repeated work is avoided, and meanwhile, the access network for network sharing is the access network with the highest priority, namely the access network with the highest stability, so that the quality of the shared network is ensured.
In addition, the detecting whether the target network is accessed comprises the following steps: and performing information interaction with equipment in the Internet through the access network, judging to access the target network if the response of the equipment in the Internet is received, and judging not to access the target network if the response is not received. Through networking verification, when the access network is detected, whether the network belongs to normal access or not is accurately judged.
In addition, after the access network is detected and the network type of the access network is obtained, the method further includes: detecting whether the terminal equipment is accessed, detecting the data state of the terminal equipment when detecting that the terminal equipment is accessed, and judging whether to perform data backup on the terminal equipment according to the data state detection result; the data state comprises equipment information of the terminal equipment and data backup authority of the terminal equipment. After the access of the terminal equipment is detected, whether the data backup is carried out on the terminal equipment is determined according to the result of the data backup authority check, and the data backup is carried out only when the data in the terminal is allowed to be backed up, so that the information safety of a user is ensured, and the loss caused by the loss of the terminal data is avoided through the data backup.
In addition, the device information of the terminal device includes one of the following information or any combination thereof: the size of the memory data, the last backup time and the mark information generated according to the backup data after each backup is finished. The device information of the terminal device is checked before the data backup is carried out on the terminal, and the data backup is carried out on the terminal only when the backup mark information changes due to the data change of the terminal, so that the repeated backup of the terminal data is avoided.
Drawings
One or more embodiments are illustrated by the corresponding figures in the drawings, which are not meant to be limiting.
Fig. 1 is a flowchart of a network sharing method according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a sharing method in a network sharing method according to a first embodiment of the present invention;
FIG. 3 is a flow chart of a network sharing method according to a second embodiment of the present invention;
fig. 4 is a flowchart of a network sharing method according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device to which the network sharing method according to the third embodiment of the present invention is applied;
FIG. 6 is a diagram illustrating a network sharing device according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to a fifth embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
A first embodiment of the present invention relates to a network sharing method, which is applied to an electronic device, where the electronic device is used to charge a terminal device, and the terminal device may be a mobile phone, an ufi product, a tablet computer, or the like, which is not described herein again. In this embodiment, a charging apparatus applied to a mobile phone is taken as an example for explanation, where the method for performing network sharing is to automatically identify a network type of an access network, determine an access network for performing network sharing according to sharing priorities corresponding to different types of access networks, and perform network sharing on the access network.
The following describes implementation details of the network sharing method according to the present embodiment in detail, and the following is only provided for easy understanding and is not necessary for implementing the present embodiment.
A specific flowchart of a network sharing method according to this embodiment is shown in fig. 1, and specifically includes the following steps:
step 101, detecting an access network and determining a network type of the access network. In this embodiment, the network type is not limited at all, and may be a wired network or a wireless network, where the wireless network may be a wireless mobile network of a terminal device, or a network-enabled device such as an inserted wireless network card, which are not listed here.
Specifically, the charging device detects an accessed network, detects whether a network cable is inserted or not in the detection of whether the wired network is accessed or not, detects whether the wired network can be normally networked or not when the network cable is inserted, and judges that the wired network is accessed when the wired network can be normally networked; in the detection of whether the wireless detection network is accessed, whether a terminal device or a wireless network card and other network-connectable devices are inserted is detected, when the network-connectable devices are accessed, whether the wireless network of the network-connectable devices can be normally networked is detected, when the network can be normally networked, the wireless network is judged to be accessed, and the number and the type of the networks which are accessed to the charging device are determined through the detection of whether the wired network and the wireless network are accessed.
In one example, the method for checking the wired network is that the charging device firstly defines the size unit byte of a ping data packet, then sets the execution times of ping commands, and then pings any device in the local area network through the wired network to judge that the network connection of the wired network is normal when receiving a complete response. Then ping a remote IP, and when the remote IP can receive the complete response, judging that the accessed network can successfully access the internet, namely the accessed wired network can normally access the internet. And ping a domain name to detect whether the DNS server can work normally, and judging that the networking condition of the wired network is normal when all the detections receive complete responses, namely the wired network is accessed. In any response receiving process, if the complete response cannot be received, the wired network cannot be normally networked, namely the wired network is not accessed. The method for detecting whether the wireless network is accessed is similar to that for detecting whether the wired network is accessed, and is not described herein again. The charging device performs information interaction with equipment in the Internet through a corresponding network, and judges whether various networks are accessed or not according to the result of response received.
And 102, determining the access network for network sharing according to the sharing priority of each type of access network.
Specifically, after determining whether each type of network is accessed, the charging device determines the sharing priority corresponding to each type of network according to different network types, and takes the access network with the highest sharing priority as the sharing network for network sharing. Wherein, the sharing priority order of various types of networks is generated by personal setting of users, namely, the sharing priority of which network is set by the users to be higher.
And 103, performing network sharing on the access network determined to be shared.
Specifically, after determining the access network to be network-shared, the charging device may determine a mode of network sharing according to the type of the access network to be network-shared, and network-share the access network.
In one example, when sharing a wired network, the charging device automatically selects a LAN mode, starts the mobile phone as a device for sharing the wired network, adjusts configuration information of the mobile phone, uses the wired network as input, borrows a routing function of the mobile phone, and shares the wired network with other devices needing to be accessed through the mobile phone, and a specific network sharing schematic diagram is shown in fig. 2; when the wireless network is shared, taking the wireless mobile network taking the wireless network as a mobile phone as an example, the charging device automatically selects a WAN mode, directly calls a mobile hotspot function of the mobile phone, and shares mobile data of the mobile phone to other devices needing to be accessed.
Therefore, the embodiment provides a network sharing method, which realizes the conversion and sharing of different types of networks by automatically identifying the specific network type of the access network, determining the access network for network sharing according to different sharing priorities corresponding to the network types, and then performing the corresponding network sharing of the determined access network according to the specific network type, when performing the network sharing, calling the terminal device in different modes according to the sharing mode, performing the network sharing on the access network by using the terminal device as a network sharing device, without additionally installing a network sharing device, saving the hardware cost, and still charging the terminal device while performing the network sharing, thereby avoiding the shortage of electric quantity and stopping the network sharing caused by huge electric power consumption in the network sharing process of the terminal device, meanwhile, the phenomenon that the application of a plurality of devices causes overlarge hardware volume is avoided.
A second embodiment of the present invention relates to a network sharing method, which is applied to an electronic device, where the electronic device is used to charge a terminal device, and the terminal device may be a mobile phone, ufi product, tablet computer, or the like, which is not described herein again. In this embodiment, a charging apparatus applied to a mobile phone is described as an example, wherein the method for performing network sharing is to detect whether each type of network is accessed according to a sharing priority of each type of access network, determine an access network for performing network sharing and perform network sharing, then detect whether the access network is changed in real time, and update an access network for performing network sharing and a network sharing mode according to the sharing priority when the type of the access network is changed.
The embodiment is an improvement on the basis of the first embodiment, and specifically, the difference is that the sharing priority of each type of network can be determined by default directly according to the network stability, after the target network is detected to be accessed, whether other access networks exist is not detected any more, and when the network sharing is performed, the network type is detected in real time, and the network sharing mode is updated according to the change of the network type.
A specific flowchart of a network sharing method according to this embodiment is shown in fig. 3, and specifically includes the following steps:
step 301, judging whether the terminal device is accessed, if the terminal device is accessed, entering step 303, and if the terminal device is not accessed, entering step 302.
Specifically, before detecting network access for network sharing, it is necessary to detect whether a terminal device serving as a network sharing apparatus is accessed, and when the terminal device is accessed, the network access is detected and determined, and when the terminal device is not accessed, the network access is not detected and determined, and the charging apparatus is directly controlled to enter the sleep mode.
Step 302, enter sleep mode.
Specifically, when the terminal device is not accessed, network sharing is not performed, the terminal device does not need to be charged, and the charging device automatically enters a sleep mode, so that energy consumption is reduced.
Step 303, determining whether to access the wired network, if it is detected that the wired network is accessed, step 305 is performed, and if it is not detected that the wired network is accessed, step 304 is performed.
Specifically, the charging device stores the sharing priority of various types of networks in advance, when detecting the access network, whether the various types of networks are accessed is detected in sequence according to the sequence of the sharing priority of the various types of networks, the network with the high sharing priority is taken as a target network, after the network with the high sharing priority is detected to be accessed, the network with the low sharing priority is not accessed for detection, and subsequent network sharing is directly performed. And when the network access with high sharing priority is not detected, taking the network with low sharing priority as a target network, and detecting whether the network with low sharing priority is accessed.
The sharing priority of various types of networks is determined according to the stability of various types of networks under general conditions, and the sharing priority of the default wired network is higher than that of the wireless network.
In one example, the sharing priority of the set wired network is higher, the charging device firstly uses the wired network as a target network to detect whether the wired network is accessed, if the wired network is detected to be accessed, the charging device does not detect whether the wireless network is accessed any more, and directly performs next network sharing, and if the wired network is not detected to be accessed, the wireless network with the lower sharing priority is used as the target network to detect whether the wireless network is accessed.
The method for detecting whether the wired network is accessed is similar to the method for detecting whether the wired network is accessed in step 101 in the first embodiment, and is not repeated here, and the charging device performs information interaction with devices in the internet through the wired network, and determines whether the wired network is normally accessed according to the received response.
Step 304, detecting whether the wireless network is accessed, if not, entering step 306, and if so, entering step 305.
Specifically, when the wired network access is not detected, a wireless network with a low sharing priority is used as a target network, and whether the wireless network is accessed or not is detected. In the detection of whether the wireless network is accessed, if the wireless network is detected to be accessed, the wireless network is subjected to network sharing, and if the wireless network is detected not to be accessed, the charging mode is entered.
The method for detecting whether the wireless network is accessed in this embodiment is similar to the method for detecting whether the wired network is accessed in step 303 in this embodiment, and is not repeated here, and the charging device detects whether the wireless network of the terminal device or the wireless network of the wireless network card is accessed, performs information interaction through the wireless network and the devices in the internet, and determines whether the wireless network is normally accessed according to the received response.
And 305, performing network sharing on the access network and charging the terminal equipment.
Specifically, when it is detected that the terminal device has been accessed and a normally accessed network is detected, a mode for performing network sharing is automatically selected according to the type of the accessed network, the accessed network is subjected to network sharing, the accessed terminal device is charged at the same time, and the charging mode is automatically exited after the electric quantity of the terminal device is fully charged.
The method for determining the network sharing mode according to the type of the access network and performing network sharing is similar to the method in step 103 in the first embodiment, and is not described herein again, and the working mode is switched according to the type of the access network to perform network sharing on the access network.
Step 306, enter a charging mode.
Specifically, when no access network is detected in the charging device, but a terminal device is accessed, the charging device automatically enters a charging mode, charges the terminal device, and automatically exits the charging mode after the terminal device is fully charged.
Step 307, detecting whether the access network is changed in real time, if so, entering step 301, and if not, keeping the real-time detection of the access network.
Specifically, after the access network is subjected to network sharing and enters a charging mode and a sleep mode, the access network needs to be detected in real time, and when the change of the access network is detected, the access network for network sharing is reselected and shared according to the type of the access network and the sharing priority corresponding to each type of access network; and when the change of the access network is not detected, keeping the current network sharing and keeping the detection of the access network.
In one example, the access network currently performing network sharing is a wireless network, the charging device operates in a WAN mode, and when access of a wired network is detected at a certain time, the network sharing mode needs to be updated according to a change of the access network. Firstly, performing networking check on an accessed wired network, when the networking condition of the wired network is normal, automatically switching a network sharing mode to a LAN mode according to the sequence of sharing priority, starting terminal equipment as a network sharing device, adjusting configuration information of a mobile phone, inputting the wired network, and performing network sharing on the wired network by virtue of the routing function of the mobile phone; when the wired network networking condition is abnormal, the current network sharing mode is maintained, and the information of the access network is continuously detected.
In one example, the access network currently performing network sharing is a wired network, the charging device operates in a LAN mode, and detects that the network connection of the wired network is disconnected at a certain time, at this time, the network sharing mode needs to be updated, the wireless network is taken as a target network according to the network sharing priority, whether the access of the wireless network exists is detected, when the access of the wireless network is detected, the network sharing mode is switched to a WAN mode, the wireless network is subjected to network sharing, and information of the access network is continuously detected. When the wireless network access is not detected, the network sharing is finished, when the mobile phone access is detected, the mobile phone is charged, and when the mobile phone access is not detected, the mobile phone enters the sleep mode.
In one example, when the current state is in the sleep mode and the access of the network is detected at a certain time, step 301 is entered, and the accessed network is detected according to the sharing priority of various types of networks, and the accessed network is subjected to network sharing.
Therefore, the embodiment provides a network sharing method, after detecting the access of terminal equipment, the network with high sharing priority is firstly used as a target network for access detection according to the sharing priority of various types of networks, and whether the network with low sharing priority is accessed is not continuously detected after detecting the access of the network with high sharing priority, thereby improving the working efficiency and avoiding meaningless work, after the network sharing and entering a charging mode and a sleeping mode, the condition of the network access is detected in real time, when the network access changes, the network access for network sharing is re-determined according to the sharing priority according to the type of the network access, the network sharing mode is updated, the network access for network sharing is ensured to be the most suitable network access, and the quality of network sharing is improved when the network access is not detected, only the terminal equipment is charged or enters a sleep mode, and the working mode is automatically switched, so that high-quality network sharing is realized, and energy consumption is reduced.
A third embodiment of the present invention relates to a network sharing method, which is applied to an electronic device, where the electronic device is used to charge a terminal device, and the terminal device may be a mobile phone, ufi product, tablet computer, or the like, which is not described herein again. In this embodiment, a charging apparatus applied to a mobile phone is described as an example, where the method for performing network sharing is to detect an access network according to priorities of various types of access networks, determine the access network for performing network sharing and perform network sharing, perform data backup on a terminal device according to data backup authority when the access of the terminal device is detected, then detect types of the access network in real time, and update an access network for performing network sharing and a network sharing mode according to a sharing priority when the access network changes.
The present embodiment is an improvement of the second embodiment, and a specific difference is that data backup can be automatically performed for the accessed terminal device according to the data backup authority.
A specific flowchart of a network sharing method according to this embodiment is shown in fig. 4, and specifically includes the following steps:
step 401, determining whether the terminal device is accessed, if the terminal device is accessed, entering step 403, and if the terminal device is not accessed, entering step 402.
Step 402, entering a sleep mode.
Step 403, determining whether to access the wired network, if it is detected that the wired network is accessed, entering step 405, and if it is not detected that the wired network is accessed, entering step 404.
Step 404, detecting whether the wireless network is accessed, if not, entering step 406, and if so, entering step 405.
Step 405, network sharing is performed on the access network and the terminal device is charged.
Step 406, enter a charging mode.
Steps 401 to 406 in this embodiment are similar to steps 301 to 306 in the second embodiment, and are not repeated herein, and specific differences will be described below.
Step 407, determining whether there is a data backup right, if so, entering step 408, and if not, entering step 409.
Specifically, the charging device queries information of the terminal device, detects whether data backup is allowed for data in the accessed terminal device, backs up the data of the terminal device when the data backup is allowed for the data of the terminal device, and does not back up the data of the terminal device when the data backup is not allowed for the data of the terminal device.
And step 409, backing up data of the terminal equipment.
Specifically, the charging device queries the data backup mark information in the terminal device, and determines whether to perform data backup on the terminal device again according to whether the data backup mark information is completely matched.
In one example, when data in the mobile phone allows data backup, whether the mobile phone contains data backup mark information is inquired, whether the mobile phone performs data backup for the first time is judged according to whether the mobile phone contains the data backup mark information, when the data backup mark information is not detected, the mobile phone is judged to perform data backup for the first time, the data in the mobile phone is directly backed up in a charging device, the data backup mark information is generated and stored in a specific address together with the backed-up data, and the data backup mark information is also synchronized into the mobile phone; when the mobile phone is inquired to contain the data backup mark information, whether the data backup mark information in the mobile phone is consistent with the data backup mark information stored in the charging device or not is compared, when the data backup mark information and the data backup mark information cannot be completely matched, the data information in the mobile phone is backed up again, new data backup mark information is generated, and then the new data backup mark information is synchronized into the mobile phone.
The data backup mark information in the mobile phone changes correspondingly according to the change of the data information in the mobile phone, when the data is reduced, the mark information is correspondingly reduced, when the data is increased, the mark information is correspondingly increased, therefore, the change of the data can cause the data mark information in the mobile phone and the data mark information stored in the charging device to be inconsistent, and when the inconsistency between the data mark information in the mobile phone and the data mark information stored in the charging device is detected, the stored backup data is increased or decreased according to the mark information in the mobile phone.
Step 409, detecting whether the access network is changed in real time. Step 409 in this embodiment is similar to step 307 in the second embodiment, and is not described herein again, and detects whether the access network is changed, and switches the operation modes of the access network for network sharing and the charging device according to the change condition of the access network.
Therefore, the embodiment provides a network sharing method, after detecting that a terminal device is accessed, an access network is detected according to the sharing priority of various types of networks, whether various types of networks are accessed is detected, the access network for network sharing is determined and network sharing is performed, meanwhile, the data state of the terminal device is inquired, when the data of the terminal device allows data backup, data backup is performed on the terminal device, the data safety of the terminal device is ensured, the loss caused by data loss is avoided, whether data backup is performed is determined according to the backup authority, and the privacy of a user is also protected.
It is understood by those skilled in the art that the steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the steps include the same logical relationship, and the steps are within the scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fourth embodiment of the present invention relates to a network sharing apparatus, as shown in fig. 6, including:
the detecting module 601 is configured to detect an access network and determine a network type of the access network. In this embodiment, the network type is not limited at all, and may be a wired network or a wireless network, and the wireless network may be a wireless mobile network of a terminal device or a network-connectable device such as an inserted wireless network card, which are not listed here.
Specifically, the detection module detects an accessed network, detects whether a network cable is inserted or not in the detection of whether the wired network is accessed or not, detects whether the wired network can be normally networked or not when the network cable is inserted, and judges that the wired network is accessed when the wired network can be normally networked; in the detection of whether the wireless detection network is accessed, whether a terminal device or a wireless network card and other network-connectable devices are inserted is detected, when the network-connectable devices are accessed, whether the wireless network of the network-connectable devices can be normally networked is detected, when the network can be normally networked, the wireless network is judged to be accessed, and the number and the type of the networks which are accessed to the charging device are determined through the detection of whether the wired network and the wireless network are accessed.
The control module 602 is configured to determine a sharing priority of an access network according to a type of the access network, determine an access network for performing network sharing according to the sharing priority, and perform network sharing on the access network determined to perform network sharing.
Specifically, after detecting the access network, the control module determines the network type of the access network, determines which types of networks have been accessed, determines the sharing priority of each access network according to the network type, determines the access network for network sharing according to the order of the sharing priority, and performs network sharing on the access network determined to perform network sharing.
In one example, after the access network is shared, the detection module 601 further performs real-time detection on the access network, and when the access network is changed, transmits the detection result to the control module 602, and the control module re-determines the access network for network sharing.
In an example, when the control module 602 shares the wired network to be accessed, the wired network is used as an input by enabling the terminal device to be accessed, adjusting configuration information of the terminal device, and sharing the wired network to other devices to be accessed through the terminal device by using a routing function carried by the terminal device.
In one example, the sharing priority stored in the control module 602 is a sharing priority of the wired network higher than the wireless mobile network or each type of network determined according to a user's setting.
In an example, the detection module 601 determines a target network for wired detection according to the sharing priority of various types of networks, detects whether the target network has been accessed, stops detecting the access network after detecting that the target network has been accessed, and determines a new target network according to the sharing priority of various types of networks and detects whether the target network has been accessed if the target network has not been detected.
In an example, before determining an access network for network sharing, the control module 602 performs information interaction with devices in the internet, determines whether the network is normally accessed according to a condition of receiving a response, determines to access the target network if the response of the devices in the internet is received, and determines not to access the target network if the response is not received.
In an example, the detecting module 601, after detecting the access network and obtaining the network type of the access network, further includes: detecting whether the terminal equipment is accessed, detecting the data state of the terminal equipment when detecting that the terminal equipment is accessed, and judging whether to perform data backup on the terminal equipment or not by the control module 602 according to the detection result of the data state; the data state comprises equipment information of the terminal equipment and data backup authority of the terminal equipment.
In an example, when the control module 602 controls the apparatus to perform data backup on the terminal device, the apparatus information of the terminal device is queried, where the apparatus information of the terminal device includes one of the following information or any combination thereof: the size of the memory data, the last backup time and the mark information generated according to the backup data after each backup is finished.
It should be understood that this embodiment is an example of the apparatus corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A fifth embodiment of the present invention relates to an electronic device for charging a terminal device, as shown in fig. 7, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the network sharing method as described above.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting together one or more of the various circuits of the processor and the memory. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (11)

1. A network sharing method is applied to an electronic device, the electronic device is used for charging a terminal device, and the method comprises the following steps:
detecting an access network to obtain the network type of the access network; wherein, different network types correspond to different sharing priorities;
performing network sharing on the access network; wherein the shared access network is determined according to a sharing priority of the network type.
2. The network sharing method according to claim 1, further comprising, after the network sharing the access network:
and detecting the access network in real time, and re-determining the access network for network sharing when the access network is changed.
3. The network sharing method according to claim 1, wherein the network sharing the access network comprises:
and when the access network for network sharing is the wired network, the wired network is subjected to network sharing through the accessed terminal equipment.
4. The network sharing method according to claim 1 or 2, comprising:
the sharing priority of the wired network is higher than the sharing priority of the wireless mobile network; alternatively, the first and second electrodes may be,
and determining the sharing priority corresponding to various networks according to user setting.
5. The network sharing method of claim 1, wherein the detecting the access network comprises:
determining a target network with priority detection according to the sharing priority corresponding to the network type;
detecting whether the target network is accessed;
if the target network is accessed, stopping the detection of the access network; and if the target network is not accessed, determining the next target network according to the sharing priority corresponding to the network type, and detecting whether the target network is accessed.
6. The network sharing method of claim 5, wherein the detecting whether the target network is accessed comprises:
and performing information interaction with equipment in the Internet through the access network, judging to access the target network if the response of the equipment in the Internet is received, and judging not to access the target network if the response is not received.
7. The network sharing method according to claim 1, wherein after the detecting the access network and obtaining the network type of the access network, the method further comprises:
detecting whether the terminal equipment is accessed, detecting the data state of the terminal equipment when detecting that the terminal equipment is accessed, and judging whether to perform data backup on the terminal equipment according to the data state detection result;
the data state comprises the equipment information of the terminal equipment and the data backup authority of the terminal equipment.
8. The network sharing method according to claim 7, wherein the device information of the terminal device comprises one or any combination of the following information: the size of the memory data, the last backup time and the mark information generated according to the backup data after each backup is finished.
9. A network sharing device is applied to charging terminal equipment and is characterized by comprising a network interface;
the detection module is used for detecting an accessed network to obtain the network type of the accessed network; the network types comprise a wired network and a wireless mobile network of the terminal equipment, and different network types correspond to different sharing priorities;
the control module is used for carrying out network sharing on the access network; wherein the shared access network is determined according to a sharing priority of the network type.
10. An electronic device for charging a terminal device, the electronic device further comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the network sharing method of any one of claims 1 to 8.
11. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the network sharing method of any one of claims 1 to 8.
CN201910858411.7A 2019-09-11 2019-09-11 Network sharing method and device, electronic equipment and storage medium Pending CN112492618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910858411.7A CN112492618A (en) 2019-09-11 2019-09-11 Network sharing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910858411.7A CN112492618A (en) 2019-09-11 2019-09-11 Network sharing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112492618A true CN112492618A (en) 2021-03-12

Family

ID=74920165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910858411.7A Pending CN112492618A (en) 2019-09-11 2019-09-11 Network sharing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112492618A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666651A (en) * 2022-03-23 2022-06-24 成都飞鱼星科技股份有限公司 Novel intelligent wireless system
CN115297530A (en) * 2022-09-28 2022-11-04 荣耀终端有限公司 Network connection method and device
CN116709313A (en) * 2023-08-07 2023-09-05 江西科技学院 WiFi sharing method, system and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666651A (en) * 2022-03-23 2022-06-24 成都飞鱼星科技股份有限公司 Novel intelligent wireless system
CN114666651B (en) * 2022-03-23 2024-03-12 成都飞鱼星科技股份有限公司 Novel intelligent wireless system
CN115297530A (en) * 2022-09-28 2022-11-04 荣耀终端有限公司 Network connection method and device
CN115297530B (en) * 2022-09-28 2023-04-07 荣耀终端有限公司 Network connection method and device
CN116709313A (en) * 2023-08-07 2023-09-05 江西科技学院 WiFi sharing method, system and storage medium
CN116709313B (en) * 2023-08-07 2023-10-17 江西科技学院 WiFi sharing method, system and storage medium

Similar Documents

Publication Publication Date Title
CN110536342B (en) Network mode control method, terminal and storage medium
US9918219B2 (en) Call management method and apparatus for multi-SIM multi-active terminal
US11071092B2 (en) Response message transmission method and apparatus
WO2020038256A1 (en) Data transmission method and apparatus
CN112492618A (en) Network sharing method and device, electronic equipment and storage medium
CN108781473B (en) Method and equipment for sharing files among different terminals
EP2672758B1 (en) Methods and apparatuses for easing Internet access by mobile stations associated with a mobile access point
CN111510922A (en) Wireless network access control method, device and system
CN104936211A (en) Wireless resource distribution method
CN107483234B (en) Method and device for split backup of access point of Internet of things
CN102684966B (en) Equipment method of network entry, Apparatus and system
CN102710629B (en) Method for connecting network and system
CN104869665A (en) Network connection control method, router and mobile equipment
CN107483236B (en) Method and device for backing up access point of Internet of things
CN105050123A (en) Load control method for wireless network and terminal
CN104754689A (en) Home gateway access management method and system
US10079893B2 (en) M2M application request sending method, CSE and system
CN107548019B (en) Method and device for processing network beacon in wireless sensor network
CN106851685A (en) A kind of method and system of control mobile terminal bandwidth
CN108632355B (en) Routing method for household appliance network, control terminal, readable storage medium and equipment
CN107548121A (en) It is determined that the method and device of access network
CN105357078A (en) Detection method and system of network state of intelligent equipment
US11803494B2 (en) Data communication method, master device and system
CN106341861B (en) Method, server and system for identifying wireless access point
CN105376842B (en) Dialing and de-dialing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination