Summary of the invention
The embodiment of the invention discloses a kind of processing method and system of image link, for solving the problem how effectively reducing the memory space taking server, the maintenance pressure reducing server and save customer flow.
Embodiment of the present invention first aspect discloses a kind of processing method of image link, comprising:
Described image link is generated two-dimension code image by server;
Described two-dimension code image is encoded into character string by described server, and sends described character string to social client;
Described social client receives the described character string that described server sends;
Described character string is decoded into described two-dimension code image by described social client;
Described social client exports described two-dimension code image.
In embodiment of the present invention first aspect, before described image link is generated two-dimension code image by described server, described method also comprises:
The picture of user's picture that the described social client of described server reception sends and main broadcaster user carries out the Split picture of split acquisition;
Split picture described in described server stores;
Described server obtains the memory address of described Split picture as image link.
In embodiment of the present invention first aspect, described two-dimension code image is encoded into character string by described server, comprising:
Described two-dimension code image is encoded into byte stream by described server;
And described byte stream is encoded into base64 character string by described server.
In embodiment of the present invention first aspect, described character string is decoded into described two-dimension code image by described social client, comprising:
Described base64 character string is decoded into byte stream by described social client;
And described byte stream is decoded into described two-dimension code image by described social client.
In embodiment of the present invention first aspect, described server sends described character string to social client, comprising:
Described server for foundation, determines user's viscosity of described social client with the login frequency of social client or frequency of interaction; Wherein, the height of described user's viscosity depends on the size of described login frequency or the size of described frequency of interaction;
Described server judges whether user's viscosity of described social client exceedes default viscosity, if exceeded, sends described character string to described social client.
Embodiment of the present invention second aspect discloses a kind for the treatment of system of image link, comprises server and social client, wherein:
Described server, for generating two-dimension code image by described image link;
Described server, also for described two-dimension code image is encoded into character string, and sends described character string to social client;
Described social client, for receiving the described character string that described server sends;
Described social client, also for described character string is decoded into described two-dimension code image;
Described social client, also for exporting described two-dimension code image.
In embodiment of the present invention second aspect:
Described server, also for before described image link is generated two-dimension code image, the picture receiving user's picture that described social client sends and main broadcaster user carries out the Split picture of split acquisition; And, store described Split picture; And, obtain the memory address of described Split picture as image link.
In embodiment of the present invention second aspect, the mode that described two-dimension code image is encoded into character string is specially by described server:
Described two-dimension code image is encoded into byte stream by described server;
And described byte stream is encoded into base64 character string by described server.
In embodiment of the present invention second aspect, the mode that described character string is decoded into described two-dimension code image is specially by described social client:
Described base64 character string is decoded into byte stream by described social client;
And described byte stream is decoded into described two-dimension code image by described social client.
In embodiment of the present invention second aspect, the mode that described server sends described character string to social client is specially:
Described server for foundation, determines user's viscosity of described social client with the login frequency of social client or frequency of interaction; Wherein, the height of described user's viscosity depends on the size of described login frequency or the size of described frequency of interaction;
Described server judges whether user's viscosity of described social client exceedes default viscosity, if exceeded, sends described character string to described social client.
In the embodiment of the present invention, image link is generated two-dimension code image by server, and two-dimension code image is encoded into character string, and directly send to social client, thus effectively can reduce the memory space that two-dimension code image takies server, and reduce the maintenance pressure of server maintenance two-dimension code image; Meanwhile, social client, without the need to downloading two-dimension code image, can save customer flow, promotes Consumer's Experience.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the invention discloses a kind of processing method and system of image link, effectively can reduce the memory space taking server, the maintenance pressure reducing server and save customer flow.Below be described in detail respectively.
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of the processing method of a kind of image link disclosed in the embodiment of the present invention.As shown in Figure 1, the processing method of this image link can comprise the following steps.
101, image link is generated two-dimension code image by server.
In the embodiment of the present invention, server can call two-dimension code generator and image link is generated two-dimension code image.Wherein, image link can refer to the memory address of picture.Further, in the embodiment of the present invention, picture can be Split picture, such as, can be social client send carry out split by the picture of user's picture and main broadcaster user and the Split picture that obtains.
102, two-dimension code image is encoded into character string by server, and sends character string to social client.
In one embodiment, two-dimension code image can be encoded into byte stream by server, and byte stream is encoded into base64 character string.Certainly, server also can adopt other coded systems byte stream to be encoded into general character string or byte stream array, and the embodiment of the present invention is not construed as limiting.
Wherein, because character string can use Unicode character set, multi-language character can be supported, therefore, byte stream is encoded into base64 character string by server not only can realize higher efficiency of transmission (character string usually with 16 transmission, and byte stream is usually with 8 transmission), can also realize crossing over kinds of platform transmission, meanwhile, base64 character string can also be supported in web browser and do direct display.
103, the character string of social client reception server transmission.
104, character string is decoded into two-dimension code image by social client.
In one embodiment, base64 character string can be decoded into byte stream by social client, then byte stream is decoded into two-dimension code image.
105, social client exports two-dimension code image.
In the embodiment of the present invention, user can click or the long two-dimension code image exported by social client, makes social client can resolve two-dimension code image and obtains image link, and obtain corresponding picture output display according to image link.
In the method described by Fig. 1, image link is generated two-dimension code image by server, and two-dimension code image is encoded into character string, and directly send to social client, thus effectively can reduce the memory space that two-dimension code image takies server, and reduce the maintenance pressure of server maintenance two-dimension code image; Meanwhile, social client, without the need to downloading two-dimension code image, can save customer flow, promotes Consumer's Experience.
Refer to Fig. 2, Fig. 2 is the schematic flow sheet of the processing method of another kind of image link disclosed in the embodiment of the present invention.As shown in Figure 2, the processing method of this image link can comprise the following steps.
201, the picture of family picture and main broadcaster user is carried out split by user in social client, obtains Split picture.
202, Split picture is sent to server by social client.
203, server receives the Split picture that social client sends.
204, server stores Split picture.
205, server obtains the memory address of Split picture as image link.
206, image link is generated two-dimension code image by server.
207, two-dimension code image is encoded into base64 character string by server.
208, server sends base64 character string to social client.
209, the base64 character string of social client reception server transmission.
210, base64 character string is decoded into two-dimension code image by social client.
211, social client exports two-dimension code image.
See also Fig. 3, interface schematic diagram when Fig. 3 is a kind of social client output two-dimension code image disclosed in the embodiment of the present invention.As shown in Figure 3, the Split picture that on interface during social client output two-dimension code image, all right export server simultaneously sends.
In the method described by Fig. 2, image link is generated two-dimension code image by server, and two-dimension code image is encoded into base64 character string, and directly send to social client, thus effectively can reduce the memory space that two-dimension code image takies server, and reduce the maintenance pressure of server maintenance two-dimension code image; Meanwhile, social client, without the need to downloading two-dimension code image, can save customer flow, promotes Consumer's Experience.
Refer to Fig. 4, Fig. 4 is the schematic flow sheet of the processing method of another kind of image link disclosed in the embodiment of the present invention.As shown in Figure 4, the processing method of this image link can comprise the following steps.
401, the picture of family picture and main broadcaster user is carried out split by user in social client, obtains Split picture.
402, Split picture is sent to server by social client.
403, server receives the Split picture that social client sends.
404, server stores Split picture.
405, server obtains the memory address of Split picture as image link.
406, image link is generated two-dimension code image by server.
407, two-dimension code image is encoded into base64 character string by server.
In one embodiment, two-dimension code image can be encoded into byte stream by server, and byte stream is encoded into base64 character string.
408, server is with the login frequency of social client or frequency of interaction for foundation, determines user's viscosity of social client; Wherein, the height of user's viscosity depends on the login size of frequency or the size of frequency of interaction.
For example, the login frequency of social client and the product of predetermined coefficient can be calculated, as user's viscosity of social client; Or, the frequency of interaction of social client and the product of predetermined coefficient can be calculated, as user's viscosity of social client.Wherein, frequency of interaction refers to that social client sends the frequency of information, or refer to that social client receives the frequency of information, the embodiment of the present invention does not limit.
409, server judges whether user's viscosity of social client exceedes default viscosity, if exceeded, performs step 410; Otherwise export information to social client, this information, for pointing out user's viscosity of social client too low, cannot enjoy two-dimension code image, and process ends.
410, server sends base64 character string to social client.
411, the base64 character string of social client reception server transmission.
412, base64 character string is decoded into two-dimension code image by social client.
In one embodiment, base64 character string can be decoded into byte stream by social client, then byte stream is decoded into two-dimension code image.
In the embodiment of the present invention, by implementing above-mentioned steps 408 ~ step 409, server only can send base64 character string to the social client that user's viscosity is higher, make this part of social client only having user's viscosity higher just can receive base64 character string and be decoded into two-dimension code image, thus more user can be attracted to use social client, social client can be employed more widely.
413, social client exports two-dimension code image.
In the method described by Fig. 4, image link is generated two-dimension code image by server, and two-dimension code image is encoded into character string, and the social client directly sending to user's viscosity higher, thus effectively can reduce the memory space that two-dimension code image takies server, and reduce the maintenance pressure of server maintenance two-dimension code image; Meanwhile, social client, without the need to downloading two-dimension code image, can save customer flow, promotes Consumer's Experience.
Refer to Fig. 5, Fig. 5 is the structural representation of the treatment system of a kind of image link disclosed in the embodiment of the present invention.As shown in Figure 5, the treatment system of this image link can comprise:
Server 501 and social client 502, wherein, server 501 is connected by the Internet with social client 502, wherein:
Server 501, for generating two-dimension code image by image link;
Server 501, also for two-dimension code image is encoded into character string, and sends character string to social client 402;
Social client 502, for the character string that reception server 501 sends;
Social client 502, also for character string being decoded into dimension code picture;
Social client 502, also for exporting two-dimension code image.
As the optional execution mode of one, in the system described by Fig. 5:
Server 501, also for before image link is generated two-dimension code image, what receive that social client 502 sends carries out split by the picture of user's picture and main broadcaster user and the Split picture that obtains; And, store Split picture; And, obtain the memory address of Split picture as image link.
As the optional execution mode of one, in the system described by Fig. 5:
The mode that two-dimension code image is encoded into character string by server 501 is specifically as follows:
Two-dimension code image is encoded into byte stream by server 501;
And byte stream changes into as character string by server 501.
As the optional execution mode of one, in the system described by Fig. 5:
The mode that character string is decoded into two-dimension code image by social client 502 is specifically as follows:
Base64 character string is decoded into byte stream by social client 502;
And byte stream is decoded into two-dimension code image by social client 502.
As the optional execution mode of one, in the system described by Fig. 5:
The mode that server 501 sends character string to social client 502 is specially:
Server 501 for foundation, determines user's viscosity of social client with the login frequency of social client 502 or frequency of interaction; Wherein, the height of user's viscosity depends on the login size of frequency or the size of described frequency of interaction;
Server 501 judges whether user's viscosity of social client exceedes default viscosity, if exceeded, sends character string to social client.
In the treatment system of the image link described by Fig. 5, image link is generated two-dimension code image by server, and two-dimension code image is encoded into character string, and the social client directly sending to user's viscosity higher, thus effectively can reduce the memory space that two-dimension code image takies server, and reduce the maintenance pressure of server maintenance two-dimension code image; Meanwhile, social client, without the need to downloading two-dimension code image, can save customer flow, promotes Consumer's Experience.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, storage medium comprises read-only memory (Read-OnlyMemory, ROM), random asccess memory (RandomAccessMemory, RAM), programmable read only memory (ProgrammableRead-onlyMemory, PROM), Erasable Programmable Read Only Memory EPROM (ErasableProgrammableReadOnlyMemory, EPROM), disposable programmable read-only memory (One-timeProgrammableRead-OnlyMemory, OTPROM), the electronics formula of erasing can make carbon copies read-only memory (Electrically-ErasableProgrammableRead-OnlyMemory, EEPROM), read-only optical disc (CompactDiscRead-OnlyMemory, or other disk storages CD-ROM), magnetic disc store, magnetic tape storage, or can be used in any other medium computer-readable carrying or store data.
Above the processing method of a kind of image link disclosed in the embodiment of the present invention and system are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.