CN109756397B - Hardware sharing method, system and related equipment - Google Patents

Hardware sharing method, system and related equipment Download PDF

Info

Publication number
CN109756397B
CN109756397B CN201910016044.6A CN201910016044A CN109756397B CN 109756397 B CN109756397 B CN 109756397B CN 201910016044 A CN201910016044 A CN 201910016044A CN 109756397 B CN109756397 B CN 109756397B
Authority
CN
China
Prior art keywords
application program
target application
terminal equipment
equipment
hardware
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.)
Active
Application number
CN201910016044.6A
Other languages
Chinese (zh)
Other versions
CN109756397A (en
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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910016044.6A priority Critical patent/CN109756397B/en
Publication of CN109756397A publication Critical patent/CN109756397A/en
Application granted granted Critical
Publication of CN109756397B publication Critical patent/CN109756397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention mainly aims to provide a hardware sharing method, a hardware sharing system and related equipment, which are used for ensuring the long-term stable operation of an application program in a hardware sharing process. In the embodiment of the invention, when the shared hardware equipment can detect that the terminal equipment is provided with the target application program, the target application program is operated to realize hardware sharing, and the heartbeat connection with the target application program is established at the same time so as to monitor the survival state of the target application program in real time.

Description

Hardware sharing method, system and related equipment
Technical Field
The present invention relates to the field of sharing technologies, and in particular, to a hardware sharing method, system and related device.
Background
Almost all households currently have home broadband and idle mobile phones; the family broadband has two concepts of an uplink broadband and a downlink broadband, but the utilization rate of the family user to the broadband is generally low, so that more resource waste exists; meanwhile, according to the investigation of 'the waste mobile phone recycling report of the institute of information and communication data of China', by 6 months in 2018, the stock of the idle mobile phones in China is 18.3 hundred million, the recycling rate is less than 2%, and the recycling of the idle mobile phones is not only in our country but also in the world. According to the market research form of our company, most idle mobile phones have good functions, and the hardware resources of the mobile phones can be scheduled through a shared computing mode, so that the mobile phones have great resource advantages.
The idle mobile phone is used as a shared hardware resource, and the following difficulties need to be solved, the idle mobile phone needs to install corresponding mobile phone application to share the hardware resource, the mobile phone application is limited by system authority and the like, the operation can not be kept for a long time, and if the application is accidentally crashed, a user needs to manually turn on the mobile phone, so that the mobile phone is very inconvenient.
Disclosure of Invention
The invention mainly aims to provide a hardware sharing method, a hardware sharing system and related equipment, which are used for ensuring the long-term stable operation of an application program in a hardware sharing process.
In order to achieve the above object, a first aspect of the present invention provides a hardware sharing method, applied to a shared hardware device, where the shared hardware device is connected to a terminal device, and the method includes:
detecting whether a target application program is installed in the terminal equipment, and if so, operating the target application program, wherein the target application program is used for realizing hardware sharing;
establishing a heartbeat connection with the target application program;
and if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again.
Optionally, as a possible implementation manner, in the embodiment of the present invention, the shared hardware device includes a USB male connector and a USB female connector, where the USB male connector is used to connect to a USB charger, and the USB female connector is used to connect to the terminal device through a data line.
Optionally, as a possible implementation manner, in the embodiment of the present invention, the hardware sharing method may further include:
monitoring the residual electric quantity of the terminal equipment;
if the residual electric quantity of the terminal equipment is larger than a first threshold value, stopping charging the terminal equipment;
and if the residual electric quantity of the terminal equipment is smaller than a second threshold value, charging the terminal equipment.
Optionally, as a possible implementation manner, in the embodiment of the present invention, the hardware sharing method may further include:
and in the process of running the target application program, encrypting the generated user data and sending the encrypted user data to a server.
Optionally, as a possible implementation manner, in the embodiment of the present invention, the hardware sharing method may further include:
monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature or the battery temperature of the terminal equipment;
and if the equipment temperature is greater than a third threshold value, stopping charging the terminal equipment and stopping running the target application program.
To achieve the above object, a second aspect of the present invention provides a shared hardware device, the apparatus including a memory and a processor, the memory storing a computer program operable on the processor, the computer program, when executed by the processor, implementing the method of:
detecting whether a target application program is installed in the terminal equipment, and if so, operating the target application program, wherein the target application program is used for realizing hardware sharing;
establishing a heartbeat connection with the target application program;
and if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again.
Optionally, as a possible implementation manner, in the embodiment of the present invention, when executed by the processor, the computer program further implements the following method:
monitoring the residual electric quantity of the terminal equipment;
if the residual electric quantity of the terminal equipment is larger than a first threshold value, stopping charging the terminal equipment;
and if the residual electric quantity of the terminal equipment is smaller than a second threshold value, charging the terminal equipment.
Optionally, as a possible implementation manner, in the embodiment of the present invention, when executed by the processor, the computer program further implements the following method:
and in the process of running the target application program, encrypting the generated user data and sending the encrypted user data to a server.
Optionally, as a possible implementation manner, in the embodiment of the present invention, when executed by the processor, the computer program further implements the following method:
monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature or the battery temperature of the terminal equipment;
and if the equipment temperature is greater than a third threshold value, stopping charging the terminal equipment and stopping running the target application program.
To achieve the above object, a third aspect of the present invention provides a hardware sharing system, including:
the detection unit is used for detecting whether a target application program is installed in the terminal equipment or not, if so, the target application program is operated, and the target application program is used for realizing hardware sharing;
the establishing unit is used for establishing heartbeat connection with the target application program;
and the restarting unit is used for re-pulling the target application program if the heartbeat packet sent by the target application program is not received within the preset time.
Optionally, as a possible implementation manner, referring to fig. 5, the hardware sharing system in the embodiment of the present invention may further include:
the first monitoring unit is used for monitoring the residual electric quantity of the terminal equipment;
the first control unit stops charging the terminal equipment if the residual electric quantity of the terminal equipment is larger than a first threshold value;
and the second control unit is used for charging the terminal equipment if the residual electric quantity of the terminal equipment is smaller than a second threshold value.
Optionally, as a possible implementation manner, referring to fig. 6, the hardware sharing system in the embodiment of the present invention may further include:
and the encryption unit is used for encrypting the generated user data in the process of running the target application program and sending the encrypted user data to the server.
Optionally, as a possible implementation manner, referring to fig. 7, the hardware sharing system in the embodiment of the present invention may further include:
the second monitoring unit is used for monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature or the battery temperature of the terminal equipment;
and the third control unit stops charging the terminal equipment and stops running the target application program if the equipment temperature is greater than the third threshold value.
To achieve the above object, a fourth aspect of the present invention provides a computer-readable storage medium, which is characterized by having a computer program stored thereon, where the computer program is executable by one or more processors to implement the steps in the hardware sharing method according to the first aspect and any one of the possible implementation manners of the first aspect.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, when the shared hardware equipment can detect that the terminal equipment is provided with the target application program, the target application program is operated to realize hardware sharing, and the heartbeat connection with the target application program is established at the same time so as to monitor the survival state of the target application program in real time.
Drawings
FIG. 1 is a diagram illustrating a hardware architecture in an embodiment of a hardware sharing method according to the present invention;
FIG. 2 is a diagram of a hardware sharing method according to an embodiment of the present invention;
FIG. 3 is a diagram of another embodiment of a hardware sharing method according to an embodiment of the present invention;
FIG. 4 is a diagram of a hardware sharing system according to an embodiment of the present invention;
FIG. 5 is a diagram of another embodiment of a hardware sharing system according to the embodiment of the present invention;
FIG. 6 is a diagram of another embodiment of a hardware sharing system according to an embodiment of the present invention;
FIG. 7 is a diagram of another embodiment of a hardware sharing system according to the embodiment of the present invention;
fig. 8 is a schematic diagram of an embodiment of a shared hardware device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Idle terminal devices, such as mobile phones and tablet computers, serve as shared hardware resources, corresponding terminal applications need to be installed to share the hardware resources, the terminal applications are limited by system permissions and the like, and cannot be kept running for a long time, and if the applications are accidentally broken down, the users need to manually turn on the terminal applications, which is very inconvenient. In view of this, embodiments of the present invention provide a hardware sharing method, which is used to ensure long-term stable operation of an application program in a hardware sharing process.
For convenience of understanding, a specific hardware system in the embodiment of the present invention will be briefly described below, and referring to fig. 1, a hardware architecture in the embodiment of the present invention includes a shared hardware device, a terminal device, and a USB charger, where one end of the shared hardware device is connected to a power supply through the charger, and the other end of the shared hardware device is connected to the terminal device through a data line, and the terminal device may be a device with computing capability and networking capability, such as a smart phone, a tablet, and the like.
Referring to fig. 2, an embodiment of a hardware sharing method according to an embodiment of the present invention includes:
201. detecting whether a target application program is installed in the terminal equipment;
after the hardware connection between the shared hardware device and the terminal device and the USB charger is completed, the shared hardware device may establish a communication connection with the terminal device through a preset communication protocol, for example, the communication connection may be established based on an android AOA protocol, and a specific communication protocol is not limited here. After the communication connection is established, based on the communication connection, the shared hardware device may directly or indirectly detect whether a target application program for realizing hardware sharing is installed in the terminal device.
In practical application, an operating system of the terminal device stores software identification information of an application program installed in the terminal device, after the terminal device receives the software identification information of a target application program sent by the shared hardware device, the terminal device matches the software identification information of the target application program with the stored software identification information and feeds back a matching result to the shared hardware device, if the terminal device stores the software identification information of the target application program, the matching is successful, and the terminal device is provided with the target application program; otherwise, the matching fails, and the target application program is not installed in the terminal equipment.
If it is detected that the target application is installed in the terminal device, step 202 may be executed, and if it is detected that the target application is not installed in the terminal device, other processes may be executed, for example, a link for downloading the target application may be sent to the intelligent terminal, so that the terminal device downloads the target application according to the corresponding link.
202. Running the target application program and establishing heartbeat connection with the target application program;
if the terminal device is detected to be provided with the target application program, the terminal device can be controlled to run the target application program, and the target application program can realize preset functions such as computing power sharing, storage sharing and the like when being run.
In actual application, the target application program may be jammed, recovered and frozen by the system, and may be killed by third-party security software, and the program may be crashed, which may result in that the target application program cannot stably run for a long time. To solve this problem, the shared hardware device in the embodiment of the present invention may establish a heartbeat connection with the target application program based on a heartbeat mechanism, so that the target application program sends a self-defined structure (heartbeat packet) to the shared hardware device at regular time.
203. And if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again.
After the heartbeat connection is established, if the shared hardware equipment does not receive the heartbeat packet sent by the target application program within the preset time, the terminal equipment is automatically controlled to pull up the target application program again so as to ensure the long-term stable operation of the target application program, the manual operation of a user is not needed, and the user experience is improved.
In the embodiment of the invention, when the shared hardware equipment can detect that the terminal equipment is provided with the target application program, the target application program is operated to realize hardware sharing, and the heartbeat connection with the target application program is established at the same time so as to monitor the survival state of the target application program in real time.
Optionally, on the basis of the embodiments shown in fig. 1 and fig. 2, as a possible implementation manner, the shared hardware device in the embodiment of the present invention may be provided with a USB male connector and a USB female connector, where the USB male connector is used to connect to a USB charger, the USB charger is connected to a power supply, and the USB female connector is used to connect to a terminal device through a data line.
Based on the embodiments shown in fig. 1 and fig. 2, the idle intelligent terminal has the following difficulties in the hardware sharing process:
1. a stable power supply party is required to work reliably for a long time, so long-term power plug is required, and the intelligent terminal is damaged by long-term power plug work;
2. encryption of part of private data or revenue calculation data is involved when users share computing resources;
3. when the idle mobile phone has security risks, such as too high operating temperature and unstable charging voltage, corresponding defense measures need to be detected and made.
To solve the above-mentioned difficulties, the embodiments shown in fig. 1 and fig. 2 need to be further optimized, referring to fig. 3, another embodiment of a hardware sharing method according to the embodiments of the present invention includes:
301. detecting whether a target application program is installed in the terminal equipment;
302. running the target application program and establishing heartbeat connection with the target application program;
303. and if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again.
The content described in steps 301 to 303 in the embodiment of the present invention is similar to the content described in steps 201 to 203 in the embodiment shown in fig. 2, and please refer to steps 201 to 203 specifically, which is not described herein again.
304. Monitoring the residual electric quantity of the terminal equipment, and controlling the charging state of the terminal equipment according to the residual electric quantity;
optionally, after the target application program is run on the terminal device, the shared hardware device may indirectly monitor the remaining power of the terminal device based on the target application program, or directly query the remaining power of the monitoring terminal device, and control the charging state of the terminal device according to the remaining power. Specifically, if the remaining capacity of the terminal device is greater than the first threshold, the terminal device is stopped to be charged, and if the remaining capacity of the terminal device is less than the second threshold, the terminal device is charged. The specific first threshold and the second threshold may be reasonably set according to a hardware state of the terminal device, for example, the first threshold may be set to any value between 80% and 100% of the maximum electric quantity of the battery, and the second threshold may be set to any value between 10% and 30% of the maximum electric quantity of the battery, which is not limited herein.
305. Monitoring the equipment temperature of the terminal equipment, and if the equipment temperature is greater than a third threshold value, stopping charging the terminal equipment and stopping running the target application program;
optionally, after the target application program is run on the terminal device, the shared hardware device may indirectly monitor the device temperature of the terminal device based on the target application program, or directly query the device temperature of the monitoring terminal device, and if the device temperature is greater than the third threshold, stop charging the terminal device, and stop running the target application program. The detection is carried out again at intervals until the temperature is recovered to be normal, so that the temperature of the mobile phone can be well protected from being overheated. The device temperature is the CPU temperature or the battery temperature of the terminal device.
306. And in the process of running the target application program, encrypting the generated user data and sending the encrypted user data to the server.
Optionally, after the terminal device is connected to the network, in the process of running the target application program, after part of confidential data of the user is generated, the data can be transmitted to the product through the data line for encryption, and then transmitted back to the mobile phone through the data line, and the encrypted user data is transmitted to the terminal device through the network and transmitted to the server. The specific encryption algorithm may be asymmetric encryption, symmetric encryption, or a hybrid encryption mode combining asymmetric encryption and symmetric encryption, for example, after the root public key and the root private key in the asymmetric encryption algorithm are successfully authenticated, a common key is negotiated by using a key negotiation algorithm, and finally the user data is encrypted according to the common key and the symmetric encryption algorithm, where the specific encryption algorithm is not limited here.
In the embodiment of the invention, when the shared hardware equipment can detect that the terminal equipment is provided with the target application program, the target application program is operated to realize hardware sharing, and the heartbeat connection with the target application program is established at the same time so as to monitor the survival state of the target application program in real time. In addition, the operation state and the charging state of the terminal equipment can be timely adjusted according to the temperature and the electric quantity of the terminal equipment in the embodiment of the invention, so that the stable operation of the terminal equipment is effectively ensured, and the reliability of hardware sharing is improved. And thirdly, the user data generated in the hardware sharing process is encrypted, so that the data security is improved.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the above steps do not mean the execution sequence, and the execution sequence of each step should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
The embodiments shown in fig. 1 to fig. 3 describe the hardware sharing method in the embodiments of the present invention, and a hardware sharing system in the embodiments of the present invention will be described below.
Referring to fig. 4, an embodiment of a hardware sharing system according to the present invention may include:
a detecting unit 401, configured to detect whether a target application is installed in a terminal device, and if so, run the target application, where the target application is used to implement hardware sharing;
an establishing unit 402, configured to establish a heartbeat connection with a target application;
the restarting unit 403 restarts the target application program if the heartbeat packet sent by the target application program is not received within a preset time.
Optionally, as a possible implementation manner, referring to fig. 5, the hardware sharing system in the embodiment of the present invention may further include:
a first monitoring unit 404, configured to monitor a remaining power of the terminal device;
a first control unit 405, which stops charging the terminal device if the remaining power of the terminal device is greater than a first threshold;
the second control unit 406 is configured to charge the terminal device if the remaining power of the terminal device is less than the second threshold.
Optionally, as a possible implementation manner, referring to fig. 6, the hardware sharing system in the embodiment of the present invention may further include:
the encryption unit 407 encrypts the generated user data during running of the target application, and transmits the encrypted user data to the server.
Optionally, as a possible implementation manner, referring to fig. 7, the hardware sharing system in the embodiment of the present invention may further include:
a second monitoring unit 408 for monitoring the device temperature of the terminal device, wherein the device temperature is the CPU temperature or the battery temperature of the terminal device;
and a third control unit 409, stopping charging the terminal device and stopping running the target application program if the device temperature is greater than the third threshold.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiment of the invention, when the shared hardware equipment can detect that the terminal equipment is provided with the target application program, the target application program is operated to realize hardware sharing, and the heartbeat connection with the target application program is established at the same time so as to monitor the survival state of the target application program in real time. In addition, the operation state and the charging state of the terminal equipment can be timely adjusted according to the temperature and the electric quantity of the terminal equipment in the embodiment of the invention, so that the stable operation of the terminal equipment is effectively ensured, and the reliability of hardware sharing is improved. And thirdly, the user data generated in the hardware sharing process is encrypted, so that the data security is improved.
Referring to fig. 8, the shared hardware device 8 is provided with a USB male connector and a USB female connector (not shown), the USB male connector is used for connecting a USB charger, the USB female connector is used for connecting a terminal device through a data line, and the shared hardware device includes a memory 11, a processor 12, a bus 13, and a computer program stored in the memory and capable of running on the processor. The processor, when executing the computer program, performs the steps described above in the embodiments of the reward-based distribution method shown in fig. 1-3, such as steps 201-203 shown in fig. 2. Alternatively, the processor, when executing the computer program, implements the functions of each module or unit in the above-described device embodiments.
In some embodiments of the present invention, the processor is specifically configured to implement the following steps:
detecting whether a target application program is installed in the terminal equipment, if so, operating the target application program, wherein the target application program is used for realizing hardware sharing;
establishing a heartbeat connection with a target application program;
and if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the following steps:
monitoring the residual electric quantity of the terminal equipment;
if the residual electric quantity of the terminal equipment is larger than the first threshold value, stopping charging the terminal equipment;
and if the residual capacity of the terminal equipment is less than the second threshold value, charging the terminal equipment.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the following steps:
and in the process of running the target application program, encrypting the generated user data and sending the encrypted user data to the server.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the following steps:
monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature or the battery temperature of the terminal equipment;
and if the equipment temperature is greater than the third threshold value, stopping charging the terminal equipment and stopping running the target application program.
The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the shared hardware device 8, for example a hard disk of the shared hardware device 8. The memory 11 may also be an external storage device of the shared hardware device 8 in other embodiments, such as a plug-in hard disk provided on the shared hardware device 8, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and so on. Further, the memory 11 may also include both internal storage units of the shared hardware device 8 and external storage devices. The memory 11 may be used not only to store application software installed in the shared hardware device 8 and various types of data, such as codes of computer programs, etc., but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing computer programs.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, a USB bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
Further, the shared hardware device may further include a network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used to establish a communication connection between the shared hardware device 8 and other electronic devices.
Fig. 8 only shows the shared hardware device 8 with components 11-14 and computer programs, and it will be understood by those skilled in the art that the structure shown in fig. 8 does not constitute a limitation of the shared hardware device 8, and may comprise fewer or more components than shown, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
detecting whether a target application program is installed in the terminal equipment, if so, operating the target application program, wherein the target application program is used for realizing hardware sharing;
establishing a heartbeat connection with a target application program;
and if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the following steps:
monitoring the residual electric quantity of the terminal equipment;
if the residual electric quantity of the terminal equipment is larger than the first threshold value, stopping charging the terminal equipment;
and if the residual capacity of the terminal equipment is less than the second threshold value, charging the terminal equipment.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the following steps:
and in the process of running the target application program, encrypting the generated user data and sending the encrypted user data to the server.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the following steps:
monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature or the battery temperature of the terminal equipment;
and if the equipment temperature is greater than the third threshold value, stopping charging the terminal equipment and stopping running the target application program.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the invention are brought about in whole or in part when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website site, computer, shared hardware device, or data center to another website site, computer, shared hardware device, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). A computer-readable storage medium may be any available medium that a computer can store or a data storage device including one or more shared hardware devices, data centers, and the like, integrated with the available medium. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a shared hardware device, or a network device) to execute all or part of the steps of the method of 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 should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. A hardware sharing method is applied to shared hardware equipment, one end of the shared hardware equipment is connected to a power supply through a charger, and the other end of the shared hardware equipment is connected with terminal equipment through a data line, and the method comprises the following steps:
detecting whether a target application program is installed in the terminal equipment, if so, controlling the terminal equipment to run the target application program, wherein the target application program is used for realizing hardware sharing;
establishing a heartbeat connection with the target application program;
if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again;
the shared hardware equipment comprises a USB male head and a USB female head, the USB male head is used for connecting a USB charger, and the USB female head is used for connecting the terminal equipment through a data line;
encrypting the generated user data in the process of running the target application program, and sending the encrypted user data to a server;
monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature of the terminal equipment;
and if the equipment temperature is greater than a third threshold value, stopping charging the terminal equipment and stopping running the target application program.
2. The method of claim 1, wherein the method further comprises:
monitoring the residual electric quantity of the terminal equipment;
if the residual electric quantity of the terminal equipment is larger than a first threshold value, stopping charging the terminal equipment;
and if the residual electric quantity of the terminal equipment is smaller than a second threshold value, charging the terminal equipment.
3. The utility model provides a hardware sharing system which characterized in that applies to shared hardware equipment, shared hardware equipment one end passes through the charger to be connected to the power, and the other end passes through data line connection terminal equipment, the system includes:
the device comprises a detection unit, a processing unit and a control unit, wherein the detection unit is used for detecting whether a target application program is installed in the terminal equipment or not, and if so, the target application program is operated and used for realizing hardware sharing;
the establishing unit is used for establishing heartbeat connection with the target application program;
the restarting unit is used for re-pulling the target application program if the heartbeat packet sent by the target application program is not received within the preset time;
the shared hardware equipment comprises a USB male head and a USB female head, the USB male head is used for connecting a USB charger, and the USB female head is used for connecting the terminal equipment through a data line;
the hardware sharing system may further include:
the encryption unit is used for encrypting the generated user data in the process of running the target application program and sending the encrypted user data to the server;
the second monitoring unit is used for monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature of the terminal equipment;
and the third control unit stops charging the terminal equipment and stops running the target application program if the equipment temperature is greater than the third threshold value.
4. A shared hardware device, wherein one end of the shared hardware device is connected to a power supply through a charger, and the other end of the shared hardware device is connected to a terminal device through a data line, the shared hardware device comprises a memory and a processor, the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, the method of:
detecting whether a target application program is installed in the terminal equipment, and if so, operating the target application program, wherein the target application program is used for realizing hardware sharing;
establishing a heartbeat connection with the target application program;
if the heartbeat packet sent by the target application program is not received within the preset time, the target application program is pulled up again;
the shared hardware equipment comprises a USB male head and a USB female head, the USB male head is used for connecting a USB charger, and the USB female head is used for connecting the terminal equipment through a data line;
the computer program when executed by the processor further implements the process of:
encrypting the generated user data in the process of running the target application program, and sending the encrypted user data to a server;
monitoring the equipment temperature of the terminal equipment, wherein the equipment temperature is the CPU temperature of the terminal equipment;
and if the equipment temperature is greater than a third threshold value, stopping charging the terminal equipment and stopping running the target application program.
5. The apparatus of claim 4, wherein the computer program, when executed by the processor, further implements the method of:
monitoring the residual electric quantity of the terminal equipment;
if the residual electric quantity of the terminal equipment is larger than a first threshold value, stopping charging the terminal equipment;
and if the residual electric quantity of the terminal equipment is smaller than a second threshold value, charging the terminal equipment.
6. A computer-readable storage medium, having stored thereon a computer program executable by one or more processors to implement the hardware sharing method of any one of claims 1 to 2.
CN201910016044.6A 2019-01-08 2019-01-08 Hardware sharing method, system and related equipment Active CN109756397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910016044.6A CN109756397B (en) 2019-01-08 2019-01-08 Hardware sharing method, system and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910016044.6A CN109756397B (en) 2019-01-08 2019-01-08 Hardware sharing method, system and related equipment

Publications (2)

Publication Number Publication Date
CN109756397A CN109756397A (en) 2019-05-14
CN109756397B true CN109756397B (en) 2021-05-18

Family

ID=66405323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910016044.6A Active CN109756397B (en) 2019-01-08 2019-01-08 Hardware sharing method, system and related equipment

Country Status (1)

Country Link
CN (1) CN109756397B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287036A (en) * 2019-05-09 2019-09-27 华为技术有限公司 A kind of collaborative share methods, devices and systems
CN117630696A (en) * 2022-08-10 2024-03-01 宁德时代新能源科技股份有限公司 Battery testing method, battery testing device, electronic equipment and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461687A (en) * 2014-11-20 2015-03-25 华为技术有限公司 Virtual machine configuration information storage method and device
KR20180013612A (en) * 2016-07-29 2018-02-07 한양대학교 산학협력단 Resource sharing method between devices

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1979444A (en) * 2005-12-06 2007-06-13 英业达股份有限公司 System for ensuring servo programe non-interrupted operation and method therefor
CN103490109B (en) * 2012-06-12 2016-12-14 南京中兴新软件有限责任公司 The charging method of a kind of terminal and device
CN103024043B (en) * 2012-12-14 2016-01-27 腾讯科技(深圳)有限公司 A kind of data sharing method, server and system
CN105071455A (en) * 2015-07-20 2015-11-18 广东小天才科技有限公司 Method of charging intelligent terminal and device
CN105744506A (en) * 2016-03-31 2016-07-06 宇龙计算机通信科技(深圳)有限公司 Hardware sharing methods, hardware sharing apparatuses and terminals
CN106655358B (en) * 2016-11-29 2019-08-30 努比亚技术有限公司 Battery charge controller and method between a kind of mobile terminal
CN106850354A (en) * 2017-02-22 2017-06-13 郑州云海信息技术有限公司 A kind of processing method and processing device of Single Point of Faliure

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461687A (en) * 2014-11-20 2015-03-25 华为技术有限公司 Virtual machine configuration information storage method and device
KR20180013612A (en) * 2016-07-29 2018-02-07 한양대학교 산학협력단 Resource sharing method between devices

Also Published As

Publication number Publication date
CN109756397A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
US10424954B2 (en) Power adaptor, terminal and charging system
US10043223B2 (en) Managing power distribution
US20200351354A1 (en) System and method for supporting data communication in a heterogeneous environment
EP3220506B1 (en) Communication method, power adaptor and terminal
CN105472038B (en) File transmission control method, device and system
CN109756397B (en) Hardware sharing method, system and related equipment
US20210318738A1 (en) Methods and apparatus for enhanced power delivery between devices
CN104601331A (en) System and method for monitoring and controlling charging pile
TWI571094B (en) Wireless power transfer with improved device identification and signaling link security
CN101655814A (en) Method for authenticating smart battery and terminal
WO2014086139A1 (en) Method and device for controlling shutdown of terminal
WO2018210320A1 (en) Method and device for charging user equipment by means of charging apparatus
CN109478176A (en) A kind of methods, devices and systems of USB Type-C port device identification opposite equip.
CN107172618B (en) Device pairing method
CN109766177A (en) A kind of Android APP keepalive method, system and relevant device
CN103702323A (en) Wireless information security equipment system and method
CN106027258A (en) TPM (Trusted Platform Module)-based household appliance remote control method
US11467644B2 (en) Systems and methods for detecting battery removal while an information handling system is in an off state
CN106169955B (en) The safety certifying method and system of distribution network terminal wireless maintenance
CN105740719A (en) Wireless safe USB (Universal Serial Bus) flash disk and implementation method thereof
CN103678972A (en) System and method for limits of authority
WO2021081784A1 (en) Power supply method, device and system, and storage medium
CN109768594B (en) Charging method, terminal and charging assembly
CN108886383B (en) Pairing method for electric cats and electric cats
US11210386B2 (en) Technique for managing a right of access to a service for a communicating 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
GR01 Patent grant
GR01 Patent grant