Resource transmission method, terminal and storage medium
By introducing a signature verification mechanism during resource transmission, we ensure that the resource receiving equipment can only receive the target resources after the authentication is passed, which solves the resource leakage and equipment security problems in the existing technology, and improves the security and protection of resource transmission.
Patent Information
- Application Number
- CN202111572646.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2041-12-21
AI Technical Summary
Existing resource transmission solutions are prone to resource leakage and equipment security problems, and cannot effectively protect the copyright and security of resources.
By introducing a signature verification mechanism during resource transmission, the public key of the resource sending device and the private key signature certificate of the server are used to ensure that the resource receiving device can only receive the target resource after the authentication is passed.
It effectively avoids resource leakage and equipment security risks, improves the security and protection of resource transmission, and ensures that resource receiving equipment receives safe and reliable target resources.
Smart Images

Figure CN114244533B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a resource transmission method, a terminal and a storage medium. Background Art
[0002] With the development of Internet technology and the increasing richness of application functions, solutions for transmitting resources (such as files, audio, video, etc.) between different devices have emerged to meet people's needs for sharing resources.
[0003] Currently, the implementation schemes for transferring files between different devices are as follows: after a communication link is established between a resource sending device and a resource receiving device, the resource sending device initiates a resource transfer request, and the resource receiving device directly or indirectly responds to the resource transfer request to obtain the resources transferred by the resource sending device.
[0004] However, the above resource transmission scheme is prone to cause resource leakage and device security issues. Summary of the invention
[0005] In order to solve the technical problems of resource leakage and equipment safety risks caused by the above-mentioned resource transmission process, the present invention provides a resource transmission method, a terminal and a storage medium.
[0006] In a first aspect, the present invention provides a resource transmission method, comprising:
[0007] In response to the detected resource transmission trigger operation, a target signature certificate is obtained; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of the resource sending device and a second private key of the server;
[0008] Sending the target signature certificate to a resource receiving device, so that the resource receiving device uses the second public key of the server to perform signature verification on the target signature certificate when the second public key of the server exists;
[0009] If the first verification result of the signature verification performed by the resource receiving device is verification passed, the target resource is transmitted to the resource receiving device.
[0010] In a second aspect, the present invention provides a terminal, comprising:
[0011] The processor and the memory are used to store executable instructions, and the executable instructions enable the processor to perform the following operations:
[0012] In response to the detected resource transmission trigger operation, a target signature certificate is obtained; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of the resource sending device and a second private key of the server;
[0013] Sending the target signature certificate to a resource receiving device, so that the resource receiving device uses the second public key of the server to perform signature verification on the target signature certificate when the second public key of the server exists;
[0014] If the first verification result of the signature verification performed by the resource receiving device is verification passed, the target resource is transmitted to the resource receiving device.
[0015] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the resource transmission method described in the first aspect.
[0016] The resource transmission method, terminal and storage medium of the embodiment of the present invention can obtain a target signature certificate in response to a detected resource transmission trigger operation; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of a resource sending device and a second private key of a server; the target signature certificate is sent to a resource receiving device, so that the resource receiving device uses the second public key of the server to perform signature verification on the target signature certificate when the second public key of the server exists; if the first verification result of the signature verification performed by the resource receiving device is verification passed, the target resource is transmitted to the resource receiving device; it is achieved that the target resource can only be transmitted after the resource receiving device is authenticated, thereby avoiding the target resource from being transmitted to a device that is not qualified to receive the resource, which not only solves the problem of resource leakage and improves the protection of resources, but also solves the security risks caused by counterfeit resources to the resource receiving device, thereby improving the security of resource transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0018] Figure 1 A system architecture diagram of a resource transmission system provided by an embodiment of the present invention;
[0019] Figure 2 A system architecture diagram of another resource transmission system provided by an embodiment of the present invention;
[0020] Figure 3 A flow chart of a resource transmission method provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0023] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0025] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0028] At present, there are two main types of solutions for realizing resource transmission between different devices. One is a three-end transmission solution with the help of a server. In this type of solution, the resource sending device sends the resource to be sent (i.e., the target resource) to the server, and then the server forwards the target resource to the resource receiving device. The other is a two-end transmission solution without the help of a server. In this type of solution, after a certain communication connection is directly established between the resource sending device and the resource receiving device, the resource sending device directly sends the target resource to the resource receiving device.
[0029] However, the above two types of resource transmission schemes are to establish a communication link between the resource sending device and the resource receiving device, and then transmit the target resource from the resource sending device to the resource receiving device. This has at least two problems: first, the target resource is unconditionally transmitted between different devices, which is easy to cause resource leakage, which is not conducive to the copyright protection and security of the resource; second, when the target resource is a resource counterfeited by an illegal person, the resource receiving device directly receives the target resource, which is easy to cause the resource receiving device to be attacked, leading to security problems.
[0030] Based on the above situation, an embodiment of the present invention provides a resource transmission method, a terminal and a storage medium to implement an authentication process during the resource transmission process to ensure that the target resources are transmitted to a resource receiving device that is qualified to receive the resources, thereby avoiding resource leakage problems, and ensuring that the resource receiving device receives safe and reliable target resources, thereby avoiding the problem of the resource receiving device being subjected to malicious attacks due to the insecurity of the received resources.
[0031] The resource transmission method provided in the embodiment of the present invention is mainly applicable to the scenario of transmitting resources between different devices, and is particularly applicable to the scenario of transmitting resources between different devices using the same application. For example, when two devices are both installed with the same reading application, book resources can be transmitted between the two devices to achieve book sharing.
[0032] Based on the different network communication modes between the resource sending device and the resource receiving device, the resource transmission method provided in the embodiment of the present invention can be applied to two resource transmission systems, see Figure 1 and Figure 2 The relevant terms and steps in these two resource transmission systems will be described in detail in the subsequent embodiments.
[0033] Figure 1 FIG. 1 shows a system architecture diagram of a resource transmission system provided by an embodiment of the present invention. Figure 1 As shown, the resource transmission system 100 includes a resource sending device 110 and a resource receiving device 120. In this implementation, the resource sending device 110 and the resource sending device 120 directly establish a communication connection through their MAC addresses in a wireless transmission method such as a local area network, Bluetooth, or Zigbee, or the resource sending device 110 and the resource sending device 120 directly establish a communication connection through a wired connection method such as USB.
[0034] The resource sending device 110 may be implemented as a terminal device, for example, a terminal device with a reading application installed. The resource sending device 110 may include, but is not limited to, mobile terminals such as smart phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc.
[0035] During the resource transmission process, the resource sending device 110 is at least used to send the target signature certificate required for authentication to the resource receiving device 120, and after receiving the connection success information fed back by the resource receiving device 120, establish a transmission channel between the resource receiving device 120 for transmitting resources, and send the target resources to the resource receiving device 120 through the transmission channel.
[0036] The resource receiving device 120 may be implemented as a terminal device, for example, a terminal device installed with the same reading application as the resource sending device 110. The resource receiving device 120 may include, but is not limited to, mobile terminals such as smart phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc.
[0037] During the resource transmission process, the resource receiving device 120 is at least used to receive the target signature certificate sent by the resource sending device 110, and when querying that it has the second private key of the server required for authentication, it verifies the signature of the target signature certificate, and when the result of the signature verification (i.e., the first verification result) is that the verification is passed, it sends a connection success message to the resource sending device 110, and receives the target resource through the transmission channel.
[0038] Figure 2 FIG. 2 shows a system architecture diagram of another resource transmission system provided by an embodiment of the present invention. Figure 2 As shown, the resource transmission system 200 includes a resource sending device 210, a server 220 and a resource receiving device 230. In this implementation, at least one of the resource sending device 210 and the resource receiving device 230 is a mobile network communication mode, which makes it impossible to directly establish a communication connection between the resource sending device 210 and the resource receiving device 230. Therefore, the resource sending device 210 is connected to the server 220 for communication, and the server 220 is connected to the resource receiving device 230 for communication, so as to realize an indirect communication connection between the resource sending device 210 and the resource receiving device 230.
[0039] During the resource transmission process, the resource sending device 210 is at least used to send the target resource and the target signature certificate to the server 220 .
[0040] The server 220 may be implemented as a single server or as a server cluster.
[0041] During the resource transmission process, the server 220 is at least used to receive the target resource and target signature certificate sent by the resource sending device 210, and send the target signature certificate to the resource receiving device 230, and after receiving the first verification result feedback from the resource receiving device 230 that the verification is passed, send the target resource to the resource receiving device 120.
[0042] During the resource transmission process, the resource receiving device 120 is at least used to receive the target signature certificate sent by the server 220, and when querying that it has the second private key of the server 220 required for authentication, it verifies the signature of the target signature certificate, and when the first verification result is passed, sends the information that the first verification result is passed to the server 220, and receives the target resource sent by the server 220.
[0043] Figure 3 A flow chart of a resource transmission method provided by an embodiment of the present invention is shown. The resource transmission method can be executed by a resource sending device. Figure 3 , the resource transmission method specifically includes:
[0044] S310: In response to a detected resource transfer triggering operation, obtain a target signing certificate.
[0045] The resource transfer trigger operation refers to an operation that triggers the resource transfer function to start the process of transferring resources. For example, the resource transfer trigger operation can be an operation that triggers resource-related controls set in an application. The target signing certificate is a certificate used for authentication during the resource transfer process, which is a certificate obtained after some signature processing.
[0046] Exemplarily, the target signature certificate is obtained by signing the initial certificate using the first public key of the resource sending device and the second private key of the server. The initial certificate refers to an original certificate that has not been signed in any way, which can be generated by the resource sending device, or read by the resource sending device from its corresponding storage medium, or pulled by the resource sending device from the network. In an embodiment of the present invention, a paired public key (i.e., the first public key) and a private key (i.e., the first private key) are pre-generated in the resource sending device. A paired public key (i.e., the second public key) and a private key (i.e., the second private key) are also pre-generated in the server. Then, the initial certificate can be signed using the keys of the resource sending device and the server, respectively, to obtain a target signature certificate. Such a target signature certificate can verify that it is a certificate issued by the resource sending device, and can also verify that it is a security certificate authenticated by the server, thereby increasing the authentication reliability during resource transmission.
[0047] Specifically, when the user wants to share the target resource, he will perform a resource transfer trigger operation on the resource sending device. Taking resource transfer through a reading application as an example, the user can trigger the relevant controls for sharing books set in the bookshelf page of the reading application, and the user can also trigger the relevant controls for sharing books set in the surrounding area of the book reading page while reading the book. In this way, the resource sending device can detect the resource transfer trigger operation performed by the user. Then, the resource sending device starts the resource transfer process, that is, obtains the pre-stored target signature certificate from the local storage space.
[0048] In some embodiments, before S310, the resource sending device pre-obtains the target signing certificate in the following manner: using the first public key to sign the initial certificate to generate a first intermediate signing certificate; sending the first intermediate signing certificate to the server, so that the server uses the second private key to sign the intermediate signing certificate to obtain a second intermediate signing certificate; receiving the second intermediate signing certificate fed back by the server; using the first private key corresponding to the first public key to verify the signature of the second intermediate signing certificate to obtain a second verification result; if the second verification result is verification passed, storing the second intermediate signing certificate as the target signing certificate.
[0049] Specifically, see Figure 1, the resource sending device 110 first signs the initial certificate using the first public key it generates, and obtains the signed initial certificate, namely the first intermediate signature certificate. Then, the resource sending device 110 sends the first intermediate signature certificate to the server 130. After receiving the first intermediate signature certificate, the server 130 uses the second private key of the server 130 to sign the first intermediate signature certificate again, and obtains the signed first intermediate signature certificate, namely the second intermediate signature certificate. At this time, the second intermediate signature certificate is a signature certificate jointly signed by the first public key and the second private key. Afterwards, the server 130 returns the second intermediate signature certificate to the resource sending device 110.
[0050] After the resource sending device 110 receives the second intermediate signature certificate, it needs to first verify whether the second intermediate signature certificate is the certificate issued by it, that is, to verify whether the first public key exists in the second intermediate signature certificate to ensure the correctness of the certificate, thereby improving the authentication reliability in the subsequent resource transmission process. Therefore, the resource sending device 110 uses its first private key to verify the signature of the second intermediate signature certificate to obtain a second verification result. If the second verification result is a verification failure, it means that the first public key does not exist in the second intermediate signature certificate, then the resource sending device 110 rejects the second intermediate signature certificate and regenerates the first intermediate signature certificate to repeat the above process. If the second verification result is a verification success, it means that the first public key exists in the second intermediate signature certificate, then the resource sending device 110 uses the second intermediate signature certificate as the target signature certificate and stores it in the local storage space.
[0051] It should be noted that for Figure 2 The resource transmission system 200 shown in the figure also performs the process of obtaining the target signature certificate, that is, the resource sending device 210 and the server 220 in the resource transmission system 200 also perform the process of generating and storing the target signature certificate before S310.
[0052] S320: Send the target signature certificate to the resource receiving device, so that the resource receiving device uses the second public key of the server to verify the signature of the target signature certificate when the second public key of the server exists.
[0053] Specifically, in order to ensure the security of the target resource and the fairness of various users in obtaining the target resource, in the embodiment of the present invention, the second public key of the server is pre-issued by the server to the resource receiving device with resource receiving qualifications. In this way, the resource receiving device with resource receiving qualifications stores the second public key, so that the signature of the target signature certificate can be verified during the resource transmission process, the resource transmission authentication process is completed, and the target resource is obtained.
[0054] In specific implementation, the resource sending device sends the obtained target signature certificate to the resource receiving device. After the resource receiving device receives the target signature certificate, it needs to first query whether the second public key is stored locally. If the query result is that it does not exist, then the resource receiving device does not have the resource receiving qualification, and the resource sending device will not be able to send the target resource to the resource receiving device. If the query result is that the second public key exists, then the resource receiving device further uses the second public key to perform signature verification on the target signature certificate to verify whether the second private key of the server exists therein, and obtain the first verification result.
[0055] In some embodiments, when a communication connection is directly established between the resource sending device and the resource receiving device, that is, for Figure 1 In the resource transmission system 100 shown, the process of the resource sending device sending the target signature certificate to the resource receiving device is as follows: the resource sending device 110 directly sends the target signature certificate to the resource receiving device 120 through the communication connection channel directly established between the resource sending device 110 and the resource receiving device 120.
[0056] In other embodiments, when a communication connection is indirectly established between the resource sending device and the resource receiving device through the server, that is, for Figure 2 In the resource transmission system 200 shown, the process of the resource sending device sending the target signature certificate to the resource receiving device is as follows: the resource sending device 210 sends the target signature certificate and the target resource to the server 220, so that the server 220 sends the target signature certificate to the resource receiving device 230. That is, the resource sending device 210 first sends the target signature certificate and the target resource to the server 220, and the server 220 then forwards the target signature certificate to the resource receiving device 230.
[0057] In the above process, the resource sending device 210 can send the target signature certificate and the target resource to the server 220 at the same time to reduce the number of communications and improve the resource transmission efficiency. The resource sending device 210 can also first send the target signature certificate to the server 220, and when the server 220 feeds back the first verification result of the resource receiving device 230 as verification passed, the target resource is then sent to the server 220, and then the server 220 forwards the target resource to the resource receiving device 230. In this way, the amount of communication data between the resource receiving device and the server can be reduced when the verification fails, and the security of the target resource can be further ensured.
[0058] In some embodiments, before the server sends the second public key to each resource receiving device, it first selects resource receiving devices that are qualified to receive resources from each resource receiving device according to a certain screening strategy. The screening strategy is that the account information corresponding to the resource receiving device meets the preset conditions. The above account information refers to the relevant information of the login account of the application related to resource transmission, for example, it can be an account identifier that represents the uniqueness of the account, account permissions that represent the user's usage rights (such as paid permissions and free permissions, advanced permissions and low-level permissions), etc. The above preset conditions are pre-set judgment conditions corresponding to the account information.
[0059] Specifically, the server determines whether the preset conditions are met based on the account information corresponding to each resource receiving device. If the judgment result is satisfied, it means that the corresponding resource receiving device is qualified to receive resources, and the server sends the second public key to it. Accordingly, the second public key exists in the resource receiving device. If the judgment result is not satisfied, it means that the corresponding resource receiving device is not qualified to receive resources, and the server does not send the second public key to it; accordingly, the second public key does not exist in the resource receiving device.
[0060] In one example, when the account information includes an account identifier, the account information satisfies a preset condition including that the account identifier corresponding to the resource sending device and the account identifier corresponding to the resource receiving device are the same.
[0061] Specifically, when the account information is an account identifier, the preset condition is that the account identifiers of the resource sending device and the resource receiving device are the same. That is, the server obtains the account identifier of the resource sending device and the account identifier of each resource receiving device. When it is determined that the account identifier of a resource receiving device is the same as the account identifier of the resource sending device, the second public key is issued to the resource receiving device.
[0062] This example corresponds to the case where the same user logs in to the same application using different devices. Then, after the above process, the user can synchronize resources between different devices.
[0063] Exemplarily, when the account identifier corresponding to the resource sending device and the account identifier corresponding to the resource receiving device are the same, the target resource is a book resource that has been removed from the shelves.
[0064] Specifically, for reading applications, when the same user logs in using a resource sending device and a resource receiving device, and some book resources stored in the resource sending device have been removed from the bookstore, making it impossible for the user to download these book resources in the resource receiving device, through the authentication and transmission processing process of issuing the second public key, sending and verifying the signature of the target signature certificate, and transmitting the target resources, the user can also obtain the removed book resources in the resource receiving device, thereby ensuring the user's reading rights and interests, improving the user's reading experience, and thus improving the user retention rate of reading applications.
[0065] In another example, when the account information includes account authority, the account information satisfies the preset condition including that the account authority corresponding to the resource receiving device reaches a preset authority level.
[0066] The preset permission level is a level of permissions that is pre-set and equivalent to the resource acquisition type. For example, in a reading application, when the target resource is a free acquisition type resource, the preset permission level may be a free permission level; when the target resource is a paid acquisition type resource, the preset permission level may be a paid permission level or a premium permission level.
[0067] Specifically, in the case where the account information is account authority, the preset condition is that the account authority corresponding to the resource receiving device reaches the preset authority level. That is, the server obtains the resource acquisition type of the target resource, and then determines the user authority level corresponding to the resource acquisition type as the preset authority level. Then, the server obtains the account identification of each resource receiving device. And, it is determined whether the account authority of each resource receiving device is equal to or higher than the preset authority level. When the judgment result is that the account authority of a certain resource receiving device is lower than the preset authority level, it means that the resource receiving device is not qualified to receive the target resource, and the second public key is not issued to it. When the judgment result is that the account authority of a certain resource receiving device is equal to or higher than the preset authority level, it means that the resource receiving device is qualified to receive the target resource, and the second public key is issued to it.
[0068] This example corresponds to the situation where different users use different devices to log in to the same application. Then, after the above authentication transmission process, the target resources can be transmitted between users with corresponding permission levels, avoiding the problem of unfair user access to resources caused by the arbitrary transmission of target resources between users of different permission levels. It can not only protect the copyright of resources, but also improve the user experience, user stickiness and user retention rate.
[0069] S330: If the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, the target resource is transmitted to the resource receiving device.
[0070] Specifically, if the first verification result obtained by the resource receiving device is verification failure, it means that the second private key of the server does not exist in the target signature certificate, which further indicates that there is a problem with the security of the target signature certificate. The resource receiving device cannot receive the target resource sent by the resource sending device corresponding to the target signature certificate to ensure the security of the resource receiving device.
[0071] If the first verification result obtained by the resource receiving device is verification passed, it means that the second private key of the server exists in the target signature certificate, and then the resource receiving device can receive the target resource sent by the resource sending device corresponding to the target signature certificate. At this time, the resource receiving device can feedback the relevant information that the first verification result is verification passed to the resource sending device or the server that sent the target signature certificate, so as to trigger the resource sending device or the server to transmit the target resource to the resource receiving device.
[0072] In some embodiments, when a communication connection is directly established between the resource sending device and the resource receiving device, that is, for Figure 1 In the resource transmission system 100 shown, the process of transmitting the target resource to the resource receiving device is as follows: receiving the connection success information fed back by the resource receiving device when the first verification result is verification passed; establishing a transmission channel with the resource receiving device based on the connection success information; and transmitting the target resource to the resource receiving device through the transmission channel.
[0073] Specifically, see Figure 1 When the resource receiving device 120 determines that the first verification result is a successful verification, it sends a connection success message to the resource sending device 110 through the communication channel established between the resource receiving device 120 and the resource sending device 110 to notify the resource sending device 110 that the verification is successful. In this way, the resource sending device 110 establishes a secure transmission channel with the resource receiving device 120. Then, the resource sending device 110 directly sends the target resource to the resource receiving device through the transmission channel.
[0074] In other embodiments, when a communication connection is indirectly established between the resource sending device and the resource receiving device through the server, that is, for Figure 2 In the resource transmission system 200 shown, the process of transmitting the target resource to the resource receiving device is as follows: the server transmits the target resource to the resource receiving device when the resource sending condition is met; wherein, meeting the resource sending condition includes receiving the first verification result fed back by the resource receiving device as verification passed.
[0075] Specifically, see Figure 2, when the resource receiving device 230 determines that the first verification result is a passed verification, it feeds back relevant information to the server 220 to notify the server 220 that the verification is passed, so that the server 220 can determine that it meets the resource sending conditions. At this time, the server 220 determines whether there is a target resource in it. If the target resource exists in the server 220, the server 220 directly forwards the target resource to the resource receiving device 230. If the target resource does not exist in the server 220, the server 220 feeds back the information that the first verification result is a passed verification to the resource sending device 210. After receiving the feedback that the first verification result is a passed verification, the resource sending device 210 sends the target resource to the server 220, so that the server 220 can then forward the target resource to the resource receiving device 230.
[0076] The above-mentioned resource transmission method provided by the embodiment of the present invention can obtain a target signature certificate in response to a detected resource transmission trigger operation; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of a resource sending device and a second private key of a server; the target signature certificate is sent to a resource receiving device, so that the resource receiving device uses the second public key to verify the signature of the target signature certificate when the second public key of the server exists; if the first verification result of the signature verification performed by the resource receiving device is verification passed, the target resource is transmitted to the resource receiving device; it is achieved that the target resource can only be transmitted after the resource receiving device is authenticated, thereby avoiding the target resource from being transmitted to a device that does not have the qualification to receive the resource, which not only solves the problem of resource leakage and improves the protection of resources, but also solves the security risks caused by counterfeit resources to the resource receiving device, thereby improving the security of resource transmission.
[0077] On the basis of the above embodiments, the resource transmission method further includes an automatic login process based on authentication of the resource sending device to improve the login efficiency. That is, before obtaining the target signature certificate in response to the detected resource transmission trigger operation, the resource transmission method further includes: if the target signature public key exists locally, the target signature public key is sent to the server, so that the server determines that the resource sending device has successfully logged in when the third verification result of signing the target signature public key with the second public key is verification passed.
[0078] Among them, the target signature public key refers to the public key used for authentication during the automatic login process, which is a public key obtained through some signature processing. Exemplarily, the target signature public key is a public key that is signed using the second private key of the server. This ensures that the target signature public key is a public key authenticated by the server, so that the server can verify itself when processing the login request of the resource sending device, thereby realizing automatic login. Specifically, the resource sending device must first log in to the application before executing the resource transmission process. Therefore, the resource sending device first queries whether the target signature public key is stored in its local storage space. If so, the resource sending device sends the target signature public key to the server. After receiving the target signature public key, the server uses its second public key to perform signature verification on the target signature public key to verify whether the second private key exists therein, and obtains a third verification result. If the third verification result is a verification failure, it means that the second private key of the server does not exist in the target signature public key, the target signature public key is invalid, and the resource sending device cannot log in automatically, then the server feeds back relevant information about re-login to the resource sending device to prompt the resource sending device to log in using the login information related to its account. If the third verification result is that the verification is passed, it means that the target signature public key is valid, then the server can directly complete the automatic login process of the resource sending device through the login request of the resource sending device.
[0079] On the basis of the above embodiment, in response to a detected resource transfer trigger operation, before obtaining the target signature certificate, the resource transmission method also includes: if the target signature public key does not exist locally, sending the login information and the first public key to the server, so that when the server determines that the resource sending device has successfully logged in based on the login information, the server uses the second private key to sign the first public key to obtain an intermediate signature public key; when the received intermediate signature public key is signed and verified using the first private key corresponding to the first public key, the intermediate signature public key is stored as the target signature public key.
[0080] Specifically, when the resource sending device queries the local storage space and finds that the target signature public key does not exist, or after receiving the re-login information fed back by the server, the resource sending device sends its first public key and login information to the server. The server verifies the login information, and when the login information is verified to be correct, passes the login request of the resource sending device to complete the login of the resource sending device. At the same time, the server uses the second private key to sign the first public key of the resource sending device, generates an intermediate signature public key, and sends it to the resource sending device. The resource sending device uses its first private key to verify the signature of the received intermediate signature public key. When the verification result is passed, that is, when the first public key of the resource sending device is verified to exist in the intermediate signature public key, the resource sending device determines the intermediate signature public key as the target signature public key and stores it in the local storage space for use in subsequent login processes.
[0081] Figure 4 The schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. The terminal 400 in the embodiment of the present invention may be the electronic device described above. It should also be noted that: Figure 4 The terminal 400 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0082] The terminal 400 conventionally includes a processor 410 and a computer program product or computer-readable medium in the form of a memory 420. The memory 420 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 420 has a storage space 421 for executable instructions (or program codes) 4211 for executing any method steps in the above-mentioned resource transmission method. For example, the storage space 421 for executable instructions may include individual executable instructions 4211 respectively used to implement various steps in the above-mentioned resource transmission method. These executable instructions may be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically a portable or fixed storage unit. The storage unit may have a storage device having a storage medium ... Figure 4 The memory 420 in the terminal is similarly arranged as a storage segment or storage space, etc. The executable instructions may be compressed, for example, in an appropriate form. Generally, the storage unit includes executable instructions for executing the steps of the resource transmission method described in any embodiment of the present invention, that is, codes that can be read by a processor such as the processor 410, and when these codes are executed by the terminal, the terminal executes the various steps of the resource transmission method described in any of the above embodiments.
[0083] Of course, to simplify, Figure 4 Only some of the components related to the present invention in the terminal 400 are shown, and components such as a bus, an input / output interface, an input device, an output device, etc. are omitted. In addition, according to specific application conditions, the terminal 400 may also include any other appropriate components.
[0084] An embodiment of the present invention further provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the resource transmission method provided by each embodiment of the present invention.
[0085] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0086] The computer-readable medium may be included in the terminal, or may exist independently without being installed in the terminal.
[0087] In an embodiment of the present invention, program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0088] The present invention discloses:
[0089] A1. A resource transmission method, comprising:
[0090] In response to the detected resource transmission trigger operation, a target signature certificate is obtained; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of the resource sending device and a second private key of the server;
[0091] Sending the target signature certificate to a resource receiving device, so that the resource receiving device uses the second public key of the server to perform signature verification on the target signature certificate when the second public key of the server exists;
[0092] If the first verification result of the signature verification performed by the resource receiving device is verification passed, the target resource is transmitted to the resource receiving device.
[0093] A2. The method according to A1, wherein if the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, transmitting the target resource to the resource receiving device comprises:
[0094] receiving connection success information fed back by the resource receiving device when the first verification result is verification passed;
[0095] Based on the connection success information, establishing a transmission channel with the resource receiving device;
[0096] The target resource is transmitted to the resource receiving device through the transmission channel.
[0097] A3. The method according to A1, wherein sending the target signing certificate to the resource receiving device comprises:
[0098] Sending the target signature certificate and the target resource to the server, so that the server sends the target signature certificate to the resource receiving device;
[0099] If the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, transmitting the target resource to the resource receiving device includes:
[0100] The target resource is transmitted to the resource receiving device by the server when a resource sending condition is met; wherein, the meeting of the resource sending condition includes receiving the first verification result fed back by the resource receiving device as verification passed.
[0101] A4. The method according to A1, wherein, before obtaining the target signing certificate in response to the detected resource transfer trigger operation, the method further comprises:
[0102] Signing the initial certificate using the first public key to generate a first intermediate signature certificate;
[0103] Sending the first intermediate signature certificate to the server, so that the server signs the intermediate signature certificate using the second private key to obtain a second intermediate signature certificate;
[0104] Receive the second intermediate signing certificate fed back by the server;
[0105] Using the first private key corresponding to the first public key to perform signature verification on the second intermediate signing certificate to obtain a second verification result;
[0106] If the second verification result is verification passed, the second intermediate signing certificate is stored as the target signing certificate.
[0107] A5. The method according to A1, wherein when the account information corresponding to the resource receiving device meets a preset condition, the resource receiving device has the second public key pre-issued by the server.
[0108] A6. The method according to A5, wherein when the account information includes an account identifier, the account information satisfies a preset condition including that the account identifier corresponding to the resource sending device is the same as the account identifier corresponding to the resource receiving device;
[0109] Alternatively, when the account information includes account authority, the account information satisfies a preset condition including that the account authority corresponding to the resource receiving device reaches a preset authority level.
[0110] A7. A method according to any one of A1 to A6, wherein when the account identifier corresponding to the resource sending device and the account identifier corresponding to the resource receiving device are the same, the target resource is a book resource that has been removed from the shelves.
[0111] A8. The method according to any one of A1 to A7, wherein before obtaining the target signing certificate in response to the detected resource transfer trigger operation, the method further comprises:
[0112] If the target signature public key exists locally, the target signature public key is sent to the server, so that the server determines that the resource sending device has logged in successfully when the third verification result of signing the target signature public key using the second public key is verification passed.
[0113] A9. The method according to A8, wherein, before obtaining the target signing certificate in response to the detected resource transfer trigger operation, the method further comprises:
[0114] If the target signature public key does not exist locally, the login information and the first public key are sent to the server, so that when the server determines that the resource sending device has successfully logged in based on the login information, the server uses the second private key to sign the first public key to obtain an intermediate signature public key;
[0115] When the received intermediate signature public key is signed and verified using the first private key corresponding to the first public key, the intermediate signature public key is stored as the target signature public key.
[0116] B10. A terminal, comprising: a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:
[0117] In response to the detected resource transmission trigger operation, a target signature certificate is obtained; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of the resource sending device and a second private key of the server;
[0118] Sending the target signature certificate to a resource receiving device, so that the resource receiving device uses the second public key of the server to perform signature verification on the target signature certificate when the second public key of the server exists;
[0119] If the first verification result of the signature verification performed by the resource receiving device is verification passed, the target resource is transmitted to the resource receiving device.
[0120] B11. The terminal according to B10, wherein when the processor executes the step of transmitting the target resource to the resource receiving device if the first verification result of the signature verification performed by the resource receiving device is that the verification passes, the executable instruction specifically causes the processor to perform the following operations:
[0121] receiving connection success information fed back by the resource receiving device when the first verification result is verification passed;
[0122] Based on the connection success information, establishing a transmission channel with the resource receiving device;
[0123] The target resource is transmitted to the resource receiving device through the transmission channel.
[0124] B12. The terminal according to B10, wherein when the processor executes the step of sending the target signature certificate to the resource receiving device, the executable instruction specifically causes the processor to perform the following operations:
[0125] Sending the target signature certificate and the target resource to the server, so that the server sends the target signature certificate to the resource receiving device;
[0126] When the processor executes the step of transmitting the target resource to the resource receiving device if the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, the executable instruction specifically causes the processor to perform the following operations:
[0127] The target resource is transmitted to the resource receiving device by the server when a resource sending condition is met; wherein, the meeting of the resource sending condition includes receiving the first verification result fed back by the resource receiving device as verification passed.
[0128] B13. The terminal according to B10, wherein before the processor executes the operation in response to the detected resource transfer trigger and obtains the target signing certificate, the executable instructions further cause the processor to perform the following operations:
[0129] Signing the initial certificate using the first public key to generate a first intermediate signature certificate;
[0130] Sending the first intermediate signature certificate to the server, so that the server signs the intermediate signature certificate using the second private key to obtain a second intermediate signature certificate;
[0131] Receive the second intermediate signing certificate fed back by the server;
[0132] Using the first private key corresponding to the first public key to perform signature verification on the second intermediate signing certificate to obtain a second verification result;
[0133] If the second verification result is verification passed, the second intermediate signing certificate is stored as the target signing certificate.
[0134] B14. A terminal according to B10, wherein when the account information corresponding to the resource receiving device meets a preset condition, the resource receiving device has the second public key pre-issued by the server.
[0135] B15. The terminal according to B14, wherein when the account information includes an account identifier, the account information satisfies a preset condition including that the account identifier corresponding to the resource sending device is the same as the account identifier corresponding to the resource receiving device;
[0136] Alternatively, when the account information includes account authority, the account information satisfies a preset condition including that the account authority corresponding to the resource receiving device reaches a preset authority level.
[0137] B16. A terminal according to any one of B10 to B15, wherein when the account identifier corresponding to the resource sending device and the account identifier corresponding to the resource receiving device are the same, the target resource is a book resource that has been removed from the shelves.
[0138] B17. A terminal according to any one of B10 to B16, wherein before the processor executes the operation in response to the detected resource transfer trigger and obtains the target signing certificate, the executable instructions further cause the processor to perform the following operations:
[0139] If the target signature public key exists locally, the target signature public key is sent to the server, so that the server determines that the resource sending device has logged in successfully when the third verification result of signing the target signature public key using the second public key is verification passed.
[0140] B18. The terminal according to B17, wherein before the processor executes the operation in response to the detected resource transfer trigger to obtain the target signing certificate, the executable instructions further cause the processor to perform the following operations:
[0141] If the target signature public key does not exist locally, the login information and the first public key are sent to the server, so that when the server determines that the resource sending device has successfully logged in based on the login information, the server uses the second private key to sign the first public key to obtain an intermediate signature public key;
[0142] When the received intermediate signature public key is signed and verified using the first private key corresponding to the first public key, the intermediate signature public key is stored as the target signature public key.
[0143] C19. A computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the resource transmission method described in any one of A1-A9.
[0144] The various component embodiments of the present invention can be implemented in hardware in all or part of the steps, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in a terminal according to an embodiment of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0145] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.
[0146] In addition, although each operation is described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0147] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A resource transmission method, characterized in that: include: In response to the detected resource transmission trigger operation, a target signature certificate is obtained; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of the resource sending device and a second private key of the server; Sending the target signature certificate to a resource receiving device, so that the resource receiving device uses the second public key of the server to perform signature verification on the target signature certificate when the second public key of the server exists; If the first verification result of the signature verification performed by the resource receiving device is verification passed, transmitting the target resource to the resource receiving device; Before acquiring the target signing certificate in response to the detected resource transfer triggering operation, the method further includes: Signing the initial certificate using the first public key to generate a first intermediate signature certificate; Sending the first intermediate signature certificate to the server, so that the server signs the intermediate signature certificate using the second private key to obtain a second intermediate signature certificate; Receive the second intermediate signing certificate fed back by the server; Using the first private key corresponding to the first public key to perform signature verification on the second intermediate signing certificate to obtain a second verification result; If the second verification result is verification passed, the second intermediate signing certificate is stored as the target signing certificate.
2. The method according to claim 1, characterized in that If the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, transmitting the target resource to the resource receiving device includes: receiving connection success information fed back by the resource receiving device when the first verification result is verification passed; Based on the connection success information, establishing a transmission channel with the resource receiving device; The target resource is transmitted to the resource receiving device through the transmission channel.
3. The method according to claim 1, characterized in that: The sending the target signature certificate to the resource receiving device comprises: Sending the target signature certificate and the target resource to the server, so that the server sends the target signature certificate to the resource receiving device; If the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, transmitting the target resource to the resource receiving device includes: The target resource is transmitted to the resource receiving device by the server when a resource sending condition is met; wherein, the meeting of the resource sending condition includes receiving the first verification result fed back by the resource receiving device as verification passed.
4. The method according to claim 1, characterized in that When the account information corresponding to the resource receiving device meets a preset condition, the resource receiving device has the second public key pre-issued by the server.
5. The method according to claim 4, characterized in that When the account information includes an account identifier, the account information satisfies a preset condition including that the account identifier corresponding to the resource sending device is the same as the account identifier corresponding to the resource receiving device; Alternatively, when the account information includes account authority, the account information satisfies a preset condition including that the account authority corresponding to the resource receiving device reaches a preset authority level.
6. The method according to any one of claims 1 to 5, characterized in that: When the account identifier corresponding to the resource sending device and the account identifier corresponding to the resource receiving device are the same, the target resource is a book resource that has been removed from the shelves.
7. The method according to claim 6, characterized in that Before acquiring the target signing certificate in response to the detected resource transfer triggering operation, the method further includes: If the target signature public key exists locally, the target signature public key is sent to the server, so that the server determines that the resource sending device has logged in successfully when the third verification result of signing the target signature public key using the second public key is verification passed.
8. The method according to claim 7, characterized in that Before acquiring the target signing certificate in response to the detected resource transfer triggering operation, the method further includes: If the target signature public key does not exist locally, the login information and the first public key are sent to the server, so that the server signs the first public key with the second private key based on the login information to obtain an intermediate signature public key, wherein the login information is information related to the account of the resource sending device; When the received intermediate signature public key is signed and verified using the first private key corresponding to the first public key, the intermediate signature public key is stored as the target signature public key.
9. A terminal, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations: In response to the detected resource transmission trigger operation, a target signature certificate is obtained; wherein the target signature certificate is obtained by signing an initial certificate using a first public key of the resource sending device and a second private key of the server; Sending the target signature certificate to a resource receiving device, so that the resource receiving device uses the second public key of the server to perform signature verification on the target signature certificate when the second public key of the server exists; If the first verification result of the signature verification performed by the resource receiving device is verification passed, transmitting the target resource to the resource receiving device; Before the processor executes the acquisition of the target signing certificate in response to the detected resource transfer trigger operation, the executable instructions further cause the processor to perform the following operations: Signing the initial certificate using the first public key to generate a first intermediate signature certificate; Sending the first intermediate signature certificate to the server, so that the server signs the intermediate signature certificate using the second private key to obtain a second intermediate signature certificate; Receive the second intermediate signing certificate fed back by the server; Using the first private key corresponding to the first public key to perform signature verification on the second intermediate signing certificate to obtain a second verification result; If the second verification result is verification passed, the second intermediate signing certificate is stored as the target signing certificate.
10. The terminal according to claim 9, characterized in that: When the processor executes the step of transmitting the target resource to the resource receiving device if the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, the executable instruction specifically causes the processor to perform the following operations: receiving connection success information fed back by the resource receiving device when the first verification result is verification passed; Based on the connection success information, establishing a transmission channel with the resource receiving device; The target resource is transmitted to the resource receiving device through the transmission channel.
11. The terminal according to claim 9, characterized in that: When the processor executes the step of sending the target signing certificate to the resource receiving device, the executable instruction specifically causes the processor to perform the following operations: Sending the target signature certificate and the target resource to the server, so that the server sends the target signature certificate to the resource receiving device; When the processor executes the step of transmitting the target resource to the resource receiving device if the first verification result of the signature verification performed by the resource receiving device is that the verification is passed, the executable instruction specifically causes the processor to perform the following operations: The target resource is transmitted to the resource receiving device by the server when a resource sending condition is met; wherein, the meeting of the resource sending condition includes receiving the first verification result fed back by the resource receiving device as verification passed.
12. The terminal according to claim 9, characterized in that: When the account information corresponding to the resource receiving device meets a preset condition, the resource receiving device has the second public key pre-issued by the server.
13. The terminal according to claim 12, characterized in that: When the account information includes an account identifier, the account information satisfies a preset condition including that the account identifier corresponding to the resource sending device is the same as the account identifier corresponding to the resource receiving device; Alternatively, when the account information includes account authority, the account information satisfies a preset condition including that the account authority corresponding to the resource receiving device reaches a preset authority level.
14. The terminal according to any one of claims 9 to 13, characterized in that: When the account identifier corresponding to the resource sending device and the account identifier corresponding to the resource receiving device are the same, the target resource is a book resource that has been removed from the shelves.
15. The terminal according to claim 14, characterized in that: Before the processor executes the acquisition of the target signing certificate in response to the detected resource transfer trigger operation, the executable instructions further cause the processor to perform the following operations: If the target signature public key exists locally, the target signature public key is sent to the server, so that the server determines that the resource sending device has logged in successfully when the third verification result of signing the target signature public key using the second public key is verification passed.
16. The terminal according to claim 15, characterized in that: Before the processor executes the acquisition of the target signing certificate in response to the detected resource transfer trigger operation, the executable instructions further cause the processor to perform the following operations: If the target signature public key does not exist locally, the login information and the first public key are sent to the server, so that the server signs the first public key with the second private key based on the login information to obtain an intermediate signature public key, wherein the login information is information related to the account of the resource sending device; When the received intermediate signature public key is signed and verified using the first private key corresponding to the first public key, the intermediate signature public key is stored as the target signature public key.
17. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the resource transmission method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data security transmission method, certificate correlation method, server, system and medium
CN113556230A