CN115334057A - Picture transmission method and device - Google Patents

Picture transmission method and device Download PDF

Info

Publication number
CN115334057A
CN115334057A CN202210953627.3A CN202210953627A CN115334057A CN 115334057 A CN115334057 A CN 115334057A CN 202210953627 A CN202210953627 A CN 202210953627A CN 115334057 A CN115334057 A CN 115334057A
Authority
CN
China
Prior art keywords
client
target picture
picture
server
access link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210953627.3A
Other languages
Chinese (zh)
Inventor
罗立刚
常涛
韩彦军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Linkdoc Technology Beijing Co ltd
Original Assignee
Linkdoc Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Linkdoc Technology Beijing Co ltd filed Critical Linkdoc Technology Beijing Co ltd
Priority to CN202210953627.3A priority Critical patent/CN115334057A/en
Publication of CN115334057A publication Critical patent/CN115334057A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/088Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The application provides a picture transmission method and a picture transmission device, wherein the picture transmission method is applied to a server; the picture transmission the method comprises the following steps: receiving client identity information and target picture characteristic information from a client; verifying whether the client has the authority to access the server or not according to the client information; if the client has the authority of accessing the server, judging whether the server database comprises the target picture according to the characteristic information of the target picture; if the server database comprises the target picture, generating an initial access link of the target picture, adding a link failure time parameter to the initial access link according to the preset expiration time of the target picture to generate a target picture access link, and sending the target picture access link to the client. By the picture loading method provided by the embodiment of the application, the picture information can be protected from being leaked, and the loading efficiency of the picture at the client side can be improved.

Description

Picture transmission method and device
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for transmitting pictures.
Background
Today, when information technology is rapidly developed, a large amount of personal information, one of which is in the form of pictures, is stored in an information system, and thus, management of the pictures in the information system becomes an indispensable technology.
At present, management of picture access is not fine enough; the authentication information of the client is incomplete, so that the authenticity and the legality of a user of the picture can not be guaranteed in the transmission process of the picture data, the picture is easily sent to a client which is not in compliance or does not have corresponding access authority, and the information safety has great hidden danger. In addition, in the conventional picture management method, if a picture is stored in the server, when a request for obtaining the picture is made from the client, since network transmission and delay are involved in picture access from the server, security of picture access and efficiency of existing picture access cannot be both considered, and user experience is poor.
Disclosure of Invention
The embodiment of the application aims to provide a picture transmission method and a picture transmission device, which are used for verifying a client side when a picture is transmitted between the client side and a server and judging the validity of the picture accessed by the client side; generating a link with ineffectiveness, and the client can access the picture according to the link in the validity period; therefore, the efficiency of the client side for accessing the pictures is improved, and the safety of picture transmission is also ensured.
In a first aspect, an embodiment of the present application provides a picture transmission method, where the picture transmission method is applied to a server; the picture transmission method comprises the following steps: receiving client identity information and target picture characteristic information from a client; verifying whether the client has the authority to access the server or not according to the client information; if the client has the authority of accessing the server, judging whether the server database comprises the target picture according to the characteristic information of the target picture; if the server database comprises the target picture, generating an initial access link of the target picture, adding a link failure time parameter to the initial access link according to the preset expiration time of the target picture to generate a target picture access link, and sending the target picture access link to the client.
In the implementation process, when a client acquires picture information from a server, the server receives client identity information and picture characteristic information of a target picture to be accessed; after the client side is verified to have the authority of accessing the server, the server generates a picture access link; this link is sent to the client. The validity of the client side for obtaining the picture can be ensured by verifying the access right of the client side, and the safety of picture transmission is ensured.
Optionally, in this embodiment of the present application, the client identity information includes a client identity ID and a client key with an authorization deadline; the identity ID can be identified by the server only in the authorization period; verifying whether the client has the right to access the server according to the client information includes: verifying whether the client identity ID and the client secret key are correct or not; if the client identity ID and the client secret key are correct, verifying whether the authorization deadline of the client identity ID is within the authorization deadline; and if the authorization period of the client identity ID is within the authorization period, judging that the client has the authority of accessing the server.
In the implementation process, whether the client has the access right or not is verified, and the identity ID and the client key of the client are mainly verified; the client identity ID and the client key are generated when the client registers; each client corresponds to a unique identity ID and key. If the ID and the secret key both pass the verification, verifying whether the ID is overdue or not, because the ID within the time limit is valid; if the ID is not expired, the client is proved to have the right to access the server, and the client is allowed to access. In the embodiment of the application, not only the authenticity of the identity ID and the secret key is verified, but also the invalidity of the identity ID is verified; therefore, authenticity and reliability of the client side accessing the server are guaranteed, and the picture is guaranteed not to be obtained by an illegal client side, so that picture information is leaked.
Optionally, in this embodiment of the present application, determining whether the server database includes the target picture includes: inquiring whether a picture with the same target picture characteristic information exists in a server database according to the target picture characteristic information; the picture characteristic information comprises a unique character string corresponding to each picture.
In the implementation process, in the picture library in the server, each picture corresponds to unique picture characteristic information. It is understood that the feature information may be a unique character string representing the picture information, or may be other features capable of representing the picture information. The target picture is searched in the picture library through the picture information characteristics, and the target picture can be quickly and accurately found out from the picture library.
Optionally, in this embodiment of the present application, generating an initial access link of the target picture includes: and acquiring an access domain name, target picture characteristic information and a category name of the target picture, and generating an initial access link of the target picture according to the access domain name, the target picture characteristic information and the category name of the target picture.
In the implementation process, an initial access link of the target picture is generated according to the access domain name of the target picture, the characteristic information of the target picture and the category name of the target picture; the target picture can be accurately found under the category to which the target picture belongs in the server through the initial access link.
Optionally, in this embodiment of the application, before receiving the client identity information and the target picture feature information from the client, the method further includes: generating picture characteristic information according to pictures in a server database; and acquiring and storing the identity information of the client.
In the implementation process, before receiving the client identity information and the target picture feature information from the client, the server generates the picture feature information according to the picture in the server. Meanwhile, the client side can register information in the server; after the client identity information is generated, the server stores the identity information so as to verify the client identity information when the client requests to access the picture in subsequent operation.
In a second aspect, an embodiment of the present application provides a picture transmission method, where the picture transmission method is applied to a client; the picture transmission method comprises the following steps: receiving an access request for a target picture from a requester; according to the characteristic information of the target picture, whether a target picture access link exists in a client database or not is judged, so that the target picture is searched in the client database; if the target picture access link does not exist in the client database, sending client identity information and target picture characteristic information to a server; and acquiring the target picture access link from the server, and acquiring the target picture according to the target picture access link.
In the implementation process, when a client needs to acquire a target picture from a server, whether an access link for accessing the target picture exists in the client is checked; and if the access link exists and the access link is not invalid, directly using the access link to access the service. If the access link does not exist or fails, the access link for accessing the target picture needs to be acquired from the server again. In the embodiment of the application, if the link exists in the server, the link is directly used for accessing the server to obtain the picture, so that the access efficiency can be improved; meanwhile, the link has a validity period; if the picture is overdue, the access link needs to be acquired from the server again, so that the safety of picture access is guaranteed.
Optionally, in this embodiment of the present application, the client identity information includes a client identity ID and a client key with an authorization deadline; the identity ID can be identified by the server only in the authorization period; sending client identity information and target picture characteristic information to a server, and acquiring a target picture access link from the server, wherein the method comprises the following steps: sending the client identity ID, the client key and the target picture characteristic information to a server; and acquiring the target picture access link from the server.
In the implementation process, when an access link for accessing a target picture needs to be acquired from a server, a client Identity (ID), a client key and target picture characteristic information are sent to the server, and the server generates the target picture access link according to the client Identity (ID), the client key and the target picture characteristic information and then acquires the target picture access link by the client; and the client can acquire the target picture from the server after acquiring the target picture access link. Therefore, when the target access link does not exist in the client, the server is requested to generate the target picture access link, and then access is carried out.
Optionally, in this embodiment of the application, if the target picture access link exists in the client database, it is determined whether the target picture access link exceeds a preset expiration time; if the target picture access link exceeds the preset expiration time, deleting the target picture access link, and acquiring the target picture access link from the server again; and storing the target picture access link, and accessing the server according to the target picture access link when receiving an access request for the target picture next time and judging that the target picture access link does not exceed the preset expiration time.
In the implementation process, the expired access link in the client is deleted, the access link for accessing the target picture is obtained again, the target picture access link is stored in the client, and the target picture is obtained from the server by directly using the target picture access link when the client needs to obtain the target picture next time, so that the picture loading efficiency is greatly improved.
In a third aspect, an embodiment of the present application provides an image transmission apparatus, where the image transmission apparatus is applied to a server; the picture transmission device includes: the system comprises a client information acquisition module, an identity judgment module, a search module and an access link generation module; the client information acquisition module is used for receiving client identity information and target picture characteristic information from a client; the identity judgment module is used for verifying whether the client has the authority of accessing the server according to the client information; the searching module is used for judging whether the server database comprises the target picture or not according to the characteristic information of the target picture when the client has the authority of accessing the server; and the access link generation module is used for generating an initial access link of the target picture when the server database comprises the target picture, adding a link failure time parameter to the initial access link according to the preset expiration time of the target picture to generate a target picture access link, and sending the target picture access link to the client.
In a fourth aspect, an embodiment of the present application provides an image transmission apparatus, where the apparatus is applied to a client; the picture transmission device includes: the system comprises a local picture searching module, an access link acquiring module and a picture access module; the local picture searching module is used for searching a target picture in the client database by judging whether a target picture access link exists in the client database according to the characteristic information of the target picture; the access link acquisition module is used for sending client identity information and target picture characteristic information to the server when the target picture access link does not exist in the client database; the picture access module is used for obtaining a target picture access link from the server and obtaining a target picture according to the target picture access link.
In a fifth aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores program instructions, and the processor executes the steps in any one of the foregoing implementation manners when reading and executing the program instructions.
In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, where computer program instructions are stored in the computer-readable storage medium, and when the computer program instructions are read and executed by a processor, the steps in any of the foregoing implementation manners are performed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of image transmission at a server according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a server side determining whether a server has an access right according to an embodiment of the present application;
fig. 3 is a flowchart of image transmission of a client according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a client acquiring a target picture access link from a server according to an embodiment of the present application;
fig. 5 is a flowchart illustrating that the access link is obtained again after the access link of the client has expired according to the embodiment of the present application;
fig. 6 is a schematic block diagram of a picture transmission apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram of another image transmission apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a schematic diagram illustrating picture transmission performed between a server and a client according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. For example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In the research process, the applicant finds that the current picture management is not fine enough and the client information is incomplete, so that the authenticity and the legality of a picture user cannot be guaranteed when picture data are transmitted, and the authorization period of an information system is not reasonably set; additionally, if multiple pictures are rendered, a picture link is requested and acquired from the server side for each picture, and then the pictures are rendered; network overhead is increased, reading and processing time is increased, and poor experience is brought to users.
Based on the method, when the picture is transmitted between the client and the server, the validity of the picture accessed by the client is judged by verifying the client; generating a link with ineffectiveness, and the client can access the picture according to the link in the validity period; therefore, the efficiency of the client side for accessing the pictures is improved, and the safety of picture transmission is also ensured.
Referring to fig. 1, fig. 1 is a flowchart illustrating a picture transmission process at a server according to an embodiment of the present disclosure; the method comprises the following steps:
step S100: and receiving the identity information of the client and the characteristic information of the target picture from the client.
In the step S100, the client identity information and the target picture feature information are received from the client; it should be noted that the client in the embodiment of the present application may be an APP client, a public account client, an applet client, a PC browser client, or a related background system, etc.; the client can be regarded as any subject needing to obtain the picture in the server, and the kind of the client should not be a limitation of the client in the embodiment of the present application.
As can be understood by those skilled in the art, the target picture feature information may be a picture key value, the key value corresponds to a unique character string, and the target picture feature information corresponds to the target picture one to one; the target picture feature information only needs to be unique and can be in one-to-one correspondence with the target picture, and the type of the target picture feature information should not be a limitation of the target picture feature information in the embodiment of the present application.
Step S101: and verifying whether the client has the authority to access the server according to the client information.
In the above step S101, it is verified whether the client has the right to access the server according to the client information; that is, when the client accesses, the server determines whether the access of the client is legal according to the client information. It should be noted that the client information may include a client identity ID, a client key, and the like. The identity information of the client is in one-to-one correspondence with the client, and illustratively, the client A has a unique identity ID and a key which are different from those of other clients; a set of client identity information corresponds to a unique client.
Step S102: and if the client has the authority of accessing the server, judging whether the server database comprises the target picture according to the characteristic information of the target picture.
In step S102, if it is determined that the client has the right to access the server. That is, the client's access is legitimate. The server searches in a picture library of the server according to the characteristic information of the picture; if the picture exists in the picture library of the server, the server can find the corresponding picture through the picture characteristic information. Accordingly, if it is determined in step S102 that the client does not have the right to access the server, the server may directly return information such as "the client does not have the right to access" or "the target picture search fails because the client does not have the right to access" to the corresponding client. By pre-judging whether the client has the corresponding access authority, the blind execution and searching of the requirement of the server for any target picture request can be avoided, and only the target picture searching request of the client with the access authority is processed, so that the resource consumption of the server in processing the target picture searching request is saved.
Step S103: and if the server database comprises the target picture, generating an initial access link of the target picture.
In step S103, if the target picture is included in the server database, an initial access link is generated; as will be understood by those skilled in the art, the initial access link may be generated according to the access domain name of the target picture, the target picture feature information, and the category name of the target picture; access to the target picture is achieved through this initial link.
Step S104: and adding a link failure time parameter to the initial access link according to the preset expiration time of the target picture to generate a target picture access link, and sending the target picture access link to the client.
In the step S104, in practical applications, if a link is permanently valid, the picture can be infinitely accessed, which causes problems such as leakage of picture information. After the initial access link is generated, the embodiment of the application also adds the expiration time parameter to the initial access link, so that the generated link is only valid within the set time limit. It will be understood by those skilled in the art that the time to failure parameter may be determined according to the usage of the client, and may be set to 12 hours, 24 hours, etc.
In an embodiment, the above steps S101 and S102 may be executed simultaneously, that is, whether the client has an access right to access the server and searches for the target picture in the server database according to the target picture feature information are verified simultaneously, and when either party returns "no right" or "no target picture", it is determined that the current acquisition of the target picture fails, and information that the acquisition of the target picture fails is directly returned to the client. In this embodiment, the efficiency of the server for searching the target picture can be further improved by the above parallel processing manner.
As can be seen from fig. 1, when a user requests to acquire picture information from a server through a client, the server receives client identity information and picture feature information of a target picture to be accessed; after the client side is verified to have the authority of accessing the server, the server generates a picture access link; this link is sent to the client. The validity of the client side for obtaining the picture can be ensured by verifying the access right of the client side, and the safety of picture transmission is ensured.
Please refer to fig. 2, fig. 2 is a flowchart illustrating a server side determining whether the server has an access right according to an embodiment of the present application; the method comprises the following steps:
step S200: and verifying whether the client identity ID and the client secret key are correct.
In the above step S200, since the client ID and the key are symbols unique to the client ID; so in the authentication process, it is first verified whether the client's ID and key are correct.
Step S201: and if the client identity ID and the client secret key are correct, verifying whether the authorization deadline of the client identity ID is within the authorization deadline.
In step S201, when the client goes to the server for registration, the ID obtained by the client is an ID with an authorization deadline; if the set authorization period is exceeded, the verification will also fail. Adding an authorization deadline to the client ID may also improve security during picture use or transmission.
Step S202: and if the authorization period of the client identity ID is within the authorization period, judging that the client has the authority of accessing the server.
In step S202, when the client ID and the key are correct, and the ID is within the authorized period, it may be determined that the access of the client is legal, that is, the client has the right to access the server, and the client is allowed to obtain the access link from the server.
As can be seen from fig. 2, verifying whether the client has the access right mainly verifies the identity ID and the client key of the client; the client identity ID and the client key are generated when the client registers; each client corresponds to a unique identity ID and key. If the ID and the secret key both pass the verification, verifying whether the ID is overdue or not, because the ID within the time limit is valid; if the ID is not expired, the client is proved to have the right to access the server, and the client is allowed to access. In the embodiment of the application, not only the authenticity of the identity ID and the secret key is verified, but also the invalidity of the identity ID is verified; therefore, authenticity and reliability of the client side accessing the server are guaranteed, and the picture is guaranteed not to be obtained by an illegal client side, so that picture information is leaked.
In an optional embodiment, the determining whether the server database includes the target picture includes: inquiring whether a picture with the same target picture characteristic information exists in a server database according to the target picture characteristic information; the image feature information comprises a unique character string corresponding to each image. As will be understood by those skilled in the art, the target picture feature information may be a picture key value, the key value corresponds to a unique character string, and the target picture feature information corresponds to the target picture one to one. Illustratively, comparing the picture key of the target picture with the keys of all pictures in the picture library in the server; due to the uniqueness of the picture key, if a picture consistent with the target picture key exists in the picture library, the picture is proved to be the picture which the client wants to access.
Therefore, in the picture library in the server, each picture corresponds to unique picture characteristic information. It is understood that the feature information may be a unique character string representing the picture information, or may be other features capable of representing the picture information. The target picture is searched in the picture library through the picture information characteristics, and the target picture can be quickly and accurately found out from the picture library.
In an optional embodiment, the access domain name of the target picture, the target picture feature information and the category name of the target picture are acquired, and an initial access link of the target picture is generated according to the access domain name of the target picture, the target picture feature information and the category name of the target picture. After generating the initial access link of the target picture, the client can access the target picture which the client wants to access through the initial link.
Therefore, an initial access link of the target picture is generated according to the access domain name of the target picture, the characteristic information of the target picture and the category name of the target picture; the target picture can be accurately found under the category to which the target picture belongs in the server through the initial access link.
In an optional embodiment, before receiving the client identity information and the target picture characteristic information from the client, the server generates picture characteristic information according to pictures in a server database; and acquiring and storing the identity information of the client.
It should be noted that the image files stored in the service server include a picture taken by a camera of the device, a picture loaded by a locally stored image of the device, or a loaded image of a picture downloaded by a cloud of the device.
Illustratively, the server receives pictures collected or uploaded by other business systems for storage, and generates a unique picture key value as a storage name of the picture after storage, so that subsequent access requests are facilitated.
Illustratively, before initiating an access request, a client will first go to a server for registration, and establish the association between the server and the client; the client generates client identity information, and the identity information is sent to the server so as to identify the identity of the client when the server accesses the subsequent client. The client identity information may include a client identity ID and a client key; the client ID may reflect which client is specific, and the client key may verify whether the request of the client is legal.
Therefore, before receiving the client identity information and the target picture characteristic information from the client, the server generates the picture characteristic information according to the picture in the server. Meanwhile, the client can register information in the server; after the client identity information is generated, the server stores the identity information so as to verify the client identity information when the client requests to access the picture in subsequent operation.
Please refer to fig. 3, fig. 3 is a flowchart illustrating a picture transmission process of a client according to an embodiment of the present application; the method comprises the following steps:
step S300: an access request for a target picture from a requestor is received.
In the above step S300, the client receives the target picture access request from the requester, which may be any execution subject who wants to acquire the target picture.
Step S301: and according to the characteristic information of the target picture, searching the target picture in the client database by judging whether the target picture access link exists in the client database.
In step S301, when the client wants to access the picture, the client first searches whether an access link for accessing the target picture is included in its own storage module. If the client side has an access link for accessing the target picture, the server is accessed by using the access link to acquire the target picture under the condition that the access link is effective.
Step S302: and if the target picture access link does not exist in the client database, sending client identity information and target picture characteristic information to the server, acquiring the target picture access link from the server, and acquiring the target picture according to the target picture access link.
In step S302, if the storage module of the client does not have the access link of the target picture, the identity information of the client and the picture feature information of the target picture that the client wants to access are sent to the server together, and after the server generates the access link of the target picture, the client can access the server according to the access link of the target picture to obtain the target picture.
As can be seen from fig. 3, when the client needs to acquire the target picture from the server, it is first checked whether an access link for accessing the target picture exists in the client; and if the access link exists and the access link is not invalid, directly using the access link to access the service. If the access link does not exist or fails, the access link for accessing the target picture needs to be acquired from the server again. In the embodiment of the application, if the link exists in the server, the link is directly used for accessing the server to obtain the picture, so that the access efficiency can be improved; meanwhile, the link has a validity period; if the picture is overdue, the access link needs to be acquired from the server again, so that the safety of picture access is guaranteed.
Referring to fig. 4, fig. 4 is a flowchart illustrating a client acquiring a target picture access link from a server according to an embodiment of the present application; the method comprises the following steps:
step S400: and sending the client identity ID, the client key and the target picture characteristic information to a server.
In step S400, the client sends the identity information of the client and the picture feature information of the target picture that the client wants to access to the server.
Step S401: and acquiring the target picture access link from the server.
In step S401, after the server generates the target picture access link, the client may access the server according to the target picture access link to obtain the target picture.
As can be seen from fig. 4, when an access link for accessing a target picture needs to be acquired from the server, the client ID, the client key and the target picture feature information are sent to the server, and the server generates the target picture access link according to the client ID, the client key and the target picture feature information and then is acquired by the client; and the client can acquire the target picture from the server after acquiring the target picture access link. Therefore, when the target access link does not exist in the client, the server is requested to generate the target picture access link, and then access is carried out.
Referring to fig. 5, fig. 5 is a flowchart illustrating that the access link is obtained again after the access link of the client is expired according to the embodiment of the present application; the method comprises the following steps:
step S500: and if the target picture access link exists in the client database, judging whether the target picture access link exceeds preset expiration time.
In the step S500, if the client is about to obtain a target picture, it is first checked whether an access link of the target picture is included in a storage module of the client itself; if the target picture access link exists, the client further determines whether the access link of the target picture exceeds the validity period of the link.
Step S501: and if the target picture access link exceeds the preset expiration time, deleting the target picture access link, and acquiring the target picture access link from the server again.
In step S501, if the client detects that the target picture access link has failed, the target picture access link is deleted from the client; the storage space of the client is prevented from being occupied infinitely. And after the expired target access link is deleted, the client continues to acquire the access link of the target picture from the server again.
Step S502: and storing the target picture access link, and accessing the server according to the target picture access link when receiving an access request for the target picture next time and judging that the target picture access link does not exceed the preset expiration time.
In step S502, after the client acquires the access link of the target picture again, the client saves the access link of the target picture. The new access link is also a link with timeliness, and after the new access link is stored, if the client wants to acquire the target picture in the subsequent validity period, the client can directly use the target picture access link stored by the client for access, and the picture is acquired from the server.
As can be seen from fig. 5, the expired access link in the client is deleted, the access link for accessing the target picture is obtained again, the target picture access link is stored in the client, and the target picture is obtained from the server by directly using the target picture access link when the client needs to obtain the target picture next time, so that the picture loading efficiency is greatly improved.
Please refer to fig. 9, fig. 9 is a schematic diagram illustrating image transmission between a server and a client according to an embodiment of the present disclosure; the method comprises the following steps:
step S900: an access request for a target picture from a requestor is received.
Step S901: and according to the characteristic information of the target picture, searching the target picture in the client database by judging whether the target picture access link exists in the client database.
In the step S901, after receiving a request for accessing a target picture from a requester, first, whether an access link for accessing the target picture is included in a storage space of a client is searched; if the target picture access link exists in the storage space of the client, the client can directly access the server according to the access link of the target picture, so that the target picture is obtained. Therefore, the network overhead increase caused by operations such as re-acquiring the access link and re-rendering at the client side is avoided, the waiting time of the user is reduced, and the user experience is improved.
Step S902: and if the target picture access link does not exist in the client database, sending client identity information and target picture characteristic information to the server, acquiring the target picture access link from the server, and acquiring the target picture according to the target picture access link.
Step S903: and receiving the identity information of the client and the characteristic information of the target picture from the client.
In step S903, the picture feature information includes a unique character string corresponding to each picture. As will be understood by those skilled in the art, the target picture feature information may be a picture key value, the key value corresponds to a unique character string, and the target picture feature information corresponds to the target picture one to one. Illustratively, comparing the picture key of the target picture with the keys of all pictures in the picture library in the server; due to the uniqueness of the picture key, if a picture consistent with the target picture key exists in the picture library, the picture is proved to be the picture which the client wants to access.
Step S904: and verifying whether the client has the authority of accessing the server according to the client information.
Step S905: and if the client has the authority of accessing the server, judging whether the server database comprises the target picture according to the characteristic information of the target picture.
Step S906 (a): if the server database comprises the target picture, generating an initial access link of the target picture, adding a link failure time parameter to the initial access link according to the preset expiration time of the target picture to generate a target picture access link, and sending the target picture access link to the client.
Step S906 (b): and sending the target picture access link to the client.
As can be seen from fig. 9, in the image transmission method, when the image is transmitted between the client and the server, the validity of the image accessed by the client is determined by verifying the client; generating a link with ineffectiveness, and the client can access the picture according to the link in the validity period; therefore, the efficiency of the client side for accessing the pictures is improved, and the safety of picture transmission is ensured.
Please refer to fig. 6, fig. 6 is a block diagram of a picture transmission apparatus according to an embodiment of the present application; the image transmission apparatus 100 is located at a server side, and includes: a client information obtaining module 110, an identity judging module 120, a searching module 130 and an access link generating module 140.
A client information obtaining module 110, configured to receive, from a client, client identity information and target picture feature information;
an identity judgment module 120, configured to verify whether the client has the right to access the server according to the client information;
the searching module 130 is configured to, when the client has the right to access the server, determine whether the server database includes the target picture according to the target picture feature information;
the access link generation module 140 is configured to generate an initial access link of the target picture when the server database includes the target picture, add a link failure time parameter to the initial access link according to a preset expiration time of the target picture to generate the target picture access link, and send the target picture access link to the client.
In an optional embodiment, the client identity information includes a client identity ID with an authorization deadline and a client key; the identity ID can be identified by the server only within the authorization deadline; the identity judgment module 120 verifying whether the client has the right to access the server according to the client information includes: the identity judgment module 120 verifies whether the client identity ID and the client key are correct; if the client ID and the client key are correct, the identity determination module 120 verifies whether the authorization deadline of the client ID is within the authorization deadline; and if the authorization period of the client identity ID is within the authorization period, judging that the client has the authority of accessing the server.
In an optional embodiment, the determining, by the lookup module 130, whether the target picture is included in the server database includes: the searching module 130 queries whether a picture with the same target picture characteristic information exists in the server database according to the target picture characteristic information; the picture characteristic information comprises a unique character string corresponding to each picture.
In an optional embodiment, the access link generation module 140 generates the initial access link of the target picture including: the access link generation module 140 obtains the access domain name of the target picture, the feature information of the target picture, and the category name of the target picture, and generates an initial access link of the target picture according to the access domain name of the target picture, the feature information of the target picture, and the category name of the target picture.
In an optional embodiment, before the client information obtaining module 110 receives the client identity information and the target picture feature information from the client, the picture transmission method further includes: generating picture characteristic information according to pictures in a server database; and acquiring and storing the identity information of the client.
Please refer to fig. 7, fig. 7 is a block diagram of another image transmission apparatus according to an embodiment of the present disclosure; the image transmission apparatus 200 is located at a client, and includes: a local picture lookup module 210, an access link acquisition module 220, and a picture access module 230.
The local picture searching module 210 is configured to search a target picture in the client database by determining whether a target picture access link exists in the client database according to the target picture characteristic information;
the access link obtaining module 220 is configured to send the client identity information and the target picture feature information to the server when the target picture access link does not exist in the client database.
And the picture access module 230 is configured to obtain the target picture access link from the server, and obtain the target picture according to the target picture access link.
In an optional embodiment, the client identity information includes a client identity ID with an authorization deadline and a client key; the identity ID can be identified by the server only in the authorization period; the access link obtaining module 220 sends the client identity information and the target picture feature information to the server, and obtaining the target picture access link from the server includes: the access link obtaining module 220 sends the client identity ID, the client key and the target picture feature information to the server; and acquiring the target picture access link from the server.
In an optional embodiment, if the target picture access link exists in the client database, the access link obtaining module 220 determines whether the target picture access link exceeds a preset expiration time; if the target picture access link exceeds the preset expiration time, the client deletes the target picture access link and obtains the target picture access link from the server again; and storing the target picture access link, and accessing the server according to the target picture access link when receiving an access request for the target picture next time and judging that the target picture access link does not exceed the preset expiration time.
Please refer to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. An electronic device 800 provided in an embodiment of the present application includes: a processor 801 and a memory 802, the memory 802 storing machine readable instructions executable by the processor 801 which when executed by the processor 801 perform the method as described above.
Based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, where computer program instructions are stored, and when the computer program instructions are read and executed by a processor, the computer program instructions perform steps in any of the above-mentioned implementation manners.
The computer-readable storage medium may be a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and other various media capable of storing program codes. The storage medium is used for storing a program, and the processor executes the program after receiving an execution instruction.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
Alternatively, all or part of the implementation may be in software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to be performed in whole or in part.
The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.).
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A picture transmission method is characterized in that the method is applied to a server; the method comprises the following steps:
receiving client identity information and target picture characteristic information from a client;
verifying whether the client has the authority to access the server or not according to the client identity information;
if the client has the authority of accessing the server, judging whether the server database comprises the target picture according to the target picture characteristic information;
if the server database comprises the target picture, generating an initial access link of the target picture, adding a link failure time parameter to the initial access link according to the preset expiration time of the target picture to generate the target picture access link, and sending the target picture access link to the client.
2. The method of claim 1, wherein the client identity information comprises a client identity ID with an authorization deadline and a client key; the identity ID is identifiable by the server only during the authorization period;
the verifying whether the client has the right to access the server according to the client information includes:
verifying whether the client identity ID and the client secret key are correct;
if the client identity ID and the client secret key are correct, verifying whether the authorization deadline of the client identity ID is within the authorization deadline;
and if the authorization period of the client identity ID is within the authorization period, judging that the client has the authority of accessing the server.
3. The method of claim 1, wherein the determining whether the target picture is included in the server database comprises: inquiring whether a picture with the same target picture characteristic information exists in the server database according to the target picture characteristic information; the picture characteristic information comprises a unique character string corresponding to each picture.
4. The method of claim 1, wherein the generating an initial access link for the target picture comprises: and acquiring an access domain name of the target picture, the target picture characteristic information and the category name of the target picture, and generating the initial access link of the target picture according to the access domain name of the target picture, the target picture characteristic information and the category name of the target picture.
5. The method according to claim 1, wherein before receiving, from the client, client identity information and target picture feature information, the method further comprises:
generating the picture characteristic information according to pictures in the server database;
and acquiring and storing the identity information of the client.
6. A picture transmission method is characterized in that the method is applied to a client; the method comprises the following steps:
receiving an access request for a target picture from a requester;
according to the characteristic information of the target picture, whether a target picture access link exists in a client database or not is judged, so that the target picture is searched in the client database;
and if the target picture access link does not exist in the client database, sending client identity information and the target picture characteristic information to a server, acquiring the target picture access link from the server, and acquiring the target picture according to the target picture access link.
7. The method of claim 6, wherein the client identity information comprises a client identity ID with an authorization deadline and a client key; the identity ID is identifiable by the server only during the authorization period;
the sending client identity information and the target picture feature information to a server, and acquiring the target picture access link from the server include:
sending the client identity ID, the client key and the target picture characteristic information to the server;
and acquiring the target picture access link from the server.
8. The method of claim 6, wherein if the target picture access link exists in the client database, determining whether the target picture access link exceeds a preset expiration time;
if the target picture access link exceeds the preset expiration time, deleting the target picture access link, and obtaining the target picture access link from the server again;
and storing the target picture access link, and accessing the server according to the target picture access link when receiving an access request for the target picture and judging that the target picture access link does not exceed the preset expiration time next time.
9. The picture transmission device is characterized in that the picture transmission device is applied to a server; the picture transmission device includes: the system comprises a client information acquisition module, an identity judgment module, a search module and an access link generation module;
the client information acquisition module is used for receiving client identity information and target picture characteristic information from a client;
the identity judgment module is used for verifying whether the client has the authority of accessing the server according to the client information;
the searching module is used for judging whether the server database comprises a target picture or not according to the target picture characteristic information when the client has the authority of accessing the server;
the access link generation module is used for generating an initial access link of the target picture when the server database comprises the target picture, adding a link failure time parameter to the initial access link according to the preset expiration time of the target picture to generate the target picture access link, and sending the target picture access link to the client.
10. The picture transmission device is characterized in that the picture transmission device is applied to a client; the picture transmission device includes: the system comprises a local picture searching module, an access link acquiring module and a picture access module;
the local picture searching module is used for searching the target picture in a client database by judging whether a target picture access link exists in the client database according to the characteristic information of the target picture;
the access link acquisition module is used for sending client identity information and the target picture characteristic information to a server when the target picture access link does not exist in the client database;
the picture access module is used for acquiring the target picture access link from the server and acquiring the target picture according to the target picture access link.
CN202210953627.3A 2022-08-10 2022-08-10 Picture transmission method and device Pending CN115334057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210953627.3A CN115334057A (en) 2022-08-10 2022-08-10 Picture transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210953627.3A CN115334057A (en) 2022-08-10 2022-08-10 Picture transmission method and device

Publications (1)

Publication Number Publication Date
CN115334057A true CN115334057A (en) 2022-11-11

Family

ID=83922227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210953627.3A Pending CN115334057A (en) 2022-08-10 2022-08-10 Picture transmission method and device

Country Status (1)

Country Link
CN (1) CN115334057A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149370A1 (en) * 2012-11-29 2014-05-29 Inventec Corporation System for analyzing access path to access target file in image and method thereof
CN108833369A (en) * 2018-05-28 2018-11-16 郑州云海信息技术有限公司 A kind of method, device and equipment accessing file system
CN111935094A (en) * 2020-07-14 2020-11-13 北京金山云网络技术有限公司 Database access method, device, system and computer readable storage medium
CN113849839A (en) * 2021-10-12 2021-12-28 深圳追一科技有限公司 Picture display method and device, server, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149370A1 (en) * 2012-11-29 2014-05-29 Inventec Corporation System for analyzing access path to access target file in image and method thereof
CN108833369A (en) * 2018-05-28 2018-11-16 郑州云海信息技术有限公司 A kind of method, device and equipment accessing file system
CN111935094A (en) * 2020-07-14 2020-11-13 北京金山云网络技术有限公司 Database access method, device, system and computer readable storage medium
CN113849839A (en) * 2021-10-12 2021-12-28 深圳追一科技有限公司 Picture display method and device, server, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112333198B (en) Secure cross-domain login method, system and server
US9736146B2 (en) Embedded extrinsic source for digital certificate validation
CN110879903A (en) Evidence storage method, evidence verification method, evidence storage device, evidence verification device, evidence storage equipment and evidence verification medium
EP2264634A1 (en) Method, system and apparatus for content identification
CN111355726B (en) Identity authorization login method and device, electronic equipment and storage medium
CN111625854B (en) Document encryption method, access method, server and system
US7520339B2 (en) Apparatus for achieving integrated management of distributed user information
EP2381383A1 (en) Server authentication method and client terminal
US10326758B2 (en) Service provision system, information processing system, information processing apparatus, and service provision method
CN116432247A (en) Infringement evidence method and device based on blockchain
KR102295113B1 (en) Electronic contract management system using zero knowledge proof based on blockchain, and method thereof
JP2005167412A (en) Communication system, communication terminal and server apparatus used in communication system, and connection authentication method used for communication system
US11784994B2 (en) Management device, management system, and non-transitory computer readable medium
US11283611B2 (en) Token management apparatus and non-transitory computer readable medium storing token management program
JP2020030759A (en) Authority transfer system, information processing apparatus, control method therefor, and program
CN111224826B (en) Configuration updating method, device, system and medium based on distributed system
CN110034922B (en) Request processing method, processing device, request verification method and verification device
CN115334057A (en) Picture transmission method and device
CN116055178A (en) OTP authentication method supporting offline environment
CN112597118B (en) Shared file adding method and device
JP2004070814A (en) Server security management method, device and program
KR100609701B1 (en) An transaction certification method and system to protect privacy on electronic transaction details
KR101633402B1 (en) Namecard management system
JP5282229B2 (en) Service providing system, alteration check method, and alteration check program
KR20140043628A (en) Log-in process method

Legal Events

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