Disclosure of Invention
In view of the above problems, the present invention provides a resource request method and system, which can be applied to secure mobile phones and personal consumer devices, prevent privacy leakage of users, isolate cloud mobile phones from real phone resources, and enable the cloud mobile phones to obtain real phone data when users actively call the cloud mobile phones.
According to a first aspect of the present invention, there is provided a resource request method applied to a cloud mobile phone, the method including:
responding to a resource request initiated by a cloud mobile phone application, and determining a target resource position corresponding to the resource request;
when the target resource position is located in a user terminal, generating a target resource acquisition query, and sending the target resource acquisition query to the user terminal;
responding to a target resource acquisition confirmation instruction fed back by the user terminal, generating a target resource encryption request, and sending the target resource encryption request to the user terminal, wherein the target resource encryption request carries the position of the target resource;
receiving a target resource stored in a target resource position from a user terminal;
forwarding the target resource to the cloud mobile phone application.
Optionally, before the cloud mobile phone application initiates the resource request, the method further includes:
the cloud mobile phone application generates a resource storage/reading request for a user terminal, and sends the resource storage/reading request to the user terminal, and the user terminal displays a UI (user interface) for the resource storage/reading request;
and the cloud mobile phone application responds to the resource storage/reading confirmation instruction fed back by the user terminal to obtain resource storage/reading permission.
Optionally, the generating a target resource encryption request in response to the target resource acquisition confirmation instruction fed back by the user terminal includes:
responding to a target resource acquisition instruction fed back by the user terminal to generate a target resource request; the target resource request is an MQ sequence containing a private protocol;
and performing base64 and AES encryption on the MQ sequence to obtain the target resource encryption request.
Optionally, the sending the target resource encryption request to the user terminal includes:
and establishing a Socket data connection channel with the user terminal, and sending the target resource encryption request to the user terminal by using the Socket connection channel.
Optionally, the receiving a target resource stored in a target resource location from a user terminal, and forwarding the target resource to the cloud mobile phone application includes:
receiving the target resource by analyzing the url address corresponding to the target resource;
and restoring the target resource into a protocol format which can be used by the equipment and then providing the protocol format for the cloud mobile phone application.
According to a second aspect of the present invention, a resource request method is provided, which is applied to a user equipment, and includes:
feeding back a target resource acquisition confirmation instruction to a cloud mobile phone in response to receiving a target resource acquisition inquiry of the cloud mobile phone, wherein the target resource acquisition inquiry is generated based on a resource request initiated by a cloud mobile phone application, and the resource request is used for requesting to acquire resources in the user terminal;
in response to receiving a target resource encryption request sent by the cloud mobile phone, performing decryption operation on the target resource encryption request to obtain a target resource position, wherein the target resource encryption request is generated based on the target resource acquisition confirmation instruction, the target resource encryption request is used for requesting to acquire a target resource stored in the target resource position of the user terminal, and the target resource encryption request carries the target resource position;
and calling the target resource based on the position of the target resource, and transmitting the target resource back to the cloud mobile phone so that the cloud mobile phone forwards the target resource to the cloud mobile phone application.
Optionally, the decrypting the target resource encryption request includes:
and analyzing the MQ sequence of the target resource encryption request, and performing base64 and AES reverse decryption on the MQ sequence.
Optionally, the invoking the target resource based on the target resource location includes:
opening a resource selection page corresponding to the target resource position, and displaying a UI (user interface) on the resource selection page;
and calling the target resource in response to a target resource selection instruction fed back by the user.
Optionally, the returning the target resource to the cloud mobile phone includes:
and establishing an https network connection channel with the cloud mobile phone, and sending the target resource to the cloud mobile phone by using the https network connection channel.
According to a third aspect of the present invention, there is provided a resource request system, comprising a cloud handset and a user terminal,
the cloud cell phone comprises:
the cloud cell phone comprises:
the resource request initiating module is used for responding to a resource request initiated by the cloud mobile phone application and determining a target resource position corresponding to the resource request;
the calling authority acquisition module is used for generating a target resource acquisition query when the target resource position is located in a user terminal, and sending the target resource acquisition query to the user terminal;
the resource request encryption module is used for responding to a target resource acquisition confirmation instruction fed back by the user terminal, generating a target resource encryption request and sending the target resource encryption request to the user terminal, wherein the target resource encryption request carries the position of the target resource;
the target resource acquisition module is used for receiving target resources stored in a target resource position from a user terminal and forwarding the target resources to the cloud mobile phone application;
the user terminal includes:
the resource request confirming module is used for responding to a target resource obtaining inquiry of a cloud mobile phone and feeding back a target resource obtaining confirming instruction to the cloud mobile phone, wherein the target resource obtaining inquiry is generated based on a resource request initiated by a cloud mobile phone application, and the resource request is used for requesting to obtain resources in the user terminal;
the resource request decryption module is used for responding to a target resource encryption request sent by the cloud mobile phone, decrypting the target resource encryption request to obtain a target resource position, wherein the target resource encryption request is generated based on the target resource acquisition confirmation instruction, the target resource encryption request is used for requesting to acquire a target resource stored in the target resource position of the user terminal, and the target resource encryption request carries the target resource position;
and the target resource returning module is used for calling the target resource based on the position of the target resource and returning the target resource to the cloud mobile phone so that the cloud mobile phone forwards the target resource to the cloud mobile phone application.
The invention provides a resource request method and a system, which initiate a resource request through a cloud mobile phone application, acquire a target resource position corresponding to the resource request, generate a target resource acquisition inquiry according to the target resource position, send the target resource acquisition inquiry to a user terminal, generate a target resource encryption request in response to a target resource acquisition confirmation instruction, send the target resource encryption request to the user terminal, receive the target resource encryption request from the cloud mobile phone by the user terminal, decrypt the target resource encryption request to obtain the target resource request, call the target resource according to the target resource request, and return the target resource to the cloud mobile phone. The data information privacy security is greatly improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a resource request method, which is applied to a cloud mobile phone, and as shown in fig. 1, the method at least includes the following steps S101 to S104:
step S101, responding to a resource request initiated by the cloud mobile phone application, and determining a target resource position corresponding to the resource request.
The cloud mobile phone is a virtual mobile phone which applies a cloud computing technology to network terminal service and realizes cloud service through a cloud server. The cloud mobile phone can realize a plurality of functions through a network by means of a system of the cloud mobile phone and a network terminal erected by a manufacturer. The cloud mobile phone can be operated on various user terminals, such as a smart phone, a notebook, a tablet computer, a vehicle-mounted computer, and the like. The cloud mobile phone application refers to various application programs or APPs installed or operated on the cloud mobile phone.
The resource request method in the embodiment of the invention refers to that an application program or APP of a cloud mobile phone calls a user terminal, namely data resources on a real phone. When the cloud mobile phone APP needs to make data resources, the resource storage and reading permission for the user terminal generally needs to be obtained first.
Optionally, before the cloud mobile phone application initiates the resource request, a resource storage/reading request for the user terminal may be generated first, and the resource storage/reading request is sent to the user terminal, and the user terminal performs UI interface display on the resource storage/reading request.
In the embodiment of the invention, when the user terminal displays the resource storage/reading request on the UI interface, two selectable items of resource storage/reading confirmation and resource storage/reading rejection can be preset for synchronous display, so that the user can select whether the cloud mobile phone is allowed to acquire the resource storage/reading permission; the cloud mobile phone application responds to a resource storage/reading confirmation instruction from the user terminal to obtain resource storage/reading permission.
In the embodiment of the invention, the cloud mobile phone application can initiate a resource storage/reading request when the cloud mobile phone application is used for the first time, and the data resources needing to be stored/read can comprise files, photo albums, address books, positioning and the like. If a single cloud mobile phone application needs to acquire resource storage/reading permissions of multiple data resources, resource storage/reading requests can be initiated for multiple times. If a user selects resource storage/reading confirmation aiming at a resource storage/reading request of a certain cloud mobile phone application aiming at a certain type of data resources, the user selection is used as a resource storage/reading confirmation instruction, and the cloud mobile phone application responds to the resource storage/reading confirmation instruction from the user to acquire resource storage/reading permission aiming at the type of data resources; if a user selects resource storage/reading rejection aiming at a resource storage/reading request of a certain cloud mobile phone application aiming at a certain type of data resources, the user selection is used as a resource storage/reading rejection instruction, and the cloud mobile phone application cannot store or read the data resources in response to the resource storage/reading rejection instruction from the user.
After the cloud mobile phone application acquires the resource storage/reading permission, when a target resource needs to be used or called, the position of the target resource, such as a file storage position, an album, an address book and the like on the user terminal, may be acquired through the resource storage/reading permission.
Step S102, when the target resource position is located in the user terminal, generating a target resource acquisition query, and sending the target resource acquisition query to the user terminal.
In the embodiment of the invention, after the target resource acquisition inquiry is sent to the user terminal, when the target resource acquisition inquiry is displayed on a UI (user interface), two selectable items of target resource acquisition confirmation and target resource acquisition refusal can be set to be synchronously displayed so that a user can select whether to allow the cloud mobile phone to acquire the target resource acquisition permission or not; the cloud mobile phone application responds to a target resource acquisition confirmation instruction from the user terminal to obtain a target resource acquisition permission. In the embodiment of the present invention, when the user terminal displays the target resource acquisition query, the user terminal may also explicitly prompt the user about the position of the target resource, for example: the target resource acquisition inquiry telephone technology can be 'request for calling album data', 'request for accessing an address book' and the like. The user can select the target resource acquisition confirmation or the target resource acquisition rejection by himself. If the user selects the target resource acquisition confirmation aiming at the target resource acquisition inquiry, the user selection is used as a target resource acquisition confirmation instruction, and the cloud mobile phone responds to the target resource acquisition confirmation instruction from the user to continue the target resource calling process; if the user selects the target resource acquisition refusal aiming at the target resource acquisition inquiry, the user selection is used as a target resource acquisition refusal instruction, and the cloud mobile phone responds to the target resource acquisition refusal instruction from the user and cannot call the target resource.
Step S103, responding to a target resource obtaining confirmation instruction fed back by the user terminal, generating a target resource encryption request, and sending the target resource encryption request to the user terminal, wherein the target resource encryption request carries a target resource position.
In the embodiment of the invention, after the cloud mobile phone receives the target resource acquisition confirmation instruction fed back from the user terminal, the target resource encryption request can be generated according to the target resource acquisition confirmation instruction.
Optionally, the cloud mobile phone application generates a target resource encryption request according to the target resource acquisition confirmation instruction, may generate the target resource request first, where the target resource request is an MQ sequence including a private protocol, and performs base64 and AES encryption on the MQ sequence in the target resource request by using a cloud mobile phone Server, for example, a VMI Server, to obtain the target resource encryption request.
In the embodiment of the present invention, when the cloud mobile phone is applied to perform a target resource request, the target resource request may be generated in the form of an MQ event, where the target resource request is a string of character sequences of a private protocol, for example: 01234aegbgtsb, the first 5 bits are used as message head, then message body, message head defines message length size end information, a character access sequence of message length size end, determines that the message body can be analyzed by the user terminal using the same size end information, the encryption process can be completed by the cloud mobile phone server, reads the byte code of the character sequence, then intercepts the message body and encrypts it with base64 and AES, thus generating a complete target resource encryption request.
Optionally, the target resource encryption request is sent to the user terminal, and the target resource encryption request is sent to the user terminal by using a Socket data connection channel established with the user terminal. When receiving a target resource encryption request from the cloud mobile phone, the user terminal decrypts the target resource encryption request to obtain a target resource request, calls the target resource according to the target resource request, and transmits the target resource back to the cloud mobile phone.
And step S104, receiving the target resource stored in the target resource position from the user terminal, and forwarding the target resource to the cloud mobile phone application.
In the embodiment of the invention, the cloud mobile phone receives the target resource by analyzing the url address corresponding to the target resource, and the target resource is restored into the protocol format which can be used by the equipment and then is provided for the cloud mobile phone application.
After the user terminal returns the target resource to the cloud mobile phone, the cloud mobile phone can receive the resource transmission success prompt, at the moment, the VMI Server of the cloud mobile phone obtains the url address (https path) of the target resource, the target resource is pulled to the cloud mobile phone from the transfer Server returned by the resource, the target resource is received, and then the uri format (for example: file:///sdcad/cloudphone/IMG _ 2021. jpg) of the target resource is obtained in an Android native mode so as to restore the target resource into a protocol format which can be used by equipment and provide the protocol format for the cloud mobile phone application.
Based on the same inventive concept, an embodiment of the present invention further provides a resource request method, which is applied to a user terminal, and as shown in fig. 2, the method at least includes the following steps S201 to S203:
step S201, in response to receiving the target resource acquisition inquiry of the cloud mobile phone, feeding back a target resource acquisition confirmation instruction to the cloud mobile phone.
In the embodiment of the invention, before receiving a target resource acquisition inquiry initiated by a cloud mobile phone application, a user terminal needs to determine whether the cloud mobile phone can store/read resources of the user terminal, that is, a resource storage/reading request initiated by the cloud mobile phone application and sent by the cloud mobile phone is received, and the user terminal performs UI (user interface) display on the cloud mobile phone in response to the resource storage/reading request. When the user terminal displays the UI interface of the resource storage/reading request, two selectable items of preset resource storage/reading confirmation and resource storage/reading refusal are synchronously displayed, so that the user can select whether the cloud mobile phone is allowed to acquire the resource storage/reading permission; and responding to resource storage/reading confirmation or resource storage/reading refund from a user, and sending a resource storage/reading confirmation instruction or a resource storage/reading refund instruction to the cloud mobile phone. The cloud mobile phone application acquires resource storage/reading permission for the user terminal based on a resource storage/reading confirmation instruction sent by the user terminal.
After the cloud mobile phone application acquires the resource storage/reading permission for the user terminal, when the resource data of the user terminal needs to be used, a target resource acquisition inquiry is sent to the user terminal, the user terminal can perform UI interface display on the target resource acquisition inquiry, and two preset options of target resource acquisition confirmation and target resource acquisition refusal can be displayed so that a user can select whether the cloud mobile phone is allowed to acquire the target resource acquisition permission or not; the user terminal responds to the target resource acquisition confirmation selected by the user and sends the target resource acquisition confirmation to the cloud mobile phone, so that the cloud mobile phone application obtains the target resource acquisition permission. The target resource acquisition inquiry is generated based on a resource request initiated by a cloud mobile phone application, and the resource request is used for requesting to acquire resources in the user terminal.
Step S202, in response to receiving the target resource encryption request sent by the cloud mobile phone, performing decryption operation on the target resource encryption request to obtain a target resource position.
In the embodiment of the invention, the user terminal and the cloud mobile phone can send the target resource encryption request to the user terminal by establishing a Socket data connection channel. The target resource encryption request is generated by the cloud mobile phone based on the target resource acquisition confirmation instruction and is used for requesting to acquire the target resource stored in the target resource position of the user terminal, and the target resource encryption request carries the target resource position. After receiving a target resource encryption request from a cloud mobile phone, a user terminal needs to decode the target resource encryption request, and the user terminal analyzes an MQ sequence of the target resource encryption request, specifically includes reading a byte code of an MQ event, analyzing a first 5-bit message header, and then performing a reverse decryption process of base64 and AES, so as to finally obtain a decrypted target resource request and obtain a target resource position carried in the target resource request.
Step S203, the target resource is called based on the target resource position, and the target resource is transmitted back to the cloud mobile phone, so that the cloud mobile phone forwards the target resource to the cloud mobile phone application.
Optionally, the user terminal calls the target resource based on the target resource position, and can open a resource selection page corresponding to the target resource position and perform UI interface display on the resource selection page; and calling the target resource in response to the target resource selection instruction fed back by the user.
The user terminal is provided with an SDK API interface and can be used for opening a corresponding resource selector according to the position of a target resource and displaying a target resource selection page. For example, if the target resource location is an Album, the user terminal opens an Album selector (Photo Album component) and displays a UI interface on an Album resource selection page after receiving the target resource request, so that the user can select the target resource through UI interaction. After selecting the target resource, the user can click and upload to complete the resource calling operation, and at the moment, the terminal page can display the prompt for the success of the resource transmission.
Optionally, the user terminal transmits the target resource back to the cloud mobile phone, and the target resource can be sent to the cloud mobile phone by establishing an https network connection channel with the cloud mobile phone and using the https network connection channel. The cloud mobile phone and the user terminal are respectively connected with the transfer server, and the transfer server completes service interactive communication.
In the embodiment of the invention, when the user uses the data resources in the cloud mobile phone, the data resources can only be transmitted to the cloud mobile phone application, but the data resources in the cloud mobile phone cannot be transmitted to the user terminal, so that the interaction capacity between the user and the terminal is ensured while the data resources are prevented from falling to the ground, and the privacy information protection for the user is further improved.
Based on the same inventive concept, an embodiment of the present invention further provides a resource request method, which is applied to a cloud mobile phone and a user terminal, and as shown in fig. 3, the method at least includes the following steps S301 to S307:
step S301, the cloud mobile phone responds to a resource request initiated by the cloud mobile phone application, and determines a target resource position corresponding to the resource request.
The resource request method in the embodiment of the invention refers to that an application program or APP of a cloud mobile phone calls a user terminal, namely data resources on a real phone. When the cloud mobile phone APP needs to make data resources, the resource storage and reading permission for the user terminal generally needs to be obtained first.
Optionally, before the cloud mobile phone application initiates the resource request, a resource storage/reading request for the user terminal may be generated first, and the resource storage/reading request is sent to the user terminal, and the user terminal performs UI interface display on the resource storage/reading request.
In the embodiment of the invention, when the user terminal displays the resource storage/reading request on the UI interface, two selectable items of resource storage/reading confirmation and resource storage/reading rejection can be preset for synchronous display, so that the user can select whether the cloud mobile phone is allowed to acquire the resource storage/reading permission; the cloud mobile phone application responds to a resource storage/reading confirmation instruction from the user terminal to obtain resource storage/reading permission.
In the embodiment of the invention, the cloud mobile phone application can initiate a resource storage/reading request when the cloud mobile phone application is used for the first time, and the data resources needing to be stored/read can comprise files, photo albums, address books, positioning and the like. If a single cloud mobile phone application needs to acquire resource storage/reading permissions of multiple data resources, resource storage/reading requests can be initiated for multiple times. If a user selects resource storage/reading confirmation aiming at a resource storage/reading request of a certain cloud mobile phone application aiming at a certain type of data resources, the user selection is used as a resource storage/reading confirmation instruction, and the cloud mobile phone application responds to the resource storage/reading confirmation instruction from the user to acquire resource storage/reading permission aiming at the type of data resources; if a user selects resource storage/reading rejection aiming at a resource storage/reading request of a certain cloud mobile phone application aiming at a certain type of data resources, the user selection is used as a resource storage/reading rejection instruction, and the cloud mobile phone application cannot store or read the data resources in response to the resource storage/reading rejection instruction from the user.
After the cloud mobile phone application acquires the resource storage/reading permission, when a target resource needs to be used or called, the position of the target resource, such as a file storage position, an album, an address book and the like on the user terminal, may be acquired through the resource storage/reading permission.
Step S302, when the target resource position is located at the user terminal, the cloud mobile phone generates a target resource acquisition query and sends the target resource acquisition query to the user terminal.
In the embodiment of the invention, after the target resource acquisition inquiry is sent to the user terminal, when the target resource acquisition inquiry is displayed on a UI (user interface), two selectable items of target resource acquisition confirmation and target resource acquisition refusal can be set to be synchronously displayed so that a user can select whether to allow the cloud mobile phone to acquire the target resource acquisition permission or not; the cloud mobile phone application responds to a target resource acquisition confirmation instruction from the user terminal to obtain a target resource acquisition permission. In the embodiment of the present invention, when the user terminal displays the target resource acquisition query, the user terminal may also explicitly prompt the user about the position of the target resource, for example: the target resource acquisition inquiry telephone technology can be 'request for calling album data', 'request for accessing an address book' and the like. The user can select the target resource acquisition confirmation or the target resource acquisition rejection by himself. If the user selects the target resource acquisition confirmation aiming at the target resource acquisition inquiry, the user selection is used as a target resource acquisition confirmation instruction, and the cloud mobile phone responds to the target resource acquisition confirmation instruction from the user to continue the target resource calling process; if the user selects the target resource acquisition refusal aiming at the target resource acquisition inquiry, the user selection is used as a target resource acquisition refusal instruction, and the cloud mobile phone responds to the target resource acquisition refusal instruction from the user and cannot call the target resource.
Step S303, the user terminal feeds back a target resource acquisition confirmation instruction to the cloud mobile phone in response to receiving the target resource acquisition inquiry of the cloud mobile phone.
In the embodiment of the invention, before receiving a target resource acquisition inquiry initiated by a cloud mobile phone application, a user terminal needs to determine whether the cloud mobile phone can store/read resources of the user terminal, that is, a resource storage/reading request initiated by the cloud mobile phone application and sent by the cloud mobile phone is received, and the user terminal performs UI (user interface) display on the cloud mobile phone in response to the resource storage/reading request. When the user terminal displays the UI interface of the resource storage/reading request, two selectable items of preset resource storage/reading confirmation and resource storage/reading refusal are synchronously displayed, so that the user can select whether the cloud mobile phone is allowed to acquire the resource storage/reading permission; and responding to resource storage/reading confirmation or resource storage/reading refund from a user, and sending a resource storage/reading confirmation instruction or a resource storage/reading refund instruction to the cloud mobile phone. The cloud mobile phone application acquires resource storage/reading permission for the user terminal based on a resource storage/reading confirmation instruction sent by the user terminal.
After the cloud mobile phone application acquires the resource storage/reading permission for the user terminal, when the resource data of the user terminal needs to be used, a target resource acquisition inquiry is sent to the user terminal, the user terminal can perform UI interface display on the target resource acquisition inquiry, and two preset options of target resource acquisition confirmation and target resource acquisition refusal can be displayed so that a user can select whether the cloud mobile phone is allowed to acquire the target resource acquisition permission or not; the user terminal responds to the target resource acquisition confirmation selected by the user and sends the target resource acquisition confirmation to the cloud mobile phone, so that the cloud mobile phone application obtains the target resource acquisition permission. The target resource acquisition inquiry is generated based on a resource request initiated by a cloud mobile phone application, and the resource request is used for requesting to acquire resources in the user terminal.
Step S304, the cloud mobile phone responds to a target resource obtaining confirmation instruction fed back by the user terminal, generates a target resource encryption request, and sends the target resource encryption request to the user terminal, wherein the target resource encryption request carries a target resource position.
In the embodiment of the invention, after the cloud mobile phone receives the target resource acquisition confirmation instruction fed back from the user terminal, the target resource encryption request can be generated according to the target resource acquisition confirmation instruction.
Optionally, the cloud mobile phone application generates a target resource encryption request according to the target resource acquisition confirmation instruction, may generate the target resource request first, where the target resource request is an MQ sequence including a private protocol, and performs base64 and AES encryption on the MQ sequence in the target resource request by using a cloud mobile phone Server, for example, a VMI Server, to obtain the target resource encryption request.
In the embodiment of the present invention, when the cloud mobile phone is applied to perform a target resource request, the target resource request may be generated in the form of an MQ event, where the target resource request is a string of character sequences of a private protocol, for example: 01234aegbgtsb, the first 5 bits are used as message head, then message body, message head defines message length size end information, a character access sequence of message length size end, determines that the message body can be analyzed by the user terminal using the same size end information, the encryption process can be completed by the cloud mobile phone server, reads the byte code of the character sequence, then intercepts the message body and encrypts it with base64 and AES, thus generating a complete target resource encryption request.
Optionally, the target resource encryption request is sent to the user terminal, and the target resource encryption request is sent to the user terminal by using a Socket data connection channel established with the user terminal. When receiving a target resource encryption request from the cloud mobile phone, the user terminal decrypts the target resource encryption request to obtain a target resource request, calls the target resource according to the target resource request, and transmits the target resource back to the cloud mobile phone.
Step S305, the user terminal responds to the received target resource encryption request sent by the cloud mobile phone, and carries out decryption operation on the target resource encryption request to obtain the position of the target resource.
In the embodiment of the invention, the user terminal and the cloud mobile phone can send the target resource encryption request to the user terminal by establishing a Socket data connection channel. The target resource encryption request is generated by the cloud mobile phone based on the target resource acquisition confirmation instruction and is used for requesting to acquire the target resource stored in the target resource position of the user terminal, and the target resource encryption request carries the target resource position. After receiving a target resource encryption request from a cloud mobile phone, a user terminal needs to decode the target resource encryption request, and the user terminal analyzes an MQ sequence of the target resource encryption request, specifically includes reading a byte code of an MQ event, analyzing a first 5-bit message header, and then performing a reverse decryption process of base64 and AES, so as to finally obtain a decrypted target resource request and obtain a target resource position carried in the target resource request.
Step S306, the user terminal calls the target resource based on the target resource position and transmits the target resource back to the cloud mobile phone, so that the cloud mobile phone forwards the target resource to the cloud mobile phone application.
Optionally, the user terminal calls the target resource based on the target resource position, and can open a resource selection page corresponding to the target resource position and perform UI interface display on the resource selection page; and calling the target resource in response to the target resource selection instruction fed back by the user.
The user terminal is provided with an SDK API interface and can be used for opening a corresponding resource selector according to the position of a target resource and displaying a target resource selection page. For example, if the target resource location is an Album, the user terminal opens an Album selector (Photo Album component) and displays a UI interface on an Album resource selection page after receiving the target resource request, so that the user can select the target resource through UI interaction. After selecting the target resource, the user can click and upload to complete the resource calling operation, and at the moment, the terminal page can display the prompt for the success of the resource transmission.
Optionally, the user terminal transmits the target resource back to the cloud mobile phone, and the target resource can be sent to the cloud mobile phone by establishing an https network connection channel with the cloud mobile phone and using the https network connection channel. The cloud mobile phone and the user terminal are respectively connected with the transfer server, and the transfer server completes service interactive communication.
Step S307, the cloud mobile phone receives the target resource stored in the target resource location from the user terminal, and forwards the target resource to the cloud mobile phone application.
In the embodiment of the invention, the cloud mobile phone receives the target resource by analyzing the url address corresponding to the target resource, and the target resource is restored into the protocol format which can be used by the equipment and then is provided for the cloud mobile phone application.
After the user terminal returns the target resource to the cloud mobile phone, the cloud mobile phone can receive the resource transmission success prompt, at the moment, the VMI Server of the cloud mobile phone obtains the url address (https path) of the target resource, the target resource is pulled to the cloud mobile phone from the transfer Server returned by the resource, the target resource is received, and then the uri format (for example: file:///sdcad/cloudphone/IMG _ 2021. jpg) of the target resource is obtained in an Android native mode so as to restore the target resource into a protocol format which can be used by equipment and provide the protocol format for the cloud mobile phone application.
The resource request method provided by the embodiment of the invention comprises the steps of initiating a resource request through a cloud mobile phone application, acquiring a target resource position corresponding to the resource request, generating a target resource acquisition inquiry according to the target resource position, sending the target resource acquisition inquiry to a user terminal, generating a target resource encryption request in response to a target resource acquisition confirmation instruction, sending the target resource encryption request to the user terminal, receiving the target resource encryption request from the cloud mobile phone by the user terminal, carrying out decryption operation on the target resource encryption request to obtain a target resource request, calling the target resource according to the target resource request, and transmitting the target resource back to the cloud mobile phone. According to the resource request method provided by the invention, when the cloud mobile phone application calls the data resources in the user terminal (real machine), the user needs to actively select the data resources, the data resources are encrypted and transmitted to the cloud mobile phone and then used by the cloud mobile phone application, the real machine resources are isolated from the cloud mobile phone application, and meanwhile, the user experience of the real machine is given. The problem that a large amount of data of a user is read by a malicious program is effectively solved, and passive divulgence caused by the fact that the data is transmitted to the Internet or is maliciously used is also effectively avoided.
Further, as a specific implementation of fig. 3, an embodiment of the present invention provides a resource request system, as shown in fig. 4, the system may include a cloud mobile phone 410 and a user terminal 420; the cloud phone 410 includes: a resource request initiating module 411, a calling authority obtaining module 412, a resource request encrypting module 413 and a target resource obtaining module 414; the user terminal 420 includes: a resource request validation module 421, a resource request decryption module 422, and a target resource backhaul module 423.
The resource request initiating module 411 may be configured to determine, in response to a resource request initiated by a cloud mobile application, a target resource location corresponding to the resource request.
The invoking permission obtaining module 412 may be configured to generate a target resource obtaining query when the target resource location is located in the user terminal, and send the target resource obtaining query to the user terminal.
The resource request encrypting module 413 may be configured to generate a target resource encryption request in response to a target resource obtaining confirmation instruction fed back by the user terminal, and send the target resource encryption request to the user terminal, where the target resource encryption request carries a target resource position.
The target resource obtaining module 414 may be configured to receive a target resource stored in a target resource location from a user terminal, and forward the target resource to the cloud mobile phone application.
The resource request confirmation module 421 may be configured to feed back a target resource acquisition confirmation instruction to the cloud mobile phone in response to receiving a target resource acquisition inquiry of the cloud mobile phone, where the target resource acquisition inquiry is generated based on a resource request initiated by a cloud mobile phone application, and the resource request is used to request to acquire a resource in the user terminal.
The resource request decryption module 422 may be configured to, in response to receiving a target resource encryption request sent by the cloud mobile phone, perform decryption operation on the target resource encryption request to obtain a target resource location, where the target resource encryption request is generated based on a target resource acquisition confirmation instruction, and the target resource encryption request is used to request to acquire a target resource stored in the target resource location of the user terminal, where the target resource encryption request carries the target resource location.
The target resource returning module 423 may be configured to call the target resource based on the target resource position, and return the target resource to the cloud mobile phone, so that the cloud mobile phone forwards the target resource to the cloud mobile phone application.
Further, in a specific application scenario, according to the resource request system provided by the embodiment of the present invention, as shown in fig. 5, the cloud phone 410 may further include: a read right acquisition module 415.
The reading permission obtaining module 415 may be configured to generate a resource storage/reading request for the user terminal by the cloud mobile phone application, and send the resource storage/reading request to the user terminal, where the user terminal performs UI interface display on the resource storage/reading request; and the cloud mobile phone application responds to the resource storage/reading confirmation instruction fed back by the user terminal to obtain the resource storage/reading permission.
The resource request encryption module 413 may be further configured to generate a target resource request in response to a target resource obtaining instruction fed back by the user terminal; the target resource request is an MQ sequence containing a private protocol; and carrying out base64 and AES encryption on the MQ sequence to obtain the target resource encryption request.
The target resource obtaining module 414 may be further configured to establish a Socket data connection channel with the user terminal, and send the target resource encryption request to the user terminal by using the Socket data connection channel; receiving the target resource by analyzing the url address corresponding to the target resource; and restoring the target resource into a protocol format which can be used by the equipment and then providing the protocol format for the cloud mobile phone application.
The resource request decryption module 422 may be further configured to parse the MQ sequence of the target resource encryption request, and perform base64 and AES reverse decryption on the MQ sequence.
The target resource returning module 423 may also be configured to open a resource selection page corresponding to the target resource position, and perform UI interface display on the resource selection page; calling a target resource in response to a target resource selection instruction fed back by a user; and establishing an https network connection channel with the cloud mobile phone, and sending the target resource to the cloud mobile phone by using the https network connection channel.
It should be noted that other corresponding descriptions of the functional modules related to the resource request system provided in the embodiment of the present invention may refer to the corresponding descriptions of the methods shown in fig. 1 to 3, and are not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a cloud mobile phone, as shown in fig. 6, where the cloud mobile phone may include: a server, which can process data, wherein each module can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor calls and executes operations corresponding to the modules. Including a processor, memory, network interface, and database connected by a system bus. The central processor of the server is the operation and control core of the computer system and is used for providing calculation and control capacity. The memory of the server includes a system memory and a mass storage device. The system memory comprises a read-only memory and a random access memory; the mass storage device includes an operating system, application programs, and a database. The system memory provides an environment for the operating system and computer programs in the mass storage device to run. The database of the device is used for storing data used in the data processing process. The network interface unit of the server is used for communicating with an external terminal through network connection. The computer program is executed by a processor to implement the steps of a resource request method applied to a cloud mobile phone as described in any one of the above embodiments.
Based on the method shown in fig. 2, correspondingly, an embodiment of the present invention further provides a terminal device, including: a processor, and a memory coupled to the processor; the memory is used for storing a computer program; the processor is configured to call and execute the computer program in the memory to perform the steps of a resource request method applied to the user terminal according to any of the embodiments described above.
It is clear to those skilled in the art that the specific working processes of the above-described systems, devices, modules and units may refer to the corresponding processes in the foregoing method embodiments, and for the sake of brevity, further description is omitted here.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand that: the integrated functional units, if implemented in software 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 invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.