Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a processing method for generating an album according to an embodiment of the present invention, and as shown in fig. 1, the processing method for generating an album according to an embodiment of the present invention includes the following steps:
s101: and if the triggering action selected aiming at the image element is detected in the user session process, generating a key for triggering generation of the album.
Specifically, the device generates a key for triggering generation of the album if the device detects a trigger action for the selection of the image element in the user session process. The device may include a mobile phone, and is not particularly limited. The user session process may be a session process of an instant chat tool used by a user, may be a one-to-one session between users, or may be a group session. The image elements may comprise photos and/or videos, and the trigger action may be a click action of the user clicking on the photos and/or videos that are required to generate the album in the user session message. The visual elements may be included in local user session messages (e.g., chat boxes for WeChat) for user selection.
Fig. 2 is a key screenshot generated in a user session message to trigger generation of an album according to an embodiment of the present invention, and as shown in fig. 2, an upper "some user" in fig. 2 may be selected to implement full selection of all image elements of the user (all are photos in this example), or a part of image elements of the user may be selected (not shown in fig. 2), and the image element selected by the lower "some user" in fig. 2 is a video. Referring to fig. 2, the number of the photos and/or the videos are displayed, respectively, while a key triggering generation of the album is generated. Fig. 2 does not show the number of videos. Fig. 3 is a screenshot of a key generated to trigger generation of an album in a user's album according to an embodiment of the present invention, and as shown in fig. 3, a photo and/or a video in a group session may also be purposefully selected, which is not described in detail again.
Further, a conversation party identifier in the user conversation process is also obtained; accordingly, after the step of generating the album, the method further comprises: and using the identifier of the conversation party as the name of the album. Referring to the above description, the session identifier may be a user name or a group name, and referring to fig. 2, the group name is "ski group". Fig. 4 is a diagram illustrating the effect of generating an album according to an embodiment of the present invention, and as shown in fig. 4 and fig. 2, the name of the album is "ski group" as described above.
Further, the method further comprises: acquiring the time for generating the album and/or the number of the image elements, and displaying the time and/or the number. Referring to fig. 4, the album is generated at 2018-9-26, where the image elements are photographs, and the number of the photographs is 10.
S102: and if the action of triggering the key is detected, generating an album according to whether the image element takes a corresponding processing action in a local cache or not.
Specifically, if the device detects an action of triggering the key, the device generates an album according to whether the image element takes a corresponding processing action in the local cache. The action of the key may be triggered by a click operation, and is not particularly limited.
Further, after this step, the method may further comprise: and displaying the album returned by the server. I.e., the user can be made to see the album generated by the server in real time.
According to the processing method for generating the album, the key for triggering generation of the album is generated in the user session process, and the album can be generated by one key according to whether the image elements take corresponding processing actions in the local cache, so that the operation process of a user in the process of generating the album can be simplified.
On the basis of the foregoing embodiment, the generating an album according to whether the image element is in the local cache or not includes:
and if the image elements are judged and known to be in the local cache, acquiring the image elements from the local cache, and generating an album created based on the image elements in the local cache.
Specifically, if the device determines that the image element is in the local cache, the device acquires the image element from the local cache and generates an album created based on the image element in the local cache. It should be noted that the image elements in the local cache are not compressed, i.e. have better image definition and/or video definition; the image elements not in the local cache are compressed, i.e. have poor image sharpness and/or video sharpness. Taking the image element as an example, the user can click the photo in the user session message, the size of the photo can be displayed on the mobile phone, and the option of 'view original image' is clicked, so that the photo can be stored in the mobile phone cache.
If the image elements are judged to be not in the local cache, sending an album generating request to a server so that the server generates an album created based on the image elements not in the local cache according to the image element identification; wherein the album generation request carries the image element identifier.
Specifically, if the device determines that the image element is not in the local cache, the device sends an album generation request to a server, so that the server generates an album created based on the image element not in the local cache according to the image element identifier; wherein the album generation request carries the image element identifier. The image element identifier may be an ID number, etc., and is not specifically limited, and is specifically described as follows: taking photos as an example, because photos in the session message all have photo identifiers, and each photo identifier corresponds to an access address, the server can acquire uncompressed photos through the access addresses, so that the photos in the generated album have better definition, and then the generated album is sent to the device.
And receiving the album returned by the server according to the album generating request.
Specifically, the device receives the album returned by the server in response to the album generation request. Reference may be made to the above embodiments, which are not described in detail.
According to the processing method for generating the album, provided by the embodiment of the invention, the image elements are obtained from the local cache, and the album is directly generated locally; or the server generates the photo album remotely, so that the image elements in the photo album can be clearer.
On the basis of the above embodiment, after the step of receiving the album returned by the server for the album generation request, the method further includes:
and displaying the album returned by the server.
Specifically, the device displays the album returned by the server. Reference may be made to the above embodiments, which are not described in detail.
The processing method for generating the album provided by the embodiment of the invention can enable the user to see the album generated by the server in time.
On the basis of the embodiment, the conversation party identifier in the user conversation process is also obtained; accordingly, after the step of generating the album, the method further comprises:
and using the identifier of the conversation party as the name of the album.
Specifically, the device uses the identifier of the session party as the name of the album. Reference may be made to the above embodiments, which are not described in detail.
The processing method for generating the album provided by the embodiment of the invention can effectively record the name of the album and is convenient for managing the album.
On the basis of the above embodiment, the method further includes:
acquiring the time for generating the album and/or the number of the image elements, and displaying the time and/or the number.
Specifically, the apparatus acquires the time at which the album is generated and/or the number of the image elements, and displays the time and/or the number. Reference may be made to the above embodiments, which are not described in detail.
The processing method for generating the album provided by the embodiment of the invention can display more comprehensive information and further facilitate the management of the album.
On the basis of the above embodiment, the image element includes a photograph and/or a video; correspondingly, the method further comprises the following steps:
and respectively displaying the number of the photos and/or the number of the videos at the same time of generating a key for triggering generation of the album.
Specifically, the device displays the number of the photos and/or the number of the videos respectively while generating a key for triggering generation of the album. Reference may be made to the above embodiments, which are not described in detail.
The processing method for generating the album provided by the embodiment of the invention can prompt the number of the photos and/or videos selected by the user and avoid misoperation.
Fig. 5 is a schematic structural diagram of a processing apparatus for generating an album according to an embodiment of the present invention, and as shown in fig. 5, an embodiment of the present invention provides a processing apparatus for generating an album, including a first generating unit 501 and a second generating unit 502, where:
the first generating unit 501 is configured to generate a key for triggering generation of an album if a trigger action for selecting an image element is detected in a user session process; the second generating unit 502 is configured to, if an action of triggering the key is detected, generate an album according to whether the image element takes a corresponding processing action in the local cache.
Specifically, the first generating unit 501 is configured to generate a key for triggering generation of an album if a trigger action for selecting an image element is detected in a user session process; the second generating unit 502 is configured to, if an action of triggering the key is detected, generate an album according to whether the image element takes a corresponding processing action in the local cache.
The processing device for generating the album provided by the embodiment of the invention generates the key for triggering generation of the album in the user session process, and can generate the album by one key according to whether the image element takes the corresponding processing action in the local cache, thereby simplifying the operation process of the user in the process of generating the album.
On the basis of the foregoing embodiment, the second generating unit 502 is specifically configured to: if the image elements are judged and known to be in the local cache, acquiring the image elements from the local cache, and generating an album created based on the image elements in the local cache; if the image elements are judged to be not in the local cache, sending an album generating request to a server so that the server generates an album created based on the image elements not in the local cache according to the image element identification; wherein the album generation request carries the image element identifier; and receiving the album returned by the server according to the album generating request.
Specifically, the second generating unit 502 is specifically configured to: if the image elements are judged and known to be in the local cache, acquiring the image elements from the local cache, and generating an album created based on the image elements in the local cache; if the image elements are judged to be not in the local cache, sending an album generating request to a server so that the server generates an album created based on the image elements not in the local cache according to the image element identification; wherein the album generation request carries the image element identifier; and receiving the album returned by the server according to the album generating request.
The processing device for generating the album provided by the embodiment of the invention acquires the image elements from the local cache and directly generates the album locally; or the server generates the photo album remotely, so that the image elements in the photo album can be clearer.
On the basis of the foregoing embodiment, the second generating unit 502 is further specifically configured to: and displaying the album returned by the server.
Specifically, the second generating unit 502 is further specifically configured to: and displaying the album returned by the server.
The processing device for generating the album provided by the embodiment of the invention can enable a user to see the album generated by the server in time.
On the basis of the embodiment, the conversation party identifier in the user conversation process is also obtained; correspondingly, the device is also used for: and using the identifier of the conversation party as the name of the album.
Specifically, the apparatus is further configured to: and using the identifier of the conversation party as the name of the album.
The processing device for generating the album provided by the embodiment of the invention can effectively record the name of the album and is convenient for managing the album.
On the basis of the above embodiment, the apparatus is further configured to: acquiring the time for generating the album and/or the number of the image elements, and displaying the time and/or the number.
Specifically, the apparatus is further configured to: acquiring the time for generating the album and/or the number of the image elements, and displaying the time and/or the number.
The processing device for generating the album provided by the embodiment of the invention can display more comprehensive information and is further convenient for managing the album.
On the basis of the above embodiment, the image element includes a photograph and/or a video; correspondingly, the device is also used for: and respectively displaying the number of the photos and/or the number of the videos at the same time of generating a key for triggering generation of the album.
Specifically, the apparatus is further configured to: and respectively displaying the number of the photos and/or the number of the videos at the same time of generating a key for triggering generation of the album.
The processing device for generating the album provided by the embodiment of the invention can prompt the number of the photos and/or videos selected by the user and avoid misoperation.
The processing apparatus for generating an album according to the embodiment of the present invention may be specifically configured to execute the processing procedures of the above method embodiments, and its functions are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device includes: a processor (processor)601, a memory (memory)602, and a bus 603;
the processor 601 and the memory 602 complete mutual communication through a bus 603;
the processor 601 is configured to call program instructions in the memory 602 to perform the methods provided by the above-mentioned method embodiments, for example, including: if a trigger action selected aiming at the image element is detected in the user session process, generating a key for triggering generation of the album; and if the action of triggering the key is detected, generating an album according to whether the image element takes a corresponding processing action in a local cache or not.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: if a trigger action selected aiming at the image element is detected in the user session process, generating a key for triggering generation of the album; and if the action of triggering the key is detected, generating an album according to whether the image element takes a corresponding processing action in a local cache or not.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: if a trigger action selected aiming at the image element is detected in the user session process, generating a key for triggering generation of the album; and if the action of triggering the key is detected, generating an album according to whether the image element takes a corresponding processing action in a local cache or not.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the electronic device and the like are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.